From 155f4a8c0f9fbafcb0eafe65a4d6f1816a3058f2 Mon Sep 17 00:00:00 2001 From: Erez Sh Date: Sat, 28 Aug 2021 19:49:31 +0100 Subject: [PATCH] Examples: Tiny fix --- examples/composition/main.py | 2 +- examples/composition/storage.lark | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/composition/main.py b/examples/composition/main.py index a549abe..c6f150f 100644 --- a/examples/composition/main.py +++ b/examples/composition/main.py @@ -15,7 +15,7 @@ file format that allows both CSV and JSON to co-exist. The resulting transformer can evaluate both JSON and CSV in the parse tree. The methods of each transformer are renamed into their appropriate namespace, using the given prefix. - This appraoch allows full re-use: the transformers don't need to care if their grammar is used directly, + This approach allows full re-use: the transformers don't need to care if their grammar is used directly, or being imported, or who is doing the importing. """ diff --git a/examples/composition/storage.lark b/examples/composition/storage.lark index 8e2bacc..09bb0ae 100644 --- a/examples/composition/storage.lark +++ b/examples/composition/storage.lark @@ -1,8 +1,9 @@ start: (csv__start | json__start _NL?)+ -// Renaming of the import variables is required, as they -// receive the namespace of this file. +// Renaming of the import variables is required, as they receive the namespace of this file. // See: https://github.com/lark-parser/lark/pull/973#issuecomment-907287565 %import .csv.start -> csv__start -%import .csv._NL -> _NL %import .json.start -> json__start + +%import .csv._NL -> _NL +