Utilities.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:Tarski 作者:
/**
 * 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;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号