You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pgen is literally the oldest piece of technology in the CPython repo -- it was the first thing I wrote for Python over 29 years ago. It's not aged well, and building it requires various #if[n]def PGEN hacks in other parts of the code; it also depends more and more on CPython internals. There already is a replacement written in pure Python (Lib/lib2to3/pgen/), it just needs some glue to actually generate the graminit.[ch] files. Note that several other essential generation steps (everything listed for regen-all except regen-importlib and clinic) already depend on having a working Python interpreter around, so let's not worry about the bootstrapping process.
I didn't look at the PR yet, but this is a wonderful idea. I planned to do this just after rewriting generators of token-related data and code in Python (bpo-30455), but Pablo has overfoot me. Great!
Activity
gvanrossum commentedon Jan 23, 2019
Pgen is literally the oldest piece of technology in the CPython repo -- it was the first thing I wrote for Python over 29 years ago. It's not aged well, and building it requires various #if[n]def PGEN hacks in other parts of the code; it also depends more and more on CPython internals. There already is a replacement written in pure Python (Lib/lib2to3/pgen/), it just needs some glue to actually generate the graminit.[ch] files. Note that several other essential generation steps (everything listed for regen-all except regen-importlib and clinic) already depend on having a working Python interpreter around, so let's not worry about the bootstrapping process.
eamanu commentedon Jan 28, 2019
Hello!
I can help if you consider it appropriate :-)
gvanrossum commentedon Jan 28, 2019
@eamanu, feel free to submit a PR. I won't be available to guide you through the steps; there are other forums e.g. Zulip.
serhiy-storchaka commentedon Feb 15, 2019
I didn't look at the PR yet, but this is a wonderful idea. I planned to do this just after rewriting generators of token-related data and code in Python (bpo-30455), but Pablo has overfoot me. Great!
pablogsal commentedon Mar 1, 2019
New changeset 1f24a71 by Pablo Galindo in branch 'master':
bpo-35808: Retire pgen and use pgen2 to generate the parser (GH-11814)
1f24a71