Java 类org.antlr.v4.runtime.misc.TestRig 实例源码

项目:digraph-parser    文件:RunAntlrTestRig.java   
public static void main(String[] args) throws Exception {
    String grammarName = "com.paypal.digraph.parser.antlr.DOT";
    String startRuleName = "graph";

    String[] testArgs1 = {grammarName, startRuleName, "-tree", "src/test/resources/test3.dg"};
    TestRig.main(testArgs1);

    String[] testArgs2 = {grammarName, startRuleName, "-gui", "src/test/resources/test3.dg"};
    TestRig.main(testArgs2);
}
项目:PQL    文件:AbstractPQLAPI.java   
@Override
public void parsePQLQuery(String pqlPath) throws Exception {
    String[] input = new String[4];
    input[0] = "PQL";
    input[1] = "query";
    input[2] = "-gui";
    input[3] = pqlPath;

    TestRig testRig = new TestRig(input);
    testRig.process();
}