;      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None<=?I       NoneI !" !" !" !"None0%&'()*%&'()%&'(*)%&'()*NoneI,a ,t is just the number of the capture, starting with 0 for the whole of the text matched, then in leftmost, outermost/a / is just the text of the name2Tthe dictionary for named captures stored in compiled regular expressions associates3[CaptureID identifies captures, either by number (e.g., [cp|1|]) or name (e.g., [cp|foo|]).6 an empty 2 dictionary7 look up a 3 in the 2 dictionary ,-./012345678 ,-./01234567 34526/018,-.7,-./012345678None!"9;<="EHthe matching of a single sub-expression against part of the source textG the whole text that was searchedHthe text that was matchedIythe number of characters preceding the match with -1 used if no text was captured by the RE (not even the empty string)J1the number of chacter in the captured sub-stringKthe 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))Mthe whole source textNthe RE's capture namesO @.n-1 captures, starting with the text matched by the whole REPithe result type to use when every match is needed, not just the first match of the RE against the sourceRthe source text being matchedS!all captures found, left to rightT/Construct a Match that does not match anything.Uan empty array of CaptureV3tests whether the RE matched the source text at allWcount the matchesY(extract the main capture from each matchZ3tests whether the RE matched the source text at all[3tests whether the RE matched the source text at all\Kthe top-level capture if the source text matched the RE, Nothing otherwise]Ythe top-level capture and the sub captures if the text matched the RE, Nothing otherwise^an alternative for captureText_look 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 on`#an alternative for captureTextMaybealook up the text of the nth capture (0 being the match of the whole), returning Nothing if the Match doesn't contain the captureban alternative for captureclook 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 ond'an alternative for capture captureMaybeelook 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)f(test if the capture has matched any textg$returns the text preceding the matchh returns the text after the matchi,for matching all REs against the source textj6for matching just the first RE against the source text+EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm$EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh$PQRSKLMNOEFGHIJTUVWXYZ[\]^_`abcdefghEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm^9 b9 None!"9:;tthe Locationg information passed into the substitution function specifies which sub-expression is being substitutedvxthe zero-based, i-th string to be matched, when matching all strings, zero when only the first string is being matchedw0, 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.xContext= specifies which contexts the substitutions should be appliedyZsubstitutions should be applied to the top-level only, the text that matched the whole REzOsubstitutions should only be applied to the text captured by bracketed sub-REs{kthe substitution function should be applied to all captures, the top level and the sub-expression captures|ua selction of the Replace methods can be encapsulated with ReplaceMethods for the higher-order replacement functionsoReplace provides the missing methods needed to replace the matched text; lengthE 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 phiJ replacement function for use with replaceAllCaptures and replaceCapturesEreplaceMethods encapsulates ReplaceMethods 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.substitutes using a function that takes the full Match context and returns the same replacement text as the _phi_phi context.vreplaceAllCaptures_ is like like replaceAllCaptures but takes the Replace methods through the ReplaceMethods argumentUreplaceAllCapturesM is just a monadically generalised version of replaceAllCaptures_substitutes using a function that takes the full Match context and returns the same replacement text as the _phi_phi context.kreplaceCaptures_ is like replaceCaptures but takes the Replace methods through the ReplaceMethods 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 function+tuvwxyz{|}~!tuvwxyz{|}~!|}~xyz{tuvwtuvwxyz{|}~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 macros)naming the macros)all prelude macros are prefixed with thisa digit string macrosee  'https://mathiasbynens.be/demo/url-regex (based on @stephenhay URL);   !"#$%&'   ()   !"/   !"#$%&'()/   !)"#$%&'(&   !"#$%&'   ()   !" None!": /0123456#7 /01234567 012345/67/0123456#7None9:9:9:9:(C) 2016-17 Chris DornanBSD3 (see the LICENSE file)+Chris Dornan <chris.dornan@irisconnect.com>RFCportableNone  !",-./01234567EFGHIJKLMNOPQRSTVWXYZ[\]^_`abcdefghtuvwxyz{|}~/012345679:PQRSKLMNOEFGHIJTVWXYZ[\]^_`abcdefgh  34526/01,-.7 !"|}~xyz{tuvw012345/679:None$%$%$%None!"5&'()*;<=>?@ABCD+E,F-GHI;A<=>?@BCDEFGHIBCG;<=>?@ADFHIE &'()*;<=>?@ABCD+E,F-GHINone !"9:;<=/NO./012PQRSTUVWXYZ[\]^34_`ab56789:cdefghijklmnoBNOPQRSTUVWXYZ[\]^_`abcdefghiPQRSTUVWXYBZO[\]^Ncedfghi_`ab*NO./012PQRSTUVWXYZ[\]^34_`ab56789:cdefghijklmnoNone9:;<=pfind all matches in textqfind first match in textr)the regex-base polymorphic match operators2the regex-base monadic, polymorphic match operatorpqrst  !",-./01234567EFGHIJKLMNOPQRSTVWXYZ[\]^_`abcdefghtuvwxyz{|}~/012345679:BNOPQRSTUVWXYZ[\]^_`abcdefghipqrspqrspqrstNone9:;<=ufind all matches in textvfind first match in textw)the regex-base polymorphic match operatorx2the regex-base monadic, polymorphic match operatoruvwxy  !",-./01234567EFGHIJKLMNOPQRSTVWXYZ[\]^_`abcdefghtuvwxyz{|}~/012345679:BNOPQRSTUVWXYZ[\]^_`abcdefghiuvwxuvwxuvwxyNone9:;<=zfind all matches in text{find first match in text|)the regex-base polymorphic match operator}2the regex-base monadic, polymorphic match operatorz{|}~  !",-./01234567EFGHIJKLMNOPQRSTVWXYZ[\]^_`abcdefghtuvwxyz{|}~/012345679:BNOPQRSTUVWXYZ[\]^_`abcdefghiz{|}z{|}z{|}~None9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",-./01234567EFGHIJKLMNOPQRSTVWXYZ[\]^_`abcdefghtuvwxyz{|}~/012345679:BNOPQRSTUVWXYZ[\]^_`abcdefghiNone:find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",-./01234567EFGHIJKLMNOPQRSTVWXYZ[\]^_`abcdefghtuvwxyz{|}~/012345679:BNOPQRSTUVWXYZ[\]^_`abcdefghiNone !"9:;<=/;<=>?@ABCDEFGBB*;<=>?@ABCDEFGNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",-./01234567EFGHIJKLMNOPQRSTVWXYZ[\]^_`abcdefghtuvwxyz{|}~/012345679:BNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",-./01234567EFGHIJKLMNOPQRSTVWXYZ[\]^_`abcdefghtuvwxyz{|}~/012345679:BNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",-./01234567EFGHIJKLMNOPQRSTVWXYZ[\]^_`abcdefghtuvwxyz{|}~/012345679:BNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",-./01234567EFGHIJKLMNOPQRSTVWXYZ[\]^_`abcdefghtuvwxyz{|}~/012345679:BNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",-./01234567EFGHIJKLMNOPQRSTVWXYZ[\]^_`abcdefghtuvwxyz{|}~/012345679:BNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",-./01234567EFGHIJKLMNOPQRSTVWXYZ[\]^_`abcdefghtuvwxyz{|}~/012345679:BNone:find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",-./01234567EFGHIJKLMNOPQRSTVWXYZ[\]^_`abcdefghtuvwxyz{|}~/012345679:BH !"#$%&&'()*+,-./0123456789:;<=>?@ABCDDEFGHIJJKLLMNOPQRSTUVWXYZ[\]^_`aabcdeffghijjklmnopqrstuvwxyz{|}~                                                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B B C D E F G H IJKLMNOPQRSTUVWXYZ[\]^+_`abcdefghijklmnopqrstuvwxyz{|}~+_`abcdefghijklmnopqrsutvwxyz{|}~                                                                               __$regex-0.3.0.0-5TunscS8YtbHe0cBqL1huhText.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 getMacroIDIsOption makeOptionsOptions_Options optionsMacs optionsComp optionsExec emptyMacros$fLiftSimpleRegexOptions$fHashableMacroID$fIsStringMacroID $fOrdMacroID $fEqMacroID $fShowMacroID$fShowOptions_$fBoundedSimpleRegexOptions$fEnumSimpleRegexOptions$fEqSimpleRegexOptions$fOrdSimpleRegexOptions$fShowSimpleRegexOptionsLineNoZeroBasedLineNogetZeroBasedLineNo firstLine getLineNolineNo $fShowLineNo $fEnumLineNo QQFailure _qqf_context_qqf_componentqq0$fExceptionQQFailure$fShowQQFailureCaptureOrdinalgetCaptureOrdinal CaptureNamegetCaptureName CaptureNames CaptureIDIsCaptureOrdinal IsCaptureNamenoCaptureNames 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 locationMatchlocationCaptureContextTOPSUBALLReplaceMethods methodLength methodSubstReplacelengthEpackEunpackEtextifyE detextifyEappendNewlineEsubstEparseTemplateEreplaceMethods isTopLocation replaceAllreplaceAllCapturesreplaceAllCaptures_replaceAllCapturesMreplacereplaceCapturesreplaceCaptures_replaceCapturesM expandMacros expandMacros' $fReplaceText$fReplaceText0 $fReplaceSeq$fReplaceByteString$fReplaceByteString0 $fReplace[] $fShowContext$fShowLocationIsRegex matchOnce matchMany regexSourceLineEditNoEdit ReplaceWithDeleteEditTemplateFunctionEditsSelectPipe 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 getLineNumbergetLineMatchesgrep 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'$fIsOptionHashMapRECompOptionExecOption2$fIsOptionSimpleRegexOptionsRECompOptionExecOption*=~?=~=~=~~$fIsRegexREByteString$fIsRegexRESeq $fIsRegexRE[]$fIsRegexRETextlookupCaptureIDcvtlift_phiparseTemplateE'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'