o
    Zh                     @   sD  d Z ddlZddlZddlmZmZmZmZmZm	Z	m
Z
mZmZmZmZmZ ddlmZmZ ddlmZmZmZmZmZmZmZmZmZmZmZmZ ddl m!Z" g dZ#G dd	 d	eZ$e$Z%G d
d deZ&G dd deZ'G dd deZ(G dd deZ)e)Z*G dd deZ+G dd deZ,G dd deZ-G dd de$Z.dS )z
    pygments.lexers.python
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexers for Python and related languages.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    N)DelegatingLexerLexer
RegexLexerincludebygroupsusingdefaultwordscombineddo_insertionsthisline_re)get_bool_optshebang_matches)TextCommentOperatorKeywordNameStringNumberPunctuationGenericOtherError
Whitespace)	unistring)PythonLexerPythonConsoleLexerPythonTracebackLexerPython2LexerPython2TracebackLexerCythonLexerDgLexer
NumPyLexerc                !   @   s  e Zd ZdZdZdZg dZg dZg dZde	j
e	jf Zdd	 Zd
d Zi ddefdeeejejfdeeejejfdejfdejfdefdefededdeeedfdeeedfdeejedfdeejedfedgddeejejed d!fd"eejejed d#fd$eejejed d%fd&eejejed d'fd(eejejed)d!fd*eejejed)d#fd+eejejed)d%fd,eejejed)d'fd-eejejd.fd/eejejd0fd1eejejd2fd3eejejd4fd5eejejed6d.fd7eejejed6d0fd8eejejed6d2fd9eejejed6d4fd:eejejed;d.fd<eejejed;d0fd=eejejed;d2fd>eejejed;d4fd?efed@dAefdBefdCejfedDedEedFedGedHgdIdJedKfdLej dMfdNej dMfdOefedgdKdJedKfdPedMfdOefedgdDe!dQdRdSefe!dTdRdSej"fgde!dUdRdSefe!dTdRdSej"fgddVdW#e$j% dX eeedYfgdYdZeee&e'efe(dMgdEe!d[d\dRd]e)j*fd^e)j*j+fe!d_d\dRd]e)j,fgdFe!d`dRdSe)j-j.fgdGe!dadRdSe)j/j.fgd@dbe0j1fdce0j1fdde0j2fdee0j3fdfe0j4fdge0j5fgdHdhe e)j6fdhefee)fgdedFee)j-dMfe(dMgdee)j7dMfgddieeeefdje)jfee)jfdkeeeefe(dMgddleeejdMfdje)jfdmej"dMfee)jfe(dMgi d dnej8fdoej8fgd)ed ed6gd;dpej8fgd6dqej8fed;gdreejdseejdteejdueejd%dvejdMfdwej8fedsgd'dxejdMfdyej8fedrgd2dvejdMfdwej8fedugd4dxejdMfdyej8fedtgd!dzejdMfedsdejfgd#d{ejdMfedrdejfgd.dzejdMfedudejfgd0d{ejdMfedtdejfgZ9d|d} Z:d~S )r   z
    For Python source code (version 3.x).

    .. versionadded:: 0.10

    .. versionchanged:: 2.5
       This is now the default ``PythonLexer``.  It is still available as the
       alias ``Python3Lexer``.
    Pythonhttps://www.python.org)pythonpysagepython3py3bazelstarlark)z*.pyz*.pywz*.pyiz*.jyz*.sagez*.sc
SConstruct
SConscriptz*.bzlBUCKBUILDzBUILD.bazel	WORKSPACEz*.tac)ztext/x-pythonzapplication/x-pythonztext/x-python3zapplication/x-python3z	[%s][%s]*c                 C   s&   dt jfdt jfd| fd| fd| fgS )NzH%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsaux%]zg\{((\w+)((\.\w+)|(\[[^\]]+\]))*)?(\![sra])?(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?\}z[^\\\'"%{\n]+[\'"\\]z%|(\{{1,2})r   Interpolttype r8   M/var/www/html/lang_env/lib/python3.10/site-packages/pygments/lexers/python.pyinnerstring_rulesC   s   zPythonLexer.innerstring_rulesc                 C   s"   dt jfdt jdfd| fd| fgS )Nz\}z\{expr-inside-fstringz[^\\\'"{}\n]+r3   r4   r6   r8   r8   r9   fstring_rulesW   s
   
zPythonLexer.fstring_rulesroot\n&^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")&^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')\A#!.+$#.*$\\\n\\keywordszsoft-keywords(def)((?:\s|\\\s)+)funcname(class)((?:\s|\\\s)+)	classname(from)((?:\s|\\\s)+)
fromimport(import)((?:\s|\\\s)+)importexprz(?i)(rf|fr)(""")ZrfstringescapeZtdqfz(?i)(rf|fr)(''')Ztsqfz(?i)(rf|fr)(")Zdqfz(?i)(rf|fr)(')Zsqfz([fF])(""")Zfstringescapez([fF])(''')z	([fF])(")z	([fF])(')z(?i)(rb|br|r)(""")tdqsz(?i)(rb|br|r)(''')tsqsz(?i)(rb|br|r)(")dqsz(?i)(rb|br|r)(')sqsz([uU]?)(""")stringescapez([uU]?)(''')z
([uU]?)(")z
([uU]?)(')z([bB])(""")Zbytesescapez([bB])(''')z	([bB])(")z	([bB])(')[^\S\n]+numbersz!=|==|<<|>>|:=|[-~+/*%=<>&^|.][]{}:(),;[](in|is|and|or|not)\bzexpr-keywordsbuiltins
magicfuncs	magicvarsnamer;   z[{([]zexpr-inside-fstring-innerz(=\s*)?(\![sraf])?\}#popz(=\s*)?(\![sraf])?:\s+z[])}])z	async forawaitelseforiflambdayield
yield from\bsuffix)TrueFalseNone)assertasyncr^   breakcontinuedelelifr_   exceptfinallyr`   globalra   rb   passraisenonlocalreturntrywhilerc   rd   aswithz6(^[ \t]*)(match|case)\b(?![ \t]*(?:[:,;=^&|@~)\]}]|(?:|z)\b))zsoft-keywords-innerz(\s+)([^\n_]*)(_\b))C
__import__absaiterallanybinbool	bytearray
breakpointbytescallablechrclassmethodcompilecomplexdelattrdictdirdivmod	enumerateevalfilterfloatformat	frozensetgetattrglobalshasattrhashhexidinputint
isinstance
issubclassiterlenlistlocalsmapmax
memoryviewminnextobjectoctopenordpowprintpropertyrangereprreversedroundsetsetattrslicesortedstaticmethodstrsumsupertupletypevarszip(?<!\.)prefixrg   z+(?<!\.)(self|Ellipsis|NotImplemented|cls)\b)EArithmeticErrorAssertionErrorAttributeErrorBaseExceptionBufferErrorBytesWarningDeprecationWarningEOFErrorEnvironmentError	ExceptionFloatingPointErrorFutureWarningGeneratorExitIOErrorImportErrorImportWarningIndentationError
IndexErrorKeyErrorKeyboardInterruptLookupErrorMemoryError	NameErrorNotImplementedErrorOSErrorOverflowErrorPendingDeprecationWarningReferenceErrorResourceWarningRuntimeErrorRuntimeWarningStopIterationSyntaxErrorSyntaxWarningSystemError
SystemExitTabError	TypeErrorUnboundLocalErrorUnicodeDecodeErrorUnicodeEncodeErrorUnicodeErrorUnicodeTranslateErrorUnicodeWarningUserWarning
ValueErrorVMSErrorWarningWindowsErrorZeroDivisionErrorBlockingIOErrorChildProcessErrorConnectionErrorBrokenPipeErrorConnectionAbortedErrorConnectionRefusedErrorConnectionResetErrorFileExistsErrorFileNotFoundErrorInterruptedErrorIsADirectoryErrorNotADirectoryErrorPermissionErrorProcessLookupErrorTimeoutErrorStopAsyncIterationModuleNotFoundErrorRecursionErrorEncodingWarning)^__abs____add__
__aenter__	__aexit__	__aiter____and__	__anext__	__await____bool__	__bytes____call____complex____contains____del____delattr__
__delete____delitem____dir__
__divmod__	__enter____eq____exit__	__float____floordiv__
__format____ge____get____getattr____getattribute____getitem____gt____hash____iadd____iand____ifloordiv____ilshift____imatmul____imod____imul__	__index____init____instancecheck____int__
__invert____ior____ipow____irshift____isub____iter____itruediv____ixor____le____len____length_hint__
__lshift____lt__
__matmul____missing____mod____mul____ne____neg____new____next____or____pos____pow____prepare____radd____rand____rdivmod____repr____reversed____rfloordiv____rlshift____rmatmul____rmod____rmul____ror__	__round____rpow____rrshift__
__rshift____rsub____rtruediv____rxor____set____setattr____setitem____str____sub____subclasscheck____truediv____xor__)__annotations__	__bases__	__class____closure____code____defaults____dict____doc____file____func____globals____kwdefaults__
__module____mro____name____objclass____qualname____self__	__slots____weakref__zT(\d(?:_?\d)*\.(?:\d(?:_?\d)*)?|(?:\d(?:_?\d)*)?\.\d(?:_?\d)*)([eE][+-]?\d(?:_?\d)*)?z!\d(?:_?\d)*[eE][+-]?\d(?:_?\d)*j?z0[oO](?:_?[0-7])+z0[bB](?:_?[01])+z0[xX](?:_?[a-fA-F0-9])+z\d(?:_?\d)*@(\s+)(as)(\s+)z\.(\s*)(,)(\s*)z(\s+)(import)\bNone\bz\{\{z\}\}z0\\([\\abfnrtv"\']|\n|x[a-fA-F0-9]{2}|[0-7]{1,3})z,\\(N\{.*?\}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8})zfstrings-singlezfstrings-doublestrings-singlestrings-double"\\\\|\\"|\\\n'\\\\|\\'|\\\n"""'''c                 C   s   t | dpd| d d v S )Npythonw?(3(\.\d)?)?import   r   textr8   r8   r9   analyse_text  s   
zPythonLexer.analyse_textN);rt  rr  rv  rm  r[   urlaliases	filenames	mimetypesuniZ	xid_startZxid_continueZuni_namer:   r<   r   r   r   AffixDocr   HashbangSingler   r   r   	NamespaceDoubler
   r   r   Wordr5   r	   Constantjoinkeywordkwlistr   r   r   r   BuiltinPseudor   FunctionMagicVariabler   FloatOctBinHexInteger	DecoratorClassEscapetokensr  r8   r8   r8   r9   r      s   
Sagox

   

  0  I  R  [  `
  e
  h  o
  x  |           
    
	    

    
    
    
    
    
     
    %
    *
    /
    6r   c                "   @   s  e Zd ZdZdZdZddgZg ZddgZdd	 Z	i d
de
fdee
ejejfdee
ejejfdefdejfdejfdefdefdefdejfdefeddeeedfdeeedfdeejedfdeejedfeded ed!ed"d#eejejd$fd%eejejd&fd'eejejd(fd)eejejd*fd+eejejed,d$fd-eejejed,d&fd.eejejed,d(fd/eejejed,d*fed0ed1gded2d3d4efgded5d6d3d7ejfd8ejjfed9d6d3d7ejfgd ed:d3d4ej j!fgd!ed;d3d4ej"j!fgd1d<e#j$fd=e#j$fd>e#j%fd?e#j&fd@e#j'fdAe#j(j)fdBe#j(fgd"dCej*fgd0dDej+fdEefgded dEej dFfe,dFgddEej-dFfgddGefdHejfdIefdJejfe,dFgddGefdKejdFfdLejjdFfdMejfe,dFgd,dNej.fgdOe	ejdPe	ejd(dQejdFfdRej.fedPgd*dSejdFfdTej.fedOgdUejdFfedPdejfgdVejdFfedOdejfgdWZ/dXdY Z0dZS )[r    a  
    For Python 2.x source code.

    .. versionchanged:: 2.5
       This class has been renamed from ``PythonLexer``.  ``PythonLexer`` now
       refers to the Python 3 variant.  File name patterns like ``*.py`` have
       been moved to Python 3 as well.
    z
Python 2.xr&   python2py2ztext/x-python2zapplication/x-python2c                 C   s   dt jfd| fd| fd| fgS )NG%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%][^\\\'"%\n]+r3   %r4   r6   r8   r8   r9   r:     s   zPython2Lexer.innerstring_rulesr=   r>   r?   r@   rT   rA   rB   rV   rC   rD   rW   z!=|==|<<|>>|[-~+/*%=<>&^|.]rE   rF   rG   rH   rI   rJ   rK   rL   rM   rX   rY   rZ   backtickz!([rR]|[uUbB][rR]|[rR][uUbB])(""")rO   z!([rR]|[uUbB][rR]|[rR][uUbB])(''')rP   z([rR]|[uUbB][rR]|[rR][uUbB])(")rQ   z([rR]|[uUbB][rR]|[rR][uUbB])(')rR   z([uUbB]?)(""")rS   z([uUbB]?)(''')z([uUbB]?)(")z([uUbB]?)(')r[   rU   )rk   rm   rn   ro   rp   r_   rq   execrr   r`   rs   ra   rb   rt   r   ru   rw   rx   ry   rc   rd   rz   r{   re   rf   )Nr}   r~   r   r   apply
basestringr   r   bufferr   r   r   r   r   cmpcoercer   r   r   r   r   r   r   r   execfileexitfiler   r   r   r   r   r   r   r   r   r   r   internr   r   r   r   r   r   longr   r   r   r   r   r   r   r   r   r   r   	raw_inputreducereloadr   r   r   r   r   r   r   r   r   r   r   r   r   unichrunicoder   xranger   r   r   z;(?<!\.)(self|None|Ellipsis|NotImplemented|False|True|cls)\b)1r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   OverflowWarningr   r   r   r   StandardErrorr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )_r  r	  r  r  Z__cmp__Z
__coerce__r  r  r  r  r  r  Z__delslice____div__r  r  r  r  r  r  r!  r"  r#  r$  r%  Z__getslice__r&  r'  Z__hex__r(  r)  Z__idiv__r*  r+  r-  r.  r/  r0  r1  r2  r3  Z__iop__r4  r5  r6  r7  r8  r9  r:  r;  r<  Z__long__r>  r?  rA  rB  rC  rD  rE  rF  __nonzero__Z__oct__Z__op__rH  rI  rJ  rL  rM  Z__rcmp__Z__rdiv__rN  rO  rP  rQ  rR  rT  rU  Z__rop__rV  rX  rY  rZ  r[  r\  r]  r^  r_  r`  Z__setslice__ra  rb  rc  rd  __unicode__re  )rg  rh  ri  rj  rk  rl  rm  rn  ro  rp  Z__metaclass__rr  rs  rt  rw  rx  ry  z'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?z\d+[eE][+-]?[0-9]+j?z	0[0-7]+j?z
0[bB][01]+0[xX][a-fA-F0-9]+\d+Lz\d+j?`.*?`z@[\w.]+[a-zA-Z_]\w*r\   z(?:[ \t]|\\\n)+as\b,[a-zA-Z_][\w.]*zimport\br}  [a-zA-Z_.][\w.]*Y\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})r~  r  r  r  r  r  r  r  )rO   rP   c                 C   s
   t | dS )Nzpythonw?2(\.\d)?r  r  r8   r8   r9   r  {  s   
zPython2Lexer.analyse_textN)1rt  rr  rv  rm  r[   r  r  r  r  r:   r   r   r   r  r  r   r   r  r  r   r   r  r   r   r  r  r
   r	   r   r  r  r   r  r  r  r   r  r  r  r  r  LongBacktickr  r   r  r  r  r  r8   r8   r8   r9   r      s   	-5Wmv
   
  
    
  "  
&  
'  (
  -
  
3
  >r    c                   @   s   e Zd ZdZdgZdgZ	 deeje	j
dfdeejefde	jdfd	e	jdfd
ejfgdeeje	j
fdeejefedgdedfdeejefd
e	jfgdZdS )_PythonConsoleLexerBasePython console sessionpycontext/x-python-doctestz(>>> )(.*\n)continuationsz	(>>>)(\n)z,(\^C)?Traceback \(most recent call last\):\n	tracebackz  File "[^"]+", line \d+z.*\nz(\.\.\. )(.*\n)z(\.\.\.)(\n)r\   z(?=>>>( |$))z(KeyboardInterrupt)(\n))r=   r  r  N)rt  rr  rv  r[   r  r  r   r   Promptr   Coder   	TracebackOutputr   r   r   r  r  r8   r8   r8   r9   r  ~  s(    

	
r  c                       s0   e Zd ZdZdZdgZdgZ fddZ  ZS )r   a  
    For Python console output or doctests, such as:

    .. sourcecode:: pycon

        >>> a = 'foo'
        >>> print(a)
        foo
        >>> 1 / 0
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        ZeroDivisionError: integer division or modulo by zero

    Additional options:

    `python3`
        Use Python 3 lexer for code.  Default is ``True``.

        .. versionadded:: 1.0
        .. versionchanged:: 2.5
           Now defaults to ``True``.
    r  r  r  c                    sT   t |dd}|rt t}nt t}G  fdddt}t j||tj	fi | d S )Nr*   Tc                       s   e Zd Z fddZ  ZS )z6PythonConsoleLexer.__init__.<locals>._ReplaceInnerCodec                    s   t  jttjfi | d S N)r   r0  r  r   r  )selfoptions)rh  pylexerr8   r9   r0    s   z?PythonConsoleLexer.__init__.<locals>._ReplaceInnerCode.__init__)rt  rr  rv  r0  __classcell__r8   r  rh  r9   _ReplaceInnerCode  s    r  )
r   r   r   r    r!   r   r   r0  r   r  )r  r  r*   Ztblexerr  r  r  r9   r0    s   zPythonConsoleLexer.__init__)	rt  rr  rv  rm  r[   r  r  r0  r  r8   r8   r  r9   r     s    r   c                   @   s   e Zd ZdZdZddgZddgZddgZd	efd
e	j
dfde	j
fde	j
fde	j
dfdefgdeeejeeeeefdeeejeeefdeeeeedfdeeeefdee	jeeedfdee	jedfedgdeeejedfedgdZdS )r   a   
    For Python 3.x tracebacks, with support for chained exceptions.

    .. versionadded:: 1.0

    .. versionchanged:: 2.5
       This is now the default ``PythonTracebackLexer``.  It is still available
       as the alias ``Python3TracebackLexer``.
    zPython Tracebackpytbpy3tbz*.pytbz*.py3tbztext/x-python-tracebackztext/x-python3-tracebackr>   z-^(\^C)?Traceback \(most recent call last\):\nintbzH^During handling of the above exception, another exception occurred:\n\nzI^The above exception was the direct cause of the following exception:\n\n^(?=  File "[^"]+", line \d+)^.*\n0^(  File )("[^"]+")(, line )(\d+)(, in )(.+)(\n)%^(  File )("[^"]+")(, line )(\d+)(\n)^(    )(.+)(\n)markers^([ \t]*)(\.\.\.)(\n)^([^:]+)(: )(.+)(\n)r\   z^([a-zA-Z_][\w.]*)(:?\n)z^( {4,})([~^]+)(\n))r=   r  r  N)rt  rr  rv  rm  r[   r  r  r  r   r   r  r   r   r   r   r  r   r   r   r   r   r   r   Markerr  r8   r8   r8   r9   r     sX    




r   c                   @   s   e Zd ZdZdZdgZdgZdgZdee	e
jdfde
jdfd	efgd
ee	eje	ee	eefdee	eje	eefdee	eeedfdee	eefdee
je	eedfdee
jedfgdee	ejdfedgdZdS )r!   z
    For Python tracebacks.

    .. versionadded:: 0.7

    .. versionchanged:: 2.5
       This class has been renamed from ``PythonTracebackLexer``.
       ``PythonTracebackLexer`` now refers to the Python 3 variant.
    zPython 2.x Tracebackpy2tbz*.py2tbztext/x-python2-tracebackz^(\^C)?(Traceback.*\n)r  r  r  r  r  r  markerr  r  r\   z^([a-zA-Z_]\w*)(:?\n)z( {4,})(\^))r=   r  r  N)rt  rr  rv  rm  r[   r  r  r  r   r   r   r  r   r   r  r   r   r   r    r   r   r   r  r   r  r8   r8   r8   r9   r!   	  sF    




r!   c                   @   s  e Zd ZdZdZdZg dZg dZddgZi dg d	e	fd
e
e	ejfde
e	ejfdefdefdefde	fdefdejfde
eejefdefde
eejeeeeefedde
eedfde
eedfde
eefde
eedfde
eedfde
eed fed!ed"d#ed$fd%ed&fd'ed(fd)ed*fd+eed,d$fd-eed,d&fd.eed,d(fd/eed,d*fed0ed1ded2d3d4efd5ejfgd!ed6d7d3d8ejfd9ejjfed:d7d3d8ejfgd1d;ejfd<ejfd=ej fd>ejj!fd?ejfgd"d@ej"fgd0dAej#fdBefgddBej$dCfgddDej%fdEefdFe
ej$edCfdGe
ej$eefdHedCfdIefdJedCfdKedCfdBejfdLefg
ddBej&dCfgd dMe
eeefdNej'fdOe
eeefe(dCgddPe
eedCfdQej'fe(dCgd,dRej)fgdSdTej*fdUefdVefdWefgdXd	efgd(dYedCfdZej)fedSgd*d[edCfd\ej)fedSgd$d]edCfedSedXgd&d^edCfedSedXgiZ+d_S )`r"   zF
    For Pyrex and Cython source code.

    .. versionadded:: 1.1
    Cythonzhttps://cython.org)cythonpyxpyrex)z*.pyxz*.pxdz*.pxiztext/x-cythonzapplication/x-cythonr=   r>   z^(\s*)("""(?:.|\n)*?""")z^(\s*)('''(?:.|\n)*?''')rT   rB   rV   rC   rD   rW   z(<)([a-zA-Z0-9.?]+)(>)z!=|==|<<|>>|[-~+/*%=<>&^|.?]z(from)(\d+)(<=)(\s+)(<)(\d+)(:)rE   z(def|property)(\s+)rG   z(cp?def)(\s+)Zcdefz	(cdef)(:)z(class|struct)(\s+)rI   z(from)(\s+)rK   z(c?import)(\s+)rM   rX   r  z(?:[rR]|[uU][rR]|[rR][uU])"""rO   z(?:[rR]|[uU][rR]|[rR][uU])'''rP   z(?:[rR]|[uU][rR]|[rR][uU])"rQ   z(?:[rR]|[uU][rR]|[rR][uU])'rR   z[uU]?"""rS   z[uU]?'''z[uU]?"z[uU]?'r[   rU   )rk   rl   r^   rm   Zbyrn   Zctypedefro   rp   r_   rq   zexcept?r  rr   r`   ZfusedZgilrs   ra   r   rb   Znogilrt   r   ru   rw   rx   ry   rc   rz   r{   re   rf   z(DEF|IF|ELIF|ELSE)\b)Qr}   r~   r   r   r  r  r   Zbintr   r  r   r   r   r   r   r  r  r   r   r   r   r   r   r   r   r  r  r  r   r   r   r   r   r   r   r   r   r   r   r  r   r   r   r   r   r   r  r   r   r   r   r   r   r   r   r   r   Z
Py_ssize_tr   r  r  r  r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  Zunsignedr   r  r   r   r   z<(?<!\.)(self|None|Ellipsis|NotImplemented|False|True|NULL)\b)0r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   NotImplementedr   r   r   r  r   r   r   r   r  r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   z&(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?z0\d+r  r  z\d+r  z@\w+r  r\   z%(public|readonly|extern|api|inline)\bz(struct|enum|union|class)\bz([a-zA-Z_]\w*)(\s*)(?=[(:#=]|$)z([a-zA-Z_]\w*)(\s*)(,)zfrom\br  :z	(?=["\']).r{  r  r|  z(\s+)(c?import)\br  r  stringszP%(\([a-zA-Z0-9]+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]r  r3   r  nlr  r  r  r  r  r  N),rt  rr  rv  rm  r[   r  r  r  r  r   r   r   r  r   r   r   r   r  r   Typer   r  r   r   r
   r	   Preprocr  r  r   r  r  r  r  r  r  r  Reservedr  r  r   r  r5   r  r8   r8   r8   r9   r"   9  s   	
 !"#&/Q
X[_
bp
sy             
r"   c                   @   sz  e Zd ZdZdZdgZdgZdgZdefde	j
fdejfdejfd	ejfd
ejfdejfdejfdeedddfdeedddfdeedddfdeedddfdefdejfdefeddddejfeddddejfdejjfd ejfd!ejfd"ejfd#efd$ejfd%efd&efd'efgd(ejfgd)ej fd*efd+efd,efd-efgd.ed/fgd0ed/fgd1ed/fgd2ed/fgd3Z!d4S )5r#   z
    Lexer for dg,
    a functional and object-oriented programming language
    running on the CPython 3 VM.

    .. versionadded:: 1.6
    dgz*.dgz	text/x-dgr]   z#.*?$z(?i)0b[01]+z(?i)0o[0-7]+z(?i)0x[0-9a-f]+z((?i)[+-]?[0-9]+\.[0-9]+(e[+-]?[0-9]+)?j?z(?i)[+-]?[0-9]+e[+-]?\d+j?z(?i)[+-]?[0-9]+j?z(?i)(br|r?b?)'''rS   rP   stringz(?i)(br|r?b?)"""rO   z(?i)(br|r?b?)'rR   z(?i)(br|r?b?)"rQ   z`\w+'*`z\b(and|in|is|or|where)\bz[!$%&*+\-./:<-@\\^|~;,]+)r   r   r   r   r   r   zdict'r   r   r   r   zlist'r   r   r   r   r   zset'r   r   r   r   r   ztuple'r   r   z
(?![\'\w])r   )=r}   r~   r   r   r   bindr   r  r   r   r   r   r   Zdrop	dropwhiler   r   Zexhaustr   flipzfoldl1?r   Zfstr   r   r   r   headr   r   initr   r   r   r   Ziteratelastr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   zscanl1?Zsndr   r   tailtake	takewhiler   r   z>(?<!\.)(self|Ellipsis|NotImplemented|None|True|False)(?!['\w])z3(?<!\.)[A-Z]\w*(Error|Exception|Warning)'*(?!['\w])zT(?<!\.)(Exception|GeneratorExit|KeyboardInterrupt|StopIteration|SystemExit)(?!['\w])z_(?<![\w.])(except|finally|for|if|import|not|otherwise|raise|subclass|while|with|yield)(?!['\w])z[A-Z_]+'*(?!['\w])z[A-Z]\w+'*(?!['\w])z\w+'*z[()]r  r  r  r  r3   r  r>   r  r\   r  r  r  )r=   rS   r  rQ   rR   rO   rP   N)"rt  rr  rv  rm  r[   r  r  r  r   r   r  r   r  r  r  r  r  r   r
   r   r  r	   r   r  r  r   r   r  r  r   r   r  r5   r  r8   r8   r8   r9   r#     s    	
9
r#   c                   @   s>   e Zd ZdZdZdZdgZg Zg Zh dZ	dd Z
dd	 Zd
S )r$   z[
    A Python lexer recognizing Numerical Python builtins.

    .. versionadded:: 0.10
    NumPyzhttps://numpy.org/numpy>  dumpsnansplitZ
bitwise_orr~   ZallcloseZix_ZsetflagsZhsplitZtypeDictZarray_equalZ
setbufsizeZargsortZitemsetZarray2stringZ
atleast_3dZtostringZ
asanyarrayZmgridZasarrayZrot90ZasmatrixZset_numeric_opsZfliplrflattensinZset_printoptionsZ
less_equalZarcsinmodZcommon_typefabsZpkgloadZsetxor1dr   ZgreaterZhanningZ
fromarraysdifftestmeanZintersect1d_nuZputmaskZmatmaximumZweibullZ	transposeZvanderZlogspaceZranfsortappendZsqueezer   putZ	ones_likeZnewbyteorderinsertZpolyfitZ	histogramZrollaxisZissubsctypeZndenumerater   Zget_numpy_includeZnonzeroZargwhereZ	piecewisevarZfromfunctionZs_Zgreater_equalZapply_along_axiscosZalterdotZarray_splitZsolveZediff1dshuffleinfZunique1dZfft
accumulateZdiagsizeZaverageZargminseedZptpr   ZasscalarZ
arrayrangeZsincZpolyextractZchooseouterrepeatisnanZreshapeZ	newbufferlogZget_printoptionsmatrix	broadcastZbinary_reprZarangeimagsourceZasfortranarraysinhZstdZconcatenateZright_shiftZ
issubdtypeZastypeZbincountZ
getbufsizeZfftshiftZ
left_shiftlessZconjZissctypeZround_floorZsvdZ
atleast_1dmodfZsctype2charZtricoshlogical_xorZdiagonalZstandard_normalZ	iscomplexZogridZ
fromstringtanhZpolyderZmsortZ
restoredotZcolumn_stackZget_array_wrapZ	base_reprexpm1multiplyZ
zeros_likeselectZarray_equivZisposinfZsignbitZhistogram2dZvonmisesZzerosZdtypeZintersect1dloadsZvstackZisscalarZgumbelZlogical_notZ
atleast_2dZhistogramddprodtanZbitwise_xorceilZarctan2Zbyte_boundssqrtZargmaxZdiagflattolistZ
empty_likeZ	geterrobjZclip
logical_orZ
geterrcallZ	isrealobjsampleZflatZdigitizeZlinspacerealZ	row_stackZpolymulZbartlettZswapaxes	not_equal	conjugateZbitwise_andZblackmanZfromiterZ
frombufferdeleteZmedianabsoluteexpZ	nanargminr   divideZpoly1dZhstackZkronZpermutationZshow_configZasarray_chkfiniteZsetfieldZconvolveZflipudZnanmaxtraceviewZndindexZcompare_chararraysZcumprodcrossZexpand_dimsZiscomplexobjZmintypecodeZravelhypotZc_ZcumsumZkaiserZsearchsortedZarccosZarccoshZ	tensordotZvdotr  ZfftfreqZhammingZunion1dZonesZlstsqZrecarraybyteswapZbitwise_notZalltrueZpolyintZfinfoZloadtxtZ	isfortranZpoissonZrandom_samplesubtractuniqueZ
array_reprZcorrcoefZapply_over_axesZint_asbufferZdsplitpowerrootsinvfromfileZtriuuniformZtrapz	getbuffertypenameloadZ	deprecateldexpaddidentityZ
obj2sctypeZisrealZ	index_expZsquareZ
trim_zerosZarctanhfillZcovZget_includetofileZvsplitZtrue_divideemptyinvertnegativefmodZarctandotZsometrueZbinomialZpinvZseterrZsort_complexZgetfieldZarcsinharoundZ	nanargmaxZget_numarray_includeZ	setdiff1dZset_string_functionZfastCopyAndTransposeiterablelogical_andZlexsortshapeisfiniter  log2ZpolydivZr_alenZrintinfor   ZnansuminterpZ
frompyfuncZsavetxtZreal_if_closeisinfproductZ	vectorizeZpolyvalarrayZ
nan_to_numdumpcopyZfloor_divideZ	array_strZbmatZ	correlatefrexpZ
cumproductinnerZrankresizeequallog1pZmeshgridbetaeyeminimumZtrilZasfarrayZrandom_integersZunravel_indexr   Z	seterrobjrandintZnanmincompressZmaximum_sctypeZfixZnewaxisZgradientZpolyaddZdispZissubclass_ndimZpolysubZsetmember1dZisneginfZaminindicesZifftZamaxZwhoZplaceZgenericsignr   ZangleZtileZascontiguousarrayZmay_share_memoryitemrequirewhereZdstackZ
seterrcallunwraplog10Zroll	remainderZcan_castZ
reciprocalZflatnonzeroZgeterrZi0c                 c   sL    t | |D ]\}}}|tu r|| jv r|tj|fV  q|||fV  qd S r  )r   get_tokens_unprocessedr   EXTRA_KEYWORDSr   r  )r  r  indextokenvaluer8   r8   r9   r}    s   
z!NumPyLexer.get_tokens_unprocessedc                 C   s.   | d d }t | dsd|v od|v pd|v S )Nr  r  r  zimport numpyzfrom numpy importr  )r  ltextr8   r8   r9   r    s   
zNumPyLexer.analyse_textN)rt  rr  rv  rm  r[   r  r  r  r  r~  r}  r  r8   r8   r8   r9   r$   P  s    Cr$   )/rm  rer  Zpygments.lexerr   r   r   r   r   r   r   r	   r
   r   r   r   Zpygments.utilr   r   Zpygments.tokenr   r   r   r   r   r   r   r   r   r   r   r   pygmentsr   r  __all__r   Python3Lexerr    r  r   r   Python3TracebackLexerr!   r"   r#   r$   r8   r8   r8   r9   <module>   s0    
88    ^$.60 5c