Skip to content

Commit f4f82f0

Browse files
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 <encukou@gmail.com>
1 parent fcd53b6 commit f4f82f0

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

InternalDocs/parser.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,13 @@ directory on the CPython repository and manually call the parser generator by ex
819819
$ python -m pegen python <PATH TO YOUR GRAMMAR FILE>
820820
```
821821

822+
> [!CAUTION]
823+
> Python's grammar (the `Grammar/python.gram` file) is written for the
824+
> C backend. To experiment, you will need to write a grammar
825+
> without C-specific parts like actions and the trailer.
826+
> See [#133560](https://github.com/python/cpython/issues/133560)
827+
> and [#96424](https://github.com/python/cpython/issues/96424) for more information.
828+
822829
This will generate a file called `parse.py` in the same directory that you
823830
can use to parse some input:
824831

0 commit comments

Comments
 (0)