/// <summary> /// Make a disjunction of given regexes, simplify by eliminating any regex that accepts no inputs /// </summary> public SymbolicRegex <S> MkOr(SymbolicRegexSet <S> regexset) { if (regexset.IsNothing) { return(this.nothing); } else if (regexset.IsEverything) { return(this.dotStar); } else if (regexset.IsSigleton) { return(regexset.GetTheElement()); } else { return(SymbolicRegex <S> .MkOr(this, regexset)); } }
SymbolicRegex <S> MkOr2(SymbolicRegex <S> x, SymbolicRegex <S> y) { if (x.IsEverything || y.IsEverything) { return(this.dotStar); } else if (x.IsNothing) { return(y); } else if (y.IsNothing) { return(x); } else { var or = SymbolicRegex <S> .MkOr(this, x, y); return(or); } }