diff options
-rw-r--r-- | src/generator.hpp | 2 | ||||
-rw-r--r-- | src/generator_lr0.cpp | 4 | ||||
-rw-r--r-- | src/generator_lr0.hpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/generator.hpp b/src/generator.hpp index 024b630..0511b23 100644 --- a/src/generator.hpp +++ b/src/generator.hpp @@ -79,7 +79,7 @@ private: protected: virtual bool has_reduce_conflict(size_t from, const symbol_t &sym) = 0; - virtual void add_reduction(size_t from, size_t to) = 0; + virtual void add_reduction(size_t from, size_t rule) = 0; generator_t(const grammar_t &grammar0); diff --git a/src/generator_lr0.cpp b/src/generator_lr0.cpp index 024f5fa..a01e2d7 100644 --- a/src/generator_lr0.cpp +++ b/src/generator_lr0.cpp @@ -34,7 +34,7 @@ bool generator_lr0_t::has_reduce_conflict(size_t from, const symbol_t &sym) { return reductions.count(from); } -void generator_lr0_t::add_reduction(size_t from, size_t to) { +void generator_lr0_t::add_reduction(size_t from, size_t rule) { if (reductions.count(from)) throw conflict_error("reduce/reduce conflict"); @@ -43,7 +43,7 @@ void generator_lr0_t::add_reduction(size_t from, size_t to) { throw conflict_error("shift/reduce conflict"); } - reductions.insert(std::make_pair(from, to)); + reductions.insert(std::make_pair(from, rule)); } } diff --git a/src/generator_lr0.hpp b/src/generator_lr0.hpp index 063a518..9b05ac3 100644 --- a/src/generator_lr0.hpp +++ b/src/generator_lr0.hpp @@ -37,7 +37,7 @@ private: protected: virtual bool has_reduce_conflict(size_t from, const symbol_t &sym); - virtual void add_reduction(size_t from, size_t to); + virtual void add_reduction(size_t from, size_t rule); public: const std::map<size_t, size_t> & get_reductions() const { |