<libroxml
version="3.0.2"
/>
|
Parsing engine. More...
#include "roxml_internal.h"
Go to the source code of this file.
Functions | |
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 ROXML_PARSE 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.h.
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
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_INT ROXML_PARSE int 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_INT roxml_parser_item_t * roxml_parser_allocate | ( | void | ) |
parser table allocation
this function allocate an empty parser object
Definition at line 88 of file roxml_parser.c.
ROXML_INT void 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 roxml_parser_item_t * 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.