]>
Commit | Line | Data |
---|---|---|
1 | #ifndef NEWSEARCH_PARSER_H | |
2 | #define NEWSEARCH_PARSER_H | |
3 | ||
4 | #include "newsearch.h" | |
5 | #include "../lib/sstring.h" | |
6 | ||
7 | typedef struct stringlist { | |
8 | struct stringlist *next; | |
9 | sstring *data; | |
10 | } stringlist; | |
11 | ||
12 | typedef struct expressionlist { | |
13 | struct expressionlist *next; | |
14 | searchASTExpr expr[]; | |
15 | } expressionlist; | |
16 | ||
17 | typedef struct parsertree { | |
18 | expressionlist *exprlist; | |
19 | stringlist *strlist; | |
20 | int finished; | |
21 | searchASTExpr root[]; | |
22 | } parsertree; | |
23 | ||
24 | typedef parseFunc (*fnFinder)(char *, void *); | |
25 | ||
26 | parsertree *parse_string(searchCmd *, const char *); | |
27 | void parse_free(parsertree *); | |
28 | ||
29 | void resetparser(fnFinder fnf, void *arg, parsertree **result); | |
30 | ||
31 | extern char *parseStrError; | |
32 | extern int parseStrErrorPos; | |
33 | ||
34 | #endif |