Safe Haskell | None |
---|
- type Regex = (DfaTable, SBinder, SBinder -> [Env], [Int], FollowBy, IntMap ())
- data CompOption = CompOption {
- caseSensitive :: Bool
- multiline :: Bool
- rightAssoc :: Bool
- newSyntax :: Bool
- lastStarGreedy :: Bool
- data ExecOption = ExecOption {}
- defaultCompOpt :: RegexOptions regex compOpt execOpt => compOpt
- defaultExecOpt :: RegexOptions regex compOpt execOpt => execOpt
- compile :: CompOption -> ExecOption -> ByteString -> Either String Regex
- execute :: Regex -> ByteString -> Either String (Maybe Env)
- regexec :: Regex -> ByteString -> Either String (Maybe (ByteString, ByteString, ByteString, [ByteString]))
Documentation
type Regex = (DfaTable, SBinder, SBinder -> [Env], [Int], FollowBy, IntMap ())Source
The Deriv backend spepcific Regex
type
| the IntMap keeps track of the auxillary binder generated because of posix matching, i.e. all sub expressions need to be tag
| the FollowBy keeps track of the order of the pattern binder
data CompOption Source
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.
CompOption | |
|
data ExecOption Source
ExecOption | |
|
:: RegexOptions regex compOpt execOpt | |
=> compOpt | reasonable options (extended,caseSensitive,multiline regex) |
:: RegexOptions regex compOpt execOpt | |
=> execOpt | reasonable options (extended,caseSensitive,multiline regex) |
:: CompOption | Flags (summed together) |
-> ExecOption | Flags (summed together) |
-> ByteString | The regular expression to compile |
-> Either String Regex | Returns: the compiled regular expression |
:: Regex | Compiled regular expression |
-> ByteString | ByteString to match against |
-> Either String (Maybe Env) |
:: Regex | Compiled regular expression |
-> ByteString | ByteString to match against |
-> Either String (Maybe (ByteString, ByteString, ByteString, [ByteString])) |