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