|
rapidyaml
0.11.0
parse and emit YAML, and do it fast
|
This event produces standard YAML events as used in the YAML test suite. More...
#include <event_handler_testsuite.hpp>
Public Types | |
| using | pfn_relocate_arena = detail::pfn_relocate_arena |
types | |
| using | state = EventHandlerTestSuiteState |
| using | EventSink = extra::string |
Public Member Functions | |
| void | check_trailing_doc_token () const |
| Check whether the current parse tokens are trailing on the previous doc, and raise an error if they are. More... | |
construction and resetting | |
| EventHandlerTestSuite () | |
| EventHandlerTestSuite (Callbacks const &cb) | |
| EventHandlerTestSuite (EventSink *sink, Callbacks const &cb) | |
| EventHandlerTestSuite (EventSink *sink) | |
| void | reset () |
parse events | |
| void | start_parse (const char *filename, csubstr src, detail::pfn_relocate_arena relocate_arena, void *relocate_arena_data) |
| void | finish_parse () |
| void | cancel_parse () |
YAML stream events | |
| void | begin_stream () |
| void | end_stream () |
YAML document events | |
| void | begin_doc () |
| implicit doc start (without —) More... | |
| void | end_doc () |
| implicit doc end (without ...) More... | |
| void | begin_doc_expl () |
| explicit doc start, with — More... | |
| void | end_doc_expl () |
| explicit doc end, with ... More... | |
YAML map functions | |
| void | begin_map_key_flow () |
| void | begin_map_key_block () |
| void | begin_map_val_flow () |
| void | begin_map_val_block () |
| void | end_map_block () |
| void | end_map_flow (bool) |
YAML seq events | |
| void | begin_seq_key_flow () |
| void | begin_seq_key_block () |
| void | begin_seq_val_flow () |
| void | begin_seq_val_block () |
| void | end_seq_block () |
| void | end_seq_flow (bool) |
YAML structure events | |
| void | add_sibling () |
| void | actually_val_is_first_key_of_new_map_flow () |
| set the previous val as the first key of a new map, with flow style. More... | |
| void | actually_val_is_first_key_of_new_map_block () |
| like its flow counterpart, but this function can only be called after the end of a flow-val at root or doc level. More... | |
YAML scalar events | |
| void | set_key_scalar_plain_empty () noexcept |
| void | set_val_scalar_plain_empty () noexcept |
| void | set_key_scalar_plain (csubstr scalar) |
| void | set_val_scalar_plain (csubstr scalar) |
| void | set_key_scalar_dquoted (csubstr scalar) |
| void | set_val_scalar_dquoted (csubstr scalar) |
| void | set_key_scalar_squoted (csubstr scalar) |
| void | set_val_scalar_squoted (csubstr scalar) |
| void | set_key_scalar_literal (csubstr scalar) |
| void | set_val_scalar_literal (csubstr scalar) |
| void | set_key_scalar_folded (csubstr scalar) |
| void | set_val_scalar_folded (csubstr scalar) |
| void | mark_key_scalar_unfiltered () |
| void | mark_val_scalar_unfiltered () |
YAML anchor/reference events | |
| void | set_key_anchor (csubstr anchor) |
| void | set_val_anchor (csubstr anchor) |
| void | set_key_ref (csubstr ref) |
| void | set_val_ref (csubstr ref) |
YAML tag events | |
| void | set_key_tag (csubstr tag) |
| void | set_val_tag (csubstr tag) |
YAML directive events | |
| void | add_directive (csubstr directive) |
YAML arena events | |
| substr | alloc_arena (size_t len) |
| substr | alloc_arena (size_t len, substr *relocated) |
Public Attributes | |
| detail::stack< state > | m_stack |
| state * | m_curr |
| current stack level: top of the stack. cached here for easier access. More... | |
| state * | m_parent |
| parent of the current stack level. More... | |
| pfn_relocate_arena | m_relocate_arena |
| callback when the arena gets relocated More... | |
| void * | m_relocate_arena_data |
| csubstr | m_src |
Protected Member Functions | |
| void | _stack_start_parse (const char *filename, csubstr ymlsrc, pfn_relocate_arena relocate_arena, void *relocate_arena_data) |
| void | _stack_finish_parse () |
| void | _stack_reset_root () |
| void | _stack_reset_non_root () |
| void | _stack_push () |
| void | _stack_pop () |
| bool | _stack_should_push_on_begin_doc () const |
| bool | _stack_should_pop_on_end_doc () const |
| void | _stack_relocate_to_new_arena (csubstr prev, substr curr) |
| substr | _stack_relocate_to_new_arena (csubstr s, csubstr prev, substr curr) |
This event produces standard YAML events as used in the YAML test suite.
See the documentation for Event Handlers, which has important notes about the event model used by rapidyaml.
This class is used only in the CI of this project, and in the application used as part of the standard YAML playground. It is not part of the library and is not installed. *
Definition at line 45 of file event_handler_testsuite.hpp.
| using c4::yml::extra::EventHandlerTestSuite::state = EventHandlerTestSuiteState |
Definition at line 52 of file event_handler_testsuite.hpp.
Definition at line 54 of file event_handler_testsuite.hpp.
|
inherited |
Definition at line 47 of file event_handler_stack.hpp.
|
inline |
Definition at line 82 of file event_handler_testsuite.hpp.
|
inline |
Definition at line 83 of file event_handler_testsuite.hpp.
|
inline |
Definition at line 84 of file event_handler_testsuite.hpp.
|
inline |
Definition at line 88 of file event_handler_testsuite.hpp.
|
inline |
Definition at line 90 of file event_handler_testsuite.hpp.
References c4::yml::extra::string::clear(), c4::yml::extra::string_vector::clear(), c4::yml::extra::string::reserve(), c4::yml::extra::string::resize(), c4::yml::extra::string_vector::resize(), c4::yml::RTOP, and c4::yml::RUNK.
|
inline |
Definition at line 114 of file event_handler_testsuite.hpp.
|
inline |
Definition at line 119 of file event_handler_testsuite.hpp.
|
inline |
Definition at line 126 of file event_handler_testsuite.hpp.
|
inline |
Definition at line 140 of file event_handler_testsuite.hpp.
|
inline |
Definition at line 145 of file event_handler_testsuite.hpp.
|
inline |
implicit doc start (without —)
Definition at line 159 of file event_handler_testsuite.hpp.
References c4::yml::DOC.
|
inline |
implicit doc end (without ...)
Definition at line 172 of file event_handler_testsuite.hpp.
|
inline |
explicit doc start, with —
Definition at line 184 of file event_handler_testsuite.hpp.
References c4::yml::DOC.
|
inline |
|
inline |
Definition at line 216 of file event_handler_testsuite.hpp.
References _has_any_, c4::yml::FLOW_SL, c4::yml::MAP, and c4::yml::VAL.
|
inline |
Definition at line 226 of file event_handler_testsuite.hpp.
References _has_any_, c4::yml::BLOCK, c4::yml::MAP, and c4::yml::VAL.
|
inline |
Definition at line 237 of file event_handler_testsuite.hpp.
References _has_any_, c4::yml::FLOW_SL, c4::yml::MAP, and c4::yml::VAL.
|
inline |
Definition at line 247 of file event_handler_testsuite.hpp.
References _has_any_, c4::yml::BLOCK, c4::yml::MAP, and c4::yml::VAL.
|
inline |
Definition at line 258 of file event_handler_testsuite.hpp.
|
inline |
Definition at line 264 of file event_handler_testsuite.hpp.
|
inline |
Definition at line 277 of file event_handler_testsuite.hpp.
References _has_any_, c4::yml::FLOW_SL, c4::yml::SEQ, and c4::yml::VAL.
|
inline |
Definition at line 287 of file event_handler_testsuite.hpp.
References _has_any_, c4::yml::BLOCK, c4::yml::SEQ, and c4::yml::VAL.
|
inline |
Definition at line 298 of file event_handler_testsuite.hpp.
References _has_any_, c4::yml::FLOW_SL, c4::yml::SEQ, and c4::yml::VAL.
|
inline |
Definition at line 308 of file event_handler_testsuite.hpp.
References _has_any_, c4::yml::BLOCK, c4::yml::SEQ, and c4::yml::VAL.
|
inline |
Definition at line 319 of file event_handler_testsuite.hpp.
|
inline |
Definition at line 325 of file event_handler_testsuite.hpp.
|
inline |
Definition at line 338 of file event_handler_testsuite.hpp.
|
inline |
set the previous val as the first key of a new map, with flow style.
See the documentation for Event Handlers, which has important notes about this event.
Definition at line 350 of file event_handler_testsuite.hpp.
References c4::yml::_VALMASK, and c4::yml::VAL_STYLE.
|
inline |
like its flow counterpart, but this function can only be called after the end of a flow-val at root or doc level.
See the documentation for Event Handlers, which has important notes about this event.
Definition at line 372 of file event_handler_testsuite.hpp.
References c4::yml::extra::string::find_last(), c4::yml::extra::string::insert(), and c4::yml::npos.
|
inlinenoexcept |
Definition at line 406 of file event_handler_testsuite.hpp.
References c4::yml::KEY, c4::yml::KEY_PLAIN, and c4::yml::KEYNIL.
|
inlinenoexcept |
Definition at line 412 of file event_handler_testsuite.hpp.
References c4::yml::VAL, c4::yml::VAL_PLAIN, and c4::yml::VALNIL.
|
inline |
Definition at line 419 of file event_handler_testsuite.hpp.
References c4::yml::KEY, and c4::yml::KEY_PLAIN.
|
inline |
Definition at line 425 of file event_handler_testsuite.hpp.
References c4::yml::VAL, and c4::yml::VAL_PLAIN.
|
inline |
Definition at line 433 of file event_handler_testsuite.hpp.
References c4::yml::KEY, and c4::yml::KEY_DQUO.
|
inline |
Definition at line 439 of file event_handler_testsuite.hpp.
References c4::yml::VAL, and c4::yml::VAL_DQUO.
|
inline |
Definition at line 447 of file event_handler_testsuite.hpp.
References c4::yml::KEY, and c4::yml::KEY_SQUO.
|
inline |
Definition at line 453 of file event_handler_testsuite.hpp.
References c4::yml::VAL, and c4::yml::VAL_SQUO.
|
inline |
Definition at line 461 of file event_handler_testsuite.hpp.
References c4::yml::KEY, and c4::yml::KEY_LITERAL.
|
inline |
Definition at line 467 of file event_handler_testsuite.hpp.
References c4::yml::VAL, and c4::yml::VAL_LITERAL.
|
inline |
Definition at line 475 of file event_handler_testsuite.hpp.
References c4::yml::KEY, and c4::yml::KEY_FOLDED.
|
inline |
Definition at line 481 of file event_handler_testsuite.hpp.
References c4::yml::VAL, and c4::yml::VAL_FOLDED.
|
inline |
Definition at line 489 of file event_handler_testsuite.hpp.
|
inline |
Definition at line 493 of file event_handler_testsuite.hpp.
|
inline |
Definition at line 505 of file event_handler_testsuite.hpp.
References _has_any_, c4::yml::KEYANCH, and c4::yml::KEYREF.
|
inline |
Definition at line 513 of file event_handler_testsuite.hpp.
References _has_any_, c4::yml::VALANCH, and c4::yml::VALREF.
|
inline |
Definition at line 522 of file event_handler_testsuite.hpp.
References _has_any_, c4::yml::KEY, c4::yml::KEYANCH, and c4::yml::KEYREF.
|
inline |
Definition at line 533 of file event_handler_testsuite.hpp.
References _has_any_, c4::yml::VAL, c4::yml::VALANCH, and c4::yml::VALREF.
|
inline |
|
inline |
|
inline |
Definition at line 572 of file event_handler_testsuite.hpp.
References RYML_MAX_TAG_DIRECTIVES.
|
inline |
Definition at line 603 of file event_handler_testsuite.hpp.
References c4::yml::extra::string::resize(), c4::yml::extra::string::size(), and c4::to_substr().
|
inline |
Definition at line 615 of file event_handler_testsuite.hpp.
References c4::to_substr().
|
inlineprotectedinherited |
Definition at line 65 of file event_handler_stack.hpp.
|
inlineprotectedinherited |
Definition at line 76 of file event_handler_stack.hpp.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
Definition at line 108 of file event_handler_stack.hpp.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
Definition at line 135 of file event_handler_stack.hpp.
|
inlineprotectedinherited |
Definition at line 143 of file event_handler_stack.hpp.
|
inlineprotectedinherited |
Definition at line 157 of file event_handler_stack.hpp.
|
inlineinherited |
Check whether the current parse tokens are trailing on the previous doc, and raise an error if they are.
This function is called by the parse engine (not the event handler) before a doc is started.
Definition at line 172 of file event_handler_stack.hpp.
|
inherited |
Definition at line 51 of file event_handler_stack.hpp.
|
inherited |
current stack level: top of the stack. cached here for easier access.
Definition at line 52 of file event_handler_stack.hpp.
|
inherited |
parent of the current stack level.
Definition at line 53 of file event_handler_stack.hpp.
|
inherited |
callback when the arena gets relocated
Definition at line 54 of file event_handler_stack.hpp.
|
inherited |
Definition at line 55 of file event_handler_stack.hpp.
|
inherited |
Definition at line 56 of file event_handler_stack.hpp.