Commit f0ac5e4c authored by Igor Dejanovic's avatar Igor Dejanovic

README update

parent f22474b1
...@@ -41,7 +41,7 @@ Quick start ...@@ -41,7 +41,7 @@ Quick start
Write a grammar. There are several ways to do that: Write a grammar. There are several ways to do that:
- The canonical grammar format uses Python statements and expressions. - The canonical grammar format uses Python statements and expressions.
Each rule is specified as Python function which should return a data Each rule is specified as Python function which should return a data
structure that defines the rule. For example a grammar for simple structure that defines the rule. For example a grammar for simple
calculator can be written as: calculator can be written as:
...@@ -61,7 +61,7 @@ Write a grammar. There are several ways to do that: ...@@ -61,7 +61,7 @@ Write a grammar. There are several ways to do that:
The python lists in the data structure represent ordered choices while the tuples represent sequences from the PEG. The python lists in the data structure represent ordered choices while the tuples represent sequences from the PEG.
For terminal matches use plain strings or regular expressions. For terminal matches use plain strings or regular expressions.
- The same grammar could also be written using traditional textual PEG syntax like this: - The same grammar could also be written using traditional textual PEG syntax like this:
:: ::
...@@ -72,7 +72,7 @@ Write a grammar. There are several ways to do that: ...@@ -72,7 +72,7 @@ Write a grammar. There are several ways to do that:
expression <- term (("+" / "-") term)*; expression <- term (("+" / "-") term)*;
calc <- expression+ EOF; calc <- expression+ EOF;
- Or similar syntax but a little bit more readable like this: - Or similar syntax but a little bit more readable like this:
:: ::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment