public PrgState Execute(PrgState p) { IExeStack <Statement> stk = p.Stack; stk.Push(this.second); stk.Push(this.first); return(p); }
public PrgState Execute(PrgState state) { IExeStack <IStmt> exeStack = state.ExeStack; exeStack.Push(second); exeStack.Push(first); return(state); }
public PrgState(ADT.IDictionary <string, int> s, IExeStack <Statement> exe, IOutput <int> o, IFileTable <int, FileData> ft, Statement st) { this.symbolTable = s; this.exeStack = exe; this.output = o; this.filetable = ft; exe.Push(st); }
public PrgState Execute(PrgState state) { IModDictionary<string, int> symbTable = state.SymbTable; IExeStack<IStmt> exeStack = state.ExeStack; int res = exp.Eval(symbTable); if (res != 0) { exeStack.Push(thenS); } else { exeStack.Push(elseS); } return state; }