public override bool Equals(object obj) { ConcatenationRule other = obj as ConcatenationRule; if (other == null) { return(false); } if (terms.Count != other.terms.Count) { return(false); } for (int i = 0; i < terms.Count; i++) { if (!terms[i].Equals(other.terms[i])) { return(false); } } return(true); }
public NonTerminal(string name, ConcatenationRule rule = null) : base(name) { Rules = rule; }
internal ConcatenationRule(ConcatenationRule left, ConcatenationRule right) { terms.AddRange(left.terms); terms.AddRange(right.terms); }
public Production(NonTerminal head, ConcatenationRule body) { Body = body.ToArray(); Head = head; }