public static int Main (string[] args) { if (args.Length != 1) { Console.WriteLine ("Usage: test-interp.exe filename"); return 1; } IMessageStoreCollection stores = new IMessageStoreCollection (); stores.Add (new CTSMessageTarget (typeof (Funcs))); Parser parser = new Parser (stores, new LogoMessageTarget ()); FileStream stream = new FileStream (args[0], FileMode.Open); InstructionList tree = parser.Parse (new StreamReader (stream)); Interpreter interp = new Interpreter (stores); interp.Execute (tree); return 0; }
public Interpreter (Interpreter interp, LogoContext context) { this.stores = interp.stores; this.context = context; }
public Interpreter (IMessageStoreCollection stores) { this.stores = stores; context = new LogoContext (null); }
public static Compiler Create (IMessageStoreCollection stores) { return new CSharpCompiler (stores); }
protected Compiler (IMessageStoreCollection stores) { this.stores = stores; context = new LogoContext (null); }
public Parser (IMessageStoreCollection stores, LogoMessageTarget funcs) { this.stores = stores; this.funcs = funcs; }
public Parser () { stores = new IMessageStoreCollection (); }
private void LoadFuncs () { funcs = new IMessageStoreCollection (); funcs.Add (new CTSMessageTarget (typeof (Funcs))); lmt = new LogoMessageTarget (); funcs.Add (lmt); }
internal CSharpCompiler (IMessageStoreCollection stores) : base (stores) { }