|
rapidyaml 0.15.2
parse and emit YAML, and do it fast
|
Typedefs | |
| using | evt_bits = int32_t |
| data type for integer events bits. | |
Enumerations | |
| enum | EventBits : evt_bits { KEY_ = (1 << 0) , VAL_ = (1 << 1) , BEG_ = (1 << 2) , END_ = (1 << 3) , SEQ_ = (1 << 4) , MAP_ = (1 << 5) , DOC_ = (1 << 6) , EXPL = (1 << 7) , STRM = (1 << 8) , BSEQ = BEG_|SEQ_ , ESEQ = END_|SEQ_ , BMAP = BEG_|MAP_ , EMAP = END_|MAP_ , BSTR = BEG_|STRM , ESTR = END_|STRM , BDOC = BEG_|DOC_ , EDOC = END_|DOC_ , SCLR = (1 << 9) , ALIA = (1 << 10) , ANCH = (1 << 11) , TAG_ = (1 << 12) , YAML = (1 << 13) , TAGH = (1 << 14) , TAGP = (1 << 15) , PLAI = (1 << 16) , SQUO = (1 << 17) , DQUO = (1 << 18) , LITL = (1 << 19) , FOLD = (1 << 20) , FLOW = (1 << 21) , BLCK = (1 << 22) , UNFILT = (1 << 23) , AREN = (1 << 24) , WSTR = SCLR|ALIA|ANCH|TAG_|TAGH|TAGP|YAML , PSTR = (1 << 25) , JUMP = (1 << 26) , PJUMP = (1 << 27) , LAST = PJUMP , MASK = (LAST << 1) - 1 } |
| enumeration of integer event bits. More... | |
Functions | |
| size_t | to_str (substr buf, yml::extra::ievt::evt_bits flags) noexcept |
| Convert bit mask of ievt::EventBits to text. | |
| csubstr | to_str_sub (substr buf, yml::extra::ievt::evt_bits flags) |
| Convert bit mask of ievt::EventBits to text. | |
| using c4::yml::extra::ievt::evt_bits = int32_t |
data type for integer events bits.
This is set to an int32_t integer to allow compatibility with a wide range of processing languages.
Definition at line 45 of file event_handler_ints.hpp.
enumeration of integer event bits.
| Enumerator | |
|---|---|
| KEY_ | as key |
| VAL_ | as value |
| BEG_ | scope: begin |
| END_ | scope: end |
| SEQ_ | scope: seq |
| MAP_ | scope: map |
| DOC_ | scope: doc |
| EXPL | --- (with BDOC) or ... (with EDOC) |
| STRM | scope: stream |
| BSEQ | begin seq (+SEQ in test suite events) |
| ESEQ | end seq (-SEQ in test suite events) |
| BMAP | begin map (+MAP in test suite events) |
| EMAP | end map (-MAP in test suite events) |
| BSTR | begin stream (+STR in test suite events) |
| ESTR | end stream (-STR in test suite events) |
| BDOC | begin doc (+DOC in test suite events) |
| EDOC | end doc (-DOC in test suite events) |
| SCLR | scalar (=VAL in test suite events) |
| ALIA | *ref (reference) |
| ANCH | &anchor |
| TAG_ | !tag |
| YAML | yaml directive: \YAML <version> |
| TAGH | tag directive, handle: \TAG <handle> ........ |
| TAGP | tag directive, prefix: \TAG ........ <prefix> |
| PLAI | scalar: plain |
| SQUO | scalar: single-quoted (') |
| DQUO | scalar: double-quoted ("") |
| LITL | scalar: block literal (|) |
| FOLD | scalar: block folded (>) |
| FLOW | container: flow: [] for seqs or {} for maps |
| BLCK | container: block |
| UNFILT | Special flag to mark a scalar as unfiltered (when the parser is set not to filter). |
| AREN | Special flag to mark events whose string was placed in the arena. This happens when the filtered string is larger than the original string in the YAML code (eg from tags that resolve to a larger string, or from "\L" or "\P" in double quotes, which expand from two to three bytes). Because of this size expansion, the filtered string cannot be placed in the original source and needs to be placed in the arena. |
| WSTR | WithSTRing: mask of all events that encode a string following the event. For such events, the next two integers will provide respectively the string's offset and length. See also PSTR. |
| PSTR | Special flag to enable look-back in the event array. It signifies that the previous event has a string, meaning that the jump back to that event is 3 positions. without this flag it would be impossible to jump to the previous event. see also WSTR. |
| JUMP | unused: reserved for future use (to enable rope-like buffers) |
| PJUMP | unused: reserved for future use (same purpose as PSTR, but for JUMP) |
| LAST | the last flag defined above |
| MASK | a mask of all bits in this enumeration |
Definition at line 49 of file event_handler_ints.hpp.
|
noexcept |
Convert bit mask of ievt::EventBits to text.
Definition at line 60 of file ints_utils.cpp.
Referenced by to_str(), and to_str_sub().
| csubstr c4::yml::extra::ievt::to_str_sub | ( | substr | buf, |
| ievt::evt_bits | flags ) |
Convert bit mask of ievt::EventBits to text.
Definition at line 80 of file ints_utils.cpp.
Referenced by c4::yml::extra::events_ints_print(), and to_str_sub().