Data Structures | |
struct | yaml_simple_key_t |
This structure holds information about a potential simple key. More... | |
struct | yaml_parser_t |
The parser structure. More... | |
Typedefs | |
typedef int | yaml_read_handler_t (void *data, unsigned char *buffer, size_t size, size_t *size_read) |
The prototype of a read handler. | |
Enumerations | |
enum | yaml_parser_state_t { YAML_PARSE_STREAM_START_STATE, YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE, YAML_PARSE_DOCUMENT_START_STATE, YAML_PARSE_DOCUMENT_CONTENT_STATE, YAML_PARSE_DOCUMENT_END_STATE, YAML_PARSE_BLOCK_NODE_STATE, YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE, YAML_PARSE_FLOW_NODE_STATE, YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE, YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE, YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE, YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE, YAML_PARSE_BLOCK_MAPPING_KEY_STATE, YAML_PARSE_BLOCK_MAPPING_VALUE_STATE, YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE, YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE, YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE, YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE, YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE, YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE, YAML_PARSE_FLOW_MAPPING_KEY_STATE, YAML_PARSE_FLOW_MAPPING_VALUE_STATE, YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE, YAML_PARSE_END_STATE } |
The states of the parser. | |
Functions | |
int | yaml_parser_initialize (yaml_parser_t *parser) |
Initialize a parser. | |
void | yaml_parser_delete (yaml_parser_t *parser) |
Destroy a parser. | |
void | yaml_parser_set_input_string (yaml_parser_t *parser, unsigned char *input, size_t size) |
Set a string input. | |
void | yaml_parser_set_input_file (yaml_parser_t *parser, FILE *file) |
Set a file input. | |
void | yaml_parser_set_input (yaml_parser_t *parser, yaml_read_handler_t *handler, void *data) |
Set a generic input handler. | |
void | yaml_parser_set_encoding (yaml_parser_t *parser, yaml_encoding_t encoding) |
Set the source encoding. | |
int | yaml_parser_scan (yaml_parser_t *parser, yaml_token_t *token) |
Scan the input stream and produce the next token. | |
int | yaml_parser_parse (yaml_parser_t *parser, yaml_event_t *event) |
Parse the input stream and produce the next parsing event. |
|
The prototype of a read handler. The read handler is called when the parser needs to read more bytes from the source. The handler should write not more than size bytes to the buffer. The number of written bytes should be set to the length variable.
|
|
Initialize a parser. This function creates a new parser object. An application is responsible for destroying the object using the yaml_parser_delete() function.
|
|
Destroy a parser.
|
|
Set a string input. Note that the input pointer must be valid while the parser object exists. The application is responsible for destroing input after destroying the parser.
|
|
Set a file input. file should be a file object open for reading. The application is responsible for closing the file.
|
|
Set a generic input handler.
|
|
Set the source encoding.
|
|
Scan the input stream and produce the next token.
Call the function subsequently to produce a sequence of tokens corresponding to the input stream. The initial token has the type
An application is responsible for freeing any buffers associated with the produced token object using the An application must not alternate the calls of yaml_parser_scan() with the calls of yaml_parser_parse(). Doing this will break the parser.
|
|
Parse the input stream and produce the next parsing event.
Call the function subsequently to produce a sequence of events corresponding to the input stream. The initial event has the type An application is responsible for freeing any buffers associated with the produced event object using the yaml_event_delete() function. An application must not alternate the calls of yaml_parser_scan() with the calls of yaml_parser_parse(). Doing this will break the parser.
|