1
0
mirror of https://github.com/python/cpython synced 2024-07-03 07:53:35 +00:00
cpython/Parser
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
..
lexer
tokenizer
action_helpers.c
asdl_c.py gh-118851: Default ctx arguments to AST constructors to Load() (#118854) 2024-05-09 15:30:14 -07:00
asdl.py
myreadline.c
parser.c 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
peg_api.c
pegen_errors.c
pegen.c gh-119118: Fix performance regression in tokenize module (#119615) 2024-05-28 19:17:49 +00:00
pegen.h gh-119118: Fix performance regression in tokenize module (#119615) 2024-05-28 19:17:49 +00:00
Python.asdl
string_parser.c
string_parser.h
token.c