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]);
|
2012-06-08 08:31:18 +08:00
|
|
|
T lex = new T(input);
|
2012-02-27 14:07:45 +08:00
|
|
|
CommonTokenStream tokens = new CommonTokenStream(lex);
|
2012-06-08 08:31:18 +08:00
|
|
|
tokens.fill();
|
|
|
|
System.out.println(tokens.getTokens());
|
2011-06-15 08:29:02 +08:00
|
|
|
}
|
|
|
|
}
|