Changing CPython’s grammar#


There’s more to changing Python’s grammar than editing Grammar/python.gram. Here’s a checklist.


These instructions are for Python 3.9 and beyond. Earlier versions use a different parser technology. You probably shouldn’t try to change the grammar of earlier Python versions, but if you really want to, use GitHub to track down the earlier version of this file in the devguide.

For more information on how to use the new parser, check the section on how to use CPython’s parser.


Note: sometimes things mysteriously don’t work. Before giving up, try make clean.