A bytestring implementation of reg exp pattern matching using partial derivative
This algorithm exploits the extension of partial derivative of regular expression patterns.
This algorithm starts from all the emptiable partial derivatives (AKA final states of the NFA)
and proceeds by scanning the input word from right to left, until the orginal pattern
is reached (AKA init state of the NFA) and the input word is fully consumed.

We compile all the possible partial derivative operation into a table
The table maps key to a set of target integer states and their corresponding
binder update functions.
The reverse pdPat0 table, in addtion, we store the priority of the transition.

>mapping::D.Dictionary(Pat,Int)->Pat->Int>mappingdictionaryx=letcandidates=D.lookupAll(D.hashx)dictionary>incandidates`seq`>casecandidatesof>[(_,i)]->i>_->>casemyLookupxcandidatesof>(Justi)->i>Nothing->error("this should not happen. looking up "++(prettyx)++" from "++(showcandidates))

>-- | Control whether the pattern is multiline or case-sensitive like Text.Regex and whether to>-- capture the subgroups (\1, \2, etc). Controls enabling extra anchor syntax.>dataCompOption=CompOption{>caseSensitive::Bool-- ^ True in blankCompOpt and defaultCompOpt>,multiline::Bool>{- ^ False in blankCompOpt, True in defaultCompOpt. Compile for
> newline-sensitive matching. "By default, newline is a completely ordinary
> character with no special meaning in either REs or strings. With this flag,
> inverted bracket expressions and . never match newline, a ^ anchor matches the
> null string after any newline in the string in addition to its normal
> function, and the $ anchor matches the null string before any newline in the
> string in addition to its normal function." -}>,rightAssoc::Bool-- ^ True (and therefore Right associative) in blankCompOpt and defaultCompOpt>,newSyntax::Bool-- ^ False in blankCompOpt, True in defaultCompOpt. Add the extended non-POSIX syntax described in "Text.Regex.TDFA" haddock documentation.>,lastStarGreedy::Bool-- ^ False by default. This is POSIX correct but it takes space and is slower.>-- Setting this to true will improve performance, and should be done>-- if you plan to set the captureGroups execoption to False.>}deriving(Read,Show)

>dataExecOption=ExecOption{>captureGroups::Bool-- ^ True by default. Set to False to improve speed (and space).>}deriving(Read,Show)