X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=src%2Finclude%2Fparser%2Fparser.h;h=2830663f03d8f13843eaa7543e1c18c50ebeccc5;hp=92e49bbd39c5db674f5208c6259baffe5037e2d8;hb=24dce6d59414125f1f0fbe8434f5ed9f280d6872;hpb=5ced2b9eb4d4def7d3ad5b1172004293e7a68e0e diff --git a/src/include/parser/parser.h b/src/include/parser/parser.h index 92e49bb..2830663 100644 --- a/src/include/parser/parser.h +++ b/src/include/parser/parser.h @@ -28,9 +28,6 @@ #ifndef SDB_PARSER_PARSER_H #define SDB_PARSER_PARSER_H 1 -/* TODO: move SDB_PARSE_* constants here as well */ -#include "frontend/parser.h" - #include "core/store.h" #include "parser/ast.h" #include "utils/llist.h" @@ -40,6 +37,18 @@ extern "C" { #endif +/* parser modes */ +enum { + /* parser accepts any command statement */ + SDB_PARSE_DEFAULT = 0, + + /* parser accepts any conditional statement */ + SDB_PARSE_COND = 1 << 1, + + /* parser accepts any arithmetic expression */ + SDB_PARSE_ARITH = 1 << 2, +}; + /* * sdb_parser_parse: * Parse the specified query of the specified length. If len is a negative