Non-terminal entries always have valid state-ids

This commit is contained in:
Phil Turnbull 2017-06-14 08:49:38 -04:00
parent 577e43f653
commit c58f6401d0

View file

@ -154,8 +154,7 @@ void ParseState::each_referenced_state(function<void(ParseStateId *)> fn) {
if ((action.type == ParseActionTypeShift && !action.extra) || action.type == ParseActionTypeRecover)
fn(&action.state_index);
for (auto &entry : nonterminal_entries)
if (entry.second != (ParseStateId)(-1))
fn(&entry.second);
fn(&entry.second);
}
bool ParseState::operator==(const ParseState &other) const {