clause.accept(this, rule);
return rule;
}
public Object visit(final RIFClause n, final IRuleNode argu) {
final Rule parent = (Rule) argu;
// nur eine Aussage
if (n.f0.which == 0)
parent.setHead((IExpression) n.f0.choice.accept(this, argu));
else {
// And-verknuepfte Aussagen
final Conjunction conj = new Conjunction();
conj.setParent(parent);
for (final INode node : (List<INode>) ((List<INode>) n.f0.choice.accept(this, argu)).get(2).accept(this, argu))
conj.addExpr((IExpression) node.accept(this, argu));
if (!conj.isEmpty())
parent.setHead(conj);
}
if (n.f1.present()){
List<INode> bodyList = (List<INode>) n.f1.node.accept(this, argu);
parent.setBody((IExpression) bodyList.get(1).accept(this, argu));
for (final INode node : (List<INode>)(bodyList.get(2).accept(this, argu))){
parent.addNot((IExpression)(((NodeSequence) node).nodes.get(1).accept(this, argu)));
}
}
return parent;
}