Y      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H IJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None<=?I       NoneI&'()*+&'()*+&'()*+&'()*+None0./0123./012./0132./0123NoneI 56789:;<=>?@A 56789:;<=>?@ <=>;?89:A567@56789:;<=>?@ANone!"9;<="NHthe matching of a single sub-expression against part of the source textP the whole text that was searchedQthe text that was matchedRythe number of characters preceding the match with -1 used if no text was captured by the RE (not even the empty string)S1the number of chacter in the captured sub-stringTthe result of matching a RE to a text once, listing the text that was matched and the named captures in the RE and all of the substrings matched, with the text captured by the whole RE; a complete failure to match will be represented with an empty array (with bounds (0,-1))Vthe whole source textWthe RE's capture namesX @.n-1 captures, starting with the text matched by the whole REYithe result type to use when every match is needed, not just the first match of the RE against the source[the source text being matched\!all captures found, left to right]/Construct a Match that does not match anything.^an empty array of Capture_3tests whether the RE matched the source text at all`count the matchesb(extract the main capture from each matchc3tests whether the RE matched the source text at alld3tests whether the RE matched the source text at alleKthe top-level capture if the source text matched the RE, Nothing otherwisefYthe top-level capture and the sub captures if the text matched the RE, Nothing otherwisegan alternative for captureTexthlook up the text of the nth capture, 0 being the match of the whole RE against the source text, 1, the first bracketed sub-expression to be matched and so oni#an alternative for captureTextMaybejlook up the text of the nth capture (0 being the match of the whole), returning Nothing if the Match doesn't contain the capturekan alternative for capturellook up the nth capture, 0 being the match of the whole RE against the source text, 1, the first bracketed sub-expression to be matched and so onm'an alternative for capture captureMaybenlook up the nth capture, 0 being the match of the whole RE against the source text, 1, the first bracketed sub-expression to be matched and so on, returning Nothing if there is no such capture, or if the capture failed to capture anything (being in a failed alternate)o(test if the capture has matched any textp$returns the text preceding the matchq returns the text after the matchr,for matching all REs against the source texts6for matching just the first RE against the source text+NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuv$NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq$YZ[\TUVWXNOPQRS]^_`abcdefghijklmnopqNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvg9 k9 None!"9:;!}the Locationg information passed into the substitution function specifies which sub-expression is being substitutedythe zero-based, i-th string to be matched, when matching all strings, zero when only the first string is being matched0, when matching the top-level string matched by the whole RE, 1 for the top-most, left-most redex captured by bracketed sub-REs, etc.Context= specifies which contexts the substitutions should be appliedZsubstitutions should be applied to the top-level only, the text that matched the whole REOsubstitutions should only be applied to the text captured by bracketed sub-REskthe substitution function should be applied to all captures, the top level and the sub-expression capturesPhif specifies the substitution function for procesing the substrings captured by the regular expression.*the context for applying the substitutionthe substitution function takes the location and the text to be replaced and returns the replacement text to be substitutedoa selction of the Replace methods can be encapsulated with Replace_ for the higher-order replacement functionsoReplace provides the missing methods needed to replace the matched text; length_ is the minimum implementationlength function for ainject String into aproject a onto a Stringinject into Textproject Text onto aappend a newline*apply a substitution function to a CaptureKconvert a template containing $0, $1, etc., in the first argument, into a phiL replacement function for use with replaceAllCaptures' and replaceCaptures'9replace_ encapsulates Replace_ a from a Replace a contextRTrue iff the location references a complete match (i.e., not a bracketed capture)Kreplace all with a template, $0 for whole text, $1 for first capture, etc.5substitutes the PHI substitutions through the Matchessubstitutes using a function that takes the full Match context and returns the same replacement text as the _phi_phi context.qreplaceAllCaptures_ is like like replaceAllCaptures' but takes the Replace methods through the Replace_ argumentUreplaceAllCapturesM is just a monadically generalised version of replaceAllCaptures_3substitutes the PHI substitutions through the Matchsubstitutes using a function that takes the full Match context and returns the same replacement text as the _phi_phi context.freplaceCaptures_ is like replaceCaptures' but takes the Replace methods through the Replace_ argumentOreplaceCapturesM is just a monadically generalised version of replaceCaptures_expand all of the @{..} macros in the RE in the argument String according to the Macros argument, preprocessing the RE String according to the Mode argument (used internally)Gexpand the @{..} macos in the argument string using the given function3}~'}~'}~}~None<=None!"&& None!": None$ None!"Iwe are only interested in the open parentheses used for grouping and/or capturing; if neither grouping or capturing then there is no initial '(' or '(?:', just the suffic text following text optional ( or (?: a '(' that is not safe to modifyis this a grouping groupis this a capturing groupLname of the Haskell parser function for parsing the text matched by a macroa 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$list of failures on a validation runIdescribes a macro, giving the text of the RE and a si=ummary descriptionthe REsome sample matchessome sample non-matchesvalidation test resultsWA, the parser functionsummary commentoeach macro can reference others, the whole environment being required for each macro, so we use a Lazy HashMapPdo we need the captures in the RE or whould they be stripped out where possible.what kind of back end will be compiling the REJ     &&,      None!"I+an enumeration of all of the prelude macros9naming the macros)all prelude macros are prefixed with thisa digit string macrosee  'https://mathiasbynens.be/demo/url-regex (based on @stephenhay URL); !"#$%&'()*+,-./0123456789 !"#$%&'()*+,-./0123456/ !"#$%&'()*+,-./0123456789/ !"#$%&'()*+,-./0192345678& !"#$%&'()*+,-./0123456789 !"#$%&'()*+,-./0123456 None!": ?@ABCDEF7G ?@ABCDEFG @ABCDE?FG?@ABCDEF7GNoneIJIJIJIJ(C) 2016-17 Chris DornanBSD3 (see the LICENSE file)+Chris Dornan <chris.dornan@irisconnect.com>RFCportableNone &'()*+56789:;<=>?@NOPQRSTUVWXYZ[\]_`abcdefghijklmnopq}~?@ABCDEFGIJYZ[\TUVWXNOPQRS]_`abcdefghijklmnopq <=>;?89:567@&'()*+}~@ABCDE?FGIJNone898989None!"5:;<=>KLMNOPQRST?U@VAWXYKQLMNOPRSTUVWXYRSWKLMNOPQTVXYU :;<=>KLMNOPQRST?U@VAWXYNone !"9:;<=0^_BCDEF`abcdefghijklmnGHopqrIJKLMNstuvwxyz{|}~R^_`abcdefghijklmnopqrstuvwxy`abcdefghiRj_klmn^sutvwxyopqr+^_BCDEF`abcdefghijklmnGHopqrIJKLMNstuvwxyz{|}~None9:;<=find all matches in textfind first matches in text%regex-base polymorphic match operator.regex-base monadic, polymorphic match operator &'()*+56789:;<=>?@NOPQRSTUVWXYZ[\]_`abcdefghijklmnopq}~?@ABCDEFGIJR^_`abcdefghijklmnopqrstuvwxyNone9:;<=find all matches in textfind first matches in text%regex-base polymorphic match operator.regex-base monadic, polymorphic match operator &'()*+56789:;<=>?@NOPQRSTUVWXYZ[\]_`abcdefghijklmnopq}~?@ABCDEFGIJR^_`abcdefghijklmnopqrstuvwxyNone9:;<=find all matches in textfind first matches in text%regex-base polymorphic match operator.regex-base monadic, polymorphic match operator &'()*+56789:;<=>?@NOPQRSTUVWXYZ[\]_`abcdefghijklmnopq}~?@ABCDEFGIJR^_`abcdefghijklmnopqrstuvwxyNone9:;<=find all matches in textfind first matches in text%regex-base polymorphic match operator.regex-base monadic, polymorphic match operator &'()*+56789:;<=>?@NOPQRSTUVWXYZ[\]_`abcdefghijklmnopq}~?@ABCDEFGIJR^_`abcdefghijklmnopqrstuvwxyNone: &'()*+56789:;<=>?@NOPQRSTUVWXYZ[\]_`abcdefghijklmnopq}~?@ABCDEFGIJR^_`abcdefghijklmnopqrstuvwxyNone !"9:;<=0OPQRSTUVWXYZ[RR+OPQRSTUVWXYZ[None9:;<=find all matches in textfind first matches in text%regex-base polymorphic match operator.regex-base monadic, polymorphic match operator &'()*+56789:;<=>?@NOPQRSTUVWXYZ[\]_`abcdefghijklmnopq}~?@ABCDEFGIJRNone9:;<=find all matches in textfind first matches in text%regex-base polymorphic match operator.regex-base monadic, polymorphic match operator &'()*+56789:;<=>?@NOPQRSTUVWXYZ[\]_`abcdefghijklmnopq}~?@ABCDEFGIJRNone9:;<=find all matches in textfind first matches in text%regex-base polymorphic match operator.regex-base monadic, polymorphic match operator &'()*+56789:;<=>?@NOPQRSTUVWXYZ[\]_`abcdefghijklmnopq}~?@ABCDEFGIJRNone9:;<=find all matches in textfind first matches in text%regex-base polymorphic match operator.regex-base monadic, polymorphic match operator &'()*+56789:;<=>?@NOPQRSTUVWXYZ[\]_`abcdefghijklmnopq}~?@ABCDEFGIJRNone9:;<=find all matches in textfind first matches in text%regex-base polymorphic match operator.regex-base monadic, polymorphic match operator &'()*+56789:;<=>?@NOPQRSTUVWXYZ[\]_`abcdefghijklmnopq}~?@ABCDEFGIJRNone9:;<=find all matches in textfind first matches in text%regex-base polymorphic match operator.regex-base monadic, polymorphic match operator &'()*+56789:;<=>?@NOPQRSTUVWXYZ[\]_`abcdefghijklmnopq}~?@ABCDEFGIJRNone: &'()*+56789:;<=>?@NOPQRSTUVWXYZ[\]_`abcdefghijklmnopq}~?@ABCDEFGIJR\ !"#$%&&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMMNOPQRSSTUUVWXYZ[\]^_`abcdefghijjklmnoopqrsstuvwxyz{|}~                                                     ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R R S T U V W X YZ[\]^_`abcdefghijklmn.opqrstuvwxyz{|}~.opqrstuvwxyz{|}~                                                                               oo$regex-0.2.0.4-C5l6QklHNA5I6O02wrbTLKText.RE.OptionsText.RE.LineNoText.RE.Internal.QQText.RE.CaptureIDText.RE.CaptureText.RE.ReplaceText.RE.IsRegex Text.RE.EditText.RE.Tools.SedText.RE.ParsersText.RE.TestBenchText.RE.Internal.PreludeMacrosText.RE.Tools.GrepText.RE.Tools.LexText.RE.Internal.NamedCapturesText.RE.PCRE.REText.RE.PCRE.ByteStringText.RE.PCRE.ByteString.LazyText.RE.PCRE.SequenceText.RE.PCRE.String Text.RE.PCREText.RE.TDFA.REText.RE.TDFA.ByteStringText.RE.TDFA.ByteString.LazyText.RE.TDFA.SequenceText.RE.TDFA.StringText.RE.TDFA.TextText.RE.TDFA.Text.Lazy Text.RE.TDFAText.RE Text.RE.Internal.AddCaptureNamesSimpleRegexOptionsMultilineSensitiveMultilineInsensitiveBlockSensitiveBlockInsensitiveMacrosMacroID_MacroIDModeSimpleBlockIsOption makeOptionsOptions_Options _options_mode _options_macs _options_comp _options_exec emptyMacros$fLiftSimpleRegexOptions$fHashableMacroID $fBoundedMode $fEnumMode $fOrdMode$fEqMode $fShowMode$fIsStringMacroID $fOrdMacroID $fEqMacroID $fShowMacroID$fShowOptions_$fBoundedSimpleRegexOptions$fEnumSimpleRegexOptions$fEqSimpleRegexOptions$fOrdSimpleRegexOptions$fShowSimpleRegexOptionsLineNoZeroBasedLineNogetZeroBasedLineNo firstLine getLineNolineNo $fShowLineNo $fEnumLineNo QQFailure _qqf_context_qqf_componentqq0$fExceptionQQFailure$fShowQQFailureCaptureOrdinalgetCaptureOrdinal CaptureNamegetCaptureName CaptureNames CaptureID CID_ordinalCID_namenoCaptureNames findCaptureID$fHashableCaptureName$fShowCaptureName$fOrdCaptureName$fEqCaptureName$fShowCaptureOrdinal$fOrdCaptureOrdinal$fEqCaptureOrdinal$fEnumCaptureOrdinal$fIxCaptureOrdinal$fNumCaptureOrdinal$fShowCaptureID$fOrdCaptureID $fEqCaptureIDCapture captureSource capturedText captureOffset captureLengthMatch matchSource captureNames matchArrayMatches matchesSource allMatchesnoMatchemptyMatchArray anyMatches countMatchesmatches mainCapturesmatched matchedText matchCapture matchCaptures!$$ captureText!$$?captureTextMaybe!$capture!$? captureMaybe hasCaptured capturePrefix captureSuffix $fRegexContextregexsourceMatches$fRegexContextregexsourceMatch$fFunctorCapture$fFunctorMatch$fFunctorMatches $fShowCapture $fEqCapture $fShowMatch $fEqMatch $fShowMatches $fEqMatchesLocation _loc_match _loc_captureContextTOPSUBALLPhi _phi_context_phi_phiReplace_ _r_length_r_substReplacelength_pack_unpack_textify detextify appendNewlinesubst parse_tplreplace_ isTopLocation replaceAllreplaceAllCapturesreplaceAllCaptures'replaceAllCaptures_replaceAllCapturesMreplacereplaceCapturesreplaceCaptures'replaceCaptures_replaceCapturesM expandMacros expandMacros' $fReplaceText$fReplaceText0 $fReplaceSeq$fReplaceByteString$fReplaceByteString0 $fReplace[] $fShowContext$fShowLocationIsRegex matchOnce matchMany regexSourceLineEditNoEdit ReplaceWithDeleteEditEDIT_tplEDIT_phiEDIT_funEDIT_genEditsSelectPipe applyEdits applyEdit applyLineEdit$fShowLineEdit SedScriptsedsed'SeverityEmergAlertCritErrWarningNoticeInfoDebug IPV4Address parseIntegerparseHex parseDouble parseStringparseSimpleString parseDateparseSlashesDateparseTimeOfDay parseTimeZone parseDateTimeparseDateTime8601parseDateTimeCLFparseShortMonthshortMonthArrayparseIPv4Address parseSeverityseverityKeywords$fBoundedSeverity$fEnumSeverity $fOrdSeverity $fEqSeverity$fShowSeverity FunctionID _FunctionID RegexSource _RegexSource TestResult _TestResultMacroDescriptor _md_source _md_samples_md_counter_samples_md_test_results _md_parser_md_descriptionMacroEnv WithCaptures InclCaptures ExclCaptures RegexTypeTDFAPCREmkMacros testMacroEnv badMacrosrunTests runTests'dumpMacroTableformatMacroTableformatMacroSummaryformatMacroSourcesformatMacroSourcetestMacroDescriptors$fBoundedRegexType$fEnumRegexType $fEqRegexType$fOrdRegexType$fShowRegexType$fEqWithCaptures$fOrdWithCaptures$fShowWithCaptures$fIsStringTestResult$fShowTestResult$fIsStringRegexSource$fShowRegexSource$fIsStringFunctionID$fShowFunctionID$fShowMacroDescriptor $fShowREToken$fIxCol $fBoundedCol $fEnumCol$fOrdCol$fEqCol $fShowCol PreludeMacroPM_natPM_hexPM_intPM_frac PM_stringPM_string_simplePM_idPM_id'PM_id_PM_datePM_date_slashesPM_time PM_timezone PM_datetimePM_datetime_8601PM_datetime_clf PM_shortmonthPM_address_ipv4PM_email_simplePM_urlPM_syslog_severity preludeMacrospreludeMacroTablepreludeMacroSummarypreludeMacroSourcespreludeMacroSourcepreludeMacroEnvpreludeMacroDescriptorpresentPreludeMacro$fBoundedPreludeMacro$fEnumPreludeMacro$fOrdPreludeMacro$fEqPreludeMacro$fShowPreludeMacro GrepScriptLine_ln_no _ln_matchesgrep grepLines grepScript linesMatched $fShowLinealexalex'TokenECapPGrpPCapBraBSOthercpextractNamedCaptures validTokenscan formatTokensidFormatTokenOptions formatTokens' formatTokens0 $fShowToken$fGenericToken $fEqToken$fShowFormatTokenOptionsRErereMSreMIreBSreBIreMultilineSensitivereMultilineInsensitivereBlockSensitivereBlockInsensitivere_ regexType reOptionsreSourcereCaptureNamesreRegexnoPreludeOptionsdefaultOptionsunpackSimpleRegexOptions compileRegexpreludepreludeTestsFailing preludeEnv preludeTablepreludeSummarypreludeSources preludeSource"$fIsOption()RECompOptionExecOption($fIsOptionOptions_RECompOptionExecOption*$fIsOptionExecOptionRECompOptionExecOption*$fIsOptionCompOptionRECompOptionExecOption'$fIsOptionHashMapRECompOptionExecOption$$fIsOptionModeRECompOptionExecOption2$fIsOptionSimpleRegexOptionsRECompOptionExecOption*=~?=~=~=~~$fIsRegexREByteString$fIsRegexRESeq $fIsRegexRE[]$fIsRegexRETextlookupCaptureIDcvtlift_phimk_phimk_phi' parse_tpl_fixpoint$=~select_edit_scriptspipe_edit_scripts read_file write_filedate_templatestime_templatestimezone_templatesdate_time_8601_templatesdate_time_templates parse_timeshort_month_hm severity_hmwords_byREToken _ret_prefix _ret_fixed _ret_grouping_ret_capturingColC_nameC_capsC_regex C_examplesC_anti_examplesC_failsC_parser C_commentTableRow present_colmacro_table_hdrmacro_table_rowmacro_attribute format_table field_widthwrap_rowwidths format_rowfieldselljust min_captures format_tokens delete_ketscan_re match_tdfa match_pcre mdRegexSourcetest' test_neg'test_diagnosticprelude_prefix decimal_macro url_macroprelude_macro_env_pcreprelude_macro_env_tdfaprelude_macro_envprelude_macro_id natural_macronatural_hex_macro integer_macro string_macrostring_simple_macroid_macro id'_macro id__macro date_macrodate_slashes_macro time_macrotimezone_macrodatetime_macrodatetime_8601_macrodatetime_clf_macroshortmonth_macroaddress_ipv4_macrossyslog_severity_macroemail_simple_macro run_testsbracketedRegexSourcefixreportaddCaptureNamesToMatchesaddCaptureNamesToMatchFormatTokenOptions_fto_regex_type _fto_min_caps_fto_incl_caps analyseTokens parse_capturedefFormatTokenOptions _re_options _re_source _re_cnames _re_regexdef_comp_optiondef_exec_option compileRegex_re'unsafeCompileRegexSimpleunsafeCompileRegexunsafeCompileRegex_ compileRegex'