Hi for example I have this code for the g4 file:
a: [A-Z][A-Z];
b: [a-z]'3';
Now I want to add one line more, which recognizes all characters that do not belong to a or b
I tried:
a: [A-Z][A-Z];
b: [a-z]'3';
ALLOTHERCHARACTERS: ~[a]|~[b]
But i didn´t work.
For example the input 84209ddjio29 should now be in ALLOTHERCARACTERS, but i didn ´t work.
(The Lexer gives at the end a java file, but I think this is not important to know, for this "task")