private void Initialize() { // create all symbols var sum = new Sum(); var prog = new Prog(); var frog = new Frog(); var left = new Left(); var forward = new Forward(); var constant = new Constant(); var allSymbols = new List<ISymbol>() { sum, prog, frog, left, forward, constant }; // add all symbols to the grammar foreach (var s in allSymbols) AddSymbol(s); // define grammar rules foreach (var s in allSymbols) { AddAllowedChildSymbol(sum, s); AddAllowedChildSymbol(sum, s); AddAllowedChildSymbol(prog, s); AddAllowedChildSymbol(prog, s); AddAllowedChildSymbol(frog, s); AddAllowedChildSymbol(StartSymbol, s); } }
private Frog(Frog original, Cloner cloner) : base(original, cloner) { }