Erez Sh 155f4a8c0f | vor 3 Jahren | |
---|---|---|
.. | ||
README.md | vor 3 Jahren | |
combined_csv_and_json.txt | vor 3 Jahren | |
csv.lark | vor 3 Jahren | |
eval_csv.py | vor 3 Jahren | |
eval_json.py | vor 3 Jahren | |
json.lark | vor 3 Jahren | |
main.py | vor 3 Jahren | |
storage.lark | vor 3 Jahren |
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.