/// <summary> /// Constructs a regular expression. /// </summary> /// <param name="src"> The regular expression. </param> public RegEx(string src) { ASTExpr ast = Parser.Parse(src); if (ast == null) { throw new ArgumentException("Can't parse this regex. Sorry~"); } NFATable nfaTable = ast.ToNFATable(); DFATable dfaTable = nfaTable.ToDFATable(); dfa = dfaTable.ToDFA(); }