public void execute(PrgState state) { ImyList <int> output = state.getOutput(); ImyDict <String, int> symTable = state.getSymTable(); output.add(e.eval(symTable)); }
public void logPrgState(PrgState ps) { try { StreamWriter logFile = File.AppendText(this.filename); StringBuilder s = new StringBuilder(); s.Append(ps.ExeStack); s.Append(ps.getSymbolTable()); s.Append(ps.getFileTable()); s.Append(ps.getOutput()); logFile.WriteLine(s.ToString()); logFile.Close(); } catch (IOException e) { throw new IException(e.Message); } }