2011-11-29 11:16:45 +08:00
|
|
|
import org.antlr.v4.runtime.ANTLRFileStream;
|
2012-02-27 14:07:45 +08:00
|
|
|
import org.antlr.v4.runtime.CharStream;
|
2011-11-29 11:16:45 +08:00
|
|
|
import org.antlr.v4.runtime.CommonTokenStream;
|
2011-10-21 11:12:32 +08:00
|
|
|
|
2011-10-22 02:58:00 +08:00
|
|
|
public class TestT {
|
2011-06-15 08:29:02 +08:00
|
|
|
public static void main(String[] args) throws Exception {
|
2012-02-27 14:07:45 +08:00
|
|
|
CharStream input = new ANTLRFileStream(args[0]);
|
|
|
|
TLexer lex = new TLexer(input);
|
|
|
|
CommonTokenStream tokens = new CommonTokenStream(lex);
|
|
|
|
TParser parser = new TParser(tokens);
|
|
|
|
|
|
|
|
parser.setBuildParseTree(true);
|
|
|
|
parser.s();
|
2011-06-15 08:29:02 +08:00
|
|
|
}
|
|
|
|
}
|