cpython/Tools/peg_generator/pegen
Łukasz Langa 5c9cab595e
[3.10] bpo-45494: Fix parser crash when reporting errors involving invalid continuation characters (GH-28993) (GH-29070)
There are two errors that this commit fixes:

* The parser was not correctly computing the offset and the string
  source for E_LINECONT errors due to the incorrect usage of strtok().
* The parser was not correctly unwinding the call stack when a tokenizer
  exception happened in rules involving optionals ('?', [...]) as we
  always make them return valid results by using the comma operator. We
  need to check first if we don't have an error before continuing..
(cherry picked from commit a106343f63)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-10-19 22:31:18 +02:00
..
__init__.py
__main__.py Add small validator utility for PEG grammars (GH-23519) 2020-12-26 19:11:29 +00:00
ast_dump.py Fix some scripts in the peg generator folder (GH-19853) 2020-05-02 05:23:06 +01:00
build.py bpo-43244: Fix test_peg_generator for PyAST_Validate() (GH-24912) 2021-03-18 02:46:06 +01:00
c_generator.py [3.10] bpo-45494: Fix parser crash when reporting errors involving invalid continuation characters (GH-28993) (GH-29070) 2021-10-19 22:31:18 +02:00
first_sets.py [3.10] Fix typos in the Tools directory (GH-28769) (GH-28801) 2021-10-07 17:34:55 +02:00
grammar.py bpo-42997: Improve error message for missing : before suites (GH-24292) 2021-02-02 19:54:22 +00:00
grammar_parser.py bpo-38605: Revert making 'from __future__ import annotations' the default (GH-25490) 2021-04-21 12:41:19 +01:00
grammar_visualizer.py Clean up unused imports for the peg generator module (GH-19891) 2020-05-04 03:03:05 +01:00
keywordgen.py Delete remaining references to Grammar/Grammar from docs (#21624) 2020-07-26 08:27:52 -07:00
metagrammar.gram bpo-42997: Improve error message for missing : before suites (GH-24292) 2021-02-02 19:54:22 +00:00
parser.py
parser_generator.py Fix typing problems reported by mypy in pegen (GH-20297) 2020-05-21 21:39:44 +01:00
python_generator.py bpo-38605: Revert making 'from __future__ import annotations' the default (GH-25490) 2021-04-21 12:41:19 +01:00
sccutils.py Revert "Fix all Python Cookbook links (#22205)" (GH-22424) 2020-09-27 01:47:25 +01:00
testutil.py bpo-40750: Support -d flag in the new parser (GH-20340) 2020-05-25 18:38:45 +01:00
tokenizer.py
validator.py Add small validator utility for PEG grammars (GH-23519) 2020-12-26 19:11:29 +00:00