sebastianriese / pyLR1

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

More error resistant parse stack var references #15

Closed sebastianriese closed 11 years ago

sebastianriese commented 11 years ago

The $[0-9]+ stack references in the parser are exceedingly error prone. Added support for $SYMBOLNAME[0-9]+ and $[name] plus symbol[name]-syntax in the production would be nice to provide more stability. Also the required .sem is not elegant. Using @[0-9] for position marks and $[0-9]+ for the semantic value as in bison/yacc should be considered. Problem: the @-sign may actually appear in valid python code, therefore correct replacement gets more difficult.

sebastianriese commented 11 years ago

The first part is addressed by now in the self-hosting parser. The simplification of the syntax is not yet done.