cpython/Tools/peg_generator
Petr Viktorin 6a2f12a754
[3.10] gh-125529: Avoid f-strings in the metagrammar (#125582)
Grammar actions need to be valid Python tokens and the accepted tokens need to be
listed in the actions mini-grammar).

In Python 3.12+ (PEP 701), f-strings are no longer STRING tokens, so pegen fails
to regenerate the metaparser on this Python version, as in:

   PYTHON_FOR_REGEN=python3.12 make regen-pegen-metaparser

Use `+` and plain strings rather than f-strings.

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2024-10-22 12:41:51 +01:00
..
data Fix some scripts in the peg generator folder (GH-19853) 2020-05-02 05:23:06 +01:00
peg_extension Sanitize macros and debug functions in pegen.c (GH-25291) 2021-04-09 01:17:31 +01:00
pegen [3.10] gh-125529: Avoid f-strings in the metagrammar (#125582) 2024-10-22 12:41:51 +01:00
scripts [3.10] Update grammar_grapher with the new forced (&&) directive (GH-31704) (GH-31719) 2022-03-07 14:54:08 +00:00
.clang-format bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503) 2020-04-22 23:29:27 +01:00
.gitignore bpo-40669: Install PEG benchmarking dependencies in a venv (GH-20183) 2020-05-18 11:27:40 -07:00
Makefile bpo-40939: Clean and adapt the peg_generator directory after deleting the old parser (GH-20822) 2020-06-12 01:55:35 +01:00
mypy.ini bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503) 2020-04-22 23:29:27 +01:00
pyproject.toml bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503) 2020-04-22 23:29:27 +01:00
requirements.pip bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503) 2020-04-22 23:29:27 +01:00