EBNF Rule: Not

Prev:EBNF Rule: And
Next:EBNF Rule: Character Class

Any rule element prefixed by an exclamation mark (!) performs the Parsing Expression Grammar 'Not Predicate' match. It attempts to match the rule against the input string. It will cause the parse to succeed if the rule match fails, and to fail if the rule match succeeds. It will not consume anything from the input string however and does not leave any result in the AST. This can be used for lookahead and disambiguation in choices.

USING: prettyprint peg.ebnf ; "<abcd>" EBNF[[ rule="<" (!(">") .)* ">" ]] .
V{ "<" V{ 97 98 99 100 } ">" }