phorward / unicc

LALR parser generator targetting C, C++, Python, JavaScript, JSON and XML
MIT License
59 stars 9 forks source link

Semantic values in Python not working correctly #20

Closed phorward closed 4 years ago

phorward commented 4 years ago

This simple grammar loses its values:

#!language Python;
#whitespaces ' \t';

ints$ : @digits [*print("INT", @digits)*] ;
@digits '0-9'+ [*@@ = int(@>)*];