1. Write a grammar. There are several ways to do that:
a) The canonical grammar format uses Python statements and expressions. Each rule is specified as Python function which should return a data structure that defines the rule. For example a grammar for simple calculator can be written as:
1.a) The canonical grammar format uses Python statements and expressions. Each rule is specified as Python function which should return a data structure that defines the rule. For example a grammar for simple calculator can be written as:
.. code:: python
...
...
@@ -52,10 +52,10 @@ a) The canonical grammar format uses Python statements and expressions. Each rul