public override int GetHashCode() { if (!_hash.HasValue) { _hash = 17; _hash = _hash * 23 + IsTerminal.GetHashCode(); _hash = _hash * 23 + Terminal.GetHashCode(); _hash = _hash * 23 + Nonterminal.GetHashCode(); } return(_hash.Value); }
public override int GetHashCode() { int hc = ProductionElements.Count + 3; hc = unchecked (hc * 314159 + Nonterminal.GetHashCode()); hc = unchecked (hc * 314159 + RuleIndex); for (int i = 0; i < ProductionElements.Count; ++i) { hc = unchecked (hc * 314159 + ProductionElements[i].GetHashCode()); } return(hc); }