Revert 'Add reduce-extra actions for all symbols'

It only makes sense to add reduce-extra actions for those symbols that
have actions in the state the will be reduced to
This commit is contained in:
Max Brunsfeld 2015-10-26 17:19:04 -07:00
parent e543661498
commit b7e0cb1fc6

View file

@ -171,8 +171,8 @@ class ParseTableBuilder {
if (action.type == ParseActionTypeShift) {
size_t dest_state_id = action.state_index;
ParseAction reduce_extra = ParseAction::ReduceExtra(ubiquitous_symbol);
for (const auto &symbol : parse_table.symbols)
add_action(dest_state_id, symbol, reduce_extra, item_set);
for (const auto &pair : state.actions)
add_action(dest_state_id, pair.first, reduce_extra, item_set);
}
}
}