Pruduction with custom whitespace is not a branch rule #64
-
Hi, Some how I got my grammar in a state I can't figure how to get around it, I known what causes it but can't figure it out. godbolt link https://godbolt.org/z/b78d3sznG That doesn't compile, the reason is because of lines 10 and 17 Commenting those two lines, it will compile, only now I don't have white space skipping I got into this because I was writing tests for each production and when I added the root one it stopped compiling. Thank you very much, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I've recently changed whitespace skipping. As a consequence, productions that define |
Beta Was this translation helpful? Give feedback.
I've recently changed whitespace skipping. As a consequence, productions that define
whitespace
members can't be branch rules (because they skip whitespace first, which can't be used as a branch condition). However, you only need to add awhitespace
member to the root production anyway, it is then inherited by all children: https://godbolt.org/z/E7czTsq3v