public PrgState execute(PrgState state) { MyIStack <IStmt> stk = state.getExeStack(); stk.push(snd); stk.push(first); return(state); }
public PrgState execute(PrgState state) { MyIStack <IStmt> stk = state.getStk(); stk.push(second); stk.push(first); return(null); }
public PrgState execute(PrgState prgState) { MyIStack <IStmt> stk = prgState.getExeStack(); stk.push(second); stk.push(first); return(prgState); }
public ProgState execute(ProgState prog) { MyIStack <IStmt> stk = prog.getStk(); stk.push(st2); stk.push(st1); return(prog); }
public PrgState execute(PrgState prgState) { MyIStack <IStmt> stk = prgState.getExeStack(); int val = this.exp.evaluate(prgState.getSymTable()); if (val != 0) { stk.push(this.thenStmt); } else { stk.push(this.elseStmt); } return(prgState); }
public PrgState execute(PrgState state) { MyIStack <IStmt> stk = state.getStk(); MyIDictionary <string, int> symTable = state.getSymTable(); if (exp.Eval(symTable) != 0) { stk.push(thenStatement); } else { stk.push(elseStatement); } return(null); }
public ProgState(MyIStack <IStmt> stk, MyIDictionary <string, int> dict, MyIList <int> list, MyIFileTable <Tuple> fileT, IStmt prog) { this.stk = stk; this.dict = dict; this.list = list; this.fileT = fileT; stk.push(prog); }
public PrgState(MyIStack <IStmt> exeStack, MyIDictionary <string, int> symTable, MyIList <int> output, MyIFileDictionary <int, KeyValuePair <string, StreamReader> > fileTable, IStmt prg) { this.exeStack = exeStack; this.symTable = symTable; this.output = output; this.fileTable = fileTable; exeStack.push(prg); }
public PrgState(IStmt prg) { exeStack = new MyStack <IStmt>(new Stack <IStmt>()); exeStack.push(prg); symTable = new MyDictionary <string, int>(new Dictionary <string, int>()); outList = new MyList <int>(new List <int>()); fileTable = new MyDictionary <int, Tuple <string, TextReader> >(new Dictionary <int, Tuple <string, TextReader> >()); }
public PrgState(IStmt prg) { exeStack = new MyStack <IStmt>(); symTable = new MyDictionary <string, int>(); outList = new MyList <int>(); fileTable = new MyFileTable <int, Tuple <string, StreamReader> >(); originalProgram = prg; exeStack.push(prg); }
public ProgState execute(ProgState prog) { MyIStack <IStmt> stk = prog.getStk(); MyIDictionary <string, int> dict = prog.getDict(); try { if (ex.eval(dict) > 0) { stk.push(thenS); } else { stk.push(elseS); } } catch (StmtExceptions e) { throw new ControllerException(e); } return(prog); }
public PrgState execute(PrgState state) { MyIDictionary <string, int> dict = state.getSymTable(); MyIStack <IStmt> stk = state.getStk(); try { if (exp.eval(dict) != 0) { stk.push(thenS); } else { stk.push(elseS); } } catch (MyException ex) { throw new MyException("" + ex); } return(state); }