!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ None<=?I       NoneI !" !" !" !"None0%&'()*%&'()%&'(*)%&'()*Safe,-,-,-,-NoneI.a .t is just the number of the capture, starting with 0 for the whole of the text matched, then in leftmost, outermost1a 1 is just the text of the name4Tthe dictionary for named captures stored in compiled regular expressions associates5[CaptureID identifies captures, either by number (e.g., [cp|1|]) or name (e.g., [cp|foo|]).8 an empty 4 dictionary9 look up a 5 in the 4 dictionary ./0123456789: ./0123456789 56748123:./09./0123456789:None!"09;<="GHthe matching of a single sub-expression against part of the source textI the whole text that was searchedJthe text that was matchedKythe number of characters preceding the match with -1 used if no text was captured by the RE (not even the empty string)L1the number of chacter in the captured sub-stringMthe 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))Othe whole source textPthe RE's capture namesQ @.n-1 captures, starting with the text matched by the whole RERithe result type to use when every match is needed, not just the first match of the RE against the sourceTthe source text being matchedU!all captures found, left to rightV/Construct a Match that does not match anything.Wan empty array of CaptureX3tests whether the RE matched the source text at allYcount the matches[(extract the main capture from each match\3tests 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 captureTextalook 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 onb#an alternative for captureTextMaybeclook up the text of the nth capture (0 being the match of the whole), returning Nothing if the Match doesn't contain the capturedan alternative for captureelook 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 onf'an alternative for capture captureMaybeglook 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)h(test if the capture has matched any texti$returns the text preceding the matchj returns the text after the matchk,for matching all REs against the source textl6for matching just the first RE against the source text+GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno$GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij$RSTUMNOPQGHIJKLVWXYZ[\]^_`abcdefghijGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno`9 d9 None!"9:;vthe Locationg information passed into the substitution function specifies which sub-expression is being substitutedxxthe zero-based, i-th string to be matched, when matching all strings, zero when only the first string is being matchedy0, 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.zContext= specifies which contexts the substitutions should be applied{Zsubstitutions should be applied to the top-level only, the text that matched the whole RE|Osubstitutions 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+vwxyz{|}~!vwxyz{|}~!~z{|}vwxyvwxyz{|}~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!": 12345678*9 123456789 23456718912345678*9None;<;<;<;< (C) 2016-17 Chris DornanBSD3 (see the LICENSE file)+Chris Dornan <chris.dornan@irisconnect.com>RFCportableNone  !"./0123456789GHIJKLMNOPQRSTUVXYZ[\]^_`abcdefghijvwxyz{|}~123456789;<RSTUMNOPQGHIJKLVXYZ[\]^_`abcdefghij  56748123./09 !"~z{|}vwxy234567189;<None0AT=za convenience function used by the API modules to insert capture names extracted from the parsed RE into the (*=~) result>za convenience function used by the API modules to insert capture names extracted from the parsed RE into the (?=~) result?Ya 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.=>?=>?=>?=>?None!"5+,-./@ABCDEFGHI0J1K2LMN@FABCDEGHIJKLMNGHL@ABCDEFIKMNJ +,-./@ABCDEFGHI0J1K2LMNNone !"9:;<=0ST34567UVWXYZ[\]^_`abc89defg:;<=>?hijklmnopqrstu,GSTUVWXYZ[\]^_`abcdefghijklmnoUVWXYZ[\]^G_T`abcShjiklmndefgo,+ST34567UVWXYZ[\]^_`abc89defg:;<=>?hijklmnopqrstuNone9:;<=vfind all matches in textwfind first match in textx)the regex-base polymorphic match operatory2the regex-base monadic, polymorphic match operatorvwxyz  !",./0123456789GHIJKLMNOPQRSTUVXYZ[\]^_`abcdefghijvwxyz{|}~123456789;<GSTUVWXYZ[\]^_`abcdefghijklmnovwxyvwxyvwxyzNone9:;<={find all matches in text|find first match in text})the regex-base polymorphic match operator~2the regex-base monadic, polymorphic match operator{|}~  !",./0123456789GHIJKLMNOPQRSTUVXYZ[\]^_`abcdefghijvwxyz{|}~123456789;<GSTUVWXYZ[\]^_`abcdefghijklmno{|}~{|}~{|}~None9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",./0123456789GHIJKLMNOPQRSTUVXYZ[\]^_`abcdefghijvwxyz{|}~123456789;<GSTUVWXYZ[\]^_`abcdefghijklmnoNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",./0123456789GHIJKLMNOPQRSTUVXYZ[\]^_`abcdefghijvwxyz{|}~123456789;<GSTUVWXYZ[\]^_`abcdefghijklmnoNone:find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",./0123456789GHIJKLMNOPQRSTUVXYZ[\]^_`abcdefghijvwxyz{|}~123456789;<GSTUVWXYZ[\]^_`abcdefghijklmnoNone !"9:;<=0@ABCDEFGHIJKL,GG,+@ABCDEFGHIJKLNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",./0123456789GHIJKLMNOPQRSTUVXYZ[\]^_`abcdefghijvwxyz{|}~123456789;<GNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",./0123456789GHIJKLMNOPQRSTUVXYZ[\]^_`abcdefghijvwxyz{|}~123456789;<GNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",./0123456789GHIJKLMNOPQRSTUVXYZ[\]^_`abcdefghijvwxyz{|}~123456789;<GNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",./0123456789GHIJKLMNOPQRSTUVXYZ[\]^_`abcdefghijvwxyz{|}~123456789;<GNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",./0123456789GHIJKLMNOPQRSTUVXYZ[\]^_`abcdefghijvwxyz{|}~123456789;<GNone9:;<=find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",./0123456789GHIJKLMNOPQRSTUVXYZ[\]^_`abcdefghijvwxyz{|}~123456789;<GNone:find all matches in textfind first match in text)the regex-base polymorphic match operator2the regex-base monadic, polymorphic match operator  !",./0123456789GHIJKLMNOPQRSTUVXYZ[\]^_`abcdefghijvwxyz{|}~123456789;<GM!"#$%&''()*+,-./0123456789:;<=>?@ABCDEEFGHIJKLMMNOOPQRSTUVWXYZ[\]^_`abcddefghiijklmmnopqrstuvwxyz{|}~                                                                       ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B CDEEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd,efghijklmnopqrstuvwxyz{|}~,efghijklmnopqrstuvwxy{z|}~                                                                                ee$regex-0.5.0.0-BUKwgwuzlbp5dexGFADkWAText.RE.OptionsText.RE.LineNoText.RE.Internal.QQText.RE.Internal.EscapeREStringText.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.Lex Text.RE.Internal.AddCaptureNamesText.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.RESimpleRegexOptionsMultilineSensitiveMultilineInsensitiveBlockSensitiveBlockInsensitiveMacrosMacroID 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$fShowQQFailureescapeREString isMetaCharCaptureOrdinalgetCaptureOrdinal 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'addCaptureNamesToMatchesaddCaptureNamesToMatchaddCaptureNamesTokenECapPGrpPCapBraBSOthercpextractNamedCaptures validTokenscan formatTokensidFormatTokenOptions formatTokens' formatTokens0 $fShowToken$fGenericToken $fEqToken$fShowFormatTokenOptionsRErereMSreMIreBSreBIreMultilineSensitivereMultilineInsensitivereBlockSensitivereBlockInsensitivere_ regexType reOptionsreSourcereCaptureNamesreRegexnoPreludeOptionsdefaultOptionsunpackSimpleRegexOptions compileRegexpreludepreludeTestsFailing preludeEnv preludeTablepreludeSummarypreludeSources preludeSourceescape"$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_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'