public PrgState execute(PrgState state) { int value = exp.eval(state.getSymTable(), state.getHeap()); state.getSymTable().Add(id, state.getHeap().Add(value)); return(state); }
public PrgState execute(PrgState state) { if (exp.eval(state.getSymTable(), state.getHeap()) != 0) { state.getExeStack().Push(this); state.getExeStack().Push(stmt); } return state; }
public PrgState execute(PrgState state) { int result = exp.eval(state.getSymTable(), state.getHeap()); if (result != 0) state.getExeStack().Push(thenStmt); else state.getExeStack().Push(elseStmt); return state; }
public PrgState execute(PrgState state) { if (exp.eval(state.getSymTable(), state.getHeap()) != 0) { state.getExeStack().Push(this); state.getExeStack().Push(stmt); } return(state); }
public PrgState execute(PrgState state) { IStack<IStmt> newStk = new ArrayStack<IStmt>(); newStk.Push(forkStmt); IDictionary<String, int> newDict = new ArrayDictionary<String, int>( (ArrayDictionary<String, int>) state.getSymTable() ); return new PrgState(newStk, newDict, state.getOut(), state.getHeap(), (state.getId() + 1) * 10); }
public PrgState execute(PrgState state) { IStack <IStmt> newStk = new ArrayStack <IStmt>(); newStk.Push(forkStmt); IDictionary <String, int> newDict = new ArrayDictionary <String, int>( (ArrayDictionary <String, int>)state.getSymTable() ); return(new PrgState(newStk, newDict, state.getOut(), state.getHeap(), (state.getId() + 1) * 10)); }
public PrgState execute(PrgState state) { int result = exp.eval(state.getSymTable(), state.getHeap()); if (result != 0) { state.getExeStack().Push(thenStmt); } else { state.getExeStack().Push(elseStmt); } return(state); }
public PrgState execute(PrgState state) { state.getHeap().Update(state.getSymTable()[id], exp.eval(state.getSymTable(), state.getHeap())); return(state); }
public PrgState execute(PrgState state) { int value = exp.eval(state.getSymTable(), state.getHeap()); state.getSymTable().Add(id, state.getHeap().Add(value)); return state; }
public PrgState execute(PrgState state) { state.getHeap().Update(state.getSymTable()[id], exp.eval(state.getSymTable(), state.getHeap())); return state; }
public PrgState execute(PrgState state) { state.getSymTable().Add(id, exp.eval(state.getSymTable(), state.getHeap())); return state; }
public PrgState execute(PrgState state) { state.getOut().Add(exp.eval(state.getSymTable(), state.getHeap())); return(state); }