diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2019-03-01 15:34:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-01 15:34:44 -0800 |
commit | 1f24a719e7be5e49b876a5dc7daf21d01ee69faa (patch) | |
tree | 8f8f56cab78ef671a8cb7f54b8ec2495d9a435e6 /.gitignore | |
parent | bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. (GH-12031) (diff) | |
download | cpython-1f24a719e7be5e49b876a5dc7daf21d01ee69faa.tar.gz cpython-1f24a719e7be5e49b876a5dc7daf21d01ee69faa.tar.bz2 cpython-1f24a719e7be5e49b876a5dc7daf21d01ee69faa.zip |
bpo-35808: Retire pgen and use pgen2 to generate the parser (GH-11814)
Pgen is the oldest piece of technology in the CPython repository, building it requires various #if[n]def PGEN hacks in other parts of the code and it also depends more and more on CPython internals. This commit removes the old pgen C code and replaces it for a new version implemented in pure Python. This is a modified and adapted version of lib2to3/pgen2 that can generate grammar files compatibles with the current parser.
This commit also eliminates all the #ifdef and code branches related to pgen, simplifying the code and making it more maintainable. The regen-grammar step now uses $(PYTHON_FOR_REGEN) that can be any version of the interpreter, so the new pgen code maintains compatibility with older versions of the interpreter (this also allows regenerating the grammar with the current CI solution that uses Python3.5). The new pgen Python module also makes use of the Grammar/Tokens file that holds the token specification, so is always kept in sync and avoids having to maintain duplicate token definitions.
Diffstat (limited to '.gitignore')
-rw-r--r-- | .gitignore | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore index 7ee9e6d875e..9e60f5a2069 100644 --- a/.gitignore +++ b/.gitignore @@ -73,8 +73,6 @@ PCbuild/arm32/ PCbuild/obj/ PCbuild/win32/ .purify -Parser/pgen -Parser/pgen.exe __pycache__ autom4te.cache build/ |