Exemplo n.º 1
0
 public override void ExitGoalDesc(pddlParser.GoalDescContext ctx)
 {
     /*
      * self.negativescopes.pop()
      */
     this.negativescopes.Pop();
 }
Exemplo n.º 2
0
        public override void EnterGoalDesc(pddlParser.GoalDescContext ctx)
        {
            /*
             * negscope = False
             * for c in ctx.getChildren():
             *  if c.getText() == 'not':
             *      negscope = True
             *      break
             * self.negativescopes.append(negscope)
             */
            var negscope = false;

            for (int i = 0; i < ctx.ChildCount; i++)
            {
                var c = ctx.GetChild(i);
                if (c.GetText() == "not")
                {
                    negscope = true;
                    break;
                }
            }
            this.negativescopes.Push(negscope);
        }