From c58f6401d0c3d02b6d0da81908dc07c7c732f88c Mon Sep 17 00:00:00 2001 From: Phil Turnbull Date: Wed, 14 Jun 2017 08:49:38 -0400 Subject: [PATCH] Non-terminal entries always have valid state-ids --- src/compiler/parse_table.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/parse_table.cc b/src/compiler/parse_table.cc index 8ea1f8c4..ffa57760 100644 --- a/src/compiler/parse_table.cc +++ b/src/compiler/parse_table.cc @@ -154,8 +154,7 @@ void ParseState::each_referenced_state(function 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 {