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:
parent
e543661498
commit
b7e0cb1fc6
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue