lark/examples
Erez Shinan 23875c5590 Small fix in Python grammars (misread tuples, issue #68) 2018-01-21 16:10:26 +02:00
..
standalone Added standalone example 2018-01-11 16:02:02 +02:00
README.md Main README is now shorter and to the point. Added a short examples README 2017-10-31 19:44:20 +02:00
__init__.py Added examples (calc, json) 2017-02-05 13:40:19 +02:00
calc.py Earley now uses dynamic lexer by default. Bump to version 0.3.0 2017-08-04 16:05:40 +03:00
conf.py Fixed issue in examples.conf 2017-03-01 18:24:12 +02:00
conf_nolex.py Earley now uses dynamic lexer by default. Bump to version 0.3.0 2017-08-04 16:05:40 +03:00
fruitflies.png Improved Readme 2017-11-02 13:47:05 +02:00
fruitflies.py Improved Readme 2017-11-02 13:47:05 +02:00
indented_tree.py Changed parser/lexer interface in lark. Bumped minor version 2017-02-25 18:35:31 +02:00
json_parser.py Example JSON parser is now LALR 2018-01-02 09:58:19 +02:00
python2.g Small fix in Python grammars (misread tuples, issue #68) 2018-01-21 16:10:26 +02:00
python3.g Small fix in Python grammars (misread tuples, issue #68) 2018-01-21 16:10:26 +02:00
python_parser.py Fixed to Python3 grammar (Thanks @autocorr) 2017-11-20 13:25:09 +02:00
reconstruct_json.py Earley now uses dynamic lexer by default. Bump to version 0.3.0 2017-08-04 16:05:40 +03:00
turtle_dsl.py Earley now uses dynamic lexer by default. Bump to version 0.3.0 2017-08-04 16:05:40 +03:00

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

  • python_parser.py - A fully-working Python 2 & 3 parser (but not production ready yet!)
  • conf.py - Demonstrates the power of LALR's contextual lexer on a toy configuration language
  • reconstruct_json.py - Demonstrates the experimental text-reconstruction feature