lark/examples/README.md

16 lines
819 B
Markdown

# Examples for Lark
### Beginners
- [calc.py](calc.py) - A simple example of a REPL calculator
- [json\_parser.py](json_parser.py) - A simple JSON parser (comes with a tutorial, see docs)
- [indented\_tree.py](indented\_tree.py) - A demonstration of parsing indentation ("whitespace significant" language)
- [fruitflies.py](fruitflies.py) - A demonstration of ambiguity
- [turtle\_dsl.py](turtle_dsl.py) - Implements a LOGO-like toy language for Python's turtle, with interpreter.
### Advanced
- [python\_parser.py](python_parser.py) - A fully-working Python 2 & 3 parser (but not production ready yet!)
- [conf.py](conf.py) - Demonstrates the power of LALR's contextual lexer on a toy configuration language
- [reconstruct\_json.py](reconstruct_json.py) - Demonstrates the experimental text-reconstruction feature