mirror of https://github.com/lark-parser/lark.git
33caa391d5
* Removed the scanless parsing feature (dynamic lexing is king) * Default LALR lexer is now contextual |
||
---|---|---|
.. | ||
standalone | ||
README.md | ||
__init__.py | ||
calc.py | ||
conf_earley.py | ||
conf_lalr.py | ||
error_reporting_lalr.py | ||
fruitflies.png | ||
fruitflies.py | ||
indented_tree.py | ||
json_parser.py | ||
python2.g | ||
python3.g | ||
python_parser.py | ||
reconstruct_json.py | ||
turtle_dsl.py |
README.md
Examples for Lark
Beginners
- calc.py - A simple example of a REPL calculator
- json_parser.py - A simple JSON parser (comes with a tutorial, see docs)
- indented_tree.py - A demonstration of parsing indentation ("whitespace significant" language)
- fruitflies.py - A demonstration of ambiguity
- turtle_dsl.py - Implements a LOGO-like toy language for Python's turtle, with interpreter.
Advanced
- error_reporting_lalr.py - A demonstration of example-driven error reporting with the LALR parser
- python_parser.py - A fully-working Python 2 & 3 parser (but not production ready yet!)
- conf_lalr.py - Demonstrates the power of LALR's contextual lexer on a toy configuration language
- conf_earley.py - Demonstrates the power of Earley's dynamic lexer on a toy configuration language
- reconstruct_json.py - Demonstrates the experimental text-reconstruction feature