|
json-gen-c
0.1.5
json-gen-c generate C code for json manipulation
|
Parse struct definitions. Support scalar types(int, long, float, double, sstr_t), arrays, structs. More...


Go to the source code of this file.
Classes | |
| struct | struct_field |
| structure to store field list of parsed structs. A struct may have multiple field, and each field may be an array, or a struct. We use a single linked list to store the fields of a struct. More... | |
| struct | struct_container |
| structure to store parsed structs. A struct may have multiple fields, we put fields in a linked list. More... | |
| struct | pos |
| position of string More... | |
| struct | struct_parser |
| parser context More... | |
| struct | struct_token |
| token More... | |
Functions | |
| struct struct_parser * | struct_parser_new () |
| create and init a struct_parser instance. | |
| void | struct_parser_free (struct struct_parser *parser) |
| free a struct_parser instance. | |
| int | struct_parser_parse (struct struct_parser *parser, sstr_t content) |
| parse a struct definition file, and store the parsed structs in struct_parser. | |
Parse struct definitions. Support scalar types(int, long, float, double, sstr_t), arrays, structs.
| void struct_parser_free | ( | struct struct_parser * | parser | ) |
free a struct_parser instance.
| parser | struct struct_parser* |
| struct struct_parser * struct_parser_new | ( | ) |
create and init a struct_parser instance.
| int struct_parser_parse | ( | struct struct_parser * | parser, |
| sstr_t | content | ||
| ) |
parse a struct definition file, and store the parsed structs in struct_parser.
| parser | context of parser. |
| content | content of the file. |