Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for python 3.7 #63

Open
ahupp opened this issue Mar 30, 2022 · 2 comments
Open

Support for python 3.7 #63

ahupp opened this issue Mar 30, 2022 · 2 comments

Comments

@ahupp
Copy link

ahupp commented Mar 30, 2022

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.

@0dminnimda
Copy link
Contributor

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

@0dminnimda
Copy link
Contributor

Update: implroved the implementation, now it should be faster + generated code is more beautiful, additional variables such as __last are not used anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants