+
    i                     Z   R t ^ RIt^ RIt^ RIt^ RIHtHt ^ RIHt ^ RI	H
t
HtHtHtHt ^ RIHtHtHtHtHtHt ^ RIHt . R-Ot]P2                  ! R4      t. R.Ot]! R 4      t ! R R]4      t ! R R]R7      t  ! R R
] 4      t! ! R R]"4      t# ! R R4      t$]$! 4       t% ! R R]&4      t' ! R R4      t(R t) ! R R4      t*]*! 4       t+R  t, ! R! R4      t- ! R" R]4      t. ! R# R$]4      t/ ! R% R] ]/R7      t0 ! R& R4      t1 ! R' R	]04      t2R( t3 ! R) R*]/4      t4 ! R+ R,]0]4R7      t5R# )/z
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defaultwordsz.*?
c                     R # )         )xs   &a/home/wkmabra/.openclaw/workspace/venv/lib/python3.14/site-packages/pip/_vendor/pygments/lexer.py<lambda>r   "   s    #    c                   *   a  ] tR t^%t o RtR tRtV tR# )	LexerMetazv
This metaclass automagically converts ``analyse_text`` methods into
static methods which always return float values.
c                f    R V9   d   \        VR ,          4      VR &   \        P                  WW#4      # )analyse_text)r   type__new__)mcsnamebasesds   &&&&r   r%   LexerMeta.__new__+   s/    Q /.0A BAn||Cu00r   r   N)__name__
__module____qualname____firstlineno____doc__r%   __static_attributes____classdictcell____classdict__s   @r   r!   r!   %   s     
1 1r   r!   c                   v   a  ] tR t^1t o RtRt. t. t. t. t	^ t
RtRtRtR tR tR tR tR tRR ltR	 tR
tV tR# )r   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.
Nc                |   Wn         \        VRR4      V n        \        VRR4      V n        \        VRR4      V n        \        VR^ 4      V n        VP                  RR4      V n        VP                  R	4      ;'       g    V P                  V n        . V n	        \        VR
R4       F  pV P                  V4       K  	  R# )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tabsizeencodingguess
inencodingfiltersNr   )optionsr
   r6   r7   r8   r   r9   getr:   r=   r   
add_filter)selfr>   filter_s   &, r   __init__Lexer.__init__   s    & #GY=$Wj%@$Wj$?"7Iq9J8L1BBT]]#GY;GOOG$ <r   c                    V P                   '       d)   R V P                  P                   RV P                   : R2# R V P                  P                   R2# )z<pygments.lexers.z with >)r>   	__class__r+   rA   s   &r   __repr__Lexer.__repr__   sK    <<<&t~~'>'>&?vdllEUUVWW&t~~'>'>&?qAAr   c                    \        V\        4      '       g   \        V3/ VB pV P                  P	                  V4       R# )z(
Add a new stream filter to this lexer.
N)
isinstancer   r   r=   append)rA   rB   r>   s   &&,r   r@   Lexer.add_filter   s2     '6**(<G<GG$r   c                    R# )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                D   \        V\        4      '       g~   V P                  R8X  d   \        V4      w  rMV P                  R8X  d    \	        R4      hVP                  V P                  4      pVP                  R4      '       d   V\        R4      R pM%VP                  R4      '       d   V\        R4      R pVP                  RR4      pVP                  R	R4      pV P                  '       d   VP                  4       pM#V P                  '       d   VP                  R4      pV P                   ^ 8  d   VP#                  V P                   4      pV P$                  '       d!   VP'                  R4      '       g
   VR,          pV#   \         d   p\	        R4      ThRp?ii ; i)
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

)rL   strr:   r   ImportError_encoding_map
startswithlendecoderS   detectr?   replacer7   stripr6   r9   
expandtabsr8   endswith)rA   rP   _edecodedbomr:   encs   &&      r   _preprocess_lexer_inputLexer._preprocess_lexer_input   s[    $$$}}'&t,a)+T &&FGG$ {{4==1??8,,H/Dx((CMN+ ||FD)||D$'===::<D\\\::d#D<<!??4<<0D===t!4!4DLDI # T% 'L MRSTTs   F FFFc                   a a S P                  S4      oV V3R lpV! 4       pV'       g   \        VS P                  S 4      pV# )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   P   <"   SP                  S4       F  w  rpW3x  K  	  R # 5iN)get_tokens_unprocessed)ra   tvrA   rP   s      r   streamer"Lexer.get_tokens.<locals>.streamer  s&     66t<ad
 =s   #&)rf   r   r=   )rA   rP   
unfilteredrn   streams   ff&  r   
get_tokensLexer.get_tokens   s=     ++D1	 "64<<>Fr   c                    \         h)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)rA   rP   s   &&r   rk   Lexer.get_tokens_unprocessed  s
     "!r   )r:   r8   r=   r>   r7   r6   r9   )F)r+   r,   r-   r.   r/   r'   aliases	filenamesalias_filenames	mimetypespriorityurlversion_added_examplerC   rI   r@   r#   rf   rr   rk   r0   r1   r2   s   @r   r   r   1   st     8v D G
 I O I H C M H%<B%"/b0	" 	"r   )	metaclassc                   6   a  ] tR tRt o Rt]3R ltR tRtV t	R# )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                t    V! R/ VB V n         V! R/ VB V n        W0n        \        P                  ! V 3/ VB  R # Nr   )
root_lexerlanguage_lexerneedler   rC   )rA   _root_lexer_language_lexer_needler>   s   &&&&,r   rC   DelegatingLexer.__init__-  s7    %00-88t'w'r   c                   R p. p. pV P                   P                  V4       FX  w  rVpW`P                  J d1   V'       d   VP                  \	        V4      V34       . pW',          pKE  VP                  WVV34       KZ  	  V'       d   VP                  \	        V4      V34       \        VV P                  P                  V4      4      # ) )r   rk   r   rM   rZ   do_insertionsr   )rA   rP   buffered
insertions
lng_bufferirl   rm   s   &&      r   rk   &DelegatingLexer.get_tokens_unprocessed3  s    

**AA$GGA!KK%%s8}j&AB!#J!!1), H s8}j9:Z!__CCHMO 	Or   )r   r   r   N)
r+   r,   r-   r.   r/   r   rC   rk   r0   r1   r2   s   @r   r   r   #  s!      >C (O Or   c                       ] tR tRtRtRtR# )r   iJ  zA
Indicates that a state should include rules from another state.
r   Nr+   r,   r-   r.   r/   r0   r   r   r   r   r   J  s     	r   c                   *   a  ] tR tRt o RtR tRtV tR# )_inheritiQ  z;
Indicates the a state should inherit from its superclass.
c                    R # )inheritr   rH   s   &r   rI   _inherit.__repr__U  s    r   r   N)r+   r,   r-   r.   r/   rI   r0   r1   r2   s   @r   r   r   Q  s      r   r   c                   0   a  ] tR tRt o RtR tR tRtV tR# )combinedi[  z2
Indicates a state combined from multiple states.
c                ,    \         P                  W4      # rj   )tupler%   )clsargss   &*r   r%   combined.__new__`  s    }}S''r   c                    R # rj   r   )rA   r   s   &*r   rC   combined.__init__c  s    r   r   N)	r+   r,   r-   r.   r/   r%   rC   r0   r1   r2   s   @r   r   r   [  s     ( r   r   c                   T   a  ] tR tRt o RtR tRR ltRR ltRR ltR t	R	 t
R
tV tR# )_PseudoMatchih  z2
A pseudo match object constructed from a string.
c                    W n         Wn        R # rj   )_text_start)rA   startrP   s   &&&r   rC   _PseudoMatch.__init__m  s    
r   Nc                    V P                   # rj   )r   rA   args   &&r   r   _PseudoMatch.startq  s    {{r   c                N    V P                   \        V P                  4      ,           # rj   )r   rZ   r   r   s   &&r   end_PseudoMatch.endt  s    {{S_,,r   c                @    V'       d   \        R 4      hV P                  # )zNo such group)
IndexErrorr   r   s   &&r   group_PseudoMatch.groupw  s    _--zzr   c                    V P                   3# rj   )r   rH   s   &r   groups_PseudoMatch.groups|  s    

}r   c                    / # rj   r   rH   s   &r   	groupdict_PseudoMatch.groupdict  s    	r   )r   r   rj   )r+   r,   r-   r.   r/   rC   r   r   r   r   r   r0   r1   r2   s   @r   r   r   h  s-     -
 r   r   c                    a  RV 3R llpV# )zD
Callback that yields multiple actions for each group in the match.
c           
   3   ,  <"   \        S4       F  w  r4Vf   K  \        V4      \        J dA   VP                  V^,           4      pV'       d   VP	                  V^,           4      WE3x  K\  K^  VP                  V^,           4      pVf   K|  V'       d   VP	                  V^,           4      Vn        V! V \        VP	                  V^,           4      V4      V4       F  pV'       g   K  Vx  K  	  K  	  V'       d   VP                  4       Vn        R # R # 5irj   )	enumerater$   r	   r   r   posr   r   )lexermatchctxr   actiondataitemr   s   &&&    r   callbackbygroups.<locals>.callback  s     "4IA~f+{{1q5)++a!e,f::  {{1q5)#"'++a!e"4 &u'3EKKA4F'Ms!T4"&J!T )  iikCG s%   A	D9DDAD'D;Drj   r   )r   r   s   j r   bygroupsr     s    "& Or   c                       ] tR tRtRtRtR# )_Thisi  zL
Special singleton used for indicating the caller class.
Used by ``using``.
r   Nr   r   r   r   r   r     s    r   r   c                   a aa / oRS9   d;   SP                  R4      p\        V\        \        34      '       d   VSR&   MRV3SR&   S \        J d   RVV3R llpV# RV VV3R llpV# )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   L  <"   S	'       d/   S	P                  V P                  4       V P                  ! R/ S	B pMT pVP                  4       pVP                  ! VP                  4       3/ SB  F  w  rVpWT,           Wg3x  K  	  V'       d   VP                  4       Vn        R # R # 5ir   )updater>   rG   r   rk   r   r   r   )
r   r   r   lxsr   rl   rm   	gt_kwargskwargss
   &&&     r   r   using.<locals>.callback  s      emm,__.v.A44U[[]PiPaeQk! Q))+ s   BB$B$c              3   "  <"   S
P                  V P                  4       S! R/ S
B pVP                  4       pVP                  ! VP	                  4       3/ S	B  F  w  rVpWT,           Wg3x  K  	  V'       d   VP                  4       Vn        R # R # 5ir   )r   r>   r   rk   r   r   r   )r   r   r   r   r   r   rl   rm   _otherr   r   s   &&&     r   r   r     st     MM%--(!&!BA44U[[]PiPaeQk! Q))+ s   A2B6Brj   )poprL   listr   this)r   r   r   r   r   s   fl  @r   usingr     sr     I&JJwa$''!"Ig"(!Ig~	& 	&2 O		& 		& Or   c                   *   a  ] tR tRt o RtR tRtV tR# )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                    Wn         R # rj   r   )rA   r   s   &&r   rC   default.__init__  s    
r   r   N)r+   r,   r-   r.   r/   rC   r0   r1   r2   s   @r   r   r     s      r   c                   4   a  ] tR tRt o RtRR ltR tRtV tR# )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                *    Wn         W n        W0n        R # rj   )r   prefixsuffix)rA   r   r   r   s   &&&&r   rC   words.__init__  s    
r   c                Z    \        V P                  V P                  V P                  R 7      # )r   r   )r   r   r   r   rH   s   &r   r?   	words.get  s    DKKLLr   )r   r   r   N)r   r   )	r+   r,   r-   r.   r/   rC   r?   r0   r1   r2   s   @r   r   r     s     
M Mr   c                   R   a  ] tR tRt o RtR tR tR tR tRR lt	R	 t
R
 tRtV tR# )RegexLexerMetai  zk
Metaclass for RegexLexer, creates the self._tokens attribute from
self.tokens on the first instantiation.
c                    \        V\        4      '       d   VP                  4       p\        P                  ! W4      P
                  # )zBPreprocess the regular expression component of a token definition.)rL   r   r?   recompiler   )r   regexrflagsr   s   &&&&r   _process_regexRegexLexerMeta._process_regex  s/    eV$$IIKEzz%(...r   c                d    \        V4      \        J g   \        V4      '       g   Q RV: 24       hV# )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(HUOO 	I>uiH	I;r   c                Z   \        V\        4      '       dH   VR8X  d   R
# W9   d   V3# VR8X  d   V# VR,          R8X  d   \        VR,          4      ) # Q RT: 24       h\        V\        4      '       dq   RV P                  ,          pV ;P                  ^,          un        . pV F5  pWa8w  g   Q RV: 24       hVP                  V P                  VW64      4       K7  	  WSV&   V3# \        V\        4      '       d)   V F   pWb9   d   K  VR9   d   K  Q RV,           4       h	  V# Q R	T: 24       h)z=Preprocess the state transition action of a token definition.#pop#push:N   Nz#pop::r   NNzunknown new state z_tmp_%dzcircular state ref zunknown new state def )r   r   )rL   rV   intr   _tmpnameextend_process_stater   )r   	new_stateunprocessed	processed	tmp_stateitokensistates   &&&&   r   _process_new_state!RegexLexerMeta._process_new_state  sB   i%%F"	)!|#g%  2')IbM***@ 29-@@u	8,,!CLL0ILLALG#*L.A&,LL*s11+2; E F $ $+i <	5))#-"332(612 4 $ @29-@@5r   c                   \        V\        4      '       g   Q RV: 24       hV^ ,          R8w  g   Q RV: 24       hW29   d	   W#,          # . ;qBV&   V P                  pW,           EFd  p\        V\        4      '       d>   Wc8w  g   Q RV: 24       hVP	                  V P                  W\        V4      4      4       KW  \        V\        4      '       d   Ko  \        V\        4      '       dQ   V P                  VP                  W4      pVP                  \        P                  ! R4      P                  RV34       K  \        V4      \        J g   Q RV: 24       h V P!                  V^ ,          WS4      pT P'                  T^,          4      p
\)        T4      ^8X  d   RpMT P                  T^,          Y4      pTP                  YT34       EKg  	  V#   \"         d(   p	\%        RT^ ,          : R	T: R
T : RT	 24      T	hRp	?	ii ; i)z%Preprocess a single state definition.zwrong state name #zinvalid state name zcircular state reference r   Nzwrong rule def zuncompilable regex z
 in state z of z: )rL   rV   flagsr   r   r   r   r   r  r   rM   r   r   r   r$   r   r   	Exception
ValueErrorr   rZ   )r   r   r   r   tokensr   tdefr   rexerrr   s   &&&&       r   r   RegexLexerMeta._process_state)  s   %%%D):5)'DD%Qx3?"5eY ??##$&&5!&&D$((}K(A%&KK}c0014T< =$)) $((224::{V	rzz"~33T9EF:&B/$(BB&r((a&@ &&tAw/E4yA~ 	22473>K	 MM3y12A 'B   r #6tAwkE9TXY\X__abeaf!ghnqqrs   GH "G;;H Nc                    / ;q0P                   V&   T;'       g    V P                  V,          p\        V4       F  pV P                  W#V4       K  	  V# )z-Preprocess a dictionary of token definitions.)_all_tokensr
  r   r   )r   r'   	tokendefsr   r   s   &&&  r   process_tokendefRegexLexerMeta.process_tokendefT  sM    ,..	OOD)11D!1	)_EyU; %r   c                   / p/ pV P                    F  pVP                  P                  R/ 4      pVP                  4        F|  w  rVVP                  V4      pVf!   WaV&    VP	                  \
        4      pYT&   K:  VP                  VR4      pVf   KR  WgW^,           %  VP	                  \
        4      p	W,           W%&   K~  	  K  	  V#   \         d     K  i ; i  \         d     K  i ; i)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
  N)__mro____dict__r?   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,#
 %*5M!&+kk'&: *5&)ooeT:& 7<]3C #(++g"6K *5)BK&9 !- B ) & ! ! " s$   CCCCC'&C'c                   RV P                   9  dY   / V n        ^ V n        \        V R4      '       d   V P                  '       d   M%V P                  RV P                  4       4      V n        \        P                  ! V .VO5/ VB # )z:Instantiate cls after preprocessing its token definitions._tokenstoken_variantsr   )
r  r  r   hasattrr#  r  r  r"  r$   __call__)r   r   kwdss   &*,r   r%  RegexLexerMeta.__call__  sn    CLL( COCLs,--#2D2D2D!222s7H7H7JK}}S040400r   r   rj   )r+   r,   r-   r.   r/   r   r   r  r   r  r  r%  r0   r1   r2   s   @r   r   r     s6     
/!AF)V/b1 1r   r   c                   J   a  ] tR tRt o Rt]P                  t/ tRR lt	Rt
V tR# )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              #    "   ^ pV P                   p\        V4      pWER,          ,          p V EFY  w  rxp	V! W4      p
V
'       g   K  Ve9   \        V4      \        J d   W8V
P	                  4       3x  MV! W
4       Rj  xL
  V
P                  4       pV	e   \        V	\        4      '       dh   V	 F`  pVR8X  d%   \        V4      ^8  d   VP                  4        K,  K.  VR8X  d   VP                  VR,          4       KO  VP                  V4       Kb  	  Mc\        V	\        4      '       d#   \        V	4      \        V4      8  d   VR M0WYR1 M+V	R8X  d   VP                  VR,          4       MQ RT	: 24       hWER,          ,          p EK_  	   W,          R8X  d$   R.pVR,          pV\        R3x  V^,          pEK  V\        W,          3x  V^,          pEK   EL\  \         d     R# i ; i5i)	zf
Split ``text`` into (tokentype, text) pairs.

``stack`` is the initial stack (default: ``['root']``)
Nr   r      NNwrong state def: rT   r   r   )r"  r   r$   r	   r   r   rL   r   rZ   r   rM   r   absr   r   r   )rA   rP   r   r   r  
statestackstatetokensrexmatchr   r   mr   s   &&&         r   rk   !RegexLexer.get_tokens_unprocessed  s     LL	%[
2//:+)T'1)<:5"%qwwy"88'-d66%%'C ,%i77)2#(F?'*:':(2(8 (;%*g%5$.$5$5jn$E$.$5$5e$< *3 (	377  #9~Z@$.rN$.z$:&'1&--jn=K,=i]*KK5&/2&?C 0;JyD(&,X
&/&7!:t33q udi//1HCO 7P " sI   A G/7G/>G?DG/-G :G/=G G/G,(G/+G,,G/r   N)r   )r+   r,   r-   r.   r/   r   	MULTILINEr  r
  rk   r0   r1   r2   s   @r   r   r     s&      LLE0 F; ;r   c                   4   a  ] tR tRt o RtRR ltR tRtV tR# )r   i  z1
A helper object that holds lexer position data.
Nc                v    Wn         W n        T;'       g    \        V4      V n        T;'       g    R .V n        R# )r   N)rP   r   rZ   r   r   )rA   rP   r   r   r   s   &&&&&r   rC   LexerContext.__init__  s0    	###d)&&vh
r   c                \    R V P                   : RV P                  : RV P                  : R2# )zLexerContext(z, ))rP   r   r   rH   s   &r   rI   LexerContext.__repr__  s)    tyym2dhh\DJJ>KKr   )r   r   r   rP   NN)	r+   r,   r-   r.   r/   rC   rI   r0   r1   r2   s   @r   r   r     s     'L Lr   c                   .   a  ] tR tRt o RtRR ltRtV tR# )r   i  z=
A RegexLexer that uses a context object to store its state.
Nc              #  t  "   V P                   pV'       g   \        V^ 4      pVR,          pM'TpW4P                  R,          ,          pVP                  p V EF  w  rgpV! WP                  VP
                  4      p	V	'       g   K.  Vez   \        V4      \        J d5   VP                  WyP                  4       3x  V	P                  4       Vn        M2V! W	V4       Rj  xL
  V'       g   W4P                  R,          ,          pVEe_   \        V\        4      '       d   V F  p
V
R8X  d9   \        VP                  4      ^8  d   VP                  P                  4        K@  KB  V
R8X  d/   VP                  P                  VP                  R,          4       Kw  VP                  P                  V
4       K  	  M\        V\        4      '       dB   \        V4      \        VP                  4      8  d   VP                  R MOVP                  VR1 M?VR8X  d.   VP                  P                  VP                  R,          4       MQ RT: 24       hW4P                  R,          ,          p EK  	   VP                  VP
                  8  d   R# WP                  ,          R8X  dC   R.Vn        VR,          pVP                  \         R3x  V;P                  ^,          un        EK  VP                  \"        WP                  ,          3x  V;P                  ^,          un        EK   ELG  \$         d     R# i ; i5i)	zg
Split ``text`` into (tokentype, text) pairs.
If ``context`` is given, use this lexer context instead.
r   Nr   r   r*  r,  rT   r   )r"  r   r   rP   r   r   r$   r	   r   rL   r   rZ   r   rM   r   r-  r   r   r   )rA   rP   contextr  r   r/  r0  r   r   r1  r   s   &&&        r   rk   )ExtendedRegexLexer.get_tokens_unprocessed  sb    
 LL	tQ'C#F+KC#IIbM2K88D/:+)T77CGG41)<:5"%''6779"<<&'eegCG'-ds';;;#,.7		".F ,%i77)2#(F?'*399~'9(+		 (:%*g%5$'II$4$4SYYr]$C$'II$4$4U$; *3 (	377"9~SYY?$'IIbM$'IIij$9&'1II,,SYYr];K,=i]*KK5&/		"&>G 0;Jww#'')GG},%+H	&/&7!ggtT111 ''5$ww-77GGqLGGQ <R " s]   A>L8AL8L#L8)FL8,L& L8	AL& L8">L&  L8&L51L84L55L8r   r;  )r+   r,   r-   r.   r/   rk   r0   r1   r2   s   @r   r   r     s     @ @r   c              #    "   \        V 4      p  \        V 4      w  r#RpRpT F  w  rgpTf   Tp^ p	T'       d~   T\        T4      ,           T8  dg   YY&,
           p
T
'       d   YGT
3x  T\        T
4      ,          pT F  w  rpYLT3x  T\        T4      ,          pK   	  Y&,
          p	 \        T 4      w  r#K  T	\        T4      8  g   K  YGYR 3x  T\        T4      T	,
          ,          pK  	  T'       dA   T;'       g    ^ pT F  w  rpYGT3x  T\        T4      ,          pK   	   \        T 4      w  r#KH  R#   \         d    T Rj  xL 
   R# i ; i  \         d    Rp K  i ; i  \         d    Rp R# i ; i5i)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.
NTF)iternextStopIterationrZ   )r   r
  r  r  realposinsleftr   rl   rm   olditmpvalit_indexit_tokenit_valueps   &&             r   r   r   S  s     j!Jj) GG a?G!c!f*-EI&F&((3v;&07,H113x=( 18 9D!%j!1w #a&=ah&&s1v}$G+ 0 ,,QGA!a-s1vG 	!*-NE7 E  4 !    	G	s   E;D6 E;A-E;&E3E;,E;4E;='E;%E' 2E;6EE	EE;EE;E$ E;#E$$E;'E84E;7E88E;c                   *   a  ] tR tRt o RtR tRtV tR# )ProfilingRegexLexerMetai  z>Metaclass for ProfilingRegexLexer, collects regex timing info.c                   a aaa \        V\        4      '       d.   \        VP                  VP                  VP                  R 7      oMVo\
        P                  ! SV4      o\        P                  3V VVV3R llpV# )r   c                 .  < SP                   R,          P                  S
S	3^ R.4      p\        P                  ! 4       pSP                  WV4      p\        P                  ! 4       pV^ ;;,          ^,          uu&   V^;;,          Wd,
          ,          uu&   V# )r+  r   r   )
_prof_data
setdefaulttimer   )rP   r   endposinfot0rest1r   compiledr  r   s   &&&    r   
match_func:ProfilingRegexLexerMeta._process_regex.<locals>.match_func  sn    >>"%00%3xHDB..F3CBGqLGGrwGJr   )	rL   r   r   r   r   r   r   sysmaxsize)r   r   r   r   rY  rX  r  s   f&&f @@r   r   &ProfilingRegexLexerMeta._process_regex  s]    eU##EKK#(<<1C C::c6*), 	 	 r   r   N)r+   r,   r-   r.   r/   r   r0   r1   r2   s   @r   rM  rM    s     H r   rM  c                   6   a  ] tR tRt o Rt. t^tRR ltRtV t	R# )ProfilingRegexLexeri  zFDrop-in replacement for RegexLexer that does profiling of its regexes.c              #  n  a "   S P                   P                  P                  / 4       \        P	                  S W4       R j  xL
  S P                   P                  P                  4       p\        R VP                  4        4       V 3R lRR7      p\        R V 4       4      p\        4        \        RS P                   P                  \        V4      V3,          4       \        R4       \        R:R R	R
:R R24       \        R4       V F  p\        RV,          4       K  	  \        R4       R #  L5i)Nc              3      "   T FW  w  w  rw  r4V\        V4      P                  R 4      P                  RR4      R,          VRV,          RV,          V,          3x  KY  	  R# 5i)zu'z\\\:NA   Ni  N)reprr^   r]   ).0r   rnrl   s   &    r   	<genexpr>=ProfilingRegexLexer.get_tokens_unprocessed.<locals>.<genexpr>  sZ      @/>+FQFQ 47==/77EcJ4!8TAX\3/>s   AA!c                 *   < V SP                   ,          # rj   )_prof_sort_index)r   rA   s   &r   r   <ProfilingRegexLexer.get_tokens_unprocessed.<locals>.<lambda>  s    Ad&;&;$<r   T)keyreversec              3   2   "   T F  q^,          x  K  	  R# 5i)   Nr   )re  r   s   & r   rh  ri    s     +d!ds   z2Profiling result for %s lexing %d chars in %.3f msr   20 r   64z ncalls  tottime  percallz%-20s %-65s %5d %8.4f %8.4fzn==============================================================================================================zn--------------------------------------------------------------------------------------------------------------)rG   rP  rM   r   rk   r   sortedr  sumprintr+   rZ   )rA   rP   r   rawdatar   	sum_totalr)   s   f&&    r   rk   *ProfilingRegexLexer.get_tokens_unprocessed  s     !!((,44T4GGG..++//1 @/6}}@ ="	$
 +d++	B~~&&D	9=> 	?iIJiA/!34 i# 	Hs   ?D5D3C1D5r   Nr3  )
r+   r,   r-   r.   r/   rP  rk  rk   r0   r1   r2   s   @r   r_  r_    s     PJ r   r_  )r   r   r   r   r   r   r   r   r   r   r   r   line_re))s   ﻿zutf-8)s     zutf-32)s     zutf-32be)s   zutf-16)s   zutf-16be)6r/   r   r[  rR  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   rz  rX   staticmethod_default_analyser$   r!   r   r   rV   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rM  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1Y d1N^. ^BL LE EP=@n ,*0G r   