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