public override void EnterPrecondition(pddlParser.PreconditionContext ctx) { /* * self.scopes.append(Scope()) */ this.scopes.Push(new Scope()); }
public override void ExitPrecondition(pddlParser.PreconditionContext ctx) { /* * scope = self.scopes.pop() * self.scopes[-1].precondition_pos = set( scope.atoms ) * self.scopes[-1].precondition_neg = set( scope.negatoms ) */ var scope = (Scope)this.scopes.Pop(); var op = (Operator)this.scopes.Peek(); op.precondition_pos = new HashSet <ROCollection <string> >(scope.atoms); op.precondition_neg = new HashSet <ROCollection <string> >(scope.negatoms); }