Example #1
0
 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);
 }
Example #2
0
        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));
        }
Example #3
0
 public PrgState execute(PrgState state)
 {
     state.getOut().Add(exp.eval(state.getSymTable(), state.getHeap()));
     return state;
 }
Example #4
0
 public PrgState execute(PrgState state)
 {
     state.getOut().Add(exp.eval(state.getSymTable(), state.getHeap()));
     return(state);
 }