Пример #1
0
        /// <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);
        }
Пример #2
0
 /// <summary>
 /// Constructs a disjunction expression
 /// </summary>
 internal BREXDisjunction(BREX first, BREX second)
 {
     this.First  = first;
     this.Second = second;
 }
Пример #3
0
 /// <summary>
 /// Construct a literal automaton
 /// </summary>
 internal BREXComplement(BREX expr)
 {
     this.Expr = expr;
 }
Пример #4
0
 /// <summary>
 /// Creates a complement
 /// </summary>
 public BREXComplement MkNot(BREX expr)
 {
     return(new BREXComplement(expr));
 }
Пример #5
0
 /// <summary>
 /// Creates a disjunction
 /// </summary>
 public BREXDisjunction MkOr(BREX first, BREX second)
 {
     return(new BREXDisjunction(first, second));
 }
Пример #6
0
 /// <summary>
 /// Creates a conjunction
 /// </summary>
 public BREXConjunction MkAnd(BREX first, BREX second)
 {
     return(new BREXConjunction(first, second));
 }