2

Is there a way to do a negative lookahead in Grammar-kit?

Example: I have two tokens defined A and B and would like the define the a rule that matches A if it is not followed by B.

I tried to find it in this grammar, but I am not able to read it.

bbnkttp
  • 264
  • 1
  • 11

1 Answers1

2

Grammar-Kit is based on PEG (Parsing Expression Grammars).

  • Positive lookahead: &XXX
  • Negative lookahead: !XXX
CrazyCoder
  • 389,263
  • 172
  • 990
  • 904