.. _formal grammar: Scenic Grammar ============== This page gives the formal `Parsing Expression Grammar `_ (PEG) used to parse the Scenic language. It is in the format of `the Pegen parser generator `_, and is based on the Python grammar from `CPython `_ (see :file:`Grammar/python.gram` in the CPython repository). In the source code, the grammar can be found at :file:`src/scenic/syntax/scenic.gram`. .. literalinclude:: /../src/scenic/syntax/scenic.gram :language: pegen