public Out() { Name = "out"; Functions = new Lib.Dictionary <string, Delegate>(); Functions.Add("println", new Action <object>(Out.printl)); Functions.Add("print", new Action <object>(Out.print)); Functions.Add("printc", new Action <object, string>(Out.printc)); Functions.Add("printlnc", new Action <object, string>(Out.printlnc)); }
public Out() { Name = "out"; Functions = new Lib.Dictionary<string, Delegate>(); Functions.Add("println", new Action<object>(Out.printl)); Functions.Add("print", new Action<object>(Out.print)); Functions.Add("printc", new Action<object, string>(Out.printc)); Functions.Add("printlnc", new Action<object, string>(Out.printlnc)); }
public void Load(string src, bool DoNotAutostep = true) { var ast = _p.Parse(src); Ast = ast; ProgramCounter = 0; ProgramHasEnded = false; MethodTable = new Lib.Dictionary <int, int>(); for (int i = 0; i < ast.Count; i++) { if (ast[i] is MethodStmt) { var x = ast[i] as MethodStmt; MethodTable.Add(x.ID, i); } } if (!DoNotAutostep) { while (!ProgramHasEnded) { Step(); } } }
public void Load(string src, bool DoNotAutostep = true) { var ast = _p.Parse(src); Ast = ast; ProgramCounter = 0; ProgramHasEnded = false; MethodTable = new Lib.Dictionary<int, int>(); for (int i = 0; i < ast.Count; i++) { if (ast[i] is MethodStmt) { var x = ast[i] as MethodStmt; MethodTable.Add(x.ID, i); } } if (!DoNotAutostep) { while(!ProgramHasEnded) { Step(); } } }