1 #ifndef C4_YML_PARSE_HPP_
2 #define C4_YML_PARSE_HPP_
4 #ifndef C4_YML_COMMON_HPP_
7 #ifndef C4_YML_PARSE_OPTIONS_HPP_
16 template<
class EventHandler>
class ParseEngine;
17 struct EventHandlerTree;
38 using Parser = ParseEngine<EventHandlerTree>;
183 #define RYML_DONT_PARSE_SUBSTR_IN_ARENA "" \
184 "Do not pass a (mutable) substr to parse_in_arena(); " \
185 "if you have a substr, it should be parsed in place. " \
186 "Consider using parse_in_place() instead, or convert " \
187 "the buffer to csubstr prior to calling. This function " \
188 " is deliberately left undefined, so that calling it " \
189 "will cause a linker error."
309 RYML_DEPRECATED(RYML_DONT_PARSE_SUBSTR_IN_ARENA)
void parse_in_arena(
substr yaml, NodeRef node );
void parse_json_in_arena(Parser *parser, csubstr filename, csubstr json, Tree *tree, id_type node_id)
(1) parse JSON into an existing tree node. The filename will be used in any error messages arising du...
ParseEngine< EventHandlerTree > Parser
This is the main ryml parser, where the parser events are handled to create a ryml tree (see Event Ha...
void parse_in_arena(Parser *parser, csubstr filename, csubstr yaml, Tree *tree, id_type node_id)
(1) parse YAML into an existing tree node. The filename will be used in any error messages arising du...
Common utilities and infrastructure used by ryml.
RYML_ID_TYPE id_type
The type of a node id in the YAML tree; to override the default type, define the macro RYML_ID_TYPE t...
basic_substring< char > substr
a mutable string view
basic_substring< const char > csubstr
an immutable string view
id_type estimate_tree_capacity(csubstr src)
Quickly inspect the source to estimate the number of nodes the resulting tree is likely to have...
void parse_in_place(Parser *parser, csubstr filename, substr yaml, Tree *tree, id_type node_id)
(1) parse YAML into an existing tree node.
void parse_json_in_place(Parser *parser, csubstr filename, substr json, Tree *tree, id_type node_id)
(1) parse JSON into an existing tree node. The filename will be used in any error messages arising du...