void Run()
 {
     InterpretContext ctx = new InterpretContext();
     IList<AbstractExpression> list = new List<AbstractExpression>();
     list.Add(new TerminalExpression());
     list.Add(new NonTerminalExpression());
     foreach (var item in list)
     {
         item.Interpret(ctx);
     }
     Console.Read();
 }
Esempio n. 2
0
        void Run()
        {
            InterpretContext           ctx  = new InterpretContext();
            IList <AbstractExpression> list = new List <AbstractExpression>();

            list.Add(new TerminalExpression());
            list.Add(new NonTerminalExpression());
            foreach (var item in list)
            {
                item.Interpret(ctx);
            }
            Console.Read();
        }
Esempio n. 3
0
 public override void Interpret(InterpretContext ctx)
 {
     Console.WriteLine("Non Terminal Interpretor is handling the {0},and the output is {1}", ctx.Input, ctx.Output);
 }
Esempio n. 4
0
 public abstract void Interpret(InterpretContext ctx);
 public override void Interpret(InterpretContext ctx)
 {
     Console.WriteLine("Non Terminal Interpretor is handling the {0},and the output is {1}", ctx.Input, ctx.Output);
 }
 public abstract void Interpret(InterpretContext ctx);