public override bool Equals(object obj)
 {
     if (this == obj)
     {
         return(true);
     }
     if (!(obj is SemanticContext.OR))
     {
         return(false);
     }
     SemanticContext.OR other = (SemanticContext.OR)obj;
     return(Arrays.Equals(this.opnds, other.opnds));
 }
 /// <seealso cref="ParserATNSimulator.GetPredsForAmbigAlts(Antlr4.Runtime.Sharpen.BitSet, ATNConfigSet, int)"/>
 public static SemanticContext Or(SemanticContext a, SemanticContext b)
 {
     if (a == null)
     {
         return(b);
     }
     if (b == null)
     {
         return(a);
     }
     if (a == None || b == None)
     {
         return(None);
     }
     SemanticContext.OR result = new SemanticContext.OR(a, b);
     if (result.opnds.Length == 1)
     {
         return(result.opnds[0]);
     }
     return(result);
 }