Describe the bug
Negative predicate following a positive match of the same symbol seem to conflict with each other when parsing. This may be either bug or a case for documentation improvements if I'm understanding something incorrectly.
To Reproduce
For a trivial language:
expr = { term ~ (op ~ term)* }
term = { atom ~ ( bang ~ !"=" )? }
atom = _{ value | "(" ~ expr ~ ")" }
bang = { "!" }
op = { "+" | "-" | "=" | "!=" }
value = { ASCII_ALPHANUMERIC+ }
WHITESPACE = { " " }
I would expect something like x! = 2 to parse as value ~ bang ~ op ~ value, but it does not. I was trying to add positive predicates for whitespaces etc as well, but with no luck to make it work.
x != 2 and (x!)=2 and x!=2 parse correctly.
Expected behavior
x! = 2 parses correctly as value ~ bang ~ op ~ value.
Describe the bug
Negative predicate following a positive match of the same symbol seem to conflict with each other when parsing. This may be either bug or a case for documentation improvements if I'm understanding something incorrectly.
To Reproduce
For a trivial language:
I would expect something like
x! = 2to parse asvalue ~ bang ~ op ~ value, but it does not. I was trying to add positive predicates for whitespaces etc as well, but with no luck to make it work.x != 2and(x!)=2andx!=2parse correctly.Expected behavior
x! = 2parses correctly asvalue ~ bang ~ op ~ value.