generator: fix add_reduction() argument name
This commit is contained in:
parent
35c02202fd
commit
70fc6ba8d2
3 changed files with 4 additions and 4 deletions
|
@ -79,7 +79,7 @@ private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool has_reduce_conflict(size_t from, const symbol_t &sym) = 0;
|
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);
|
generator_t(const grammar_t &grammar0);
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ bool generator_lr0_t::has_reduce_conflict(size_t from, const symbol_t &sym) {
|
||||||
return reductions.count(from);
|
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))
|
if (reductions.count(from))
|
||||||
throw conflict_error("reduce/reduce conflict");
|
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");
|
throw conflict_error("shift/reduce conflict");
|
||||||
}
|
}
|
||||||
|
|
||||||
reductions.insert(std::make_pair(from, to));
|
reductions.insert(std::make_pair(from, rule));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool has_reduce_conflict(size_t from, const symbol_t &sym);
|
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:
|
public:
|
||||||
const std::map<size_t, size_t> & get_reductions() const {
|
const std::map<size_t, size_t> & get_reductions() const {
|
||||||
|
|
Reference in a new issue