osa1 / parsegen

An LR parser generator, implemented as a proc macro
MIT License
15 stars 0 forks source link

Avoid generating unused GOTO entries #9

Open osa1 opened 2 years ago

osa1 commented 2 years ago

See https://github.com/lalrpop/lalrpop/commit/688b91930a6473098ea92f1b08b1f47d2838f67a

The idea is that GOTO[state] is only used when state has a reduce action.

If we re-order the states so that states with reduce actions come first we can generate smaller GOTO tables by just omitting states with no reduce actions.