cpython/Tools/peg_generator
Petr Viktorin 48f21b3631
gh-118235: Move RAISE_SYNTAX_ERROR actions to invalid rules and make sure 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.
2024-05-30 09:27:32 +02:00
..
peg_extension gh-110805: Fix test_peg_generator after the change in the parser for REPL tracebacks (#110814) 2023-10-13 13:04:23 +02:00
pegen gh-118235: Move RAISE_SYNTAX_ERROR actions to invalid rules and make sure they stay there (GH-119731) 2024-05-30 09:27:32 +02:00
.clang-format
.gitignore gh-105191: Cleanup peg generator; keep only necessary files (#105197) 2023-06-01 17:24:15 +02: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