public static int Main (string[] args) { if (args.Length != 1) { Console.WriteLine ("Usage: test-parser.exe filename"); return 1; } IMessageStoreCollection stores = new IMessageStoreCollection (); stores.Add (new CTSMessageTarget (typeof (Funcs))); LogoMessageTarget funcs = new LogoMessageTarget (); stores.Add (funcs); Parser parser = new Parser (stores, funcs); FileStream stream = new FileStream (args[0], FileMode.Open); InstructionList tree = parser.Parse (new StreamReader (stream)); PrintTree (tree, 0); return 0; }
private void LoadFuncs () { funcs = new IMessageStoreCollection (); funcs.Add (new CTSMessageTarget (typeof (Funcs))); lmt = new LogoMessageTarget (); funcs.Add (lmt); }