a
    €˜ëj.Õ  ã                   @   s0  d 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 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-present by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    N)	ÚDelegatingLexerÚ
RegexLexerÚincludeÚbygroupsÚusingÚdefaultÚwordsÚcombinedÚthis)Ú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                $   @   sV  e Zd ZdZdZdZg d¢Zg d¢Zg d¢ZdZ	de
j› d	e
j› d
�Zdd„ Zdd„ Z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ejeƒdfdeejeejeƒdfd eejeƒdfd!eejeƒdfed"ƒg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d0eejejƒed-d+ƒfd1eejejƒd2fd3eejejƒd4fd5eejejƒd6fd7eejejƒd8fd9eejejƒed:d2ƒfd;eejejƒed:d4ƒfd<eejejƒed:d6ƒfd=eejejƒed:d8ƒfd>eejejƒed?d2ƒfd@eejejƒed?d4ƒfdAeejejƒed?d6ƒfdBeejejƒed?d8ƒfdCefedDƒdEefdFefdGej fedHƒedIƒedJƒedKƒedLƒgdMedNfdOej!dPfdQej!dPfdRefed"ƒgdMedNfdSedPfdRefed"ƒge"dTdUdV�efe"dWdUdV�ej#fge"dXdUdV�efe"dWdUdV�ej#fgdYdZ $d[d\„ e%j&D ƒ¡ d] eeeƒd^fgd_eee'e(ƒeƒfe)dPƒge"d`dadUdb�e*j+fdce*j+j,fe"dddadUdb�e*j-fge"dedUdV�e*j.j/fge"dfdUdV�e*j0j/fgdge1j2fdhe1j2fdie1j3fdje1j4fdke1j5fdle1j6fgdme e*j7fdmefee*fgedJƒee*j.dPfe)dPƒgee*j8dPfgdneeeeƒfdoe*jfee*jfdpeeeeƒfe)dPƒgdqeeejƒdPfdoe*jfdrej#dPfee*jfe)dPƒgdsej9fdtej9fged$ƒed:ƒgduej9fgdvej9fed?ƒgeejƒeejƒeejƒeejƒdwejdPfdxej9fedyƒgdzejdPfd{ej9fed|ƒgdwejdPfdxej9fed}ƒgdzejdPfd{ej9fed~ƒgdejdPfedyƒdejfgd€ejdPfed|ƒdejfgdejdPfed}ƒdejfgd€ejdPfed~ƒdejfgd�œ!Z:d‚dƒ„ Z;d„S )…r   z¹
    For Python source code (version 3.x).

    .. versionchanged:: 2.5
       This is now the default ``PythonLexer``.  It is still available as the
       alias ``Python3Lexer``.
    ÚPythonúhttps://www.python.org)ÚpythonÚpyZsageÚpython3Zpy3ZbazelZstarlarkZpyi)z*.pyz*.pywz*.pyiz*.jyz*.sagez*.scZ
SConstructZ
SConscriptz*.bzlZBUCKÚBUILDzBUILD.bazelZ	WORKSPACEz*.tacz*.pye)ztext/x-pythonzapplication/x-pythonztext/x-python3zapplication/x-python3ú0.10ú[z][z]*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© r/   úU/mnt/bigstor/www/usecases/.venv/lib/python3.9/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]+r*   r+   r-   r/   r/   r0   Úfstring_rulesW   s
    
÷zPythonLexer.fstring_rulesú\nú$^(\s*)([rRuUbB]{,2})("""[\s\S]*?""")ú$^(\s*)([rRuUbB]{,2})('''[\s\S]*?''')ú\A#!.+$ú#.*$ú\\\nú\\Úkeywordsúsoft-keywordsú(def)((?:\s|\\\s)+)Úfuncnameú(class)((?:\s|\\\s)+)Ú	classnamez)^(lazy)((?:\s|\\\s)+)(from)((?:\s|\\\s)+)Ú
fromimportz+^(lazy)((?:\s|\\\s)+)(import)((?:\s|\\\s)+)Úimportú(from)((?:\s|\\\s)+)ú(import)((?:\s|\\\s)+)Úexprz(?i)(r[ft]|[ft]r)(""")ÚrfstringescapeÚtdqfz(?i)(r[ft]|[ft]r)(''')Útsqfz(?i)(r[ft]|[ft]r)(")Údqfz(?i)(r[ft]|[ft]r)(')Úsqfz([fFtT])(""")Úfstringescapez([fFtT])(''')z([fFtT])(")z([fFtT])(')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])(""")Úbytesescapez([bB])(''')z	([bB])(")z	([bB])(')ú[^\S\n]+Únumbersz!=|==|<<|>>|:=|[-~+/*%=<>&^|.]ú[]{}:(),;[]ú(in|is|and|or|not)\búexpr-keywordsÚbuiltinsÚ
magicfuncsÚ	magicvarsÚnamez[{([]ú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]*(?:[:,;=^&|@~)\]}]|(?:ú|c                 c   s   | ]}|d    ¡ r|V  qdS )r   N)Úislower)Ú.0Úkr/   r/   r0   Ú	<genexpr>ê   ó    zPythonLexer.<genexpr>z)\b))úsoft-keywords-innerz(\s+)([^\n_]*)(_\b))EÚ
__import__ÚabsZaiterÚallÚanyÚbinÚboolÚ	bytearrayÚ
breakpointÚbytesÚcallableÚchrÚclassmethodÚcompileÚcomplexÚdelattrÚdictÚdirÚdivmodÚ	enumerateÚevalÚfilterÚfloatÚformatZ
frozendictÚ	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ÚsentinelÚ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ÚRecursionErrorZ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})ú"ú\\\\|\\"|\\\núfstrings-doubleú'ú\\\\|\\'|\\\núfstrings-singleústrings-doubleústrings-singleú"""ú''')!ÚrootrE   r2   r[   rV   r;   r<   r‚   rW   rX   rY   rS   rZ   r>   r@   rB   rA   rF   rK   rQ   rP   rˆ  r…  rŠ  r‰  rI   rJ   rN   rO   rG   rH   rL   rM   c                 C   s   t | dƒpd| d d… v S )Núpythonw?(3(\.\d)?)?úimport éè  ©r   ©Útextr/   r/   r0   Úanalyse_text¡  s    
ÿzPythonLexer.analyse_textN)<ry  rw  r{  rr  rZ   ÚurlÚaliasesÚ	filenamesÚ	mimetypesÚversion_addedÚuniZ	xid_startZxid_continueZuni_namer1   r3   r   r   r   ÚAffixÚDocr   ÚHashbangÚSingler   r   r   Ú	NamespaceÚDoubler	   r   r   ÚWordr,   r   ÚConstantÚjoinÚkeywordÚkwlistr   r
   r   r   ÚBuiltinÚPseudorÒ   ÚFunctionÚMagicÚVariabler   ÚFloatÚOctÚBinÚHexÚIntegerÚ	DecoratorÚClassÚEscapeÚtokensr”  r/   r/   r/   r0   r      s  ÿÿþþÿÿèþþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÄ?þþôüþýú	üûùûû
úþý
õô
èçñ+ëêÿûúÿ
ÿù
ý
ý
ÿû
ù
þþÿþ
ý
ý
ý
ý
ý
ý
ý
ý€ € Ë  >r   c                    @   sj  e Zd ZdZdZdZddgZg ZddgZdZ	d	d
„ Z
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ed2d3d4�efged5d6d3d7�ejfd8ejjfed9d6d3d7�ej fged:d3d4�ej!j"fged;d3d4�ej#j"fgd<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dCej+fgdDej,fdEefged ƒdEej!dFfe-dFƒgdEej.dFfgdGefdHejfdIefdJejfe-dFƒgdGefdKejdFfdLejjdFfdMejfe-dFƒgdNej/fge
ejƒe
ejƒdOejdFfdPej/fedQƒgdRejdFfdSej/fedTƒgdUejdFfedQƒdejfgdVejdFfedTƒdejfgdWœZ0dXdY„ Z1dZS )[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#   Zpython2Zpy2ztext/x-python2zapplication/x-python2Ú c                 C   s   dt jfd| fd| fd| fgS )NúG%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]ú[^\\\'"%\n]+r*   ú%r+   r-   r/   r/   r0   r1   º  s    ÿøzPython2Lexer.innerstring_rulesr4   r5   r6   rR   r7   r8   rT   r9   r:   rU   z!=|==|<<|>>|[-~+/*%=<>&^|.]r;   r=   r>   r?   r@   rC   rA   rD   rB   rW   rX   rY   Úbacktickz!([rR]|[uUbB][rR]|[rR][uUbB])(""")rL   z!([rR]|[uUbB][rR]|[rR][uUbB])(''')rM   z([rR]|[uUbB][rR]|[rR][uUbB])(")rN   z([rR]|[uUbB][rR]|[rR][uUbB])(')rO   z([uUbB]?)(""")rP   z([uUbB]?)(''')z([uUbB]?)(")z([uUbB]?)(')rZ   rS   )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__Z__div__r  r   r!  r"  r#  r$  r&  r'  r(  r)  r*  Z__getslice__r+  r,  Z__hex__r-  r.  Z__idiv__r/  r0  r2  r3  r4  r5  r6  r7  r8  Z__iop__r9  r:  r;  r<  r=  r>  r?  r@  rA  Z__long__rC  rD  rF  rG  rH  rI  rJ  rK  Ú__nonzero__Z__oct__Z__op__rM  rN  rO  rQ  rR  Z__rcmp__Z__rdiv__rS  rT  rU  rV  rW  rY  rZ  Z__rop__r[  r]  r^  r_  r`  ra  rb  rc  rd  re  Z__setslice__rf  rg  rh  ri  Ú__unicode__rj  )rl  rm  rn  ro  rp  rq  rr  rs  rt  ru  Ú__metaclass__rw  rx  ry  r|  r}  r~  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Œ  )r�  r;   rW   rX   rY   rS   r¸  rZ   r>   r@   rB   rA   rP   rŠ  r‰  rN   rO   rL   rM   c                 C   s
   t | dƒS )Nzpythonw?2(\.\d)?r‘  r’  r/   r/   r0   r”  „  s    zPython2Lexer.analyse_textN)2ry  rw  r{  rr  rZ   r•  r–  r—  r˜  r™  r1   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”  r/   r/   r/   r0   r   ©  s0  	ÿÿÿÿÿÿÿÿÿÿÿÿÖ-üûÿ	ôóÿòñï#îíÿûúÿ

ù
ÿþ
ý
ÿû
öÿÿ
ý
ý
ý
ý€ Ê >r   c                   @   s¨   e Zd ZdZd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úpython-consoleú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)ry  rw  r{  rZ   r–  r˜  r   r   ZPromptr   ÚCoder   Ú	TracebackZOutputr   r   r   r±  r³  r/   r/   r/   r0   rÚ  ˆ  s$   	

øü	ûïrÚ  c                       s:   e Zd ZdZdZddgZdgZdZd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Ý  rÞ  úhttps://python.orgr´  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Á   r5  rÚ  r   rá  )ÚselfÚoptions)rm  Úpylexerr/   r0   r5  Ù  s    z?PythonConsoleLexer.__init__.<locals>._ReplaceInnerCode.__init__)ry  rw  r{  r5  Ú__classcell__r/   ©rç  ©rm  r0   Ú_ReplaceInnerCodeØ  s   rë  )
r   r   r   r   r   r   rÁ   r5  r   râ  )rå  ræ  r&   Ztblexerrë  rê  ré  r0   r5  Ë  s    zPythonConsoleLexer.__init__)ry  rw  r{  rr  rZ   r–  r˜  r•  r™  r5  rè  r/   r/   rê  r0   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	Zd
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   zå
    For Python 3.x tracebacks, with support for chained exceptions.

    .. versionchanged:: 2.5
       This is now the default ``PythonTracebackLexer``.  It is still available
       as the alias ``Python3TracebackLexer``.
    zPython TracebackZpytbZpy3tbz*.pytbz*.py3tbztext/x-python-tracebackztext/x-python3-tracebackrã  z1.0r4   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+)ú^.*\nú0^(  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)ry  rw  r{  rr  rZ   r–  r—  r˜  r•  r™  r   r   râ  r   r   r   r   r¦  r   r   r   r   r   r   r   ÚMarkerr³  r/   r/   r/   r0   r   Þ  sZ   
ÿÿ
øÿÿÿ
ÿÿÿóþùær   c                   @   sâ   e Zd ZdZdZdgZdgZdgZdZd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.

    .. versionchanged:: 2.5
       This class has been renamed from ``PythonTracebackLexer``.
       ``PythonTracebackLexer`` now refers to the Python 3 variant.
    zPython 2.x TracebackZpy2tbz*.py2tbztext/x-python2-tracebackrã  z0.7z^(\^C)?(Traceback.*\n)rì  rí  rî  rï  rð  rñ  Úmarkerró  rô  r\   z^([a-zA-Z_]\w*)(:?\n)z( {4,})(\^))r�  rì  rö  N)ry  rw  r{  rr  rZ   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/   r0   r     sH   ÿ
ù
ÿÿÿ
ÿÿÿõýèr   c                !   @   s|  e Zd ZdZdZdZg d¢Zg d¢ZddgZdZ	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ƒged2d3d4�efed5d3d4�ejfd6ejfged7d8d3d9�ejfd:ejjfed;d8d3d9�ejfgd<ej fd=ej!fd>ej"fd?ejj#fd@ejfgdAej$fgdBej%fdCefgdCej&dDfgdEej'fdFeee
ej(ƒdDfdGeej&e
ƒdDfdHeej)e
ƒdDfdIeej)e
eƒfdJedDfdKefdLedDfdMedDfdCejfdNefgdCej(dDfgdOee
ee
ƒfdPej*fdQee
ee
ƒfe+dDƒgdRee
eƒdDfdSej*fe+dDƒgdTej,fgdUej-fdVefdWefdXefgd	efgdYedDfdZej,fed[ƒgd\edDfd]ej,fed[ƒgd^edDfed[ƒed_ƒgd`edDfed[ƒed_ƒgdaœZ.dbS )cr   z+
    For Pyrex and Cython source code.
    ZCythonzhttps://cython.org)ZcythonZpyxZpyrex)z*.pyxz*.pxdz*.pxiztext/x-cythonzapplication/x-cythonz1.1r4   z^(\s*)("""[\s\S]*?""")z^(\s*)('''[\s\S]*?''')rR   r8   rT   r9   r:   rU   z(<)([a-zA-Z0-9.?]+)(>)z!=|==|<<|>>|[-~+/*%=<>&^|.?]z(from)(\d+)(<=)(\s+)(<)(\d+)(:)r;   z(def|property)(\s+)r>   z(cp?def)(\s+)Úcdefz	(cdef)(:)z(class|cppclass|struct)(\s+)r@   z(from)(\s+)rA   z(c?import)(\s+)rB   rW   r¸  z(?:[rR]|[uU][rR]|[rR][uU])"""rL   z(?:[rR]|[uU][rR]|[rR][uU])'''rM   z(?:[rR]|[uU][rR]|[rR][uU])"rN   z(?:[rR]|[uU][rR]|[rR][uU])'rO   z[uU]?"""rP   z[uU]?'''z[uU]?"z[uU]?'rZ   rS   )"rk   rl   r^   rm   Zbyrn   Zctypedefro   rp   r_   rq   zexcept?r¹  rr   r`   ZfusedZgilrs   ra   r   rb   Ú	namespaceÚnewZnoexceptZnogilrt   r³   ru   rw   rx   ry   rc   rz   r{   re   rf   )rh   ri   rj   ZNULLz(DEF|IF|ELIF|ELSE)\b)Urƒ   r„   r…   r†   rº  r»  r‡   Zbintrˆ   r¼  r‰   r‹   rŒ   Úcharr�   rŽ   r½  r¾  r�   r�   r‘   r’   r“   r”   Údoubler•   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»   Zsize_tr¼   r½   r¾   Zssize_tr¿   rÀ   rÁ   rÂ   rÃ   rÇ  rÈ  ZunsignedrÄ   rÉ  rÅ   rÆ   rÇ   z+(?<!\.)(self|cls|Ellipsis|NotImplemented)\b)/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&(\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|packed)\bz7(struct|enum|union|class|cppclass)\b(\s+)([a-zA-Z_]\w*)z([a-zA-Z_]\w*)(\s*)(?=\()z!([a-zA-Z_]\w*)(\s*)(?=[:,=#\n]|$)z([a-zA-Z_]\w*)(\s*)(,)zfrom\brÓ  ú:z	(?=["\'])Ú.r€  rÕ  r�  z(\s+)(c?import)\brÖ  r×  zP%(\([a-zA-Z0-9]+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]r¶  r*   r·  rƒ  r„  Ústringsr†  r‡  r‹  ÚnlrŒ  )r�  r;   rW   rS   r¸  rZ   r>   r÷  r@   rB   rA   rP   rþ  rÿ  rN   rO   rL   rM   N)/ry  rw  r{  rr  rZ   r•  r–  r—  r˜  r™  r   r   r   rœ  r   r   r   r   r¡  r   ÚTyper   r¯  r   r   r	   r   r¢  ZPreprocr¦  r§  rÒ   r«  r¬  r®  rØ  rÙ  r°  r¨  ÚReservedr±  rª  rŸ  r   r²  r,   r³  r/   r/   r/   r0   r   G  s  ÿÿÿÝ&ûú÷ôó
òñð"
ûÿþ
ÿÿô
ÿüüÿÿÿùÿýýýý€ àr   c                   @   s‚  e Zd ZdZdZdgZdgZdgZdZd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d0ed1fgd2ed1fgd3ed1fgd4ed1fgd5œZ#d6S )7r    zr
    Lexer for dg,
    a functional and object-oriented programming language
    running on the CPython 3 VM.
    Zdgz*.dgz	text/x-dgzhttp://pyos.github.io/dgz1.6r]   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?)'''rP   rM   Ústringz(?i)(br|r?b?)"""rL   z(?i)(br|r?b?)'rO   z(?i)(br|r?b?)"rN   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—   Z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¶  r*   r·  r4   rƒ  r\   r†  r‹  rŒ  )r�  rP   r  rN   rO   rL   rM   N)$ry  rw  r{  rr  rZ   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/   r0   r    û  sŽ   ûú	÷
öÿÿÿÿÊ9ÿÿÿøÿÿÿÿ°r    c                   @   sB   e Zd ZdZdZdZdgZd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.
    ZNumPyzhttps://numpy.org/Únumpyr(   >‚  Zbitwise_andZarccoshÚ	broadcastZwhoZ
geterrcallZ
seterrcallZ
atleast_1dZastypeÚmeanZ	vectorizeZ
atleast_2dÚarrayZreal_if_closeÚcosZ
trim_zerosZtriuZset_numeric_opsZnansumZiscomplexobjZmgridÚ
fromstringZcrossZhsplitZcovÚsinhZreshapeZbartlettÚndimZ	geterrobjÚsinÚldexpZtrapzÚemptyZset_printoptionsZ	index_expZ	seterrobjZvanderZseterrZlinspaceZdigitizeZascontiguousarrayZdtypeÚmaximumÚsourceÚinvertZ	newbufferÚzerosÚfmodZarray_equalÚmatÚmodfZsetxor1dÚfrexpZstdZconcatenateZpolyfitZc_ÚtraceÚlog1pZ
frombufferÚinvÚprodZbitwise_xorZpkgloadÚrealZdiagflatZconvolveZsignbitÚnegativeZarcsinÚpowerZarray_equivZ	iscomplexZamaxZarctan2ÚinfZbitwise_notZ
obj2sctypeZ	deprecateZpolyderZconjrÀ   ZangleZ
asanyarrayZisposinfr¸   ÚdumpÚabsoluteZtileZswapaxesZnanminÚlogical_xorZ	tensordotZ
restoredotZsctype2charZsetflagsÚfillÚimagÚselectZranfZrollaxisÚdumpsZfinfor…   ZputmaskÚ	remainderÚitemZdiagonalÚunwrapÚexpZbmatZdispZget_numarray_includeÚresizeZsetmember1dZfftshiftZlogspaceZ
fromarraysZlogical_notZsquareÚfabsZintersect1dÚwhereÚloadsZbinomialZfloor_divideZflatZrecarrayÚbyteswapZarray2stringZget_printoptionsZfftZargmaxZplaceZlexsortZ
getbufsizeÚ
accumulateZ
reciprocalZsavetxtZintersect1d_nuZ
empty_likeZisrealZ
array_reprZ
issubdtypeZnewaxisÚinnerZ	isfortranr„   ÚsampleZ	setdiff1dÚmultiplyÚmodZarcsinhrÅ  Zi0ZasfortranarrayZdiagZtriZonesZpolysubZmintypecodeZarangeZ	row_stackÚaddZasfarrayZaverageZissctypeÚsplitÚdotZfromfunctionÚfloorÚrootsZaminZunravel_indexZ	nanargminZbinary_reprÚ	getbufferZminimumZright_shiftZsolveZeyeZ	piecewiseÚsignZmaximum_sctypeÚisnanÚtanhZargminZround_Údiffr†   Zget_array_wrapZshow_configÚextractZkronZhistogram2dZfliplrZapply_over_axesZifftÚisinfr‹   Z	isrealobjZint_asbufferZfastCopyAndTransposeZndenumerateÚ
logical_orZmeshgridÚflattenZrandom_integersÚsortZflatnonzeroZ
nan_to_numÚlogical_andZgreaterÚdivideZsqueezeÚceilZ
arrayrangeÚidentityÚvarÚshuffleZgumbelZr_Zcompare_chararraysZkaiserZ	nanargmaxÚloadÚviewZhistogramddÚinsertÚ	conjugateZsvdZalltrueZ
left_shiftÚchooseZpolyZasmatrixZnewbyteorderZrankZweibullZvdotZpoissonZarray_splitZpolyintZ
setbufsizeÚfromfileÚcopyZloadtxtÚtypenameZunion1dZfixÚlog10ZcumprodZpolymulr¼   ZcumsumÚequalÚsubtractZargsortZget_numpy_includeZtrilZ
less_equalZpoly1dZptpZ
atleast_3dZgeterrZpolyvalZ
bitwise_orÚisfiniteÚsizeZvstackZstandard_normalZrollZasarrayZsetfieldZfftfreqZunique1dZbincountZix_Z	ones_likeÚcoshZsearchsortedZarctanhÚtostringZnonzeroÚdeleteÚuniqueZpinvZsort_complexÚrequireZclipZrandom_sampleZfromiterZcan_castr	  ZaroundÚiterableZ
zeros_likeZgradientZediff1dZtrue_divideÚsqrtÚputZinterpZhanningZexpand_dimsZpolyaddZ
frompyfuncZbyte_boundsZ	histogramÚhypotZarctanZlstsqÚexpm1Ú	not_equalZcorrcoefZargwhereZcommon_typeZallcloseZitemsetÚuniformÚtestZcolumn_stackÚproductZissubclass_ZravelÚlogÚbetaÚouterÚinfoÚshapeÚnanZrintZdsplitZalterdotZgetfieldÚrandintZrot90Zset_string_functionZmay_share_memoryZvonmisesZgenericZvsplitÚtofileZtypeDictZdstackÚlog2ÚrepeatZissubsctypeZget_includeÚalenZgreater_equalÚtanZisscalarZasscalarZmatrixÚappendZmsortZs_ZisneginfZnanmaxZhammingZarccosÚtolistZpolydivÚseedÚindicesZndindexZapply_along_axisZflipudZlessZsometruer¬   ZpermutationZmedianZ	array_strZ	base_reprZogridZblackmanZasarray_chkfiniteZ	correlateÚcompressZ	transposerª   ZsincZhstackZ
cumproductc                 c   sJ   t  | |¡D ]8\}}}|tu r8|| jv r8|tj|fV  q|||fV  qd S rä  )r   Úget_tokens_unprocessedr   ÚEXTRA_KEYWORDSr   r§  )rå  r“  ÚindexÚtokenÚvaluer/   r/   r0   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“  Últextr/   r/   r0   r”  ·  s    
ÿþzNumPyLexer.analyse_textN)ry  rw  r{  rr  rZ   r•  r–  r™  r˜  r—  r}  r|  r”  r/   r/   r/   r0   r!   ^  s   Cr!   )+rr  r¤  Zpygments.lexerr   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   Zpygmentsr   rš  Ú__all__r   ZPython3Lexerr   rÚ  r   r   ZPython3TracebackLexerr   r   r    r!   r/   r/   r/   r0   Ú<module>   s,   
,8    `%160 5c