public Client() { Context context = new Context("Dot Net context"); NonterminalExpression root = new NonterminalExpression(); root.Expression1 = new TerminalExpression(); root.Expression2 = new TerminalExpression(); root.Interpret(context); }
public static void BuildAndInterpretCommands() { var context = new Context("hello world!!!"); var root = new NonterminalExpression { Expression1 = new TerminalExpression(), Expression2 = new TerminalExpression() }; root.Interpret(context); }
static void Main() { Context context = new Context { Vocabulary = 'a', Source = "aaa" }; var expression = new NonterminalExpression(); expression.Interpret(context); Console.WriteLine(context.Result); }
static void Main(string[] args) { try { Context context = new Context("Dot Net context"); NonterminalExpression root = new NonterminalExpression(); root.Expression1 = new TerminalExpression(); root.Expression2 = new TerminalExpression(); root.Interpret(context); } finally { Console.ReadKey(); } }