Staging
v0.5.1
https://github.com/python/cpython
Revision 24a7c298d47658295673dc04d1b6d59f2b200a7c authored by Lysandros Nikolaou on 28 October 2020, 00:14:15 UTC, committed by GitHub on 28 October 2020, 00:14:15 UTC
* Implement running the parser a second time for the errors messages

The first parser run is only responsible for detecting whether
there is a `SyntaxError` or not. If there isn't the AST gets returned.
Otherwise, the parser is run a second time with all the `invalid_*`
rules enabled so that all the customized error messages get produced.

(cherry picked from commit bca701403253379409dece03053dbd739c0bd059)
1 parent c4b58ce
History
Tip revision: 24a7c298d47658295673dc04d1b6d59f2b200a7c authored by Lysandros Nikolaou on 28 October 2020, 00:14:15 UTC
[3.9] bpo-42123: Run the parser two times and only enable invalid rules on the second run (GH-22111) (GH-23011)
Tip revision: 24a7c29
File Mode Size
pegen
pgen
Python.asdl -rw-r--r-- 5.2 KB
acceler.c -rw-r--r-- 3.3 KB
asdl.py -rw-r--r-- 12.7 KB
asdl_c.py -rwxr-xr-x 48.8 KB
grammar1.c -rw-r--r-- 1.0 KB
listnode.c -rw-r--r-- 1.7 KB
myreadline.c -rw-r--r-- 11.6 KB
node.c -rw-r--r-- 5.1 KB
parser.c -rw-r--r-- 12.4 KB
parser.h -rw-r--r-- 1.4 KB
parsetok.c -rw-r--r-- 14.0 KB
token.c -rw-r--r-- 4.5 KB
tokenizer.c -rw-r--r-- 56.9 KB
tokenizer.h -rw-r--r-- 3.8 KB

back to top