cpython/Tools/peg_generator
Łukasz Langa 88f4ec88e2
[3.9] bpo-45494: Fix parser crash when reporting errors involving invalid continuation characters (GH-28993) (#29071)
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>

NOTE: unlike the cherry-picked original, this commit points at a crazy location
due to a bug in the tokenizer that required a big refactor in 3.10 to fix.
We are leaving as-is for 3.9.
2021-10-20 18:51:13 +02:00
..
data Fix some scripts in the peg generator folder (GH-19853) 2020-05-02 05:23:06 +01:00
peg_extension Fix peg_generator compiler warnings under MSVC (GH-20405) 2020-05-25 21:52:21 -07:00
pegen [3.9] bpo-45494: Fix parser crash when reporting errors involving invalid continuation characters (GH-28993) (#29071) 2021-10-20 18:51:13 +02:00
scripts [3.9] Fix typos in the Tools directory (GH-28769) (GH-28800) 2021-10-07 17:31:24 +02:00
.clang-format
.gitignore bpo-40669: Install PEG benchmarking dependencies in a venv (GH-20183) 2020-05-18 11:27:40 -07:00
Makefile Refactor scripts in Tools/peg_generator/scripts (GH-20401) 2020-06-05 21:41:12 -07:00
mypy.ini
pyproject.toml
requirements.pip