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