Package com.dtrules.interpreter

Examples of com.dtrules.interpreter.IRObject.execute()


            if(rps!= null) {
                for(int column : columns){
                    if(column < rps.length){
                       IRObject ps = rps[column];
                       if(ps != null){
                          ps.execute(state);
                          ps = state.datapop();
                          if(ps != RNull.getRNull()){
                              ra.add(ps);
                          }
                       }
View Full Code Here


                    }
                }
                if(columns.size()==0){
                    IRObject ps = rps[0];
                    if(ps != null){
                       ps.execute(state);
                       ps = state.datapop();
                       if(ps != RNull.getRNull()){
                           ra.add(ps);
                       }
                    }
View Full Code Here

        If(){super("if");}

        public void execute(DTState state) throws RulesException {
            boolean  test = state.datapop().booleanValue();
            IRObject body = state.datapop();
            if(test)body.execute(state);
        }
    }
    /**
     * ( truebody falsebody test -- ) executes truebody if the boolean test is true, otherwise
     * executes falsebody.
View Full Code Here

        public void execute(DTState state) throws RulesException {
            boolean  test      = state.datapop().booleanValue();
            IRObject falsebody = state.datapop();
            IRObject truebody  = state.datapop();
            if(test){
                truebody.execute(state);
            }else{
                falsebody.execute(state);
            }
        }
    }
View Full Code Here

            IRObject test = state.datapop();         // Get the test
            IRObject body = state.datapop();         // Get the body
           
            test.execute(state);                     // evaluate the test
            while(state.datapop().booleanValue()){   // If true, keep looping
                body.execute(state);                 // execute the body.
                test.execute(state);                 // check the test again.
            }
           
          
        }
View Full Code Here

        If(){super("if");}

        public void arrayExecute(DTState state) throws RulesException {
            boolean  test = state.datapop().booleanValue();
            IRObject body = state.datapop();
            if(test)body.execute(state);
        }
    }
    /**
     * ( truebody falsebody test -- ) arrayExecutes truebody if the boolean test is true, otherwise
     * arrayExecutes falsebody.
View Full Code Here

        public void arrayExecute(DTState state) throws RulesException {
            boolean  test      = state.datapop().booleanValue();
            IRObject falsebody = state.datapop();
            IRObject truebody  = state.datapop();
            if(test){
                truebody.execute(state);
            }else{
                falsebody.execute(state);
            }
        }
    }
View Full Code Here

            IRObject test = state.datapop();         // Get the test
            IRObject body = state.datapop();         // Get the body
           
            test.execute(state);                     // evaluate the test
            while(state.datapop().booleanValue()){   // If true, keep looping
                body.execute(state);                 // arrayExecute the body.
                test.execute(state);                 // check the test again.
            }
           
          
        }
View Full Code Here

                 if(t== iNull)continue;
                 if(t!=iEntity){
                     throw new RulesException("Type Check", "Forallr", "Encountered a non-Entity entry in array: "+o);
                
                 state.entitypush((IREntity) o);
                 body.execute(state);
                 state.entitypop();
            }
        }
    }
   
View Full Code Here

        public void arrayExecute(DTState state) throws RulesException {
            RArray   list = state.datapop().rArrayValue();
            IRObject body = state.datapop();        // Get the body
            for(IRObject o : list){
                 state.datapush(o);
                 body.execute(state);
            }
        }
    }
    /**
     * ( body array  -- ) pushes each element on to the data stack, then arrayExecutes the body.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.