How to deal with overlapping character groups in different tokens in an EBNF grammar?
I'm using an LL(k) EBNF grammar to parse a character stream. I need three different types of tokens: CHARACTERS letter = 'A'..'Z' + 'a'..'z' . digit = "0123456789" . messageChar = '\u0020'..'\u007e' - ' ' - '(' - ')' . TOKENS num = ['-'] digit { digit } [ '.' digit { digit } ] . ident = letter { letter | digit | '_' } . ...