public static void Main(string[] args) { ContextS ContextS = new ContextS(); // Usually a tree ArrayList list = new ArrayList(); // Populate 'abstract syntax tree' list.Add(new TerminalExpression()); list.Add(new NonTerminalExpression()); list.Add(new TerminalExpression()); list.Add(new TerminalExpression()); // Interpret foreach (AbstractExpression exp in list) { exp.Interpret(ContextS); } Console.ReadKey(); }
public override void Interpret(ContextS ContextS) { Console.WriteLine("Called NonTerminalExpression.Interpret()"); }
public override void Interpret(ContextS ContextS) { Console.WriteLine("Called Termial.Interpret()"); }
public abstract void Interpret(ContextS ContextS);