Repository navigation
List separated by two newlines #255
Unanswered
codergal6502
asked this question in
Q&A
Replies: 1 comment
|
A sequence rule is no longer a branch rule, because it would involve non-trivial backtracking. If you want two newlines as separators, you need something like |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi. I'm trying to parse a list separated by two newlines. In the sandbox, I wrote this example:
That parses this successfully:
However, when I switch to trying to use two newlines:
I then get an error:
Reading https://lexy.foonathan.net/reference/dsl/newline/#newline, as well as the documentation for LEXY_LIT, they're both token rules. Is that why this happens? Is something else going on? In my non-toy example, I can probably work around this, but I am curious for future reference. Thanks!
All reactions