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.
The
$[0-9]+
stack references in the parser are exceedingly error prone. Added support for$SYMBOLNAME[0-9]+
and$[name]
plussymbol[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.