lexer grammar t040bug80; options { language =Cpp; } @lexer::includes { #include "UserTestTraits.hpp" } @lexer::namespace { Antlr3Test } ID_LIKE : 'defined' | {False}? Identifier | Identifier ; fragment Identifier: 'a'..'z'+ ; // with just 'a', output compiles