|
rapidyaml
0.11.1
parse and emit YAML, and do it fast
|
Modules | |
| Scalar filter processors | |
| These are internal utilities used by ParseEngine to parse the scalars; normally there is no reason for a user to be manually using these classes. | |
| Parse in place with existing parser | |
| parse a mutable YAML source buffer (re)using an existing parser. | |
| Parse in place with temporary parser | |
| parse a mutable YAML source buffer. | |
| Parse in arena with existing parser | |
| parse a read-only (immutable) YAML source buffer. | |
| Parse in arena with temporary parser | |
| parse a read-only (immutable) YAML source buffer. | |
| Event Handlers | |
| rapidyaml implements its parsing logic with a two-level model, where a ParseEngine object reads through the YAML source, and dispatches events to an EventHandler bound to the ParseEngine. | |
Classes | |
| class | c4::yml::ParseEngine< EventHandler > |
| This is the main driver of parsing logic: it scans the YAML or JSON source for tokens, and emits the appropriate sequence of parsing events to its event handler. More... | |
Typedefs | |
| using | c4::yml::Parser = ParseEngine< EventHandlerTree > |
| This is the main ryml parser, where the parser events are handled to create a ryml tree. More... | |
| typedef enum c4::yml::BlockChomp_ | c4::yml::BlockChomp_e |
Enumerations | |
| enum | c4::yml::BlockChomp_ { c4::yml::CHOMP_CLIP , c4::yml::CHOMP_STRIP , c4::yml::CHOMP_KEEP } |
Functions | |
| id_type | c4::yml::estimate_tree_capacity (csubstr src) |
| Quickly inspect the source to estimate the number of nodes the resulting tree is likely to have. More... | |
| typedef ParseEngine< EventHandlerTree > c4::yml::Parser |
This is the main ryml parser, where the parser events are handled to create a ryml tree.
| typedef enum c4::yml::BlockChomp_ c4::yml::BlockChomp_e |
| enum c4::yml::BlockChomp_ |
| Enumerator | |
|---|---|
| CHOMP_CLIP | single newline at end (default) |
| CHOMP_STRIP | no newline at end (-) |
| CHOMP_KEEP | all newlines from end (+) |
Definition at line 209 of file parse_engine.hpp.
| id_type c4::yml::estimate_tree_capacity | ( | csubstr | src | ) |
Quickly inspect the source to estimate the number of nodes the resulting tree is likely to have.
If a tree is empty before parsing, considerable time will be spent growing it, so calling this to reserve the tree size prior to parsing is likely to result in a time gain. We encourage using this method before parsing, but as always measure its impact in performance to obtain a good trade-off.
[these: are, individual: maps]. Definition at line 134 of file parse.cpp.