Ruby 2.0.0p353(2013-11-22revision43784)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

yaml.h
Go to the documentation of this file.
1
11 #ifndef YAML_H
12 #define YAML_H
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 #include <stdlib.h>
19 #include <stdio.h>
20 #include <string.h>
21
29 #ifdef _WIN32
30 # if defined(YAML_DECLARE_STATIC)
31 # define YAML_DECLARE(type) type
32 # elif defined(YAML_DECLARE_EXPORT)
33 # define YAML_DECLARE(type) __declspec(dllexport) type
34 # else
35 # define YAML_DECLARE(type) __declspec(dllimport) type
36 # endif
37 #else
38 # define YAML_DECLARE(type) type
39 #endif
40
56 YAML_DECLARE(const char *)
57 yaml_get_version_string(void);
58
67 YAML_DECLARE(void)
68 yaml_get_version(int *major, int *minor, int *patch);
69
78 typedef unsigned char yaml_char_t;
79
81 typedef struct yaml_version_directive_s {
83 int major;
85 int minor;
86 } yaml_version_directive_t;
87
89 typedef struct yaml_tag_directive_s {
91 yaml_char_t *handle;
93 yaml_char_t *prefix;
94 } yaml_tag_directive_t;
95
97 typedef enum yaml_encoding_e {
99 YAML_ANY_ENCODING,
101 YAML_UTF8_ENCODING,
103 YAML_UTF16LE_ENCODING,
105 YAML_UTF16BE_ENCODING
106 } yaml_encoding_t;
107
110 typedef enum yaml_break_e {
112 YAML_ANY_BREAK,
114 YAML_CR_BREAK,
116 YAML_LN_BREAK,
118 YAML_CRLN_BREAK
119 } yaml_break_t;
120
122 typedef enum yaml_error_type_e {
124 YAML_NO_ERROR,
125
127 YAML_MEMORY_ERROR,
128
130 YAML_READER_ERROR,
132 YAML_SCANNER_ERROR,
134 YAML_PARSER_ERROR,
136 YAML_COMPOSER_ERROR,
137
139 YAML_WRITER_ERROR,
141 YAML_EMITTER_ERROR
142 } yaml_error_type_t;
143
145 typedef struct yaml_mark_s {
147 size_t index;
148
150 size_t line;
151
153 size_t column;
154 } yaml_mark_t;
155
164 typedef enum yaml_scalar_style_e {
166 YAML_ANY_SCALAR_STYLE,
167
169 YAML_PLAIN_SCALAR_STYLE,
170
172 YAML_SINGLE_QUOTED_SCALAR_STYLE,
174 YAML_DOUBLE_QUOTED_SCALAR_STYLE,
175
177 YAML_LITERAL_SCALAR_STYLE,
179 YAML_FOLDED_SCALAR_STYLE
180 } yaml_scalar_style_t;
181
183 typedef enum yaml_sequence_style_e {
185 YAML_ANY_SEQUENCE_STYLE,
186
188 YAML_BLOCK_SEQUENCE_STYLE,
190 YAML_FLOW_SEQUENCE_STYLE
191 } yaml_sequence_style_t;
192
194 typedef enum yaml_mapping_style_e {
196 YAML_ANY_MAPPING_STYLE,
197
199 YAML_BLOCK_MAPPING_STYLE,
201 YAML_FLOW_MAPPING_STYLE
202 /* YAML_FLOW_SET_MAPPING_STYLE */
203 } yaml_mapping_style_t;
204
213 typedef enum yaml_token_type_e {
215 YAML_NO_TOKEN,
216
218 YAML_STREAM_START_TOKEN,
220 YAML_STREAM_END_TOKEN,
221
223 YAML_VERSION_DIRECTIVE_TOKEN,
225 YAML_TAG_DIRECTIVE_TOKEN,
227 YAML_DOCUMENT_START_TOKEN,
229 YAML_DOCUMENT_END_TOKEN,
230
232 YAML_BLOCK_SEQUENCE_START_TOKEN,
234 YAML_BLOCK_MAPPING_START_TOKEN,
236 YAML_BLOCK_END_TOKEN,
237
239 YAML_FLOW_SEQUENCE_START_TOKEN,
241 YAML_FLOW_SEQUENCE_END_TOKEN,
243 YAML_FLOW_MAPPING_START_TOKEN,
245 YAML_FLOW_MAPPING_END_TOKEN,
246
248 YAML_BLOCK_ENTRY_TOKEN,
250 YAML_FLOW_ENTRY_TOKEN,
252 YAML_KEY_TOKEN,
254 YAML_VALUE_TOKEN,
255
257 YAML_ALIAS_TOKEN,
259 YAML_ANCHOR_TOKEN,
261 YAML_TAG_TOKEN,
263 YAML_SCALAR_TOKEN
264 } yaml_token_type_t;
265
267 typedef struct yaml_token_s {
268
270 yaml_token_type_t type;
271
273 union {
274
276 struct {
278 yaml_encoding_t encoding;
279 } stream_start;
280
282 struct {
284 yaml_char_t *value;
285 } alias;
286
288 struct {
290 yaml_char_t *value;
291 } anchor;
292
294 struct {
296 yaml_char_t *handle;
298 yaml_char_t *suffix;
299 } tag;
300
302 struct {
304 yaml_char_t *value;
306 size_t length;
308 yaml_scalar_style_t style;
309 } scalar;
310
312 struct {
314 int major;
316 int minor;
317 } version_directive;
318
320 struct {
322 yaml_char_t *handle;
324 yaml_char_t *prefix;
325 } tag_directive;
326
327 } data;
328
330 yaml_mark_t start_mark;
332 yaml_mark_t end_mark;
333
334 } yaml_token_t;
335
342 YAML_DECLARE(void)
343 yaml_token_delete(yaml_token_t *token);
344
353 typedef enum yaml_event_type_e {
355 YAML_NO_EVENT,
356
358 YAML_STREAM_START_EVENT,
360 YAML_STREAM_END_EVENT,
361
363 YAML_DOCUMENT_START_EVENT,
365 YAML_DOCUMENT_END_EVENT,
366
368 YAML_ALIAS_EVENT,
370 YAML_SCALAR_EVENT,
371
373 YAML_SEQUENCE_START_EVENT,
375 YAML_SEQUENCE_END_EVENT,
376
378 YAML_MAPPING_START_EVENT,
380 YAML_MAPPING_END_EVENT
381 } yaml_event_type_t;
382
384 typedef struct yaml_event_s {
385
387 yaml_event_type_t type;
388
390 union {
391
393 struct {
395 yaml_encoding_t encoding;
396 } stream_start;
397
399 struct {
401 yaml_version_directive_t *version_directive;
402
404 struct {
406 yaml_tag_directive_t *start;
408 yaml_tag_directive_t *end;
409 } tag_directives;
410
412 int implicit;
413 } document_start;
414
416 struct {
418 int implicit;
419 } document_end;
420
422 struct {
424 yaml_char_t *anchor;
425 } alias;
426
428 struct {
430 yaml_char_t *anchor;
432 yaml_char_t *tag;
434 yaml_char_t *value;
436 size_t length;
438 int plain_implicit;
440 int quoted_implicit;
442 yaml_scalar_style_t style;
443 } scalar;
444
446 struct {
448 yaml_char_t *anchor;
450 yaml_char_t *tag;
452 int implicit;
454 yaml_sequence_style_t style;
455 } sequence_start;
456
458 struct {
460 yaml_char_t *anchor;
462 yaml_char_t *tag;
464 int implicit;
466 yaml_mapping_style_t style;
467 } mapping_start;
468
469 } data;
470
472 yaml_mark_t start_mark;
474 yaml_mark_t end_mark;
475
476 } yaml_event_t;
477
487 YAML_DECLARE(int)
488 yaml_stream_start_event_initialize(yaml_event_t *event,
489 yaml_encoding_t encoding);
490
499 YAML_DECLARE(int)
500 yaml_stream_end_event_initialize(yaml_event_t *event);
501
521 YAML_DECLARE(int)
522 yaml_document_start_event_initialize(yaml_event_t *event,
523 yaml_version_directive_t *version_directive,
524 yaml_tag_directive_t *tag_directives_start,
525 yaml_tag_directive_t *tag_directives_end,
526 int implicit);
527
540 YAML_DECLARE(int)
541 yaml_document_end_event_initialize(yaml_event_t *event, int implicit);
542
552 YAML_DECLARE(int)
553 yaml_alias_event_initialize(yaml_event_t *event, yaml_char_t *anchor);
554
577 YAML_DECLARE(int)
578 yaml_scalar_event_initialize(yaml_event_t *event,
579 yaml_char_t *anchor, yaml_char_t *tag,
580 yaml_char_t *value, int length,
581 int plain_implicit, int quoted_implicit,
582 yaml_scalar_style_t style);
583
600 YAML_DECLARE(int)
601 yaml_sequence_start_event_initialize(yaml_event_t *event,
602 yaml_char_t *anchor, yaml_char_t *tag, int implicit,
603 yaml_sequence_style_t style);
604
613 YAML_DECLARE(int)
614 yaml_sequence_end_event_initialize(yaml_event_t *event);
615
632 YAML_DECLARE(int)
633 yaml_mapping_start_event_initialize(yaml_event_t *event,
634 yaml_char_t *anchor, yaml_char_t *tag, int implicit,
635 yaml_mapping_style_t style);
636
645 YAML_DECLARE(int)
646 yaml_mapping_end_event_initialize(yaml_event_t *event);
647
654 YAML_DECLARE(void)
655 yaml_event_delete(yaml_event_t *event);
656
665 #define YAML_NULL_TAG "tag:yaml.org,2002:null"
666
667 #define YAML_BOOL_TAG "tag:yaml.org,2002:bool"
668
669 #define YAML_STR_TAG "tag:yaml.org,2002:str"
670
671 #define YAML_INT_TAG "tag:yaml.org,2002:int"
672
673 #define YAML_FLOAT_TAG "tag:yaml.org,2002:float"
674
675 #define YAML_TIMESTAMP_TAG "tag:yaml.org,2002:timestamp"
676
678 #define YAML_SEQ_TAG "tag:yaml.org,2002:seq"
679
680 #define YAML_MAP_TAG "tag:yaml.org,2002:map"
681
683 #define YAML_DEFAULT_SCALAR_TAG YAML_STR_TAG
684
685 #define YAML_DEFAULT_SEQUENCE_TAG YAML_SEQ_TAG
686
687 #define YAML_DEFAULT_MAPPING_TAG YAML_MAP_TAG
688
690 typedef enum yaml_node_type_e {
692 YAML_NO_NODE,
693
695 YAML_SCALAR_NODE,
697 YAML_SEQUENCE_NODE,
699 YAML_MAPPING_NODE
700 } yaml_node_type_t;
701
703 typedef struct yaml_node_s yaml_node_t;
704
706 typedef int yaml_node_item_t;
707
709 typedef struct yaml_node_pair_s {
711 int key;
713 int value;
714 } yaml_node_pair_t;
715
717 struct yaml_node_s {
718
720 yaml_node_type_t type;
721
723 yaml_char_t *tag;
724
726 union {
727
729 struct {
731 yaml_char_t *value;
733 size_t length;
735 yaml_scalar_style_t style;
736 } scalar;
737
739 struct {
741 struct {
743 yaml_node_item_t *start;
745 yaml_node_item_t *end;
747 yaml_node_item_t *top;
748 } items;
750 yaml_sequence_style_t style;
751 } sequence;
752
754 struct {
756 struct {
758 yaml_node_pair_t *start;
760 yaml_node_pair_t *end;
762 yaml_node_pair_t *top;
763 } pairs;
765 yaml_mapping_style_t style;
766 } mapping;
767
768 } data;
769
771 yaml_mark_t start_mark;
773 yaml_mark_t end_mark;
774
775 };
776
778 typedef struct yaml_document_s {
779
781 struct {
783 yaml_node_t *start;
785 yaml_node_t *end;
787 yaml_node_t *top;
788 } nodes;
789
791 yaml_version_directive_t *version_directive;
792
794 struct {
796 yaml_tag_directive_t *start;
798 yaml_tag_directive_t *end;
799 } tag_directives;
800
802 int start_implicit;
804 int end_implicit;
805
807 yaml_mark_t start_mark;
809 yaml_mark_t end_mark;
810
811 } yaml_document_t;
812
831 YAML_DECLARE(int)
832 yaml_document_initialize(yaml_document_t *document,
833 yaml_version_directive_t *version_directive,
834 yaml_tag_directive_t *tag_directives_start,
835 yaml_tag_directive_t *tag_directives_end,
836 int start_implicit, int end_implicit);
837
844 YAML_DECLARE(void)
845 yaml_document_delete(yaml_document_t *document);
846
859 YAML_DECLARE(yaml_node_t *)
860 yaml_document_get_node(yaml_document_t *document, int index);
861
878 YAML_DECLARE(yaml_node_t *)
879 yaml_document_get_root_node(yaml_document_t *document);
880
895 YAML_DECLARE(int)
896 yaml_document_add_scalar(yaml_document_t *document,
897 yaml_char_t *tag, yaml_char_t *value, int length,
898 yaml_scalar_style_t style);
899
912 YAML_DECLARE(int)
913 yaml_document_add_sequence(yaml_document_t *document,
914 yaml_char_t *tag, yaml_sequence_style_t style);
915
928 YAML_DECLARE(int)
929 yaml_document_add_mapping(yaml_document_t *document,
930 yaml_char_t *tag, yaml_mapping_style_t style);
931
942 YAML_DECLARE(int)
943 yaml_document_append_sequence_item(yaml_document_t *document,
944 int sequence, int item);
945
957 YAML_DECLARE(int)
958 yaml_document_append_mapping_pair(yaml_document_t *document,
959 int mapping, int key, int value);
960
986 typedef int yaml_read_handler_t(void *data, unsigned char *buffer, size_t size,
987 size_t *size_read);
988
993 typedef struct yaml_simple_key_s {
995 int possible;
996
998 int required;
999
1001 size_t token_number;
1002
1004 yaml_mark_t mark;
1005 } yaml_simple_key_t;
1006
1010 typedef enum yaml_parser_state_e {
1012 YAML_PARSE_STREAM_START_STATE,
1014 YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE,
1016 YAML_PARSE_DOCUMENT_START_STATE,
1018 YAML_PARSE_DOCUMENT_CONTENT_STATE,
1020 YAML_PARSE_DOCUMENT_END_STATE,
1022 YAML_PARSE_BLOCK_NODE_STATE,
1024 YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE,
1026 YAML_PARSE_FLOW_NODE_STATE,
1028 YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE,
1030 YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE,
1032 YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE,
1034 YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE,
1036 YAML_PARSE_BLOCK_MAPPING_KEY_STATE,
1038 YAML_PARSE_BLOCK_MAPPING_VALUE_STATE,
1040 YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE,
1042 YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE,
1044 YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE,
1046 YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE,
1048 YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE,
1050 YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE,
1052 YAML_PARSE_FLOW_MAPPING_KEY_STATE,
1054 YAML_PARSE_FLOW_MAPPING_VALUE_STATE,
1056 YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE,
1058 YAML_PARSE_END_STATE
1059 } yaml_parser_state_t;
1060
1065 typedef struct yaml_alias_data_s {
1067 yaml_char_t *anchor;
1069 int index;
1071 yaml_mark_t mark;
1072 } yaml_alias_data_t;
1073
1081 typedef struct yaml_parser_s {
1082
1089 yaml_error_type_t error;
1091 const char *problem;
1093 size_t problem_offset;
1095 int problem_value;
1097 yaml_mark_t problem_mark;
1099 const char *context;
1101 yaml_mark_t context_mark;
1102
1113 yaml_read_handler_t *read_handler;
1114
1116 void *read_handler_data;
1117
1119 union {
1121 struct {
1123 const unsigned char *start;
1125 const unsigned char *end;
1127 const unsigned char *current;
1128 } string;
1129
1131 FILE *file;
1132 } input;
1133
1135 int eof;
1136
1138 struct {
1140 yaml_char_t *start;
1142 yaml_char_t *end;
1144 yaml_char_t *pointer;
1146 yaml_char_t *last;
1147 } buffer;
1148
1149 /* The number of unread characters in the buffer. */
1150 size_t unread;
1151
1153 struct {
1155 unsigned char *start;
1157 unsigned char *end;
1159 unsigned char *pointer;
1161 unsigned char *last;
1162 } raw_buffer;
1163
1165 yaml_encoding_t encoding;
1166
1168 size_t offset;
1169
1171 yaml_mark_t mark;
1172
1183 int stream_start_produced;
1184
1186 int stream_end_produced;
1187
1189 int flow_level;
1190
1192 struct {
1194 yaml_token_t *start;
1196 yaml_token_t *end;
1198 yaml_token_t *head;
1200 yaml_token_t *tail;
1201 } tokens;
1202
1204 size_t tokens_parsed;
1205
1206 /* Does the tokens queue contain a token ready for dequeueing. */
1207 int token_available;
1208
1210 struct {
1212 int *start;
1214 int *end;
1216 int *top;
1217 } indents;
1218
1220 int indent;
1221
1223 int simple_key_allowed;
1224
1226 struct {
1228 yaml_simple_key_t *start;
1230 yaml_simple_key_t *end;
1232 yaml_simple_key_t *top;
1233 } simple_keys;
1234
1245 struct {
1247 yaml_parser_state_t *start;
1249 yaml_parser_state_t *end;
1251 yaml_parser_state_t *top;
1252 } states;
1253
1255 yaml_parser_state_t state;
1256
1258 struct {
1260 yaml_mark_t *start;
1262 yaml_mark_t *end;
1264 yaml_mark_t *top;
1265 } marks;
1266
1268 struct {
1270 yaml_tag_directive_t *start;
1272 yaml_tag_directive_t *end;
1274 yaml_tag_directive_t *top;
1275 } tag_directives;
1276
1287 struct {
1289 yaml_alias_data_t *start;
1291 yaml_alias_data_t *end;
1293 yaml_alias_data_t *top;
1294 } aliases;
1295
1297 yaml_document_t *document;
1298
1303 } yaml_parser_t;
1304
1316 YAML_DECLARE(int)
1317 yaml_parser_initialize(yaml_parser_t *parser);
1318
1325 YAML_DECLARE(void)
1326 yaml_parser_delete(yaml_parser_t *parser);
1327
1340 YAML_DECLARE(void)
1341 yaml_parser_set_input_string(yaml_parser_t *parser,
1342 const unsigned char *input, size_t size);
1343
1354 YAML_DECLARE(void)
1355 yaml_parser_set_input_file(yaml_parser_t *parser, FILE *file);
1356
1366 YAML_DECLARE(void)
1367 yaml_parser_set_input(yaml_parser_t *parser,
1368 yaml_read_handler_t *handler, void *data);
1369
1377 YAML_DECLARE(void)
1378 yaml_parser_set_encoding(yaml_parser_t *parser, yaml_encoding_t encoding);
1379
1401 YAML_DECLARE(int)
1402 yaml_parser_scan(yaml_parser_t *parser, yaml_token_t *token);
1403
1425 YAML_DECLARE(int)
1426 yaml_parser_parse(yaml_parser_t *parser, yaml_event_t *event);
1427
1450 YAML_DECLARE(int)
1451 yaml_parser_load(yaml_parser_t *parser, yaml_document_t *document);
1452
1476 typedef int yaml_write_handler_t(void *data, unsigned char *buffer, size_t size);
1477
1479 typedef enum yaml_emitter_state_e {
1481 YAML_EMIT_STREAM_START_STATE,
1483 YAML_EMIT_FIRST_DOCUMENT_START_STATE,
1485 YAML_EMIT_DOCUMENT_START_STATE,
1487 YAML_EMIT_DOCUMENT_CONTENT_STATE,
1489 YAML_EMIT_DOCUMENT_END_STATE,
1491 YAML_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE,
1493 YAML_EMIT_FLOW_SEQUENCE_ITEM_STATE,
1495 YAML_EMIT_FLOW_MAPPING_FIRST_KEY_STATE,
1497 YAML_EMIT_FLOW_MAPPING_KEY_STATE,
1499 YAML_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE,
1501 YAML_EMIT_FLOW_MAPPING_VALUE_STATE,
1503 YAML_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE,
1505 YAML_EMIT_BLOCK_SEQUENCE_ITEM_STATE,
1507 YAML_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE,
1509 YAML_EMIT_BLOCK_MAPPING_KEY_STATE,
1511 YAML_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE,
1513 YAML_EMIT_BLOCK_MAPPING_VALUE_STATE,
1515 YAML_EMIT_END_STATE
1516 } yaml_emitter_state_t;
1517
1525 typedef struct yaml_emitter_s {
1526
1533 yaml_error_type_t error;
1535 const char *problem;
1536
1547 yaml_write_handler_t *write_handler;
1548
1550 void *write_handler_data;
1551
1553 union {
1555 struct {
1557 unsigned char *buffer;
1559 size_t size;
1561 size_t *size_written;
1562 } string;
1563
1565 FILE *file;
1566 } output;
1567
1569 struct {
1571 yaml_char_t *start;
1573 yaml_char_t *end;
1575 yaml_char_t *pointer;
1577 yaml_char_t *last;
1578 } buffer;
1579
1581 struct {
1583 unsigned char *start;
1585 unsigned char *end;
1587 unsigned char *pointer;
1589 unsigned char *last;
1590 } raw_buffer;
1591
1593 yaml_encoding_t encoding;
1594
1605 int canonical;
1607 int best_indent;
1609 int best_width;
1611 int unicode;
1613 yaml_break_t line_break;
1614
1616 struct {
1618 yaml_emitter_state_t *start;
1620 yaml_emitter_state_t *end;
1622 yaml_emitter_state_t *top;
1623 } states;
1624
1626 yaml_emitter_state_t state;
1627
1629 struct {
1631 yaml_event_t *start;
1633 yaml_event_t *end;
1635 yaml_event_t *head;
1637 yaml_event_t *tail;
1638 } events;
1639
1641 struct {
1643 int *start;
1645 int *end;
1647 int *top;
1648 } indents;
1649
1651 struct {
1653 yaml_tag_directive_t *start;
1655 yaml_tag_directive_t *end;
1657 yaml_tag_directive_t *top;
1658 } tag_directives;
1659
1661 int indent;
1662
1664 int flow_level;
1665
1667 int root_context;
1669 int sequence_context;
1671 int mapping_context;
1673 int simple_key_context;
1674
1676 int line;
1678 int column;
1680 int whitespace;
1682 int indention;
1684 int open_ended;
1685
1687 struct {
1689 yaml_char_t *anchor;
1691 size_t anchor_length;
1693 int alias;
1694 } anchor_data;
1695
1697 struct {
1699 yaml_char_t *handle;
1701 size_t handle_length;
1703 yaml_char_t *suffix;
1705 size_t suffix_length;
1706 } tag_data;
1707
1709 struct {
1711 yaml_char_t *value;
1713 size_t length;
1715 int multiline;
1717 int flow_plain_allowed;
1719 int block_plain_allowed;
1721 int single_quoted_allowed;
1723 int block_allowed;
1725 yaml_scalar_style_t style;
1726 } scalar_data;
1727
1738 int opened;
1740 int closed;
1741
1743 struct {
1745 int references;
1747 int anchor;
1749 int serialized;
1750 } *anchors;
1751
1753 int last_anchor_id;
1754
1756 yaml_document_t *document;
1757
1762 } yaml_emitter_t;
1763
1775 YAML_DECLARE(int)
1776 yaml_emitter_initialize(yaml_emitter_t *emitter);
1777
1784 YAML_DECLARE(void)
1785 yaml_emitter_delete(yaml_emitter_t *emitter);
1786
1802 YAML_DECLARE(void)
1803 yaml_emitter_set_output_string(yaml_emitter_t *emitter,
1804 unsigned char *output, size_t size, size_t *size_written);
1805
1816 YAML_DECLARE(void)
1817 yaml_emitter_set_output_file(yaml_emitter_t *emitter, FILE *file);
1818
1828 YAML_DECLARE(void)
1829 yaml_emitter_set_output(yaml_emitter_t *emitter,
1830 yaml_write_handler_t *handler, void *data);
1831
1839 YAML_DECLARE(void)
1840 yaml_emitter_set_encoding(yaml_emitter_t *emitter, yaml_encoding_t encoding);
1841
1850 YAML_DECLARE(void)
1851 yaml_emitter_set_canonical(yaml_emitter_t *emitter, int canonical);
1852
1860 YAML_DECLARE(void)
1861 yaml_emitter_set_indent(yaml_emitter_t *emitter, int indent);
1862
1870 YAML_DECLARE(void)
1871 yaml_emitter_set_width(yaml_emitter_t *emitter, int width);
1872
1880 YAML_DECLARE(void)
1881 yaml_emitter_set_unicode(yaml_emitter_t *emitter, int unicode);
1882
1890 YAML_DECLARE(void)
1891 yaml_emitter_set_break(yaml_emitter_t *emitter, yaml_break_t line_break);
1892
1907 YAML_DECLARE(int)
1908 yaml_emitter_emit(yaml_emitter_t *emitter, yaml_event_t *event);
1909
1920 YAML_DECLARE(int)
1921 yaml_emitter_open(yaml_emitter_t *emitter);
1922
1933 YAML_DECLARE(int)
1934 yaml_emitter_close(yaml_emitter_t *emitter);
1935
1950 YAML_DECLARE(int)
1951 yaml_emitter_dump(yaml_emitter_t *emitter, yaml_document_t *document);
1952
1961 YAML_DECLARE(int)
1962 yaml_emitter_flush(yaml_emitter_t *emitter);
1963
1966 #ifdef __cplusplus
1967 }
1968 #endif
1969
1970 #endif /* #ifndef YAML_H */
1971
yaml_token_s::tag_directive
struct yaml_token_s::@12::@19 tag_directive
The tag directive (for YAML_TAG_DIRECTIVE_TOKEN).
data
VALUE data
Definition: tcltklib.c:3368
YAML_ANY_SEQUENCE_STYLE
Let the emitter choose the style.
Definition: yaml.h:185
yaml_token_s::style
yaml_scalar_style_t style
The scalar style.
Definition: yaml.h:308
YAML_DOUBLE_QUOTED_SCALAR_STYLE
The double-quoted scalar style.
Definition: yaml.h:174
yaml_node_s::data
union yaml_node_s::@29 data
The node data.
yaml_event_s::start
yaml_tag_directive_t * start
The beginning of the tag directives list.
Definition: yaml.h:406
YAML_LN_BREAK
Use LN for line breaks (Unix style).
Definition: yaml.h:116
yaml_emitter_s::buffer
unsigned char * buffer
The buffer pointer.
Definition: yaml.h:1557
yaml_token_s::anchor
struct yaml_token_s::@12::@15 anchor
The anchor (for YAML_ANCHOR_TOKEN).
yaml_emitter_s::anchor_length
size_t anchor_length
The anchor length.
Definition: yaml.h:1691
yaml_emitter_s::write_handler_data
void * write_handler_data
A pointer for passing to the white handler.
Definition: yaml.h:1550
YAML_EMIT_STREAM_START_STATE
Expect STREAM-START.
Definition: yaml.h:1481
YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE
Expect an entry of a flow sequence.
Definition: yaml.h:1042
yaml_emitter_s::last
yaml_char_t * last
The last filled position of the buffer.
Definition: yaml.h:1577
yaml_parser_s::last
yaml_char_t * last
The last filled position of the buffer.
Definition: yaml.h:1146
yaml_alias_data_s::mark
yaml_mark_t mark
The anchor mark.
Definition: yaml.h:1071
yaml_token_s::suffix
yaml_char_t * suffix
The tag suffix.
Definition: yaml.h:298
YAML_BLOCK_MAPPING_STYLE
The block mapping style.
Definition: yaml.h:199
yaml_stream_end_event_initialize
yaml_stream_end_event_initialize(yaml_event_t *event)
Create the STREAM-END event.
Definition: api.c:680
yaml_break_e
yaml_break_e
Line break types.
Definition: yaml.h:110
YAML_BLOCK_SEQUENCE_START_TOKEN
A BLOCK-SEQUENCE-START token.
Definition: yaml.h:232
yaml_parser_parse
yaml_parser_parse(yaml_parser_t *parser, yaml_event_t *event)
Parse the input stream and produce the next parsing event.
Definition: parser.c:170
yaml_node_s::end
yaml_node_pair_t * end
The end of the stack.
Definition: yaml.h:760
yaml_mark_s
The pointer position.
Definition: yaml.h:145
yaml_event_s
The event structure.
Definition: yaml.h:384
YAML_PARSE_DOCUMENT_START_STATE
Expect DOCUMENT-START.
Definition: yaml.h:1016
yaml_event_delete
yaml_event_delete(yaml_event_t *event)
Free any memory allocated for an event object.
Definition: api.c:979
yaml_document_s::version_directive
yaml_version_directive_t * version_directive
The version directive.
Definition: yaml.h:791
YAML_EMIT_DOCUMENT_START_STATE
Expect DOCUMENT-START or STREAM-END.
Definition: yaml.h:1485
yaml_emitter_s::canonical
int canonical
If the output is in the canonical style?
Definition: yaml.h:1605
yaml_parser_s::end
yaml_alias_data_t * end
The end of the list.
Definition: yaml.h:1291
yaml_parser_s::tail
yaml_token_t * tail
The tail of the tokens queue.
Definition: yaml.h:1200
minor
int minor
Definition: tcltklib.c:110
yaml_parser_s::start
yaml_tag_directive_t * start
The beginning of the list.
Definition: yaml.h:1270
yaml_parser_s::buffer
struct yaml_parser_s::@38 buffer
The working buffer.
yaml_parser_s::current
const unsigned char * current
The string current position.
Definition: yaml.h:1127
yaml_document_add_mapping
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.
Definition: api.c:1289
yaml_document_s::end_implicit
int end_implicit
Is the document end indicator implicit?
Definition: yaml.h:804
yaml_alias_data_t
struct yaml_alias_data_s yaml_alias_data_t
This structure holds aliases data.
yaml_emitter_s::root_context
int root_context
Is it the document root context?
Definition: yaml.h:1667
yaml_encoding_t
enum yaml_encoding_e yaml_encoding_t
The stream encoding.
yaml_emitter_s::end
yaml_char_t * end
The end of the buffer.
Definition: yaml.h:1573
yaml_token_s::version_directive
struct yaml_token_s::@12::@18 version_directive
The version directive (for YAML_VERSION_DIRECTIVE_TOKEN).
yaml_emitter_s::anchor_data
struct yaml_emitter_s::@55 anchor_data
Anchor analysis.
yaml_node_s::start_mark
yaml_mark_t start_mark
The beginning of the node.
Definition: yaml.h:771
YAML_EMIT_BLOCK_SEQUENCE_ITEM_STATE
Expect an item of a block sequence.
Definition: yaml.h:1505
YAML_UTF16BE_ENCODING
The UTF-16-BE encoding with BOM.
Definition: yaml.h:105
yaml_parser_set_encoding
yaml_parser_set_encoding(yaml_parser_t *parser, yaml_encoding_t encoding)
Set the source encoding.
Definition: api.c:336
YAML_FLOW_SEQUENCE_START_TOKEN
A FLOW-SEQUENCE-START token.
Definition: yaml.h:239
YAML_VALUE_TOKEN
A VALUE token.
Definition: yaml.h:254
YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE
Expect the first key of a block mapping.
Definition: yaml.h:1034
yaml_emitter_s::sequence_context
int sequence_context
Is it a sequence context?
Definition: yaml.h:1669
yaml_emitter_s::last_anchor_id
int last_anchor_id
The last assigned anchor id.
Definition: yaml.h:1753
YAML_SEQUENCE_START_EVENT
A SEQUENCE-START event.
Definition: yaml.h:373
yaml_token_t
struct yaml_token_s yaml_token_t
The token structure.
YAML_COMPOSER_ERROR
Cannot compose a YAML document.
Definition: yaml.h:136
yaml_sequence_style_t
enum yaml_sequence_style_e yaml_sequence_style_t
Sequence styles.
YAML_CRLN_BREAK
Use CR LN for line breaks (DOS style).
Definition: yaml.h:118
YAML_EMIT_BLOCK_MAPPING_VALUE_STATE
Expect a value of a block mapping.
Definition: yaml.h:1513
yaml_event_s::document_start
struct yaml_event_s::@20::@22 document_start
The document parameters (for YAML_DOCUMENT_START_EVENT).
YAML_MEMORY_ERROR
Cannot allocate or reallocate a block of memory.
Definition: yaml.h:127
yaml_parser_s::top
yaml_alias_data_t * top
The top of the list.
Definition: yaml.h:1293
yaml_token_s::end_mark
yaml_mark_t end_mark
The end of the token.
Definition: yaml.h:332
YAML_EMIT_DOCUMENT_CONTENT_STATE
Expect the content of a document.
Definition: yaml.h:1487
YAML_BLOCK_END_TOKEN
A BLOCK-END token.
Definition: yaml.h:236
yaml_scalar_event_initialize
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.
Definition: api.c:815
yaml_emitter_s::document
yaml_document_t * document
The currently emitted document.
Definition: yaml.h:1756
yaml_parser_s::tokens
struct yaml_parser_s::@40 tokens
The tokens queue.
yaml_parser_s::stream_start_produced
int stream_start_produced
Have we started to scan the input stream?
Definition: yaml.h:1183
yaml_parser_set_input_string
yaml_parser_set_input_string(yaml_parser_t *parser, const unsigned char *input, size_t size)
Set a string input.
Definition: api.c:283
yaml_parser_s::problem_value
int problem_value
The problematic value (-1 is none).
Definition: yaml.h:1095
yaml_write_handler_t
int yaml_write_handler_t(void *data, unsigned char *buffer, size_t size)
The prototype of a write handler.
Definition: yaml.h:1476
YAML_MAPPING_START_EVENT
A MAPPING-START event.
Definition: yaml.h:378
yaml_event_s::tag_directives
struct yaml_event_s::@20::@22::@28 tag_directives
The list of tag directives.
yaml_parser_s::unread
size_t unread
Definition: yaml.h:1150
yaml_emitter_s::handle_length
size_t handle_length
The tag handle length.
Definition: yaml.h:1701
yaml_parser_s::encoding
yaml_encoding_t encoding
The input encoding.
Definition: yaml.h:1165
yaml_parser_s::end
const unsigned char * end
The string end pointer.
Definition: yaml.h:1125
yaml_node_type_t
enum yaml_node_type_e yaml_node_type_t
Node types.
yaml_node_s::start
yaml_node_pair_t * start
The beginning of the stack.
Definition: yaml.h:758
yaml_parser_s
The parser structure.
Definition: yaml.h:1081
YAML_EMIT_FLOW_MAPPING_KEY_STATE
Expect a key of a flow mapping.
Definition: yaml.h:1497
YAML_BLOCK_MAPPING_START_TOKEN
A BLOCK-SEQUENCE-END token.
Definition: yaml.h:234
yaml_emitter_set_output
yaml_emitter_set_output(yaml_emitter_t *emitter, yaml_write_handler_t *handler, void *data)
Set a generic output handler.
Definition: api.c:489
YAML_SCALAR_NODE
A scalar node.
Definition: yaml.h:695
yaml_document_s::end
yaml_node_t * end
The end of the stack.
Definition: yaml.h:785
yaml_mapping_style_e
yaml_mapping_style_e
Mapping styles.
Definition: yaml.h:194
yaml_read_handler_t
int yaml_read_handler_t(void *data, unsigned char *buffer, size_t size, size_t *size_read)
The prototype of a read handler.
Definition: yaml.h:986
yaml_parser_s::read_handler_data
void * read_handler_data
A pointer for passing to the read handler.
Definition: yaml.h:1116
yaml_parser_s::state
yaml_parser_state_t state
The current parser state.
Definition: yaml.h:1255
yaml_node_s::type
yaml_node_type_t type
The node type.
Definition: yaml.h:720
yaml_token_s::handle
yaml_char_t * handle
The tag handle.
Definition: yaml.h:296
YAML_FLOW_ENTRY_TOKEN
A FLOW-ENTRY token.
Definition: yaml.h:250
yaml_parser_s::start
yaml_char_t * start
The beginning of the buffer.
Definition: yaml.h:1140
yaml_emitter_s::suffix
yaml_char_t * suffix
The tag suffix.
Definition: yaml.h:1703
yaml_event_s::end_mark
yaml_mark_t end_mark
The end of the event.
Definition: yaml.h:474
yaml_node_s::mapping
struct yaml_node_s::@29::@32 mapping
The mapping parameters (for YAML_MAPPING_NODE).
yaml_event_s::anchor
yaml_char_t * anchor
The anchor.
Definition: yaml.h:424
yaml_emitter_s::start
yaml_event_t * start
The beginning of the event queue.
Definition: yaml.h:1631
YAML_EMIT_BLOCK_MAPPING_KEY_STATE
Expect the key of a block mapping.
Definition: yaml.h:1509
yaml_parser_s::end
yaml_simple_key_t * end
The end of the stack.
Definition: yaml.h:1230
yaml_parser_s::input
union yaml_parser_s::@37 input
Standard (string or file) input data.
yaml_char_t
unsigned char yaml_char_t
The character type (UTF-8 octet).
Definition: yaml.h:78
yaml_emitter_s::flow_level
int flow_level
The current flow level.
Definition: yaml.h:1664
YAML_ANY_ENCODING
Let the parser choose the encoding.
Definition: yaml.h:99
yaml_emitter_s::scalar_data
struct yaml_emitter_s::@57 scalar_data
Scalar analysis.
yaml_parser_s::start
const unsigned char * start
The string start pointer.
Definition: yaml.h:1123
yaml_version_directive_s
The version directive data.
Definition: yaml.h:81
index
int index
Definition: tcltklib.c:4478
yaml_emitter_s::start
yaml_char_t * start
The beginning of the buffer.
Definition: yaml.h:1571
yaml_parser_delete
yaml_parser_delete(yaml_parser_t *parser)
Destroy a parser.
Definition: api.c:214
yaml_parser_s::context
const char * context
The error context.
Definition: yaml.h:1099
yaml_encoding_e
yaml_encoding_e
The stream encoding.
Definition: yaml.h:97
yaml_simple_key_s::mark
yaml_mark_t mark
The position mark.
Definition: yaml.h:1004
yaml_emitter_s::whitespace
int whitespace
If the last character was a whitespace?
Definition: yaml.h:1680
yaml_emitter_s::pointer
unsigned char * pointer
The current position of the buffer.
Definition: yaml.h:1587
YAML_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE
Expect a value for a simple key of a block mapping.
Definition: yaml.h:1511
YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE
Expect a key of an ordered mapping.
Definition: yaml.h:1044
yaml_token_s::alias
struct yaml_token_s::@12::@14 alias
The alias (for YAML_ALIAS_TOKEN).
yaml_emitter_s::open_ended
int open_ended
If an explicit document end is required?
Definition: yaml.h:1684
yaml_tag_directive_s::prefix
yaml_char_t * prefix
The tag prefix.
Definition: yaml.h:93
yaml_token_s::data
union yaml_token_s::@12 data
The token data.
yaml_sequence_style_e
yaml_sequence_style_e
Sequence styles.
Definition: yaml.h:183
yaml_stream_start_event_initialize
yaml_stream_start_event_initialize(yaml_event_t *event, yaml_encoding_t encoding)
Create the STREAM-START event.
Definition: api.c:663
yaml_emitter_s::top
yaml_tag_directive_t * top
The top of the list.
Definition: yaml.h:1657
yaml_emitter_s::length
size_t length
The scalar length.
Definition: yaml.h:1713
yaml_emitter_s::references
int references
The number of references.
Definition: yaml.h:1745
yaml_parser_s::indent
int indent
The current indentation level.
Definition: yaml.h:1220
yaml_emitter_set_break
yaml_emitter_set_break(yaml_emitter_t *emitter, yaml_break_t line_break)
Set the preferred line break.
Definition: api.c:566
YAML_EMIT_DOCUMENT_END_STATE
Expect DOCUMENT-END.
Definition: yaml.h:1489
yaml_parser_t
struct yaml_parser_s yaml_parser_t
The parser structure.
YAML_EMIT_FLOW_MAPPING_FIRST_KEY_STATE
Expect the first key of a flow mapping.
Definition: yaml.h:1495
yaml_alias_event_initialize
yaml_alias_event_initialize(yaml_event_t *event, yaml_char_t *anchor)
Create an ALIAS event.
Definition: api.c:791
yaml_token_s::minor
int minor
The minor version number.
Definition: yaml.h:316
yaml_node_pair_s
An element of a mapping node.
Definition: yaml.h:709
yaml_token_s::major
int major
The major version number.
Definition: yaml.h:314
yaml_event_s::tag
yaml_char_t * tag
The tag.
Definition: yaml.h:432
yaml_tag_directive_t
struct yaml_tag_directive_s yaml_tag_directive_t
The tag directive data.
yaml_emitter_s::head
yaml_event_t * head
The head of the event queue.
Definition: yaml.h:1635
yaml_emitter_s::column
int column
The current column.
Definition: yaml.h:1678
yaml_emitter_s::error
yaml_error_type_t error
Error type.
Definition: yaml.h:1533
yaml_document_delete
yaml_document_delete(yaml_document_t *document)
Delete a YAML document and all its nodes.
Definition: api.c:1117
yaml_emitter_s::start
yaml_tag_directive_t * start
The beginning of the list.
Definition: yaml.h:1653
yaml_parser_s::pointer
yaml_char_t * pointer
The current position of the buffer.
Definition: yaml.h:1144
yaml_node_item_t
int yaml_node_item_t
An element of a sequence node.
Definition: yaml.h:706
YAML_ALIAS_TOKEN
An ALIAS token.
Definition: yaml.h:257
yaml_emitter_emit
yaml_emitter_emit(yaml_emitter_t *emitter, yaml_event_t *event)
Emit an event.
Definition: emitter.c:281
yaml_document_append_mapping_pair
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.
Definition: api.c:1362
yaml_node_pair_t
struct yaml_node_pair_s yaml_node_pair_t
An element of a mapping node.
yaml_parser_s::end
yaml_parser_state_t * end
The end of the stack.
Definition: yaml.h:1249
yaml_parser_s::mark
yaml_mark_t mark
The mark of the current position.
Definition: yaml.h:1171
yaml_event_s::end
yaml_tag_directive_t * end
The end of the tag directives list.
Definition: yaml.h:408
yaml_simple_key_t
struct yaml_simple_key_s yaml_simple_key_t
This structure holds information about a potential simple key.
YAML_ANY_BREAK
Let the parser choose the break type.
Definition: yaml.h:112
YAML_UTF16LE_ENCODING
The UTF-16-LE encoding with BOM.
Definition: yaml.h:103
yaml_node_s
The node structure.
Definition: yaml.h:717
yaml_emitter_s::size_written
size_t * size_written
The number of written bytes.
Definition: yaml.h:1561
yaml_node_s::pairs
struct yaml_node_s::@29::@32::@34 pairs
The stack of mapping pairs (key, value).
yaml_parser_s::read_handler
yaml_read_handler_t * read_handler
Read handler.
Definition: yaml.h:1113
yaml_document_append_sequence_item
yaml_document_append_sequence_item(yaml_document_t *document, int sequence, int item)
Add an item to a SEQUENCE node.
Definition: api.c:1334
__sFILE
Definition: vsnprintf.c:175
yaml_alias_data_s::anchor
yaml_char_t * anchor
The anchor.
Definition: yaml.h:1067
YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE
Expect the beginning of an implicit document.
Definition: yaml.h:1014
YAML_FLOW_SEQUENCE_END_TOKEN
A FLOW-SEQUENCE-END token.
Definition: yaml.h:241
yaml_emitter_s::top
yaml_emitter_state_t * top
The top of the stack.
Definition: yaml.h:1622
yaml_parser_s::top
yaml_mark_t * top
The top of the stack.
Definition: yaml.h:1264
yaml_get_version_string
yaml_get_version_string(void)
Get the library version as a string.
Definition: api.c:9
output
static unsigned char * output
Definition: nkf.c:32
yaml_emitter_s::indent
int indent
The current indentation level.
Definition: yaml.h:1661
yaml_parser_s::token_available
int token_available
Definition: yaml.h:1207
YAML_PARSE_DOCUMENT_CONTENT_STATE
Expect the content of a document.
Definition: yaml.h:1018
yaml_emitter_s::alias
int alias
Is it an alias?
Definition: yaml.h:1693
yaml_node_pair_s::key
int key
The key of the element.
Definition: yaml.h:711
yaml_parser_s::start
int * start
The beginning of the stack.
Definition: yaml.h:1212
yaml_event_s::style
yaml_scalar_style_t style
The scalar style.
Definition: yaml.h:442
yaml_emitter_state_e
yaml_emitter_state_e
The emitter states.
Definition: yaml.h:1479
YAML_FOLDED_SCALAR_STYLE
The folded scalar style.
Definition: yaml.h:179
yaml_emitter_s::file
FILE * file
File output data.
Definition: yaml.h:1565
yaml_emitter_s::indention
int indention
If the last character was an indentation character (&#39; &#39;, &#39;-&#39;, &#39;?&#39;, &#39;:&#39;)?
Definition: yaml.h:1682
yaml_emitter_s::state
yaml_emitter_state_t state
The current emitter state.
Definition: yaml.h:1626
yaml_parser_state_e
yaml_parser_state_e
The states of the parser.
Definition: yaml.h:1010
yaml_parser_s::top
int * top
The top of the stack.
Definition: yaml.h:1216
input
unsigned int input
Definition: nkf.c:4311
YAML_CR_BREAK
Use CR for line breaks (Mac style).
Definition: yaml.h:114
yaml_emitter_s::flow_plain_allowed
int flow_plain_allowed
Can the scalar be expessed in the flow plain style?
Definition: yaml.h:1717
yaml_parser_s::aliases
struct yaml_parser_s::@46 aliases
The alias data.
yaml_simple_key_s::required
int required
Is a simple key required?
Definition: yaml.h:998
YAML_VERSION_DIRECTIVE_TOKEN
A VERSION-DIRECTIVE token.
Definition: yaml.h:223
yaml_parser_s::end
yaml_tag_directive_t * end
The end of the list.
Definition: yaml.h:1272
yaml_emitter_s
The emitter structure.
Definition: yaml.h:1525
yaml_parser_s::end
yaml_char_t * end
The end of the buffer.
Definition: yaml.h:1142
yaml_emitter_set_encoding
yaml_emitter_set_encoding(yaml_emitter_t *emitter, yaml_encoding_t encoding)
Set the output encoding.
Definition: api.c:505
yaml_error_type_t
enum yaml_error_type_e yaml_error_type_t
Many bad things could happen with the parser and emitter.
yaml_emitter_s::raw_buffer
struct yaml_emitter_s::@50 raw_buffer
The raw buffer.
canonical
static VALUE canonical(VALUE self)
Definition: psych_emitter.c:446
yaml_node_s::style
yaml_scalar_style_t style
The scalar style.
Definition: yaml.h:735
yaml_parser_s::simple_key_allowed
int simple_key_allowed
May a simple key occur at the current position?
Definition: yaml.h:1223
yaml_emitter_s::size
size_t size
The buffer size.
Definition: yaml.h:1559
yaml_alias_data_s::index
int index
The node id.
Definition: yaml.h:1069
YAML_READER_ERROR
Cannot read or decode the input stream.
Definition: yaml.h:130
YAML_MAPPING_NODE
A mapping node.
Definition: yaml.h:699
yaml_emitter_close
yaml_emitter_close(yaml_emitter_t *emitter)
Finish a YAML stream.
Definition: dumper.c:86
yaml_version_directive_s::major
int major
The major version number.
Definition: yaml.h:83
YAML_TAG_TOKEN
A TAG token.
Definition: yaml.h:261
YAML_STREAM_START_TOKEN
A STREAM-START token.
Definition: yaml.h:218
yaml_parser_s::stream_end_produced
int stream_end_produced
Have we reached the end of the input stream?
Definition: yaml.h:1186
yaml_emitter_set_output_string
yaml_emitter_set_output_string(yaml_emitter_t *emitter, unsigned char *output, size_t size, size_t *size_written)
Set a string output.
Definition: api.c:451
yaml_node_s::tag
yaml_char_t * tag
The node tag.
Definition: yaml.h:723
yaml_parser_s::start
yaml_alias_data_t * start
The beginning of the list.
Definition: yaml.h:1289
yaml_scalar_style_t
enum yaml_scalar_style_e yaml_scalar_style_t
Scalar styles.
yaml_node_s::end_mark
yaml_mark_t end_mark
The end of the node.
Definition: yaml.h:773
yaml_error_type_e
yaml_error_type_e
Many bad things could happen with the parser and emitter.
Definition: yaml.h:122
yaml_event_s::implicit
int implicit
Is the document indicator implicit?
Definition: yaml.h:412
YAML_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE
Expect a value for a simple key of a flow mapping.
Definition: yaml.h:1499
yaml_node_s::items
struct yaml_node_s::@29::@31::@33 items
The stack of sequence items.
yaml_event_s::quoted_implicit
int quoted_implicit
Is the tag optional for any non-plain style?
Definition: yaml.h:440
YAML_NO_NODE
An empty node.
Definition: yaml.h:692
YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE
Expect an entry of a block sequence.
Definition: yaml.h:1030
YAML_DOCUMENT_START_EVENT
A DOCUMENT-START event.
Definition: yaml.h:363
yaml_token_s::length
size_t length
The length of the scalar value.
Definition: yaml.h:306
yaml_emitter_s::encoding
yaml_encoding_t encoding
The stream encoding.
Definition: yaml.h:1593
yaml_token_delete
yaml_token_delete(yaml_token_t *token)
Free any memory allocated for a token object.
Definition: api.c:578
yaml_emitter_s::line
int line
The current line.
Definition: yaml.h:1676
yaml_emitter_s::opened
int opened
If the stream was already opened?
Definition: yaml.h:1738
yaml_event_s::style
yaml_sequence_style_t style
The sequence style.
Definition: yaml.h:454
yaml_sequence_end_event_initialize
yaml_sequence_end_event_initialize(yaml_event_t *event)
Create a SEQUENCE-END event.
Definition: api.c:908
YAML_EMITTER_ERROR
Cannot emit a YAML stream.
Definition: yaml.h:141
yaml_parser_set_input_file
yaml_parser_set_input_file(yaml_parser_t *parser, FILE *file)
Set a file input.
Definition: api.c:303
yaml_token_s::value
yaml_char_t * value
The alias value.
Definition: yaml.h:284
yaml_emitter_s::serialized
int serialized
If the node has been emitted?
Definition: yaml.h:1749
yaml_emitter_s::output
union yaml_emitter_s::@48 output
Standard (string or file) output data.
yaml_document_get_node
yaml_document_get_node(yaml_document_t *document, int index)
Get a document node.
Definition: api.c:1164
yaml_document_s::start
yaml_tag_directive_t * start
The beginning of the tag directives list.
Definition: yaml.h:796
yaml_parser_s::indents
struct yaml_parser_s::@41 indents
The indentation levels stack.
YAML_DECLARE
#define YAML_DECLARE(type)
The public API declaration.
Definition: yaml.h:38
token
ID token
Definition: ripper.c:16497
key
static int VALUE key
Definition: tkutil.c:265
YAML_MAPPING_END_EVENT
A MAPPING-END event.
Definition: yaml.h:380
YAML_FLOW_MAPPING_START_TOKEN
A FLOW-MAPPING-START token.
Definition: yaml.h:243
yaml_document_s::top
yaml_node_t * top
The top of the stack.
Definition: yaml.h:787
yaml_parser_load
yaml_parser_load(yaml_parser_t *parser, yaml_document_t *document)
Parse the input stream and produce the next YAML document.
Definition: loader.c:67
yaml_emitter_s::simple_key_context
int simple_key_context
Is it a simple mapping key context?
Definition: yaml.h:1673
yaml_emitter_s::end
yaml_event_t * end
The end of the event queue.
Definition: yaml.h:1633
yaml_emitter_s::last
unsigned char * last
The last filled position of the buffer.
Definition: yaml.h:1589
yaml_node_s::scalar
struct yaml_node_s::@29::@30 scalar
The scalar parameters (for YAML_SCALAR_NODE).
YAML_EMIT_FLOW_SEQUENCE_ITEM_STATE
Expect an item of a flow sequence.
Definition: yaml.h:1493
yaml_alias_data_s
This structure holds aliases data.
Definition: yaml.h:1065
yaml_parser_s::error
yaml_error_type_t error
Error type.
Definition: yaml.h:1089
yaml_parser_set_input
yaml_parser_set_input(yaml_parser_t *parser, yaml_read_handler_t *handler, void *data)
Set a generic input handler.
Definition: api.c:320
yaml_event_t
struct yaml_event_s yaml_event_t
The event structure.
YAML_NO_TOKEN
An empty token.
Definition: yaml.h:215
yaml_scalar_style_e
yaml_scalar_style_e
Scalar styles.
Definition: yaml.h:164
yaml_emitter_s::style
yaml_scalar_style_t style
The output style.
Definition: yaml.h:1725
yaml_document_initialize
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.
Definition: api.c:1030
YAML_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE
Expect the first item of a block sequence.
Definition: yaml.h:1503
yaml_emitter_s::events
struct yaml_emitter_s::@52 events
The event queue.
yaml_parser_s::states
struct yaml_parser_s::@43 states
The parser states stack.
yaml_emitter_s::end
int * end
The end of the stack.
Definition: yaml.h:1645
value
volatile VALUE value
Definition: tcltklib.c:9442
yaml_node_s::top
yaml_node_item_t * top
The top of the stack.
Definition: yaml.h:747
yaml_tag_directive_s::handle
yaml_char_t * handle
The tag handle.
Definition: yaml.h:91
yaml_document_s::start_implicit
int start_implicit
Is the document start indicator implicit?
Definition: yaml.h:802
yaml_event_s::value
yaml_char_t * value
The scalar value.
Definition: yaml.h:434
yaml_parser_s::top
yaml_parser_state_t * top
The top of the stack.
Definition: yaml.h:1251
yaml_emitter_s::anchor
int anchor
The anchor id.
Definition: yaml.h:1747
yaml_event_s::version_directive
yaml_version_directive_t * version_directive
The version directive.
Definition: yaml.h:401
yaml_document_end_event_initialize
yaml_document_end_event_initialize(yaml_event_t *event, int implicit)
Create the DOCUMENT-END event.
Definition: api.c:775
yaml_parser_s::marks
struct yaml_parser_s::@44 marks
The stack of marks.
const
#define const
Definition: strftime.c:102
YAML_PARSE_BLOCK_MAPPING_VALUE_STATE
Expect a block mapping value.
Definition: yaml.h:1038
yaml_simple_key_s::token_number
size_t token_number
The number of the token.
Definition: yaml.h:1001
yaml_emitter_state_t
enum yaml_emitter_state_e yaml_emitter_state_t
The emitter states.
yaml_emitter_set_width
yaml_emitter_set_width(yaml_emitter_t *emitter, int width)
Set the preferred line width.
Definition: api.c:542
YAML_ANY_MAPPING_STYLE
Let the emitter choose the style.
Definition: yaml.h:196
yaml_event_s::document_end
struct yaml_event_s::@20::@23 document_end
The document end parameters (for YAML_DOCUMENT_END_EVENT).
YAML_SEQUENCE_END_EVENT
A SEQUENCE-END event.
Definition: yaml.h:375
yaml_emitter_s::anchor
yaml_char_t * anchor
The anchor value.
Definition: yaml.h:1689
yaml_node_s::length
size_t length
The length of the scalar value.
Definition: yaml.h:733
length
size_t length
Definition: tcltklib.c:4559
yaml_emitter_set_canonical
yaml_emitter_set_canonical(yaml_emitter_t *emitter, int canonical)
Set if the output should be in the &quot;canonical&quot; format as in the YAML specification.
Definition: api.c:518
YAML_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE
Expect the first item of a flow sequence.
Definition: yaml.h:1491
yaml_node_pair_s::value
int value
The value of the element.
Definition: yaml.h:713
yaml_emitter_s::pointer
yaml_char_t * pointer
The current position of the buffer.
Definition: yaml.h:1575
YAML_STREAM_END_TOKEN
A STREAM-END token.
Definition: yaml.h:220
yaml_token_type_t
enum yaml_token_type_e yaml_token_type_t
Token types.
yaml_node_s::start
yaml_node_item_t * start
The beginning of the stack.
Definition: yaml.h:743
yaml_emitter_s::start
unsigned char * start
The beginning of the buffer.
Definition: yaml.h:1583
yaml_event_s::mapping_start
struct yaml_event_s::@20::@27 mapping_start
The mapping parameters (for YAML_MAPPING_START_EVENT).
yaml_parser_s::top
yaml_simple_key_t * top
The top of the stack.
Definition: yaml.h:1232
yaml_document_t
struct yaml_document_s yaml_document_t
The document structure.
yaml_parser_s::head
yaml_token_t * head
The head of the tokens queue.
Definition: yaml.h:1198
yaml_document_start_event_initialize
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.
Definition: api.c:696
yaml_tag_directive_s
The tag directive data.
Definition: yaml.h:89
yaml_node_s::sequence
struct yaml_node_s::@29::@31 sequence
The sequence parameters (for YAML_SEQUENCE_NODE).
yaml_parser_s::end
int * end
The end of the stack.
Definition: yaml.h:1214
YAML_ANCHOR_TOKEN
An ANCHOR token.
Definition: yaml.h:259
yaml_token_s::type
yaml_token_type_t type
The token type.
Definition: yaml.h:270
yaml_document_s::start_mark
yaml_mark_t start_mark
The beginning of the document.
Definition: yaml.h:807
yaml_emitter_flush
yaml_emitter_flush(yaml_emitter_t *emitter)
Flush the accumulated characters to the output.
Definition: writer.c:32
yaml_emitter_s::suffix_length
size_t suffix_length
The tag suffix length.
Definition: yaml.h:1705
YAML_PARSER_ERROR
Cannot parse the input stream.
Definition: yaml.h:134
yaml_emitter_t
struct yaml_emitter_s yaml_emitter_t
The emitter structure.
YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE
Expect an empty value of a flow mapping.
Definition: yaml.h:1056
yaml_parser_s::offset
size_t offset
The offset of the current position (in bytes).
Definition: yaml.h:1168
yaml_parser_s::context_mark
yaml_mark_t context_mark
The context position.
Definition: yaml.h:1101
yaml_parser_s::top
yaml_tag_directive_t * top
The top of the list.
Definition: yaml.h:1274
yaml_emitter_set_unicode
yaml_emitter_set_unicode(yaml_emitter_t *emitter, int unicode)
Set if unescaped non-ASCII characters are allowed.
Definition: api.c:554
yaml_parser_s::file
FILE * file
File input data.
Definition: yaml.h:1131
YAML_UTF8_ENCODING
The default UTF-8 encoding.
Definition: yaml.h:101
yaml_emitter_s::single_quoted_allowed
int single_quoted_allowed
Can the scalar be expressed in the single quoted style?
Definition: yaml.h:1721
yaml_parser_s::simple_keys
struct yaml_parser_s::@42 simple_keys
The stack of simple keys.
yaml_emitter_s::handle
yaml_char_t * handle
The tag handle.
Definition: yaml.h:1699
yaml_emitter_s::block_plain_allowed
int block_plain_allowed
Can the scalar be expressed in the block plain style?
Definition: yaml.h:1719
YAML_FLOW_MAPPING_END_TOKEN
A FLOW-MAPPING-END token.
Definition: yaml.h:245
yaml_parser_s::end
yaml_token_t * end
The end of the tokens queue.
Definition: yaml.h:1196
YAML_PARSE_FLOW_NODE_STATE
Expect a flow node.
Definition: yaml.h:1026
yaml_parser_s::problem_mark
yaml_mark_t problem_mark
The problem position.
Definition: yaml.h:1097
yaml_parser_s::end
unsigned char * end
The end of the buffer.
Definition: yaml.h:1157
YAML_SEQUENCE_NODE
A sequence node.
Definition: yaml.h:697
yaml_parser_s::tokens_parsed
size_t tokens_parsed
The number of tokens fetched from the queue.
Definition: yaml.h:1204
yaml_emitter_s::start
int * start
The beginning of the stack.
Definition: yaml.h:1643
yaml_parser_s::problem_offset
size_t problem_offset
The byte about which the problem occured.
Definition: yaml.h:1093
yaml_parser_s::tag_directives
struct yaml_parser_s::@45 tag_directives
The list of TAG directives.
yaml_event_s::alias
struct yaml_event_s::@20::@24 alias
The alias parameters (for YAML_ALIAS_EVENT).
yaml_emitter_s::value
yaml_char_t * value
The scalar value.
Definition: yaml.h:1711
yaml_mapping_start_event_initialize
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.
Definition: api.c:924
yaml_emitter_s::closed
int closed
If the stream was already closed?
Definition: yaml.h:1740
yaml_emitter_s::write_handler
yaml_write_handler_t * write_handler
Write handler.
Definition: yaml.h:1547
YAML_DOCUMENT_END_EVENT
A DOCUMENT-END event.
Definition: yaml.h:365
YAML_EMIT_FLOW_MAPPING_VALUE_STATE
Expect a value of a flow mapping.
Definition: yaml.h:1501
size
int size
Definition: encoding.c:52
YAML_DOCUMENT_START_TOKEN
A DOCUMENT-START token.
Definition: yaml.h:227
yaml_emitter_s::mapping_context
int mapping_context
Is it a mapping context?
Definition: yaml.h:1671
yaml_document_add_scalar
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.
Definition: api.c:1194
yaml_emitter_s::indents
struct yaml_emitter_s::@53 indents
The stack of indentation levels.
YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE
Expect the and of an ordered mapping entry.
Definition: yaml.h:1048
YAML_NO_ERROR
No error is produced.
Definition: yaml.h:124
YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE
Expect an entry of an indentless sequence.
Definition: yaml.h:1032
YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE
Expect a block node or indentless sequence.
Definition: yaml.h:1024
yaml_simple_key_s
This structure holds information about a potential simple key.
Definition: yaml.h:993
YAML_SCALAR_EVENT
A SCALAR event.
Definition: yaml.h:370
yaml_emitter_s::best_indent
int best_indent
The number of indentation spaces.
Definition: yaml.h:1607
yaml_token_s::scalar
struct yaml_token_s::@12::@17 scalar
The scalar value (for YAML_SCALAR_TOKEN).
YAML_PLAIN_SCALAR_STYLE
The plain scalar style.
Definition: yaml.h:169
yaml_token_s::tag
struct yaml_token_s::@12::@16 tag
The tag (for YAML_TAG_TOKEN).
yaml_parser_state_t
enum yaml_parser_state_e yaml_parser_state_t
The states of the parser.
yaml_emitter_s::multiline
int multiline
Does the scalar contain line breaks?
Definition: yaml.h:1715
YAML_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE
Expect the first key of a block mapping.
Definition: yaml.h:1507
yaml_parser_initialize
yaml_parser_initialize(yaml_parser_t *parser)
Initialize a parser.
Definition: api.c:171
yaml_event_s::encoding
yaml_encoding_t encoding
The document encoding.
Definition: yaml.h:395
yaml_event_type_t
enum yaml_event_type_e yaml_event_type_t
Event types.
yaml_parser_s::start
yaml_mark_t * start
The beginning of the stack.
Definition: yaml.h:1260
YAML_LITERAL_SCALAR_STYLE
The literal scalar style.
Definition: yaml.h:177
yaml_version_directive_s::minor
int minor
The minor version number.
Definition: yaml.h:85
YAML_STREAM_END_EVENT
A STREAM-END event.
Definition: yaml.h:360
yaml_event_s::data
union yaml_event_s::@20 data
The event data.
yaml_node_s::end
yaml_node_item_t * end
The end of the stack.
Definition: yaml.h:745
YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE
Expect the first entry of a flow sequence.
Definition: yaml.h:1040
yaml_node_s::top
yaml_node_pair_t * top
The top of the stack.
Definition: yaml.h:762
yaml_mark_s::line
size_t line
The position line.
Definition: yaml.h:150
YAML_DOCUMENT_END_TOKEN
A DOCUMENT-END token.
Definition: yaml.h:229
yaml_token_s::encoding
yaml_encoding_t encoding
The stream encoding.
Definition: yaml.h:278
yaml_emitter_set_output_file
yaml_emitter_set_output_file(yaml_emitter_t *emitter, FILE *file)
Set a file output.
Definition: api.c:472
YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE
Expect the first entry of a block sequence.
Definition: yaml.h:1028
YAML_EMIT_FIRST_DOCUMENT_START_STATE
Expect the first DOCUMENT-START or STREAM-END.
Definition: yaml.h:1483
YAML_TAG_DIRECTIVE_TOKEN
A TAG-DIRECTIVE token.
Definition: yaml.h:225
yaml_node_type_e
yaml_node_type_e
Node types.
Definition: yaml.h:690
yaml_document_s::nodes
struct yaml_document_s::@35 nodes
The document nodes.
yaml_document_s::start
yaml_node_t * start
The beginning of the stack.
Definition: yaml.h:783
yaml_emitter_s::line_break
yaml_break_t line_break
The preferred line break.
Definition: yaml.h:1613
YAML_EMIT_END_STATE
Expect nothing.
Definition: yaml.h:1515
yaml_emitter_s::start
yaml_emitter_state_t * start
The beginning of the stack.
Definition: yaml.h:1618
YAML_SCANNER_ERROR
Cannot scan the input stream.
Definition: yaml.h:132
YAML_PARSE_FLOW_MAPPING_VALUE_STATE
Expect a value of a flow mapping.
Definition: yaml.h:1054
yaml_event_s::style
yaml_mapping_style_t style
The mapping style.
Definition: yaml.h:466
yaml_parser_s::start
yaml_simple_key_t * start
The beginning of the stack.
Definition: yaml.h:1228
yaml_event_s::stream_start
struct yaml_event_s::@20::@21 stream_start
The stream parameters (for YAML_STREAM_START_EVENT).
YAML_PARSE_DOCUMENT_END_STATE
Expect DOCUMENT-END.
Definition: yaml.h:1020
yaml_emitter_s::block_allowed
int block_allowed
Can the scalar be expressed in the literal or folded styles?
Definition: yaml.h:1723
YAML_PARSE_END_STATE
Expect nothing.
Definition: yaml.h:1058
yaml_parser_s::document
yaml_document_t * document
The currently parsed document.
Definition: yaml.h:1297
yaml_mark_s::index
size_t index
The position index.
Definition: yaml.h:147
yaml_emitter_s::end
unsigned char * end
The end of the buffer.
Definition: yaml.h:1585
parser
struct parser_params * parser
Definition: ripper.c:4507
yaml_mapping_end_event_initialize
yaml_mapping_end_event_initialize(yaml_event_t *event)
Create a MAPPING-END event.
Definition: api.c:963
yaml_parser_s::start
unsigned char * start
The beginning of the buffer.
Definition: yaml.h:1155
yaml_emitter_dump
yaml_emitter_dump(yaml_emitter_t *emitter, yaml_document_t *document)
Emit a YAML document.
Definition: dumper.c:112
YAML_PARSE_FLOW_MAPPING_KEY_STATE
Expect a key of a flow mapping.
Definition: yaml.h:1052
YAML_WRITER_ERROR
Cannot write to the output stream.
Definition: yaml.h:139
yaml_parser_scan
yaml_parser_scan(yaml_parser_t *parser, yaml_token_t *token)
Scan the input stream and produce the next token.
Definition: scanner.c:742
YAML_SCALAR_TOKEN
A SCALAR token.
Definition: yaml.h:263
YAML_STREAM_START_EVENT
A STREAM-START event.
Definition: yaml.h:358
YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE
Expect the first key of a flow mapping.
Definition: yaml.h:1050
yaml_emitter_s::unicode
int unicode
Allow unescaped non-ASCII characters?
Definition: yaml.h:1611
yaml_document_s::end
yaml_tag_directive_t * end
The end of the tag directives list.
Definition: yaml.h:798
yaml_event_type_e
yaml_event_type_e
Event types.
Definition: yaml.h:353
yaml_document_add_sequence
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.
Definition: api.c:1244
yaml_emitter_open
yaml_emitter_open(yaml_emitter_t *emitter)
Start a YAML stream.
Definition: dumper.c:62
yaml_emitter_s::best_width
int best_width
The preferred width of the output lines.
Definition: yaml.h:1609
yaml_parser_s::problem
const char * problem
Error description.
Definition: yaml.h:1091
yaml_emitter_set_indent
yaml_emitter_set_indent(yaml_emitter_t *emitter, int indent)
Set the intendation increment.
Definition: api.c:530
yaml_token_type_e
yaml_token_type_e
Token types.
Definition: yaml.h:213
yaml_parser_s::pointer
unsigned char * pointer
The current position of the buffer.
Definition: yaml.h:1159
yaml_simple_key_s::possible
int possible
Is a simple key possible?
Definition: yaml.h:995
yaml_emitter_s::tail
yaml_event_t * tail
The tail of the event queue.
Definition: yaml.h:1637
yaml_emitter_s::tag_directives
struct yaml_emitter_s::@54 tag_directives
The list of tag directives.
yaml_node_s::value
yaml_char_t * value
The scalar value.
Definition: yaml.h:731
YAML_FLOW_MAPPING_STYLE
The flow mapping style.
Definition: yaml.h:201
YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE
Expect a value of an ordered mapping.
Definition: yaml.h:1046
yaml_get_version
yaml_get_version(int *major, int *minor, int *patch)
Get the library version numbers.
Definition: api.c:19
yaml_document_s::tag_directives
struct yaml_document_s::@36 tag_directives
The list of tag directives.
yaml_mapping_style_t
enum yaml_mapping_style_e yaml_mapping_style_t
Mapping styles.
YAML_PARSE_BLOCK_NODE_STATE
Expect a block node.
Definition: yaml.h:1022
YAML_BLOCK_ENTRY_TOKEN
A BLOCK-ENTRY token.
Definition: yaml.h:248
yaml_parser_s::raw_buffer
struct yaml_parser_s::@39 raw_buffer
The raw buffer.
yaml_emitter_s::end
yaml_tag_directive_t * end
The end of the list.
Definition: yaml.h:1655
yaml_emitter_s::problem
const char * problem
Error description.
Definition: yaml.h:1535
major
int major
Definition: tcltklib.c:109
yaml_version_directive_t
struct yaml_version_directive_s yaml_version_directive_t
The version directive data.
yaml_parser_s::last
unsigned char * last
The last filled position of the buffer.
Definition: yaml.h:1161
yaml_parser_s::string
struct yaml_parser_s::@37::@47 string
String input data.
yaml_emitter_s::states
struct yaml_emitter_s::@51 states
The stack of states.
YAML_ANY_SCALAR_STYLE
Let the emitter choose the style.
Definition: yaml.h:166
yaml_event_s::sequence_start
struct yaml_event_s::@20::@26 sequence_start
The sequence parameters (for YAML_SEQUENCE_START_EVENT).
yaml_emitter_initialize
yaml_emitter_initialize(yaml_emitter_t *emitter)
Initialize an emitter.
Definition: api.c:349
yaml_emitter_s::string
struct yaml_emitter_s::@48::@59 string
String output data.
yaml_mark_s::column
size_t column
The position column.
Definition: yaml.h:153
yaml_emitter_delete
yaml_emitter_delete(yaml_emitter_t *emitter)
Destroy an emitter.
Definition: api.c:386
yaml_document_s
The document structure.
Definition: yaml.h:778
yaml_document_get_root_node
yaml_document_get_root_node(yaml_document_t *document)
Get the root object.
Definition: api.c:1179
yaml_emitter_s::tag_data
struct yaml_emitter_s::@56 tag_data
Tag analysis.
YAML_KEY_TOKEN
A KEY token.
Definition: yaml.h:252
yaml_node_s::style
yaml_mapping_style_t style
The mapping style.
Definition: yaml.h:765
yaml_token_s::prefix
yaml_char_t * prefix
The tag prefix.
Definition: yaml.h:324
yaml_parser_s::flow_level
int flow_level
The number of unclosed &#39;[&#39; and &#39;{&#39; indicators.
Definition: yaml.h:1189
yaml_token_s::stream_start
struct yaml_token_s::@12::@13 stream_start
The stream start (for YAML_STREAM_START_TOKEN).
yaml_emitter_s::end
yaml_emitter_state_t * end
The end of the stack.
Definition: yaml.h:1620
yaml_parser_s::start
yaml_token_t * start
The beginning of the tokens queue.
Definition: yaml.h:1194
YAML_PARSE_BLOCK_MAPPING_KEY_STATE
Expect a block mapping key.
Definition: yaml.h:1036
yaml_parser_s::end
yaml_mark_t * end
The end of the stack.
Definition: yaml.h:1262
yaml_event_s::type
yaml_event_type_t type
The event type.
Definition: yaml.h:387
yaml_event_s::scalar
struct yaml_event_s::@20::@25 scalar
The scalar parameters (for YAML_SCALAR_EVENT).
yaml_break_t
enum yaml_break_e yaml_break_t
Line break types.
yaml_mark_t
struct yaml_mark_s yaml_mark_t
The pointer position.
YAML_PARSE_STREAM_START_STATE
Expect STREAM-START.
Definition: yaml.h:1012
yaml_token_s
The token structure.
Definition: yaml.h:267
yaml_document_s::end_mark
yaml_mark_t end_mark
The end of the document.
Definition: yaml.h:809
YAML_ALIAS_EVENT
An ALIAS event.
Definition: yaml.h:368
yaml_event_s::start_mark
yaml_mark_t start_mark
The beginning of the event.
Definition: yaml.h:472
YAML_FLOW_SEQUENCE_STYLE
The flow sequence style.
Definition: yaml.h:190
yaml_node_s::style
yaml_sequence_style_t style
The sequence style.
Definition: yaml.h:750
yaml_emitter_s::anchors
struct yaml_emitter_s::@58 * anchors
The information associated with the document nodes.
YAML_NO_EVENT
An empty event.
Definition: yaml.h:355
yaml_emitter_s::top
int * top
The top of the stack.
Definition: yaml.h:1647
YAML_BLOCK_SEQUENCE_STYLE
The block sequence style.
Definition: yaml.h:188
yaml_token_s::start_mark
yaml_mark_t start_mark
The beginning of the token.
Definition: yaml.h:330
yaml_sequence_start_event_initialize
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.
Definition: api.c:869
yaml_parser_s::eof
int eof
EOF flag.
Definition: yaml.h:1135
yaml_event_s::plain_implicit
int plain_implicit
Is the tag optional for the plain style?
Definition: yaml.h:438
YAML_SINGLE_QUOTED_SCALAR_STYLE
The single-quoted scalar style.
Definition: yaml.h:172
yaml_parser_s::start
yaml_parser_state_t * start
The beginning of the stack.
Definition: yaml.h:1247
yaml_event_s::length
size_t length
The length of the scalar value.
Definition: yaml.h:436