<libroxml
version="3.0.2"
/>
|
Parsing engine. More...
Go to the source code of this file.
Macros | |
#define | ROXML_PARSER_NCELLS 256 |
#define | ROXML_PARSER_NCELLS_MAX 512 |
#define | ROXML_PARSER_ITEM(parser, item) (parser + item) |
Functions | |
ROXML_INT int | roxml_parser_multiple (roxml_parser_item_t *parser, char *chunk, void *data) |
ROXML_INT roxml_parser_item_t * | roxml_append_parser_item (roxml_parser_item_t *parser, char *key, roxml_parse_func func) |
parser item creation function | |
ROXML_INT roxml_parser_item_t * | roxml_parser_allocate (void) |
parser table allocation | |
ROXML_INT void | roxml_parser_free (roxml_parser_item_t *parser) |
parser table deletion | |
ROXML_INT roxml_parser_item_t * | roxml_parser_prepare (roxml_parser_item_t *parser) |
parser preparation function | |
ROXML_INT int | roxml_parse_line (roxml_parser_item_t *parser, char *line, int len, void *ctx) |
line parsing function | |
Parsing engine.
(C) Copyright 2014 Tristan Lelong trist.nosp@m.an.l.nosp@m.elong.nosp@m.@lib.nosp@m.roxml.nosp@m..net
SPDX-Licence-Identifier: LGPL-2.1+ The author added a static linking exception, see License.txt.
Definition in file roxml_parser.c.
#define ROXML_PARSER_ITEM | ( | parser, | |
item | |||
) | (parser + item) |
Definition at line 20 of file roxml_parser.c.
#define ROXML_PARSER_NCELLS 256 |
Definition at line 17 of file roxml_parser.c.
#define ROXML_PARSER_NCELLS_MAX 512 |
Definition at line 18 of file roxml_parser.c.
roxml_append_parser_item | ( | roxml_parser_item_t * | parser, |
char * | key, | ||
roxml_parse_func | func | ||
) |
parser item creation function
this function create a new parser item and append it to the parser list.
parser | the parser parser list or NULL for first item |
key | the char to trigger callback for |
func | the function to call on match |
Definition at line 41 of file roxml_parser.c.
roxml_parse_line | ( | roxml_parser_item_t * | parser, |
char * | line, | ||
int | len, | ||
void * | ctx | ||
) |
line parsing function
this function parse a line : it calls parsing functions when key matches
parser | the parser object |
line | the string to parse |
len | the len of string or 0 if auto calculate len (using \0) |
ctx | user data passed to the callbacks |
Definition at line 149 of file roxml_parser.c.
roxml_parser_allocate | ( | void | ) |
parser table allocation
this function allocate an empty parser object
Definition at line 88 of file roxml_parser.c.
roxml_parser_free | ( | roxml_parser_item_t * | parser | ) |
parser table deletion
this function delete a prepared parser object
parser | the parser object |
Definition at line 100 of file roxml_parser.c.
ROXML_INT int roxml_parser_multiple | ( | roxml_parser_item_t * | parser, |
char * | chunk, | ||
void * | data | ||
) |
Definition at line 22 of file roxml_parser.c.
roxml_parser_prepare | ( | roxml_parser_item_t * | parser | ) |
parser preparation function
this function compile a parser list into a table and calculate count variables for parsing optim
parser | the parser object |
Definition at line 105 of file roxml_parser.c.