internal Enumerator(SymbolicRegexSet <S> symbolicRegexSet) { _state = symbolicRegexSet._singleton is null ? 1 : 0; _set = symbolicRegexSet; _setEnumerator = symbolicRegexSet._set.GetEnumerator(); _loopsEnumerator = symbolicRegexSet._loops.GetEnumerator(); _current = null; }
/// <summary> /// Make a conjunction of given regexes, simplify by eliminating any regex that accepts all inputs, /// returns the empty regex if the regex accepts nothing /// </summary> public SymbolicRegexNode <S> MkAnd(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(SymbolicRegexNode <S> .MkAnd(this, regexset)); } }
private SymbolicRegexBuilder() { this.epsilon = SymbolicRegexNode <S> .MkEpsilon(this); this.startAnchor = SymbolicRegexNode <S> .MkStartAnchor(this); this.endAnchor = SymbolicRegexNode <S> .MkEndAnchor(this); this.eolAnchor = SymbolicRegexNode <S> .MkEolAnchor(this); this.bolAnchor = SymbolicRegexNode <S> .MkBolAnchor(this); //---------- this.nodeCache[this.epsilon] = this.epsilon; this.nodeCache[this.startAnchor] = this.startAnchor; this.nodeCache[this.endAnchor] = this.endAnchor; this.nodeCache[this.eolAnchor] = this.eolAnchor; this.nodeCache[this.bolAnchor] = this.bolAnchor; //--- this.fullSet = SymbolicRegexSet <S> .MkFullSet(this); this.emptySet = SymbolicRegexSet <S> .MkEmptySet(this); }