diff options
Diffstat (limited to 'src/generator.hpp')
-rw-r--r-- | src/generator.hpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/generator.hpp b/src/generator.hpp index 5396d3e..4c5f9af 100644 --- a/src/generator.hpp +++ b/src/generator.hpp @@ -47,7 +47,7 @@ private: std::map<std::pair<size_t, symbol_t>, size_t> shifts; std::map<size_t, size_t> reductions; - std::map<std::pair<size_t, symbol_t>, size_t> gotos; + std::map<std::pair<size_t, std::string>, size_t> gotos; void close_set(std::set<item_t> *set); std::set<item_t> get_set(const std::string &nonterm); @@ -67,6 +67,22 @@ public: return itemsets.size(); } + const std::vector<item_t> & get_rules() const { + return rules; + } + + const std::map<size_t, size_t> & get_reductions() const { + return reductions; + } + + const std::map<std::pair<size_t, symbol_t>, size_t> & get_shifts() const { + return shifts; + } + + const std::map<std::pair<size_t, std::string>, size_t> & get_gotos() const { + return gotos; + } + generator_t(const std::vector<item_t> &rules0); }; |