Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data RegexType
- data WithCaptures
- data MacroDescriptor = MacroDescriptor {
- macroSource :: !RegexSource
- macroSamples :: ![String]
- macroCounterSamples :: ![String]
- macroTestResults :: ![TestResult]
- macroParser :: !(Maybe FunctionID)
- macroDescription :: !String
- newtype RegexSource = RegexSource {}
- data PreludeMacro
- presentPreludeMacro :: PreludeMacro -> String
- preludeMacros :: (Monad m, Functor m) => (String -> m r) -> RegexType -> WithCaptures -> m (Macros r)
- preludeMacroTable :: RegexType -> String
- preludeMacroSummary :: RegexType -> PreludeMacro -> String
- preludeMacroSources :: RegexType -> String
- preludeMacroSource :: RegexType -> PreludeMacro -> String
- preludeMacroEnv :: RegexType -> MacroEnv
- preludeMacroDescriptor :: RegexType -> MacroEnv -> PreludeMacro -> Maybe MacroDescriptor
Documentation
data WithCaptures Source #
do we need the captures in the RE or whould they be stripped out where possible
InclCaptures | include all captures |
ExclCaptures | remove captures where possible |
data MacroDescriptor Source #
describes a macro, giving the text of the RE and a si=ummary description
MacroDescriptor | |
|
newtype RegexSource Source #
a RE that should work for POSIX and PCRE with open brackets ('(') represented as follows: ( mere symbol (?: used for grouping only, not for captures (}: used for captures only, not for grouping (]: used for captures and grouping ( do not modify
data PreludeMacro Source #
an enumeration of all of the prelude macros
presentPreludeMacro :: PreludeMacro -> String Source #
naming the macros
preludeMacros :: (Monad m, Functor m) => (String -> m r) -> RegexType -> WithCaptures -> m (Macros r) Source #
generate the standard prelude Macros used to parse REs
preludeMacroTable :: RegexType -> String Source #
format the standard prelude macros in a markdown table
preludeMacroSummary :: RegexType -> PreludeMacro -> String Source #
generate a textual summary of the prelude macros
preludeMacroSources :: RegexType -> String Source #
generate a plain text table giving the RE for each macro with all macros expanded (to NF)
preludeMacroSource :: RegexType -> PreludeMacro -> String Source #
generate plain text giving theexpanded RE for a single macro
preludeMacroEnv :: RegexType -> MacroEnv Source #
generate the MacroEnv
for the standard prelude macros
preludeMacroDescriptor :: RegexType -> MacroEnv -> PreludeMacro -> Maybe MacroDescriptor Source #
generate the MacroDescriptor
for a given PreludeMacro