Beispiel #1
0
 public override bool Equals(object obj)
 {
     if (this == obj)
     {
         return(true);
     }
     if (!(obj is SemanticContext.AND))
     {
         return(false);
     }
     SemanticContext.AND other = (SemanticContext.AND)obj;
     return(Arrays.Equals(this.opnds, other.opnds));
 }
Beispiel #2
0
 public static SemanticContext AndOp(SemanticContext a, SemanticContext b)
 {
     if (a == null || a == NONE)
     {
         return(b);
     }
     if (b == null || b == NONE)
     {
         return(a);
     }
     SemanticContext.AND result = new SemanticContext.AND(a, b);
     if (result.opnds.Length == 1)
     {
         return(result.opnds[0]);
     }
     return(result);
 }