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