public PrgState<T> OneStep() { lock(baton) { if (exeStack.IsEmpty()) return this; IStmt crtStmt = (IStmt)exeStack.Pop(); return crtStmt.Execute(this); } }
public ProgramState OneStep(ProgramState prgState) { MyIStack <IStatement> exeStack = prgState.getExecutionStack(); if (exeStack.IsEmpty()) { throw new Exception("stack is empty"); } return(exeStack.Pop().Execute(prgState)); }
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)); }
public bool IsNotCompleted() { return(!exeStack.IsEmpty()); }