/// <summary> /// Add BREX expression to the pool of existing ones, returns a name that will identify the expression. /// </summary> public string AddBoolRegExp(BREX boolRegExp) { string name; if (!this.boolRegExp2name.TryGetValue(boolRegExp, out name)) { name = string.Format("{0}{1}", this.MatcherPrefix, this.index); this.index += 1; this.boolRegExp2name[boolRegExp] = name; } return(name); }
/// <summary> /// Constructs a disjunction expression /// </summary> internal BREXDisjunction(BREX first, BREX second) { this.First = first; this.Second = second; }
/// <summary> /// Construct a literal automaton /// </summary> internal BREXComplement(BREX expr) { this.Expr = expr; }
/// <summary> /// Creates a complement /// </summary> public BREXComplement MkNot(BREX expr) { return(new BREXComplement(expr)); }
/// <summary> /// Creates a disjunction /// </summary> public BREXDisjunction MkOr(BREX first, BREX second) { return(new BREXDisjunction(first, second)); }
/// <summary> /// Creates a conjunction /// </summary> public BREXConjunction MkAnd(BREX first, BREX second) { return(new BREXConjunction(first, second)); }