mirror of
https://github.com/python/cpython.git
synced 2025-10-29 20:51:26 +00:00
Co-authored-by: Blaise Pabon <blaise@gmail.com> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
19 lines
626 B
ReStructuredText
19 lines
626 B
ReStructuredText
.. _full-grammar-specification:
|
|
|
|
Full Grammar specification
|
|
==========================
|
|
|
|
This is the full Python grammar, derived directly from the grammar
|
|
used to generate the CPython parser (see :source:`Grammar/python.gram`).
|
|
The version here omits details related to code generation and
|
|
error recovery.
|
|
|
|
The notation used here is the same as in the preceding docs,
|
|
and is described in the :ref:`notation <notation>` section,
|
|
except for an extra complication:
|
|
|
|
* ``~`` ("cut"): commit to the current alternative and fail the rule
|
|
even if this fails to parse
|
|
|
|
.. literalinclude:: ../../Grammar/python.gram
|
|
:language: peg
|