Skip to content

Use of WS as a separator in parsing sexpr #1271

Answered by MegaIng
caw asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@caw
Comment options

@caw
Comment options

@MegaIng
Comment options

Answer selected by caw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants