ó
    Þ jŠ  ã                   óF  • S r SSKrSSKrSSKrSSKJrJr  SSKJr  SSK	J
r
JrJrJrJr  SSKJrJrJrJrJrJr  SSKJr  / SQr\R2                  " S	5      r/ S
Qr\" S 5      r " S S\5      r " S S\S9r  " S S\ 5      r! " S S\"5      r# " S S5      r$\$" 5       r% " S S\&5      r' " S S5      r(S r) " S S5      r*\*" 5       r+S r, " S S 5      r- " S! S"\5      r. " S# S$\5      r/ " S% S&\ \/S9r0 " S' S(5      r1 " S) S*\05      r2S+ r3 " S, S-\/5      r4 " S. S/\0\4S9r5g)0z 
pygments.lexer
~~~~~~~~~~~~~~

Base lexer classes.

:copyright: Copyright 2006-2024 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   ï»¿zutf-8)s   ÿþ  zutf-32)s     þÿzutf-32be)s   ÿþzutf-16)s   þÿzutf-16bec                 ó   • g)Nç        © )Úxs    ÚT/var/www/html/gaurav/venv/lib/python3.13/site-packages/pip/_vendor/pygments/lexer.pyÚ<lambda>r$   "   s   € ¨#ó    c                   ó   • \ rS rSrSrS rSrg)Ú	LexerMetaé%   zv
This metaclass automagically converts ``analyse_text`` methods into
static methods which always return float values.
c                 ó\   • SU;   a  [        US   5      US'   [        R                  XX#5      $ )NÚanalyse_text)r   ÚtypeÚ__new__)ÚmcsÚnameÚbasesÚds       r#   r,   ÚLexerMeta.__new__+   s/   € Ø˜QÓÜ /°°.Ñ0AÓ BˆAˆnÑÜ�|‰|˜C uÓ0Ð0r%   r!   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r,   Ú__static_attributes__r!   r%   r#   r'   r'   %   s   † ñõ
1r%   r'   c                   ój   • \ rS rSrSrSr/ r/ r/ r/ r	Sr
SrSrSrS rS rS rS rS	 rSS
 jrS rSrg)r   é1   an  
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 two additional attributes:

.. autoattribute:: url
   :no-value:
.. autoattribute:: version_added
   :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.
Nr   c                 óx  • Xl         [        USS5      U l        [        USS5      U l        [        USS5      U l        [        USS5      U l        UR                  SS	5      U l        UR                  S
5      =(       d    U R                  U l        / U l	        [        USS5       H  nU R                  U5        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`_.
ÚstripnlTÚstripallFÚensurenlÚtabsizer   ÚencodingÚguessÚ
inencodingÚfiltersr!   N)Úoptionsr   r;   r<   r=   r   r>   Úgetr?   rB   r   Ú
add_filter)ÚselfrC   Úfilter_s      r#   Ú__init__ÚLexer.__init__‘   sš   € ð& ŒÜ# G¨Y¸Ó=ˆŒÜ$ W¨j¸%Ó@ˆŒÜ$ W¨j¸$Ó?ˆŒÜ" 7¨I°qÓ9ˆŒØŸ™ J°Ó8ˆŒØŸ™ LÓ1×B°T·]±]ˆŒØˆŒÜ# G¨Y¸Ö;ˆGØ�O‰O˜GÖ$ò <r%   c                 ó¨   • U R                   (       a(  SU R                  R                   SU R                   < S3$ SU R                  R                   S3$ )Nz<pygments.lexers.z with Ú>)rC   Ú	__class__r2   ©rF   s    r#   Ú__repr__ÚLexer.__repr__¯   sI   € Ø�<�<Ø& t§~¡~×'>Ñ'>Ð&?¸vÀdÇlÁlÑEUÐUVÐWÐWà& t§~¡~×'>Ñ'>Ð&?¸qÐAÐAr%   c                 ó|   • [        U[        5      (       d  [        U40 UD6nU R                  R	                  U5        g)z(
Add a new stream filter to this lexer.
N)Ú
isinstancer   r   rB   Úappend)rF   rG   rC   s      r#   rE   ÚLexer.add_filterµ   s2   € ô ˜'¤6×*Ñ*Ü(¨Ñ<°GÑ<ˆGØ�‰×Ñ˜GÕ$r%   c                 ó   • g)aa  
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*   ÚLexer.analyse_text½   s   � r%   c                 ó&  • [        U[        5      (       dz  U R                  S:X  a  [        U5      u  pO€U R                  S:X  a   [	        S5      eUR                  U R                  5      nUR                  S5      (       a  U[        S5      S nO$UR                  S5      (       a  U[        S5      S nUR                  SS5      nUR                  S	S5      nU R                  (       a  UR                  5       nO"U R                  (       a  UR                  S5      nU R                   S
:”  a  UR#                  U R                   5      nU R$                  (       a  UR'                  S5      (       d  US-  nU$ ! [         a  n[	        S5      UeSnAff = f)zVApply preprocessing such as decoding the input, removing BOM and normalizing newlines.r@   Úchardetzchardet is not vendored by pipzkTo enable chardet encoding guessing, please install the chardet library from http://chardet.feedparser.org/Nu   ï»¿z
Ú
Úr   )rQ   Ústrr?   r   ÚImportErrorÚ_encoding_mapÚ
startswithÚlenÚdecoderX   ÚdetectrD   Úreplacer<   Ústripr;   r>   Ú
expandtabsr=   Úendswith)rF   rU   Ú_ÚeÚdecodedÚbomr?   Úencs           r#   Ú_preprocess_lexer_inputÚLexer._preprocess_lexer_inputÎ   sU  € ô ˜$¤×$Ñ$Ø�}‰} Ó'Ü& tÓ,‘��aØ—‘ )Ó+ðTô &Ð&FÓGÐGð$ —{‘{ 4§=¡=Ó1�Ø—?‘? 8×,Ñ,Ø¤ H£ Ð/�Døà�‰˜x×(Ñ(ØœC ›M˜NÐ+�ð �|‰|˜F DÓ)ˆØ�|‰|˜D $Ó'ˆØ�=�=Ø—:‘:“<‰DØ�\�\Ø—:‘:˜dÓ#ˆDØ�<‰<˜!ÓØ—?‘? 4§<¡<Ó0ˆDØ�=�= §¡¨t×!4Ñ!4Ø�D‰LˆDàˆøôI #ó TÜ%ð 'Ló MàRSðTûðTús   ÁE5 Å5
FÅ?FÆFc                 ó„   ^ ^• T R                  T5      mU U4S jnU" 5       nU(       d  [        UT R                  T 5      nU$ )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.
c               3   óN   >#   • TR                  T5       H  u  pnX4v •  M     g 7f©N)Úget_tokens_unprocessed)rf   ÚtÚvrF   rU   s      €€r#   ÚstreamerÚ"Lexer.get_tokens.<locals>.streamer  s&   øé € Ø×6Ñ6°tÖ<‘��aØ�d”
ò =ùs   ƒ"%)rk   r   rB   )rF   rU   Ú
unfilteredrs   Ústreams   ``   r#   Ú
get_tokensÚLexer.get_tokensÿ   s=   ù€ ð ×+Ñ+¨DÓ1ˆö	ñ “ˆÞÜ" 6¨4¯<©<¸Ó>ˆFØˆr%   c                 ó   • [         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)rF   rU   s     r#   rp   ÚLexer.get_tokens_unprocessed  s
   € ô "Ð!r%   )r?   r=   rB   rC   r<   r;   r>   )F)r2   r3   r4   r5   r6   r.   ÚaliasesÚ	filenamesÚalias_filenamesÚ	mimetypesÚpriorityÚurlÚversion_addedÚ_examplerH   rN   rE   r*   rk   rw   rp   r7   r!   r%   r#   r   r   1   sl   † ñ8ðv €Dð €Gð
 €Ið €Oð €Ið €Hð €Cð €Mð €Hò%ò<Bò%òò"/ôbõ0	"r%   r   )Ú	metaclassc                   ó*   • \ rS rSrSr\4S jrS rSrg)r   i#  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                 ór   • U" S0 UD6U l         U" S0 UD6U l        X0l        [        R                  " U 40 UD6  g ©Nr!   )Ú
root_lexerÚlanguage_lexerÚneedler   rH   )rF   Ú_root_lexerÚ_language_lexerÚ_needlerC   s        r#   rH   ÚDelegatingLexer.__init__-  s7   € Ù%Ñ0¨Ñ0ˆŒÙ-Ñ8°Ñ8ˆÔØŒÜ�Š�tÑ'˜wÓ'r%   c                 ó€  • Sn/ n/ nU R                   R                  U5       HR  u  pVnX`R                  L a+  U(       a  UR                  [	        U5      U45        / nX'-  nM?  UR                  XVU45        MT     U(       a  UR                  [	        U5      U45        [        UU R                  R                  U5      5      $ )NÚ )r‰   rp   rŠ   rR   r_   Údo_insertionsrˆ   )rF   rU   ÚbufferedÚ
insertionsÚ
lng_bufferÚirq   rr   s           r#   rp   Ú&DelegatingLexer.get_tokens_unprocessed3  s²   € ØˆØˆ
Øˆ
Ø×*Ñ*×AÑAÀ$ÖG‰GˆA�!Ø—K‘KÒÞØ×%Ñ%¤s¨8£}°jÐ&AÔBØ!#�JØ‘’à×!Ñ! 1¨ )Ö,ñ Hö Ø×Ñœs 8›}¨jÐ9Ô:Ü˜ZØ!Ÿ_™_×CÑCÀHÓMóOð 	Or%   )r‰   rŠ   rˆ   N)	r2   r3   r4   r5   r6   r   rH   rp   r7   r!   r%   r#   r   r   #  s   † ñð >Cô (õOr%   r   c                   ó   • \ rS rSrSrSrg)r   iJ  zA
Indicates that a state should include rules from another state.
r!   N©r2   r3   r4   r5   r6   r7   r!   r%   r#   r   r   J  s   † ñò 	r%   r   c                   ó   • \ rS rSrSrS rSrg)Ú_inheritiQ  z;
Indicates the a state should inherit from its superclass.
c                 ó   • g)Nr   r!   rM   s    r#   rN   Ú_inherit.__repr__U  s   € Ør%   r!   N)r2   r3   r4   r5   r6   rN   r7   r!   r%   r#   rš   rš   Q  s   † ñõr%   rš   c                   ó$   • \ rS rSrSrS rS rSrg)Úcombinedi[  z2
Indicates a state combined from multiple states.
c                 ó,   • [         R                  X5      $ ro   )Útupler,   )ÚclsÚargss     r#   r,   Úcombined.__new__`  s   € Ü�}‰}˜SÓ'Ð'r%   c                 ó   • g ro   r!   )rF   r¢   s     r#   rH   Úcombined.__init__c  s   € àr%   r!   N)r2   r3   r4   r5   r6   r,   rH   r7   r!   r%   r#   rž   rž   [  s   † ñò(õr%   rž   c                   óH   • \ rS rSrSrS rSS jrSS jrSS jrS r	S	 r
S
rg)Ú_PseudoMatchih  z2
A pseudo match object constructed from a string.
c                 ó   • X l         Xl        g ro   )Ú_textÚ_start)rF   ÚstartrU   s      r#   rH   Ú_PseudoMatch.__init__m  s   € ØŒ
Ø�r%   Nc                 ó   • U R                   $ ro   )rª   ©rF   Úargs     r#   r«   Ú_PseudoMatch.startq  s   € Ø�{‰{Ðr%   c                 óF   • U R                   [        U R                  5      -   $ ro   )rª   r_   r©   r®   s     r#   ÚendÚ_PseudoMatch.endt  s   € Ø�{‰{œS §¡›_Ñ,Ð,r%   c                 ó>   • U(       a  [        S5      eU R                  $ )NzNo such group)Ú
IndexErrorr©   r®   s     r#   ÚgroupÚ_PseudoMatch.groupw  s   € ÞÜ˜_Ó-Ð-Ø�z‰zÐr%   c                 ó   • U R                   4$ ro   )r©   rM   s    r#   ÚgroupsÚ_PseudoMatch.groups|  s   € Ø—
‘
ˆ}Ðr%   c                 ó   • 0 $ ro   r!   rM   s    r#   Ú	groupdictÚ_PseudoMatch.groupdict  s   € Øˆ	r%   )rª   r©   ro   )r2   r3   r4   r5   r6   rH   r«   r²   r¶   r¹   r¼   r7   r!   r%   r#   r§   r§   h  s%   † ñòôô-ôò
õr%   r§   c                  ó   ^ • SU 4S jjnU$ )zD
Callback that yields multiple actions for each group in the match.
c           
   3   óò  >#   • [        T5       HÆ  u  p4Uc  M
  [        U5      [        L a7  UR                  US-   5      nU(       a  UR	                  US-   5      XE4v •  MQ  MS  UR                  US-   5      nUc  Ml  U(       a  UR	                  US-   5      Ul        U" U [        UR	                  US-   5      U5      U5       H  nU(       d  M  Uv •  M     MÈ     U(       a  UR                  5       Ul        g g 7f)Né   )Ú	enumerater+   r
   r¶   r«   Úposr§   r²   )ÚlexerÚmatchÚctxr•   ÚactionÚdataÚitemr¢   s          €r#   ÚcallbackÚbygroups.<locals>.callback‡  sÚ   øé € Ü" 4ž‰IˆAØ‰~ÙÜ�f“¤Ò+Ø—{‘{ 1 q¡5Ó)�ÞØŸ+™+ a¨!¡eÓ,¨fÐ:Ô:ñ ð —{‘{ 1 q¡5Ó)�ØÓ#ÞØ"'§+¡+¨a°!©eÓ"4˜œÙ & uÜ'3°E·K±KÀÀAÁÓ4FÈÓ'MÈsö!T˜ç˜4Ø"&œJó!Tñ )ö  Ø—i‘i“kˆC�Gð ùs   ƒA4C7Á;AC7Ã*C7ro   r!   )r¢   rÉ   s   ` r#   r   r   ƒ  s   ø€ ÷"ð& €Or%   c                   ó   • \ rS rSrSrSrg)Ú_Thisi�  zL
Special singleton used for indicating the caller class.
Used by ``using``.
r!   Nr˜   r!   r%   r#   rÌ   rÌ   �  s   † ôr%   rÌ   c                 óÊ   ^ ^^• 0 mST;   a9  TR                  S5      n[        U[        [        45      (       a  UTS'   OSU4TS'   T [        L a  SUU4S jjnU$ SU UU4S jjnU$ )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`.
ÚstateÚstackÚrootc              3   ó<  >#   • T	(       a.  T	R                  U R                  5        U R                  " S0 T	D6nOU nUR                  5       nUR                  " UR                  5       40 TD6 H  u  pVnXT-   Xg4v •  M     U(       a  UR                  5       Ul        g g 7fr‡   )ÚupdaterC   rL   r«   rp   r¶   r²   rÂ   )
rÃ   rÄ   rÅ   ÚlxÚsr•   rq   rr   Ú	gt_kwargsÚkwargss
           €€r#   rÉ   Úusing.<locals>.callback¼  s‚   øé € ö à—‘˜eŸm™mÔ,Ø—_’_Ñ. vÑ.‘à�Ø—‘“ˆAØ×4Ò4°U·[±[³]ÑPÀiÔP‘��aØ‘e˜Q�kÔ!ñ QæØŸ)™)›+�•ð ùs   ƒBBc              3   ó  >#   • T
R                  U R                  5        T" S0 T
D6nUR                  5       nUR                  " UR	                  5       40 T	D6 H  u  pVnXT-   Xg4v •  M     U(       a  UR                  5       Ul        g g 7fr‡   )rÒ   rC   r«   rp   r¶   r²   rÂ   )rÃ   rÄ   rÅ   rÓ   rÔ   r•   rq   rr   Ú_otherrÕ   rÖ   s           €€€r#   rÉ   r×   Ë  st   øé € à�M‰M˜%Ÿ-™-Ô(ÙÑ!˜&Ñ!ˆBà—‘“ˆAØ×4Ò4°U·[±[³]ÑPÀiÔP‘��aØ‘e˜Q�kÔ!ñ QæØŸ)™)›+�•ð ùs   ƒBBro   )ÚpoprQ   Úlistr    r   )rÙ   rÖ   rÔ   rÉ   rÕ   s   ``  @r#   r   r   ¦  sr   ú€ ð €IØ�&ÓØ�J‰J�wÓˆÜ�aœ$¤˜×'Ñ'Ø!"ˆI�gÒà"(¨! ˆI�gÑà”‚~÷	&ð 	&ð2 €O÷		&ñ 		&ð €Or%   c                   ó   • \ rS rSrSrS rSrg)r   iØ  z½
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                 ó   • Xl         g ro   ©rÎ   )rF   rÎ   s     r#   rH   Údefault.__init__à  s   € Ø�
r%   rÞ   N)r2   r3   r4   r5   r6   rH   r7   r!   r%   r#   r   r   Ø  s   † ñõr%   r   c                   ó(   • \ rS rSrSrSS jrS rSrg)r   iä  z…
Indicates a list of literal words that is transformed into an optimized
regex that matches any of the words.

.. versionadded:: 2.0
c                 ó(   • Xl         X l        X0l        g ro   )r   ÚprefixÚsuffix)rF   r   râ   rã   s       r#   rH   Úwords.__init__ë  s   € ØŒ
ØŒØ�r%   c                 óT   • [        U R                  U R                  U R                  S9$ )N©râ   rã   )r   r   râ   rã   rM   s    r#   rD   Ú	words.getð  s   € Ü˜Ÿ™¨D¯K©KÀÇÁÑLÐLr%   )râ   rã   r   N)r�   r�   )r2   r3   r4   r5   r6   rH   rD   r7   r!   r%   r#   r   r   ä  s   † ñôõ
Mr%   r   c                   óF   • \ rS rSrSrS rS rS rS rSS jr	S	 r
S
 rSrg)ÚRegexLexerMetaiô  zk
Metaclass for RegexLexer, creates the self._tokens attribute from
self.tokens on the first instantiation.
c                 óŒ   • [        U[        5      (       a  UR                  5       n[        R                  " X5      R
                  $ )zBPreprocess the regular expression component of a token definition.)rQ   r   rD   ÚreÚcompilerÄ   )r¡   ÚregexÚrflagsrÎ   s       r#   Ú_process_regexÚRegexLexerMeta._process_regexú  s/   € ä�eœV×$Ñ$Ø—I‘I“KˆEÜ�zŠz˜%Ó(×.Ñ.Ð.r%   c                 ó`   • [        U5      [        L d  [        U5      (       d   SU< 35       eU$ )z5Preprocess the token component of a token definition.z0token type must be simple type or callable, not )r+   r
   Úcallable)r¡   Útokens     r#   Ú_process_tokenÚRegexLexerMeta._process_token   s4   € ä�E‹{œjÒ(¬H°U¯O©Oð 	IØ>¸u¹iÐHó	IÐ;àˆr%   c                 ó  • [        U[        5      (       a:  US:X  a  gX;   a  U4$ US:X  a  U$ USS S:X  a  [        USS 5      * $  SU< 35       e[        U[        5      (       ag  SU R                  -  nU =R                  S	-  sl        / nU H4  nXa:w  d   S
U< 35       eUR                  U R                  UX65      5        M6     XSU'   U4$ [        U[        5      (       a"  U H  nXb;   a  M
  US;   a  M   SU-   5       e   U$  SU< 35       e)z=Preprocess the state transition action of a token definition.ú#popéÿÿÿÿú#pushNé   z#pop:zunknown new state z_tmp_%drÀ   zcircular state ref )r÷   rù   zunknown new state def )rQ   r[   Úintrž   Ú_tmpnameÚextendÚ_process_stater    )r¡   Ú	new_stateÚunprocessedÚ	processedÚ	tmp_stateÚitokensÚistates          r#   Ú_process_new_stateÚ!RegexLexerMeta._process_new_state  sD  € ä�i¤×%Ñ%à˜FÓ"ØØÓ)Ø!�|Ð#Ø˜gÓ%Ø Ð Ø˜2˜A� 'Ó)Ü˜I a b˜MÓ*Ð*Ð*à@Ð 2°9±-Ð@Ó@�uÜ˜	¤8×,Ñ,à! C§L¡LÑ0ˆIØ�LŠL˜AÑ�LØˆGÛ#�ØÓ*ÐLÐ.AÀ&ÁÐ,LÓLÐ*Ø—‘˜s×1Ñ1°+Ø2;ó Eö Fñ $ð $+�iÑ Ø�<ÐÜ˜	¤5×)Ñ)ã#�ØÕ-ØÐ"3Õ3ð2à(¨6Ñ1ó2ð 4ñ $ð Ðà@Ð2°9±-Ð@Ó@�5r%   c                 óº  • [        U[        5      (       d   SU< 35       eUS   S:w  d   SU< 35       eX2;   a  X#   $ / =oBU'   U R                  nX    GHR  n[        U[        5      (       a<  Xc:w  d   SU< 35       eUR	                  U R                  X[        U5      5      5        MU  [        U[        5      (       a  Ml  [        U[        5      (       aP  U R                  UR                  X5      nUR                  [        R                  " S5      R                  SU45        MÑ  [        U5      [        L d   SU< 35       e U R!                  US   XS5      nU R'                  US   5      n
[)        U5      S:X  a  SnOU R                  US   X5      nUR                  XŠU45        GMU     U$ ! ["         a#  n	[%        S	US   < S
U< SU < SU	 35      U	eSn	A	ff = f)z%Preprocess a single state definition.zwrong state name r   Ú#zinvalid state name zcircular state reference r�   Nzwrong rule def zuncompilable regex z
 in state z of z: rÀ   é   )rQ   r[   Úflagsr   rý   rþ   rš   r   r  rÎ   rR   rë   rì   rÄ   r+   r    rï   Ú	ExceptionÚ
ValueErrorrô   r_   )r¡   r   r  rÎ   Útokensrî   Útdefrÿ   ÚrexÚerrró   s              r#   rþ   ÚRegexLexerMeta._process_state)  sï  € ä˜%¤×%Ñ%ÐDÐ):¸5¹)Ð'DÓDÐ%Ø�Q‰x˜3‹Ð?Ð"5°e±YÐ ?Ó?ˆØÓØÑ#Ð#Ø$&Ð&ˆ˜5Ñ!Ø—‘ˆØÕ&ˆDÜ˜$¤×(Ñ(à“}ÐKÐ(AÀ%ÁÐ&KÓK�}Ø—‘˜c×0Ñ0°Ü14°T³ó<ô =áÜ˜$¤×)Ñ)ñ Ü˜$¤×(Ñ(Ø×2Ñ2°4·:±:¸{ÓV�	Ø—‘œrŸzšz¨"›~×3Ñ3°T¸9ÐEÔFÙä˜“:¤Ò&ÐB¨/¸$¹Ð(BÓBÐ&ðrØ×(Ñ(¨¨a©°&Ó@�ð ×&Ñ& t¨A¡wÓ/ˆEä�4‹y˜A‹~Ø ‘	à×2Ñ2°4¸±7Ø3>óK�	ð �M‰M˜3 yÐ1×2ñA 'ðB ˆøô ó rÜ Ð#6°t¸A±w±kÀÈEÉ9ÐTXÐY\ÑX_Ð_aÐbeÐafÐ!gÓhÐnqÐqûðrús   ÅF-Æ-
GÆ7GÇGNc                 óž   • 0 =o0R                   U'   U=(       d    U R                  U   n[        U5       H  nU R                  X#U5        M     U$ )z-Preprocess a dictionary of token definitions.)Ú_all_tokensr  rÛ   rþ   )r¡   r.   Ú	tokendefsr  rÎ   s        r#   Úprocess_tokendefÚRegexLexerMeta.process_tokendefT  sJ   € à,.Ð.ˆ	—O‘O DÑ)Ø×1 §¡¨DÑ!1ˆ	Ü˜)–_ˆEØ×Ñ˜y°UÖ;ñ %àÐr%   c                 ó¼  • 0 n0 nU R                    H¥  nUR                  R                  S0 5      nUR                  5        Hr  u  pVUR                  U5      nUc   XaU'    UR	                  [
        5      nX‚U'   M9  UR                  US5      nUc  MP  XgXˆS-   &  UR	                  [
        5      n	X‰-   X%'   Mt     M§     U$ ! [         a     M‰  f = f! [         a     Mš  f = 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__rD   ÚitemsÚindexr   r  rÚ   )
r¡   r  ÚinheritableÚcÚtoksrÎ   r  ÚcuritemsÚinherit_ndxÚnew_inh_ndxs
             r#   Úget_tokendefsÚRegexLexerMeta.get_tokendefs\  sø   € ð ˆØˆØ—”ˆAØ—:‘:—>‘> (¨BÓ/ˆDà $§
¡
¦‘�Ø!Ÿ:™: eÓ,�ØÑ#ð
 %*˜5‘Mð!Ø&+§k¡k´'Ó&:˜ð *5 Ñ&Ùà)Ÿo™o¨e°TÓ:�ØÑ&Ùð 7<˜°¡]Ð3ðCð #(§+¡+¬gÓ"6�Kð *5Ñ)B�KÓ&ó9 !-ñ ðB ˆøô) &ó !Ú ð!ûô "ó Úðús$   ÁB<ÂCÂ<
C
Ã	C
Ã
CÃCc                 ó  • SU R                   ;  aV  0 U l        SU l        [        U S5      (       a  U R                  (       a  O%U R                  SU R                  5       5      U l        [        R                  " U /UQ70 UD6$ )z:Instantiate cls after preprocessing its token definitions.Ú_tokensr   Útoken_variantsr�   )
r  r  rü   Úhasattrr&  r  r"  r%  r+   Ú__call__)r¡   r¢   Úkwdss      r#   r(  ÚRegexLexerMeta.__call__�  sk   € à˜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%   r!   ro   )r2   r3   r4   r5   r6   rï   rô   r  rþ   r  r"  r(  r7   r!   r%   r#   ré   ré   ô  s.   † ñò
/òò!AòF)ôVò/õb1r%   ré   c                   ó>   • \ rS rSrSr\R                  r0 rSS jr	Sr
g)r   i›  z¡
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              #   ón  #   • SnU R                   n[        U5      nXES      n U GH>  u  pxn	U" X5      n
U
(       d  M  Ub7  [        U5      [        L a  X8U
R	                  5       4v •  OU" X
5       Sh  v•N   U
R                  5       nU	bÚ  [        U	[        5      (       a`  U	 HY  nUS:X  a#  [        U5      S:”  a  UR                  5         M*  M,  US:X  a  UR                  US   5        MH  UR                  U5        M[     O^[        U	[        5      (       a#  [        U	5      [        U5      :¼  a  USS2	 O+XYS2	 O&U	S:X  a  UR                  US   5        O SU	< 35       eXES      n  O8    X   S:X  a  S	/nUS	   nU[        S4v •  US-  nGMj  U[        X   4v •  US-  nGM~   GN/! [         a     gf = f7f)
zf
Split ``text`` into (tokentype, text) pairs.

``stack`` is the initial stack (default: ``['root']``)
r   rø   rÀ   Nr÷   rù   úwrong state def: rY   rÐ   )r%  rÛ   r+   r
   r¶   r²   rQ   r    r_   rÚ   rR   rû   Úabsr	   r   rµ   )rF   rU   rÏ   rÂ   r  Ú
statestackÚstatetokensÚrexmatchrÆ   rÿ   ÚmrÎ   s               r#   rp   Ú!RegexLexer.get_tokens_unprocessed¾  sÌ  é € ð ˆØ—L‘Lˆ	Ü˜%“[ˆ
Ø¨2¡Ñ/ˆØÜ/:Ñ+� )Ù˜TÓ'�ß�1ØÑ)Ü ›<¬:Ò5Ø"%¨q¯w©w«yÐ"8Ó8á'-¨d£×6Ð6ØŸ%™%›'�CØ Ñ,ä% i´×7Ñ7Û)2 Ø#(¨F£?Ü'*¨:£¸Ó':Ø(2¯©Ö(8ñ (;à%*¨gÓ%5Ø$.×$5Ñ$5°jÀ±nÖ$Eà$.×$5Ñ$5°eÖ$<ò *3ô (¨	´3×7Ñ7ô  # 9›~´°Z³Ó@Ø$.¨q©r¡Nà$.©zÑ$:Ø&¨'Ó1Ø&×-Ñ-¨j¸©nÕ=àKÐ,=¸i¹]Ð*KÓK 5Ø&/¸2±Ñ&?˜ÙñC 0;ðJØ‘y DÓ(à&, X˜
Ø&/°Ñ&7˜Ø!¤:¨tÐ3Ò3Ø˜q™˜Ú Øœu d¡iÐ/Ò/Ø˜1‘H�Cò_ ò 7øôP "ó ÙðüsG   ‚8F5¾5F5Á3F"Á4C5F5Å* F% Æ
F5ÆF% ÆF5Æ%
F2Æ/F5Æ1F2Æ2F5r!   N©)rÐ   )r2   r3   r4   r5   r6   rë   Ú	MULTILINEr
  r  rp   r7   r!   r%   r#   r   r   ›  s   † ñð �L‰L€Eð0 €F÷;r%   r   c                   ó(   • \ rS rSrSrSS jrS rSrg)r   iü  z1
A helper object that holds lexer position data.
Nc                 óp   • Xl         X l        U=(       d    [        U5      U l        U=(       d    S/U l        g )NrÐ   )rU   rÂ   r_   r²   rÏ   )rF   rU   rÂ   rÏ   r²   s        r#   rH   ÚLexerContext.__init__  s*   € ØŒ	ØŒØ×#œ#˜d›)ˆŒØ×&˜v˜hˆ�
r%   c                 ó\   • SU R                   < SU R                  < SU R                  < S3$ )NzLexerContext(z, Ú))rU   rÂ   rÏ   rM   s    r#   rN   ÚLexerContext.__repr__  s)   € Ø˜tŸy™y™m¨2¨d¯h©h©\¸¸D¿J¹J¹>ÈÐKÐKr%   )r²   rÂ   rÏ   rU   ©NN)r2   r3   r4   r5   r6   rH   rN   r7   r!   r%   r#   r   r   ü  s   † ñô'õLr%   r   c                   ó"   • \ rS rSrSrSS jrSrg)r   i  z=
A RegexLexer that uses a context object to store its state.
Nc              #   óà  #   • U R                   nU(       d  [        US5      nUS   nOUnX4R                  S      nUR                  n U GHë  u  pgnU" XR                  UR
                  5      n	U	(       d  M-  Ubo  [        U5      [        L a4  UR                  XyR                  5       4v •  U	R                  5       Ul        O)U" X	U5       Sh  v•N   U(       d  X4R                  S      nUGbI  [        U[        5      (       a’  U H‹  n
U
S:X  a7  [        UR                  5      S:”  a  UR                  R                  5         M>  M@  U
S:X  a*  UR                  R                  UR                  S   5        Mp  UR                  R                  U
5        M�     O‘[        U[        5      (       aB  [        U5      [        UR                  5      :¼  a  UR                  SS2	 OJUR                  US2	 O:US:X  a)  UR                  R                  UR                  S   5        O SU< 35       eX4R                  S      n  O     UR                  UR
                  :¼  a  gXR                     S	:X  a:  S/Ul        US   nUR                  [         S	4v •  U=R                  S-  sl        GM[  UR                  ["        XR                     4v •  U=R                  S-  sl        GM“   GN! [$         a     gf = f7f)
zg
Split ``text`` into (tokentype, text) pairs.
If ``context`` is given, use this lexer context instead.
r   rÐ   rø   rÀ   Nr÷   rù   r-  rY   )r%  r   rÏ   rU   rÂ   r²   r+   r
   r¶   rQ   r    r_   rÚ   rR   rû   r.  r   r   rµ   )rF   rU   Úcontextr  rÅ   r0  r1  rÆ   rÿ   r2  rÎ   s              r#   rp   Ú)ExtendedRegexLexer.get_tokens_unprocessed  sg  é € ð
 —L‘Lˆ	ÞÜ˜t QÓ'ˆCØ# FÑ+‰KàˆCØ#§I¡I¨b¡MÑ2ˆKØ—8‘8ˆDØÜ/:Ñ+� )Ù˜T§7¡7¨C¯G©GÓ4�ß�1ØÑ)Ü ›<¬:Ò5Ø"%§'¡'¨6·7±7³9Ð"<Ò<Ø&'§e¡e£g˜C�Gá'-¨d°sÓ';×;Ð;Þ#,à.7¿	¹	À"¹Ñ.F à Ò,ä% i´×7Ñ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Ñ7ä" 9›~´°S·Y±Y³Ó?Ø$'§I¡I¨a©b¡Mà$'§I¡I¨i©jÑ$9Ø&¨'Ó1ØŸI™I×,Ñ,¨S¯Y©Y°r©]Õ;àKÐ,=¸i¹]Ð*KÓK 5Ø&/·	±	¸"±Ñ&>˜ÙñG 0;ðJØ—w‘w #§'¡'Ó)ØØŸG™G‘}¨Ó,à%+ H˜œ	Ø&/°Ñ&7˜Ø!Ÿg™g¤t¨TÐ1Ò1ØŸš 1™�Ú ØŸ'™'¤5¨$¯w©w©-Ð7Ò7Ø—G’G˜q‘L•Gòc ò <øôR "ó ÙðüsW   ‚A1K.Á7AK.ÃKÃE-K.È;K ÉK.ÉA	K ÊK.Ê"6K ËK.Ë
K+Ë(K.Ë*K+Ë+K.r!   r<  )r2   r3   r4   r5   r6   rp   r7   r!   r%   r#   r   r     s   † ñ÷@r%   r   c              #   óâ  #   • [        U 5      n  [        U 5      u  p#SnSnU H¾  u  pgnUc  UnSn	U(       a€  U[        U5      -   U:¼  an  X‰X&-
   n
U
(       a  XGU
4v •  U[        U
5      -  nU H  u  p¼nXLU4v •  U[        U5      -  nM     X&-
  n	 [        U 5      u  p#U(       a  U[        U5      -   U:¼  a  Mn  U	[        U5      :  d  M¥  XGX‰S 4v •  U[        U5      U	-
  -  nMÀ     U(       aC  U=(       d    SnU H  u  pçnXGU4v •  U[        U5      -  nM      [        U 5      u  p#U(       a  MB  gg! [         a    U Sh  v•N     gf = f! [         a    Sn M£  f = f! [         a    Sn gf = f7f)aC  
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.
NTr   F)ÚiterÚnextÚStopIterationr_   )r“   r  r  r  ÚrealposÚinsleftr•   rq   rr   ÚoldiÚtmpvalÚit_indexÚit_tokenÚit_valueÚps                  r#   r‘   r‘   S  s¤  é € ô �jÓ!€JðÜ˜jÓ)‰ˆð €GØ€Gó ‰ˆˆaà‰?ØˆGØˆÞ˜!œc !›f™*¨Ó-Ø˜E™IÐ&ˆFÞØ &Ð(Ò(Øœ3˜v›;Ñ&�Û07Ñ,� HØ¨Ð1Ò1Øœ3˜x›=Ñ(’ñ 18ð ‘9ˆDðÜ!% jÓ!1‘�ö ˜!œc !›f™*¨Õ-ð ”#�a“&�=Ø˜a ˜hÐ&Ò&Ø”s˜1“v ‘}Ñ$ŠGñ+ ö0 à—,˜QˆÛ‰GˆA�!Ø˜a�-ÒØ”s˜1“vÑŠGñ ð	Ü! *Ó-‰NˆE÷ Š'øôE ó à×ÑÙðûô4 !ó Ø�Úðûô  ó 	ØˆGÙð	üs�   ‚E/�D/ œA1E/ÂE
ÂE/Â6E/ÃAE/ÄE Ä$E/Ä-E/Ä/EÄ>EÄ?EÅE/ÅEÅE/Å
EÅE/ÅEÅE/ÅE,Å)E/Å+E,Å,E/c                   ó   • \ rS rSrSrS rSrg)ÚProfilingRegexLexerMetai“  z>Metaclass for ProfilingRegexLexer, collects regex timing info.c                 óò   ^ ^^^• [        U[        5      (       a*  [        UR                  UR                  UR                  S9mOUm[
        R                  " TU5      m[        R                  4U UUU4S jjnU$ )Nræ   c                 óþ   >• TR                   S   R                  T
T	4SS/5      n[        R                  " 5       nTR                  XU5      n[        R                  " 5       nUS==   S-  ss'   US==   Xd-
  -  ss'   U$ )Nrø   r   r    rÀ   )Ú
_prof_dataÚ
setdefaultÚtimerÄ   )rU   rÂ   ÚendposÚinfoÚt0ÚresÚt1r¡   Úcompiledr  rÎ   s          €€€€r#   Ú
match_funcÚ:ProfilingRegexLexerMeta._process_regex.<locals>.match_funcž  sn   ø€ Ø—>‘> "Ñ%×0Ñ0°%¸°ÀÀ3¸xÓHˆDÜ—’“ˆBØ—.‘. ¨FÓ3ˆCÜ—’“ˆBØ�‹G�q‰L‹GØ�‹G�r‘wÑ‹GØˆJr%   )	rQ   r   r   râ   rã   rë   rì   ÚsysÚmaxsize)r¡   rí   rî   rÎ   rZ  rY  r  s   `  ` @@r#   rï   Ú&ProfilingRegexLexerMeta._process_regex–  s]   û€ Ü�eœU×#Ñ#Ü˜EŸK™K°·±Ø#(§<¡<ñ1‰Cð ˆCÜ—:’:˜c 6Ó*ˆä),¯©÷ 	ò 	ð Ðr%   r!   N)r2   r3   r4   r5   r6   rï   r7   r!   r%   r#   rN  rN  “  s
   † ÙHõr%   rN  c                   ó*   • \ rS rSrSr/ rSrSS jrSrg)ÚProfilingRegexLexeri©  zFDrop-in replacement for RegexLexer that does profiling of its regexes.é   c              #   óH  ^ #   • T R                   R                  R                  0 5        [        R	                  T X5       S h  v•N   T R                   R                  R                  5       n[        S UR                  5        5       U 4S jSS9n[        S U 5       5      n[        5         [        ST R                   R                  [        U5      U4-  5        [        S5        [        SS	-  5        [        S
5        U H  n[        SU-  5        M     [        S5        g  NÝ7f)Nc              3   ó¤   #   • U HG  u  u  pu  p4U[        U5      R                  S 5      R                  SS5      SS USU-  SU-  U-  4v •  MI     g7f)zu'z\\Ú\NéA   iè  )Úreprrc   rb   )Ú.0rÔ   ÚrÚnrq   s        r#   Ú	<genexpr>Ú=ProfilingRegexLexer.get_tokens_unprocessed.<locals>.<genexpr>´  s\   é € ð @á/>Ñ+™F˜Q¡F Qð œ4 ›7Ÿ=™=¨Ó/×7Ñ7¸ÀÓEÀcÀrÐJØ˜4 !™8 T¨A¡X°¡\õ3â/>ùs   ‚AAc                 ó"   >• U TR                      $ ro   )Ú_prof_sort_index)r"   rF   s    €r#   r$   Ú<ProfilingRegexLexer.get_tokens_unprocessed.<locals>.<lambda>·  s   ø€  A d×&;Ñ&;Ò$<r%   T)ÚkeyÚreversec              3   ó(   #   • U H	  oS    v •  M     g7f)é   Nr!   )rg  r"   s     r#   rj  rk  ¹  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)rL   rQ  rR   r   rp   rÚ   Úsortedr  ÚsumÚprintr2   r_   )rF   rU   rÏ   ÚrawdatarÇ   Ú	sum_totalr0   s   `      r#   rp   Ú*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   ƒ?D"ÁD ÁCD"r!   Nr4  )	r2   r3   r4   r5   r6   rQ  rm  rp   r7   r!   r%   r#   r`  r`  ©  s   † ÙPà€JØÐ÷r%   r`  )6r6   rë   r\  rS  Úpip._vendor.pygments.filterr   r   Úpip._vendor.pygments.filtersr   Úpip._vendor.pygments.tokenr   r   r   r	   r
   Úpip._vendor.pygments.utilr   r   r   r   r   r   Úpip._vendor.pygments.regexoptr   Ú__all__rì   r   r]   ÚstaticmethodÚ_default_analyser+   r'   r   r   r[   r   rš   r   r    rž   r§   r   rÌ   r   r   r   r   ré   r   r   r   r‘   rN  r`  r!   r%   r#   Ú<module>r�     sJ  ðñó 
Û 
Û ç =Ý ;ß QÕ Q÷*÷ *å 3ò*€ð �*Š*�WÓ
€ò,€ñ  ¡Ó.Ð ô	1�ô 	1ôo"�iò o"ôdO�eô OôN	ˆcô 	÷ñ ñ ‹*€ô
ˆuô 
÷ñ ò6÷4ñ ñ ƒw€ò/÷d	ñ 	ôMˆFô Mô d1�Yô d1ôN^� .ò ^÷BLñ LôE˜ô EòP=ô@˜nô ô,˜*Ð0Gó r%   