public void executeOneStep() { IExeStack <IStatement> stack = state.Stack; IStatement statement = stack.pop(); statement.execute(state); printState(state); }
public PrgState oneStep(PrgState state) { IExeStack <Statement> exeStack = state.ExeStack; if (exeStack.isEmpty()) { throw new IException("exe stack is empty"); } Statement stmt = exeStack.pop(); Console.WriteLine(stmt); return(stmt.execute(state)); }