summaryrefslogtreecommitdiffstats
path: root/src/parser_state.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser_state.hpp')
-rw-r--r--src/parser_state.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/parser_state.hpp b/src/parser_state.hpp
index 882fec2..b183898 100644
--- a/src/parser_state.hpp
+++ b/src/parser_state.hpp
@@ -44,6 +44,9 @@ private:
std::string current_var;
std::string current_type;
+ std::string header_block;
+ std::string source_block;
+
public:
parser_state_t() : current("") {}
@@ -59,6 +62,22 @@ public:
return term_types;
}
+ const std::string & get_header_block() const {
+ return header_block;
+ }
+
+ void set_header_block(const char *value) {
+ header_block = value;
+ }
+
+ const std::string & get_source_block() const {
+ return source_block;
+ }
+
+ void set_source_block(const char *value) {
+ source_block = value;
+ }
+
void new_rule(const char *nonterm);
void add_rule_nonterminal(const char *nonterm);
void add_rule_terminal(const char *term);