diff --git a/How-to-use-Lark.md b/How-to-use-Lark.md index 6139a12..e4c42f2 100644 --- a/How-to-use-Lark.md +++ b/How-to-use-Lark.md @@ -25,17 +25,19 @@ Here is some mock usage of them. You can see a real example in the [[examples]] ```python from lark import Lark, Transformer -parser = Lark("""start: rules and more rules +gramamr = """start: rules and more rules - rule1: other rules AND TOKENS - | rule1 "+" rule2 -> add - | some value [maybe] + rule1: other rules AND TOKENS + | rule1 "+" rule2 -> add + | some value [maybe] rule2: rule1 "-" (rule2 | "whatever")* TOKEN1: "a literal" TOKEN2: TOKEN1 "and literals" - """, start="ebnf") + """ + +parser = Lark(grammar) tree = parser.parse("some input string")