summaryrefslogtreecommitdiffstats
path: root/include/parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/parser.h')
-rw-r--r--include/parser.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/parser.h b/include/parser.h
index a47bd0f0..f5dd6f4b 100644
--- a/include/parser.h
+++ b/include/parser.h
@@ -2,6 +2,7 @@
#define NFTABLES_PARSER_H
#include <list.h>
+#include <rule.h> // FIXME
#define MAX_INCLUDE_DEPTH 16
#define TABSIZE 8
@@ -10,12 +11,19 @@
#define YYLTYPE_IS_TRIVIAL 0
#define YYENABLE_NLS 0
+#define SCOPE_NEST_MAX 3
+
struct parser_state {
struct input_descriptor *indesc;
struct input_descriptor indescs[MAX_INCLUDE_DEPTH];
unsigned int indesc_idx;
struct list_head *msgs;
+
+ struct scope top_scope;
+ struct scope *scopes[SCOPE_NEST_MAX];
+ unsigned int scope;
+
struct list_head cmds;
};