9м      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None<=?I       NoneI !" !" !" !"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 name+Tthe dictionary for named captures stored in compiled regular expressions associates,[CaptureID identifies captures, either by number (e.g., [cp|1|]) or name (e.g., [cp|foo|])./ an empty + dictionary0 look up a , in the + dictionary %&'()*+,-./01 %&'()*+,-./0 ,-.+/()*1%&'0%&'()*+,-./01Safe!"09;<=>Hthe matching of a single sub-expression against part of the source text@ the whole text that was searchedAthe text that was matchedBythe number of characters preceding the match with -1 used if no text was captured by the RE (not even the empty string)C1the number of chacter in the captured sub-stringD(test if the capture has matched any textE$returns the text preceding the matchF returns the text after the match >?@ABCDEFG >?@ABCDEF >?@ABCDEF>?@ABCDEFGNone!"09;<=Jthe 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))Lthe whole source textMthe RE's capture namesN @.n-1 captures, starting with the text matched by the whole REO/Construct a Match that does not match anything.Pan empty array of CaptureQ3tests whether the RE matched the source text at allR3tests whether the RE matched the source text at allSKthe top-level capture if the source text matched the RE, Nothing otherwiseTYthe top-level capture and the sub captures if the text matched the RE, Nothing otherwiseUan alternative for captureTextVlook 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 onW#an alternative for captureTextMaybeXlook up the text of the nth capture (0 being the match of the whole), returning Nothing if the Match doesn't contain the captureYan alternative for captureZlook 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['an alternative for capture captureMaybe\look 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)]=convert a regex-base native MatchText into a regex Match type^6for matching just the first RE against the source textJKLMNOPQRSTUVWXYZ[\]^_JKLMNOPQRSTUVWXYZ[\]JKLMNOPQRSTUVWXYZ[\]JKLMNOPQRSTUVWXYZ[\]^_U9 Y9 None!"09;<=bithe result type to use when every match is needed, not just the first match of the RE against the sourcedthe source text being matchede!all captures found, left to rightf3tests whether the RE matched the source text at allgcount the matcheshlist the Matchesi(extract the main capture from each matchj,for matching all REs against the source text bcdefghijkbcdefghibcdefghibcdefghijkNone!"9:;nthe Locationg information passed into the substitution function specifies which sub-expression is being substitutedpxthe zero-based, i-th string to be matched, when matching all strings, zero when only the first string is being matchedq0, 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.rContext= specifies which contexts the substitutions should be appliedsZsubstitutions should be applied to the top-level only, the text that matched the whole REtOsubstitutions should only be applied to the text captured by bracketed sub-REsukthe substitution function should be applied to all captures, the top level and the sub-expression capturesvua selction of the Replace methods can be encapsulated with ReplaceMethods for the higher-order replacement functionszoReplace provides the missing methods needed to replace the matched text; lengthE is the minimum implementation{length function for a|inject String into a}project a onto a String~inject into Textproject Text onto asplit into linesconcatenate a list of linesappend 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-nopqrstuvwxyz{|}~#nopqrstuvwxyz{|}~#z{|}~vwxyrstunopqnopqrstuvwxyz {|}~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 possibleGwhat kind of back end will be compiling the RE, and its match function test RegexType for TDFA/PCREness test RegexType for TDFA/PCREnessO**1 None0               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)9 !"#$%&'()*+- !"#$%&'()*+- !"#+$%&'()*$ !"#$%&'()*+Safe12121212(C) 2016-17 Chris DornanBSD3 (see the LICENSE file)+Chris Dornan <chris.dornan@irisconnect.com>RFCportableNoneL,>?@ABCDEFJKLMNOQRSTUVWXYZ[\bcdefghinopqrstuvwxyz{|}~LbcdeJKLMN>?@ABCOfghiQRSTUVWXYZ[\DEF,z{|}~vwxyrstunopqNone0AT3za convenience function used by the API modules to insert capture names extracted from the parsed RE into the (*=~) result4za convenience function used by the API modules to insert capture names extracted from the parsed RE into the (?=~) result5Ya hairy dynamically-typed function used with the legacy (=~) and (=~~) to see if it can/should add the capture names extracted from the RE into the polymorphic result of the operator (it does for any Match or Matches type, provided it is parameterised over a recognised type). The test suite is all over this one, testing all of these cases.345345345345None!": 6789:;<=>a !",>?@ABCDEFJKLMNOQRSTUVWXYZ[\bcdefghinopqrstuvwxyz{|}~6789:;<=> 789:;<6=>6789:;<=>None@AT,>?@ABCDEFJKLMNOQRSTUVWXYZ[\bcdefghinopqrstuvwxyz{|}~@A@A@ANone!"5BCDEFGHIJKLMNOPBHCDEFGIJKLMNOPIJNBCDEFGHKMOPL BCDEFGHIJKLMNOPNone !"9:;<=2UVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy!1IUVWXYZ[\]^_`abcdefghijklmnopqrs!WXYZ[\]^_`IaVbcdeUfglmnopqrhijks1-UVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyNone9:;<=zfind all matches in text{find first match in text|)the regex-base polymorphic match operator}2the regex-base monadic, polymorphic match operatorz{|}~q,>?@ABCDEFJKLMNOQRSTUVWXYZ[\bcdefghinopqrstuvwxyz{|}~1IUVWXYZ[\]^_`abcdefghijklmnopqrsz{|}z{|}z{|}~None9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operatorq,>?@ABCDEFJKLMNOQRSTUVWXYZ[\bcdefghinopqrstuvwxyz{|}~1IUVWXYZ[\]^_`abcdefghijklmnopqrsNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operatorq,>?@ABCDEFJKLMNOQRSTUVWXYZ[\bcdefghinopqrstuvwxyz{|}~1IUVWXYZ[\]^_`abcdefghijklmnopqrsNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operatorq,>?@ABCDEFJKLMNOQRSTUVWXYZ[\bcdefghinopqrstuvwxyz{|}~1IUVWXYZ[\]^_`abcdefghijklmnopqrsNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operatorq,>?@ABCDEFJKLMNOQRSTUVWXYZ[\bcdefghinopqrstuvwxyz{|}~1IUVWXYZ[\]^_`abcdefghijklmnopqrsNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operatorq,>?@ABCDEFJKLMNOQRSTUVWXYZ[\bcdefghinopqrstuvwxyz{|}~1IUVWXYZ[\]^_`abcdefghijklmnopqrsNone:find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operatorq,>?@ABCDEFJKLMNOQRSTUVWXYZ[\bcdefghinopqrstuvwxyz{|}~1IUVWXYZ[\]^_`abcdefghijklmnopqrsNone!":i !",>?@ABCDEFJKLMNOQRSTUVWXYZ[\bcdefghinopqrstuvwxyz{|}~  !"##$%&'()*+,-./0123456789:;<=>?@AABCCDEFGHIJKLMNOPQRSTUVWXXYZ[\]^_`abccdefghijklmnopqrstuvwxyzz{|}~                                                                     ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ?@ABCDEFFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab(cdefghijklmnopqrstuvwxyz{|}~                                                                            c$regex-0.7.0.0-KyYdK4UpgLjC8cYHzSP23QText.RE.Types.OptionsText.RE.Types.LineNoText.RE.Types.CaptureIDText.RE.Types.CaptureText.RE.Types.MatchText.RE.Types.MatchesText.RE.Types.ReplaceText.RE.Types.IsRegexText.RE.Tools.EditText.RE.TestBench.ParsersText.RE.TestBenchText.RE.Internal.QQText.RE.Internal.PreludeMacrosText.RE.Internal.EscapeREString Text.RE.Internal.AddCaptureNamesText.RE.Tools.GrepText.RE.Tools.LexText.RE.Internal.NamedCapturesText.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.Tools.SedText.RESimpleRegexOptionsMultilineSensitiveMultilineInsensitiveBlockSensitiveBlockInsensitiveMacrosMacroID getMacroIDIsOption makeOptionsOptions_Options optionsMacs optionsComp optionsExec emptyMacros$fLiftSimpleRegexOptions$fHashableMacroID$fIsStringMacroID $fOrdMacroID $fEqMacroID $fShowMacroID$fShowOptions_$fBoundedSimpleRegexOptions$fEnumSimpleRegexOptions$fEqSimpleRegexOptions$fOrdSimpleRegexOptions$fShowSimpleRegexOptionsLineNoZeroBasedLineNogetZeroBasedLineNo firstLine getLineNolineNo $fShowLineNo $fEnumLineNoCaptureOrdinalgetCaptureOrdinal CaptureNamegetCaptureName CaptureNames CaptureIDIsCaptureOrdinal IsCaptureNamenoCaptureNames findCaptureID$fHashableCaptureName$fShowCaptureName$fOrdCaptureName$fEqCaptureName$fShowCaptureOrdinal$fOrdCaptureOrdinal$fEqCaptureOrdinal$fEnumCaptureOrdinal$fIxCaptureOrdinal$fNumCaptureOrdinal$fShowCaptureID$fOrdCaptureID $fEqCaptureIDCapture captureSource capturedText captureOffset captureLength hasCaptured capturePrefix captureSuffix$fFunctorCapture $fShowCapture $fEqCaptureMatch matchSource captureNames matchArraynoMatchemptyMatchArraymatched matchedText matchCapture matchCaptures!$$ captureText!$$?captureTextMaybe!$capture!$? captureMaybeconvertMatchText$fRegexContextregexsourceMatch$fFunctorMatch $fShowMatch $fEqMatchMatches matchesSource allMatches anyMatches countMatchesmatches mainCaptures $fRegexContextregexsourceMatches$fFunctorMatches $fShowMatches $fEqMatchesLocation locationMatchlocationCaptureContextTOPSUBALLReplaceMethods methodLength methodSubstReplacelengthEpackEunpackEtextifyE detextifyElinesEunlinesEappendNewlineEsubstEparseTemplateEreplaceMethods isTopLocation replaceAllreplaceAllCapturesreplaceAllCaptures_replaceAllCapturesMreplacereplaceCapturesreplaceCaptures_replaceCapturesM expandMacros expandMacros' $fReplaceText$fReplaceText0 $fReplaceSeq$fReplaceByteString$fReplaceByteString0 $fReplace[] $fShowContext$fShowLocationIsRegex matchOnce matchMany makeRegex makeRegexWith regexSourceLineEditNoEdit ReplaceWithDeleteEditTemplateFunctionEditsSelectPipe applyEdits applyEdit applyLineEdit$fShowLineEditSeverityEmergAlertCritErrWarningNoticeInfoDebug 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 RegexTypeisTDFAisPCREmkTDFAmkPCREpresentRegexTypemkMacros testMacroEnv badMacrosrunTests runTests'dumpMacroTableformatMacroTableformatMacroSummaryformatMacroSourcesformatMacroSourcetestMacroDescriptors mdRegexSource$fShowRegexType$fEqWithCaptures$fOrdWithCaptures$fShowWithCaptures$fIsStringTestResult$fShowTestResult$fIsStringRegexSource$fShowRegexSource$fIsStringFunctionID$fShowFunctionID$fShowMacroDescriptor $fShowREToken$fIxCol $fBoundedCol $fEnumCol$fOrdCol$fEqCol $fShowCol QQFailure _qqf_context_qqf_componentqq0$fExceptionQQFailure$fShowQQFailure 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$fShowPreludeMacroescapeREString isMetaCharaddCaptureNamesToMatchesaddCaptureNamesToMatchaddCaptureNames GrepScriptLine getLineNumbergetLineMatchesgrep grepLines grepScript linesMatched $fShowLinealexalex'TokenECapPGrpPCapBraBSOthercpextractNamedCaptures validTokenscan formatTokensidFormatTokenOptions formatTokens' formatTokens0 $fShowToken$fGenericToken $fEqToken$fShowFormatTokenOptionsRErereMSreMIreBSreBIreMultilineSensitivereMultilineInsensitivereBlockSensitivereBlockInsensitivere_ regexType reOptionsreSourcereCaptureNamesreRegexnoPreludeOptionsdefaultOptionsunpackSimpleRegexOptions compileRegexcompileRegexWithcompileRegexWithOptionsprelude preludeEnvpreludeTestsFailing preludeTablepreludeSummarypreludeSources preludeSourceescape"$fIsOption()RECompOptionExecOption($fIsOptionOptions_RECompOptionExecOption*$fIsOptionExecOptionRECompOptionExecOption*$fIsOptionCompOptionRECompOptionExecOption'$fIsOptionHashMapRECompOptionExecOption2$fIsOptionSimpleRegexOptionsRECompOptionExecOption*=~?=~=~=~~$fIsRegexREByteString$fIsRegexRESeq $fIsRegexRE[]$fIsRegexREText SedScriptsedsed'lookupCaptureIDlift_phiparseTemplateE'fixpoint$=~select_edit_scriptspipe_edit_scriptsdate_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_commentTableRowTDFAPCRETestBenchMatcher present_colmacro_table_hdrmacro_table_rowmacro_attribute format_table field_widthwrap_rowwidths format_rowfieldselljust min_captures format_tokens delete_ketscan_retest' test_neg'test_diagnosticprelude_prefix decimal_macro url_macroprelude_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_testsbracketedRegexSourcefixreportFormatTokenOptions_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' read_file write_file