Пример #1
0
 public  PrgState<T> OneStep()
 {
     lock(baton)
     {
         if (exeStack.IsEmpty()) return this;
         IStmt crtStmt = (IStmt)exeStack.Pop();
         return crtStmt.Execute(this);
     }
 }
Пример #2
0
        public ProgramState OneStep(ProgramState prgState)
        {
            MyIStack <IStatement> exeStack = prgState.getExecutionStack();

            if (exeStack.IsEmpty())
            {
                throw new Exception("stack is empty");
            }
            return(exeStack.Pop().Execute(prgState));
        }
Пример #3
0
        public PrgState OneStep(PrgState state)
        {
            MyIStack <IStmt> stk = state.GetExeStack();

            if (stk.IsEmpty())
            {
                throw new MyException("Stack is empty");
            }
            IStmt crtStmt = stk.Pop();

            return(crtStmt.Execute(state));
        }
Пример #4
0
 public bool IsNotCompleted()
 {
     return(!exeStack.IsEmpty());
 }