From 61c3aa15c347624cb3c4a3106235d061e718ccad Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 2 Apr 2015 11:52:05 +0200 Subject: Add simple output generator --- src/generator.hpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/generator.hpp') 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, size_t> shifts; std::map reductions; - std::map, size_t> gotos; + std::map, size_t> gotos; void close_set(std::set *set); std::set get_set(const std::string &nonterm); @@ -67,6 +67,22 @@ public: return itemsets.size(); } + const std::vector & get_rules() const { + return rules; + } + + const std::map & get_reductions() const { + return reductions; + } + + const std::map, size_t> & get_shifts() const { + return shifts; + } + + const std::map, size_t> & get_gotos() const { + return gotos; + } + generator_t(const std::vector &rules0); }; -- cgit v1.2.3