예제 #1
0
        public void execute(PrgState state)
        {
            ImyStack <Istmt> stk = state.getExeStack();

            stk.push(second);
            stk.push(first);
        }
예제 #2
0
 public PrgState(ImyStack <Istmt> stk, ImyDict <string, int> sym, ImyList <int> output, ImyDict <int, Tuple <string, StreamReader> > file)
 {
     this.stk    = stk;
     this.sym    = sym;
     this.output = output;
     this.file   = file;
 }
예제 #3
0
        public void execute(PrgState state)
        {
            ImyStack <Istmt>      stk      = state.getExeStack();
            ImyDict <string, int> symTable = state.getSymTable();

            try {
                if (e.eval(symTable) != 0)
                {
                    stk.push(thenS);
                }
                else
                {
                    stk.push(elseS);
                }
            } catch (ExpException) {
                throw new StmtException("Id in \"" + this.ToString() + "\" statement has no value asociated with it");
            }
        }