0

The - operator is supposed to support negation, but I can't get it to work:

raw-type = "DINT" | "REAL" | "SINT" | "BIT"
custom-type = - raw-type

Every time I try I get the error: RuntimeException - occurs on the right-hand side of your grammar, but not on the left instaparse.cfg/check-grammar (cfg.clj:252). It doesn't seem to matter where I put the -.

So how to get past this error? Or is there another way of doing the custom-type above?

Chris Murphy
  • 6,411
  • 1
  • 24
  • 42

1 Answers1

1

! is negation. Use ! rather than -.

puzzler
  • 316
  • 1
  • 7