Open ahupp opened 2 years ago
Nice start, although this implementation doesn't pass a lot of tests. Here's a fixed one, that passes every test like the main branch: https://github.com/0dminnimda/pegen/tree/no_walrus
Update: implroved the implementation, now it should be faster + generated code is more beautiful, additional variables such as __last
are not used anymore
I have a patch to make pegen generate parsers that work in python 3.7, primarily by not using the walrus operator: https://github.com/ahupp/pegen/tree/python37
The generated code is pretty ugly and 3.7 is EOL in a year so I would not suggest merging it, but if anyone else is unfortunate enough to need python 3.7 support they might find this handy.