Browse Source

move advanced examples to a different folder

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.10.0
Sasank Chilamkurthy 5 years ago
parent
commit
582e9ab935
15 changed files with 4 additions and 46 deletions
  1. +2
    -46
      examples/README.rst
  2. +2
    -0
      examples/advanced/README.rst
  3. +0
    -0
      examples/advanced/conf_earley.py
  4. +0
    -0
      examples/advanced/conf_lalr.py
  5. +0
    -0
      examples/advanced/custom_lexer.py
  6. +0
    -0
      examples/advanced/error_puppet.py
  7. +0
    -0
      examples/advanced/error_reporting_lalr.py
  8. +0
    -0
      examples/advanced/python2.lark
  9. +0
    -0
      examples/advanced/python3.lark
  10. +0
    -0
      examples/advanced/python_bytecode.py
  11. +0
    -0
      examples/advanced/python_parser.py
  12. +0
    -0
      examples/advanced/qscintilla_json.py
  13. +0
    -0
      examples/advanced/reconstruct_json.py
  14. +0
    -0
      examples/advanced/template_lark.lark
  15. +0
    -0
      examples/advanced/templates.py

+ 2
- 46
examples/README.rst View File

@@ -17,49 +17,5 @@ standard library of your local installation:

[lark]$ python -m examples.python_parser

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.
- `lark_grammar.py`_ + `lark.lark`_ - A reference implementation of the
Lark grammar (using LALR(1) + standard lexer)

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!)
- `python_bytecode.py`_ - A toy example showing how to compile Python
directly to bytecode
- `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
- `custom_lexer.py`_ - Demonstrates using a custom lexer to parse a
non-textual stream of data
- `reconstruct_json.py`_ - Demonstrates the experimental
text-reconstruction feature

.. _calc.py: calc.py
.. _json_parser.py: json_parser.py
.. _indented_tree.py: indented_tree.py
.. _fruitflies.py: fruitflies.py
.. _turtle_dsl.py: turtle_dsl.py
.. _lark_grammar.py: lark_grammar.py
.. _lark.lark: lark.lark
.. _error_reporting_lalr.py: error_reporting_lalr.py
.. _python_parser.py: python_parser.py
.. _python_bytecode.py: python_bytecode.py
.. _conf_lalr.py: conf_lalr.py
.. _conf_earley.py: conf_earley.py
.. _custom_lexer.py: custom_lexer.py
.. _reconstruct_json.py: reconstruct_json.py
Beginner Examples
~~~~~~~~~~~~~~~~~

+ 2
- 0
examples/advanced/README.rst View File

@@ -0,0 +1,2 @@
Advanced Examples
~~~~~~~~~~~~~~~~~

examples/conf_earley.py → examples/advanced/conf_earley.py View File


examples/conf_lalr.py → examples/advanced/conf_lalr.py View File


examples/custom_lexer.py → examples/advanced/custom_lexer.py View File


examples/error_puppet.py → examples/advanced/error_puppet.py View File


examples/error_reporting_lalr.py → examples/advanced/error_reporting_lalr.py View File


examples/python2.lark → examples/advanced/python2.lark View File


examples/python3.lark → examples/advanced/python3.lark View File


examples/python_bytecode.py → examples/advanced/python_bytecode.py View File


examples/python_parser.py → examples/advanced/python_parser.py View File


examples/qscintilla_json.py → examples/advanced/qscintilla_json.py View File


examples/reconstruct_json.py → examples/advanced/reconstruct_json.py View File


examples/template_lark.lark → examples/advanced/template_lark.lark View File


examples/templates.py → examples/advanced/templates.py View File


Loading…
Cancel
Save