/**
* Creating negation expression.
*/
public static NegationContext createNegationContext(final ExprContext expr) {
final NegationContext negationContext = new NegationContext(new ExprContext());
final TerminalNodeImpl notNode = new TerminalNodeImpl(new CommonToken(FOLParser.NOT, "not"));
// Setting context parents.
notNode.parent = negationContext;
expr.parent = negationContext;
// Adding negation expression's children.
negationContext.addChild(notNode);
negationContext.addChild(expr);
return negationContext;
}
Utilities.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:WP3
作者:
评论列表
文章目录