]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-133560: Clarified `parser.md` doc for pegen parser issue in using the existing...
authorchemelnucfin <3982092+chemelnucfin@users.noreply.github.com>
Fri, 1 May 2026 08:11:53 +0000 (01:11 -0700)
committerGitHub <noreply@github.com>
Fri, 1 May 2026 08:11:53 +0000 (10:11 +0200)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
InternalDocs/parser.md

index 1d0ffe6d40d078a0b6e2297392e16e49e0400bc8..1bb4cdea5439f173d2cc5a9cfd385282724a09ab 100644 (file)
@@ -819,6 +819,13 @@ directory on the CPython repository and manually call the parser generator by ex
 $ python -m pegen python <PATH TO YOUR GRAMMAR FILE>
 ```
 
+> [!CAUTION]
+> Python's grammar (the `Grammar/python.gram` file) is written for the
+> C backend. To experiment, you will need to write a grammar
+> without C-specific parts like actions and the trailer.
+> See [#133560](https://github.com/python/cpython/issues/133560) 
+> and [#96424](https://github.com/python/cpython/issues/96424) for more information.
+
 This will generate a file called `parse.py` in the same directory that you
 can use to parse some input: