public void Run() { var context = new Context("Hello world"); var root = new NoTermianlExpresssion { Expression1 = new TerminalExpression(), Expression2 = new TerminalExpression() }; root.Interpret(context); }
public override void Interpret(Context context) { Console.WriteLine("Terminal Sybol {0}",context.Name); }
public override void Interpret(Context context) { Console.WriteLine("No Terminal Symbol {0}",context.Name); Expression1.Interpret(context); Expression2.Interpret(context); }
public abstract void Interpret(Context context);