@Test public void testMultAltLoop() throws Exception {
Grammar g = new Grammar(
"lexer grammar t;\n"+
"A : ('0'..'9'|'a'|'b')+ ;\n");
final int Atype = g.getTokenType("A");
Interpreter engine = new Interpreter(g, new ANTLRStringStream("a"));
Token result = engine.scan("A");
engine = new Interpreter(g, new ANTLRStringStream("a"));
result = engine.scan("A");
assertEquals(result.getType(), Atype);
engine = new Interpreter(g, new ANTLRStringStream("1234"));
result = engine.scan("A");
assertEquals(result.getType(), Atype);
engine = new Interpreter(g, new ANTLRStringStream("aaa"));
result = engine.scan("A");
assertEquals(result.getType(), Atype);
engine = new Interpreter(g, new ANTLRStringStream("aaaa9"));
result = engine.scan("A");
assertEquals(result.getType(), Atype);
engine = new Interpreter(g, new ANTLRStringStream("b"));
result = engine.scan("A");
assertEquals(result.getType(), Atype);
engine = new Interpreter(g, new ANTLRStringStream("baa"));
result = engine.scan("A");
assertEquals(result.getType(), Atype);
}