Ë
    ”U.jŠ  ã                   óX  — d Z ddlZddlZddlZddlmZmZ ddlmZ ddl	m
Z
mZmZmZmZ ddlmZmZmZmZmZmZ ddlmZ g d¢Z ej2                  d	«      Zg d
¢Z ed„ «      Z G d„ de«      Z G d„ de¬«      Z  G d„ de «      Z! G d„ de"«      Z# G d„ d«      Z$ e$«       Z% G d„ de&«      Z' G d„ d«      Z(d„ Z) G d„ d«      Z* e*«       Z+d„ Z, G d„ d «      Z- G d!„ d"e«      Z. G d#„ d$e«      Z/ G d%„ d&e e/¬«      Z0 G d'„ d(«      Z1 G d)„ d*e0«      Z2d+„ Z3 G d,„ d-e/«      Z4 G d.„ d/e0e4¬«      Z5y)0z´
    pygments.lexer
    ~~~~~~~~~~~~~~

    Base lexer classes.

    :copyright: Copyright 2006-2025 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                  ó   — y)Nç        © )Úxs    ú\C:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\pip/_vendor/pygments/lexer.pyÚ<lambda>r$   "   s   € ¨#ó    c                   ó   — e Zd ZdZd„ Zy)Ú	LexerMetaz‚
    This metaclass automagically converts ``analyse_text`` methods into
    static methods which always return float values.
    c                 ó\   — d|v rt        |d   «      |d<   t        j                  | |||«      S )NÚanalyse_text)r   ÚtypeÚ__new__)ÚmcsÚnameÚbasesÚds       r#   r+   zLexerMeta.__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                   ó`   — e Zd ZdZdZg Zg Zg Zg ZdZ	dZ
dZdZd„ Zd„ Zd„ Zd„ Zd„ Zdd	„Zd
„ Zy)r   a"  
    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                 ól  — || _         t        |dd«      | _        t        |dd«      | _        t        |dd«      | _        t        |dd«      | _        |j                  dd	«      | _        |j                  d
«      xs | 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   r6   r7   r8   r   r9   Úgetr:   r=   r   Ú
add_filter)Úselfr>   Úfilter_s      r#   Ú__init__z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                 óœ   — | j                   r'd| j                  j                  › d| j                   ›d�S d| j                  j                  › d�S )Nz<pygments.lexers.z with Ú>)r>   Ú	__class__r0   ©rA   s    r#   Ú__repr__zLexer.__repr__¯   sI   € Ø�<Š<Ø& t§~¡~×'>Ñ'>Ð&?¸vÀdÇlÁlÐEUÐUVÐWÐWà& t§~¡~×'>Ñ'>Ð&?¸qÐAÐAr%   c                 ór   — t        |t        «      st        |fi |¤Ž}| j                  j	                  |«       y)z8
        Add a new stream filter to this lexer.
        N)Ú
isinstancer   r   r=   Úappend)rA   rB   r>   s      r#   r@   zLexer.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)   zLexer.analyse_text½   s   � r%   c                 óÚ  — t        |t        «      st| j                  dk(  rt        |«      \  }}nu| j                  dk(  r	 t	        d«      ‚|j                  | j                  «      }|j                  d«      r.|t        d«      d }n|j                  d«      r|t        d«      d }|j                  dd«      }|j                  d	d«      }| j                  r|j                  «       }n| j                  r|j                  d«      }| j                   d
kD  r|j#                  | j                   «      }| j$                  r|j'                  d«      s|dz  }|S # t        $ r}t	        d«      |‚d}~ww xY w)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   )rJ   Ústrr:   r   ÚImportErrorÚ_encoding_mapÚ
startswithÚlenÚdecoderO   Údetectr?   Úreplacer7   Ústripr6   r9   Ú
expandtabsr8   Úendswith)rA   rM   Ú_ÚeÚdecodedÚbomr:   Úencs           r#   Ú_preprocess_lexer_inputzLexer._preprocess_lexer_inputÎ   sH  € ô ˜$¤Ô$Ø�}‰} Ò'Ü& 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Ø�D‰LˆDàˆøôI #ò TÜ%ð 'Ló MàRSðTûðTús   ¿E Å	E*ÅE%Å%E*c                 óx   ‡ ‡— ‰ j                  ‰«      Šˆ ˆfd„} |«       }|st        |‰ 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.
        c               3   óN   •K  — ‰j                  ‰«      D ]  \  } }}||f–— Œ y ­w©N)Úget_tokens_unprocessed)r]   ÚtÚvrA   rM   s      €€r#   Ústreamerz"Lexer.get_tokens.<locals>.streamer  s+   øè ø€ Ø×6Ñ6°tÖ<‘��1�aØ˜�d“
ñ =ùs   ƒ"%)rb   r   r=   )rA   rM   Ú
unfilteredri   Ústreams   ``   r#   Ú
get_tokenszLexer.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)rA   rM   s     r#   rf   zLexer.get_tokens_unprocessed  s
   € ô "Ð!r%   )F)r0   r1   r2   r3   r-   ÚaliasesÚ	filenamesÚalias_filenamesÚ	mimetypesÚpriorityÚurlÚversion_addedÚ_examplerC   rH   r@   r)   rb   rl   rf   r!   r%   r#   r   r   1   sl   „ ñ8ðv €Dð €Gð
 €Ið €Oð €Ið €Hð €Cð €Mð €Hò%ò<Bò%òò"/óbó0	"r%   r   )Ú	metaclassc                   ó    — e Zd ZdZefd„Zd„ Zy)r   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   —  |di |¤Ž| _          |di |¤Ž| _        || _        t        j                  | fi |¤Ž y ©Nr!   )Ú
root_lexerÚlanguage_lexerÚneedler   rC   )rA   Ú_root_lexerÚ_language_lexerÚ_needler>   s        r#   rC   zDelegatingLexer.__init__-  s9   € Ù%Ñ0¨Ñ0ˆŒÙ-Ñ8°Ñ8ˆÔØˆŒÜ�‰�tÑ'˜wÓ'r%   c                 ól  — d}g }g }| j                   j                  |«      D ]N  \  }}}|| j                  u r&|r|j                  t	        |«      |f«       g }||z  }Œ;|j                  |||f«       ŒP |r|j                  t	        |«      |f«       t        || j                  j                  |«      «      S )NÚ )r|   rf   r}   rK   rV   Údo_insertionsr{   )rA   rM   ÚbufferedÚ
insertionsÚ
lng_bufferÚirg   rh   s           r#   rf   z&DelegatingLexer.get_tokens_unprocessed3  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ð 	Or%   N)r0   r1   r2   r3   r   rC   rf   r!   r%   r#   r   r   #  s   „ ñð >Có (óOr%   r   c                   ó   — e Zd ZdZy)r   zI
    Indicates that a state should include rules from another state.
    N©r0   r1   r2   r3   r!   r%   r#   r   r   J  s   „ ñð 	r%   r   c                   ó   — e Zd ZdZd„ Zy)Ú_inheritzC
    Indicates the a state should inherit from its superclass.
    c                  ó   — y)Nr   r!   rG   s    r#   rH   z_inherit.__repr__U  s   € Ør%   N)r0   r1   r2   r3   rH   r!   r%   r#   r‹   r‹   Q  s   „ ñór%   r‹   c                   ó   — e Zd ZdZd„ Zd„ Zy)Úcombinedz:
    Indicates a state combined from multiple states.
    c                 ó.   — t         j                  | |«      S re   )Útupler+   )ÚclsÚargss     r#   r+   zcombined.__new__`  s   € Ü�}‰}˜S $Ó'Ð'r%   c                  ó   — y re   r!   )rA   r’   s     r#   rC   zcombined.__init__c  s   € àr%   N)r0   r1   r2   r3   r+   rC   r!   r%   r#   rŽ   rŽ   [  s   „ ñò(ór%   rŽ   c                   ó:   — e Zd ZdZd„ Zd	d„Zd	d„Zd	d„Zd„ Zd„ Z	y)
Ú_PseudoMatchz:
    A pseudo match object constructed from a string.
    c                 ó    — || _         || _        y re   )Ú_textÚ_start)rA   ÚstartrM   s      r#   rC   z_PseudoMatch.__init__m  s   € ØˆŒ
Øˆ�r%   Nc                 ó   — | j                   S re   )r˜   ©rA   Úargs     r#   r™   z_PseudoMatch.startq  s   € Ø�{‰{Ðr%   c                 óF   — | j                   t        | j                  «      z   S re   )r˜   rV   r—   r›   s     r#   Úendz_PseudoMatch.endt  s   € Ø�{‰{œS §¡›_Ñ,Ð,r%   c                 ó4   — |rt        d«      ‚| j                  S )NzNo such group)Ú
IndexErrorr—   r›   s     r#   Úgroupz_PseudoMatch.groupw  s   € ÙÜ˜_Ó-Ð-Ø�z‰zÐr%   c                 ó   — | j                   fS re   )r—   rG   s    r#   Úgroupsz_PseudoMatch.groups|  s   € Ø—
‘
ˆ}Ðr%   c                 ó   — i S re   r!   rG   s    r#   Ú	groupdictz_PseudoMatch.groupdict  s   € Øˆ	r%   re   )
r0   r1   r2   r3   rC   r™   rž   r¡   r£   r¥   r!   r%   r#   r•   r•   h  s%   „ ñòóó-óò
ór%   r•   c                  ó   ‡ — dˆ fd„	}|S )zL
    Callback that yields multiple actions for each group in the match.
    c           
   3   ó¶  •K  — t        ‰«      D ]®  \  }}|€Œ	t        |«      t        u r1|j                  |dz   «      }|sŒ1|j	                  |dz   «      ||f–— ŒK|j                  |dz   «      }|€Œb|r|j	                  |dz   «      |_         || t        |j	                  |dz   «      |«      |«      D ]	  }|sŒ|–— Œ Œ° |r|j                  «       |_        y y ­w)Né   )Ú	enumerater*   r
   r¡   r™   Úposr•   rž   )ÚlexerÚmatchÚctxr‡   ÚactionÚdataÚitemr’   s          €r#   Úcallbackzbygroups.<locals>.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   ƒ<CÁ 0CÁ1ACÂ8!Cre   r!   )r’   r±   s   ` r#   r   r   ƒ  s   ø€ õ"ð& €Or%   c                   ó   — e Zd ZdZy)Ú_ThiszX
    Special singleton used for indicating the caller class.
    Used by ``using``.
    Nr‰   r!   r%   r#   r³   r³   �  s   „ òr%   r³   c                 ó²   ‡ ‡‡— i Šd‰v r4‰j                  d«      }t        |t        t        f«      r|‰d<   nd|f‰d<   ‰ t        u r	dˆˆfd„	}|S dˆ ˆˆfd„	}|S )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   ó*  •K  — ‰	r.‰	j                  | j                  «        | j                  di ‰	¤Ž}n| }|j                  «       } |j                  |j                  «       fi ‰¤ŽD ]  \  }}}||z   ||f–— Œ |r|j                  «       |_        y y ­wrz   )Úupdater>   rF   r™   rf   r¡   rž   rª   )
r«   r¬   r­   ÚlxÚsr‡   rg   rh   Ú	gt_kwargsÚkwargss
           €€r#   r±   zusing.<locals>.callback¼  s�   øè ø€ ñ à—‘˜eŸm™mÔ,Ø$�U—_‘_Ñ. vÑ.‘à�Ø—‘“ˆAØ4˜2×4Ñ4°U·[±[³]ÑPÀiÔP‘��1�aØ˜!‘e˜Q �kÓ!ð QáØŸ)™)›+�•ð ùs   ƒBBc              3   ó  •K  — ‰
j                  | j                  «        ‰di ‰
¤Ž}|j                  «       } |j                  |j	                  «       fi ‰	¤ŽD ]  \  }}}||z   ||f–— Œ |r|j                  «       |_        y y ­wrz   )r¹   r>   r™   rf   r¡   rž   rª   )r«   r¬   r­   rº   r»   r‡   rg   rh   Ú_otherr¼   r½   s           €€€r#   r±   zusing.<locals>.callbackË  s}   øè ø€ à�M‰M˜%Ÿ-™-Ô(ÙÑ!˜&Ñ!ˆBà—‘“ˆAØ4˜2×4Ñ4°U·[±[³]ÑPÀiÔP‘��1�aØ˜!‘e˜Q �kÓ!ð QáØŸ)™)›+�•ð ùs   ƒBBre   )ÚpoprJ   Úlistr�   r   )r¿   r½   r»   r±   r¼   s   ``  @r#   r   r   ¦  se   ú€ ð €IØ�&ÑØ�J‰J�wÓˆÜ�aœ$¤˜Ô'Ø!"ˆI�gÒà"(¨! ˆI�gÑà”�~ö	&ð2 €O÷		&ð €Or%   c                   ó   — e Zd ZdZd„ Zy)r   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                 ó   — || _         y re   )rµ   )rA   rµ   s     r#   rC   zdefault.__init__à  s	   € Øˆ�
r%   N)r0   r1   r2   r3   rC   r!   r%   r#   r   r   Ø  s   „ ñór%   r   c                   ó   — e Zd ZdZdd„Zd„ Zy)r   z•
    Indicates a list of literal words that is transformed into an optimized
    regex that matches any of the words.

    .. versionadded:: 2.0
    c                 ó.   — || _         || _        || _        y re   )r   ÚprefixÚsuffix)rA   r   rÆ   rÇ   s       r#   rC   zwords.__init__ë  s   € ØˆŒ
ØˆŒØˆ�r%   c                 óZ   — t        | j                  | j                  | j                  ¬«      S )N©rÆ   rÇ   )r   r   rÆ   rÇ   rG   s    r#   r?   z	words.getð  s   € Ü˜Ÿ™¨D¯K©KÀÇÁÔLÐLr%   N)r‚   r‚   )r0   r1   r2   r3   rC   r?   r!   r%   r#   r   r   ä  s   „ ñóó
Mr%   r   c                   ó<   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd
d„Zd„ 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                  «       }t        j                  ||«      j
                  S )zBPreprocess the regular expression component of a token definition.)rJ   r   r?   ÚreÚcompiler¬   )r‘   ÚregexÚrflagsrµ   s       r#   Ú_process_regexzRegexLexerMeta._process_regexú  s.   € ä�eœVÔ$Ø—I‘I“KˆEÜ�z‰z˜% Ó(×.Ñ.Ð.r%   c                 óR   — t        |«      t        u st        |«      s
J d|›�«       ‚|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_tokenzRegexLexerMeta._process_token   s2   € ä�E‹{œjÑ(¬H°U¬Oð 	IØ>¸u¸iÐHó	IÐ;àˆr%   c                 óä  — t        |t        «      r5|dk(  ry||v r|fS |dk(  r|S |dd dk(  rt        |dd «       S J d|›�«       ‚t        |t        «      rfd| j                  z  }| xj                  d	z  c_        g }|D ]3  }||k7  s
J d
|›�«       ‚|j                  | j                  |||«      «       Œ5 |||<   |fS t        |t        «      r|D ]  }||v rŒ|dv rŒJ d|z   «       ‚ |S J d|›�«       ‚)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 )rJ   rR   ÚintrŽ   Ú_tmpnameÚextendÚ_process_stater�   )r‘   Ú	new_stateÚunprocessedÚ	processedÚ	tmp_stateÚitokensÚistates          r#   Ú_process_new_statez!RegexLexerMeta._process_new_state  sE  € ä�i¤Ô%à˜FÒ"ØØ˜kÑ)Ø!�|Ð#Ø˜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;¸Vó Eõ Fð $ð $+ˆI�iÑ Ø�<ÐÜ˜	¤5Ô)ã#�Ø +Ò-ØÐ"3Ò3ð2à(¨6Ñ1ó2ð 4ð $ð Ðà@Ð2°9°-Ð@Ó@�5r%   c                 ó~  — t        |t        «      s
J d|›�«       ‚|d   dk7  s
J d|›�«       ‚||v r||   S g x}||<   | j                  }||   D �]?  }t        |t        «      r;||k7  s
J d|›�«       ‚|j	                  | j                  ||t        |«      «      «       ŒOt        |t        «      rŒ`t        |t        «      rO| j                  |j                  ||«      }|j                  t        j                  d«      j                  d|f«       Œ¿t        |«      t        u s
J d|›�«       ‚	 | j!                  |d   ||«      }| j'                  |d   «      }
t)        |«      dk(  rd}n| j                  |d   ||«      }|j                  ||
|f«       �ŒB |S # t"        $ r }	t%        d	|d   ›d
|›d| ›d|	› �«      |	‚d}	~	ww xY w)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¨   é   )rJ   rR   Úflagsr   rÝ   rÞ   r‹   r   rå   rµ   rK   rÍ   rÎ   r¬   r*   r�   rÑ   Ú	ExceptionÚ
ValueErrorrÕ   rV   )r‘   rà   rá   rµ   ÚtokensrÐ   Útdefrß   ÚrexÚerrrÔ   s              r#   rÞ   zRegexLexerMeta._process_state)  s÷  € ä˜%¤Ô%ÐDÐ):¸5¸)Ð'DÓDÐ%Ø�Q‰x˜3ŠÐ?Ð"5°e°YÐ ?Ó?ˆØ�IÑØ˜UÑ#Ð#Ø$&Ð&ˆ�˜5Ñ!Ø—‘ˆØ Õ&ˆDÜ˜$¤Ô(à˜u’}ÐKÐ(AÀ%ÀÐ&KÓK�}Ø—‘˜c×0Ñ0°¸iÜ14°T³ó<ô =àÜ˜$¤Ô)ð Ü˜$¤Ô(Ø×2Ñ2°4·:±:¸{ÈIÓ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Æ	F<ÆF7Æ7F<Nc                 ó”   — i x}| j                   |<   |xs | j                  |   }t        |«      D ]  }| j                  |||«       Œ |S )z-Preprocess a dictionary of token definitions.)Ú_all_tokensrì   rÁ   rÞ   )r‘   r-   Ú	tokendefsrá   rµ   s        r#   Úprocess_tokendefzRegexLexerMeta.process_tokendefT  sN   € à,.Ð.ˆ	�C—O‘O DÑ)ØÒ1 §¡¨DÑ!1ˆ	Ü˜)–_ˆEØ×Ñ˜y¨)°UÕ;ð %àÐr%   c                 ó²  — i }i }| j                   D ]¥  }|j                  j                  di «      }|j                  «       D ]t  \  }}|j                  |«      }|€!|||<   	 |j	                  t
        «      }|||<   Œ:|j                  |d«      }|€ŒO||||dz    	 |j	                  t
        «      }	||	z   ||<   Œv Œ§ |S # t        $ r Y Œ†w xY w# t        $ r Y Œ•w xY w)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Úindexr   rë   rÀ   )
r‘   rì   ÚinheritableÚcÚtoksrµ   r÷   ÚcuritemsÚinherit_ndxÚnew_inh_ndxs
             r#   Úget_tokendefszRegexLexerMeta.get_tokendefs\  s  € ð ˆØˆØ—”ˆ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ÃCc                 óè   — d| j                   vrLi | _        d| _        t        | d«      r| j                  rn%| j                  d| j                  «       «      | _        t        j                  | g|¢­i |¤ŽS )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  zRegexLexerMeta.__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%   re   )r0   r1   r2   r3   rÑ   rÕ   rå   rÞ   ró   rÿ   r  r!   r%   r#   rË   rË   ô  s.   „ ñò
/òò!AòF)óVò/ób1r%   rË   c                   ó4   — e Zd ZdZej
                  Zi Zdd„Zy)r   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              #   ó:  K  — d}| j                   }t        |«      }||d      }	 |D �]&  \  }}}	 |||«      }
|
sŒ|�8t        |«      t        u r|||
j	                  «       f–— n || |
«      E d{  –—†  |
j                  «       }|	�Çt        |	t        «      rX|	D ]R  }|dk(  r t        |«      dkD  sŒ|j                  «        Œ(|dk(  r|j                  |d   «       ŒB|j                  |«       ŒT nWt        |	t        «      r#t        |	«      t        |«      k\  r|dd…= n*||	d…= n$|	dk(  r|j                  |d   «       n
J d|	›�«       ‚||d      } n7 	 ||   dk(  rd	g}|d	   }|t        df–— |dz  }�ŒP|t        ||   f–— |dz  }�Œd7 �Œ# t        $ r Y yw xY w­w)
z~
        Split ``text`` into (tokentype, text) pairs.

        ``stack`` is the initial stack (default: ``['root']``)
        r   rØ   r¨   Nr×   rÙ   úwrong state def: rP   r·   )r  rÁ   r*   r
   r¡   rž   rJ   r�   rV   rÀ   rK   rÛ   Úabsr	   r   r    )rA   rM   r¶   rª   rò   Ú
statestackÚstatetokensÚrexmatchr®   rß   Úmrµ   s               r#   rf   z!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Ð,=¸i¸]Ð*KÓK 5Ø&/°
¸2±Ñ&?˜ÙðC 0;ðJØ˜C‘y DÒ(à&, X˜
Ø&/°Ñ&7˜Ø!¤:¨tÐ3Ò3Ø˜q™˜Ù Øœu d¨3¡iÐ/Ò/Ø˜1‘H�Cñ_ ð 7úôP "ò ÙðüsM   ‚8F»5FÁ0F	Á1>FÂ0B!FÅ F Å2FÅ4F ÆFÆ	FÆFÆFÆFN©)r·   )	r0   r1   r2   r3   rÍ   Ú	MULTILINEré   rì   rf   r!   r%   r#   r   r   ›  s   „ ñð �L‰L€Eð0 €Fô;r%   r   c                   ó   — e Zd ZdZdd„Zd„ Zy)r   z9
    A helper object that holds lexer position data.
    Nc                 ó`   — || _         || _        |xs t        |«      | _        |xs dg| _        y )Nr·   )rM   rª   rV   rž   r¶   )rA   rM   rª   r¶   rž   s        r#   rC   zLexerContext.__init__  s.   € ØˆŒ	ØˆŒØÒ#œ#˜d›)ˆŒØÒ&˜v˜hˆ�
r%   c                 óV   — d| j                   ›d| j                  ›d| j                  ›d�S )NzLexerContext(z, Ú))rM   rª   r¶   rG   s    r#   rH   zLexerContext.__repr__  s)   € Ø˜tŸy™y˜m¨2¨d¯h©h¨\¸¸D¿J¹J¸>ÈÐKÐKr%   ©NN)r0   r1   r2   r3   rC   rH   r!   r%   r#   r   r   ü  s   „ ñó'óLr%   r   c                   ó   — e Zd ZdZdd„Zy)r   zE
    A RegexLexer that uses a context object to store its state.
    Nc              #   ó–  K  — | j                   }|st        |d«      }|d   }n |}||j                  d      }|j                  }	 |D �]Î  \  }}} |||j                  |j
                  «      }	|	sŒ)|�lt        |«      t        u r5|j                  ||	j                  «       f–— |	j                  «       |_        n& || |	|«      E d{  –—†  |s||j                  d      }|��5t        |t        «      rŠ|D ]„  }
|
dk(  r4t        |j                  «      dkD  sŒ!|j                  j                  «        Œ<|
dk(  r)|j                  j                  |j                  d   «       Œj|j                  j                  |
«       Œ† n‰t        |t        «      rAt        |«      t        |j                  «      k\  r|j                  dd…= nH|j                  |d…= n8|dk(  r)|j                  j                  |j                  d   «       n
J d|›�«       ‚||j                  d      } nž 	 |j                  |j
                  k\  ry||j                     d	k(  r9dg|_        |d   }|j                  t         d	f–— |xj                  dz  c_        �Œ;|j                  t"        ||j                     f–— |xj                  dz  c_        �Œs7 �Œó# t$        $ r Y yw xY w­w)
z
        Split ``text`` into (tokentype, text) pairs.
        If ``context`` is given, use this lexer context instead.
        r   r·   rØ   r¨   Nr×   rÙ   r  rP   )r  r   r¶   rM   rª   rž   r*   r
   r¡   rJ   r�   rV   rÀ   rK   rÛ   r	  r   r   r    )rA   rM   Úcontextrò   r­   r  r  r®   rß   r  rµ   s              r#   rf   z)ExtendedRegexLexer.get_tokens_unprocessed  sm  è ø€ ð
 —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Ð,=¸i¸]Ð*KÓK 5Ø&/°·	±	¸"±Ñ&>˜ÙðG 0;ð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	Á/AK	ÃJ7ÃAK	ÄDK	ÈJ: È2K	È3A	J: É<K	É>7J: Ê5K	Ê:	KËK	ËKËK	r  )r0   r1   r2   r3   rf   r!   r%   r#   r   r     s   „ ñô@r%   r   c              #   ó   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        |«      k  sŒ–||||	d f–— |t        |«      |	z
  z  }Œ² |r9|xs d}|D ]  \  }}}|||f–— |t        |«      z  }Œ 	 t        | «      \  }}|rŒ8yy# t        $ r |E d{  –—†7   Y yw xY w# t        $ r d}Y Œ�w xY w# t        $ r d}Y yw xY w­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.
    NTr   F)ÚiterÚnextÚStopIterationrV   )r…   rì   rø   rã   ÚrealposÚinsleftr‡   rg   rh   ÚoldiÚtmpvalÚit_indexÚit_tokenÚit_valueÚps                  r#   rƒ   rƒ   S  s¿  è ø€ ô �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Â9AEÃ?D= ÄEÄEÄD)Ä D#Ä!D)Ä&EÄ(D)Ä)EÄ,D:Ä7EÄ9D:Ä:EÄ=EÅEÅ
EÅEc                   ó   — e Zd ZdZd„ Zy)ÚProfilingRegexLexerMetaz>Metaclass for ProfilingRegexLexer, collects regex timing info.c                 óè   ‡ ‡‡‡— t        |t        «      r-t        |j                  |j                  |j                  ¬«      Šn|Št        j                  ‰|«      Št        j                  fˆ ˆˆˆfd„	}|S )NrÉ   c                 óþ   •— ‰j                   d   j                  ‰
‰	fddg«      }t        j                  «       }‰j                  | ||«      }t        j                  «       }|dxx   dz  cc<   |dxx   ||z
  z  cc<   |S )NrØ   r   r    r¨   )Ú
_prof_dataÚ
setdefaultÚtimer¬   )rM   rª   ÚendposÚinfoÚt0ÚresÚt1r‘   Úcompiledrî   rµ   s          €€€€r#   Ú
match_funcz:ProfilingRegexLexerMeta._process_regex.<locals>.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%   )	rJ   r   r   rÆ   rÇ   rÍ   rÎ   ÚsysÚmaxsize)r‘   rÏ   rÐ   rµ   r1  r0  rî   s   `  ` @@r#   rÑ   z&ProfilingRegexLexerMeta._process_regex–  sZ   û€ Ü�eœUÔ#Ü˜EŸK™K°·±Ø#(§<¡<ô1‰Cð ˆCÜ—:‘:˜c 6Ó*ˆä),¯©÷ 	ð 	ð Ðr%   N)r0   r1   r2   r3   rÑ   r!   r%   r#   r%  r%  “  s
   „ ÙHór%   r%  c                   ó    — e Zd ZdZg ZdZdd„Zy)ÚProfilingRegexLexerzFDrop-in replacement for RegexLexer that does profiling of its regexes.é   c              #   óJ  ‡ K  — ‰ j                   j                  j                  i «       t        j	                  ‰ ||«      E d {  –—†  ‰ j                   j                  j                  «       }t        d„ |j                  «       D «       ˆ fd„d¬«      }t        d„ |D «       «      }t        «        t        d‰ j                   j                  t        |«      |fz  «       t        d«       t        dd	z  «       t        d
«       |D ]  }t        d|z  «       Œ t        d«       y 7 ŒÝ­w)Nc              3   ó¤   K  — | ]H  \  \  }}\  }}|t        |«      j                  d «      j                  dd«      dd |d|z  d|z  |z  f–— ŒJ y­w)zu'z\\Ú\NéA   iè  )ÚreprrZ   rY   )Ú.0r»   ÚrÚnrg   s        r#   Ú	<genexpr>z=ProfilingRegexLexer.get_tokens_unprocessed.<locals>.<genexpr>´  sa   è ø€ ð @á/>Ñ+™F˜Q ¡F Q¨ð œ4 ›7Ÿ=™=¨Ó/×7Ñ7¸ÀÓEÀcÀrÐJØ˜4 !™8 T¨A¡X°¡\ô3á/>ùs   ‚AAc                 ó"   •— | ‰j                      S re   )Ú_prof_sort_index)r"   rA   s    €r#   r$   z<ProfilingRegexLexer.get_tokens_unprocessed.<locals>.<lambda>·  s   ø€  A d×&;Ñ&;Ò$<r%   T)ÚkeyÚreversec              3   ó&   K  — | ]	  }|d    –— Œ y­w)é   Nr!   )r<  r"   s     r#   r?  z=ProfilingRegexLexer.get_tokens_unprocessed.<locals>.<genexpr>¹  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)rF   r(  rK   r   rf   rÀ   Úsortedr÷   ÚsumÚprintr0   rV   )rA   rM   r¶   Úrawdatar¯   Ú	sum_totalr/   s   `      r#   rf   z*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   ƒA D#ÁD!ÁCD#Nr  )r0   r1   r2   r3   r(  rA  rf   r!   r%   r#   r5  r5  ©  s   „ ÙPà€JØÐôr%   r5  )6r3   rÍ   r2  r*  Ú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   rT   ÚstaticmethodÚ_default_analyser*   r'   r   r   rR   r   r‹   r   r�   rŽ   r•   r   r³   r   r   r   r   rË   r   r   r   rƒ   r%  r5  r!   r%   r#   Ú<module>rS     sL  ðñó 
Û 
Û ç =Ý ;ß 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%   