https://github.com/python/cpython/commit/f4f82f0ab6431837f4aca19c20fd1d25913b70c5
commit: f4f82f0ab6431837f4aca19c20fd1d25913b70c5
branch: main
author: chemelnucfin <[email protected]>
committer: encukou <[email protected]>
date: 2026-05-01T10:11:53+02:00
summary:

gh-133560: Clarified `parser.md` doc for pegen parser issue in using the 
existing `Grammar/python.gram` file. (GH-139194)

Co-authored-by: Petr Viktorin <[email protected]>

files:
M InternalDocs/parser.md

diff --git a/InternalDocs/parser.md b/InternalDocs/parser.md
index 1d0ffe6d40d078..1bb4cdea5439f1 100644
--- a/InternalDocs/parser.md
+++ b/InternalDocs/parser.md
@@ -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:
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to