Let\'s say that I want to match \"beer\", but don\'t care about case sensitivity.
Currently I am defining a token to be (\'b\'|\'B\' \'e\'|\'E\' \'e\'|\'E\' \'r\'|
New documentation page has appeared in ANTLR GitHub repo: Case-Insensitive Lexing. You can use two approaches:
My opinion, it's better to use the first approach and have the grammar which describes all the rules. But if you use well-known grammar, for example from Grammars written for ANTLR v4, then second approach may be more appropriate.