public ProgramState(MyIStack <IStatement> executionStack, MyIDictionary <string, int> symbolTable, MyIList <int> output) { this.executionStack = executionStack; this.symbolTable = symbolTable; this.output = output; }
public PrgState Execute(PrgState state) { MyIList <int> list = state.GetPrintList(); list.Add1(exp.Eval(state.GetSymTable(), state.GetHeap())); return(null); }
public PrgState(MyIStack<T> stk, MyIDictionary symtbl, MyIList ot, MyIHeap heap, int id) { exeStack = stk; @out = ot; symTable = symtbl; mHeap = heap; mId = id; }
public PrgState(MyIStack <IStmt> exeStack, MyIDictionary <string, int> symTable, MyIList <int> output, MyIFileDictionary <int, KeyValuePair <string, StreamReader> > fileTable, IStmt prg) { this.exeStack = exeStack; this.symTable = symTable; this.output = output; this.fileTable = fileTable; exeStack.push(prg); }
public ProgramState(IStatement statement) { executionStack = new MyStack <IStatement>(new Stack <IStatement>()); executionStack.Push(statement); symbolTable = new MyDictionary <string, int>(new Dictionary <string, int>()); outputList = new MyList <int>(new List <int>()); fileTable = new MyDictionary <int, Tuple <string, TextReader> >(new Dictionary <int, Tuple <string, TextReader> >()); }
public Rep(MyIList <PrgState> prgStates) { this.prgStates = prgStates; this.crtPrg = prgStates.get(0); //this.logFilePath = "/logfile.txt"; this.logFilePath = "fil.txt"; //this.logFilePath = "C: /Users/Anamaria - Dell/source/repos/ToyLanguageCS/ToyLanguageCS/logfile.txt"; }
public PrgState(IStmt prg) { exeStack = new MyStack <IStmt>(new Stack <IStmt>()); exeStack.push(prg); symTable = new MyDictionary <string, int>(new Dictionary <string, int>()); outList = new MyList <int>(new List <int>()); fileTable = new MyDictionary <int, Tuple <string, TextReader> >(new Dictionary <int, Tuple <string, TextReader> >()); }
public PrgState execute(PrgState state) { MyIList <int> ot = state.getOut(); MyIDictionary <String, int> symTbl = state.getSymTable(); ot.add(exp.eval(state.getSymTable())); return(state); }
public PrgState execute(PrgState state) { MyIList <int> outList = state.getOutList(); MyIDictionary <string, int> symTabel = state.getSymTable(); outList.add(exp.Eval(symTabel)); return(null); }
public ProgState(MyIStack <IStmt> stk, MyIDictionary <string, int> dict, MyIList <int> list, MyIFileTable <Tuple> fileT, IStmt prog) { this.stk = stk; this.dict = dict; this.list = list; this.fileT = fileT; stk.push(prog); }
public PrgState(MyIStack <IStmt> stk, MyIDictionary <String, int> symtbl, MyIList <int> ot, MyIDictionary <int, MyPair <String, StreamReader> > fT, IStmt prg) { exeStack = stk; symTable = symtbl; outList = ot; fileTable = fT; exeStack.Push(prg); }
public PrgState Execute(PrgState state) { MyIList <int> ot = state.GetOut(); MyIDictionary <String, int> symtbl = state.GetSymTable(); int val = exp.Eval(symtbl); ot.Add(val); return(state); }
public PrgState(IStmt prg) { exeStack = new MyStack <IStmt>(); symTable = new MyDictionary <string, int>(); outList = new MyList <int>(); fileTable = new MyFileTable <int, Tuple <string, StreamReader> >(); originalProgram = prg; exeStack.push(prg); }
public PrgState(IStmt prg) { this.exeStack = new MyStack <IStmt>(); this.symTable = new MyDictionary <String, int>(); this.outTbl = new MyList <int>(); this.originalProgram = prg.deepCopy(); this.fileTable = new FileTable <int, FileTuple>(); this.exeStack.push(prg); }
public PrgState() { id = 0; exeStack = null; symTable = null; output = null; originalProgram = null; heap = null; }
public PrgState(MyIStack <IStmt> stk, MyIDictionary <string, int> symtbl, MyIList <int> ot, IFileTable <int, FileTuple> fileTable, IStmt prg) { this.exeStack = stk; this.symTable = symtbl; this.outTbl = ot; this.originalProgram = prg.deepCopy(); this.fileTable = fileTable; this.exeStack.push(prg); }
public PrgState(MyIStack <IStmt> stk, Stack <MyIDictionary <MyMap> > symtbl, MyIList <int> otp, IStmt crtstm, IHeap <HMap> h) { id++; exeStack = stk; symTable = symtbl; output = otp; originalProgram = crtstm; exeStack.Push(crtstm); heap = h; }
public ProgramState(MyIStack <IStatement> exeStack, MyIDictionary <string, int> symTab, MyIList <int> outList, MyIDictionary <int, MyPair <string, StreamReader> > fileTab, IStatement originalProgram) { this.exeStack = exeStack; this.symTab = symTab; this.outList = outList; this.fileTab = fileTab; this.originalProgram = originalProgram; this.exeStack.Push(originalProgram); }
public ProgState execute(ProgState prog) { MyIList <int> list = prog.getList(); MyIDictionary <string, int> dict = prog.getDict(); try { list.add(ex.eval(dict)); return(prog); } catch (StmtExceptions e) { throw new ControllerException(e); } }
public PrgState execute(PrgState state) { MyIList <int> list = state.getOut(); MyIDictionary <string, int> dict = state.getSymTable(); try { list.add(exp.eval(dict)); } catch (MyException ex) { throw new MyException("" + ex); } return(state); }
public ProgramState Execute(ProgramState state) { MyIList <int> outList = state.GetOutList(); MyIDictionary <string, int> symTab = state.GetSymTab(); try { outList.Enqueue(expr.Evaluate(symTab)); } catch (ExpressionEvaluationException e) { Console.Write(e.ToString()); } return(null); }
PrgState IStmt.Execute(PrgState state) { MyIStack <IStmt> stack = new MyLibStack <IStmt>(); Stack <MyIDictionary <MyMap> > symtable = state.GetSymTable(); MyIList <int> printList = state.GetPrintList(); IHeap <HMap> h = state.GetHeap(); MyLibStack <IStmt> crtstm = new MyLibStack <IStmt>(); PrgState childPrgState = new PrgState(stack, symtable, printList, stmt, h); childPrgState.id = state.id * 10; return(childPrgState); }
public void setOut(MyIList <int> outTbl) { this.outTbl = outTbl; }
public void SetOut(MyIList value) { @out = value; }
public void setOut(MyIList <int> output) { this.output = output; }
public Rep(MyIList <PrgState> prgStates, PrgState crtPrg) { this.prgStates = prgStates; this.crtPrg = crtPrg; }
public Rep(MyIList <PrgState> prgStates, String filename) { this.prgStates = prgStates; this.crtPrg = prgStates.get(0); this.logFilePath = filename; }
public void SetOut(MyIList <int> ot) { this.outList = ot; }
public void setList(MyIList <int> list) { this.list = list; }