Exemplo n.º 1
0
        public PrgState Execute(PrgState state)
        {
            IModList <int> list = state.OutList;
            IModDictionary <string, int> dict = state.SymbTable;

            int res = exp.Eval(dict);

            list.Add(res);

            return(state);
        }
Exemplo n.º 2
0
 public PrgState(
     IExeStack <IStmt> _exeStack,
     IModDictionary <string, int> _symbTable,
     IModList <int> _outList,
     IFileTable <int, FileData> _fileTable,
     IStmt _originalProgram
     )
 {
     this.ExeStack        = _exeStack;
     this.SymbTable       = _symbTable;
     this.OutList         = _outList;
     this.FileTable       = _fileTable;
     this.OriginalProgram = _originalProgram;
     ExeStack.Push(OriginalProgram);
 }