]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.9] bpo-42218: Correctly handle errors in left-recursive rules (GH-23065) (GH-23066)
authorLysandros Nikolaou <lisandrosnik@gmail.com>
Sat, 31 Oct 2020 19:06:03 +0000 (21:06 +0200)
committerGitHub <noreply@github.com>
Sat, 31 Oct 2020 19:06:03 +0000 (12:06 -0700)
commitcfcb952e30e01d7cce430829af8edc7afc94e0b1
tree8a171bdafe7537ffc636aee5ee76afe9e5562a9b
parentdbaa07db671c4e5842629c8be912f2b0370be794
[3.9] bpo-42218: Correctly handle errors in left-recursive rules (GH-23065) (GH-23066)

Left-recursive rules need to check for errors explicitly, since
even if the rule returns NULL, the parsing might continue and lead
to long-distance failures.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 02cdfc93f82fecdb7eae97a868d4ee222b9875d9)

Automerge-Triggered-By: GH:lysnikolaou
Lib/test/test_syntax.py
Misc/NEWS.d/next/Core and Builtins/2020-10-31-17-50-23.bpo-42218.Dp_Z3v.rst [new file with mode: 0644]
Parser/pegen/parse.c
Tools/peg_generator/pegen/c_generator.py