Dear python-dev,
I've been working on a port of cpython/Grammar/python.gram from C (as
currently used in all the {} expressions to build the AST) to Python, directly
building nodes via the ast package. My motivation for this (as opposed to
calling ast.parse, which uses the C parser) is to make it easy to experiment
with adding features to the syntax, without having to build CPython. Porting
is mostly straightforward, but it is a fair amount of work, because there are
a lot of expressions to port
My first question is whether anyone is working on this as well (or has
already done so and I missed it), to avoid duplication of effort.
Assuming not, my next question is where this belongs. Some natural options I
see:
1. Add it to cpython as a grammar maintained in parallel with the C grammar.
This would mean more maintenance when the grammar changes, but the plus side
is it guarantees that the two grammars (and ast) remain synchronized.
2. PyPy
3. 3rd party library (e.g., my own repo)
Let me know what you think would be best.
Erik
--
Erik Demaine | edema...@mit.edu | http://erikdemaine.org/
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/UM7ANICTBDU3Q2DLKFZIK6C6OU3THKP4/
Code of Conduct: http://python.org/psf/codeofconduct/