diff --git a/src/compiler/parse_table.cc b/src/compiler/parse_table.cc index b63d472b..ef0e235d 100644 --- a/src/compiler/parse_table.cc +++ b/src/compiler/parse_table.cc @@ -206,7 +206,7 @@ bool ParseTable::merge_state(size_t i, size_t j) { const auto &other_entry = other.entries.find(symbol); if (other_entry == other.entries.end()) { - if (mergeable_symbols.count(symbol) == 0) + if (mergeable_symbols.count(symbol) == 0 && !symbol.is_built_in() && symbol.is_token) return false; if (actions.back().type != ParseActionTypeReduce) return false; @@ -224,7 +224,7 @@ bool ParseTable::merge_state(size_t i, size_t j) { const vector &actions = entry.second.actions; if (!state.entries.count(symbol)) { - if (mergeable_symbols.count(symbol) == 0) + if (mergeable_symbols.count(symbol) == 0 && !symbol.is_built_in() && symbol.is_token) return false; if (actions.back().type != ParseActionTypeReduce) return false;