Lines Matching full:parser
7 - [Parser functions](#parser-functions)
14 - [Parser functions](#parser-functions-1)
26 - [Parser usage example](#parser-usage-example)
47 Libucl is a parser and `C` API to parse and generate `ucl` objects. Libucl consist of several group…
49 ### Parser functions
50 …f document and therefore it is impossible to use `libucl` as a streaming parser. In future, this l…
74 # Parser functions
76 Parser functions operates with `struct ucl_parser`.
84 Creates new parser with the specified flags:
93 void ucl_parser_register_macro (struct ucl_parser *parser,
104 …e handler should return `true`. `false` indicates parsing failure and the parser can be terminated.
109 void ucl_parser_register_variable (struct ucl_parser *parser,
113 Register new variable $`var` that should be replaced by the parser to the `value` string.
118 bool ucl_parser_add_chunk (struct ucl_parser *parser,
122 …t chunk with `data` of length `len` to the parser. At the moment, `libucl` parser is not a streaml…
138 bool ucl_parser_add_string (struct ucl_parser *parser,
147 bool ucl_parser_add_file (struct ucl_parser *parser,
151 Load file `filename` and parse it with the specified `parser`. This function uses `mmap` call to lo…
156 ucl_object_t* ucl_parser_get_object (struct ucl_parser *parser);
159 If the `ucl` data has been parsed correctly this function returns the top object for the parser. Ot…
164 const char *ucl_parser_get_error(struct ucl_parser *parser);
167 Returns the constant error string for the parser object. If no error occurred during parsing a `NUL…
172 void ucl_parser_free (struct ucl_parser *parser);
175 Frees memory occupied by the parser object. The reference count for top object is decreased as well…
180 bool ucl_pubkey_add (struct ucl_parser *parser,
184 This function adds a public key from text blob `key` of length `len` to the `parser` object. This p…
189 bool ucl_parser_set_filevars (struct ucl_parser *parser,
193 Add the standard file variables to the `parser` based on the `filename` specified:
208 ## Parser usage example
210 The following example loads, parses and extracts `ucl` object from stdin using `libucl` parser func…
214 struct ucl_parser *parser = NULL;
220 parser = ucl_parser_new (0);
224 ucl_parser_add_chunk (parser, inbuf, r);
227 if (ucl_parser_get_error (parser)) {
228 printf ("Error occurred: %s\n", ucl_parser_get_error (parser));
232 obj = ucl_parser_get_object (parser);
235 if (parser != NULL) {
236 ucl_parser_free (parser);