I am trying to convert an EBNF file into working BNF for IntelliJ Grammar-kit.
In the EBNF there are rules as such:
BinOpChar ::= "~" | "!" | "@" | "#" | "$" | "%" | "^" | "&" | "*" | "-"
BinOp ::= BinOpChar, {BinOpChar}
How can I create such rules without resorting to regex? Reason being is that this kind of construct happens very often and it becomes repetitive to do in regex.
To be clear, I would like to be able to create a rule to match @@
from BinOpChar
but don't match @ @
. Is that possible?