public Alternative(Nonterminal b, int index, List<Symbol> value) { _base = new Nonterminal(b); _index = index; _value = new List<Symbol>(value); _strValue = String.Format("{0}{1}", _base.Sym, index); }
public Alternative() { _base = new Nonterminal(); _index = 0; _value = new List<Symbol>(); _strValue = ""; }
public Grammar(Grammar g) { _nonterminals = new List<Nonterminal>(g.Nonterminals); _terminals = new List<Terminal>(g.Terminals); _rules = new List<Rule>(g.Rules); _distinguishedSymbol = new Nonterminal(g.DistinguishedSymbol); _vanishingSymbols = new List<Nonterminal>(g.VanishingSymbols); }
public Grammar(List<Nonterminal> nonterminals, List<Terminal> terminals, List<Rule> rules, Nonterminal distinguishedSymbol) { _nonterminals = new List<Nonterminal>(nonterminals); _terminals = new List<Terminal>(terminals); _rules = new List<Rule>(rules); _distinguishedSymbol = distinguishedSymbol; //findVanishingSymbols(); }
public Rule(Rule r) { _left = new Nonterminal(r.Left); _right = new List<Symbol>(r.Right); }
public Rule(Nonterminal left, List<Symbol> right) { _left = new Nonterminal(left); _right = new List<Symbol>(right); }
public Rule() { _left = new Nonterminal(); _right = new List<Symbol>(); }
public Nonterminal(Nonterminal nt) { _sym = nt.Sym; }