diff --git a/Doc/reference/grammar.rst b/Doc/reference/grammar.rst index b9cca4444c9141..1c8f8cdcfea8ab 100644 --- a/Doc/reference/grammar.rst +++ b/Doc/reference/grammar.rst @@ -18,5 +18,7 @@ required *not* to match). We use the ``|`` separator to mean PEG's "ordered choice" (written as ``/`` in traditional PEG grammars). See :pep:`617` for more details on the grammar's syntax. -.. literalinclude:: ../../Grammar/python.gram - :language: peg +.. only:: html or latex or epub or text or texinfo + + .. literalinclude:: ../../Grammar/python.gram + :language: peg