Closed kfsone closed 2 years ago
@kfsone, you are correct since %whitespace
has higher priority and eats white spaces after tokens before a following operator gets evaluated. If you need to fully control white space behavior, you can't use %whitespace
, rather you have to do it manually. %whitespace
and %word
can be used for common situations, but don't cover all the possible use cases like yours.
We're using a quasi-ini styled file format, and one of the conditions I'd like to assert is that the section header lines have nothing but a newline after the close ']'.
Almost nowhere else do I care about newlines, or the grammar gets difficult, unfortunately the discard of whitespace appears to prevent doing this kind of lookahead test: