diff --git a/src/compiler/parse_table.cc b/src/compiler/parse_table.cc index 5b422d43..8ea1f8c4 100644 --- a/src/compiler/parse_table.cc +++ b/src/compiler/parse_table.cc @@ -151,7 +151,7 @@ bool ParseState::has_shift_action() const { void ParseState::each_referenced_state(function fn) { for (auto &entry : terminal_entries) for (ParseAction &action : entry.second.actions) - if (action.type == ParseActionTypeShift || action.type == ParseActionTypeRecover) + if ((action.type == ParseActionTypeShift && !action.extra) || action.type == ParseActionTypeRecover) fn(&action.state_index); for (auto &entry : nonterminal_entries) if (entry.second != (ParseStateId)(-1))