Ë ú}|b fX×ãóX—dZddlZddlZddlZddlmZmZddlmZddl m Z m Z m Z m Z mZddlmZmZmZmZmZmZddlmZgd¢Zej2d «Zgd ¢Zed „«ZGd „d e«ZGd„de¬«Z Gd„de «Z!Gd„de"«Z#Gd„d«Z$e$«Z%Gd„de&«Z'Gd„d«Z(d„Z)Gd„d«Z*e*«Z+d„Z,Gd„d «Z-Gd!„d"e«Z.Gd#„d$e«Z/Gd%„d&e e/¬«Z0Gd'„d(«Z1Gd)„d*e0«Z2d+„Z3Gd,„d-e/«Z4Gd.„d/e0e4¬«Z5y)0z´ pygments.lexer ~~~~~~~~~~~~~~ Base lexer classes. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. éN)Ú apply_filtersÚFilter)Úget_filter_by_name)ÚErrorÚTextÚOtherÚ WhitespaceÚ _TokenType)Ú get_bool_optÚ get_int_optÚ get_list_optÚmake_analysatorÚFutureÚ guess_decode)Ú regex_opt) ÚLexerÚ RegexLexerÚExtendedRegexLexerÚDelegatingLexerÚ LexerContextÚincludeÚinheritÚbygroupsÚusingÚthisÚdefaultÚwordsÚline_rez.*? ))súutf-8)sÿþzutf-32)sþÿzutf-32be)sÿþzutf-16)sþÿzutf-16becó—y)Nç©)Úxs ú3/usr/lib/python3.12/site-packages/pygments/lexer.pyÚr%"s€¨#ócó—eZdZdZd„Zy)Ú LexerMetaz‚ This metaclass automagically converts ``analyse_text`` methods into static methods which always return float values. có\—d|vrt|d«|d<tj||||«S)NÚ analyse_text)rÚtypeÚ__new__)ÚmcsÚnameÚbasesÚds r$r,zLexerMeta.__new__+s3€Ø ˜QÑ Ü /°°.Ñ0AÓ BˆAˆnÑ Ü�|‰|˜C  u¨aÓ0Ð0r&N)Ú__name__Ú __module__Ú __qualname__Ú__doc__r,r"r&r$r(r(%s „ñó 1r&r(có\—eZdZdZdZgZgZgZgZdZ dZ dZ d„Z d„Z d„Zd„Zd„Zd d „Zd „Zy) raé 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: Lexers included in Pygments may have additional attributes: .. autoattribute:: _example :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 ól—||_t|dd«|_t|dd«|_t|dd«|_t |dd«|_|jdd «|_|jd «xs |j|_g|_ t|d d «D]}|j|«Œy )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`_. ÚstripnlTÚstripallFÚensurenlÚtabsizerÚencodingÚguessÚ inencodingÚfiltersr"N) Úoptionsr r7r8r9r r:Úgetr;r>r Ú add_filter)Úselfr?Úfilter_s r$Ú__init__zLexer.__init__Œsœ€ð&ˆŒ Ü# G¨Y¸Ó=ˆŒ Ü$ W¨j¸%Ó@ˆŒ Ü$ W¨j¸$Ó?ˆŒ Ü" 7¨I°qÓ9ˆŒ ØŸ ™  J°Ó8ˆŒ ØŸ ™  LÓ1ÒB°T·]±]ˆŒ ؈Œ Ü# G¨Y¸Ö;ˆGØ �O‰O˜GÕ $ñz)r?Ú __class__r1©rBs r$Ú__repr__zLexer.__repr__ªs@€Ø �<‹<Ø59·^±^×5LÓ5LØ59·\³\ðCð Cð*¨D¯N©N×,CÑ,CÑCÐ Cr&c ór—t|t«s t|fi|¤Ž}|jj |«y)z8 Add a new stream filter to this lexer. N)Ú isinstancerrr>Úappend)rBrCr?s r$rAzLexer.add_filter±s/€ô˜'¤6Ô*Ü(¨Ñ<°GÑ<ˆGØ � ‰ ×јGÕ$r&có—y)aÁ A static method which is called for lexer guessing. It should analyse the text and return a float in the range from ``0.0`` to ``1.0``. If it returns ``0.0``, the lexer will not be selected as the most probable one, if it returns ``1.0``, it will be selected immediately. This is used by `guess_lexer`. The `LexerMeta` metaclass automatically wraps this function so that it works like a static method (no ``self`` or ``cls`` parameter) and the return value is automatically converted to `float`. If the return value is an object that is boolean `False` it's the same as if the return values was ``0.0``. Nr")Útexts r$r*zLexer.analyse_text¹s�r&cóÊ—t|t«sì|jdk(rt|«\}}ní|jdk(r„ ddl}d}t D]6\}}|j|«sŒ|t|«dj|d«}n|€9|j|dd«}|j|jd«xsd d«}|}nZ|j|j«}|jd «r.|td «d}n|jd «r|td «d}|jd d «}|jd d «}|jr|j«}n|jr|jd «}|j dkDr|j#|j «}|j$r|j'd «s|d z }|S#t $r}t d«|‚d}~wwxYw)zVApply preprocessing such as decoding the input, removing BOM and normalizing newlines.r<ÚchardetrNzkTo enable chardet encoding guessing, please install the chardet library from http://chardet.feedparser.org/Úreplaceir;ruz Ú Ú )rKÚstrr;rrPÚ ImportErrorÚ _encoding_mapÚ startswithÚlenÚdecodeÚdetectr@rQr8Ústripr7r:Ú expandtabsr9Úendswith) rBrNÚ_rPÚeÚdecodedÚbomr;Úencs r$Ú_preprocess_lexer_inputzLexer._preprocess_lexer_inputÊs¼€ô˜$¤Ô$Ø�}‰} Ò'Ü& tÓ,‘�‘aØ—‘ )Ò+ðTÛ"ð �ß%2‘M�C˜Ø—‘ sÕ+Ø"&¤s¨3£x y /×"8Ñ"8¸À9Ó"M˜Ùð&3ð �?Ø!Ÿ.™.¨¨e¨t¨Ó5�CØ"Ÿk™k¨#¯'©'°*Ó*=Ò*HÀØ*3ó5�Gà‘à—{‘{ 4§=¡=Ó1�Ø—?‘? 8Ô,ؤ H£  Ð/‘Dà�‰˜xÔ(ØœC ›M˜NÐ+�ð�|‰|˜F DÓ)ˆØ�|‰|˜D $Ó'ˆØ �=Š=Ø—:‘:“<‰DØ �\Š\Ø—:‘:˜dÓ#ˆDØ �<‰<˜!Ò Ø—?‘? 4§<¡<Ó0ˆDØ �=Š= §¡¨tÔ!4Ø �D‰LˆDàˆ øôI#òTÜ%ð'LóMàRSðTûðTús¿GÇ G"Ç GÇG"cóx‡‡—‰j‰«Šˆˆfd„}|«}|st|‰j‰«}|S)ae 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. c3óN•K—‰j‰«D] \}}}||f–—Œy­w©N)Úget_tokens_unprocessed)r^ÚtÚvrBrNs €€r$Ústreamerz"Lexer.get_tokens..streamer s+øèø€Ø×6Ñ6°tÖ<‘��1�aؘ�d“ ñ=ùsƒ"%)rcrr>)rBrNÚ unfilteredrjÚstreams`` r$Ú get_tokenszLexer.get_tokensùs=ù€ð×+Ñ+¨DÓ1ˆõ ñ“ˆÙÜ" 6¨4¯<©<¸Ó>ˆF؈ r&có—t‚)aS 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)rBrNs r$rgzLexer.get_tokens_unprocesseds €ô"Ð!r&)F)r1r2r3r4r.ÚaliasesÚ filenamesÚalias_filenamesÚ mimetypesÚpriorityÚurlÚ_examplerDrIrAr*rcrmrgr"r&r$rr1se„ñ6ðr €Dð€Gð €Ið€Oð€Ið€Hð €Cð€Hò%ò<Dò%ò ò"-ó^ó0 "r&r)Ú metaclasscó —eZdZdZefd„Zd„Zy)ra  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 ór—|di|¤Ž|_|di|¤Ž|_||_tj|fi|¤Žy©Nr")Ú root_lexerÚlanguage_lexerÚneedlerrD)rBÚ _root_lexerÚ_language_lexerÚ_needler?s r$rDzDelegatingLexer.__init__'s9€Ù%Ñ0¨Ñ0ˆŒÙ-Ñ8°Ñ8ˆÔ؈Œ Ü �‰�tÑ'˜wÓ'r&cól—d}g}g}|jj|«D]N\}}}||jur&|r|jt |«|f«g}||z }Œ;|j|||f«ŒP|r|jt |«|f«t ||j j|««S)NÚ)r|rgr}rLrXÚ do_insertionsr{)rBrNÚbufferedÚ insertionsÚ lng_bufferÚirhris r$rgz&DelegatingLexer.get_tokens_unprocessed-sº€ØˆØˆ ؈ Ø×*Ñ*×AÑAÀ$ÖG‰GˆAˆq�!Ø�D—K‘KÑÙØ×%Ñ%¤s¨8£}°jÐ&AÔBØ!#�JؘA‘ ‘à×!Ñ! 1 a¨ )Õ,ðHñ Ø × Ñ œs 8›}¨jÐ9Ô :ܘZØ!Ÿ_™_×CÑCÀHÓMóOð Or&N)r1r2r3r4rrDrgr"r&r$rrs„ñð>Có(ó Or&rcó—eZdZdZy)rzI Indicates that a state should include rules from another state. N©r1r2r3r4r"r&r$rrDs „ñð r&rcó—eZdZdZd„Zy)Ú_inheritzC Indicates the a state should inherit from its superclass. có—y)Nrr"rHs r$rIz_inherit.__repr__Os€Ør&N)r1r2r3r4rIr"r&r$r‹r‹Ks „ñór&r‹có—eZdZdZd„Zd„Zy)Úcombinedz: Indicates a state combined from multiple states. có.—tj||«Srf)Útupler,)ÚclsÚargss r$r,zcombined.__new__Zs€Ü�}‰}˜S $Ó'Ð'r&có—yrfr")rBr’s r$rDzcombined.__init__]s€à r&N)r1r2r3r4r,rDr"r&r$rŽrŽUs„ñò(ó r&rŽcó:—eZdZdZd„Zd d„Zd d„Zd d„Zd„Zd„Z y) Ú _PseudoMatchz: A pseudo match object constructed from a string. có —||_||_yrf)Ú_textÚ_start)rBÚstartrNs r$rDz_PseudoMatch.__init__gs€ØˆŒ ؈� r&Ncó—|jSrf)r˜©rBÚargs r$r™z_PseudoMatch.startks €Ø�{‰{Ðr&cóF—|jt|j«zSrf)r˜rXr—r›s r$Úendz_PseudoMatch.endns€Ø�{‰{œS §¡›_Ñ,Ð,r&có4—|r td«‚|jS)Nz No such group)Ú IndexErrorr—r›s r$Úgroupz_PseudoMatch.groupqs€Ù ܘ_Ó-Ð -Ø�z‰zÐr&có—|jfSrf)r—rHs r$Úgroupsz_PseudoMatch.groupsvs€Ø— ‘ ˆ}Ðr&có—iSrfr"rHs r$Ú groupdictz_PseudoMatch.groupdictys€Øˆ r&rf) r1r2r3r4rDr™ržr¡r£r¥r"r&r$r•r•bs%„ñòóó-óò ór&r•có‡—dˆfd„ }|S)zL Callback that yields multiple actions for each group in the match. c 3ó¶•K—t‰«D]®\}}|€Œ t|«tur1|j|dz«}|sŒ1|j |dz«||f–—ŒK|j|dz«}|€Œb|r|j |dz«|_||t |j |dz«|«|«D] }|sŒ|–—Œ Œ°|r|j«|_yy­w)Né)Ú enumerater+r r¡r™Úposr•rž)ÚlexerÚmatchÚctxr‡ÚactionÚdataÚitemr’s €r$Úcallbackzbygroups..callback�sÖøèø€Ü" 4ž‰IˆAˆv؈~ØÜ�f“¤Ñ+Ø—{‘{ 1 q¡5Ó)�ÚØŸ+™+ a¨!¡eÓ,¨f°dÐ:Ó:à—{‘{ 1 q¡5Ó)�ØÑ#ÙØ"'§+¡+¨a°!©eÓ"4˜œÙ & uÜ'3°E·K±KÀÀAÁÓ4FÈÓ'MÈsö!T˜âØ"&›Jñ!Tð)ñ Ø—i‘i“kˆC�Gð ùsƒ.callback¶s�øèø€ñà— ‘ ˜eŸm™mÔ,Ø$�U—_‘_Ñ. vÑ.‘à�Ø— ‘ “ ˆAØ4˜2×4Ñ4°U·[±[³]ÑPÀiÔP‘��1�aؘ!‘e˜Q �kÓ!ðQáØŸ)™)›+�•ðùsƒBBc3ó •K—‰ j|j«‰di‰ ¤Ž}|j«}|j|j «fi‰ ¤ŽD]\}}}||z||f–—Œ|r|j «|_yy­wrz)r¹r?r™rgr¡ržrª) r«r¬r­rºr»r‡rhriÚ_otherr¼r½s €€€r$r±zusing..callbackÅs}øèø€à �M‰M˜%Ÿ-™-Ô (ÙÑ!˜&Ñ!ˆBà— ‘ “ ˆAØ4˜2×4Ñ4°U·[±[³]ÑPÀiÔP‘��1�aؘ!‘e˜Q �kÓ!ðQáØŸ)™)›+�•ðùsƒBBrf)ÚpoprKÚlistr�r)r¿r½r»r±r¼s`` @r$rr seú€ð€IØ�&ÑØ �J‰J�wÓ ˆÜ �aœ$¤˜Ô 'Ø!"ˆI�gÒ à"(¨! ˆI�gÑ à ”�~ö &ð2 €O÷ &ð €Or&có—eZdZdZd„Zy)rzÑ 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 có—||_yrf)rµ)rBrµs r$rDzdefault.__init__Ús €Øˆ� r&N)r1r2r3r4rDr"r&r$rrÒs „ñór&rcó—eZdZdZdd„Zd„Zy)rz• Indicates a list of literal words that is transformed into an optimized regex that matches any of the words. .. versionadded:: 2.0 có.—||_||_||_yrf)rÚprefixÚsuffix)rBrrÆrÇs r$rDzwords.__init__ås€ØˆŒ ؈Œ ؈� r&cóZ—t|j|j|j¬«S)N©rÆrÇ)rrrÆrÇrHs r$r@z words.getês€Ü˜Ÿ™¨D¯K©KÀÇ Á ÔLÐLr&N)r‚r‚)r1r2r3r4rDr@r"r&r$rrÞs„ñó ó Mr&rcó<—eZdZdZd„Zd„Zd„Zd„Zd d„Zd„Z d „Z y) ÚRegexLexerMetazw Metaclass for RegexLexer, creates the self._tokens attribute from self.tokens on the first instantiation. có‚—t|t«r|j«}tj||«j S)zBPreprocess the regular expression component of a token definition.)rKrr@ÚreÚcompiler¬)r‘ÚregexÚrflagsrµs r$Ú_process_regexzRegexLexerMeta._process_regexôs.€ä �eœVÔ $Ø—I‘I“KˆEÜ�z‰z˜% Ó(×.Ñ.Ð.r&cóR—t|«tust|«s Jd|›�«‚|S)z5Preprocess the token component of a token definition.z0token type must be simple type or callable, not )r+r Úcallable)r‘Útokens r$Ú_process_tokenzRegexLexerMeta._process_tokenús.€ä�E‹{œjÑ(¬H°U¬Oñ LÙDIÐ Kó LÐ;àˆ r&cóä—t|t«r5|dk(ry||vr|fS|dk(r|S|dddk(rt|dd« SJd|z«‚t|t«rfd|jz}|xjd z c_g}|D]3}||k7s Jd |z«‚|j |j |||««Œ5|||<|fSt|t«r|D]}||vrŒ|d vrŒ Jd |z«‚|SJd |z«‚)z=Preprocess the state transition action of a token definition.ú#popéÿÿÿÿú#pushNéz#pop:zunknown new state %rz_tmp_%dr¨zcircular state ref %r)r×rÙzunknown new state zunknown new state def %r)rKrTÚintrŽÚ_tmpnameÚextendÚ_process_stater�)r‘Ú new_stateÚ unprocessedÚ processedÚ tmp_stateÚitokensÚistates r$Ú_process_new_statez!RegexLexerMeta._process_new_states?€ä �i¤Ô %à˜FÒ"ØØ˜kÑ)Ø!�|Ð#ؘgÒ%Ø Ð Ø˜2˜A� 'Ò)ܘI a b˜MÓ*Ð*Ð*à@Ð4°yÑ@Ó@�uÜ ˜ ¤8Ô ,à! C§L¡LÑ0ˆIØ �LŠL˜AÑ �L؈GÛ#�Ø Ò*ÐLÐ,CÀfÑ,LÓLÐ*Ø—‘˜s×1Ñ1°+Ø2;¸Vó EõFð$ð$+ˆI�iÑ Ø�<Ð Ü ˜ ¤5Ô )ã#�Ø +Ò-ØÐ"3Ò3ð2à(¨6Ñ1ó2ð4ð$ðÐ à @Ð4°yÑ@Ó @�5r&c ó€—t|«tus Jd|z«‚|ddk7s Jd|z«‚||vr||Sgx}||<|j}||D�]?}t|t«r;||k7s Jd|z«‚|j |j ||t|«««ŒOt|t«rŒ`t|t«rO|j|j||«}|jtjd«jd|f«Œ¿t|«tus Jd|z«‚ |j!|d||«}|j'|d «} t)|«dk(rd}n|j|d||«}|j|| |f«�ŒB|S#t"$r } t%d |d›d |›d |›d | ›�«| ‚d} ~ wwxYw)z%Preprocess a single state definition.zwrong state name %rrÚ#zinvalid state name %rzcircular state reference %rr‚Nzwrong rule def %rzuncompilable regex z in state z of z: r¨é)r+rTÚflagsrKrrÝrÞr‹rrårµrLrÍrÎr¬r�rÑÚ ExceptionÚ ValueErrorrÕrX) r‘ràrárµÚtokensrÐÚtdefrßÚrexÚerrrÔs r$rÞzRegexLexerMeta._process_state#sã€ä�E‹{œcÑ!Ð@Ð#8¸5Ñ#@Ó@Ð!Ø�Q‰x˜3ŠÐ?Ð 7¸%Ñ ?Ó?ˆØ �IÑ Ø˜UÑ#Ð #Ø$&Ð&ˆ�˜5Ñ!Ø—‘ˆØ Õ&ˆDܘ$¤Ô(à˜u’}ÐKÐ&CÀeÑ&KÓK�}Ø— ‘ ˜c×0Ñ0°¸iÜ14°T³ó<ô=àܘ$¤Ô)ðܘ$¤Ô(Ø×2Ñ2°4·:±:¸{ÈIÓV� Ø— ‘ œrŸz™z¨"›~×3Ñ3°T¸9ÐEÔFØä˜“:¤Ñ&Ð BÐ(;¸dÑ(BÓ BÐ&ð FØ×(Ñ(¨¨a©°&¸%Ó@�ð ×&Ñ& t¨A¡wÓ/ˆEä�4‹y˜AŠ~Ø ‘ à×2Ñ2°4¸±7Ø3>À óK� ð �M‰M˜3  yÐ1Ö 2ðC'ðDˆ øôò FÝ Ø"& q£'ª5²#±sð"<ó=ØBEðFûð FúsÄ*FÆ F=ÆF8Æ8F=Ncó”—ix}|j|<|xs|j|}t|«D]}|j|||«Œ|S)z-Preprocess a dictionary of token definitions.)Ú _all_tokensrìrÁrÞ)r‘r.Ú tokendefsrárµs r$Úprocess_tokendefzRegexLexerMeta.process_tokendefOsN€à,.Ð.ˆ �C—O‘O DÑ)ØÒ1 §¡¨DÑ!1ˆ ܘ)–_ˆEØ × Ñ ˜y¨)°UÕ ;ð%àÐr&có²—i}i}|jD]¥}|jjdi«}|j«D]t\}}|j|«}|€!|||< |j t «}|||<Œ:|j|d«}|€ŒO||||dz |j t «} || z||<ŒvŒ§|S#t $rYŒ†wxYw#t $rYŒ•wxYw)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__r@ÚitemsÚindexrrërÀ) r‘rìÚ inheritableÚcÚtoksrµr÷ÚcuritemsÚ inherit_ndxÚ new_inh_ndxs r$Ú get_tokendefszRegexLexerMeta.get_tokendefsWs€ðˆØˆ Ø—”ˆAØ—:‘:—>‘> (¨BÓ/ˆDà $§ ¡ ¦ ‘ ��uØ!Ÿ:™: eÓ,�ØÐ#ð %*�F˜5‘Mð!Ø&+§k¡k´'Ó&:˜ ð*5�K Ñ&Øà)Ÿo™o¨e°TÓ:� ØÐ&Øð7<�˜ [°¡]Ð3ðCð#(§+¡+¬gÓ"6�Kð*5°{Ñ)B�K Ò&ñ9!-ððBˆ øô)&ò!Ù ð!ûô"òÙðús$ÁB;ÂC Â; CÃCà CÃCcóè—d|jvrLi|_d|_t|d«r |jrn%|j d|j ««|_tj|g|¢­i|¤ŽS)z:Instantiate cls after preprocessing its token definitions.Ú_tokensrÚtoken_variantsr‚) rörñrÜÚhasattrrrórÿrr+Ú__call__)r‘r’Úkwdss r$rzRegexLexerMeta.__call__ˆsh€à ˜CŸL™LÑ (Ø ˆCŒO؈CŒLÜ�sÐ,Ô-°#×2DÒ2Dàà!×2Ñ2°2°s×7HÑ7HÓ7JÓK�” ä�}‰}˜SÐ0 4Ò0¨4Ñ0Ð0r&rf) r1r2r3r4rÑrÕrårÞrórÿrr"r&r$rËrËîs.„ñò /ò ò !AòF*óXò/ób 1r&rËcó4—eZdZdZej ZiZdd„Zy)rz± 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#ó:K—d}|j}t|«}||d} |D�]&\}}} |||«} | sŒ|�8t|«tur||| j «f–—n||| «Ed{–—†| j «}| �Çt | t«rX| D]R} | dk(r t|«dkDsŒ|j«Œ(| dk(r|j|d«ŒB|j| «ŒTnWt | t«r#t| «t|«k\r|dd…=n*|| d…=n$| dk(r|j|d«n Jd| z«‚||d}n7 ||dk(rd g}|d }|tdf–—|dz }�ŒP|t||f–—|dz }�Œd7�Œ#t$rYywxYw­w) z~ Split ``text`` into (tokentype, text) pairs. ``stack`` is the initial stack (default: ``['root']``) rrØr¨Nr×rÙúwrong state def: %rrRr·)rrÁr+r r¡ržrKr�rXrÀrLrÛÚabsr rr ) rBrNr¶rªròÚ statestackÚ statetokensÚrexmatchr®rßÚmrµs r$rgz!RegexLexer.get_tokens_unprocessed¹sÐèø€ð ˆØ—L‘Lˆ ܘ%“[ˆ Ø  ¨2¡Ñ/ˆ ØÜ/:Ñ+�˜& )Ù˜T 3Ó'�ÚØÐ)Ü ›<¬:Ñ5Ø"% v¨q¯w©w«yÐ"8Ó8á'-¨d°A£×6Ð6ØŸ%™%›'�CØ Ð,ä% i´Ô7Û)2 Ø#(¨F¢?Ü'*¨:£¸Ó':Ø(2¯©Õ(8Ø%*¨gÒ%5Ø$.×$5Ñ$5°jÀ±nÕ$Eà$.×$5Ñ$5°eÕ$<ñ*3ô(¨ ´3Ô7ô # 9›~´°Z³Ò@Ø$.¨q©r¡Nà$.¨y©zÑ$:Ø&¨'Ò1Ø&×-Ñ-¨j¸©nÕ=àKÐ*?À)Ñ*KÓK 5Ø&/° ¸2±Ñ&?˜ ÙðC0;ðJ ؘC‘y DÒ(à&, X˜ Ø&/°Ñ&7˜ Ø!¤:¨tÐ3Ò3ؘq™˜Ù Øœu d¨3¡iÐ/Ò/ؘ1‘H�Cñ_ð7úôP"òÙðüsM‚8F»5FÁ0F Á1>FÂ0B!FÅ F Å2FÅ4F ÆFÆ FÆFÆFÆFN©)r·) r1r2r3r4rÍÚ MULTILINErérìrgr"r&r$rr–s„ñð �L‰L€Eð0€Fô;r&rcó—eZdZdZdd„Zd„Zy)rz9 A helper object that holds lexer position data. Ncó`—||_||_|xs t|«|_|xsdg|_y)Nr·)rNrªrXržr¶)rBrNrªr¶ržs r$rDzLexerContext.__init__üs.€ØˆŒ ؈ŒØÒ#œ#˜d›)ˆŒØÒ&˜v˜hˆ� r&cóV—d|j›d|j›d|j›d�S)Nz LexerContext(z, Ú))rNrªr¶rHs r$rIzLexerContext.__repr__s�à �I‹I�t—x“x §£ð-ð -r&©NN)r1r2r3r4rDrIr"r&r$rr÷s„ñó'ó -r&rcó—eZdZdZdd„Zy)rzE A RegexLexer that uses a context object to store its state. Nc#ó–K—|j}|st|d«}|d}n |}||jd}|j} |D�]Î\}}}|||j|j «} | sŒ)|�lt |«tur5|j|| j«f–—| j «|_n&||| |«Ed{–—†|s||jd}|��5t|t«rŠ|D]„} | dk(r4t|j«dkDsŒ!|jj«Œ<| dk(r)|jj|jd«Œj|jj| «Œ†n‰t|t«rAt|«t|j«k\r|jdd…=nH|j|d…=n8|dk(r)|jj|jd«n Jd|z«‚||jd}nž |j|j k\ry||jd k(r9dg|_|d}|jt d f–—|xjdz c_�Œ;|jt"||jf–—|xjdz c_�Œs7�Œó#t$$rYywxYw­w) z Split ``text`` into (tokentype, text) pairs. If ``context`` is given, use this lexer context instead. rr·rØr¨Nr×rÙrrR)rrr¶rNrªržr+r r¡rKr�rXrÀrLrÛr rrr ) rBrNÚcontextròr­r r r®rßr rµs r$rgz)ExtendedRegexLexer.get_tokens_unprocessed skèø€ð —L‘Lˆ Ùܘt QÓ'ˆCØ# FÑ+‰KàˆCØ# C§I¡I¨b¡MÑ2ˆKØ—8‘8ˆDØÜ/:Ñ+�˜& )Ù˜T 3§7¡7¨C¯G©GÓ4�ÚØÐ)Ü ›<¬:Ñ5Ø"%§'¡'¨6°1·7±7³9Ð"<Ò<Ø&'§e¡e£g˜C�Gá'-¨d°A°sÓ';×;Ð;Ù#,à.7¸¿ ¹ À"¹ Ñ.F  à Ñ,ä% i´Ô7Û)2 Ø#(¨F¢?Ü'*¨3¯9©9£~¸Ó'9Ø(+¯ © ¯ © ­Ø%*¨gÒ%5Ø$'§I¡I×$4Ñ$4°S·Y±Y¸r±]Õ$Cà$'§I¡I×$4Ñ$4°UÕ$;ñ*3ô(¨ ´3Ô7ä" 9›~´°S·Y±Y³Ò?Ø$'§I¡I¨a©b¡Mà$'§I¡I¨i©jÑ$9Ø&¨'Ò1ØŸI™I×,Ñ,¨S¯Y©Y°r©]Õ;àKÐ*?À)Ñ*KÓK 5Ø&/°· ± ¸"± Ñ&>˜ ÙðG0;ðJ Ø—w‘w #§'¡'Ò)ØØ˜CŸG™G‘}¨Ò,à%+ H˜œ Ø&/°Ñ&7˜ Ø!Ÿg™g¤t¨TÐ1Ò1ØŸš 1™ �Ù ØŸ'™'¤5¨$¨s¯w©w©-Ð7Ò7Ø—G’G˜q‘L•Gñcð<úôR"òÙðüs^‚A,K Á/AK ÃJ7ÃA K ÄDK ÈJ:È2K È3A J:É<K É>7J:Ê5K Ê: KËK ËKËK r)r1r2r3r4rgr"r&r$rrs „ñô@r&rc#ó K—t|«} t|«\}}d}d}|D]°\}}}|€|}d} |rx|t|«z|k\rg|| ||z } | r||| f–—|t| «z }|D]\} } } || | f–—|t| «z }Œ||z } t|«\}}|r|t|«z|k\rŒg| t|«ksŒ–|||| df–—|t|«| z z }Œ²|r9|xsd}|D]\}}}|||f–—|t|«z }Œ t|«\}}|rŒ8yy#t$r|Ed{–—†7YywxYw#t$rd}YŒ�wxYw#t$rd}YywxYw­w)ag Helper for lexers which must combine the results of several sublexers. ``insertions`` is a list of ``(index, itokens)`` pairs. Each ``itokens`` iterable should be inserted at position ``index`` into the token stream given by the ``tokens`` argument. The result is a combined token stream. TODO: clean up the code here. NTrF)ÚiterÚnextÚ StopIterationrX)r…rìrørãÚrealposÚinsleftr‡rhriÚoldiÚtmpvalÚit_indexÚit_tokenÚit_valueÚps r$rƒrƒOs¿èø€ô�jÓ!€JðܘjÓ)‰ˆˆwð €GØ€G󉈈1ˆaà ˆ?؈G؈٘!œc !›f™*¨Ò-Ø�t˜E A™IÐ&ˆFÙØ˜q &Ð(Ò(Øœ3˜v›;Ñ&�Û07Ñ,�˜( Hؘx¨Ð1Ò1Øœ3˜x›=Ñ(‘ð18ð˜1‘9ˆDð Ü!% jÓ!1‘��wñ˜!œc !›f™*¨Ó-ð ”#�a“&‹=ؘ1˜a  ˜hÐ&Ò &Ø ”s˜1“v ‘}Ñ $‰Gð+ñ0 à’,˜QˆÛ‰GˆAˆq�!ؘ1˜a�-Ò Ø ”s˜1“vÑ ‰Gðð Ü! *Ó-‰NˆE�7ô øôE òà×ÑÙðûô4!ò Ø�Ùð ûô ò ؈GÙ ð üs�‚ E�D�A*EÂD,ÂEÂ*EÂ9AEÃ?D=Ä EÄEÄD)Ä D#Ä!D)Ä&EÄ(D)Ä)EÄ, D:Ä7EÄ9D:Ä:EÄ= E ÅEÅ E Å Ecó—eZdZdZd„Zy)ÚProfilingRegexLexerMetaz>Metaclass for ProfilingRegexLexer, collects regex timing info.có臇‡‡—t|t«r-t|j|j|j¬«Šn|Št j ‰|«Štjfˆˆˆˆfd„ }|S)NrÉcóþ•—‰jdj‰ ‰ fddg«}tj«}‰j|||«}tj«}|dxxdz cc<|dxx||z z cc<|S)NrØrr!r¨)Ú _prof_dataÚ setdefaultÚtimer¬) rNrªÚendposÚinfoÚt0ÚresÚt1r‘Úcompiledrîrµs €€€€r$Ú match_funcz:ProfilingRegexLexerMeta._process_regex..match_funcšsrø€Ø—>‘> "Ñ%×0Ñ0°%¸°ÀÀ3¸xÓHˆDÜ—‘“ˆBØ—.‘.  s¨FÓ3ˆCÜ—‘“ˆBØ �‹G�q‰L‹GØ �‹G�r˜B‘wÑ ‹G؈Jr&) rKrrrÆrÇrÍrÎÚsysÚmaxsize)r‘rÏrÐrµr1r0rîs` ` @@r$rÑz&ProfilingRegexLexerMeta._process_regex’sZû€Ü �eœUÔ #ܘEŸK™K°· ± Ø#(§<¡<ô1‰CðˆCÜ—:‘:˜c 6Ó*ˆä),¯©÷ ð ðÐr&N)r1r2r3r4rÑr"r&r$r%r%�s „ÙHór&r%có —eZdZdZgZdZdd„Zy)ÚProfilingRegexLexerzFDrop-in replacement for RegexLexer that does profiling of its regexes.éc#óJ‡K—‰jjji«tj ‰||«Ed{–—†‰jjj «}t d„|j«D«ˆfd„d¬«}td„|D««}t«td‰jjt|«|fz«td«tdd z«td «|D]}td |z«Œtd«y7ŒÝ­w) Nc3ó¤K—|]H\\}}\}}|t|«jd«jdd«dd|d|zd|z|z f–—ŒJy­w)zu'z\\Ú\NéAiè)Úreprr[rQ)Ú.0r»ÚrÚnrhs r$Ú z=ProfilingRegexLexer.get_tokens_unprocessed..°saèø€ð@á/>Ñ+™F˜Q ¡F Q¨ðœ4 ›7Ÿ=™=¨Ó/×7Ñ7¸ÀÓEÀcÀrÐJؘ4 !™8 T¨A¡X°¡\ô3á/>ùs‚AAcó"•—|‰jSrf)Ú_prof_sort_index)r#rBs €r$r%z.³sø€ A d×&;Ñ&;Ò$.µsèø€Ð+¡d ˜˜!�¡dùs‚z2Profiling result for %s lexing %d chars in %.3f mszn==============================================================================================================z$%-20s %-64s ncalls tottime percall)rµrÏzn--------------------------------------------------------------------------------------------------------------z%-20s %-65s %5d %8.4f %8.4f) rGr(rLrrgrÀÚsortedr÷ÚsumÚprintr1rX)rBrNr¶Úrawdatar¯Ú sum_totalr0s` r$rgz*ProfilingRegexLexer.get_tokens_unprocessed«súøèø€à �‰×!Ñ!×(Ñ(¨Ô,Ü×4Ñ4°T¸4ÀÓG×GÐGØ—.‘.×+Ñ+×/Ñ/Ó1ˆÜñ@à/6¯}©}¬ó@ó=Ø"ô $ˆô Ñ+¡dÓ+Ó+ˆ ä ŒÜ ÐBØ�~‰~×&Ñ&¬¨D« °9Ð=ñ>ô ?ä ˆiÔÜ Ð4Ð7IÑIÔJÜ ˆiÔÛˆAÜ Ð/°!Ñ3Õ 4ðä ˆiÕð# HúsƒAD#ÁD!ÁCD#Nr)r1r2r3r4r(rArgr"r&r$r5r5¥s„ÙPà€JØÐôr&r5)6r4rÍr2r*Úpygments.filterrrÚpygments.filtersrÚpygments.tokenrrrr r Ú pygments.utilr r r rrrÚpygments.regexoptrÚ__all__rÎrrVÚ staticmethodÚ_default_analyser+r(rrrTrr‹rr�rŽr•rr³rrrrrËrrrrƒr%r5r"r&r$ÚrSsJðñó Û Û ç1Ý/ßEÕE÷*÷*å'ò *€ð ˆ"�*‰*�WÓ €ò,€ ñ  ¡ Ó.Ðô 1�ô 1ôi"�iõi"ôXO�eôOôN ˆcô ÷ññ ‹*€ô  ˆuô  ÷ñò6÷4ññ  ƒw€ò/÷d ñ ô MˆFô Mô e1�Yôe1ôP^� .õ^÷B -ñ -ô E˜ôEòP=ô@˜nôô,˜*Ð0Gör&