|
Dynalib Utils
|
#include <KAMLParser.h>
Public Member Functions | |
| KAMLParser () | |
| virtual | ~KAMLParser () |
| Tokenizer * | getTok () |
| bool | parseKaml (const String &buf, Node *rootNode) |
| bool | parseBlock (Token &token, Node *parentNode, int parentIndent, int level) |
| bool | parseTypeCast (Token &token) |
| void | applyTypeCast (Node *valueNode) |
| bool | parseBlockValue (Token &token, Node *parentNode, int level) |
| parse the next value (scalar, list entry, or map entry) More... | |
| bool | parseFlowValue (Token &token, Node *parentNode) |
| parse the next flow value (scalar, list entry, or map entry) More... | |
| bool | parseFlowList (Token &token, Node *parentNode) |
| bool | parseFlowMap (Token &token, Node *parentNode) |
| bool | parseScalar (Token &token, Node *scalarNode) |
| bool | parseUnquotedString (Token &token, Node *scalarNode) |
| parses an unquoted string into this node More... | |
| bool | parseFormattedString (Token &token, Node *scalarNode) |
| parses a formatted string into this node More... | |
| KAML::KAMLParser::KAMLParser | ( | ) |
|
virtual |
| void KAML::KAMLParser::applyTypeCast | ( | Node * | valueNode | ) |
| Tokenizer * KAML::KAMLParser::getTok | ( | ) |
test: "string" test: - "string"
key: 1 key2: 2 key3: 3
test: // This is indented, so begins a new list as the map value
test: key: 1
// The above parses as ["A", "B", [1, 2], "C"]
This call to parseBlock is for the purpose of starting a new list node, or the continuation of a parent list by adding sub-lists to it. When this call executes the called function will go to the parseBlock below, since the indent level will be zero.
This parseBlock will actually add new entries to the list node (parentNode), ultimately calling parseBlockValue.
skip CRLFs/Spaces then check for ":" to see if we have a map entry
parse the next value (scalar, list entry, or map entry)
| token | |
| parentNode | this must be a list or map |
parse the next flow value (scalar, list entry, or map entry)
| token | |
| parentNode | this must be a list or map |
skip CRLFs/Spaces then check for ":" to see if we have a map entry
parses a formatted string into this node
| token | the token of the initial vertical bar |
| node | holds the formatted string |
| bool KAML::KAMLParser::parseTypeCast | ( | Token & | token | ) |
parses an unquoted string into this node
| token | the first token of the unquoted string |
| node | holds the unquoted string |
1.8.13