2011-10-05 05:26:18 +08:00
|
|
|
import org.antlr.v4.runtime.ANTLRFileStream;
|
|
|
|
import org.antlr.v4.runtime.CommonTokenStream;
|
|
|
|
import org.antlr.v4.runtime.RuleContext;
|
2011-10-01 12:22:09 +08:00
|
|
|
|
|
|
|
public class TestW {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
WLexer t = new WLexer(new ANTLRFileStream(args[0]));
|
|
|
|
CommonTokenStream tokens = new CommonTokenStream(t);
|
|
|
|
WParser p = new WParser(tokens);
|
2011-10-12 08:16:29 +08:00
|
|
|
p.setBuildParseTree(true);
|
2011-10-05 05:26:18 +08:00
|
|
|
RuleContext ctx = p.s();
|
|
|
|
//System.out.println("ctx="+ctx.toStringTree(p));
|
2011-10-01 12:22:09 +08:00
|
|
|
}
|
|
|
|
}
|