Beispiel #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Terminals != null ? Terminals.Aggregate(new int(), (i, s) => { i += s.GetHashCode();
                                                                                        return(i); }) : 0);
         hashCode = (hashCode * 397) ^ (NonTerminals != null ? NonTerminals.Aggregate(new int(), (i, s) => { i += s.GetHashCode();
                                                                                                             return(i); }) : 0);
         hashCode = (hashCode * 397) ^ (Start != null ? Start.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Rules != null ? Rules.Aggregate(new int(), (i, s) => { i += s.GetHashCode();
                                                                                               return(i); }) : 0);
         return(hashCode);
     }
 }