File: README.rst

package info (click to toggle)
python-lark 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,788 kB
  • sloc: python: 13,305; javascript: 88; makefile: 34; sh: 8
file content (12 lines) | stat: -rw-r--r-- 500 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
Grammar Composition
===================

This example shows how to do grammar composition in Lark, by creating a new
file format that allows both CSV and JSON to co-exist.

We show how, by using namespaces, Lark grammars and their transformers can be fully reused -
they don't need to care if their grammar is used directly, or being imported, or who is doing the importing.

See `main.py`_ for more details.

.. _main.py: https://github.com/lark-parser/lark/blob/master/examples/composition/main.py