public override int GetHashCode() { unchecked { int hashCode = StartElement.GetHashCode(); hashCode = (hashCode * 397) ^ EndOfInputElement.GetHashCode(); hashCode = (hashCode * 397) ^ Productions.GetHashCode(); return(hashCode); } }
public bool Equals(ContextFreeGrammar <T> other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(StartElement.Equals(other.StartElement) && EndOfInputElement.Equals(other.EndOfInputElement) && Productions.SequenceEqual(other.Productions)); }