Exemple #1
0
 public override void EnterEffect(pddlParser.EffectContext ctx)
 {
     /*
      * self.scopes.append(Scope())
      */
     this.scopes.Push(new Scope());
 }
Exemple #2
0
        public override void ExitEffect(pddlParser.EffectContext ctx)
        {
            /*
             * scope = self.scopes.pop()
             * self.scopes[-1].effect_pos = set( scope.atoms )
             * self.scopes[-1].effect_neg = set( scope.negatoms )
             */
            var scope = (Scope)this.scopes.Pop();
            var op    = (Operator)this.scopes.Peek();

            op.effect_pos = new HashSet <ROCollection <string> >(scope.atoms);
            op.effect_neg = new HashSet <ROCollection <string> >(scope.negatoms);
        }