cpython/Parser
Pablo Galindo c878a97968
bpo-44180: Fix edge cases in invalid assigment rules in the parser (GH-26283)
The invalid assignment rules are very delicate since the parser can
easily raise an invalid assignment when a keyword argument is provided.
As they are very deep into the grammar tree, is very difficult to
specify in which contexts these rules can be used and in which don't.
For that, we need to use a different version of the rule that doesn't do
error checking in those situations where we don't want the rule to raise
(keyword arguments and generator expressions).

We also need to check if we are in left-recursive rule, as those can try
to eagerly advance the parser even if the parse will fail at the end of
the expression. Failing to do this allows the parser to start parsing a
call as a tuple and incorrectly identify a keyword argument as an
invalid assignment, before it realizes that it was not a tuple after all.
2021-05-21 18:34:54 +01:00
..
Python.asdl bpo-43892: Make match patterns explicit in the AST (GH-25585) 2021-04-28 22:58:44 -07:00
asdl.py bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25142) 2021-04-02 12:53:46 +09:00
asdl_c.py bpo-43244: Rename pycore_ast.h functions to _PyAST_xxx() (GH-25252) 2021-04-07 21:34:22 +02:00
myreadline.c bpo-30555: Fix WindowsConsoleIO fails in the presence of fd redirection (GH-1927) 2021-04-23 23:00:27 +01:00
parser.c bpo-44180: Fix edge cases in invalid assigment rules in the parser (GH-26283) 2021-05-21 18:34:54 +01:00
peg_api.c bpo-43244: Remove parser_interface.h header file (GH-25001) 2021-03-24 01:29:09 +01:00
pegen.c bpo-44180: Fix edge cases in invalid assigment rules in the parser (GH-26283) 2021-05-21 18:34:54 +01:00
pegen.h bpo-44180: Fix edge cases in invalid assigment rules in the parser (GH-26283) 2021-05-21 18:34:54 +01:00
string_parser.c bpo-43244: Rename pycore_ast.h functions to _PyAST_xxx() (GH-25252) 2021-04-07 21:34:22 +02:00
string_parser.h bpo-43244: Remove ast.h, asdl.h, Python-ast.h headers (GH-24933) 2021-03-23 20:47:40 +01:00
token.c bpo-43822: Improve syntax errors for missing commas (GH-25377) 2021-04-15 21:38:45 +01:00
tokenizer.c Fix tokenizer error when raw decoding null bytes (GH-25080) 2021-03-30 00:24:49 +01:00
tokenizer.h bpo-25643: Refactor the C tokenizer into smaller, logical units (GH-25050) 2021-03-28 23:48:05 +01:00