sebastianriese / pyLR1

A pure python LR(1)/LALR(1) parser generator
7 stars 3 forks source link

The pywriter is a mess #19

Open sebastianriese opened 11 years ago

sebastianriese commented 11 years ago

The pywriter is in many places inelegant, error prone and difficult to understand.

The implementation of generation options is completely ad-hoc and hard to follow, this should be replaced by an elegant, extensible and clear general mechanism.

Preferably on assembles a Composite, each of which components represents an option. Then the correct code is written automagically.

sebastianriese commented 10 years ago

The messiness of the pywriter has been mitigated by factoring out the Parser and Lexer standard implementations to a runtime library. Yet is it still not good and will get worse again, as soon as mapping via multitables will be implemented.