aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Tools/peg_generator
Commit message (Collapse)AuthorAge
* gh-133779: Revert Windows generation of pyconfig.h and go back to a static ↵Steve Dower14 days
| | | | | | header. (GH-133966) Extension builders must specify Py_GIL_DISABLED if they want to link to the free-threaded builds. This was usually the case already, but this change guarantees it in all circumstances.
* gh-133555: Allow regenerating the parser with Python < 3.14 (#133557)Alex Prengère2025-05-08
| | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-132921: Fix setuptools._distutils.dep_util deprecation (#132923)Victor Stinner2025-04-25
| | | | Replace setuptools._distutils.dep_util with setuptools.modified in peg_generator compile_c_extension().
* GH-130396: Use computed stack limits on linux (GH-130398)Mark Shannon2025-02-25
| | | | | | | | | | | * Implement C recursion protection with limit pointers for Linux, MacOS and Windows * Remove calls to PyOS_CheckStack * Add stack protection to parser * Make tests more robust to low stacks * Improve error messages for stack overflow
* GH-91079: Revert "GH-91079: Implement C stack limits using addresses, not ↵Petr Viktorin2025-02-24
| | | | | | | | | counters. (GH-130007)" for now (GH130413) Revert "GH-91079: Implement C stack limits using addresses, not counters. (GH-130007)" for now Unfortunatlely, the change broke some buildbots. This reverts commit 2498c22fa0a2b560491bc503fa676585c1a603d0.
* GH-91079: Implement C stack limits using addresses, not counters. (GH-130007)Mark Shannon2025-02-19
| | | | | | | | | | | | * Implement C recursion protection with limit pointers * Remove calls to PyOS_CheckStack * Add stack protection to parser * Make tests more robust to low stacks * Improve error messages for stack overflow
* gh-125588: Allow to regenerate the parser with Python < 3.12 (#127969)Pablo Galindo Salgado2024-12-15
| | | Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
* gh-125588: Teach the python PEG generator the new f-string tokens (#125589)Pablo Galindo Salgado2024-10-29
| | | Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
* gh-124889: Rework Python generator cache (#125816)Mikhail Efimov2024-10-22
|
* gh-124889: Remove redundant artificial rules in PEG parser (#124893)efimov-mikhail2024-10-03
| | | | | | | | | | | | Cache in C PEG-generator reworked: we save artificial rules in cache by Node string representation as a key instead of Node object itself. As a result total count of artificial rules in parsers.c is lowered from 283 to 170. More natural number ordering is used for the names of artificial rules. Auxiliary method CCallMakerVisitor._generate_artificial_rule_call is added. Its purpose is abstracting work with artificial rules cache. Explicit using of "is_repeat1" kwarg is added to visit_Repeat0 and visit_Repeat1 methods. Its slightly improve code readabitily.
* gh-122270: Fix typos in the Py_DEBUG macro name (GH-122271)Serhiy Storchaka2024-07-25
|
* gh-120956: Avoid comparison of int to Py_ssize_t in parser (#120959)Lysandros Nikolaou2024-06-24
|
* Fix types in pegen parser generator (GH-120720)yf-yang2024-06-19
|
* gh-116991: Improve `pygen --help` for `python` subparser (#116992)Nikita Sobolev2024-06-03
|
* gh-118235: Move RAISE_SYNTAX_ERROR actions to invalid rules and make sure ↵Petr Viktorin2024-05-30
| | | | | | | | they stay there (GH-119731) The Full Grammar specification in the docs omits rule actions, so grammar rules that raise a syntax error looked like valid syntax. This was solved in ef940de by hiding those rules in the custom syntax highlighter. This moves all syntax-error alternatives to invalid rules, adds a validator that ensures that actions containing RAISE_SYNTAX_ERROR are in invalid rules, and reverts the syntax highlighter hack.
* Fix typos in comments (#119645)Xie Yanbo2024-05-28
|
* gh-118671: Updated dead ActiveState links (#118730)trag1c2024-05-08
| | | | | Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-116988: Remove duplicates of `annotated_rhs` in the Grammar (#117004)David Rubin2024-04-24
|
* gh-112984: Fix link error on free-threaded Windows build (GH-114455)Sam Gross2024-01-23
| | | | | | The test_peg_generator test tried to link the python313_d.lib library, which failed because the library is now named python313t_d.lib. The underlying problem is that the "compiler" attribute was not set when we call get_libraries() from distutils.
* gh-58032: Do not use argparse.FileType in module CLIs and scripts (GH-113649)Serhiy Storchaka2024-01-10
| | | | | Open and close files manually. It prevents from leaking files, preliminary creation of output files, and accidental closing of stdin and stdout.
* gh-112532: Fix peg generator build.py for mimalloc build (gh-113492)Donghee Na2023-12-27
| | | gh-112532: Fix peg generator for mimalloc build
* gh-111650: Ensure pyconfig.h includes Py_GIL_DISABLED on Windows (GH-112778)Steve Dower2023-12-13
|
* GH-111807: Lower the parser stack depth under WASI debug builds (#112225)Brett Cannon2023-11-20
|
* gh-110805: Fix test_peg_generator after the change in the parser for REPL ↵Pablo Galindo Salgado2023-10-13
| | | | | tracebacks (#110814) Fix test_peg_generator after the change in the parser for REPL tracebacks
* gh-104169: Fix test_peg_generator after tokenizer refactoring (#110727)Lysandros Nikolaou2023-10-12
| | | | * Fix test_peg_generator after tokenizer refactoring * Remove references to tokenizer.c in comments etc.
* gh-109596: Ensure repeated rules in the grammar are not allowed and fix ↵Pablo Galindo Salgado2023-09-22
| | | | incorrect soft keywords (#109606)
* gh-108455: peg_generator: enable mypy's `--warn-unreachable` setting and ↵Alex Waygood2023-09-08
| | | | `redundant-expr` error code (#109160)
* gh-108455: peg_generator: use `types-setuptools==68.1.0.1` in CI (#108697)Alex Waygood2023-08-31
|
* gh-108455: peg_generator: install two stubs packages before running mypy ↵Alex Waygood2023-08-29
| | | | (#108637)
* gh-108455: peg generator: Use `strict_optional=True` for `grammar_parser` ↵Nikita Sobolev2023-08-29
| | | | (#108629)
* gh-108455: peg_generator: make the mypy config slightly stricter (#108627)Alex Waygood2023-08-29
| | | | | | | | | * Enable `--no-implicit-reexport` * Enable the `truthy-bool` error code * Enable the `ignore-without-code` error code * Explicitly note that `--warn-unreachable` cannot yet be enabled
* gh-108455: Simplify the peg_generator mypy config (#108620)Alex Waygood2023-08-29
| | | make it easier to see exactly which options from mypy's `--strict` mode can't currently be enabled
* gh-108455: Run `mypy` on `Tools/peg_generator` (#108456)Nikita Sobolev2023-08-28
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-108179: Add error message for parser stack overflows (#108256)Dennis Sweeney2023-08-22
|
* gh-107015: Remove async_hacks from the tokenizer (#107018)Pablo Galindo Salgado2023-07-26
|
* gh-105191: Cleanup peg generator; keep only necessary files (#105197)Lysandros Nikolaou2023-06-01
|
* gh-100238: Use setuptools in peg-generator and reenable tests (#104798)Lysandros Nikolaou2023-05-26
|
* gh-104780: Remove 2to3 program and lib2to3 module (#104781)Victor Stinner2023-05-23
| | | | | | | | | * Remove the Tools/scripts/2to3 script. * Remove the Lib/test/test_lib2to3/ directory. * Doc/tools/extensions/pyspecific.py: remove the "2to3fixer" object type. * Makefile and PC/layout/main.py no longer compile lib2to3 grammar files. * Update Makefile for 2to3 removal.
* gh-102856: Initial implementation of PEP 701 (#102855)Pablo Galindo Salgado2023-04-19
| | | | | | Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Batuhan Taskaya <isidentical@gmail.com> Co-authored-by: Marta Gómez Macías <mgmacias@google.com> Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
* gh-102416: Do not memoize incorrectly loop rules in the parser (#102467)Pablo Galindo Salgado2023-03-06
|
* gh-101046: Fix a potential memory leak in the parser when raising ↵Pablo Galindo Salgado2023-01-16
| | | | MemoryError (#101051)
* gh-99300: Use Py_NewRef() in Parser/ directory (#99330)Victor Stinner2022-11-10
| | | | Replace Py_INCREF() with Py_NewRef() in C files of the Parser/ directory and in the PEG generator.
* gh-84623: Remove unused imports (#94132)Victor Stinner2022-06-22
|
* gh-54781: Move Lib/lib2to3/tests/ to Lib/test/test_lib2to3/ (#94049)Victor Stinner2022-06-21
| | | | | | | | * Move Lib/lib2to3/tests/ to Lib/test/test_lib2to3/. * Remove Lib/test/test_lib2to3.py. * Update imports. * all_project_files(): use different paths and sort files to make the tests more reproducible. * Update references to tests.
* gh-93103: Parser uses PyConfig.parser_debug instead of Py_DebugFlag (#93106)Victor Stinner2022-05-24
| | | | | | | * Replace deprecated Py_DebugFlag with PyConfig.parser_debug in the parser. * Add Parser.debug member. * Add tok_state.debug member. * Py_FrozenMain(): Replace Py_VerboseFlag with PyConfig.verbose.
* gh-90473: Decrease recursion limit and skip tests on WASI (GH-92803)Christian Heimes2022-05-19
|
* gh-91320: Use _PyCFunction_CAST() (#92251)Victor Stinner2022-05-03
| | | | | | | | | | Replace "(PyCFunction)(void(*)(void))func" cast with _PyCFunction_CAST(func). Change generated by the command: sed -i -e \ 's!(PyCFunction)(void(\*)(void)) *\([A-Za-z0-9_]\+\)!_PyCFunction_CAST(\1)!g' \ $(find -name "*.c")
* bpo-46576: Speed up test_peg_generator by using a static library for shared ↵Jeremy Kloth2022-04-06
| | | | | sources (GH-32338) Speed up test_peg_generator by using a static library for shared sources to avoid recompiling as much code.
* Update grammar_grapher with the new forced (&&) directive (#31704)Luca Chiodini2022-03-06
|
* Allow the parser to avoid nested processing of invalid rules (GH-31252)Pablo Galindo Salgado2022-02-10
|