-
I have a simple sexpr parser:
this fails on
if there is no space I can fix this by setting the separator in the
I get a correct parse, but is that the sensible way to do this? And I'm not sure how "%ignore WS" interacts with WS being in a rule. with thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This is fine. The first example fails because you are explicitly requiring a space. Don't b so that it that is not the correct semantics. The second example will work, lark will prefer using a terminal in a rule instead of ignoring it. For a slightly different syntax you can also have no seperator in the list at all. |
Beta Was this translation helpful? Give feedback.
This is fine. The first example fails because you are explicitly requiring a space. Don't b so that it that is not the correct semantics.
The second example will work, lark will prefer using a terminal in a rule instead of ignoring it.
For a slightly different syntax you can also have no seperator in the list at all.