String expecting = "INT, WS, INT, EOF";
checkLexerMatches(lg, "32 99", expecting);
}
@Test public void testRecursiveLexerRuleRef() throws Exception {
LexerGrammar lg = new LexerGrammar(
"lexer grammar L;\n"+
"CMT : '/*' (CMT | ~'*')+ '*/' ;\n" +
"WS : (' '|'\\n')+ ;");
String expecting = "CMT, WS, CMT, EOF";
checkLexerMatches(lg, "/* ick */\n/* /*nested*/ */", expecting);