sebastianriese / pyLR1

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

Use sane internal format for pyblobs #16

Closed sebastianriese closed 11 years ago

sebastianriese commented 11 years ago

The current handling of the python actions is quite broken. The self hosted grammarfile parser shows some promise of improving on this (as it understands quite a bit of Python's lexeme structure). At least, instead of splitting at newline and inserting indenation afterwards, lists with logical line strings should be provided. Directly serializing semi-parsed python in the writer would be even better (see the PyBlob class of the self hosted grammar file parser for some ideas, this would also allow cleaner stack var replacement).

sebastianriese commented 11 years ago

This has been worked on. After evaluation of the new code, I will close this issue.

sebastianriese commented 11 years ago

Done evaluation and a few fixes in 59946ad5642bb963dbf6541823f4308183acddb7