@Test public void testLexerLoops() throws Exception {
		LexerGrammar lg = new LexerGrammar(
			"lexer grammar L;\n"+
			"INT : '0'..'9'+ ;\n" +
			"ID : 'a'..'z'+ ;\n");
		String expecting = "ID, INT, ID, INT, EOF";
		checkLexerMatches(lg, "a34bde3", expecting);
	}
Lexer rules are little quirky when it comes to wildcards. Problem
stems from the fact that we want the longest match to win among
several rules and even within a rule. However, that conflicts
with the notion of non-greedy, which by definition tries to match
the fewest possible. During ATN construction, non-greedy loops
have their entry and exit branches reversed so that the ATN
simulator will see the exit branch 1st, giving it a priority. The
1st path to the stop state kills any other paths for that rule
that begin with the wildcard. In general, this does everything we
want, but occasionally there are some quirks as you'll see from
the tests below.
tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java