public static void main(String[] args) throws IOException {
CoqLexer lexer = new CoqLexer(new ANTLRFileStream("../TestProgramC.v"));
CoqFTParser parser = new CoqFTParser(new CommonTokenStream(lexer));
//Listener listener = new Listener(parser);
//parser.addParseListener(listener);
//CoqParser.ProgContext ctx = parser.prog();
//System.out.println(ctx.toStringTree(Arrays.asList(CoqParser.ruleNames)));
Prog prog = parser.parseProg();
for(Command command : prog) {
if(command instanceof AssertionAndProof) {
AssertionAndProof ap = (AssertionAndProof) command;
System.out.println(ap.getAssertion());
System.out.println("Proof:");
for(Tactic tactic : ap.getProof().getTactics()) {
System.out.println(tactic);
}
} else {
System.out.println(command);
}
}
}
Test.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:exterminator
作者:
评论列表
文章目录