2011-11-26 02:38:36 +08:00
|
|
|
import org.antlr.v4.runtime.ANTLRFileStream;
|
|
|
|
import org.antlr.v4.runtime.CommonTokenStream;
|
2011-09-23 09:16:22 +08:00
|
|
|
|
|
|
|
public class TestU {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
ULexer t = new ULexer(new ANTLRFileStream(args[0]));
|
|
|
|
CommonTokenStream tokens = new CommonTokenStream(t);
|
|
|
|
UParser p = new UParser(tokens);
|
2011-12-08 09:47:08 +08:00
|
|
|
p.setBuildParseTree(true);
|
2012-06-08 08:31:18 +08:00
|
|
|
// ParserRuleContext r = p.s();
|
|
|
|
// System.out.println(r.toStringTree(p));
|
2011-09-23 09:16:22 +08:00
|
|
|
}
|
|
|
|
}
|