+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
yaml_alias_data_s | This structure holds aliases data |
yaml_document_s | The document structure |
yaml_emitter_s | The emitter structure |
yaml_event_s | The event structure |
yaml_mark_s | The pointer position |
yaml_node_pair_s | An element of a mapping node |
yaml_node_s | The node structure |
yaml_parser_s | The parser structure |
yaml_simple_key_s | This structure holds information about a potential simple key |
yaml_tag_directive_s | The tag directive data |
yaml_token_s | The token structure |
yaml_version_directive_s | The version directive data |
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
yaml.h | Public interface for libyaml |
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+Data Structures | |
struct | yaml_version_directive_s |
The version directive data. More... | |
struct | yaml_tag_directive_s |
The tag directive data. More... | |
struct | yaml_mark_s |
The pointer position. More... | |
+Typedefs | |
typedef unsigned char | yaml_char_t |
The character type (UTF-8 octet). | |
typedef struct +yaml_version_directive_s | yaml_version_directive_t |
The version directive data. | |
typedef struct yaml_tag_directive_s | yaml_tag_directive_t |
The tag directive data. | |
typedef enum yaml_encoding_e | yaml_encoding_t |
The stream encoding. | |
typedef enum yaml_break_e | yaml_break_t |
Line break types. | |
typedef enum yaml_error_type_e | yaml_error_type_t |
Many bad things could happen with the parser and emitter. | |
typedef struct yaml_mark_s | yaml_mark_t |
The pointer position. | |
+Enumerations | |
enum | yaml_encoding_e { + YAML_ANY_ENCODING, + + YAML_UTF8_ENCODING, + + YAML_UTF16LE_ENCODING, + + YAML_UTF16BE_ENCODING + + } |
The stream encoding. More... | |
enum | yaml_break_e { + YAML_ANY_BREAK, + + YAML_CR_BREAK, + + YAML_LN_BREAK, + + YAML_CRLN_BREAK + + } |
Line break types. More... | |
enum | yaml_error_type_e { + YAML_NO_ERROR, + + YAML_MEMORY_ERROR, + + YAML_READER_ERROR, + + YAML_SCANNER_ERROR, + + YAML_PARSER_ERROR, + + YAML_COMPOSER_ERROR, + + YAML_WRITER_ERROR, + + YAML_EMITTER_ERROR + + } |
Many bad things could happen with the parser and emitter. More... |
typedef unsigned char yaml_char_t | +
The character type (UTF-8 octet).
+ +typedef struct yaml_version_directive_s yaml_version_directive_t | +
The version directive data.
+ +typedef struct yaml_tag_directive_s yaml_tag_directive_t | +
The tag directive data.
+ +typedef enum yaml_encoding_e yaml_encoding_t | +
The stream encoding.
+ +typedef enum yaml_break_e yaml_break_t | +
Line break types.
+ +typedef enum yaml_error_type_e yaml_error_type_t | +
Many bad things could happen with the parser and emitter.
+ +typedef struct yaml_mark_s yaml_mark_t | +
The pointer position.
+ +enum yaml_encoding_e | +
enum yaml_break_e | +
enum yaml_error_type_e | +
Many bad things could happen with the parser and emitter.
+YAML_NO_ERROR |
+ No error is produced. + |
YAML_MEMORY_ERROR |
+ Cannot allocate or reallocate a block of memory. + |
YAML_READER_ERROR |
+ Cannot read or decode the input stream. + |
YAML_SCANNER_ERROR |
+ Cannot scan the input stream. + |
YAML_PARSER_ERROR |
+ Cannot parse the input stream. + |
YAML_COMPOSER_ERROR |
+ Cannot compose a YAML document. + |
YAML_WRITER_ERROR |
+ Cannot write to the output stream. + |
YAML_EMITTER_ERROR |
+ Cannot emit a YAML stream. + |
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+Data Structures | |
struct | yaml_emitter_s |
The emitter structure. More... | |
+Typedefs | |
typedef int | yaml_write_handler_t (void *data, unsigned char *buffer, size_t size) |
The prototype of a write handler. | |
typedef enum yaml_emitter_state_e | yaml_emitter_state_t |
The emitter states. | |
typedef struct yaml_emitter_s | yaml_emitter_t |
The emitter structure. | |
+Enumerations | |
enum | yaml_emitter_state_e { + YAML_EMIT_STREAM_START_STATE, + + YAML_EMIT_FIRST_DOCUMENT_START_STATE, + + YAML_EMIT_DOCUMENT_START_STATE, + + YAML_EMIT_DOCUMENT_CONTENT_STATE, + + YAML_EMIT_DOCUMENT_END_STATE, + + YAML_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE, + + YAML_EMIT_FLOW_SEQUENCE_ITEM_STATE, + + YAML_EMIT_FLOW_MAPPING_FIRST_KEY_STATE, + + YAML_EMIT_FLOW_MAPPING_KEY_STATE, + + YAML_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE, + + YAML_EMIT_FLOW_MAPPING_VALUE_STATE, + + YAML_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE, + + YAML_EMIT_BLOCK_SEQUENCE_ITEM_STATE, + + YAML_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE, + + YAML_EMIT_BLOCK_MAPPING_KEY_STATE, + + YAML_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE, + + YAML_EMIT_BLOCK_MAPPING_VALUE_STATE, + + YAML_EMIT_END_STATE + + } |
The emitter states. More... | |
+Functions | |
int | yaml_emitter_initialize (yaml_emitter_t *emitter) |
Initialize an emitter. | |
void | yaml_emitter_delete (yaml_emitter_t *emitter) |
Destroy an emitter. | |
void | yaml_emitter_set_output_string (yaml_emitter_t *emitter, unsigned char *output, size_t size, size_t *size_written) |
Set a string output. | |
void | yaml_emitter_set_output_file (yaml_emitter_t *emitter, FILE *file) |
Set a file output. | |
void | yaml_emitter_set_output (yaml_emitter_t *emitter, yaml_write_handler_t *handler, void *data) |
Set a generic output handler. | |
void | yaml_emitter_set_encoding (yaml_emitter_t *emitter, yaml_encoding_t encoding) |
Set the output encoding. | |
void | yaml_emitter_set_canonical (yaml_emitter_t *emitter, int canonical) |
Set if the output should be in the "canonical" format as in the YAML specification. | |
void | yaml_emitter_set_indent (yaml_emitter_t *emitter, int indent) |
Set the intendation increment. | |
void | yaml_emitter_set_width (yaml_emitter_t *emitter, int width) |
Set the preferred line width. | |
void | yaml_emitter_set_unicode (yaml_emitter_t *emitter, int unicode) |
Set if unescaped non-ASCII characters are allowed. | |
void | yaml_emitter_set_break (yaml_emitter_t *emitter, yaml_break_t line_break) |
Set the preferred line break. | |
int | yaml_emitter_emit (yaml_emitter_t *emitter, yaml_event_t *event) |
Emit an event. | |
int | yaml_emitter_open (yaml_emitter_t *emitter) |
Start a YAML stream. | |
int | yaml_emitter_close (yaml_emitter_t *emitter) |
Finish a YAML stream. | |
int | yaml_emitter_dump (yaml_emitter_t *emitter, yaml_document_t *document) |
Emit a YAML document. | |
int | yaml_emitter_flush (yaml_emitter_t *emitter) |
Flush the accumulated characters to the output. |
typedef int yaml_write_handler_t(void *data, unsigned char *buffer, size_t size) | +
The prototype of a write handler.
+The write handler is called when the emitter needs to flush the accumulated characters to the output. The handler should write size bytes of the buffer to the output.
+[in,out] | data | A pointer to an application data specified by yaml_emitter_set_output(). |
[in] | buffer | The buffer with bytes to be written. |
[in] | size | The size of the buffer. |
1
. If the handler failed, the returned value should be 0
. typedef enum yaml_emitter_state_e yaml_emitter_state_t | +
The emitter states.
+ +typedef struct yaml_emitter_s yaml_emitter_t | +
The emitter structure.
+All members are internal. Manage the structure using the yaml_emitter_
family of functions.
enum yaml_emitter_state_e | +
The emitter states.
+YAML_EMIT_STREAM_START_STATE |
+ Expect STREAM-START. + |
YAML_EMIT_FIRST_DOCUMENT_START_STATE |
+ Expect the first DOCUMENT-START or STREAM-END. + |
YAML_EMIT_DOCUMENT_START_STATE |
+ Expect DOCUMENT-START or STREAM-END. + |
YAML_EMIT_DOCUMENT_CONTENT_STATE |
+ Expect the content of a document. + |
YAML_EMIT_DOCUMENT_END_STATE |
+ Expect DOCUMENT-END. + |
YAML_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE |
+ Expect the first item of a flow sequence. + |
YAML_EMIT_FLOW_SEQUENCE_ITEM_STATE |
+ Expect an item of a flow sequence. + |
YAML_EMIT_FLOW_MAPPING_FIRST_KEY_STATE |
+ Expect the first key of a flow mapping. + |
YAML_EMIT_FLOW_MAPPING_KEY_STATE |
+ Expect a key of a flow mapping. + |
YAML_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE |
+ Expect a value for a simple key of a flow mapping. + |
YAML_EMIT_FLOW_MAPPING_VALUE_STATE |
+ Expect a value of a flow mapping. + |
YAML_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE |
+ Expect the first item of a block sequence. + |
YAML_EMIT_BLOCK_SEQUENCE_ITEM_STATE |
+ Expect an item of a block sequence. + |
YAML_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE |
+ Expect the first key of a block mapping. + |
YAML_EMIT_BLOCK_MAPPING_KEY_STATE |
+ Expect the key of a block mapping. + |
YAML_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE |
+ Expect a value for a simple key of a block mapping. + |
YAML_EMIT_BLOCK_MAPPING_VALUE_STATE |
+ Expect a value of a block mapping. + |
YAML_EMIT_END_STATE |
+ Expect nothing. + |
int yaml_emitter_initialize | +( | +yaml_emitter_t * | +emitter | ) | ++ |
Initialize an emitter.
+This function creates a new emitter object. An application is responsible for destroying the object using the yaml_emitter_delete() function.
+[out] | emitter | An empty parser object. |
1
if the function succeeded, 0
on error. void yaml_emitter_delete | +( | +yaml_emitter_t * | +emitter | ) | ++ |
Destroy an emitter.
+[in,out] | emitter | An emitter object. |
void yaml_emitter_set_output_string | +( | +yaml_emitter_t * | +emitter, | +
+ | + | unsigned char * | +output, | +
+ | + | size_t | +size, | +
+ | + | size_t * | +size_written | +
+ | ) | ++ |
Set a string output.
+The emitter will write the output characters to the output buffer of the size size. The emitter will set size_written to the number of written bytes. If the buffer is smaller than required, the emitter produces the YAML_WRITE_ERROR error.
+[in,out] | emitter | An emitter object. |
[in] | output | An output buffer. |
[in] | size | The buffer size. |
[in] | size_written | The pointer to save the number of written bytes. |
void yaml_emitter_set_output_file | +( | +yaml_emitter_t * | +emitter, | +
+ | + | FILE * | +file | +
+ | ) | ++ |
Set a file output.
+file should be a file object open for writing. The application is responsible for closing the file.
+[in,out] | emitter | An emitter object. |
[in] | file | An open file. |
void yaml_emitter_set_output | +( | +yaml_emitter_t * | +emitter, | +
+ | + | yaml_write_handler_t * | +handler, | +
+ | + | void * | +data | +
+ | ) | ++ |
Set a generic output handler.
+[in,out] | emitter | An emitter object. |
[in] | handler | A write handler. |
[in] | data | Any application data for passing to the write handler. |
void yaml_emitter_set_encoding | +( | +yaml_emitter_t * | +emitter, | +
+ | + | yaml_encoding_t | +encoding | +
+ | ) | ++ |
Set the output encoding.
+[in,out] | emitter | An emitter object. |
[in] | encoding | The output encoding. |
void yaml_emitter_set_canonical | +( | +yaml_emitter_t * | +emitter, | +
+ | + | int | +canonical | +
+ | ) | ++ |
Set if the output should be in the "canonical" format as in the YAML specification.
+[in,out] | emitter | An emitter object. |
[in] | canonical | If the output is canonical. |
void yaml_emitter_set_indent | +( | +yaml_emitter_t * | +emitter, | +
+ | + | int | +indent | +
+ | ) | ++ |
Set the intendation increment.
+[in,out] | emitter | An emitter object. |
[in] | indent | The indentation increment (1 < . < 10). |
void yaml_emitter_set_width | +( | +yaml_emitter_t * | +emitter, | +
+ | + | int | +width | +
+ | ) | ++ |
Set the preferred line width.
+-1
means unlimited.
[in,out] | emitter | An emitter object. |
[in] | width | The preferred line width. |
void yaml_emitter_set_unicode | +( | +yaml_emitter_t * | +emitter, | +
+ | + | int | +unicode | +
+ | ) | ++ |
Set if unescaped non-ASCII characters are allowed.
+[in,out] | emitter | An emitter object. |
[in] | unicode | If unescaped Unicode characters are allowed. |
void yaml_emitter_set_break | +( | +yaml_emitter_t * | +emitter, | +
+ | + | yaml_break_t | +line_break | +
+ | ) | ++ |
Set the preferred line break.
+[in,out] | emitter | An emitter object. |
[in] | line_break | The preferred line break. |
int yaml_emitter_emit | +( | +yaml_emitter_t * | +emitter, | +
+ | + | yaml_event_t * | +event | +
+ | ) | ++ |
Emit an event.
+The event object may be generated using the yaml_parser_parse() function. The emitter takes the responsibility for the event object and destroys its content after it is emitted. The event object is destroyed even if the function fails.
+[in,out] | emitter | An emitter object. |
[in,out] | event | An event object. |
1
if the function succeeded, 0
on error. int yaml_emitter_open | +( | +yaml_emitter_t * | +emitter | ) | ++ |
Start a YAML stream.
+This function should be used before yaml_emitter_dump() is called.
+[in,out] | emitter | An emitter object. |
1
if the function succeeded, 0
on error. int yaml_emitter_close | +( | +yaml_emitter_t * | +emitter | ) | ++ |
Finish a YAML stream.
+This function should be used after yaml_emitter_dump() is called.
+[in,out] | emitter | An emitter object. |
1
if the function succeeded, 0
on error. int yaml_emitter_dump | +( | +yaml_emitter_t * | +emitter, | +
+ | + | yaml_document_t * | +document | +
+ | ) | ++ |
Emit a YAML document.
+The documen object may be generated using the yaml_parser_load() function or the yaml_document_initialize() function. The emitter takes the responsibility for the document object and destoys its content after it is emitted. The document object is destroyedeven if the function fails.
+[in,out] | emitter | An emitter object. |
[in,out] | document | A document object. |
1
if the function succeeded, 0
on error. int yaml_emitter_flush | +( | +yaml_emitter_t * | +emitter | ) | ++ |
Flush the accumulated characters to the output.
+[in,out] | emitter | An emitter object. |
1
if the function succeeded, 0
on error.
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+Data Structures | |
struct | yaml_event_s |
The event structure. More... | |
+Typedefs | |
typedef enum yaml_event_type_e | yaml_event_type_t |
Event types. | |
typedef struct yaml_event_s | yaml_event_t |
The event structure. | |
+Enumerations | |
enum | yaml_event_type_e { + YAML_NO_EVENT, + + YAML_STREAM_START_EVENT, + + YAML_STREAM_END_EVENT, + + YAML_DOCUMENT_START_EVENT, + + YAML_DOCUMENT_END_EVENT, + + YAML_ALIAS_EVENT, + + YAML_SCALAR_EVENT, + + YAML_SEQUENCE_START_EVENT, + + YAML_SEQUENCE_END_EVENT, + + YAML_MAPPING_START_EVENT, + + YAML_MAPPING_END_EVENT + + } |
Event types. More... | |
+Functions | |
int | yaml_stream_start_event_initialize (yaml_event_t *event, yaml_encoding_t encoding) |
Create the STREAM-START event. | |
int | yaml_stream_end_event_initialize (yaml_event_t *event) |
Create the STREAM-END event. | |
int | yaml_document_start_event_initialize (yaml_event_t *event, yaml_version_directive_t *version_directive, yaml_tag_directive_t *tag_directives_start, yaml_tag_directive_t *tag_directives_end, int implicit) |
Create the DOCUMENT-START event. | |
int | yaml_document_end_event_initialize (yaml_event_t *event, int implicit) |
Create the DOCUMENT-END event. | |
int | yaml_alias_event_initialize (yaml_event_t *event, yaml_char_t *anchor) |
Create an ALIAS event. | |
int | yaml_scalar_event_initialize (yaml_event_t *event, yaml_char_t *anchor, yaml_char_t *tag, yaml_char_t *value, int length, int plain_implicit, int quoted_implicit, yaml_scalar_style_t style) |
Create a SCALAR event. | |
int | yaml_sequence_start_event_initialize (yaml_event_t *event, yaml_char_t *anchor, yaml_char_t *tag, int implicit, yaml_sequence_style_t style) |
Create a SEQUENCE-START event. | |
int | yaml_sequence_end_event_initialize (yaml_event_t *event) |
Create a SEQUENCE-END event. | |
int | yaml_mapping_start_event_initialize (yaml_event_t *event, yaml_char_t *anchor, yaml_char_t *tag, int implicit, yaml_mapping_style_t style) |
Create a MAPPING-START event. | |
int | yaml_mapping_end_event_initialize (yaml_event_t *event) |
Create a MAPPING-END event. | |
void | yaml_event_delete (yaml_event_t *event) |
Free any memory allocated for an event object. |
typedef enum yaml_event_type_e yaml_event_type_t | +
Event types.
+ +typedef struct yaml_event_s yaml_event_t | +
The event structure.
+ +enum yaml_event_type_e | +
Event types.
+YAML_NO_EVENT |
+ An empty event. + |
YAML_STREAM_START_EVENT |
+ A STREAM-START event. + |
YAML_STREAM_END_EVENT |
+ A STREAM-END event. + |
YAML_DOCUMENT_START_EVENT |
+ A DOCUMENT-START event. + |
YAML_DOCUMENT_END_EVENT |
+ A DOCUMENT-END event. + |
YAML_ALIAS_EVENT |
+ An ALIAS event. + |
YAML_SCALAR_EVENT |
+ A SCALAR event. + |
YAML_SEQUENCE_START_EVENT |
+ A SEQUENCE-START event. + |
YAML_SEQUENCE_END_EVENT |
+ A SEQUENCE-END event. + |
YAML_MAPPING_START_EVENT |
+ A MAPPING-START event. + |
YAML_MAPPING_END_EVENT |
+ A MAPPING-END event. + |
int yaml_stream_start_event_initialize | +( | +yaml_event_t * | +event, | +
+ | + | yaml_encoding_t | +encoding | +
+ | ) | ++ |
Create the STREAM-START event.
+[out] | event | An empty event object. |
[in] | encoding | The stream encoding. |
1
if the function succeeded, 0
on error. int yaml_stream_end_event_initialize | +( | +yaml_event_t * | +event | ) | ++ |
Create the STREAM-END event.
+[out] | event | An empty event object. |
1
if the function succeeded, 0
on error. int yaml_document_start_event_initialize | +( | +yaml_event_t * | +event, | +
+ | + | yaml_version_directive_t * | +version_directive, | +
+ | + | yaml_tag_directive_t * | +tag_directives_start, | +
+ | + | yaml_tag_directive_t * | +tag_directives_end, | +
+ | + | int | +implicit | +
+ | ) | ++ |
Create the DOCUMENT-START event.
+The implicit argument is considered as a stylistic parameter and may be ignored by the emitter.
+[out] | event | An empty event object. |
[in] | version_directive | The YAML directive value or NULL . |
[in] | tag_directives_start | The beginning of the TAG directives list. |
[in] | tag_directives_end | The end of the TAG directives list. |
[in] | implicit | If the document start indicator is implicit. |
1
if the function succeeded, 0
on error. int yaml_document_end_event_initialize | +( | +yaml_event_t * | +event, | +
+ | + | int | +implicit | +
+ | ) | ++ |
Create the DOCUMENT-END event.
+The implicit argument is considered as a stylistic parameter and may be ignored by the emitter.
+[out] | event | An empty event object. |
[in] | implicit | If the document end indicator is implicit. |
1
if the function succeeded, 0
on error. int yaml_alias_event_initialize | +( | +yaml_event_t * | +event, | +
+ | + | yaml_char_t * | +anchor | +
+ | ) | ++ |
Create an ALIAS event.
+[out] | event | An empty event object. |
[in] | anchor | The anchor value. |
1
if the function succeeded, 0
on error. int yaml_scalar_event_initialize | +( | +yaml_event_t * | +event, | +
+ | + | yaml_char_t * | +anchor, | +
+ | + | yaml_char_t * | +tag, | +
+ | + | yaml_char_t * | +value, | +
+ | + | int | +length, | +
+ | + | int | +plain_implicit, | +
+ | + | int | +quoted_implicit, | +
+ | + | yaml_scalar_style_t | +style | +
+ | ) | ++ |
Create a SCALAR event.
+The style argument may be ignored by the emitter.
+Either the tag attribute or one of the plain_implicit and quoted_implicit flags must be set.
+[out] | event | An empty event object. |
[in] | anchor | The scalar anchor or NULL . |
[in] | tag | The scalar tag or NULL . |
[in] | value | The scalar value. |
[in] | length | The length of the scalar value. |
[in] | plain_implicit | If the tag may be omitted for the plain style. |
[in] | quoted_implicit | If the tag may be omitted for any non-plain style. |
[in] | style | The scalar style. |
1
if the function succeeded, 0
on error. int yaml_sequence_start_event_initialize | +( | +yaml_event_t * | +event, | +
+ | + | yaml_char_t * | +anchor, | +
+ | + | yaml_char_t * | +tag, | +
+ | + | int | +implicit, | +
+ | + | yaml_sequence_style_t | +style | +
+ | ) | ++ |
Create a SEQUENCE-START event.
+The style argument may be ignored by the emitter.
+Either the tag attribute or the implicit flag must be set.
+[out] | event | An empty event object. |
[in] | anchor | The sequence anchor or NULL . |
[in] | tag | The sequence tag or NULL . |
[in] | implicit | If the tag may be omitted. |
[in] | style | The sequence style. |
1
if the function succeeded, 0
on error. int yaml_sequence_end_event_initialize | +( | +yaml_event_t * | +event | ) | ++ |
Create a SEQUENCE-END event.
+[out] | event | An empty event object. |
1
if the function succeeded, 0
on error. int yaml_mapping_start_event_initialize | +( | +yaml_event_t * | +event, | +
+ | + | yaml_char_t * | +anchor, | +
+ | + | yaml_char_t * | +tag, | +
+ | + | int | +implicit, | +
+ | + | yaml_mapping_style_t | +style | +
+ | ) | ++ |
Create a MAPPING-START event.
+The style argument may be ignored by the emitter.
+Either the tag attribute or the implicit flag must be set.
+[out] | event | An empty event object. |
[in] | anchor | The mapping anchor or NULL . |
[in] | tag | The mapping tag or NULL . |
[in] | implicit | If the tag may be omitted. |
[in] | style | The mapping style. |
1
if the function succeeded, 0
on error. int yaml_mapping_end_event_initialize | +( | +yaml_event_t * | +event | ) | ++ |
Create a MAPPING-END event.
+[out] | event | An empty event object. |
1
if the function succeeded, 0
on error. void yaml_event_delete | +( | +yaml_event_t * | +event | ) | ++ |
Free any memory allocated for an event object.
+[in,out] | event | An event object. |
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+Defines | |
#define | YAML_DECLARE(type) type |
The public API declaration. |
#define YAML_DECLARE | +( | ++ | type | ) | +type | +
The public API declaration.
+ +
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+Data Structures | |
struct | yaml_node_pair_s |
An element of a mapping node. More... | |
struct | yaml_node_s |
The node structure. More... | |
struct | yaml_document_s |
The document structure. More... | |
+Defines | |
#define | YAML_NULL_TAG "tag:yaml.org,2002:null" |
The tag !!null with the only possible value: null . | |
#define | YAML_BOOL_TAG "tag:yaml.org,2002:bool" |
The tag !!bool with the values: true and falce . | |
#define | YAML_STR_TAG "tag:yaml.org,2002:str" |
The tag !!str for string values. | |
#define | YAML_INT_TAG "tag:yaml.org,2002:int" |
The tag !!int for integer values. | |
#define | YAML_FLOAT_TAG "tag:yaml.org,2002:float" |
The tag !!float for float values. | |
#define | YAML_TIMESTAMP_TAG "tag:yaml.org,2002:timestamp" |
The tag !!timestamp for date and time values. | |
#define | YAML_SEQ_TAG "tag:yaml.org,2002:seq" |
The tag !!seq is used to denote sequences. | |
#define | YAML_MAP_TAG "tag:yaml.org,2002:map" |
The tag !!map is used to denote mapping. | |
#define | YAML_DEFAULT_SCALAR_TAG YAML_STR_TAG |
The default scalar tag is !!str . | |
#define | YAML_DEFAULT_SEQUENCE_TAG YAML_SEQ_TAG |
The default sequence tag is !!seq . | |
#define | YAML_DEFAULT_MAPPING_TAG YAML_MAP_TAG |
The default mapping tag is !!map . | |
+Typedefs | |
typedef enum yaml_node_type_e | yaml_node_type_t |
Node types. | |
typedef struct yaml_node_s | yaml_node_t |
The forward definition of a document node structure. | |
typedef int | yaml_node_item_t |
An element of a sequence node. | |
typedef struct yaml_node_pair_s | yaml_node_pair_t |
An element of a mapping node. | |
typedef struct yaml_document_s | yaml_document_t |
The document structure. | |
+Enumerations | |
enum | yaml_node_type_e { + YAML_NO_NODE, + + YAML_SCALAR_NODE, + + YAML_SEQUENCE_NODE, + + YAML_MAPPING_NODE + + } |
Node types. More... | |
+Functions | |
int | yaml_document_initialize (yaml_document_t *document, yaml_version_directive_t *version_directive, yaml_tag_directive_t *tag_directives_start, yaml_tag_directive_t *tag_directives_end, int start_implicit, int end_implicit) |
Create a YAML document. | |
void | yaml_document_delete (yaml_document_t *document) |
Delete a YAML document and all its nodes. | |
yaml_node_t * | yaml_document_get_node (yaml_document_t *document, int index) |
Get a node of a YAML document. | |
yaml_node_t * | yaml_document_get_root_node (yaml_document_t *document) |
Get the root of a YAML document node. | |
int | yaml_document_add_scalar (yaml_document_t *document, yaml_char_t *tag, yaml_char_t *value, int length, yaml_scalar_style_t style) |
Create a SCALAR node and attach it to the document. | |
int | yaml_document_add_sequence (yaml_document_t *document, yaml_char_t *tag, yaml_sequence_style_t style) |
Create a SEQUENCE node and attach it to the document. | |
int | yaml_document_add_mapping (yaml_document_t *document, yaml_char_t *tag, yaml_mapping_style_t style) |
Create a MAPPING node and attach it to the document. | |
int | yaml_document_append_sequence_item (yaml_document_t *document, int sequence, int item) |
Add an item to a SEQUENCE node. | |
int | yaml_document_append_mapping_pair (yaml_document_t *document, int mapping, int key, int value) |
Add a pair of a key and a value to a MAPPING node. |
#define YAML_NULL_TAG "tag:yaml.org,2002:null" | +
The tag !!null
with the only possible value: null
.
#define YAML_BOOL_TAG "tag:yaml.org,2002:bool" | +
The tag !!bool
with the values: true
and falce
.
#define YAML_STR_TAG "tag:yaml.org,2002:str" | +
The tag !!str
for string values.
#define YAML_INT_TAG "tag:yaml.org,2002:int" | +
The tag !!int
for integer values.
#define YAML_FLOAT_TAG "tag:yaml.org,2002:float" | +
The tag !!float
for float values.
#define YAML_TIMESTAMP_TAG "tag:yaml.org,2002:timestamp" | +
The tag !!timestamp
for date and time values.
#define YAML_SEQ_TAG "tag:yaml.org,2002:seq" | +
The tag !!seq
is used to denote sequences.
#define YAML_MAP_TAG "tag:yaml.org,2002:map" | +
The tag !!map
is used to denote mapping.
#define YAML_DEFAULT_SCALAR_TAG YAML_STR_TAG | +
The default scalar tag is !!str
.
#define YAML_DEFAULT_SEQUENCE_TAG YAML_SEQ_TAG | +
The default sequence tag is !!seq
.
#define YAML_DEFAULT_MAPPING_TAG YAML_MAP_TAG | +
The default mapping tag is !!map
.
typedef enum yaml_node_type_e yaml_node_type_t | +
Node types.
+ +typedef struct yaml_node_s yaml_node_t | +
The forward definition of a document node structure.
+ +typedef int yaml_node_item_t | +
An element of a sequence node.
+ +typedef struct yaml_node_pair_s yaml_node_pair_t | +
An element of a mapping node.
+ +typedef struct yaml_document_s yaml_document_t | +
The document structure.
+ +enum yaml_node_type_e | +
int yaml_document_initialize | +( | +yaml_document_t * | +document, | +
+ | + | yaml_version_directive_t * | +version_directive, | +
+ | + | yaml_tag_directive_t * | +tag_directives_start, | +
+ | + | yaml_tag_directive_t * | +tag_directives_end, | +
+ | + | int | +start_implicit, | +
+ | + | int | +end_implicit | +
+ | ) | ++ |
Create a YAML document.
+[out] | document | An empty document object. |
[in] | version_directive | The YAML directive value or NULL . |
[in] | tag_directives_start | The beginning of the TAG directives list. |
[in] | tag_directives_end | The end of the TAG directives list. |
[in] | start_implicit | If the document start indicator is implicit. |
[in] | end_implicit | If the document end indicator is implicit. |
1
if the function succeeded, 0
on error. void yaml_document_delete | +( | +yaml_document_t * | +document | ) | ++ |
Delete a YAML document and all its nodes.
+[in,out] | document | A document object. |
yaml_node_t* yaml_document_get_node | +( | +yaml_document_t * | +document, | +
+ | + | int | +index | +
+ | ) | ++ |
Get a node of a YAML document.
+The pointer returned by this function is valid until any of the functions modifying the documents are called.
+[in] | document | A document object. |
[in] | index | The node id. |
NULL
if node_id
is out of range. yaml_node_t* yaml_document_get_root_node | +( | +yaml_document_t * | +document | ) | ++ |
Get the root of a YAML document node.
+The root object is the first object added to the document.
+The pointer returned by this function is valid until any of the functions modifying the documents are called.
+An empty document produced by the parser signifies the end of a YAML stream.
+[in] | document | A document object. |
NULL
if the document is empty. int yaml_document_add_scalar | +( | +yaml_document_t * | +document, | +
+ | + | yaml_char_t * | +tag, | +
+ | + | yaml_char_t * | +value, | +
+ | + | int | +length, | +
+ | + | yaml_scalar_style_t | +style | +
+ | ) | ++ |
Create a SCALAR node and attach it to the document.
+The style argument may be ignored by the emitter.
+[in,out] | document | A document object. |
[in] | tag | The scalar tag. |
[in] | value | The scalar value. |
[in] | length | The length of the scalar value. |
[in] | style | The scalar style. |
0
on error. int yaml_document_add_sequence | +( | +yaml_document_t * | +document, | +
+ | + | yaml_char_t * | +tag, | +
+ | + | yaml_sequence_style_t | +style | +
+ | ) | ++ |
Create a SEQUENCE node and attach it to the document.
+The style argument may be ignored by the emitter.
+[in,out] | document | A document object. |
[in] | tag | The sequence tag. |
[in] | style | The sequence style. |
0
on error. int yaml_document_add_mapping | +( | +yaml_document_t * | +document, | +
+ | + | yaml_char_t * | +tag, | +
+ | + | yaml_mapping_style_t | +style | +
+ | ) | ++ |
Create a MAPPING node and attach it to the document.
+The style argument may be ignored by the emitter.
+[in,out] | document | A document object. |
[in] | tag | The sequence tag. |
[in] | style | The sequence style. |
0
on error. int yaml_document_append_sequence_item | +( | +yaml_document_t * | +document, | +
+ | + | int | +sequence, | +
+ | + | int | +item | +
+ | ) | ++ |
Add an item to a SEQUENCE node.
+[in,out] | document | A document object. |
[in] | sequence | The sequence node id. |
[in] | item | The item node id. |
1
if the function succeeded, 0
on error. int yaml_document_append_mapping_pair | +( | +yaml_document_t * | +document, | +
+ | + | int | +mapping, | +
+ | + | int | +key, | +
+ | + | int | +value | +
+ | ) | ++ |
Add a pair of a key and a value to a MAPPING node.
+[in,out] | document | A document object. |
[in] | mapping | The mapping node id. |
[in] | key | The key node id. |
[in] | value | The value node id. |
1
if the function succeeded, 0
on error.
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+Data Structures | |
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 struct yaml_simple_key_s | yaml_simple_key_t |
This structure holds information about a potential simple key. | |
+typedef enum yaml_parser_state_e | yaml_parser_state_t |
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. | |
+Enumerations | |
enum | yaml_parser_state_e { + 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. 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. |
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(). |
[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
. 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. + |
YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE |
+ Expect the beginning of an implicit document. + |
YAML_PARSE_DOCUMENT_START_STATE |
+ Expect DOCUMENT-START. + |
YAML_PARSE_DOCUMENT_CONTENT_STATE |
+ Expect the content of a document. + |
YAML_PARSE_DOCUMENT_END_STATE |
+ Expect DOCUMENT-END. + |
YAML_PARSE_BLOCK_NODE_STATE |
+ Expect a block node. + |
YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE |
+ Expect a block node or indentless sequence. + |
YAML_PARSE_FLOW_NODE_STATE |
+ Expect a flow node. + |
YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE |
+ Expect the first entry of a block sequence. + |
YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE |
+ Expect an entry of a block sequence. + |
YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE |
+ Expect an entry of an indentless sequence. + |
YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE |
+ Expect the first key of a block mapping. + |
YAML_PARSE_BLOCK_MAPPING_KEY_STATE |
+ Expect a block mapping key. + |
YAML_PARSE_BLOCK_MAPPING_VALUE_STATE |
+ Expect a block mapping value. + |
YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE |
+ Expect the first entry of a flow sequence. + |
YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE |
+ Expect an entry of a flow sequence. + |
YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE |
+ Expect a key of an ordered mapping. + |
YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE |
+ Expect a value of an ordered mapping. + |
YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE |
+ Expect the and of an ordered mapping entry. + |
YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE |
+ Expect the first key of a flow mapping. + |
YAML_PARSE_FLOW_MAPPING_KEY_STATE |
+ Expect a key of a flow mapping. + |
YAML_PARSE_FLOW_MAPPING_VALUE_STATE |
+ Expect a value of a flow mapping. + |
YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE |
+ Expect an empty value of a flow mapping. + |
YAML_PARSE_END_STATE |
+ Expect nothing. + |
int yaml_parser_initialize | +( | +yaml_parser_t * | +parser | ) | ++ |
Initialize a parser.
+This function creates a new parser object. An application is responsible for destroying the object using the yaml_parser_delete() function.
+[out] | parser | An empty parser object. |
1
if the function succeeded, 0
on error. void yaml_parser_delete | +( | +yaml_parser_t * | +parser | ) | ++ |
Destroy a parser.
+[in,out] | parser | A parser object. |
void yaml_parser_set_input_string | +( | +yaml_parser_t * | +parser, | +
+ | + | const unsigned char * | +input, | +
+ | + | size_t | +size | +
+ | ) | ++ |
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. |
[in] | size | The length of the source data in bytes. |
void yaml_parser_set_input_file | +( | +yaml_parser_t * | +parser, | +
+ | + | FILE * | +file | +
+ | ) | ++ |
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 | +( | +yaml_parser_t * | +parser, | +
+ | + | yaml_read_handler_t * | +handler, | +
+ | + | void * | +data | +
+ | ) | ++ |
Set a generic input handler.
+[in,out] | parser | A parser object. |
[in] | handler | A read handler. |
[in] | data | Any application data for passing to the read handler. |
void yaml_parser_set_encoding | +( | +yaml_parser_t * | +parser, | +
+ | + | yaml_encoding_t | +encoding | +
+ | ) | ++ |
Set the source encoding.
+[in,out] | parser | A parser object. |
[in] | encoding | The source encoding. |
int yaml_parser_scan | +( | +yaml_parser_t * | +parser, | +
+ | + | yaml_token_t * | +token | +
+ | ) | ++ |
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.
+[in,out] | parser | A parser object. |
[out] | token | An empty token object. |
1
if the function succeeded, 0
on error. int yaml_parser_parse | +( | +yaml_parser_t * | +parser, | +
+ | + | yaml_event_t * | +event | +
+ | ) | ++ |
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.
+[in,out] | parser | A parser object. |
[out] | event | An empty event object. |
1
if the function succeeded, 0
on error. int yaml_parser_load | +( | +yaml_parser_t * | +parser, | +
+ | + | yaml_document_t * | +document | +
+ | ) | ++ |
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.
+[in,out] | parser | A parser object. |
[out] | document | An empty document object. |
1
if the function succeeded, 0
on error.
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+Typedefs | |
typedef enum yaml_scalar_style_e | yaml_scalar_style_t |
Scalar styles. | |
typedef enum yaml_sequence_style_e | yaml_sequence_style_t |
Sequence styles. | |
typedef enum yaml_mapping_style_e | yaml_mapping_style_t |
Mapping styles. | |
+Enumerations | |
enum | yaml_scalar_style_e { + YAML_ANY_SCALAR_STYLE, + + YAML_PLAIN_SCALAR_STYLE, + + YAML_SINGLE_QUOTED_SCALAR_STYLE, + + YAML_DOUBLE_QUOTED_SCALAR_STYLE, + + YAML_LITERAL_SCALAR_STYLE, + + YAML_FOLDED_SCALAR_STYLE + + } |
Scalar styles. More... | |
enum | yaml_sequence_style_e { + YAML_ANY_SEQUENCE_STYLE, + + YAML_BLOCK_SEQUENCE_STYLE, + + YAML_FLOW_SEQUENCE_STYLE + + } |
Sequence styles. More... | |
enum | yaml_mapping_style_e { + YAML_ANY_MAPPING_STYLE, + + YAML_BLOCK_MAPPING_STYLE, + + YAML_FLOW_MAPPING_STYLE + + } |
Mapping styles. More... |
typedef enum yaml_scalar_style_e yaml_scalar_style_t | +
Scalar styles.
+ +typedef enum yaml_sequence_style_e yaml_sequence_style_t | +
Sequence styles.
+ +typedef enum yaml_mapping_style_e yaml_mapping_style_t | +
Mapping styles.
+ +enum yaml_scalar_style_e | +
Scalar styles.
+YAML_ANY_SCALAR_STYLE |
+ Let the emitter choose the style. + |
YAML_PLAIN_SCALAR_STYLE |
+ The plain scalar style. + |
YAML_SINGLE_QUOTED_SCALAR_STYLE |
+ The single-quoted scalar style. + |
YAML_DOUBLE_QUOTED_SCALAR_STYLE |
+ The double-quoted scalar style. + |
YAML_LITERAL_SCALAR_STYLE |
+ The literal scalar style. + |
YAML_FOLDED_SCALAR_STYLE |
+ The folded scalar style. + |
enum yaml_sequence_style_e | +
enum yaml_mapping_style_e | +
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+Data Structures | |
struct | yaml_token_s |
The token structure. More... | |
+Typedefs | |
typedef enum yaml_token_type_e | yaml_token_type_t |
Token types. | |
typedef struct yaml_token_s | yaml_token_t |
The token structure. | |
+Enumerations | |
enum | yaml_token_type_e { + YAML_NO_TOKEN, + + YAML_STREAM_START_TOKEN, + + YAML_STREAM_END_TOKEN, + + YAML_VERSION_DIRECTIVE_TOKEN, + + YAML_TAG_DIRECTIVE_TOKEN, + + YAML_DOCUMENT_START_TOKEN, + + YAML_DOCUMENT_END_TOKEN, + + YAML_BLOCK_SEQUENCE_START_TOKEN, + + YAML_BLOCK_MAPPING_START_TOKEN, + + YAML_BLOCK_END_TOKEN, + + YAML_FLOW_SEQUENCE_START_TOKEN, + + YAML_FLOW_SEQUENCE_END_TOKEN, + + YAML_FLOW_MAPPING_START_TOKEN, + + YAML_FLOW_MAPPING_END_TOKEN, + + YAML_BLOCK_ENTRY_TOKEN, + + YAML_FLOW_ENTRY_TOKEN, + + YAML_KEY_TOKEN, + + YAML_VALUE_TOKEN, + + YAML_ALIAS_TOKEN, + + YAML_ANCHOR_TOKEN, + + YAML_TAG_TOKEN, + + YAML_SCALAR_TOKEN + + } |
Token types. More... | |
+Functions | |
void | yaml_token_delete (yaml_token_t *token) |
Free any memory allocated for a token object. |
typedef enum yaml_token_type_e yaml_token_type_t | +
Token types.
+ +typedef struct yaml_token_s yaml_token_t | +
The token structure.
+ +enum yaml_token_type_e | +
Token types.
+YAML_NO_TOKEN |
+ An empty token. + |
YAML_STREAM_START_TOKEN |
+ A STREAM-START token. + |
YAML_STREAM_END_TOKEN |
+ A STREAM-END token. + |
YAML_VERSION_DIRECTIVE_TOKEN |
+ A VERSION-DIRECTIVE token. + |
YAML_TAG_DIRECTIVE_TOKEN |
+ A TAG-DIRECTIVE token. + |
YAML_DOCUMENT_START_TOKEN |
+ A DOCUMENT-START token. + |
YAML_DOCUMENT_END_TOKEN |
+ A DOCUMENT-END token. + |
YAML_BLOCK_SEQUENCE_START_TOKEN |
+ A BLOCK-SEQUENCE-START token. + |
YAML_BLOCK_MAPPING_START_TOKEN |
+ A BLOCK-SEQUENCE-END token. + |
YAML_BLOCK_END_TOKEN |
+ A BLOCK-END token. + |
YAML_FLOW_SEQUENCE_START_TOKEN |
+ A FLOW-SEQUENCE-START token. + |
YAML_FLOW_SEQUENCE_END_TOKEN |
+ A FLOW-SEQUENCE-END token. + |
YAML_FLOW_MAPPING_START_TOKEN |
+ A FLOW-MAPPING-START token. + |
YAML_FLOW_MAPPING_END_TOKEN |
+ A FLOW-MAPPING-END token. + |
YAML_BLOCK_ENTRY_TOKEN |
+ A BLOCK-ENTRY token. + |
YAML_FLOW_ENTRY_TOKEN |
+ A FLOW-ENTRY token. + |
YAML_KEY_TOKEN |
+ A KEY token. + |
YAML_VALUE_TOKEN |
+ A VALUE token. + |
YAML_ALIAS_TOKEN |
+ An ALIAS token. + |
YAML_ANCHOR_TOKEN |
+ An ANCHOR token. + |
YAML_TAG_TOKEN |
+ A TAG token. + |
YAML_SCALAR_TOKEN |
+ A SCALAR token. + |
void yaml_token_delete | +( | +yaml_token_t * | +token | ) | ++ |
Free any memory allocated for a token object.
+[in,out] | token | A token object. |
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+Functions | |
const char * | yaml_get_version_string (void) |
Get the library version as a string. | |
void | yaml_get_version (int *major, int *minor, int *patch) |
Get the library version numbers. |
const char* yaml_get_version_string | +( | +void | +) | ++ |
Get the library version as a string.
+"X.Y.Z"
, where X
is the major version number, Y
is a minor version number, and Z
is the patch version number. void yaml_get_version | +( | +int * | +major, | +
+ | + | int * | +minor, | +
+ | + | int * | +patch | +
+ | ) | ++ |
Get the library version numbers.
+[out] | major | Major version number. |
[out] | minor | Minor version number. |
[out] | patch | Patch version number. |
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
This structure holds aliases data. + More...
+ +#include <yaml.h>
+Data Fields | |
yaml_char_t * | anchor |
The anchor. | |
int | index |
The node id. | |
yaml_mark_t | mark |
The anchor mark. |
This structure holds aliases data.
+yaml_char_t* yaml_alias_data_s::anchor | +
The anchor.
+ +int yaml_alias_data_s::index | +
The node id.
+ +yaml_mark_t yaml_alias_data_s::mark | +
The anchor mark.
+ +
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
The document structure. + More...
+ +#include <yaml.h>
+Data Fields | |
struct { | |
yaml_node_t * start | |
The beginning of the stack. | |
yaml_node_t * end | |
The end of the stack. | |
yaml_node_t * top | |
The top of the stack. | |
} | nodes |
The document nodes. | |
yaml_version_directive_t * | version_directive |
The version directive. | |
struct { | |
yaml_tag_directive_t * start | |
The beginning of the tag directives list. | |
yaml_tag_directive_t * end | |
The end of the tag directives list. | |
} | tag_directives |
The list of tag directives. | |
+int | start_implicit |
Is the document start indicator implicit? | |
+int | end_implicit |
Is the document end indicator implicit? | |
yaml_mark_t | start_mark |
The beginning of the document. | |
yaml_mark_t | end_mark |
The end of the document. |
The document structure.
+yaml_node_t* yaml_document_s::start | +
The beginning of the stack.
+ +yaml_node_t* yaml_document_s::end | +
The end of the stack.
+ +yaml_node_t* yaml_document_s::top | +
The top of the stack.
+ +struct { ... } yaml_document_s::nodes | +
The document nodes.
+ +The version directive.
+ +yaml_tag_directive_t* yaml_document_s::start | +
The beginning of the tag directives list.
+ +yaml_tag_directive_t* yaml_document_s::end | +
The end of the tag directives list.
+ +struct { ... } yaml_document_s::tag_directives | +
The list of tag directives.
+ +yaml_mark_t yaml_document_s::start_mark | +
The beginning of the document.
+ +yaml_mark_t yaml_document_s::end_mark | +
The end of the document.
+ +
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
The emitter structure. + More...
+ +#include <yaml.h>
+Data Fields | |
unsigned char * | buffer |
The buffer pointer. | |
size_t | size |
The buffer size. | |
size_t * | size_written |
The number of written bytes. | |
struct { | |
unsigned char * buffer | |
The buffer pointer. | |
size_t size | |
The buffer size. | |
size_t * size_written | |
The number of written bytes. | |
} | string |
String output data. | |
FILE * | file |
File output data. | |
yaml_char_t * | start |
The beginning of the buffer. | |
yaml_char_t * | end |
The end of the buffer. | |
yaml_char_t * | pointer |
The current position of the buffer. | |
yaml_char_t * | last |
The last filled position of the buffer. | |
unsigned char * | start |
The beginning of the buffer. | |
unsigned char * | end |
The end of the buffer. | |
unsigned char * | pointer |
The current position of the buffer. | |
unsigned char * | last |
The last filled position of the buffer. | |
yaml_emitter_state_t * | start |
The beginning of the stack. | |
yaml_emitter_state_t * | end |
The end of the stack. | |
yaml_emitter_state_t * | top |
The top of the stack. | |
yaml_event_t * | start |
The beginning of the event queue. | |
yaml_event_t * | end |
The end of the event queue. | |
yaml_event_t * | head |
The head of the event queue. | |
yaml_event_t * | tail |
The tail of the event queue. | |
int * | start |
The beginning of the stack. | |
int * | end |
The end of the stack. | |
int * | top |
The top of the stack. | |
yaml_tag_directive_t * | start |
The beginning of the list. | |
yaml_tag_directive_t * | end |
The end of the list. | |
yaml_tag_directive_t * | top |
The top of the list. | |
yaml_char_t * | anchor |
The anchor value. | |
size_t | anchor_length |
The anchor length. | |
+int | alias |
Is it an alias? | |
yaml_char_t * | handle |
The tag handle. | |
size_t | handle_length |
The tag handle length. | |
yaml_char_t * | suffix |
The tag suffix. | |
size_t | suffix_length |
The tag suffix length. | |
yaml_char_t * | value |
The scalar value. | |
size_t | length |
The scalar length. | |
+int | multiline |
Does the scalar contain line breaks? | |
+int | flow_plain_allowed |
Can the scalar be expessed in the flow plain style? | |
+int | block_plain_allowed |
Can the scalar be expressed in the block plain style? | |
+int | single_quoted_allowed |
Can the scalar be expressed in the single quoted style? | |
+int | block_allowed |
Can the scalar be expressed in the literal or folded styles? | |
yaml_scalar_style_t | style |
The output style. | |
int | references |
The number of references. | |
int | anchor |
The anchor id. | |
+int | serialized |
If the node has been emitted? | |
Error handling | |
yaml_error_type_t | error |
Error type. | |
const char * | problem |
Error description. | |
Writer stuff | |
yaml_write_handler_t * | write_handler |
Write handler. | |
void * | write_handler_data |
A pointer for passing to the white handler. | |
union { | |
struct { | |
unsigned char * buffer | |
The buffer pointer. | |
size_t size | |
The buffer size. | |
size_t * size_written | |
The number of written bytes. | |
} string | |
String output data. | |
FILE * file | |
File output data. | |
} | output |
Standard (string or file) output data. | |
struct { | |
yaml_char_t * start | |
The beginning of the buffer. | |
yaml_char_t * end | |
The end of the buffer. | |
yaml_char_t * pointer | |
The current position of the buffer. | |
yaml_char_t * last | |
The last filled position of the buffer. | |
} | buffer |
The working buffer. | |
struct { | |
unsigned char * start | |
The beginning of the buffer. | |
unsigned char * end | |
The end of the buffer. | |
unsigned char * pointer | |
The current position of the buffer. | |
unsigned char * last | |
The last filled position of the buffer. | |
} | raw_buffer |
The raw buffer. | |
yaml_encoding_t | encoding |
The stream encoding. | |
Emitter stuff | |
+int | canonical |
If the output is in the canonical style? | |
int | best_indent |
The number of indentation spaces. | |
int | best_width |
The preferred width of the output lines. | |
+int | unicode |
Allow unescaped non-ASCII characters? | |
yaml_break_t | line_break |
The preferred line break. | |
struct { | |
yaml_emitter_state_t * start | |
The beginning of the stack. | |
yaml_emitter_state_t * end | |
The end of the stack. | |
yaml_emitter_state_t * top | |
The top of the stack. | |
} | states |
The stack of states. | |
yaml_emitter_state_t | state |
The current emitter state. | |
struct { | |
yaml_event_t * start | |
The beginning of the event queue. | |
yaml_event_t * end | |
The end of the event queue. | |
yaml_event_t * head | |
The head of the event queue. | |
yaml_event_t * tail | |
The tail of the event queue. | |
} | events |
The event queue. | |
struct { | |
int * start | |
The beginning of the stack. | |
int * end | |
The end of the stack. | |
int * top | |
The top of the stack. | |
} | indents |
The stack of indentation levels. | |
struct { | |
yaml_tag_directive_t * start | |
The beginning of the list. | |
yaml_tag_directive_t * end | |
The end of the list. | |
yaml_tag_directive_t * top | |
The top of the list. | |
} | tag_directives |
The list of tag directives. | |
int | indent |
The current indentation level. | |
int | flow_level |
The current flow level. | |
+int | root_context |
Is it the document root context? | |
+int | sequence_context |
Is it a sequence context? | |
+int | mapping_context |
Is it a mapping context? | |
+int | simple_key_context |
Is it a simple mapping key context? | |
int | line |
The current line. | |
int | column |
The current column. | |
+int | whitespace |
If the last character was a whitespace? | |
+int | indention |
If the last character was an indentation character (' ', '-', '?', ':')? | |
+int | open_ended |
If an explicit document end is required? | |
struct { | |
yaml_char_t * anchor | |
The anchor value. | |
size_t anchor_length | |
The anchor length. | |
int alias | |
Is it an alias? | |
} | anchor_data |
Anchor analysis. | |
struct { | |
yaml_char_t * handle | |
The tag handle. | |
size_t handle_length | |
The tag handle length. | |
yaml_char_t * suffix | |
The tag suffix. | |
size_t suffix_length | |
The tag suffix length. | |
} | tag_data |
Tag analysis. | |
struct { | |
yaml_char_t * value | |
The scalar value. | |
size_t length | |
The scalar length. | |
int multiline | |
Does the scalar contain line breaks? | |
int flow_plain_allowed | |
Can the scalar be expessed in the flow plain style? | |
int block_plain_allowed | |
Can the scalar be expressed in the block plain style? | |
int single_quoted_allowed | |
Can the scalar be expressed in the single quoted style? | |
int block_allowed | |
Can the scalar be expressed in the literal or folded styles? | |
yaml_scalar_style_t style | |
The output style. | |
} | scalar_data |
Scalar analysis. | |
Dumper stuff | |
+int | opened |
If the stream was already opened? | |
+int | closed |
If the stream was already closed? | |
struct { | |
int references | |
The number of references. | |
int anchor | |
The anchor id. | |
int serialized | |
If the node has been emitted? | |
} | anchors |
The information associated with the document nodes. | |
int | last_anchor_id |
The last assigned anchor id. | |
yaml_document_t * | document |
The currently emitted document. |
The emitter structure.
+All members are internal. Manage the structure using the yaml_emitter_
family of functions.
yaml_error_type_t yaml_emitter_s::error | +
Error type.
+ +const char* yaml_emitter_s::problem | +
Error description.
+ +yaml_write_handler_t* yaml_emitter_s::write_handler | +
Write handler.
+ +void* yaml_emitter_s::write_handler_data | +
A pointer for passing to the white handler.
+ +unsigned char* yaml_emitter_s::buffer | +
The buffer pointer.
+ +size_t yaml_emitter_s::size | +
The buffer size.
+ +size_t* yaml_emitter_s::size_written | +
The number of written bytes.
+ +struct { ... } yaml_emitter_s::string | +
String output data.
+ +FILE* yaml_emitter_s::file | +
File output data.
+ +union { ... } yaml_emitter_s::output | +
Standard (string or file) output data.
+ +yaml_char_t* yaml_emitter_s::start | +
The beginning of the buffer.
+ +yaml_char_t* yaml_emitter_s::end | +
The end of the buffer.
+ +yaml_char_t* yaml_emitter_s::pointer | +
The current position of the buffer.
+ +yaml_char_t* yaml_emitter_s::last | +
The last filled position of the buffer.
+ +struct { ... } yaml_emitter_s::buffer | +
The working buffer.
+ +unsigned char* yaml_emitter_s::start | +
The beginning of the buffer.
+ +unsigned char* yaml_emitter_s::end | +
The end of the buffer.
+ +unsigned char* yaml_emitter_s::pointer | +
The current position of the buffer.
+ +unsigned char* yaml_emitter_s::last | +
The last filled position of the buffer.
+ +struct { ... } yaml_emitter_s::raw_buffer | +
The raw buffer.
+ +yaml_encoding_t yaml_emitter_s::encoding | +
The stream encoding.
+ +int yaml_emitter_s::best_indent | +
The number of indentation spaces.
+ +int yaml_emitter_s::best_width | +
The preferred width of the output lines.
+ +yaml_break_t yaml_emitter_s::line_break | +
The preferred line break.
+ +yaml_emitter_state_t* yaml_emitter_s::start | +
The beginning of the stack.
+ +yaml_emitter_state_t* yaml_emitter_s::end | +
The end of the stack.
+ +yaml_emitter_state_t* yaml_emitter_s::top | +
The top of the stack.
+ +struct { ... } yaml_emitter_s::states | +
The stack of states.
+ +yaml_emitter_state_t yaml_emitter_s::state | +
The current emitter state.
+ +yaml_event_t* yaml_emitter_s::start | +
The beginning of the event queue.
+ +yaml_event_t* yaml_emitter_s::end | +
The end of the event queue.
+ +yaml_event_t* yaml_emitter_s::head | +
The head of the event queue.
+ +yaml_event_t* yaml_emitter_s::tail | +
The tail of the event queue.
+ +struct { ... } yaml_emitter_s::events | +
The event queue.
+ +int* yaml_emitter_s::start | +
The beginning of the stack.
+ +int* yaml_emitter_s::end | +
The end of the stack.
+ +int* yaml_emitter_s::top | +
The top of the stack.
+ +struct { ... } yaml_emitter_s::indents | +
The stack of indentation levels.
+ +yaml_tag_directive_t* yaml_emitter_s::start | +
The beginning of the list.
+ +yaml_tag_directive_t* yaml_emitter_s::end | +
The end of the list.
+ +yaml_tag_directive_t* yaml_emitter_s::top | +
The top of the list.
+ +struct { ... } yaml_emitter_s::tag_directives | +
The list of tag directives.
+ +int yaml_emitter_s::indent | +
The current indentation level.
+ +int yaml_emitter_s::flow_level | +
The current flow level.
+ +int yaml_emitter_s::line | +
The current line.
+ +int yaml_emitter_s::column | +
The current column.
+ +yaml_char_t* yaml_emitter_s::anchor | +
The anchor value.
+ +size_t yaml_emitter_s::anchor_length | +
The anchor length.
+ +struct { ... } yaml_emitter_s::anchor_data | +
Anchor analysis.
+ +yaml_char_t* yaml_emitter_s::handle | +
The tag handle.
+ +size_t yaml_emitter_s::handle_length | +
The tag handle length.
+ +yaml_char_t* yaml_emitter_s::suffix | +
The tag suffix.
+ +size_t yaml_emitter_s::suffix_length | +
The tag suffix length.
+ +struct { ... } yaml_emitter_s::tag_data | +
Tag analysis.
+ +yaml_char_t* yaml_emitter_s::value | +
The scalar value.
+ +size_t yaml_emitter_s::length | +
The scalar length.
+ +yaml_scalar_style_t yaml_emitter_s::style | +
The output style.
+ +struct { ... } yaml_emitter_s::scalar_data | +
Scalar analysis.
+ +int yaml_emitter_s::references | +
The number of references.
+ +int yaml_emitter_s::anchor | +
The anchor id.
+ +struct { ... } * yaml_emitter_s::anchors | +
The information associated with the document nodes.
+ +int yaml_emitter_s::last_anchor_id | +
The last assigned anchor id.
+ +yaml_document_t* yaml_emitter_s::document | +
The currently emitted document.
+ +
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
The event structure. + More...
+ +#include <yaml.h>
+Data Fields | |
yaml_event_type_t | type |
The event type. | |
union { | |
struct { | |
yaml_encoding_t encoding | |
The document encoding. | |
} stream_start | |
The stream parameters (for YAML_STREAM_START_EVENT ). | |
struct { | |
yaml_version_directive_t * version_directive | |
The version directive. | |
struct { | |
yaml_tag_directive_t * start | |
The beginning of the tag directives list. | |
yaml_tag_directive_t * end | |
The end of the tag directives list. | |
} tag_directives | |
The list of tag directives. | |
int implicit | |
Is the document indicator implicit? | |
} document_start | |
The document parameters (for YAML_DOCUMENT_START_EVENT ). | |
struct { | |
int implicit | |
Is the document end indicator implicit? | |
} document_end | |
The document end parameters (for YAML_DOCUMENT_END_EVENT ). | |
struct { | |
yaml_char_t * anchor | |
The anchor. | |
} alias | |
The alias parameters (for YAML_ALIAS_EVENT ). | |
struct { | |
yaml_char_t * anchor | |
The anchor. | |
yaml_char_t * tag | |
The tag. | |
yaml_char_t * value | |
The scalar value. | |
size_t length | |
The length of the scalar value. | |
int plain_implicit | |
Is the tag optional for the plain style? | |
int quoted_implicit | |
Is the tag optional for any non-plain style? | |
yaml_scalar_style_t style | |
The scalar style. | |
} scalar | |
The scalar parameters (for YAML_SCALAR_EVENT ). | |
struct { | |
yaml_char_t * anchor | |
The anchor. | |
yaml_char_t * tag | |
The tag. | |
int implicit | |
Is the tag optional? | |
yaml_sequence_style_t style | |
The sequence style. | |
} sequence_start | |
The sequence parameters (for YAML_SEQUENCE_START_EVENT ). | |
struct { | |
yaml_char_t * anchor | |
The anchor. | |
yaml_char_t * tag | |
The tag. | |
int implicit | |
Is the tag optional? | |
yaml_mapping_style_t style | |
The mapping style. | |
} mapping_start | |
The mapping parameters (for YAML_MAPPING_START_EVENT ). | |
} | data |
The event data. | |
yaml_mark_t | start_mark |
The beginning of the event. | |
yaml_mark_t | end_mark |
The end of the event. |
The event structure.
+yaml_event_type_t yaml_event_s::type | +
The event type.
+ +yaml_encoding_t yaml_event_s::encoding | +
The document encoding.
+ +struct { ... } yaml_event_s::stream_start | +
The stream parameters (for YAML_STREAM_START_EVENT
).
yaml_version_directive_t* yaml_event_s::version_directive | +
The version directive.
+ +yaml_tag_directive_t* yaml_event_s::start | +
The beginning of the tag directives list.
+ +yaml_tag_directive_t* yaml_event_s::end | +
The end of the tag directives list.
+ +struct { ... } yaml_event_s::tag_directives | +
The list of tag directives.
+ +int yaml_event_s::implicit | +
Is the document indicator implicit?
+Is the tag optional?
+Is the document end indicator implicit?
+ +struct { ... } yaml_event_s::document_start | +
The document parameters (for YAML_DOCUMENT_START_EVENT
).
struct { ... } yaml_event_s::document_end | +
The document end parameters (for YAML_DOCUMENT_END_EVENT
).
yaml_char_t* yaml_event_s::anchor | +
The anchor.
+ +struct { ... } yaml_event_s::alias | +
The alias parameters (for YAML_ALIAS_EVENT
).
yaml_char_t* yaml_event_s::tag | +
The tag.
+ +yaml_char_t* yaml_event_s::value | +
The scalar value.
+ +size_t yaml_event_s::length | +
The length of the scalar value.
+ +yaml_scalar_style_t yaml_event_s::style | +
The scalar style.
+ +struct { ... } yaml_event_s::scalar | +
The scalar parameters (for YAML_SCALAR_EVENT
).
yaml_sequence_style_t yaml_event_s::style | +
The sequence style.
+ +struct { ... } yaml_event_s::sequence_start | +
The sequence parameters (for YAML_SEQUENCE_START_EVENT
).
yaml_mapping_style_t yaml_event_s::style | +
The mapping style.
+ +struct { ... } yaml_event_s::mapping_start | +
The mapping parameters (for YAML_MAPPING_START_EVENT
).
union { ... } yaml_event_s::data | +
The event data.
+ +yaml_mark_t yaml_event_s::start_mark | +
The beginning of the event.
+ +yaml_mark_t yaml_event_s::end_mark | +
The end of the event.
+ +
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
The pointer position. + More...
+ +#include <yaml.h>
+Data Fields | |
size_t | index |
The position index. | |
size_t | line |
The position line. | |
size_t | column |
The position column. |
The pointer position.
+size_t yaml_mark_s::index | +
The position index.
+ +size_t yaml_mark_s::line | +
The position line.
+ +size_t yaml_mark_s::column | +
The position column.
+ +
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
An element of a mapping node. + More...
+ +#include <yaml.h>
+Data Fields | |
int | key |
The key of the element. | |
int | value |
The value of the element. |
An element of a mapping node.
+int yaml_node_pair_s::key | +
The key of the element.
+ +int yaml_node_pair_s::value | +
The value of the element.
+ +
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
The node structure. + More...
+ +#include <yaml.h>
+Data Fields | |
yaml_node_type_t | type |
The node type. | |
yaml_char_t * | tag |
The node tag. | |
union { | |
struct { | |
yaml_char_t * value | |
The scalar value. | |
size_t length | |
The length of the scalar value. | |
yaml_scalar_style_t style | |
The scalar style. | |
} scalar | |
The scalar parameters (for YAML_SCALAR_NODE ). | |
struct { | |
struct { | |
yaml_node_item_t * start | |
The beginning of the stack. | |
yaml_node_item_t * end | |
The end of the stack. | |
yaml_node_item_t * top | |
The top of the stack. | |
} items | |
The stack of sequence items. | |
yaml_sequence_style_t style | |
The sequence style. | |
} sequence | |
The sequence parameters (for YAML_SEQUENCE_NODE ). | |
struct { | |
struct { | |
yaml_node_pair_t * start | |
The beginning of the stack. | |
yaml_node_pair_t * end | |
The end of the stack. | |
yaml_node_pair_t * top | |
The top of the stack. | |
} pairs | |
The stack of mapping pairs (key, value). | |
yaml_mapping_style_t style | |
The mapping style. | |
} mapping | |
The mapping parameters (for YAML_MAPPING_NODE ). | |
} | data |
The node data. | |
yaml_mark_t | start_mark |
The beginning of the node. | |
yaml_mark_t | end_mark |
The end of the node. |
The node structure.
+yaml_node_type_t yaml_node_s::type | +
The node type.
+ +yaml_char_t* yaml_node_s::tag | +
The node tag.
+ +yaml_char_t* yaml_node_s::value | +
The scalar value.
+ +size_t yaml_node_s::length | +
The length of the scalar value.
+ +yaml_scalar_style_t yaml_node_s::style | +
The scalar style.
+ +struct { ... } yaml_node_s::scalar | +
The scalar parameters (for YAML_SCALAR_NODE
).
yaml_node_item_t* yaml_node_s::start | +
The beginning of the stack.
+ +yaml_node_item_t* yaml_node_s::end | +
The end of the stack.
+ +yaml_node_item_t* yaml_node_s::top | +
The top of the stack.
+ +struct { ... } yaml_node_s::items | +
The stack of sequence items.
+ +yaml_sequence_style_t yaml_node_s::style | +
The sequence style.
+ +struct { ... } yaml_node_s::sequence | +
The sequence parameters (for YAML_SEQUENCE_NODE
).
yaml_node_pair_t* yaml_node_s::start | +
The beginning of the stack.
+ +yaml_node_pair_t* yaml_node_s::end | +
The end of the stack.
+ +yaml_node_pair_t* yaml_node_s::top | +
The top of the stack.
+ +struct { ... } yaml_node_s::pairs | +
The stack of mapping pairs (key, value).
+ +yaml_mapping_style_t yaml_node_s::style | +
The mapping style.
+ +struct { ... } yaml_node_s::mapping | +
The mapping parameters (for YAML_MAPPING_NODE
).
union { ... } yaml_node_s::data | +
The node data.
+ +yaml_mark_t yaml_node_s::start_mark | +
The beginning of the node.
+ +yaml_mark_t yaml_node_s::end_mark | +
The end of the node.
+ +
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
The parser structure. + More...
+ +#include <yaml.h>
+Data Fields | |
const unsigned char * | start |
The string start pointer. | |
const unsigned char * | end |
The string end pointer. | |
const unsigned char * | current |
The string current position. | |
struct { | |
const unsigned char * start | |
The string start pointer. | |
const unsigned char * end | |
The string end pointer. | |
const unsigned char * current | |
The string current position. | |
} | string |
String input data. | |
FILE * | file |
File input data. | |
yaml_char_t * | start |
The beginning of the buffer. | |
yaml_char_t * | end |
The end of the buffer. | |
yaml_char_t * | pointer |
The current position of the buffer. | |
yaml_char_t * | last |
The last filled position of the buffer. | |
unsigned char * | start |
The beginning of the buffer. | |
unsigned char * | end |
The end of the buffer. | |
unsigned char * | pointer |
The current position of the buffer. | |
unsigned char * | last |
The last filled position of the buffer. | |
yaml_token_t * | start |
The beginning of the tokens queue. | |
yaml_token_t * | end |
The end of the tokens queue. | |
yaml_token_t * | head |
The head of the tokens queue. | |
yaml_token_t * | tail |
The tail of the tokens queue. | |
int * | start |
The beginning of the stack. | |
int * | end |
The end of the stack. | |
int * | top |
The top of the stack. | |
yaml_simple_key_t * | start |
The beginning of the stack. | |
yaml_simple_key_t * | end |
The end of the stack. | |
yaml_simple_key_t * | top |
The top of the stack. | |
yaml_parser_state_t * | start |
The beginning of the stack. | |
yaml_parser_state_t * | end |
The end of the stack. | |
yaml_parser_state_t * | top |
The top of the stack. | |
yaml_mark_t * | start |
The beginning of the stack. | |
yaml_mark_t * | end |
The end of the stack. | |
yaml_mark_t * | top |
The top of the stack. | |
yaml_tag_directive_t * | start |
The beginning of the list. | |
yaml_tag_directive_t * | end |
The end of the list. | |
yaml_tag_directive_t * | top |
The top of the list. | |
yaml_alias_data_t * | start |
The beginning of the list. | |
yaml_alias_data_t * | end |
The end of the list. | |
yaml_alias_data_t * | top |
The top of the list. | |
Error handling | |
yaml_error_type_t | error |
Error type. | |
const char * | problem |
Error description. | |
size_t | problem_offset |
The byte about which the problem occured. | |
int | problem_value |
The problematic value (-1 is none). | |
yaml_mark_t | problem_mark |
The problem position. | |
const char * | context |
The error context. | |
yaml_mark_t | context_mark |
The context position. | |
Reader stuff | |
yaml_read_handler_t * | read_handler |
Read handler. | |
void * | read_handler_data |
A pointer for passing to the read handler. | |
union { | |
struct { | |
const unsigned char * start | |
The string start pointer. | |
const unsigned char * end | |
The string end pointer. | |
const unsigned char * current | |
The string current position. | |
} string | |
String input data. | |
FILE * file | |
File input data. | |
} | input |
Standard (string or file) input data. | |
+int | eof |
EOF flag. | |
struct { | |
yaml_char_t * start | |
The beginning of the buffer. | |
yaml_char_t * end | |
The end of the buffer. | |
yaml_char_t * pointer | |
The current position of the buffer. | |
yaml_char_t * last | |
The last filled position of the buffer. | |
} | buffer |
The working buffer. | |
+size_t | unread |
struct { | |
unsigned char * start | |
The beginning of the buffer. | |
unsigned char * end | |
The end of the buffer. | |
unsigned char * pointer | |
The current position of the buffer. | |
unsigned char * last | |
The last filled position of the buffer. | |
} | raw_buffer |
The raw buffer. | |
yaml_encoding_t | encoding |
The input encoding. | |
size_t | offset |
The offset of the current position (in bytes). | |
yaml_mark_t | mark |
The mark of the current position. | |
Scanner stuff | |
+int | stream_start_produced |
Have we started to scan the input stream? | |
+int | stream_end_produced |
Have we reached the end of the input stream? | |
int | flow_level |
The number of unclosed '[' and '{' indicators. | |
struct { | |
yaml_token_t * start | |
The beginning of the tokens queue. | |
yaml_token_t * end | |
The end of the tokens queue. | |
yaml_token_t * head | |
The head of the tokens queue. | |
yaml_token_t * tail | |
The tail of the tokens queue. | |
} | tokens |
The tokens queue. | |
size_t | tokens_parsed |
The number of tokens fetched from the queue. | |
+int | token_available |
struct { | |
int * start | |
The beginning of the stack. | |
int * end | |
The end of the stack. | |
int * top | |
The top of the stack. | |
} | indents |
The indentation levels stack. | |
int | indent |
The current indentation level. | |
+int | simple_key_allowed |
May a simple key occur at the current position? | |
struct { | |
yaml_simple_key_t * start | |
The beginning of the stack. | |
yaml_simple_key_t * end | |
The end of the stack. | |
yaml_simple_key_t * top | |
The top of the stack. | |
} | simple_keys |
The stack of simple keys. | |
Parser stuff | |
struct { | |
yaml_parser_state_t * start | |
The beginning of the stack. | |
yaml_parser_state_t * end | |
The end of the stack. | |
yaml_parser_state_t * top | |
The top of the stack. | |
} | states |
The parser states stack. | |
yaml_parser_state_t | state |
The current parser state. | |
struct { | |
yaml_mark_t * start | |
The beginning of the stack. | |
yaml_mark_t * end | |
The end of the stack. | |
yaml_mark_t * top | |
The top of the stack. | |
} | marks |
The stack of marks. | |
struct { | |
yaml_tag_directive_t * start | |
The beginning of the list. | |
yaml_tag_directive_t * end | |
The end of the list. | |
yaml_tag_directive_t * top | |
The top of the list. | |
} | tag_directives |
The list of TAG directives. | |
Dumper stuff | |
struct { | |
yaml_alias_data_t * start | |
The beginning of the list. | |
yaml_alias_data_t * end | |
The end of the list. | |
yaml_alias_data_t * top | |
The top of the list. | |
} | aliases |
The alias data. | |
yaml_document_t * | document |
The currently parsed document. |
The parser structure.
+All members are internal. Manage the structure using the yaml_parser_
family of functions.
yaml_error_type_t yaml_parser_s::error | +
Error type.
+ +const char* yaml_parser_s::problem | +
Error description.
+ +size_t yaml_parser_s::problem_offset | +
The byte about which the problem occured.
+ +int yaml_parser_s::problem_value | +
The problematic value (-1
is none).
yaml_mark_t yaml_parser_s::problem_mark | +
The problem position.
+ +const char* yaml_parser_s::context | +
The error context.
+ +yaml_mark_t yaml_parser_s::context_mark | +
The context position.
+ +yaml_read_handler_t* yaml_parser_s::read_handler | +
Read handler.
+ +void* yaml_parser_s::read_handler_data | +
A pointer for passing to the read handler.
+ +const unsigned char* yaml_parser_s::start | +
The string start pointer.
+ +const unsigned char* yaml_parser_s::end | +
The string end pointer.
+ +const unsigned char* yaml_parser_s::current | +
The string current position.
+ +struct { ... } yaml_parser_s::string | +
String input data.
+ +FILE* yaml_parser_s::file | +
File input data.
+ +union { ... } yaml_parser_s::input | +
Standard (string or file) input data.
+ +yaml_char_t* yaml_parser_s::start | +
The beginning of the buffer.
+ +yaml_char_t* yaml_parser_s::end | +
The end of the buffer.
+ +yaml_char_t* yaml_parser_s::pointer | +
The current position of the buffer.
+ +yaml_char_t* yaml_parser_s::last | +
The last filled position of the buffer.
+ +struct { ... } yaml_parser_s::buffer | +
The working buffer.
+ +unsigned char* yaml_parser_s::start | +
The beginning of the buffer.
+ +unsigned char* yaml_parser_s::end | +
The end of the buffer.
+ +unsigned char* yaml_parser_s::pointer | +
The current position of the buffer.
+ +unsigned char* yaml_parser_s::last | +
The last filled position of the buffer.
+ +struct { ... } yaml_parser_s::raw_buffer | +
The raw buffer.
+ +yaml_encoding_t yaml_parser_s::encoding | +
The input encoding.
+ +size_t yaml_parser_s::offset | +
The offset of the current position (in bytes).
+ +yaml_mark_t yaml_parser_s::mark | +
The mark of the current position.
+ +int yaml_parser_s::flow_level | +
The number of unclosed '[' and '{' indicators.
+ +yaml_token_t* yaml_parser_s::start | +
The beginning of the tokens queue.
+ +yaml_token_t* yaml_parser_s::end | +
The end of the tokens queue.
+ +yaml_token_t* yaml_parser_s::head | +
The head of the tokens queue.
+ +yaml_token_t* yaml_parser_s::tail | +
The tail of the tokens queue.
+ +struct { ... } yaml_parser_s::tokens | +
The tokens queue.
+ +size_t yaml_parser_s::tokens_parsed | +
The number of tokens fetched from the queue.
+ +int* yaml_parser_s::start | +
The beginning of the stack.
+ +int* yaml_parser_s::end | +
The end of the stack.
+ +int* yaml_parser_s::top | +
The top of the stack.
+ +struct { ... } yaml_parser_s::indents | +
The indentation levels stack.
+ +int yaml_parser_s::indent | +
The current indentation level.
+ +yaml_simple_key_t* yaml_parser_s::start | +
The beginning of the stack.
+ +yaml_simple_key_t* yaml_parser_s::end | +
The end of the stack.
+ +yaml_simple_key_t* yaml_parser_s::top | +
The top of the stack.
+ +struct { ... } yaml_parser_s::simple_keys | +
The stack of simple keys.
+ +yaml_parser_state_t* yaml_parser_s::start | +
The beginning of the stack.
+ +yaml_parser_state_t* yaml_parser_s::end | +
The end of the stack.
+ +yaml_parser_state_t* yaml_parser_s::top | +
The top of the stack.
+ +struct { ... } yaml_parser_s::states | +
The parser states stack.
+ +yaml_parser_state_t yaml_parser_s::state | +
The current parser state.
+ +yaml_mark_t* yaml_parser_s::start | +
The beginning of the stack.
+ +yaml_mark_t* yaml_parser_s::end | +
The end of the stack.
+ +yaml_mark_t* yaml_parser_s::top | +
The top of the stack.
+ +struct { ... } yaml_parser_s::marks | +
The stack of marks.
+ +yaml_tag_directive_t* yaml_parser_s::start | +
The beginning of the list.
+ +yaml_tag_directive_t* yaml_parser_s::end | +
The end of the list.
+ +yaml_tag_directive_t* yaml_parser_s::top | +
The top of the list.
+ +struct { ... } yaml_parser_s::tag_directives | +
The list of TAG directives.
+ +yaml_alias_data_t* yaml_parser_s::start | +
The beginning of the list.
+ +yaml_alias_data_t* yaml_parser_s::end | +
The end of the list.
+ +yaml_alias_data_t* yaml_parser_s::top | +
The top of the list.
+ +struct { ... } yaml_parser_s::aliases | +
The alias data.
+ +yaml_document_t* yaml_parser_s::document | +
The currently parsed document.
+ +
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
This structure holds information about a potential simple key. + More...
+ +#include <yaml.h>
+Data Fields | |
+int | possible |
Is a simple key possible? | |
+int | required |
Is a simple key required? | |
size_t | token_number |
The number of the token. | |
yaml_mark_t | mark |
The position mark. |
This structure holds information about a potential simple key.
+size_t yaml_simple_key_s::token_number | +
The number of the token.
+ +yaml_mark_t yaml_simple_key_s::mark | +
The position mark.
+ +
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
The tag directive data. + More...
+ +#include <yaml.h>
+Data Fields | |
yaml_char_t * | handle |
The tag handle. | |
yaml_char_t * | prefix |
The tag prefix. |
The tag directive data.
+yaml_char_t* yaml_tag_directive_s::handle | +
The tag handle.
+ +yaml_char_t* yaml_tag_directive_s::prefix | +
The tag prefix.
+ +
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
The token structure. + More...
+ +#include <yaml.h>
+Data Fields | |
yaml_token_type_t | type |
The token type. | |
union { | |
struct { | |
yaml_encoding_t encoding | |
The stream encoding. | |
} stream_start | |
The stream start (for YAML_STREAM_START_TOKEN ). | |
struct { | |
yaml_char_t * value | |
The alias value. | |
} alias | |
The alias (for YAML_ALIAS_TOKEN ). | |
struct { | |
yaml_char_t * value | |
The anchor value. | |
} anchor | |
The anchor (for YAML_ANCHOR_TOKEN ). | |
struct { | |
yaml_char_t * handle | |
The tag handle. | |
yaml_char_t * suffix | |
The tag suffix. | |
} tag | |
The tag (for YAML_TAG_TOKEN ). | |
struct { | |
yaml_char_t * value | |
The scalar value. | |
size_t length | |
The length of the scalar value. | |
yaml_scalar_style_t style | |
The scalar style. | |
} scalar | |
The scalar value (for YAML_SCALAR_TOKEN ). | |
struct { | |
int major | |
The major version number. | |
int minor | |
The minor version number. | |
} version_directive | |
The version directive (for YAML_VERSION_DIRECTIVE_TOKEN ). | |
struct { | |
yaml_char_t * handle | |
The tag handle. | |
yaml_char_t * prefix | |
The tag prefix. | |
} tag_directive | |
The tag directive (for YAML_TAG_DIRECTIVE_TOKEN ). | |
} | data |
The token data. | |
yaml_mark_t | start_mark |
The beginning of the token. | |
yaml_mark_t | end_mark |
The end of the token. |
The token structure.
+yaml_token_type_t yaml_token_s::type | +
The token type.
+ +yaml_encoding_t yaml_token_s::encoding | +
The stream encoding.
+ +struct { ... } yaml_token_s::stream_start | +
The stream start (for YAML_STREAM_START_TOKEN
).
yaml_char_t* yaml_token_s::value | +
The alias value.
+The scalar value.
+The anchor value.
+ +struct { ... } yaml_token_s::alias | +
The alias (for YAML_ALIAS_TOKEN
).
struct { ... } yaml_token_s::anchor | +
The anchor (for YAML_ANCHOR_TOKEN
).
yaml_char_t* yaml_token_s::handle | +
The tag handle.
+ +yaml_char_t* yaml_token_s::suffix | +
The tag suffix.
+ +struct { ... } yaml_token_s::tag | +
The tag (for YAML_TAG_TOKEN
).
size_t yaml_token_s::length | +
The length of the scalar value.
+ +yaml_scalar_style_t yaml_token_s::style | +
The scalar style.
+ +struct { ... } yaml_token_s::scalar | +
The scalar value (for YAML_SCALAR_TOKEN
).
int yaml_token_s::major | +
The major version number.
+ +int yaml_token_s::minor | +
The minor version number.
+ +struct { ... } yaml_token_s::version_directive | +
The version directive (for YAML_VERSION_DIRECTIVE_TOKEN
).
yaml_char_t* yaml_token_s::prefix | +
The tag prefix.
+ +struct { ... } yaml_token_s::tag_directive | +
The tag directive (for YAML_TAG_DIRECTIVE_TOKEN
).
union { ... } yaml_token_s::data | +
The token data.
+ +yaml_mark_t yaml_token_s::start_mark | +
The beginning of the token.
+ +yaml_mark_t yaml_token_s::end_mark | +
The end of the token.
+ +
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
The version directive data. + More...
+ +#include <yaml.h>
+Data Fields | |
int | major |
The major version number. | |
int | minor |
The minor version number. |
The version directive data.
+int yaml_version_directive_s::major | +
The major version number.
+ +int yaml_version_directive_s::minor | +
The minor version number.
+ +
+ yaml
+ 0.1.5
+
+
+ |
+
+
+
+
Public interface for libyaml. +More...
+#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+Data Structures | |
struct | yaml_version_directive_s |
The version directive data. More... | |
struct | yaml_tag_directive_s |
The tag directive data. More... | |
struct | yaml_mark_s |
The pointer position. More... | |
struct | yaml_token_s |
The token structure. More... | |
struct | yaml_event_s |
The event structure. More... | |
struct | yaml_node_pair_s |
An element of a mapping node. More... | |
struct | yaml_node_s |
The node structure. More... | |
struct | yaml_document_s |
The document 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... | |
struct | yaml_emitter_s |
The emitter structure. More... | |
+Defines | |
#define | YAML_DECLARE(type) type |
The public API declaration. | |
#define | YAML_NULL_TAG "tag:yaml.org,2002:null" |
The tag !!null with the only possible value: null . | |
#define | YAML_BOOL_TAG "tag:yaml.org,2002:bool" |
The tag !!bool with the values: true and falce . | |
#define | YAML_STR_TAG "tag:yaml.org,2002:str" |
The tag !!str for string values. | |
#define | YAML_INT_TAG "tag:yaml.org,2002:int" |
The tag !!int for integer values. | |
#define | YAML_FLOAT_TAG "tag:yaml.org,2002:float" |
The tag !!float for float values. | |
#define | YAML_TIMESTAMP_TAG "tag:yaml.org,2002:timestamp" |
The tag !!timestamp for date and time values. | |
#define | YAML_SEQ_TAG "tag:yaml.org,2002:seq" |
The tag !!seq is used to denote sequences. | |
#define | YAML_MAP_TAG "tag:yaml.org,2002:map" |
The tag !!map is used to denote mapping. | |
#define | YAML_DEFAULT_SCALAR_TAG YAML_STR_TAG |
The default scalar tag is !!str . | |
#define | YAML_DEFAULT_SEQUENCE_TAG YAML_SEQ_TAG |
The default sequence tag is !!seq . | |
#define | YAML_DEFAULT_MAPPING_TAG YAML_MAP_TAG |
The default mapping tag is !!map . | |
+Typedefs | |
typedef unsigned char | yaml_char_t |
The character type (UTF-8 octet). | |
typedef struct +yaml_version_directive_s | yaml_version_directive_t |
The version directive data. | |
typedef struct yaml_tag_directive_s | yaml_tag_directive_t |
The tag directive data. | |
typedef enum yaml_encoding_e | yaml_encoding_t |
The stream encoding. | |
typedef enum yaml_break_e | yaml_break_t |
Line break types. | |
typedef enum yaml_error_type_e | yaml_error_type_t |
Many bad things could happen with the parser and emitter. | |
typedef struct yaml_mark_s | yaml_mark_t |
The pointer position. | |
typedef enum yaml_scalar_style_e | yaml_scalar_style_t |
Scalar styles. | |
typedef enum yaml_sequence_style_e | yaml_sequence_style_t |
Sequence styles. | |
typedef enum yaml_mapping_style_e | yaml_mapping_style_t |
Mapping styles. | |
typedef enum yaml_token_type_e | yaml_token_type_t |
Token types. | |
typedef struct yaml_token_s | yaml_token_t |
The token structure. | |
typedef enum yaml_event_type_e | yaml_event_type_t |
Event types. | |
typedef struct yaml_event_s | yaml_event_t |
The event structure. | |
typedef enum yaml_node_type_e | yaml_node_type_t |
Node types. | |
typedef struct yaml_node_s | yaml_node_t |
The forward definition of a document node structure. | |
typedef int | yaml_node_item_t |
An element of a sequence node. | |
typedef struct yaml_node_pair_s | yaml_node_pair_t |
An element of a mapping node. | |
typedef struct yaml_document_s | yaml_document_t |
The document structure. | |
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 struct yaml_simple_key_s | yaml_simple_key_t |
This structure holds information about a potential simple key. | |
+typedef enum yaml_parser_state_e | yaml_parser_state_t |
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. | |
typedef int | yaml_write_handler_t (void *data, unsigned char *buffer, size_t size) |
The prototype of a write handler. | |
typedef enum yaml_emitter_state_e | yaml_emitter_state_t |
The emitter states. | |
typedef struct yaml_emitter_s | yaml_emitter_t |
The emitter structure. | |
+Enumerations | |
enum | yaml_encoding_e { + YAML_ANY_ENCODING, + + YAML_UTF8_ENCODING, + + YAML_UTF16LE_ENCODING, + + YAML_UTF16BE_ENCODING + + } |
The stream encoding. More... | |
enum | yaml_break_e { + YAML_ANY_BREAK, + + YAML_CR_BREAK, + + YAML_LN_BREAK, + + YAML_CRLN_BREAK + + } |
Line break types. More... | |
enum | yaml_error_type_e { + YAML_NO_ERROR, + + YAML_MEMORY_ERROR, + + YAML_READER_ERROR, + + YAML_SCANNER_ERROR, + + YAML_PARSER_ERROR, + + YAML_COMPOSER_ERROR, + + YAML_WRITER_ERROR, + + YAML_EMITTER_ERROR + + } |
Many bad things could happen with the parser and emitter. More... | |
enum | yaml_scalar_style_e { + YAML_ANY_SCALAR_STYLE, + + YAML_PLAIN_SCALAR_STYLE, + + YAML_SINGLE_QUOTED_SCALAR_STYLE, + + YAML_DOUBLE_QUOTED_SCALAR_STYLE, + + YAML_LITERAL_SCALAR_STYLE, + + YAML_FOLDED_SCALAR_STYLE + + } |
Scalar styles. More... | |
enum | yaml_sequence_style_e { + YAML_ANY_SEQUENCE_STYLE, + + YAML_BLOCK_SEQUENCE_STYLE, + + YAML_FLOW_SEQUENCE_STYLE + + } |
Sequence styles. More... | |
enum | yaml_mapping_style_e { + YAML_ANY_MAPPING_STYLE, + + YAML_BLOCK_MAPPING_STYLE, + + YAML_FLOW_MAPPING_STYLE + + } |
Mapping styles. More... | |
enum | yaml_token_type_e { + YAML_NO_TOKEN, + + YAML_STREAM_START_TOKEN, + + YAML_STREAM_END_TOKEN, + + YAML_VERSION_DIRECTIVE_TOKEN, + + YAML_TAG_DIRECTIVE_TOKEN, + + YAML_DOCUMENT_START_TOKEN, + + YAML_DOCUMENT_END_TOKEN, + + YAML_BLOCK_SEQUENCE_START_TOKEN, + + YAML_BLOCK_MAPPING_START_TOKEN, + + YAML_BLOCK_END_TOKEN, + + YAML_FLOW_SEQUENCE_START_TOKEN, + + YAML_FLOW_SEQUENCE_END_TOKEN, + + YAML_FLOW_MAPPING_START_TOKEN, + + YAML_FLOW_MAPPING_END_TOKEN, + + YAML_BLOCK_ENTRY_TOKEN, + + YAML_FLOW_ENTRY_TOKEN, + + YAML_KEY_TOKEN, + + YAML_VALUE_TOKEN, + + YAML_ALIAS_TOKEN, + + YAML_ANCHOR_TOKEN, + + YAML_TAG_TOKEN, + + YAML_SCALAR_TOKEN + + } |
Token types. More... | |
enum | yaml_event_type_e { + YAML_NO_EVENT, + + YAML_STREAM_START_EVENT, + + YAML_STREAM_END_EVENT, + + YAML_DOCUMENT_START_EVENT, + + YAML_DOCUMENT_END_EVENT, + + YAML_ALIAS_EVENT, + + YAML_SCALAR_EVENT, + + YAML_SEQUENCE_START_EVENT, + + YAML_SEQUENCE_END_EVENT, + + YAML_MAPPING_START_EVENT, + + YAML_MAPPING_END_EVENT + + } |
Event types. More... | |
enum | yaml_node_type_e { + YAML_NO_NODE, + + YAML_SCALAR_NODE, + + YAML_SEQUENCE_NODE, + + YAML_MAPPING_NODE + + } |
Node types. More... | |
enum | yaml_parser_state_e { + 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. More... | |
enum | yaml_emitter_state_e { + YAML_EMIT_STREAM_START_STATE, + + YAML_EMIT_FIRST_DOCUMENT_START_STATE, + + YAML_EMIT_DOCUMENT_START_STATE, + + YAML_EMIT_DOCUMENT_CONTENT_STATE, + + YAML_EMIT_DOCUMENT_END_STATE, + + YAML_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE, + + YAML_EMIT_FLOW_SEQUENCE_ITEM_STATE, + + YAML_EMIT_FLOW_MAPPING_FIRST_KEY_STATE, + + YAML_EMIT_FLOW_MAPPING_KEY_STATE, + + YAML_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE, + + YAML_EMIT_FLOW_MAPPING_VALUE_STATE, + + YAML_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE, + + YAML_EMIT_BLOCK_SEQUENCE_ITEM_STATE, + + YAML_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE, + + YAML_EMIT_BLOCK_MAPPING_KEY_STATE, + + YAML_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE, + + YAML_EMIT_BLOCK_MAPPING_VALUE_STATE, + + YAML_EMIT_END_STATE + + } |
The emitter states. More... | |
+Functions | |
const char * | yaml_get_version_string (void) |
Get the library version as a string. | |
void | yaml_get_version (int *major, int *minor, int *patch) |
Get the library version numbers. | |
void | yaml_token_delete (yaml_token_t *token) |
Free any memory allocated for a token object. | |
int | yaml_stream_start_event_initialize (yaml_event_t *event, yaml_encoding_t encoding) |
Create the STREAM-START event. | |
int | yaml_stream_end_event_initialize (yaml_event_t *event) |
Create the STREAM-END event. | |
int | yaml_document_start_event_initialize (yaml_event_t *event, yaml_version_directive_t *version_directive, yaml_tag_directive_t *tag_directives_start, yaml_tag_directive_t *tag_directives_end, int implicit) |
Create the DOCUMENT-START event. | |
int | yaml_document_end_event_initialize (yaml_event_t *event, int implicit) |
Create the DOCUMENT-END event. | |
int | yaml_alias_event_initialize (yaml_event_t *event, yaml_char_t *anchor) |
Create an ALIAS event. | |
int | yaml_scalar_event_initialize (yaml_event_t *event, yaml_char_t *anchor, yaml_char_t *tag, yaml_char_t *value, int length, int plain_implicit, int quoted_implicit, yaml_scalar_style_t style) |
Create a SCALAR event. | |
int | yaml_sequence_start_event_initialize (yaml_event_t *event, yaml_char_t *anchor, yaml_char_t *tag, int implicit, yaml_sequence_style_t style) |
Create a SEQUENCE-START event. | |
int | yaml_sequence_end_event_initialize (yaml_event_t *event) |
Create a SEQUENCE-END event. | |
int | yaml_mapping_start_event_initialize (yaml_event_t *event, yaml_char_t *anchor, yaml_char_t *tag, int implicit, yaml_mapping_style_t style) |
Create a MAPPING-START event. | |
int | yaml_mapping_end_event_initialize (yaml_event_t *event) |
Create a MAPPING-END event. | |
void | yaml_event_delete (yaml_event_t *event) |
Free any memory allocated for an event object. | |
int | yaml_document_initialize (yaml_document_t *document, yaml_version_directive_t *version_directive, yaml_tag_directive_t *tag_directives_start, yaml_tag_directive_t *tag_directives_end, int start_implicit, int end_implicit) |
Create a YAML document. | |
void | yaml_document_delete (yaml_document_t *document) |
Delete a YAML document and all its nodes. | |
yaml_node_t * | yaml_document_get_node (yaml_document_t *document, int index) |
Get a node of a YAML document. | |
yaml_node_t * | yaml_document_get_root_node (yaml_document_t *document) |
Get the root of a YAML document node. | |
int | yaml_document_add_scalar (yaml_document_t *document, yaml_char_t *tag, yaml_char_t *value, int length, yaml_scalar_style_t style) |
Create a SCALAR node and attach it to the document. | |
int | yaml_document_add_sequence (yaml_document_t *document, yaml_char_t *tag, yaml_sequence_style_t style) |
Create a SEQUENCE node and attach it to the document. | |
int | yaml_document_add_mapping (yaml_document_t *document, yaml_char_t *tag, yaml_mapping_style_t style) |
Create a MAPPING node and attach it to the document. | |
int | yaml_document_append_sequence_item (yaml_document_t *document, int sequence, int item) |
Add an item to a SEQUENCE node. | |
int | yaml_document_append_mapping_pair (yaml_document_t *document, int mapping, int key, int value) |
Add a pair of a key and a value to a MAPPING node. | |
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_emitter_initialize (yaml_emitter_t *emitter) |
Initialize an emitter. | |
void | yaml_emitter_delete (yaml_emitter_t *emitter) |
Destroy an emitter. | |
void | yaml_emitter_set_output_string (yaml_emitter_t *emitter, unsigned char *output, size_t size, size_t *size_written) |
Set a string output. | |
void | yaml_emitter_set_output_file (yaml_emitter_t *emitter, FILE *file) |
Set a file output. | |
void | yaml_emitter_set_output (yaml_emitter_t *emitter, yaml_write_handler_t *handler, void *data) |
Set a generic output handler. | |
void | yaml_emitter_set_encoding (yaml_emitter_t *emitter, yaml_encoding_t encoding) |
Set the output encoding. | |
void | yaml_emitter_set_canonical (yaml_emitter_t *emitter, int canonical) |
Set if the output should be in the "canonical" format as in the YAML specification. | |
void | yaml_emitter_set_indent (yaml_emitter_t *emitter, int indent) |
Set the intendation increment. | |
void | yaml_emitter_set_width (yaml_emitter_t *emitter, int width) |
Set the preferred line width. | |
void | yaml_emitter_set_unicode (yaml_emitter_t *emitter, int unicode) |
Set if unescaped non-ASCII characters are allowed. | |
void | yaml_emitter_set_break (yaml_emitter_t *emitter, yaml_break_t line_break) |
Set the preferred line break. | |
int | yaml_emitter_emit (yaml_emitter_t *emitter, yaml_event_t *event) |
Emit an event. | |
int | yaml_emitter_open (yaml_emitter_t *emitter) |
Start a YAML stream. | |
int | yaml_emitter_close (yaml_emitter_t *emitter) |
Finish a YAML stream. | |
int | yaml_emitter_dump (yaml_emitter_t *emitter, yaml_document_t *document) |
Emit a YAML document. | |
int | yaml_emitter_flush (yaml_emitter_t *emitter) |
Flush the accumulated characters to the output. |