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) { state.getOut().Add(exp.eval(state.getSymTable(), state.getHeap())); return state; }
public PrgState execute(PrgState state) { state.getOut().Add(exp.eval(state.getSymTable(), state.getHeap())); return(state); }