2bi:FSrSSKrSSKrSSKrSSKJrJr SSKJr SSK J r J r J r J r Jr SSKJrJrJrJrJrJr SSKJr /SQr\R2"S 5r/S Qr\"S 5r"S S \5r"SS\S9r "SS\ 5r!"SS\"5r#"SS5r$\$"5r%"SS\&5r'"SS5r(Sr)"SS5r*\*"5r+Sr,"SS 5r-"S!S"\5r."S#S$\5r/"S%S&\ \/S9r0"S'S(5r1"S)S*\05r2S+r3"S,S-\/5r4"S.S/\0\4S9r5g)0z pygments.lexer ~~~~~~~~~~~~~~ Base lexer classes. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. N) apply_filtersFilter)get_filter_by_name)ErrorTextOther Whitespace _TokenType) get_bool_opt get_int_opt get_list_optmake_analysatorFuture guess_decode) regex_opt) Lexer RegexLexerExtendedRegexLexerDelegatingLexer LexerContextincludeinheritbygroupsusingthisdefaultwordsline_rez.*? ))sutf-8)szutf-32)szutf-32be)szutf-16)szutf-16becg)N)xs ڌ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_vendor/pygments/lexer.pyr%"s#c\rSrSrSrSrSrg) LexerMeta%zv This metaclass automagically converts ``analyse_text`` methods into static methods which always return float values. c\SU;a[US5US'[RXX#5$)N analyse_text)rtype__new__)mcsnamebasesds r$r-LexerMeta.__new__+s/ Q  /.0A BAn ||Cu00r&r"N)__name__ __module__ __qualname____firstlineno____doc__r-__static_attributes__r"r&r$r(r(%s  1r&r(c\\rSrSrSrSr/r/r/r/r Sr Sr Sr Sr SrSrS S jrS rS rg) r1a Lexer for a specific language. See also :doc:`lexerdevelopment`, a high-level guide to writing lexers. Lexer classes have attributes used for choosing the most appropriate lexer based on various criteria. .. autoattribute:: name :no-value: .. autoattribute:: aliases :no-value: .. autoattribute:: filenames :no-value: .. autoattribute:: alias_filenames .. autoattribute:: mimetypes :no-value: .. autoattribute:: priority Lexers included in Pygments should have an additional attribute: .. autoattribute:: url :no-value: You can pass options to the constructor. The basic options recognized by all lexers and processed by the base `Lexer` class are: ``stripnl`` Strip leading and trailing newlines from the input (default: True). ``stripall`` Strip all leading and trailing whitespace from the input (default: False). ``ensurenl`` Make sure that the input ends with a newline (default: True). This is required for some lexers that consume input linewise. .. versionadded:: 1.3 ``tabsize`` If given and greater than 0, expand tabs in the input (default: 0). ``encoding`` If given, must be an encoding name. This encoding will be used to convert the input string to Unicode, if it is not already a Unicode string (default: ``'guess'``, which uses a simple UTF-8 / Locale / Latin1 detection. Can also be ``'chardet'`` to use the chardet library, if it is installed. ``inencoding`` Overrides the ``encoding`` if given. Nrc xXl[USS5Ul[USS5Ul[USS5Ul[ USS5UlURSS 5UlURS 5=(d URUl/Ul [US S 5HnURU5 M g )a) This constructor takes arbitrary options as keyword arguments. Every subclass must first process its own options and then call the `Lexer` constructor, since it processes the basic options like `stripnl`. An example looks like this: .. sourcecode:: python def __init__(self, **options): self.compress = options.get('compress', '') Lexer.__init__(self, **options) As these options must all be specifiable as strings (due to the command line usage), there are various utility functions available to help with that, see `Utilities`_. stripnlTstripallFensurenltabsizerencodingguess inencodingfiltersr"N) optionsr r<r=r>r r?getr@rCr add_filter)selfrDfilter_s r$__init__Lexer.__init__s& #GY= $Wj%@ $Wj$? "7Iq9  J8  L1BT]]  #GY;G OOG $z)rD __class__r3rGs r$__repr__Lexer.__repr__sB <<<59^^5L5L59\\C C*DNN,C,CC Cr&c |[U[5(d [U40UD6nURR U5 g)z( Add a new stream filter to this lexer. N) isinstancerrrCappend)rGrHrDs r$rFLexer.add_filters2'6**(URTSS5n TRU RS 5=(d S S5nUmOdTRTR5mTRS 5(aT[S 5SmO$TRS 5(aT[S 5SmTRS S 5mTRSS 5mTR(aTR5mO"TR (aTRS 5mTR"S:aTR%TR"5mTR&(aTR)S 5(dTS - mUU4Sjn U "5n U(d[+U TR,T5n U $![ an[ S5UeSnAff=f)a This method is the basic interface of a lexer. It is called by the `highlight()` function. It must process the text and return an iterable of ``(tokentype, value)`` pairs from `text`. Normally, you don't need to override this method. The default implementation processes the options recognized by all lexers (`stripnl`, `stripall` and so on), and then yields all tokens from `get_tokens_unprocessed()`, with the ``index`` dropped. If `unfiltered` is set to `True`, the filtering mechanism is bypassed even if filters are defined. rAchardetr)rYzkTo enable chardet encoding guessing, please install the chardet library from http://chardet.feedparser.org/Nreplaceir@ruz   c3N># TRT5H upnX4v M g7fN)get_tokens_unprocessed)_tvrGrVs r$streamer"Lexer.get_tokens..streamers&66t<ad =s"%)rRstrr@r pip._vendorrY ImportError _encoding_map startswithlendecodedetectrErZr=stripr<r? expandtabsr>endswithrrC) rGrV unfilteredr`rYedecodedbomr@encrcstreams `` r$ get_tokensLexer.get_tokenss$$$}}'&t,a)+T3 %2MCs++"&s3xy/"8"89"M&3 ?!..et5C"kk#''**=*H*35G{{4==1??8,,H /Dx((CMN+||FD)||D$' ==::F U#T%'LMRSTTs H,, I6 IIc[e)a# This method should process the text and return an iterable of ``(index, tokentype, value)`` tuples where ``index`` is the starting position of the token within the input text. It must be overridden by subclasses. It is recommended to implement it as a generator to maximize effectiveness. )NotImplementedError)rGrVs r$r_Lexer.get_tokens_unprocesseds "!r&)r@r>rCrDr=r<r?)F)r3r4r5r6r7r/aliases filenamesalias_filenames mimetypespriorityurlrIrOrFr+rvr_r8r"r&r$rr1sY1h DG IOIH C%<D% ">@ "r&r) metaclassc*\rSrSrSr\4SjrSrSrg)ri a This lexer takes two lexer as arguments. A root lexer and a language lexer. First everything is scanned using the language lexer, afterwards all ``Other`` tokens are lexed using the root lexer. The lexers from the ``template`` lexer package use this base lexer. c rU"S0UD6UlU"S0UD6UlX0l[R"U40UD6 gNr") root_lexerlanguage_lexerneedlerrI)rG _root_lexer_language_lexer_needlerDs r$rIDelegatingLexer.__init__s7%00-88  t'w'r&cSn/n/nURRU5HRupVnX`RLa+U(aUR[ U5U45 /nX'- nM?URXVU45 MT U(aUR[ U5U45 [ UUR RU55$)N)rr_rrSrj do_insertionsr)rGrVbuffered insertions lng_bufferirarbs r$r_&DelegatingLexer.get_tokens_unprocesseds  **AA$GGA!KK%%s8}j&AB!#J !!1),H    s8}j9 :Z!__CCHMO Or&)rrrN) r3r4r5r6r7rrIr_r8r"r&r$rr s>C( Or&rc\rSrSrSrSrg)ri4zA Indicates that a state should include rules from another state. r"Nr3r4r5r6r7r8r"r&r$rr4s  r&rc\rSrSrSrSrSrg)_inheriti;z; Indicates the a state should inherit from its superclass. cg)Nrr"rNs r$rO_inherit.__repr__?sr&r"N)r3r4r5r6r7rOr8r"r&r$rr;s r&rc$\rSrSrSrSrSrSrg)combinediEz2 Indicates a state combined from multiple states. c,[RX5$r^)tupler-)clsargss r$r-combined.__new__Js}}S''r&cgr^r")rGrs r$rIcombined.__init__Ms r&r"N)r3r4r5r6r7r-rIr8r"r&r$rrEs( r&rcH\rSrSrSrSrS SjrS SjrS SjrSr S r S r g) _PseudoMatchiRz2 A pseudo match object constructed from a string. cX lXlgr^)_text_start)rGstartrVs r$rI_PseudoMatch.__init__Ws   r&NcUR$r^)rrGargs r$r_PseudoMatch.start[s {{r&cFUR[UR5-$r^)rrjrrs r$end_PseudoMatch.end^s{{S_,,r&c>U(a [S5eUR$)Nz No such group) IndexErrorrrs r$group_PseudoMatch.groupas _- -zzr&cUR4$r^)rrNs r$groups_PseudoMatch.groupsfs }r&c0$r^r"rNs r$ groupdict_PseudoMatch.groupdictis r&)rrr^) r3r4r5r6r7rIrrrrrr8r"r&r$rrRs%- r&rc^SU4SjjnU$)zD Callback that yields multiple actions for each group in the match. c 3># [T5Hup4UcM [U5[La7URUS-5nU(aUR US-5XE4v MQMSURUS-5nUcMlU(aUR US-5UlU"U[ UR US-5U5U5HnU(dM Uv M M U(aUR5Ulgg7f)N) enumerater,r rrposrr)lexermatchctxractiondataitemrs r$callbackbygroups..callbackqs"4IA~f+{{1q5)++a!e,f::{{1q5)#"'++a!e"4 &u'3EKKA4F'Ms!T4"&J!T) iikCG sA4C7;AC7 *C7r^r")rrs` r$rrms"& Or&c\rSrSrSrSrg)_ThisizL Special singleton used for indicating the caller class. Used by ``using``. r"Nrr"r&r$rrsr&rc ^^^0mST;a9TRS5n[U[[45(aUTS'OSU4TS'T[La SUU4SjjnU$SUUU4SjjnU$)a Callback that processes the match with a different lexer. The keyword arguments are forwarded to the lexer, except `state` which is handled separately. `state` specifies the state that the new lexer will start in, and can be an enumerable such as ('root', 'inline', 'string') or a simple string which is assumed to be on top of the root state. Note: For that to work, `_other` must not be an `ExtendedRegexLexer`. statestackrootc3<># T (a.T RUR5 UR"S0T D6nOUnUR5nUR"UR 540TD6HupVnXT-Xg4v M U(aUR 5Ulgg7fr)updaterDrMrr_rrr) rrrlxsrrarb gt_kwargskwargss r$rusing..callbacks emm,__.v. A44U[[]PiPaeQk!Q))+sBBc3># T RUR5 T"S0T D6nUR5nUR"UR 540T D6HupVnXT-Xg4v M U(aUR 5Ulgg7fr)rrDrr_rrr) rrrrrrrarb_otherrrs r$rrst MM%-- (!&!B A44U[[]PiPaeQk!Q))+sBBr^)poprRlistrr)rrrrrs`` @r$rrsrI& JJw  a$ ' '!"Ig "(!Ig  ~ & &2 O & & Or&c\rSrSrSrSrSrg)riz Indicates a state or state action (e.g. #pop) to apply. For example default('#pop') is equivalent to ('', Token, '#pop') Note that state tuples may be used as well. .. versionadded:: 2.0 cXlgr^r)rGrs r$rIdefault.__init__s r&rN)r3r4r5r6r7rIr8r"r&r$rrs r&rc(\rSrSrSrSSjrSrSrg)riz Indicates a list of literal words that is transformed into an optimized regex that matches any of the words. .. versionadded:: 2.0 c(XlX lX0lgr^)rprefixsuffix)rGrrrs r$rIwords.__init__s   r&cT[URURURS9$)Nrr)rrrrrNs r$rE words.getsDKK LLr&)rrrN)rr)r3r4r5r6r7rIrEr8r"r&r$rrs  Mr&rcF\rSrSrSrSrSrSrSrS Sjr S r S r S r g) RegexLexerMetaizk Metaclass for RegexLexer, creates the self._tokens attribute from self.tokens on the first instantiation. c[U[5(aUR5n[R"X5R $)zBPreprocess the regular expression component of a token definition.)rRrrErecompiler)rregexrflagsrs r$_process_regexRegexLexerMeta._process_regexs/ eV $ $IIKEzz%(...r&c`[U5[Ld[U5(d SU<35eU$)z5Preprocess the token component of a token definition.z0token type must be simple type or callable, not )r,r callable)rtokens r$_process_tokenRegexLexerMeta._process_tokens0E{j(HUOO LDI K L; r&c[U[5(a9US:XagX;aU4$US:XaU$USSS:Xa[USS5*$SU-5e[U[5(afSUR-nU=RS - sl/nUH3nXa:wd S U-5eUR UR UX655 M5 XSU'U4$[U[5(a"UHnXb;aM US ;aMS U-5e U$S U-5e)z=Preprocess the state transition action of a token definition.#pop#pushNz#pop:zunknown new state %rz_tmp_%drzcircular state ref %r)rrzunknown new state zunknown new state def %r)rRreintr_tmpnameextend_process_stater)r new_state unprocessed processed tmp_stateitokensistates r$_process_new_state!RegexLexerMeta._process_new_states> i % %F")!|#g%  2A')IabM***@4y@@u  8 , ,!CLL0I LLA LG#*L,Cf,LL*s11+2; EF$$+i <   5 ) )#-"332(6124$  @4y@ @5r&c [U5[Ld SU-5eUSS:wd SU-5eX2;aX#$/=oBU'URnXGHPn[U[5(a;Xc:wd SU-5eUR UR X[U555 MT[U[5(aMk[U[5(aPURURX5nUR[R"S5RSU45 M[U5[Ld SU-5eUR!USXS5nUR'US 5n [)U5S:XaSnOURUSX5nURXU45 GMS U$!["a$n [%S US<S U<S U<S U <35U eSn A ff=f)z%Preprocess a single state definition.zwrong state name %rr#zinvalid state name %rzcircular state reference %rrNzwrong rule def %rzuncompilable regex z in state z of z: r)r,reflagsrRrrrrrrrrSrrrrr Exception ValueErrorrrj) rrrrtokensrtdefrrexerrrs r$rRegexLexerMeta._process_statesE{c!@#85#@@!Qx3? 7% ??  # #$&&5!&D$((}K&Ce&KK} c0014T<=$))$((224::{V  rzz"~33T9EF:& B(;d(B B& F((a&@ &&tAw/E4yA~ 22473>K  MM3y1 2C'D  F "&q'5#s"<=BEF Fs<F&& G0GGNc0=o0RU'U=(d URUn[U5HnURX#U5 M U$)z-Preprocess a dictionary of token definitions.) _all_tokensr rr)rr/ tokendefsrrs r$process_tokendefRegexLexerMeta.process_tokendef?sJ,.. OOD)1D!1 )_E   yU ;%r&c0n0nURHnURRS05nUR5HrupVURU5nUc XaU'UR [ 5nXU'M9URUS5nUcMPXgXS-&UR [ 5n X-X%'Mt M U$![ a Mf=f![ a Mf=f)a Merge tokens from superclasses in MRO order, returning a single tokendef dictionary. Any state that is not defined by a subclass will be inherited automatically. States that *are* defined by subclasses will, by default, override that state in the superclass. If a subclass wishes to inherit definitions from a superclass, it can use the special value "inherit", which will cause the superclass' state definition to be included at that point in the state. r Nr)__mro____dict__rEitemsindexrr r) rr  inheritablectoksrrcuritems inherit_ndx new_inh_ndxs r$ get_tokendefsRegexLexerMeta.get_tokendefsGs A::>>(B/D $ !::e,# %*5M!&+kk'&: *5&)ooeT: &7<]3C#(++g"6K*5)BK&9!-B )&! !"s$B<C < C  C  CCcSUR;aV0UlSUl[US5(aUR(aO%UR SUR 55Ul[R"U/UQ70UD6$)z:Instantiate cls after preprocessing its token definitions._tokensrtoken_variantsr) rrrhasattrr#rrr"r,__call__)rrkwdss r$r%RegexLexerMeta.__call__xsk CLL ( COCLs,--#2D2D!222s7H7H7JK }}S040400r&r"r^) r3r4r5r6r7rrrrrrr%r8r"r&r$rrs. /  !AF*X/b 1r&rc>\rSrSrSr\R r0rSSjr Sr g)riz Base for simple stateful regular expression-based lexers. Simplifies the lexing process so that you need only provide a list of states and regular expressions. c#l# SnURn[U5nXESnUGH=upxn U"X5n U (dMUb7[U5[LaX8U R 54v OU"X 5ShvN U R 5nU b[ U [5(a`U HYn U S:Xa#[U5S:aUR5 M*M,U S:XaURUS5 MHURU 5 M[ O][ U [5(a#[U 5[U5:aUSS2 O*XYS2 O%U S:XaURUS5 O SU -5eXESn O8 XS:XaS /nUS nU[S4v US- nGMiU[X4v US- nGM}GN.![a gf=f7f) zf Split ``text`` into (tokentype, text) pairs. ``stack`` is the initial stack (default: ``['root']``) rrrNrrwrong state def: %rr[r)r"rr,r rrrRrrjrrSrabsr rr) rGrVrrr statestack statetokensrexmatchrrmrs r$r_!RegexLexer.get_tokens_unprocesseds LL %[ 2/ /:+)T'1)<:5"%qwwy"88'-d66%%'C ,%i77)2#(F?'*:':(2(8(;%*g%5$.$5$5jn$E$.$5$5e$<*3( 377 #9~Z@$.qrN$.z$:&'1&--jn=K*?)*KK5&/2&? C0;J yD(&,X &/&7 !:t33q udi//1HC_7P"sG8F45F43F!4C4F4) F$ F4 F$F4$ F1.F40F11F4r"N)r) r3r4r5r6r7r MULTILINErr r_r8r"r&r$rrs LLE0F;r&rc(\rSrSrSrSSjrSrSrg)riz1 A helper object that holds lexer position data. NcpXlX lU=(d [U5UlU=(d S/Ulg)Nr)rVrrjrr)rGrVrrrs r$rILexerContext.__init__s* ##d)&vh r&c\SUR<SUR<SUR<S3$)Nz LexerContext(z, ))rVrrrNs r$rOLexerContext.__repr__s IItxx- -r&)rrrrVNN)r3r4r5r6r7rIrOr8r"r&r$rrs' -r&rc"\rSrSrSrSSjrSrg)riz= A RegexLexer that uses a context object to store its state. Nc## URnU(d[US5nUSnOUnX4RSnURnUGHupgnU"XRUR 5n U (dM-Ubo[ U5[La4URXyR54v U R 5UlO)U"X U5ShvN U(dX4RSnUGbH[U[5(aUHn U S:Xa7[UR5S:aURR5 M>M@U S:Xa*URRURS5 MpURRU 5 M O[U[5(aB[U5[UR5:aURSS2 OIURUS2 O9US:Xa)URRURS5 O SU-5eX4RSn O URUR :agXRS :Xa:S/UlUSnUR[ S 4v U=RS- slGMZUR["XR4v U=RS- slGMGN![$a gf=f7f) zg Split ``text`` into (tokentype, text) pairs. If ``context`` is given, use this lexer context instead. rrrrNrrr*r[)r"rrrVrrr,r rrRrrjrrSrr+rrr) rGrVcontextrrr-r.rrr/rs r$r_)ExtendedRegexLexer.get_tokens_unprocessedse LL tQ'C#F+KC#IIbM2K88D/:+)T77CGG41)<:5"%''6779"<<&'eegCG'-ds';;;#,.7 " .F  ,%i77)2#(F?'*399~'9(+ (:%*g%5$'II$4$4SYYr]$C$'II$4$4U$;*3( 377"9~SYY?$'IIabM$'IIij$9&'1II,,SYYr];K*?)*KK5&/ " &> G0;J ww#'')GG},%+H &/&7 !ggtT111  ''5$ww-77GGqLGcE?EE/EE/ EE/EE/ E,)E/+E,,E/c\rSrSrSrSrSrg)ProfilingRegexLexerMetaiz>Metaclass for ProfilingRegexLexer, collects regex timing info.c^^^^[U[5(a*[URURURS9mOUm[ R "TU5m[R4UUUU4SjjnU$)Nrc>TRSRT T 4SS/5n[R"5nTRXU5n[R"5nUS==S- ss'US==Xd- - ss'U$)Nrrr!r) _prof_data setdefaulttimer) rVrendposinfot0rest1rcompiledr rs r$ match_func:ProfilingRegexLexerMeta._process_regex..match_funcsn>>"%00%3xHDB..F3CB GqLG Grw GJr&) rRrrrrrrsysmaxsize)rrrrrWrVr s` ` @@r$r&ProfilingRegexLexerMeta._process_regexs] eU # #EKK #(<<1CC::c6*),  r&r"N)r3r4r5r6r7rr8r"r&r$rKrKs Hr&rKc*\rSrSrSr/rSrSSjrSrg)ProfilingRegexLexerizFDrop-in replacement for RegexLexer that does profiling of its regexes.c#H^# TRRR05 [R TX5ShvN TRRR 5n[ SUR55U4SjSS9n[SU55n[5 [STRR[U5U4-5 [S5 [SS -5 [S 5 UHn[S U-5 M [S5 gN7f) Nc3# UHGuupup4U[U5RS5RSS5SSUSU-SU-U- 4v MI g7f)zu'z\\\NAi)reprrmrZ).0rrnras r$ =ProfilingRegexLexer.get_tokens_unprocessed..s\@/>+FQFQ47==/77EcrJ4!8TAX\3/>sAAc">UTR$r^)_prof_sort_index)r#rGs r$r%.sAd&;&;$ ? i 47IIJ iA /!3 4 i# Hs?D"D CD"r"Nr1) r3r4r5r6r7rNrjr_r8r"r&r$r]r]sPJr&r])6r7rrYrPpip._vendor.pygments.filterrrpip._vendor.pygments.filtersrpip._vendor.pygments.tokenrrrr r pip._vendor.pygments.utilr r r rrrpip._vendor.pygments.regexoptr__all__rrrh staticmethod_default_analyser,r(rrrerrrrrrrrrrrrrrrrrrKr]r"r&r$r~sH =;QQ**3 * **W ,  . 1 1Y"iY"xOeON c  *  u  64  w/d   MF M e1Ye1P^.^B - - EEP=@n,*0Gr&