cpython/Tools/peg_generator
Petr Viktorin f0a0467c17
gh-143054: Disallow non-top-level Cut for now (GH-143622)
The behaviour of Cut in nested parentheses, Repeat, Opt, and similar
is somewhat chaotic. Apparently even the academic papers on PEG aren't
as clear as they could be.

And it doesn't really matter. Python only uses top-level cuts.
When that changes, we can clarify as much as necessary (and even
change the implementation to make sense for what we'll need).

Document that this is deliberately unspecified, and add a test to
make sure any decision is deliberate, tested and documented.
2026-01-13 13:21:59 +01:00
..
peg_extension gh-135801: Add the module parameter to compile() etc (GH-139652) 2025-11-13 13:21:32 +02:00
pegen gh-143054: Disallow non-top-level Cut for now (GH-143622) 2026-01-13 13:21:59 +01:00
.clang-format bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503) 2020-04-22 23:29:27 +01:00
.gitignore gh-105191: Cleanup peg generator; keep only necessary files (#105197) 2023-06-01 17:24:15 +02:00
.ruff.toml gh-92266: Update pre-commit (#139411) 2025-10-01 08:40:54 +03:00
Makefile gh-105191: Cleanup peg generator; keep only necessary files (#105197) 2023-06-01 17:24:15 +02:00
mypy.ini gh-108455: peg_generator: enable mypy's --warn-unreachable setting and redundant-expr error code (#109160) 2023-09-08 22:05:40 +01:00
pyproject.toml gh-105191: Cleanup peg generator; keep only necessary files (#105197) 2023-06-01 17:24:15 +02:00