public void AddTerminalTo(string terminal, string toterminal) { GrammarElement t = _terminals[toterminal]; Type ttype = t.GetType(); if (ttype == typeof(CompoundGrammarElement) || ttype == typeof(MultiParseGrammarElement)) { CompoundGrammarElement cge = (CompoundGrammarElement)t; cge.AddTerminal(_terminals[terminal]); return; } throw new InvalidOperationException(terminal + " cannot be added to the 'toterminal' parameter " + toterminal + " of " + t.GetType() + " type, and does not support terminal addition."); }
public void AddTerminal(GrammarElement ge) { _te.Add(ge); }
public void AddTerminal(string terminalname, GrammarElement terminal) { terminal.Name = terminalname; _terminals.Add(terminalname, terminal); }
public RepetitiveGrammarElement(GrammarElement ge) { _torepeat = ge; }