Notice punctuation doesn't appear in the resulting tree. It's automatically filtered away by Lark.
## Tiny Calculator
### Tiny Calculator
```python
from lark import Lark, InlineTransformer
@@ -131,11 +131,11 @@ These features may be implemented some day:
### Lark is easier to use
- You can work with parse-trees instead of state-machines .
- You can work with parse-trees instead of state-machines
- The grammar is simple to read and write
- There are no restrictions on grammar structure. Any grammar you write can be parsed.
- Some structures are faster than others. If you care about speed, you can learn them gradually while the parser is already working.
- A well-written grammar is very fast.
- A well-written grammar is very fast
- Note: Nondeterminstic grammars will run a little slower
- Note: Ambiguous grammars (grammars that can be parsed in more than one way) are supported, but may cause significant slowdown if the ambiguity is too big)
- You don't have to worry about terminals (regexps) or rules colliding
@@ -146,9 +146,9 @@ These features may be implemented some day:
| Code | CPython Time | PyPy Time | CPython Mem | PyPy Mem