]>
Commit | Line | Data |
---|---|---|
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> | |
3 | <title>yaml: Parser Definitions</title> | |
4 | <link href="tabs.css" rel="stylesheet" type="text/css"> | |
5 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | |
6 | </head><body> | |
7 | <!-- Generated by Doxygen 1.5.8 --> | |
8 | <div class="navigation" id="top"> | |
9 | <div class="tabs"> | |
10 | <ul> | |
11 | <li><a href="index.html"><span>Main Page</span></a></li> | |
12 | <li><a href="modules.html"><span>Modules</span></a></li> | |
13 | <li><a href="annotated.html"><span>Data Structures</span></a></li> | |
14 | <li><a href="files.html"><span>Files</span></a></li> | |
15 | </ul> | |
16 | </div> | |
17 | </div> | |
18 | <div class="contents"> | |
19 | <h1>Parser Definitions</h1><table border="0" cellpadding="0" cellspacing="0"> | |
20 | <tr><td></td></tr> | |
21 | <tr><td colspan="2"><br><h2>Data Structures</h2></td></tr> | |
22 | <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structyaml__simple__key__s.html">yaml_simple_key_s</a></td></tr> | |
23 | ||
24 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This structure holds information about a potential simple key. <a href="structyaml__simple__key__s.html#_details">More...</a><br></td></tr> | |
25 | <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structyaml__alias__data__s.html">yaml_alias_data_s</a></td></tr> | |
26 | ||
27 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This structure holds aliases data. <a href="structyaml__alias__data__s.html#_details">More...</a><br></td></tr> | |
28 | <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structyaml__parser__s.html">yaml_parser_s</a></td></tr> | |
29 | ||
30 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The parser structure. <a href="structyaml__parser__s.html#_details">More...</a><br></td></tr> | |
31 | <tr><td colspan="2"><br><h2>Typedefs</h2></td></tr> | |
32 | <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#g4982f7e4e001ddb47d2819f38f0cd9d6">yaml_read_handler_t</a> (void *data, unsigned char *buffer, size_t size, size_t *size_read)</td></tr> | |
33 | ||
34 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The prototype of a read handler. <a href="#g4982f7e4e001ddb47d2819f38f0cd9d6"></a><br></td></tr> | |
35 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ge5570fbb7ab7c8332cd666f3a9c26591"></a><!-- doxytag: member="parser::yaml_simple_key_t" ref="ge5570fbb7ab7c8332cd666f3a9c26591" args="" --> | |
36 | typedef struct <a class="el" href="structyaml__simple__key__s.html">yaml_simple_key_s</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#ge5570fbb7ab7c8332cd666f3a9c26591">yaml_simple_key_t</a></td></tr> | |
37 | ||
38 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This structure holds information about a potential simple key. <br></td></tr> | |
39 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g52b56d3e3cee0f9ba460978802a8c83b"></a><!-- doxytag: member="parser::yaml_parser_state_t" ref="g52b56d3e3cee0f9ba460978802a8c83b" args="" --> | |
40 | typedef enum <a class="el" href="group__parser.html#gd39c19e7b0df6f542ca97806535b57c5">yaml_parser_state_e</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#g52b56d3e3cee0f9ba460978802a8c83b">yaml_parser_state_t</a></td></tr> | |
41 | ||
42 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The states of the parser. <br></td></tr> | |
43 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g1434228b82f5f90d3c8ccda816e9ca9d"></a><!-- doxytag: member="parser::yaml_alias_data_t" ref="g1434228b82f5f90d3c8ccda816e9ca9d" args="" --> | |
44 | typedef struct <a class="el" href="structyaml__alias__data__s.html">yaml_alias_data_s</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#g1434228b82f5f90d3c8ccda816e9ca9d">yaml_alias_data_t</a></td></tr> | |
45 | ||
46 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This structure holds aliases data. <br></td></tr> | |
47 | <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct <a class="el" href="structyaml__parser__s.html">yaml_parser_s</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#gfdc6319cb28a8b8034542b29be85b0c4">yaml_parser_t</a></td></tr> | |
48 | ||
49 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The parser structure. <a href="#gfdc6319cb28a8b8034542b29be85b0c4"></a><br></td></tr> | |
50 | <tr><td colspan="2"><br><h2>Enumerations</h2></td></tr> | |
51 | <tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#gd39c19e7b0df6f542ca97806535b57c5">yaml_parser_state_e</a> { <br> | |
52 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c5e7b52e16bf002db5cf2944596d8c880e">YAML_PARSE_STREAM_START_STATE</a>, | |
53 | <br> | |
54 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c58255725d67d5bd3574fc7df4db1c6c84">YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE</a>, | |
55 | <br> | |
56 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c5a06d10f700d245caecfc6074a6c52fde">YAML_PARSE_DOCUMENT_START_STATE</a>, | |
57 | <br> | |
58 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c5e444c7652c8029b0ef80068eaaaa3d4d">YAML_PARSE_DOCUMENT_CONTENT_STATE</a>, | |
59 | <br> | |
60 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c5eef06d7f13fa4501146a5b9876c98239">YAML_PARSE_DOCUMENT_END_STATE</a>, | |
61 | <br> | |
62 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c5e1893c0835bacf05cdc21ed181fb75f1">YAML_PARSE_BLOCK_NODE_STATE</a>, | |
63 | <br> | |
64 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c5cbd390af0d3919fe0382d03c284ff3b5">YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE</a>, | |
65 | <br> | |
66 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c55bb321f9d18c5b208a71c04bbcbd1d01">YAML_PARSE_FLOW_NODE_STATE</a>, | |
67 | <br> | |
68 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c55bb5f95fc5f1a258ee8e9db0ed25b2d9">YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE</a>, | |
69 | <br> | |
70 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c58a6cb1f12fe08eee7fc2fa854dbd5b1a">YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE</a>, | |
71 | <br> | |
72 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c5f7095f2141cf9887489e832f0ec61fbd">YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE</a>, | |
73 | <br> | |
74 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c5febcb5bbd67d112d9ecfa633155f0644">YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE</a>, | |
75 | <br> | |
76 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c52df81c86e90b874b415ecb19e72efe45">YAML_PARSE_BLOCK_MAPPING_KEY_STATE</a>, | |
77 | <br> | |
78 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c5e94acf5685fa1538b225413f154465c2">YAML_PARSE_BLOCK_MAPPING_VALUE_STATE</a>, | |
79 | <br> | |
80 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c53f54830989c12cc4a63494df792eeb08">YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE</a>, | |
81 | <br> | |
82 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c50e50f3841eb0d37ad159e64c4a9a1171">YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE</a>, | |
83 | <br> | |
84 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c5563e11601cf3a1d2a3efc1feb1b696a3">YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE</a>, | |
85 | <br> | |
86 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c59e5ebb4bee4541e7a7025689c7fc66eb">YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE</a>, | |
87 | <br> | |
88 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c5397fd87de9227c64e5308481930b5eeb">YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE</a>, | |
89 | <br> | |
90 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c591ac4bbb6629e2b768a3305fb707b7cd">YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE</a>, | |
91 | <br> | |
92 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c5924f8eb891dc7527bf4db594a0b1bff8">YAML_PARSE_FLOW_MAPPING_KEY_STATE</a>, | |
93 | <br> | |
94 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c53ba351f6cfba029248ada2c0720246d4">YAML_PARSE_FLOW_MAPPING_VALUE_STATE</a>, | |
95 | <br> | |
96 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c55a8ec0af5c3314c1ad5e0569b6a5d6d2">YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE</a>, | |
97 | <br> | |
98 | <a class="el" href="group__parser.html#ggd39c19e7b0df6f542ca97806535b57c551fd3d45693e2240251996def375a2a2">YAML_PARSE_END_STATE</a> | |
99 | <br> | |
100 | }</td></tr> | |
101 | ||
102 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The states of the parser. <a href="group__parser.html#gd39c19e7b0df6f542ca97806535b57c5">More...</a><br></td></tr> | |
103 | <tr><td colspan="2"><br><h2>Functions</h2></td></tr> | |
104 | <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#gcc37ceeb5847e38a3fe24eb0c9b53965">yaml_parser_initialize</a> (<a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> *parser)</td></tr> | |
105 | ||
106 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize a parser. <a href="#gcc37ceeb5847e38a3fe24eb0c9b53965"></a><br></td></tr> | |
107 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#ga27150107c4667c1024ec0651e2ac26b">yaml_parser_delete</a> (<a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> *parser)</td></tr> | |
108 | ||
109 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy a parser. <a href="#ga27150107c4667c1024ec0651e2ac26b"></a><br></td></tr> | |
110 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#g08a94762bf5f4c61f72c1da0a407df0d">yaml_parser_set_input_string</a> (<a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> *parser, const unsigned char *input, size_t size)</td></tr> | |
111 | ||
112 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set a string input. <a href="#g08a94762bf5f4c61f72c1da0a407df0d"></a><br></td></tr> | |
113 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#gc3f00f8beb2365b1e4569692d64696b6">yaml_parser_set_input_file</a> (<a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> *parser, FILE *file)</td></tr> | |
114 | ||
115 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set a file input. <a href="#gc3f00f8beb2365b1e4569692d64696b6"></a><br></td></tr> | |
116 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#gbc67581bfa771a3e787d907d6914b8d9">yaml_parser_set_input</a> (<a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> *parser, <a class="el" href="group__parser.html#g4982f7e4e001ddb47d2819f38f0cd9d6">yaml_read_handler_t</a> *handler, void *data)</td></tr> | |
117 | ||
118 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set a generic input handler. <a href="#gbc67581bfa771a3e787d907d6914b8d9"></a><br></td></tr> | |
119 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#g9565b64975570ed34612a19adf02ae6a">yaml_parser_set_encoding</a> (<a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> *parser, <a class="el" href="group__basic.html#g2170996d7e636397b5e6bc0c1b7df7c6">yaml_encoding_t</a> encoding)</td></tr> | |
120 | ||
121 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the source encoding. <a href="#g9565b64975570ed34612a19adf02ae6a"></a><br></td></tr> | |
122 | <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#g6c2144f131ebd600a075d4ba654540f7">yaml_parser_scan</a> (<a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> *parser, <a class="el" href="structyaml__token__s.html">yaml_token_t</a> *token)</td></tr> | |
123 | ||
124 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Scan the input stream and produce the next token. <a href="#g6c2144f131ebd600a075d4ba654540f7"></a><br></td></tr> | |
125 | <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#g559312fb137533d8b7e07f224fe0ec8f">yaml_parser_parse</a> (<a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> *parser, <a class="el" href="structyaml__event__s.html">yaml_event_t</a> *event)</td></tr> | |
126 | ||
127 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Parse the input stream and produce the next parsing event. <a href="#g559312fb137533d8b7e07f224fe0ec8f"></a><br></td></tr> | |
128 | <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#g9ef7d6e9494766b5880c389bc431d138">yaml_parser_load</a> (<a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> *parser, <a class="el" href="structyaml__document__s.html">yaml_document_t</a> *document)</td></tr> | |
129 | ||
130 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Parse the input stream and produce the next YAML document. <a href="#g9ef7d6e9494766b5880c389bc431d138"></a><br></td></tr> | |
131 | </table> | |
132 | <hr><h2>Typedef Documentation</h2> | |
133 | <a class="anchor" name="g4982f7e4e001ddb47d2819f38f0cd9d6"></a><!-- doxytag: member="yaml.h::yaml_read_handler_t" ref="g4982f7e4e001ddb47d2819f38f0cd9d6" args="(void *data, unsigned char *buffer, size_t size, size_t *size_read)" --> | |
134 | <div class="memitem"> | |
135 | <div class="memproto"> | |
136 | <table class="memname"> | |
137 | <tr> | |
138 | <td class="memname">typedef int <a class="el" href="group__parser.html#g4982f7e4e001ddb47d2819f38f0cd9d6">yaml_read_handler_t</a>(void *data, unsigned char *buffer, size_t size, size_t *size_read) </td> | |
139 | </tr> | |
140 | </table> | |
141 | </div> | |
142 | <div class="memdoc"> | |
143 | ||
144 | <p> | |
145 | The prototype of a read handler. | |
146 | <p> | |
147 | The read handler is called when the parser needs to read more bytes from the source. The handler should write not more than <em>size</em> bytes to the <em>buffer</em>. The number of written bytes should be set to the <em>length</em> variable.<p> | |
148 | <dl compact><dt><b>Parameters:</b></dt><dd> | |
149 | <table border="0" cellspacing="2" cellpadding="0"> | |
150 | <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>data</em> </td><td>A pointer to an application data specified by <a class="el" href="group__parser.html#gbc67581bfa771a3e787d907d6914b8d9" title="Set a generic input handler.">yaml_parser_set_input()</a>. </td></tr> | |
151 | <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>buffer</em> </td><td>The buffer to write the data from the source. </td></tr> | |
152 | <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>size</em> </td><td>The size of the buffer. </td></tr> | |
153 | <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>size_read</em> </td><td>The actual number of bytes read from the source.</td></tr> | |
154 | </table> | |
155 | </dl> | |
156 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>On success, the handler should return <code>1</code>. If the handler failed, the returned value should be <code>0</code>. On EOF, the handler should set the <em>size_read</em> to <code>0</code> and return <code>1</code>. </dd></dl> | |
157 | ||
158 | </div> | |
159 | </div><p> | |
160 | <a class="anchor" name="gfdc6319cb28a8b8034542b29be85b0c4"></a><!-- doxytag: member="yaml.h::yaml_parser_t" ref="gfdc6319cb28a8b8034542b29be85b0c4" args="" --> | |
161 | <div class="memitem"> | |
162 | <div class="memproto"> | |
163 | <table class="memname"> | |
164 | <tr> | |
165 | <td class="memname">typedef struct <a class="el" href="structyaml__parser__s.html">yaml_parser_s</a> <a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> </td> | |
166 | </tr> | |
167 | </table> | |
168 | </div> | |
169 | <div class="memdoc"> | |
170 | ||
171 | <p> | |
172 | The parser structure. | |
173 | <p> | |
174 | All members are internal. Manage the structure using the <code>yaml_parser_</code> family of functions. | |
175 | </div> | |
176 | </div><p> | |
177 | <hr><h2>Enumeration Type Documentation</h2> | |
178 | <a class="anchor" name="gd39c19e7b0df6f542ca97806535b57c5"></a><!-- doxytag: member="yaml.h::yaml_parser_state_e" ref="gd39c19e7b0df6f542ca97806535b57c5" args="" --> | |
179 | <div class="memitem"> | |
180 | <div class="memproto"> | |
181 | <table class="memname"> | |
182 | <tr> | |
183 | <td class="memname">enum <a class="el" href="group__parser.html#gd39c19e7b0df6f542ca97806535b57c5">yaml_parser_state_e</a> </td> | |
184 | </tr> | |
185 | </table> | |
186 | </div> | |
187 | <div class="memdoc"> | |
188 | ||
189 | <p> | |
190 | The states of the parser. | |
191 | <p> | |
192 | <dl compact><dt><b>Enumerator: </b></dt><dd> | |
193 | <table border="0" cellspacing="2" cellpadding="0"> | |
194 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c5e7b52e16bf002db5cf2944596d8c880e"></a><!-- doxytag: member="YAML_PARSE_STREAM_START_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c5e7b52e16bf002db5cf2944596d8c880e" args="" -->YAML_PARSE_STREAM_START_STATE</em> </td><td> | |
195 | Expect STREAM-START. | |
196 | <p> | |
197 | </td></tr> | |
198 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c58255725d67d5bd3574fc7df4db1c6c84"></a><!-- doxytag: member="YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c58255725d67d5bd3574fc7df4db1c6c84" args="" -->YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE</em> </td><td> | |
199 | Expect the beginning of an implicit document. | |
200 | <p> | |
201 | </td></tr> | |
202 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c5a06d10f700d245caecfc6074a6c52fde"></a><!-- doxytag: member="YAML_PARSE_DOCUMENT_START_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c5a06d10f700d245caecfc6074a6c52fde" args="" -->YAML_PARSE_DOCUMENT_START_STATE</em> </td><td> | |
203 | Expect DOCUMENT-START. | |
204 | <p> | |
205 | </td></tr> | |
206 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c5e444c7652c8029b0ef80068eaaaa3d4d"></a><!-- doxytag: member="YAML_PARSE_DOCUMENT_CONTENT_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c5e444c7652c8029b0ef80068eaaaa3d4d" args="" -->YAML_PARSE_DOCUMENT_CONTENT_STATE</em> </td><td> | |
207 | Expect the content of a document. | |
208 | <p> | |
209 | </td></tr> | |
210 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c5eef06d7f13fa4501146a5b9876c98239"></a><!-- doxytag: member="YAML_PARSE_DOCUMENT_END_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c5eef06d7f13fa4501146a5b9876c98239" args="" -->YAML_PARSE_DOCUMENT_END_STATE</em> </td><td> | |
211 | Expect DOCUMENT-END. | |
212 | <p> | |
213 | </td></tr> | |
214 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c5e1893c0835bacf05cdc21ed181fb75f1"></a><!-- doxytag: member="YAML_PARSE_BLOCK_NODE_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c5e1893c0835bacf05cdc21ed181fb75f1" args="" -->YAML_PARSE_BLOCK_NODE_STATE</em> </td><td> | |
215 | Expect a block node. | |
216 | <p> | |
217 | </td></tr> | |
218 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c5cbd390af0d3919fe0382d03c284ff3b5"></a><!-- doxytag: member="YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c5cbd390af0d3919fe0382d03c284ff3b5" args="" -->YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE</em> </td><td> | |
219 | Expect a block node or indentless sequence. | |
220 | <p> | |
221 | </td></tr> | |
222 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c55bb321f9d18c5b208a71c04bbcbd1d01"></a><!-- doxytag: member="YAML_PARSE_FLOW_NODE_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c55bb321f9d18c5b208a71c04bbcbd1d01" args="" -->YAML_PARSE_FLOW_NODE_STATE</em> </td><td> | |
223 | Expect a flow node. | |
224 | <p> | |
225 | </td></tr> | |
226 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c55bb5f95fc5f1a258ee8e9db0ed25b2d9"></a><!-- doxytag: member="YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c55bb5f95fc5f1a258ee8e9db0ed25b2d9" args="" -->YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE</em> </td><td> | |
227 | Expect the first entry of a block sequence. | |
228 | <p> | |
229 | </td></tr> | |
230 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c58a6cb1f12fe08eee7fc2fa854dbd5b1a"></a><!-- doxytag: member="YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c58a6cb1f12fe08eee7fc2fa854dbd5b1a" args="" -->YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE</em> </td><td> | |
231 | Expect an entry of a block sequence. | |
232 | <p> | |
233 | </td></tr> | |
234 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c5f7095f2141cf9887489e832f0ec61fbd"></a><!-- doxytag: member="YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c5f7095f2141cf9887489e832f0ec61fbd" args="" -->YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE</em> </td><td> | |
235 | Expect an entry of an indentless sequence. | |
236 | <p> | |
237 | </td></tr> | |
238 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c5febcb5bbd67d112d9ecfa633155f0644"></a><!-- doxytag: member="YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c5febcb5bbd67d112d9ecfa633155f0644" args="" -->YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE</em> </td><td> | |
239 | Expect the first key of a block mapping. | |
240 | <p> | |
241 | </td></tr> | |
242 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c52df81c86e90b874b415ecb19e72efe45"></a><!-- doxytag: member="YAML_PARSE_BLOCK_MAPPING_KEY_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c52df81c86e90b874b415ecb19e72efe45" args="" -->YAML_PARSE_BLOCK_MAPPING_KEY_STATE</em> </td><td> | |
243 | Expect a block mapping key. | |
244 | <p> | |
245 | </td></tr> | |
246 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c5e94acf5685fa1538b225413f154465c2"></a><!-- doxytag: member="YAML_PARSE_BLOCK_MAPPING_VALUE_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c5e94acf5685fa1538b225413f154465c2" args="" -->YAML_PARSE_BLOCK_MAPPING_VALUE_STATE</em> </td><td> | |
247 | Expect a block mapping value. | |
248 | <p> | |
249 | </td></tr> | |
250 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c53f54830989c12cc4a63494df792eeb08"></a><!-- doxytag: member="YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c53f54830989c12cc4a63494df792eeb08" args="" -->YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE</em> </td><td> | |
251 | Expect the first entry of a flow sequence. | |
252 | <p> | |
253 | </td></tr> | |
254 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c50e50f3841eb0d37ad159e64c4a9a1171"></a><!-- doxytag: member="YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c50e50f3841eb0d37ad159e64c4a9a1171" args="" -->YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE</em> </td><td> | |
255 | Expect an entry of a flow sequence. | |
256 | <p> | |
257 | </td></tr> | |
258 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c5563e11601cf3a1d2a3efc1feb1b696a3"></a><!-- doxytag: member="YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c5563e11601cf3a1d2a3efc1feb1b696a3" args="" -->YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE</em> </td><td> | |
259 | Expect a key of an ordered mapping. | |
260 | <p> | |
261 | </td></tr> | |
262 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c59e5ebb4bee4541e7a7025689c7fc66eb"></a><!-- doxytag: member="YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c59e5ebb4bee4541e7a7025689c7fc66eb" args="" -->YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE</em> </td><td> | |
263 | Expect a value of an ordered mapping. | |
264 | <p> | |
265 | </td></tr> | |
266 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c5397fd87de9227c64e5308481930b5eeb"></a><!-- doxytag: member="YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c5397fd87de9227c64e5308481930b5eeb" args="" -->YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE</em> </td><td> | |
267 | Expect the and of an ordered mapping entry. | |
268 | <p> | |
269 | </td></tr> | |
270 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c591ac4bbb6629e2b768a3305fb707b7cd"></a><!-- doxytag: member="YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c591ac4bbb6629e2b768a3305fb707b7cd" args="" -->YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE</em> </td><td> | |
271 | Expect the first key of a flow mapping. | |
272 | <p> | |
273 | </td></tr> | |
274 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c5924f8eb891dc7527bf4db594a0b1bff8"></a><!-- doxytag: member="YAML_PARSE_FLOW_MAPPING_KEY_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c5924f8eb891dc7527bf4db594a0b1bff8" args="" -->YAML_PARSE_FLOW_MAPPING_KEY_STATE</em> </td><td> | |
275 | Expect a key of a flow mapping. | |
276 | <p> | |
277 | </td></tr> | |
278 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c53ba351f6cfba029248ada2c0720246d4"></a><!-- doxytag: member="YAML_PARSE_FLOW_MAPPING_VALUE_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c53ba351f6cfba029248ada2c0720246d4" args="" -->YAML_PARSE_FLOW_MAPPING_VALUE_STATE</em> </td><td> | |
279 | Expect a value of a flow mapping. | |
280 | <p> | |
281 | </td></tr> | |
282 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c55a8ec0af5c3314c1ad5e0569b6a5d6d2"></a><!-- doxytag: member="YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c55a8ec0af5c3314c1ad5e0569b6a5d6d2" args="" -->YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE</em> </td><td> | |
283 | Expect an empty value of a flow mapping. | |
284 | <p> | |
285 | </td></tr> | |
286 | <tr><td valign="top"><em><a class="anchor" name="ggd39c19e7b0df6f542ca97806535b57c551fd3d45693e2240251996def375a2a2"></a><!-- doxytag: member="YAML_PARSE_END_STATE" ref="ggd39c19e7b0df6f542ca97806535b57c551fd3d45693e2240251996def375a2a2" args="" -->YAML_PARSE_END_STATE</em> </td><td> | |
287 | Expect nothing. | |
288 | <p> | |
289 | </td></tr> | |
290 | </table> | |
291 | </dl> | |
292 | ||
293 | </div> | |
294 | </div><p> | |
295 | <hr><h2>Function Documentation</h2> | |
296 | <a class="anchor" name="gcc37ceeb5847e38a3fe24eb0c9b53965"></a><!-- doxytag: member="yaml.h::yaml_parser_initialize" ref="gcc37ceeb5847e38a3fe24eb0c9b53965" args="(yaml_parser_t *parser)" --> | |
297 | <div class="memitem"> | |
298 | <div class="memproto"> | |
299 | <table class="memname"> | |
300 | <tr> | |
301 | <td class="memname">int yaml_parser_initialize </td> | |
302 | <td>(</td> | |
303 | <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> | |
304 | <td class="paramname"> <em>parser</em> </td> | |
305 | <td> ) </td> | |
306 | <td></td> | |
307 | </tr> | |
308 | </table> | |
309 | </div> | |
310 | <div class="memdoc"> | |
311 | ||
312 | <p> | |
313 | Initialize a parser. | |
314 | <p> | |
315 | This function creates a new parser object. An application is responsible for destroying the object using the <a class="el" href="group__parser.html#ga27150107c4667c1024ec0651e2ac26b" title="Destroy a parser.">yaml_parser_delete()</a> function.<p> | |
316 | <dl compact><dt><b>Parameters:</b></dt><dd> | |
317 | <table border="0" cellspacing="2" cellpadding="0"> | |
318 | <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>parser</em> </td><td>An empty parser object.</td></tr> | |
319 | </table> | |
320 | </dl> | |
321 | <dl class="return" compact><dt><b>Returns:</b></dt><dd><code>1</code> if the function succeeded, <code>0</code> on error. </dd></dl> | |
322 | ||
323 | </div> | |
324 | </div><p> | |
325 | <a class="anchor" name="ga27150107c4667c1024ec0651e2ac26b"></a><!-- doxytag: member="yaml.h::yaml_parser_delete" ref="ga27150107c4667c1024ec0651e2ac26b" args="(yaml_parser_t *parser)" --> | |
326 | <div class="memitem"> | |
327 | <div class="memproto"> | |
328 | <table class="memname"> | |
329 | <tr> | |
330 | <td class="memname">void yaml_parser_delete </td> | |
331 | <td>(</td> | |
332 | <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> | |
333 | <td class="paramname"> <em>parser</em> </td> | |
334 | <td> ) </td> | |
335 | <td></td> | |
336 | </tr> | |
337 | </table> | |
338 | </div> | |
339 | <div class="memdoc"> | |
340 | ||
341 | <p> | |
342 | Destroy a parser. | |
343 | <p> | |
344 | <dl compact><dt><b>Parameters:</b></dt><dd> | |
345 | <table border="0" cellspacing="2" cellpadding="0"> | |
346 | <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> | |
347 | </table> | |
348 | </dl> | |
349 | ||
350 | </div> | |
351 | </div><p> | |
352 | <a class="anchor" name="g08a94762bf5f4c61f72c1da0a407df0d"></a><!-- doxytag: member="yaml.h::yaml_parser_set_input_string" ref="g08a94762bf5f4c61f72c1da0a407df0d" args="(yaml_parser_t *parser, const unsigned char *input, size_t size)" --> | |
353 | <div class="memitem"> | |
354 | <div class="memproto"> | |
355 | <table class="memname"> | |
356 | <tr> | |
357 | <td class="memname">void yaml_parser_set_input_string </td> | |
358 | <td>(</td> | |
359 | <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> | |
360 | <td class="paramname"> <em>parser</em>, </td> | |
361 | </tr> | |
362 | <tr> | |
363 | <td class="paramkey"></td> | |
364 | <td></td> | |
365 | <td class="paramtype">const unsigned char * </td> | |
366 | <td class="paramname"> <em>input</em>, </td> | |
367 | </tr> | |
368 | <tr> | |
369 | <td class="paramkey"></td> | |
370 | <td></td> | |
371 | <td class="paramtype">size_t </td> | |
372 | <td class="paramname"> <em>size</em></td><td> </td> | |
373 | </tr> | |
374 | <tr> | |
375 | <td></td> | |
376 | <td>)</td> | |
377 | <td></td><td></td><td></td> | |
378 | </tr> | |
379 | </table> | |
380 | </div> | |
381 | <div class="memdoc"> | |
382 | ||
383 | <p> | |
384 | Set a string input. | |
385 | <p> | |
386 | Note that the <em>input</em> pointer must be valid while the <em>parser</em> object exists. The application is responsible for destroing <em>input</em> after destroying the <em>parser</em>.<p> | |
387 | <dl compact><dt><b>Parameters:</b></dt><dd> | |
388 | <table border="0" cellspacing="2" cellpadding="0"> | |
389 | <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> | |
390 | <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>input</em> </td><td>A source data. </td></tr> | |
391 | <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>size</em> </td><td>The length of the source data in bytes. </td></tr> | |
392 | </table> | |
393 | </dl> | |
394 | ||
395 | </div> | |
396 | </div><p> | |
397 | <a class="anchor" name="gc3f00f8beb2365b1e4569692d64696b6"></a><!-- doxytag: member="yaml.h::yaml_parser_set_input_file" ref="gc3f00f8beb2365b1e4569692d64696b6" args="(yaml_parser_t *parser, FILE *file)" --> | |
398 | <div class="memitem"> | |
399 | <div class="memproto"> | |
400 | <table class="memname"> | |
401 | <tr> | |
402 | <td class="memname">void yaml_parser_set_input_file </td> | |
403 | <td>(</td> | |
404 | <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> | |
405 | <td class="paramname"> <em>parser</em>, </td> | |
406 | </tr> | |
407 | <tr> | |
408 | <td class="paramkey"></td> | |
409 | <td></td> | |
410 | <td class="paramtype">FILE * </td> | |
411 | <td class="paramname"> <em>file</em></td><td> </td> | |
412 | </tr> | |
413 | <tr> | |
414 | <td></td> | |
415 | <td>)</td> | |
416 | <td></td><td></td><td></td> | |
417 | </tr> | |
418 | </table> | |
419 | </div> | |
420 | <div class="memdoc"> | |
421 | ||
422 | <p> | |
423 | Set a file input. | |
424 | <p> | |
425 | <em>file</em> should be a file object open for reading. The application is responsible for closing the <em>file</em>.<p> | |
426 | <dl compact><dt><b>Parameters:</b></dt><dd> | |
427 | <table border="0" cellspacing="2" cellpadding="0"> | |
428 | <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> | |
429 | <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>file</em> </td><td>An open file. </td></tr> | |
430 | </table> | |
431 | </dl> | |
432 | ||
433 | </div> | |
434 | </div><p> | |
435 | <a class="anchor" name="gbc67581bfa771a3e787d907d6914b8d9"></a><!-- doxytag: member="yaml.h::yaml_parser_set_input" ref="gbc67581bfa771a3e787d907d6914b8d9" args="(yaml_parser_t *parser, yaml_read_handler_t *handler, void *data)" --> | |
436 | <div class="memitem"> | |
437 | <div class="memproto"> | |
438 | <table class="memname"> | |
439 | <tr> | |
440 | <td class="memname">void yaml_parser_set_input </td> | |
441 | <td>(</td> | |
442 | <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> | |
443 | <td class="paramname"> <em>parser</em>, </td> | |
444 | </tr> | |
445 | <tr> | |
446 | <td class="paramkey"></td> | |
447 | <td></td> | |
448 | <td class="paramtype"><a class="el" href="group__parser.html#g4982f7e4e001ddb47d2819f38f0cd9d6">yaml_read_handler_t</a> * </td> | |
449 | <td class="paramname"> <em>handler</em>, </td> | |
450 | </tr> | |
451 | <tr> | |
452 | <td class="paramkey"></td> | |
453 | <td></td> | |
454 | <td class="paramtype">void * </td> | |
455 | <td class="paramname"> <em>data</em></td><td> </td> | |
456 | </tr> | |
457 | <tr> | |
458 | <td></td> | |
459 | <td>)</td> | |
460 | <td></td><td></td><td></td> | |
461 | </tr> | |
462 | </table> | |
463 | </div> | |
464 | <div class="memdoc"> | |
465 | ||
466 | <p> | |
467 | Set a generic input handler. | |
468 | <p> | |
469 | <dl compact><dt><b>Parameters:</b></dt><dd> | |
470 | <table border="0" cellspacing="2" cellpadding="0"> | |
471 | <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> | |
472 | <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>handler</em> </td><td>A read handler. </td></tr> | |
473 | <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>data</em> </td><td>Any application data for passing to the read handler. </td></tr> | |
474 | </table> | |
475 | </dl> | |
476 | ||
477 | </div> | |
478 | </div><p> | |
479 | <a class="anchor" name="g9565b64975570ed34612a19adf02ae6a"></a><!-- doxytag: member="yaml.h::yaml_parser_set_encoding" ref="g9565b64975570ed34612a19adf02ae6a" args="(yaml_parser_t *parser, yaml_encoding_t encoding)" --> | |
480 | <div class="memitem"> | |
481 | <div class="memproto"> | |
482 | <table class="memname"> | |
483 | <tr> | |
484 | <td class="memname">void yaml_parser_set_encoding </td> | |
485 | <td>(</td> | |
486 | <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> | |
487 | <td class="paramname"> <em>parser</em>, </td> | |
488 | </tr> | |
489 | <tr> | |
490 | <td class="paramkey"></td> | |
491 | <td></td> | |
492 | <td class="paramtype"><a class="el" href="group__basic.html#g2170996d7e636397b5e6bc0c1b7df7c6">yaml_encoding_t</a> </td> | |
493 | <td class="paramname"> <em>encoding</em></td><td> </td> | |
494 | </tr> | |
495 | <tr> | |
496 | <td></td> | |
497 | <td>)</td> | |
498 | <td></td><td></td><td></td> | |
499 | </tr> | |
500 | </table> | |
501 | </div> | |
502 | <div class="memdoc"> | |
503 | ||
504 | <p> | |
505 | Set the source encoding. | |
506 | <p> | |
507 | <dl compact><dt><b>Parameters:</b></dt><dd> | |
508 | <table border="0" cellspacing="2" cellpadding="0"> | |
509 | <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> | |
510 | <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>encoding</em> </td><td>The source encoding. </td></tr> | |
511 | </table> | |
512 | </dl> | |
513 | ||
514 | </div> | |
515 | </div><p> | |
516 | <a class="anchor" name="g6c2144f131ebd600a075d4ba654540f7"></a><!-- doxytag: member="yaml.h::yaml_parser_scan" ref="g6c2144f131ebd600a075d4ba654540f7" args="(yaml_parser_t *parser, yaml_token_t *token)" --> | |
517 | <div class="memitem"> | |
518 | <div class="memproto"> | |
519 | <table class="memname"> | |
520 | <tr> | |
521 | <td class="memname">int yaml_parser_scan </td> | |
522 | <td>(</td> | |
523 | <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> | |
524 | <td class="paramname"> <em>parser</em>, </td> | |
525 | </tr> | |
526 | <tr> | |
527 | <td class="paramkey"></td> | |
528 | <td></td> | |
529 | <td class="paramtype"><a class="el" href="structyaml__token__s.html">yaml_token_t</a> * </td> | |
530 | <td class="paramname"> <em>token</em></td><td> </td> | |
531 | </tr> | |
532 | <tr> | |
533 | <td></td> | |
534 | <td>)</td> | |
535 | <td></td><td></td><td></td> | |
536 | </tr> | |
537 | </table> | |
538 | </div> | |
539 | <div class="memdoc"> | |
540 | ||
541 | <p> | |
542 | Scan the input stream and produce the next token. | |
543 | <p> | |
544 | Call the function subsequently to produce a sequence of tokens corresponding to the input stream. The initial token has the type <code>YAML_STREAM_START_TOKEN</code> while the ending token has the type <code>YAML_STREAM_END_TOKEN</code>.<p> | |
545 | An application is responsible for freeing any buffers associated with the produced token object using the <code>yaml_token_delete</code> function.<p> | |
546 | An application must not alternate the calls of <a class="el" href="group__parser.html#g6c2144f131ebd600a075d4ba654540f7" title="Scan the input stream and produce the next token.">yaml_parser_scan()</a> with the calls of <a class="el" href="group__parser.html#g559312fb137533d8b7e07f224fe0ec8f" title="Parse the input stream and produce the next parsing event.">yaml_parser_parse()</a> or <a class="el" href="group__parser.html#g9ef7d6e9494766b5880c389bc431d138" title="Parse the input stream and produce the next YAML document.">yaml_parser_load()</a>. Doing this will break the parser.<p> | |
547 | <dl compact><dt><b>Parameters:</b></dt><dd> | |
548 | <table border="0" cellspacing="2" cellpadding="0"> | |
549 | <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> | |
550 | <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>token</em> </td><td>An empty token object.</td></tr> | |
551 | </table> | |
552 | </dl> | |
553 | <dl class="return" compact><dt><b>Returns:</b></dt><dd><code>1</code> if the function succeeded, <code>0</code> on error. </dd></dl> | |
554 | ||
555 | </div> | |
556 | </div><p> | |
557 | <a class="anchor" name="g559312fb137533d8b7e07f224fe0ec8f"></a><!-- doxytag: member="yaml.h::yaml_parser_parse" ref="g559312fb137533d8b7e07f224fe0ec8f" args="(yaml_parser_t *parser, yaml_event_t *event)" --> | |
558 | <div class="memitem"> | |
559 | <div class="memproto"> | |
560 | <table class="memname"> | |
561 | <tr> | |
562 | <td class="memname">int yaml_parser_parse </td> | |
563 | <td>(</td> | |
564 | <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> | |
565 | <td class="paramname"> <em>parser</em>, </td> | |
566 | </tr> | |
567 | <tr> | |
568 | <td class="paramkey"></td> | |
569 | <td></td> | |
570 | <td class="paramtype"><a class="el" href="structyaml__event__s.html">yaml_event_t</a> * </td> | |
571 | <td class="paramname"> <em>event</em></td><td> </td> | |
572 | </tr> | |
573 | <tr> | |
574 | <td></td> | |
575 | <td>)</td> | |
576 | <td></td><td></td><td></td> | |
577 | </tr> | |
578 | </table> | |
579 | </div> | |
580 | <div class="memdoc"> | |
581 | ||
582 | <p> | |
583 | Parse the input stream and produce the next parsing event. | |
584 | <p> | |
585 | Call the function subsequently to produce a sequence of events corresponding to the input stream. The initial event has the type <code>YAML_STREAM_START_EVENT</code> while the ending event has the type <code>YAML_STREAM_END_EVENT</code>.<p> | |
586 | An application is responsible for freeing any buffers associated with the produced event object using the <a class="el" href="group__events.html#g5330d62ef52856aa53188137cb93a6a1" title="Free any memory allocated for an event object.">yaml_event_delete()</a> function.<p> | |
587 | An application must not alternate the calls of <a class="el" href="group__parser.html#g559312fb137533d8b7e07f224fe0ec8f" title="Parse the input stream and produce the next parsing event.">yaml_parser_parse()</a> with the calls of <a class="el" href="group__parser.html#g6c2144f131ebd600a075d4ba654540f7" title="Scan the input stream and produce the next token.">yaml_parser_scan()</a> or <a class="el" href="group__parser.html#g9ef7d6e9494766b5880c389bc431d138" title="Parse the input stream and produce the next YAML document.">yaml_parser_load()</a>. Doing this will break the parser.<p> | |
588 | <dl compact><dt><b>Parameters:</b></dt><dd> | |
589 | <table border="0" cellspacing="2" cellpadding="0"> | |
590 | <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> | |
591 | <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>event</em> </td><td>An empty event object.</td></tr> | |
592 | </table> | |
593 | </dl> | |
594 | <dl class="return" compact><dt><b>Returns:</b></dt><dd><code>1</code> if the function succeeded, <code>0</code> on error. </dd></dl> | |
595 | ||
596 | </div> | |
597 | </div><p> | |
598 | <a class="anchor" name="g9ef7d6e9494766b5880c389bc431d138"></a><!-- doxytag: member="yaml.h::yaml_parser_load" ref="g9ef7d6e9494766b5880c389bc431d138" args="(yaml_parser_t *parser, yaml_document_t *document)" --> | |
599 | <div class="memitem"> | |
600 | <div class="memproto"> | |
601 | <table class="memname"> | |
602 | <tr> | |
603 | <td class="memname">int yaml_parser_load </td> | |
604 | <td>(</td> | |
605 | <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> | |
606 | <td class="paramname"> <em>parser</em>, </td> | |
607 | </tr> | |
608 | <tr> | |
609 | <td class="paramkey"></td> | |
610 | <td></td> | |
611 | <td class="paramtype"><a class="el" href="structyaml__document__s.html">yaml_document_t</a> * </td> | |
612 | <td class="paramname"> <em>document</em></td><td> </td> | |
613 | </tr> | |
614 | <tr> | |
615 | <td></td> | |
616 | <td>)</td> | |
617 | <td></td><td></td><td></td> | |
618 | </tr> | |
619 | </table> | |
620 | </div> | |
621 | <div class="memdoc"> | |
622 | ||
623 | <p> | |
624 | Parse the input stream and produce the next YAML document. | |
625 | <p> | |
626 | Call this function subsequently to produce a sequence of documents constituting the input stream.<p> | |
627 | If the produced document has no root node, it means that the document end has been reached.<p> | |
628 | An application is responsible for freeing any data associated with the produced document object using the <a class="el" href="group__nodes.html#g2754b1544fb4e110e83fafbc708b0672" title="Delete a YAML document and all its nodes.">yaml_document_delete()</a> function.<p> | |
629 | An application must not alternate the calls of <a class="el" href="group__parser.html#g9ef7d6e9494766b5880c389bc431d138" title="Parse the input stream and produce the next YAML document.">yaml_parser_load()</a> with the calls of <a class="el" href="group__parser.html#g6c2144f131ebd600a075d4ba654540f7" title="Scan the input stream and produce the next token.">yaml_parser_scan()</a> or <a class="el" href="group__parser.html#g559312fb137533d8b7e07f224fe0ec8f" title="Parse the input stream and produce the next parsing event.">yaml_parser_parse()</a>. Doing this will break the parser.<p> | |
630 | <dl compact><dt><b>Parameters:</b></dt><dd> | |
631 | <table border="0" cellspacing="2" cellpadding="0"> | |
632 | <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> | |
633 | <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>document</em> </td><td>An empty document object.</td></tr> | |
634 | </table> | |
635 | </dl> | |
636 | <dl class="return" compact><dt><b>Returns:</b></dt><dd><code>1</code> if the function succeeded, <code>0</code> on error. </dd></dl> | |
637 | ||
638 | </div> | |
639 | </div><p> | |
640 | </div> | |
641 | <hr size="1"><address style="text-align: right;"><small>Generated on Sun Aug 30 22:52:14 2009 for yaml by | |
642 | <a href="http://www.doxygen.org/index.html"> | |
643 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> | |
644 | </body> | |
645 | </html> |