group__parser.html revision 247738
1247738Sbapt<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2247738Sbapt<html xmlns="http://www.w3.org/1999/xhtml"> 3247738Sbapt<head> 4247738Sbapt<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 5247738Sbapt<title>yaml: Parser Definitions</title> 6247738Sbapt<link href="tabs.css" rel="stylesheet" type="text/css"/> 7247738Sbapt<link href="doxygen.css" rel="stylesheet" type="text/css"/> 8247738Sbapt</head> 9247738Sbapt<body> 10247738Sbapt<!-- Generated by Doxygen 1.7.1 --> 11247738Sbapt<div class="navigation" id="top"> 12247738Sbapt <div class="tabs"> 13247738Sbapt <ul class="tablist"> 14247738Sbapt <li><a href="index.html"><span>Main Page</span></a></li> 15247738Sbapt <li><a href="modules.html"><span>Modules</span></a></li> 16247738Sbapt <li><a href="annotated.html"><span>Data Structures</span></a></li> 17247738Sbapt <li><a href="files.html"><span>Files</span></a></li> 18247738Sbapt </ul> 19247738Sbapt </div> 20247738Sbapt</div> 21247738Sbapt<div class="header"> 22247738Sbapt <div class="summary"> 23247738Sbapt<a href="#nested-classes">Data Structures</a> | 24247738Sbapt<a href="#typedef-members">Typedefs</a> | 25247738Sbapt<a href="#enum-members">Enumerations</a> | 26247738Sbapt<a href="#func-members">Functions</a> </div> 27247738Sbapt <div class="headertitle"> 28247738Sbapt<h1>Parser Definitions</h1> </div> 29247738Sbapt</div> 30247738Sbapt<div class="contents"> 31247738Sbapt<table class="memberdecls"> 32247738Sbapt<tr><td colspan="2"><h2><a name="nested-classes"></a> 33247738SbaptData Structures</h2></td></tr> 34247738Sbapt<tr><td class="memItemLeft" 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> 35247738Sbapt<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> 36247738Sbapt<tr><td class="memItemLeft" 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> 37247738Sbapt<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> 38247738Sbapt<tr><td class="memItemLeft" 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> 39247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight">The parser structure. <a href="structyaml__parser__s.html#_details">More...</a><br/></td></tr> 40247738Sbapt<tr><td colspan="2"><h2><a name="typedef-members"></a> 41247738SbaptTypedefs</h2></td></tr> 42247738Sbapt<tr><td class="memItemLeft" align="right" valign="top">typedef int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#ga4982f7e4e001ddb47d2819f38f0cd9d6">yaml_read_handler_t</a> (void *data, unsigned char *buffer, size_t size, size_t *size_read)</td></tr> 43247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight">The prototype of a read handler. <a href="#ga4982f7e4e001ddb47d2819f38f0cd9d6"></a><br/></td></tr> 44247738Sbapt<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae5570fbb7ab7c8332cd666f3a9c26591"></a><!-- doxytag: member="parser::yaml_simple_key_t" ref="gae5570fbb7ab7c8332cd666f3a9c26591" args="" --> 45247738Sbapttypedef 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#gae5570fbb7ab7c8332cd666f3a9c26591">yaml_simple_key_t</a></td></tr> 46247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight">This structure holds information about a potential simple key. <br/></td></tr> 47247738Sbapt<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga52b56d3e3cee0f9ba460978802a8c83b"></a><!-- doxytag: member="parser::yaml_parser_state_t" ref="ga52b56d3e3cee0f9ba460978802a8c83b" args="" --> 48247738Sbapttypedef enum <a class="el" href="group__parser.html#gad39c19e7b0df6f542ca97806535b57c5">yaml_parser_state_e</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#ga52b56d3e3cee0f9ba460978802a8c83b">yaml_parser_state_t</a></td></tr> 49247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight">The states of the parser. <br/></td></tr> 50247738Sbapt<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1434228b82f5f90d3c8ccda816e9ca9d"></a><!-- doxytag: member="parser::yaml_alias_data_t" ref="ga1434228b82f5f90d3c8ccda816e9ca9d" args="" --> 51247738Sbapttypedef 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#ga1434228b82f5f90d3c8ccda816e9ca9d">yaml_alias_data_t</a></td></tr> 52247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight">This structure holds aliases data. <br/></td></tr> 53247738Sbapt<tr><td class="memItemLeft" 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#gafdc6319cb28a8b8034542b29be85b0c4">yaml_parser_t</a></td></tr> 54247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight">The parser structure. <a href="#gafdc6319cb28a8b8034542b29be85b0c4"></a><br/></td></tr> 55247738Sbapt<tr><td colspan="2"><h2><a name="enum-members"></a> 56247738SbaptEnumerations</h2></td></tr> 57247738Sbapt<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#gad39c19e7b0df6f542ca97806535b57c5">yaml_parser_state_e</a> { <br/> 58247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5ae7b52e16bf002db5cf2944596d8c880e">YAML_PARSE_STREAM_START_STATE</a>, 59247738Sbapt<br/> 60247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5a8255725d67d5bd3574fc7df4db1c6c84">YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE</a>, 61247738Sbapt<br/> 62247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5aa06d10f700d245caecfc6074a6c52fde">YAML_PARSE_DOCUMENT_START_STATE</a>, 63247738Sbapt<br/> 64247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5ae444c7652c8029b0ef80068eaaaa3d4d">YAML_PARSE_DOCUMENT_CONTENT_STATE</a>, 65247738Sbapt<br/> 66247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5aeef06d7f13fa4501146a5b9876c98239">YAML_PARSE_DOCUMENT_END_STATE</a>, 67247738Sbapt<br/> 68247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5ae1893c0835bacf05cdc21ed181fb75f1">YAML_PARSE_BLOCK_NODE_STATE</a>, 69247738Sbapt<br/> 70247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5acbd390af0d3919fe0382d03c284ff3b5">YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE</a>, 71247738Sbapt<br/> 72247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5a5bb321f9d18c5b208a71c04bbcbd1d01">YAML_PARSE_FLOW_NODE_STATE</a>, 73247738Sbapt<br/> 74247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5a5bb5f95fc5f1a258ee8e9db0ed25b2d9">YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE</a>, 75247738Sbapt<br/> 76247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5a8a6cb1f12fe08eee7fc2fa854dbd5b1a">YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE</a>, 77247738Sbapt<br/> 78247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5af7095f2141cf9887489e832f0ec61fbd">YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE</a>, 79247738Sbapt<br/> 80247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5afebcb5bbd67d112d9ecfa633155f0644">YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE</a>, 81247738Sbapt<br/> 82247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5a2df81c86e90b874b415ecb19e72efe45">YAML_PARSE_BLOCK_MAPPING_KEY_STATE</a>, 83247738Sbapt<br/> 84247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5ae94acf5685fa1538b225413f154465c2">YAML_PARSE_BLOCK_MAPPING_VALUE_STATE</a>, 85247738Sbapt<br/> 86247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5a3f54830989c12cc4a63494df792eeb08">YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE</a>, 87247738Sbapt<br/> 88247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5a0e50f3841eb0d37ad159e64c4a9a1171">YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE</a>, 89247738Sbapt<br/> 90247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5a563e11601cf3a1d2a3efc1feb1b696a3">YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE</a>, 91247738Sbapt<br/> 92247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5a9e5ebb4bee4541e7a7025689c7fc66eb">YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE</a>, 93247738Sbapt<br/> 94247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5a397fd87de9227c64e5308481930b5eeb">YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE</a>, 95247738Sbapt<br/> 96247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5a91ac4bbb6629e2b768a3305fb707b7cd">YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE</a>, 97247738Sbapt<br/> 98247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5a924f8eb891dc7527bf4db594a0b1bff8">YAML_PARSE_FLOW_MAPPING_KEY_STATE</a>, 99247738Sbapt<br/> 100247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5a3ba351f6cfba029248ada2c0720246d4">YAML_PARSE_FLOW_MAPPING_VALUE_STATE</a>, 101247738Sbapt<br/> 102247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5a5a8ec0af5c3314c1ad5e0569b6a5d6d2">YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE</a>, 103247738Sbapt<br/> 104247738Sbapt <a class="el" href="group__parser.html#ggad39c19e7b0df6f542ca97806535b57c5a51fd3d45693e2240251996def375a2a2">YAML_PARSE_END_STATE</a> 105247738Sbapt<br/> 106247738Sbapt }</td></tr> 107247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight"><p>The states of the parser. </p> 108247738Sbapt <a href="group__parser.html#gad39c19e7b0df6f542ca97806535b57c5">More...</a><br/></td></tr> 109247738Sbapt<tr><td colspan="2"><h2><a name="func-members"></a> 110247738SbaptFunctions</h2></td></tr> 111247738Sbapt<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#gacc37ceeb5847e38a3fe24eb0c9b53965">yaml_parser_initialize</a> (<a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> *parser)</td></tr> 112247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize a parser. <a href="#gacc37ceeb5847e38a3fe24eb0c9b53965"></a><br/></td></tr> 113247738Sbapt<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#gaa27150107c4667c1024ec0651e2ac26b">yaml_parser_delete</a> (<a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> *parser)</td></tr> 114247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy a parser. <a href="#gaa27150107c4667c1024ec0651e2ac26b"></a><br/></td></tr> 115247738Sbapt<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#ga08a94762bf5f4c61f72c1da0a407df0d">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> 116247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight">Set a string input. <a href="#ga08a94762bf5f4c61f72c1da0a407df0d"></a><br/></td></tr> 117247738Sbapt<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#gac3f00f8beb2365b1e4569692d64696b6">yaml_parser_set_input_file</a> (<a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> *parser, FILE *file)</td></tr> 118247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight">Set a file input. <a href="#gac3f00f8beb2365b1e4569692d64696b6"></a><br/></td></tr> 119247738Sbapt<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#gabc67581bfa771a3e787d907d6914b8d9">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#ga4982f7e4e001ddb47d2819f38f0cd9d6">yaml_read_handler_t</a> *handler, void *data)</td></tr> 120247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight">Set a generic input handler. <a href="#gabc67581bfa771a3e787d907d6914b8d9"></a><br/></td></tr> 121247738Sbapt<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#ga9565b64975570ed34612a19adf02ae6a">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#ga2170996d7e636397b5e6bc0c1b7df7c6">yaml_encoding_t</a> encoding)</td></tr> 122247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the source encoding. <a href="#ga9565b64975570ed34612a19adf02ae6a"></a><br/></td></tr> 123247738Sbapt<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#ga6c2144f131ebd600a075d4ba654540f7">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> 124247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight">Scan the input stream and produce the next token. <a href="#ga6c2144f131ebd600a075d4ba654540f7"></a><br/></td></tr> 125247738Sbapt<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#ga559312fb137533d8b7e07f224fe0ec8f">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> 126247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight">Parse the input stream and produce the next parsing event. <a href="#ga559312fb137533d8b7e07f224fe0ec8f"></a><br/></td></tr> 127247738Sbapt<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__parser.html#ga9ef7d6e9494766b5880c389bc431d138">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> 128247738Sbapt<tr><td class="mdescLeft"> </td><td class="mdescRight">Parse the input stream and produce the next YAML document. <a href="#ga9ef7d6e9494766b5880c389bc431d138"></a><br/></td></tr> 129247738Sbapt</table> 130247738Sbapt<hr/><h2>Typedef Documentation</h2> 131247738Sbapt<a class="anchor" id="ga4982f7e4e001ddb47d2819f38f0cd9d6"></a><!-- doxytag: member="yaml.h::yaml_read_handler_t" ref="ga4982f7e4e001ddb47d2819f38f0cd9d6" args="(void *data, unsigned char *buffer, size_t size, size_t *size_read)" --> 132247738Sbapt<div class="memitem"> 133247738Sbapt<div class="memproto"> 134247738Sbapt <table class="memname"> 135247738Sbapt <tr> 136247738Sbapt <td class="memname">typedef int <a class="el" href="group__parser.html#ga4982f7e4e001ddb47d2819f38f0cd9d6">yaml_read_handler_t</a>(void *data, unsigned char *buffer, size_t size, size_t *size_read)</td> 137247738Sbapt </tr> 138247738Sbapt </table> 139247738Sbapt</div> 140247738Sbapt<div class="memdoc"> 141247738Sbapt 142247738Sbapt<p>The prototype of a read handler. </p> 143247738Sbapt<p>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> 144247738Sbapt<dl><dt><b>Parameters:</b></dt><dd> 145247738Sbapt <table border="0" cellspacing="2" cellpadding="0"> 146247738Sbapt <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#gabc67581bfa771a3e787d907d6914b8d9" title="Set a generic input handler.">yaml_parser_set_input()</a>. </td></tr> 147247738Sbapt <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> 148247738Sbapt <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>size</em> </td><td>The size of the buffer. </td></tr> 149247738Sbapt <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> 150247738Sbapt </table> 151247738Sbapt </dd> 152247738Sbapt</dl> 153247738Sbapt<dl class="return"><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> 154247738Sbapt 155247738Sbapt</div> 156247738Sbapt</div> 157247738Sbapt<a class="anchor" id="gafdc6319cb28a8b8034542b29be85b0c4"></a><!-- doxytag: member="yaml.h::yaml_parser_t" ref="gafdc6319cb28a8b8034542b29be85b0c4" args="" --> 158247738Sbapt<div class="memitem"> 159247738Sbapt<div class="memproto"> 160247738Sbapt <table class="memname"> 161247738Sbapt <tr> 162247738Sbapt <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> 163247738Sbapt </tr> 164247738Sbapt </table> 165247738Sbapt</div> 166247738Sbapt<div class="memdoc"> 167247738Sbapt 168247738Sbapt<p>The parser structure. </p> 169247738Sbapt<p>All members are internal. Manage the structure using the <code>yaml_parser_</code> family of functions. </p> 170247738Sbapt 171247738Sbapt</div> 172247738Sbapt</div> 173247738Sbapt<hr/><h2>Enumeration Type Documentation</h2> 174247738Sbapt<a class="anchor" id="gad39c19e7b0df6f542ca97806535b57c5"></a><!-- doxytag: member="yaml.h::yaml_parser_state_e" ref="gad39c19e7b0df6f542ca97806535b57c5" args="" --> 175247738Sbapt<div class="memitem"> 176247738Sbapt<div class="memproto"> 177247738Sbapt <table class="memname"> 178247738Sbapt <tr> 179247738Sbapt <td class="memname">enum <a class="el" href="group__parser.html#gad39c19e7b0df6f542ca97806535b57c5">yaml_parser_state_e</a></td> 180247738Sbapt </tr> 181247738Sbapt </table> 182247738Sbapt</div> 183247738Sbapt<div class="memdoc"> 184247738Sbapt 185247738Sbapt<p>The states of the parser. </p> 186247738Sbapt<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0"> 187247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5ae7b52e16bf002db5cf2944596d8c880e"></a><!-- doxytag: member="YAML_PARSE_STREAM_START_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5ae7b52e16bf002db5cf2944596d8c880e" args="" -->YAML_PARSE_STREAM_START_STATE</em> </td><td> 188247738Sbapt<p>Expect STREAM-START. </p> 189247738Sbapt</td></tr> 190247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5a8255725d67d5bd3574fc7df4db1c6c84"></a><!-- doxytag: member="YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5a8255725d67d5bd3574fc7df4db1c6c84" args="" -->YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE</em> </td><td> 191247738Sbapt<p>Expect the beginning of an implicit document. </p> 192247738Sbapt</td></tr> 193247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5aa06d10f700d245caecfc6074a6c52fde"></a><!-- doxytag: member="YAML_PARSE_DOCUMENT_START_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5aa06d10f700d245caecfc6074a6c52fde" args="" -->YAML_PARSE_DOCUMENT_START_STATE</em> </td><td> 194247738Sbapt<p>Expect DOCUMENT-START. </p> 195247738Sbapt</td></tr> 196247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5ae444c7652c8029b0ef80068eaaaa3d4d"></a><!-- doxytag: member="YAML_PARSE_DOCUMENT_CONTENT_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5ae444c7652c8029b0ef80068eaaaa3d4d" args="" -->YAML_PARSE_DOCUMENT_CONTENT_STATE</em> </td><td> 197247738Sbapt<p>Expect the content of a document. </p> 198247738Sbapt</td></tr> 199247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5aeef06d7f13fa4501146a5b9876c98239"></a><!-- doxytag: member="YAML_PARSE_DOCUMENT_END_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5aeef06d7f13fa4501146a5b9876c98239" args="" -->YAML_PARSE_DOCUMENT_END_STATE</em> </td><td> 200247738Sbapt<p>Expect DOCUMENT-END. </p> 201247738Sbapt</td></tr> 202247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5ae1893c0835bacf05cdc21ed181fb75f1"></a><!-- doxytag: member="YAML_PARSE_BLOCK_NODE_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5ae1893c0835bacf05cdc21ed181fb75f1" args="" -->YAML_PARSE_BLOCK_NODE_STATE</em> </td><td> 203247738Sbapt<p>Expect a block node. </p> 204247738Sbapt</td></tr> 205247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5acbd390af0d3919fe0382d03c284ff3b5"></a><!-- doxytag: member="YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5acbd390af0d3919fe0382d03c284ff3b5" args="" -->YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE</em> </td><td> 206247738Sbapt<p>Expect a block node or indentless sequence. </p> 207247738Sbapt</td></tr> 208247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5a5bb321f9d18c5b208a71c04bbcbd1d01"></a><!-- doxytag: member="YAML_PARSE_FLOW_NODE_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5a5bb321f9d18c5b208a71c04bbcbd1d01" args="" -->YAML_PARSE_FLOW_NODE_STATE</em> </td><td> 209247738Sbapt<p>Expect a flow node. </p> 210247738Sbapt</td></tr> 211247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5a5bb5f95fc5f1a258ee8e9db0ed25b2d9"></a><!-- doxytag: member="YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5a5bb5f95fc5f1a258ee8e9db0ed25b2d9" args="" -->YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE</em> </td><td> 212247738Sbapt<p>Expect the first entry of a block sequence. </p> 213247738Sbapt</td></tr> 214247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5a8a6cb1f12fe08eee7fc2fa854dbd5b1a"></a><!-- doxytag: member="YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5a8a6cb1f12fe08eee7fc2fa854dbd5b1a" args="" -->YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE</em> </td><td> 215247738Sbapt<p>Expect an entry of a block sequence. </p> 216247738Sbapt</td></tr> 217247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5af7095f2141cf9887489e832f0ec61fbd"></a><!-- doxytag: member="YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5af7095f2141cf9887489e832f0ec61fbd" args="" -->YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE</em> </td><td> 218247738Sbapt<p>Expect an entry of an indentless sequence. </p> 219247738Sbapt</td></tr> 220247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5afebcb5bbd67d112d9ecfa633155f0644"></a><!-- doxytag: member="YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5afebcb5bbd67d112d9ecfa633155f0644" args="" -->YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE</em> </td><td> 221247738Sbapt<p>Expect the first key of a block mapping. </p> 222247738Sbapt</td></tr> 223247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5a2df81c86e90b874b415ecb19e72efe45"></a><!-- doxytag: member="YAML_PARSE_BLOCK_MAPPING_KEY_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5a2df81c86e90b874b415ecb19e72efe45" args="" -->YAML_PARSE_BLOCK_MAPPING_KEY_STATE</em> </td><td> 224247738Sbapt<p>Expect a block mapping key. </p> 225247738Sbapt</td></tr> 226247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5ae94acf5685fa1538b225413f154465c2"></a><!-- doxytag: member="YAML_PARSE_BLOCK_MAPPING_VALUE_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5ae94acf5685fa1538b225413f154465c2" args="" -->YAML_PARSE_BLOCK_MAPPING_VALUE_STATE</em> </td><td> 227247738Sbapt<p>Expect a block mapping value. </p> 228247738Sbapt</td></tr> 229247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5a3f54830989c12cc4a63494df792eeb08"></a><!-- doxytag: member="YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5a3f54830989c12cc4a63494df792eeb08" args="" -->YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE</em> </td><td> 230247738Sbapt<p>Expect the first entry of a flow sequence. </p> 231247738Sbapt</td></tr> 232247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5a0e50f3841eb0d37ad159e64c4a9a1171"></a><!-- doxytag: member="YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5a0e50f3841eb0d37ad159e64c4a9a1171" args="" -->YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE</em> </td><td> 233247738Sbapt<p>Expect an entry of a flow sequence. </p> 234247738Sbapt</td></tr> 235247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5a563e11601cf3a1d2a3efc1feb1b696a3"></a><!-- doxytag: member="YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5a563e11601cf3a1d2a3efc1feb1b696a3" args="" -->YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE</em> </td><td> 236247738Sbapt<p>Expect a key of an ordered mapping. </p> 237247738Sbapt</td></tr> 238247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5a9e5ebb4bee4541e7a7025689c7fc66eb"></a><!-- doxytag: member="YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5a9e5ebb4bee4541e7a7025689c7fc66eb" args="" -->YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE</em> </td><td> 239247738Sbapt<p>Expect a value of an ordered mapping. </p> 240247738Sbapt</td></tr> 241247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5a397fd87de9227c64e5308481930b5eeb"></a><!-- doxytag: member="YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5a397fd87de9227c64e5308481930b5eeb" args="" -->YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE</em> </td><td> 242247738Sbapt<p>Expect the and of an ordered mapping entry. </p> 243247738Sbapt</td></tr> 244247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5a91ac4bbb6629e2b768a3305fb707b7cd"></a><!-- doxytag: member="YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5a91ac4bbb6629e2b768a3305fb707b7cd" args="" -->YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE</em> </td><td> 245247738Sbapt<p>Expect the first key of a flow mapping. </p> 246247738Sbapt</td></tr> 247247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5a924f8eb891dc7527bf4db594a0b1bff8"></a><!-- doxytag: member="YAML_PARSE_FLOW_MAPPING_KEY_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5a924f8eb891dc7527bf4db594a0b1bff8" args="" -->YAML_PARSE_FLOW_MAPPING_KEY_STATE</em> </td><td> 248247738Sbapt<p>Expect a key of a flow mapping. </p> 249247738Sbapt</td></tr> 250247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5a3ba351f6cfba029248ada2c0720246d4"></a><!-- doxytag: member="YAML_PARSE_FLOW_MAPPING_VALUE_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5a3ba351f6cfba029248ada2c0720246d4" args="" -->YAML_PARSE_FLOW_MAPPING_VALUE_STATE</em> </td><td> 251247738Sbapt<p>Expect a value of a flow mapping. </p> 252247738Sbapt</td></tr> 253247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5a5a8ec0af5c3314c1ad5e0569b6a5d6d2"></a><!-- doxytag: member="YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5a5a8ec0af5c3314c1ad5e0569b6a5d6d2" args="" -->YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE</em> </td><td> 254247738Sbapt<p>Expect an empty value of a flow mapping. </p> 255247738Sbapt</td></tr> 256247738Sbapt<tr><td valign="top"><em><a class="anchor" id="ggad39c19e7b0df6f542ca97806535b57c5a51fd3d45693e2240251996def375a2a2"></a><!-- doxytag: member="YAML_PARSE_END_STATE" ref="ggad39c19e7b0df6f542ca97806535b57c5a51fd3d45693e2240251996def375a2a2" args="" -->YAML_PARSE_END_STATE</em> </td><td> 257247738Sbapt<p>Expect nothing. </p> 258247738Sbapt</td></tr> 259247738Sbapt</table> 260247738Sbapt</dd> 261247738Sbapt</dl> 262247738Sbapt 263247738Sbapt</div> 264247738Sbapt</div> 265247738Sbapt<hr/><h2>Function Documentation</h2> 266247738Sbapt<a class="anchor" id="gacc37ceeb5847e38a3fe24eb0c9b53965"></a><!-- doxytag: member="yaml.h::yaml_parser_initialize" ref="gacc37ceeb5847e38a3fe24eb0c9b53965" args="(yaml_parser_t *parser)" --> 267247738Sbapt<div class="memitem"> 268247738Sbapt<div class="memproto"> 269247738Sbapt <table class="memname"> 270247738Sbapt <tr> 271247738Sbapt <td class="memname">int yaml_parser_initialize </td> 272247738Sbapt <td>(</td> 273247738Sbapt <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> 274247738Sbapt <td class="paramname"> <em>parser</em></td> 275247738Sbapt <td> ) </td> 276247738Sbapt <td></td> 277247738Sbapt </tr> 278247738Sbapt </table> 279247738Sbapt</div> 280247738Sbapt<div class="memdoc"> 281247738Sbapt 282247738Sbapt<p>Initialize a parser. </p> 283247738Sbapt<p>This function creates a new parser object. An application is responsible for destroying the object using the <a class="el" href="group__parser.html#gaa27150107c4667c1024ec0651e2ac26b" title="Destroy a parser.">yaml_parser_delete()</a> function.</p> 284247738Sbapt<dl><dt><b>Parameters:</b></dt><dd> 285247738Sbapt <table border="0" cellspacing="2" cellpadding="0"> 286247738Sbapt <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>parser</em> </td><td>An empty parser object.</td></tr> 287247738Sbapt </table> 288247738Sbapt </dd> 289247738Sbapt</dl> 290247738Sbapt<dl class="return"><dt><b>Returns:</b></dt><dd><code>1</code> if the function succeeded, <code>0</code> on error. </dd></dl> 291247738Sbapt 292247738Sbapt</div> 293247738Sbapt</div> 294247738Sbapt<a class="anchor" id="gaa27150107c4667c1024ec0651e2ac26b"></a><!-- doxytag: member="yaml.h::yaml_parser_delete" ref="gaa27150107c4667c1024ec0651e2ac26b" args="(yaml_parser_t *parser)" --> 295247738Sbapt<div class="memitem"> 296247738Sbapt<div class="memproto"> 297247738Sbapt <table class="memname"> 298247738Sbapt <tr> 299247738Sbapt <td class="memname">void yaml_parser_delete </td> 300247738Sbapt <td>(</td> 301247738Sbapt <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> 302247738Sbapt <td class="paramname"> <em>parser</em></td> 303247738Sbapt <td> ) </td> 304247738Sbapt <td></td> 305247738Sbapt </tr> 306247738Sbapt </table> 307247738Sbapt</div> 308247738Sbapt<div class="memdoc"> 309247738Sbapt 310247738Sbapt<p>Destroy a parser. </p> 311247738Sbapt<dl><dt><b>Parameters:</b></dt><dd> 312247738Sbapt <table border="0" cellspacing="2" cellpadding="0"> 313247738Sbapt <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> 314247738Sbapt </table> 315247738Sbapt </dd> 316247738Sbapt</dl> 317247738Sbapt 318247738Sbapt</div> 319247738Sbapt</div> 320247738Sbapt<a class="anchor" id="ga08a94762bf5f4c61f72c1da0a407df0d"></a><!-- doxytag: member="yaml.h::yaml_parser_set_input_string" ref="ga08a94762bf5f4c61f72c1da0a407df0d" args="(yaml_parser_t *parser, const unsigned char *input, size_t size)" --> 321247738Sbapt<div class="memitem"> 322247738Sbapt<div class="memproto"> 323247738Sbapt <table class="memname"> 324247738Sbapt <tr> 325247738Sbapt <td class="memname">void yaml_parser_set_input_string </td> 326247738Sbapt <td>(</td> 327247738Sbapt <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> 328247738Sbapt <td class="paramname"> <em>parser</em>, </td> 329247738Sbapt </tr> 330247738Sbapt <tr> 331247738Sbapt <td class="paramkey"></td> 332247738Sbapt <td></td> 333247738Sbapt <td class="paramtype">const unsigned char * </td> 334247738Sbapt <td class="paramname"> <em>input</em>, </td> 335247738Sbapt </tr> 336247738Sbapt <tr> 337247738Sbapt <td class="paramkey"></td> 338247738Sbapt <td></td> 339247738Sbapt <td class="paramtype">size_t </td> 340247738Sbapt <td class="paramname"> <em>size</em></td><td> </td> 341247738Sbapt </tr> 342247738Sbapt <tr> 343247738Sbapt <td></td> 344247738Sbapt <td>)</td> 345247738Sbapt <td></td><td></td><td></td> 346247738Sbapt </tr> 347247738Sbapt </table> 348247738Sbapt</div> 349247738Sbapt<div class="memdoc"> 350247738Sbapt 351247738Sbapt<p>Set a string input. </p> 352247738Sbapt<p>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> 353247738Sbapt<dl><dt><b>Parameters:</b></dt><dd> 354247738Sbapt <table border="0" cellspacing="2" cellpadding="0"> 355247738Sbapt <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> 356247738Sbapt <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>input</em> </td><td>A source data. </td></tr> 357247738Sbapt <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> 358247738Sbapt </table> 359247738Sbapt </dd> 360247738Sbapt</dl> 361247738Sbapt 362247738Sbapt</div> 363247738Sbapt</div> 364247738Sbapt<a class="anchor" id="gac3f00f8beb2365b1e4569692d64696b6"></a><!-- doxytag: member="yaml.h::yaml_parser_set_input_file" ref="gac3f00f8beb2365b1e4569692d64696b6" args="(yaml_parser_t *parser, FILE *file)" --> 365247738Sbapt<div class="memitem"> 366247738Sbapt<div class="memproto"> 367247738Sbapt <table class="memname"> 368247738Sbapt <tr> 369247738Sbapt <td class="memname">void yaml_parser_set_input_file </td> 370247738Sbapt <td>(</td> 371247738Sbapt <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> 372247738Sbapt <td class="paramname"> <em>parser</em>, </td> 373247738Sbapt </tr> 374247738Sbapt <tr> 375247738Sbapt <td class="paramkey"></td> 376247738Sbapt <td></td> 377247738Sbapt <td class="paramtype">FILE * </td> 378247738Sbapt <td class="paramname"> <em>file</em></td><td> </td> 379247738Sbapt </tr> 380247738Sbapt <tr> 381247738Sbapt <td></td> 382247738Sbapt <td>)</td> 383247738Sbapt <td></td><td></td><td></td> 384247738Sbapt </tr> 385247738Sbapt </table> 386247738Sbapt</div> 387247738Sbapt<div class="memdoc"> 388247738Sbapt 389247738Sbapt<p>Set a file input. </p> 390247738Sbapt<p><em>file</em> should be a file object open for reading. The application is responsible for closing the <em>file</em>.</p> 391247738Sbapt<dl><dt><b>Parameters:</b></dt><dd> 392247738Sbapt <table border="0" cellspacing="2" cellpadding="0"> 393247738Sbapt <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> 394247738Sbapt <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>file</em> </td><td>An open file. </td></tr> 395247738Sbapt </table> 396247738Sbapt </dd> 397247738Sbapt</dl> 398247738Sbapt 399247738Sbapt</div> 400247738Sbapt</div> 401247738Sbapt<a class="anchor" id="gabc67581bfa771a3e787d907d6914b8d9"></a><!-- doxytag: member="yaml.h::yaml_parser_set_input" ref="gabc67581bfa771a3e787d907d6914b8d9" args="(yaml_parser_t *parser, yaml_read_handler_t *handler, void *data)" --> 402247738Sbapt<div class="memitem"> 403247738Sbapt<div class="memproto"> 404247738Sbapt <table class="memname"> 405247738Sbapt <tr> 406247738Sbapt <td class="memname">void yaml_parser_set_input </td> 407247738Sbapt <td>(</td> 408247738Sbapt <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> 409247738Sbapt <td class="paramname"> <em>parser</em>, </td> 410247738Sbapt </tr> 411247738Sbapt <tr> 412247738Sbapt <td class="paramkey"></td> 413247738Sbapt <td></td> 414247738Sbapt <td class="paramtype"><a class="el" href="group__parser.html#ga4982f7e4e001ddb47d2819f38f0cd9d6">yaml_read_handler_t</a> * </td> 415247738Sbapt <td class="paramname"> <em>handler</em>, </td> 416247738Sbapt </tr> 417247738Sbapt <tr> 418247738Sbapt <td class="paramkey"></td> 419247738Sbapt <td></td> 420247738Sbapt <td class="paramtype">void * </td> 421247738Sbapt <td class="paramname"> <em>data</em></td><td> </td> 422247738Sbapt </tr> 423247738Sbapt <tr> 424247738Sbapt <td></td> 425247738Sbapt <td>)</td> 426247738Sbapt <td></td><td></td><td></td> 427247738Sbapt </tr> 428247738Sbapt </table> 429247738Sbapt</div> 430247738Sbapt<div class="memdoc"> 431247738Sbapt 432247738Sbapt<p>Set a generic input handler. </p> 433247738Sbapt<dl><dt><b>Parameters:</b></dt><dd> 434247738Sbapt <table border="0" cellspacing="2" cellpadding="0"> 435247738Sbapt <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> 436247738Sbapt <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>handler</em> </td><td>A read handler. </td></tr> 437247738Sbapt <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> 438247738Sbapt </table> 439247738Sbapt </dd> 440247738Sbapt</dl> 441247738Sbapt 442247738Sbapt</div> 443247738Sbapt</div> 444247738Sbapt<a class="anchor" id="ga9565b64975570ed34612a19adf02ae6a"></a><!-- doxytag: member="yaml.h::yaml_parser_set_encoding" ref="ga9565b64975570ed34612a19adf02ae6a" args="(yaml_parser_t *parser, yaml_encoding_t encoding)" --> 445247738Sbapt<div class="memitem"> 446247738Sbapt<div class="memproto"> 447247738Sbapt <table class="memname"> 448247738Sbapt <tr> 449247738Sbapt <td class="memname">void yaml_parser_set_encoding </td> 450247738Sbapt <td>(</td> 451247738Sbapt <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> 452247738Sbapt <td class="paramname"> <em>parser</em>, </td> 453247738Sbapt </tr> 454247738Sbapt <tr> 455247738Sbapt <td class="paramkey"></td> 456247738Sbapt <td></td> 457247738Sbapt <td class="paramtype"><a class="el" href="group__basic.html#ga2170996d7e636397b5e6bc0c1b7df7c6">yaml_encoding_t</a> </td> 458247738Sbapt <td class="paramname"> <em>encoding</em></td><td> </td> 459247738Sbapt </tr> 460247738Sbapt <tr> 461247738Sbapt <td></td> 462247738Sbapt <td>)</td> 463247738Sbapt <td></td><td></td><td></td> 464247738Sbapt </tr> 465247738Sbapt </table> 466247738Sbapt</div> 467247738Sbapt<div class="memdoc"> 468247738Sbapt 469247738Sbapt<p>Set the source encoding. </p> 470247738Sbapt<dl><dt><b>Parameters:</b></dt><dd> 471247738Sbapt <table border="0" cellspacing="2" cellpadding="0"> 472247738Sbapt <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> 473247738Sbapt <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>encoding</em> </td><td>The source encoding. </td></tr> 474247738Sbapt </table> 475247738Sbapt </dd> 476247738Sbapt</dl> 477247738Sbapt 478247738Sbapt</div> 479247738Sbapt</div> 480247738Sbapt<a class="anchor" id="ga6c2144f131ebd600a075d4ba654540f7"></a><!-- doxytag: member="yaml.h::yaml_parser_scan" ref="ga6c2144f131ebd600a075d4ba654540f7" args="(yaml_parser_t *parser, yaml_token_t *token)" --> 481247738Sbapt<div class="memitem"> 482247738Sbapt<div class="memproto"> 483247738Sbapt <table class="memname"> 484247738Sbapt <tr> 485247738Sbapt <td class="memname">int yaml_parser_scan </td> 486247738Sbapt <td>(</td> 487247738Sbapt <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> 488247738Sbapt <td class="paramname"> <em>parser</em>, </td> 489247738Sbapt </tr> 490247738Sbapt <tr> 491247738Sbapt <td class="paramkey"></td> 492247738Sbapt <td></td> 493247738Sbapt <td class="paramtype"><a class="el" href="structyaml__token__s.html">yaml_token_t</a> * </td> 494247738Sbapt <td class="paramname"> <em>token</em></td><td> </td> 495247738Sbapt </tr> 496247738Sbapt <tr> 497247738Sbapt <td></td> 498247738Sbapt <td>)</td> 499247738Sbapt <td></td><td></td><td></td> 500247738Sbapt </tr> 501247738Sbapt </table> 502247738Sbapt</div> 503247738Sbapt<div class="memdoc"> 504247738Sbapt 505247738Sbapt<p>Scan the input stream and produce the next token. </p> 506247738Sbapt<p>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> 507247738Sbapt<p>An application is responsible for freeing any buffers associated with the produced token object using the <code>yaml_token_delete</code> function.</p> 508247738Sbapt<p>An application must not alternate the calls of <a class="el" href="group__parser.html#ga6c2144f131ebd600a075d4ba654540f7" 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#ga559312fb137533d8b7e07f224fe0ec8f" title="Parse the input stream and produce the next parsing event.">yaml_parser_parse()</a> or <a class="el" href="group__parser.html#ga9ef7d6e9494766b5880c389bc431d138" title="Parse the input stream and produce the next YAML document.">yaml_parser_load()</a>. Doing this will break the parser.</p> 509247738Sbapt<dl><dt><b>Parameters:</b></dt><dd> 510247738Sbapt <table border="0" cellspacing="2" cellpadding="0"> 511247738Sbapt <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> 512247738Sbapt <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>token</em> </td><td>An empty token object.</td></tr> 513247738Sbapt </table> 514247738Sbapt </dd> 515247738Sbapt</dl> 516247738Sbapt<dl class="return"><dt><b>Returns:</b></dt><dd><code>1</code> if the function succeeded, <code>0</code> on error. </dd></dl> 517247738Sbapt 518247738Sbapt</div> 519247738Sbapt</div> 520247738Sbapt<a class="anchor" id="ga559312fb137533d8b7e07f224fe0ec8f"></a><!-- doxytag: member="yaml.h::yaml_parser_parse" ref="ga559312fb137533d8b7e07f224fe0ec8f" args="(yaml_parser_t *parser, yaml_event_t *event)" --> 521247738Sbapt<div class="memitem"> 522247738Sbapt<div class="memproto"> 523247738Sbapt <table class="memname"> 524247738Sbapt <tr> 525247738Sbapt <td class="memname">int yaml_parser_parse </td> 526247738Sbapt <td>(</td> 527247738Sbapt <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> 528247738Sbapt <td class="paramname"> <em>parser</em>, </td> 529247738Sbapt </tr> 530247738Sbapt <tr> 531247738Sbapt <td class="paramkey"></td> 532247738Sbapt <td></td> 533247738Sbapt <td class="paramtype"><a class="el" href="structyaml__event__s.html">yaml_event_t</a> * </td> 534247738Sbapt <td class="paramname"> <em>event</em></td><td> </td> 535247738Sbapt </tr> 536247738Sbapt <tr> 537247738Sbapt <td></td> 538247738Sbapt <td>)</td> 539247738Sbapt <td></td><td></td><td></td> 540247738Sbapt </tr> 541247738Sbapt </table> 542247738Sbapt</div> 543247738Sbapt<div class="memdoc"> 544247738Sbapt 545247738Sbapt<p>Parse the input stream and produce the next parsing event. </p> 546247738Sbapt<p>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> 547247738Sbapt<p>An application is responsible for freeing any buffers associated with the produced event object using the <a class="el" href="group__events.html#ga5330d62ef52856aa53188137cb93a6a1" title="Free any memory allocated for an event object.">yaml_event_delete()</a> function.</p> 548247738Sbapt<p>An application must not alternate the calls of <a class="el" href="group__parser.html#ga559312fb137533d8b7e07f224fe0ec8f" 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#ga6c2144f131ebd600a075d4ba654540f7" title="Scan the input stream and produce the next token.">yaml_parser_scan()</a> or <a class="el" href="group__parser.html#ga9ef7d6e9494766b5880c389bc431d138" title="Parse the input stream and produce the next YAML document.">yaml_parser_load()</a>. Doing this will break the parser.</p> 549247738Sbapt<dl><dt><b>Parameters:</b></dt><dd> 550247738Sbapt <table border="0" cellspacing="2" cellpadding="0"> 551247738Sbapt <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> 552247738Sbapt <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>event</em> </td><td>An empty event object.</td></tr> 553247738Sbapt </table> 554247738Sbapt </dd> 555247738Sbapt</dl> 556247738Sbapt<dl class="return"><dt><b>Returns:</b></dt><dd><code>1</code> if the function succeeded, <code>0</code> on error. </dd></dl> 557247738Sbapt 558247738Sbapt</div> 559247738Sbapt</div> 560247738Sbapt<a class="anchor" id="ga9ef7d6e9494766b5880c389bc431d138"></a><!-- doxytag: member="yaml.h::yaml_parser_load" ref="ga9ef7d6e9494766b5880c389bc431d138" args="(yaml_parser_t *parser, yaml_document_t *document)" --> 561247738Sbapt<div class="memitem"> 562247738Sbapt<div class="memproto"> 563247738Sbapt <table class="memname"> 564247738Sbapt <tr> 565247738Sbapt <td class="memname">int yaml_parser_load </td> 566247738Sbapt <td>(</td> 567247738Sbapt <td class="paramtype"><a class="el" href="structyaml__parser__s.html">yaml_parser_t</a> * </td> 568247738Sbapt <td class="paramname"> <em>parser</em>, </td> 569247738Sbapt </tr> 570247738Sbapt <tr> 571247738Sbapt <td class="paramkey"></td> 572247738Sbapt <td></td> 573247738Sbapt <td class="paramtype"><a class="el" href="structyaml__document__s.html">yaml_document_t</a> * </td> 574247738Sbapt <td class="paramname"> <em>document</em></td><td> </td> 575247738Sbapt </tr> 576247738Sbapt <tr> 577247738Sbapt <td></td> 578247738Sbapt <td>)</td> 579247738Sbapt <td></td><td></td><td></td> 580247738Sbapt </tr> 581247738Sbapt </table> 582247738Sbapt</div> 583247738Sbapt<div class="memdoc"> 584247738Sbapt 585247738Sbapt<p>Parse the input stream and produce the next YAML document. </p> 586247738Sbapt<p>Call this function subsequently to produce a sequence of documents constituting the input stream.</p> 587247738Sbapt<p>If the produced document has no root node, it means that the document end has been reached.</p> 588247738Sbapt<p>An application is responsible for freeing any data associated with the produced document object using the <a class="el" href="group__nodes.html#ga2754b1544fb4e110e83fafbc708b0672" title="Delete a YAML document and all its nodes.">yaml_document_delete()</a> function.</p> 589247738Sbapt<p>An application must not alternate the calls of <a class="el" href="group__parser.html#ga9ef7d6e9494766b5880c389bc431d138" 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#ga6c2144f131ebd600a075d4ba654540f7" title="Scan the input stream and produce the next token.">yaml_parser_scan()</a> or <a class="el" href="group__parser.html#ga559312fb137533d8b7e07f224fe0ec8f" title="Parse the input stream and produce the next parsing event.">yaml_parser_parse()</a>. Doing this will break the parser.</p> 590247738Sbapt<dl><dt><b>Parameters:</b></dt><dd> 591247738Sbapt <table border="0" cellspacing="2" cellpadding="0"> 592247738Sbapt <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>parser</em> </td><td>A parser object. </td></tr> 593247738Sbapt <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>document</em> </td><td>An empty document object.</td></tr> 594247738Sbapt </table> 595247738Sbapt </dd> 596247738Sbapt</dl> 597247738Sbapt<dl class="return"><dt><b>Returns:</b></dt><dd><code>1</code> if the function succeeded, <code>0</code> on error. </dd></dl> 598247738Sbapt 599247738Sbapt</div> 600247738Sbapt</div> 601247738Sbapt</div> 602247738Sbapt<hr class="footer"/><address class="footer"><small>Generated on Mon May 30 2011 22:00:00 for yaml by 603247738Sbapt<a href="http://www.doxygen.org/index.html"> 604247738Sbapt<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address> 605247738Sbapt</body> 606247738Sbapt</html> 607