]>
Commit | Line | Data |
---|---|---|
ffc11f03 CP |
1 | #ifndef NEWSEARCH_PARSER_H |
2 | #define NEWSEARCH_PARSER_H | |
3 | ||
4 | #include "newsearch.h" | |
e828314e | 5 | #include "../lib/sstring.h" |
ffc11f03 CP |
6 | |
7 | typedef struct stringlist { | |
8 | struct stringlist *next; | |
e828314e | 9 | sstring *data; |
ffc11f03 CP |
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; | |
9b276ca6 | 32 | extern int parseStrErrorPos; |
ffc11f03 CP |
33 | |
34 | #endif |