"INT : (DIGIT)+ ;\n"+
"FLOAT : (DIGIT)+ '.' (DIGIT)* ;\n"+
"fragment DIGIT : '0'..'9';\n" +
"WS : (' ')+ ;\n");
CharStream input = new ANTLRStringStream("while x { i=; y=3.42; z=y; }");
Interpreter lexEngine = new Interpreter(g, input);
FilteringTokenStream tokens = new FilteringTokenStream(lexEngine);
tokens.setTokenTypeChannel(g.getTokenType("WS"), 99);
//System.out.println("tokens="+tokens.toString());
Interpreter parseEngine = new Interpreter(pg, tokens);
ParseTree t = parseEngine.parse("prog");
String result = t.toStringTree();
String expecting =
"(<grammar p> (prog while x { (assign i = (expr MismatchedSetException(10!={5,6,7})))))";
assertEquals(expecting, result);
}