X-Git-Url: http://andersk.mit.edu/gitweb/libyaml.git/blobdiff_plain/4fdeceb261ea0716d5b833cf3f59cd4069109810..aa6f0e8a0a8257181e428c8af720d98e964f69d9:/doc/html/group__parser.html diff --git a/doc/html/group__parser.html b/doc/html/group__parser.html index 5b1d9de..d9ecbfc 100644 --- a/doc/html/group__parser.html +++ b/doc/html/group__parser.html @@ -3,48 +3,41 @@
+ ++ |
yaml
- 0.1.5
+ 0.2.2
-
|
-
-
-
+Data Structuresstruct | yaml_simple_key_s | | This structure holds information about a potential simple key. More... | struct | yaml_alias_data_s | | This structure holds aliases data. More... | struct | yaml_parser_s | | The parser structure. More... | |
+struct | yaml_simple_key_s | | This structure holds information about a potential simple key. More... | | struct | yaml_alias_data_s | | This structure holds aliases data. More... | | struct | yaml_parser_s | | 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. | |||||||||||
+ | |||||||||||
typedef int | yaml_read_handler_t(void *data, unsigned char *buffer, size_t size, size_t *size_read) | ||||||||||
The prototype of a read handler. More... | |||||||||||
typedef struct yaml_simple_key_s | yaml_simple_key_t | ||||||||||
This structure holds information about a potential simple key. | |||||||||||
+ | |||||||||||
This structure holds information about a potential simple key. | |||||||||||
typedef enum yaml_parser_state_e | yaml_parser_state_t | ||||||||||
The states of the parser. | |||||||||||
+ | |||||||||||
The states of the parser. | |||||||||||
typedef struct yaml_alias_data_s | yaml_alias_data_t | ||||||||||
This structure holds aliases data. | |||||||||||
typedef struct yaml_parser_s | yaml_parser_t | ||||||||||
The parser structure. | |||||||||||
+ | This structure holds aliases data. | | typedef struct yaml_parser_s | yaml_parser_t | | The parser structure. More... | | |
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, const 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. | |
int | yaml_parser_load (yaml_parser_t *parser, yaml_document_t *document) |
Parse the input stream and produce the next YAML document. | |
int | yaml_parser_initialize (yaml_parser_t *parser) |
Initialize a parser. More... | |
void | yaml_parser_delete (yaml_parser_t *parser) |
Destroy a parser. More... | |
void | yaml_parser_set_input_string (yaml_parser_t *parser, const unsigned char *input, size_t size) |
Set a string input. More... | |
void | yaml_parser_set_input_file (yaml_parser_t *parser, FILE *file) |
Set a file input. More... | |
void | yaml_parser_set_input (yaml_parser_t *parser, yaml_read_handler_t *handler, void *data) |
Set a generic input handler. More... | |
void | yaml_parser_set_encoding (yaml_parser_t *parser, yaml_encoding_t encoding) |
Set the source encoding. More... | |
int | yaml_parser_scan (yaml_parser_t *parser, yaml_token_t *token) |
Scan the input stream and produce the next token. More... | |
int | yaml_parser_parse (yaml_parser_t *parser, yaml_event_t *event) |
Parse the input stream and produce the next parsing event. More... | |
int | yaml_parser_load (yaml_parser_t *parser, yaml_document_t *document) |
Parse the input stream and produce the next YAML document. More... | |
typedef int yaml_read_handler_t(void *data, unsigned char *buffer, size_t size, size_t *size_read) | +typedef int yaml_read_handler_t(void *data, unsigned char *buffer, size_t size, size_t *size_read) |
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.
-[in,out] | data | A pointer to an application data specified by yaml_parser_set_input(). |
[in,out] | data | A pointer to an application data specified by yaml_parser_set_input(). |
[out] | buffer | The buffer to write the data from the source. |
[in] | size | The size of the buffer. |
[out] | size_read | The actual number of bytes read from the source. |
1
. If the handler failed, the returned value should be 0
. On EOF, the handler should set the size_read to 0
and return 1
. 1
. If the handler failed, the returned value should be 0
. On EOF, the handler should set the size_read to 0
and return 1
. typedef struct yaml_parser_s yaml_parser_t |
The parser structure.
All members are internal. Manage the structure using the yaml_parser_
family of functions.
enum yaml_parser_state_e |
The states of the parser.
-YAML_PARSE_STREAM_START_STATE |
- Expect STREAM-START. +Function Documentation- +Function Documentation+ +◆ yaml_parser_initialize()+
+ Initialize a parser. -This function creates a new parser object. An application is responsible for destroying the object using the yaml_parser_delete() function. -
◆ yaml_parser_delete()+
+ Destroy a parser. -
|
void yaml_parser_set_input_string | +void yaml_parser_set_input_string | ( | yaml_parser_t * | parser, | @@ -369,12 +365,11 @@ Functions
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.
-[in,out] | parser | A parser object. | ||
[in] | input | A source data. |
void yaml_parser_set_input_file | +void yaml_parser_set_input_file | ( | yaml_parser_t * | parser, | @@ -407,12 +404,11 @@ Functions
Set a file input.
file should be a file object open for reading. The application is responsible for closing the file.
-[in,out] | parser | A parser object. | ||
[in] | file | An open file. |
void yaml_parser_set_input | +void yaml_parser_set_input | ( | yaml_parser_t * | parser, | @@ -450,11 +448,10 @@ Functions
Set a generic input handler.
-[in,out] | parser | A parser object. | ||
[in] | handler | A read handler. |
void yaml_parser_set_encoding | +void yaml_parser_set_encoding | ( | yaml_parser_t * | parser, | @@ -487,11 +486,10 @@ Functions
Set the source encoding.
-[in,out] | parser | A parser object. | ||
[in] | encoding | The source encoding. |
int yaml_parser_scan | +int yaml_parser_scan | ( | yaml_parser_t * | parser, | @@ -523,30 +523,31 @@ Functions
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 YAML_STREAM_START_TOKEN
while the ending token has the type YAML_STREAM_END_TOKEN
.
An application is responsible for freeing any buffers associated with the produced token object using the yaml_token_delete
function.
An application must not alternate the calls of yaml_parser_scan() with the calls of yaml_parser_parse() or yaml_parser_load(). Doing this will break the parser.
-An application must not alternate the calls of yaml_parser_scan() with the calls of yaml_parser_parse() or yaml_parser_load(). Doing this will break the parser.
+[in,out] | parser | A parser object. |
[out] | token | An empty token object. |
1
if the function succeeded, 0
on error. 1
if the function succeeded, 0
on error. int yaml_parser_parse | +int yaml_parser_parse | ( | yaml_parser_t * | parser, | @@ -563,30 +564,31 @@ Functions
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 YAML_STREAM_START_EVENT
while the ending event has the type YAML_STREAM_END_EVENT
.
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_parse() with the calls of yaml_parser_scan() or yaml_parser_load(). Doing this will break the parser.
-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_parse() with the calls of yaml_parser_scan() or yaml_parser_load(). Doing this will break the parser.
+[in,out] | parser | A parser object. |
[out] | event | An empty event object. |
1
if the function succeeded, 0
on error. 1
if the function succeeded, 0
on error. int yaml_parser_load | +int yaml_parser_load | ( | yaml_parser_t * | parser, | @@ -603,33 +605,30 @@ Functions
Parse the input stream and produce the next YAML document.
Call this function subsequently to produce a sequence of documents constituting the input stream.
If the produced document has no root node, it means that the document end has been reached.
-An application is responsible for freeing any data associated with the produced document object using the yaml_document_delete() function.
-An application must not alternate the calls of yaml_parser_load() with the calls of yaml_parser_scan() or yaml_parser_parse(). Doing this will break the parser.
-An application is responsible for freeing any data associated with the produced document object using the yaml_document_delete() function.
+An application must not alternate the calls of yaml_parser_load() with the calls of yaml_parser_scan() or yaml_parser_parse(). Doing this will break the parser.
+[in,out] | parser | A parser object. |
[out] | document | An empty document object. |
1
if the function succeeded, 0
on error. 1
if the function succeeded, 0
on error.