diff options
Diffstat (limited to 'src/generator.hpp')
-rw-r--r-- | src/generator.hpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/generator.hpp b/src/generator.hpp index 5f2cb22..23f4f9d 100644 --- a/src/generator.hpp +++ b/src/generator.hpp @@ -63,6 +63,10 @@ private: std::map<std::string, std::string> nonterm_types; std::map<symbol_t, std::pair<std::string, std::string>> term_types; + std::string header_block; + std::string source_block; + + void close_set(std::set<item_t> *set); std::set<item_t> get_set(const std::string &nonterm); @@ -152,9 +156,19 @@ public: return gotos; } + const std::string & get_header_block() const { + return header_block; + } + + const std::string & get_source_block() const { + return source_block; + } + + generator_t(const std::vector<std::tuple<item_t, std::vector<std::string>, std::string>> &rules0, const std::map<std::string, std::string> &nonterm_types0, - const std::map<symbol_t, std::pair<std::string, std::string>> &term_types0); + const std::map<symbol_t, std::pair<std::string, std::string>> &term_types0, + const std::string &header_block0, const std::string &source_block0); }; } |