Ejemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = StartElement.GetHashCode();
         hashCode = (hashCode * 397) ^ EndOfInputElement.GetHashCode();
         hashCode = (hashCode * 397) ^ Productions.GetHashCode();
         return(hashCode);
     }
 }
Ejemplo n.º 2
0
 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));
 }