
                         z   S r SSKrSSKrSSKJrJrJrJrJrJ	r	J
r
JrJrJrJrJr  SSKJrJr  SSKJrJrJrJrJrJrJrJrJrJrJrJr  SSK J!r"  / SQr# " S S	\5      r$\$r% " S
 S\5      r& " S S\5      r' " S S\5      r( " S S\5      r)\)r* " S S\5      r+ " S S\5      r, " S S\5      r- " S S\$5      r.g)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            "          \ rS rSrSrSrSr/ SQr/ SQr/ SQr	S\
R                  < S	\
R                  < S
3rS rS r0 SS\4S\" \\R&                  \R(                  5      4S\" \\R&                  \R(                  5      4S\R,                  4S\R.                  4S\4S\4\" S5      \" S5      S\" \\5      S4S\" \\5      S4S\" \R6                  \5      S4S\" \R6                  \5      S4\" S5      /_SS \" \R&                  \R8                  5      \" S!S"5      4S#\" \R&                  \R.                  5      \" S!S$5      4S%\" \R&                  \R8                  5      \" S!S&5      4S'\" \R&                  \R.                  5      \" S!S(5      4S)\" \R&                  \R8                  5      \" S*S"5      4S+\" \R&                  \R.                  5      \" S*S$5      4S,\" \R&                  \R8                  5      \" S*S&5      4S-\" \R&                  \R.                  5      \" S*S(5      4S.\" \R&                  \R8                  5      S/4S0\" \R&                  \R.                  5      S14S2\" \R&                  \R8                  5      S34S4\" \R&                  \R.                  5      S54S6\" \R&                  \R8                  5      \" S7S/5      4S8\" \R&                  \R.                  5      \" S7S15      4S9\" \R&                  \R8                  5      \" S7S35      4S:\" \R&                  \R.                  5      \" S7S55      4S;\" \R&                  \R8                  5      \" S<S/5      4S=\" \R&                  \R.                  5      \" S<S15      4S>\" \R&                  \R8                  5      \" S<S35      4S?\" \R&                  \R.                  5      \" S<S55      4S@\4\" SA5      SB\4SC\4SD\R@                  4\" SE5      \" SF5      \" SG5      \" SH5      \" SI5      /_SJSK\SL4SM\RB                  SN4SO\RB                  SN4SP\4\" S5      /_SLSK\SL4SQ\SN4SP\4\" S5      /_SE\"" SRSSST9\4\"" SUSSST9\RF                  4/_S\"" SVSSST9\4\"" SUSSST9\RF                  4/_SSWSXRI                  \%RL                  5      -   SY-   \" \\5      SZ4/_SZS[\" \\'" \(5      \5      4\)" SN5      /_SF\"" S\S]SSS^9\*RV                  4S_\*RV                  RX                  4\"" S`S]SSS^9\*RZ                  4/_SG\"" SaSSST9\*R\                  R^                  4/_SH\"" SbSSST9\*R`                  R^                  4/_SASc\1Rd                  4Sd\1Rd                  4Se\1Rf                  4Sf\1Rh                  4Sg\1Rj                  4Sh\1Rl                  4/_SISi\-   \*Rn                  4Si\4\\*4/_S\" SG5      \\*R\                  SN4\)" SN5      /_S\\*Rp                  SN4/_SSj\" \\\5      4Sk\*R6                  4\\*R6                  4Sl\" \\\5      4\)" SN5      /_SSm\" \\R6                  5      SN4Sk\*R6                  4Sn\RF                  SN4\\*R6                  4\)" SN5      /_0 S!So\Rr                  4Sp\Rr                  4/_S*\" S!5      \" S75      /_S<Sq\Rr                  4/_S7Sr\Rr                  4\" S<5      /_Ss\" \R.                  5      _St\" \R8                  5      _Su\" \R.                  5      _Sv\" \R8                  5      _S&Sw\R8                  SN4Sx\Rr                  4\" St5      /_S(Sy\R.                  SN4Sz\Rr                  4\" Ss5      /_S3Sw\R8                  SN4Sx\Rr                  4\" Sv5      /_S5Sy\R.                  SN4Sz\Rr                  4\" Su5      /_S"S{\R8                  SN4\" St5      S\R8                  4/_S$S|\R.                  SN4\" Ss5      S\R.                  4/_S/S{\R8                  SN4\" Sv5      S\R8                  4/_S1S|\R.                  SN4\" Su5      S\R.                  4/_Er:S} r;S~r<g)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http://www.python.org)pythonpysagepython3py3)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-python3[z][z]*c                 \    S[         R                  4S[         R                  4SU 4SU 4SU 4/$ )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ttypes    )lib/third_party/pygments/lexers/python.pyinnerstring_rulesPythonLexer.innerstring_rulesC   sJ    '(.9 OO	% u%U#
 	
    c                 X    S[         R                  4S[         R                  S4SU 4SU 4/$ )Nz\}z\{expr-inside-fstringz[^\\\'"{}\n]+r6   r7   r9   s    r;   fstring_rulesPythonLexer.fstring_rulesW   s9     FOO$FOO%:;u%
 	
r>   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)(""")rfstringescapetdqfz(?i)(rf|fr)(''')tsqfz(?i)(rf|fr)(")dqfz(?i)(rf|fr)(')sqfz([fF])(""")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])(""")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asyncrk   breakcontinuedelelifrl   exceptfinallyrm   globalrn   ro   passraisenonlocalreturntrywhilerp   rq   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(?<!\.)prefixrt   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                 8    [        U S5      =(       d    SU S S ;   $ )Npythonw?(3(\.\d)?)?import   r   texts    r;   analyse_textPythonLexer.analyse_text  s%    t%;< %et$	%r>    N)=r  r  r  __firstlineno__rz  rh   urlaliases	filenames	mimetypesuni	xid_startxid_continueuni_namer<   rA   r   r   r   AffixDocr   HashbangSingler   r   r   	NamespaceDoubler   r   r   Wordr8   r
   Constantjoinkeywordkwlistr   r   r	   r   BuiltinPseudor   FunctionMagicVariabler   FloatOctBinHexInteger	DecoratorClassEscapetokensr  __static_attributes__r  r>   r;   r   r      s
    D
!C8GI,<I "mmS-=-=>H
(
rJ6j&,,

;=6j&,,

;=))*gnn%dODMJO$#Xgt%<jI%x'>L$hw/@/@$&G&1B1BD(IFO%
r* 	fllFMM2&/1  fllFMM2&/1 fllFMM2&.0 fllFMM2&.0 HV\\6==Aov.0HV\\6==Aov.0(6<<?ou-/(6<<?ou-/ "fllFMM2F<!fllFMM2F<fllFMM2E;fllFMM2E; XfllFMMBnf-/XfllFMMBnf-/8FLL&--@ne,.8FLL&--@ne,. HV\\6==AmV,.HV\\6==AmV,.(6<<?mU+-(6<<?mU+- $I.9[)$hmm4O$JL!K FOy=
+rf 	{$?@OOV-
??F, Z FO 
grB 	${$?@{F+Z FO	&
CrN 	 '/46  ,U;W=M=MN
Or^ 	 , 5:	;
  ,U;W=M=MN
_rp 	$ YYw~~&	' *2	2
 dG$&;=
qrB 	#Xj%+w%OPFO 
CrL 	 
0 9C5
R \\ <T\\=P=PQ #0 "%112 ^^3(
Mr^ 	 * $)+*, ]]  -"
_rP 	 8
 AFG ]]  "
Qrb 	()/716<<@!6::. &**-'4V^^,
crt 	H_dnn-8t
ur~ 	L!t}}f-FO
rH 	tzz6*
IrN 	w =>DNN#t~~&xh=>FO
Or\ 	$0A0A!BFKDNN# ((&1t~~&FO
]rn 	fmm$fmm$
orv 	$%N#
wr~ 	@&--P
rD 	<fmmLM"
ErL 	=7MrN 	=7OrP 	+FMM:QrR 	+FMM:SrT 	6==&)v}}-%&
Ur^ 	6==&)v}}-%&
_rh 	6==&)v}}-$%
irr 	6==&)v}}-$%
sr| 	V]]F+%&FMM"
}rF	 	V]]F+%&FMM"
G	rP	 	V]]F+$%FMM"
Q	rZ	 	V]]F+$%FMM"
[	rFh	%r>   r   c            #       0	   \ rS rSrSrSrSrSS/r/ rSS/r	S	 r
0 S
S\4S\" \\R                  \R                  5      4S\" \\R                  \R                  5      4S\4S\R$                  4S\R&                  4S\4S\4S\4S\R,                  4S\4\" S5      S\" \\5      S4S\" \\5      S4S\" \R2                  \5      S4S\" \R2                  \5      S4\" S5      \" S 5      \" S!5      \" S"5      S#\" \R                  \R4                  5      S$4S%\" \R                  \R&                  5      S&4S'\" \R                  \R4                  5      S(4S)\" \R                  \R&                  5      S*4S+\" \R                  \R4                  5      \" S,S$5      4S-\" \R                  \R&                  5      \" S,S&5      4S.\" \R                  \R4                  5      \" S,S(5      4S/\" \R                  \R&                  5      \" S,S*5      4\" S05      \" S15      /_S\" S2S3S49\4/_S\" S5S6S3S79\R<                  4S8\R<                  R>                  4\" S9S6S3S79\R@                  4/_S \" S:S3S49\RB                  RD                  4/_S!\" S;S3S49\RF                  RD                  4/_S1S<\$RJ                  4S=\$RJ                  4S>\$RL                  4S?\$RN                  4S@\$RP                  4SA\$RR                  RT                  4SB\$RR                  4/_S"SC\RV                  4/_S0SD\RX                  4SE\4/_S\" S 5      SE\RB                  SF4\-" SF5      /_SSE\R\                  SF4/_SSG\4SH\R2                  4SI\4SJ\R2                  4\-" SF5      /_SSG\4SK\R2                  SF4SL\R<                  R>                  SF4SM\R2                  4\-" SF5      /_S,SN\R^                  4/_SO\
" \R&                  5      _SP\
" \R4                  5      _S(SQ\R4                  SF4SR\R^                  4\" SP5      /_S*SS\R&                  SF4ST\R^                  4\" SO5      /_SU\R4                  SF4\" SP5      S\R4                  4/SV\R&                  SF4\" SO5      S\R&                  4/SW.Er0SX r1SYr2gZ)[r!   i  z
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                 :    S[         R                  4SU 4SU 4SU 4/$ )NG%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%][^\\\'"%\n]+r6   %r7   r9   s    r;   r<   Python2Lexer.innerstring_rules  s6    &'-8 e$5M

 
	
r>   rC   rD   rE   rF   ra   rG   rH   rc   rI   rJ   rd   z!=|==|<<|>>|[-~+/*%=<>&^|.]rK   rL   rM   rN   rO   rP   rQ   rR   rS   re   rf   rg   backtickz!([rR]|[uUbB][rR]|[rR][uUbB])(""")r[   z!([rR]|[uUbB][rR]|[rR][uUbB])(''')r\   z([rR]|[uUbB][rR]|[rR][uUbB])(")r]   z([rR]|[uUbB][rR]|[rR][uUbB])(')r^   z([uUbB]?)(""")r_   z([uUbB]?)(''')z([uUbB]?)(")z([uUbB]?)(')rh   rb   )rx   rz   r{   r|   r}   rl   r~   execr   rm   r   rn   ro   r   r   r   r   r   r   rp   rq   r   r   rr   rs   )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  __cmp__
__coerce__r   r!  r"  r#  r$  r%  __delslice____div__r'  r(  r)  r*  r+  r,  r.  r/  r0  r1  r2  __getslice__r3  r4  __hex__r5  r6  __idiv__r7  r8  r:  r;  r<  r=  r>  r?  r@  __iop__rA  rB  rC  rD  rE  rF  rG  rH  rI  __long__rK  rL  rN  rO  rP  rQ  rR  rS  __nonzero____oct____op__rU  rV  rW  rY  rZ  __rcmp____rdiv__r[  r\  r]  r^  r_  ra  rb  __rop__rc  re  rf  rg  rh  ri  rj  rk  rl  rm  __setslice__rn  ro  rp  rq  __unicode__rr  )rt  ru  rv  rw  rx  ry  rz  r{  r|  r}  __metaclass__r  r  r  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*ri   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\   c                     [        U S5      $ )Nzpythonw?2(\.\d)?r  r  s    r;   r  Python2Lexer.analyse_text{  s    t%899r>   r  N)3r  r  r  r  rz  rh   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  r  r  r>   r;   r!   r!     s%    D
!C% GI!#:;I
{J6j&,,

;=6j&,,

;=$))*gnn%[)dODM$hmm4+X6J#Xgt%<jI%x'>L$hw/@/@$&G&1B1BD(IJL!K J0fllFMM2F<0fllFMM2F<.fllFMM2E;.fllFMM2E;xfmmDnf-/xfmmDnf-/XfllFMMBne,.XfllFMMBne,.FOIU+
{Z 	 , 5:	;
 
[{j 	 > "%1 \\\\((* 5 >HPUW ^^#!
k{n 	 *$ 38%9& ]]  '"
o{Z 	 ,
  ]]  "
[{l 	7F$fll36::&FJJ'!6::.fnn))*v~~&
m{~ 	foo&
{D 	(d#
E{L 	L!dmmV4FO
M{V 	djj&1
W{\ 	&g''(80FO
]{j 	&'++V4 ++V4 $..1 FO
k{B 	<=C]]L
C{J 	+FMM:K{L 	+FMM:M{N 	6==&)v}}-$%
O{X 	6==&)v}}-$%
Y{d V]]F+$%FMM"
 V]]F+$%FMM"
m{Fz:r>   r!   c                      \ rS rSrSrS/rS/r S\" \R                  \
R                  5      S4S\" \R                  \5      4S\
R                  S	4S
\
R                  S	4S\R                  4/S\" \R                  \
R                  5      4S\" \R                  \5      4\" S5      /S\S4S\" \R$                  \5      4S\
R                  4/S.rSrg)_PythonConsoleLexerBasei~  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)ri   z(?=>>>( |$))z(KeyboardInterrupt)(\n))rC   r   r  r  N)r  r  r  r  rh   r  r  r   r   Promptr   Coder   	TracebackOutputr	   r   r   r  r  r  r  r>   r;   r  r  ~  s    #DiG()I hw~~uzzBOT 8GNNJ?@<eoo{[(%//;Ggnn%	
  '..%**!EFhw~~zBCFO	
 dF+'$**j)IJeoo&
#Fr>   r  c                   <   ^  \ rS rSrSrSrS/rS/rU 4S jrSr	U =r
$ )r   i  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                    >^ [        USS5      nU(       a  [        m[        nO[        m[        n " U4S jS[
        5      n[        TU ]  " X4[        R                  40 UD6  g )Nr-   Tc                   ,   >^  \ rS rSrU U4S jrSrU =r$ )6PythonConsoleLexer.__init__.<locals>._ReplaceInnerCodei  c                 P   > [         TU ]  " T[        [        R                  40 UD6  g N)r   r=  r  r   r  )selfoptionsru  pylexers     r;   r=  ?PythonConsoleLexer.__init__.<locals>._ReplaceInnerCode.__init__  s     *A5::YQXYr>   r  )r  r  r  r  r=  r  __classcell__)ru  r  s   @r;   _ReplaceInnerCoder	    s    Z Zr>   r  )
r   r   r    r!   r"   r   r   r=  r   r  )r  r  r-   tblexerr  r  ru  s        @r;   r=  PythonConsoleLexer.__init__  sP    w	48!G*G"G+G	Z 	Z 	U__PPr>   r  )r  r  r  r  rz  rh   r  r  r=  r  r  )ru  s   @r;   r   r     s*    . $DiG()IQ Qr>   r   c                      \ rS rSrSrSrSS/rSS/rSS	/rS
\	4S\
R                  S4S\
R                  4S\
R                  4S\
R                  S4S\4/S\" \\R                   \\\\\	5      4S\" \\R                   \\\	5      4S\" \	\" \5      \	5      S4S\" \	\\	5      4S\" \
R*                  \\\	5      S4S\" \
R*                  \	5      S4\" S5      /S\" \	\R0                  \	5      S4\" S5      /S.rSrg)r    i  z
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-tracebackrD   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)ri   z^([a-zA-Z_][\w.]*)(:?\n)z^( {4,})([~^]+)(\n))rC   r  r  r  N)r  r  r  r  rz  rh   r  r  r  r   r   r  r   r   r   r   r  r   r   r   r   r   r	   r   Markerr  r  r  r>   r;   r    r      sq    DwG9%I*,FGI J=w?P?PRXY()0):):<)*1*;*;=-w/@/@&Iu	
 AdDLL$dJOQ5dDLL$
CEj%"4jA9N%j':68$gmmT4<fF(gmmZ0&:FO
& $j+"4"4jA FO
5#Fr>   r    c                      \ rS rSrSrSrS/rS/rS/rS\	" \
\R                  5      S4S	\R                  S4S
\4/S\	" \
\R                  \
\\
\\5      4S\	" \
\R                  \
\\5      4S\	" \
\" \5      \5      S4S\	" \
\\5      4S\	" \R*                  \
\\5      S4S\	" \R*                  \5      S4/S\	" \
\R.                  5      S4\" S5      /S.rSrg)r"   i	  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  ri   z^([a-zA-Z_]\w*)(:?\n)z( {4,})(\^))rC   r  r#  r  N)r  r  r  r  rz  rh   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"   	  s6    "DiGI+,I 'dG--.8 .w/@/@&Iu
 AdDLL$dJOQ5dDLL$
CEdE,/<hH%dGZ02$gmmT4<fF%gmmZ0&:
  XdK,>,>?HFO
1Fr>   r"   c                      \ rS rSrSrSrSr/ SQr/ SQrSS/r	0 S	/ S
\
4PS\" \
\R                  5      4PS\" \
\R                  5      4PS\4PS\4PS\4PS\
4PS\4PS\R$                  4PS\" \\R(                  \5      4PS\4PS\" \\R,                  \\\\\5      4P\" S5      PS\" \\5      S4PS\" \\5      S4PS\" \\5      4PS\" \\5      S4PS\" \\5      S4PS \" \\5      S!4P\" S"5      P\" S#5      PS$\S%4PS&\S'4PS(\S)4PS*\S+4PS,\\" S-S%5      4PS.\\" S-S'5      4PS/\\" S-S)5      4PS0\\" S-S+5      4P\" S15      P\" S25      P_S\" S3S4S59\4S6\R6                  4/_S"\" S7S8S4S99\R8                  4S:\R8                  R:                  4\" S;S8S4S99\R<                  4/_S2S<\R>                  4S=\R@                  4S>\RB                  4S?\R,                  RD                  4S@\R,                  4/_S#SA\RF                  4/_S1SB\RH                  4SC\4/_SSC\RJ                  SD4/_SSE\RL                  4SF\4SG\" \RJ                  \5      SD4SH\" \RJ                  \\5      4SI\SD4SJ\4SK\SD4SL\SD4SC\R(                  4SM\4/
_SSC\RN                  SD4/_S!SN\" \\\5      4SO\RP                  4SP\" \\\5      4\)" SD5      /_SSQ\" \\5      SD4SR\RP                  4\)" SD5      /_S-SS\RT                  4/_STSU\RV                  4SV\4SW\4SX\4/_SYS
\4/_S)SZ\SD4S[\RT                  4\" ST5      /_S+S\\SD4S]\RT                  4\" ST5      /_S%S^\SD4\" ST5      \" SY5      /_S'S_\SD4\" ST5      \" SY5      /0Er,S`r-ga)br#   i9  z:
For Pyrex and Cython source code.

.. versionadded:: 1.1
Cythonzhttp://cython.org)cythonpyxpyrex)z*.pyxz*.pxdz*.pxiztext/x-cythonzapplication/x-cythonrC   rD   z^(\s*)("""(?:.|\n)*?""")z^(\s*)('''(?:.|\n)*?''')ra   rH   rc   rI   rJ   rd   z(<)([a-zA-Z0-9.?]+)(>)z!=|==|<<|>>|[-~+/*%=<>&^|.?]z(from)(\d+)(<=)(\s+)(<)(\d+)(:)rK   z(def|property)(\s+)rM   z(cp?def)(\s+)cdefz	(cdef)(:)z(class|struct)(\s+)rO   z(from)(\s+)rQ   z(c?import)(\s+)rS   re   r  z(?:[rR]|[uU][rR]|[rR][uU])"""r[   z(?:[rR]|[uU][rR]|[rR][uU])'''r\   z(?:[rR]|[uU][rR]|[rR][uU])"r]   z(?:[rR]|[uU][rR]|[rR][uU])'r^   z[uU]?"""r_   z[uU]?'''z[uU]?"z[uU]?'rh   rb   )rx   ry   rk   rz   byr{   ctypedefr|   r}   rl   r~   zexcept?r  r   rm   fusedgilr   rn   r   ro   nogilr   r   r   r   r   r   rp   r   r   rr   rs   z(DEF|IF|ELIF|ELSE)\b)Qr   r   r   r   r  r  r   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   
Py_ssize_tr   r  r  r  r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  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  ri   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  r6   r  nlr  r  r  r  r  r  r  N).r  r  r  r  rz  rh   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  r8   r  r  r  r>   r;   r#   r#   9  sx    D
C(G+I "89Id $
J$
((:vzz*JK$
 )(:vzz*JK$
 $	$

 g$
 [)$
 j!$
 DM$
 %hmm4$
 'k7<<=?$
 -h7$
 0gv~~xxK)*$
  J!$
" $Xgt%<jI#$
$ x6?%$
( 8G[9:)$
* $Xgt%<kJ+$
, Xgt4lC-$
.  '4!8(C/$
0 J1$
2 J3$
4 -ff=5$
6 -ff=7$
8 +FE:9$
: +FE:;$
< .&!AB=$
> .&!AB?$
@ vx>?A$
B vx>?C$
D FOE$
F IG$
dL 	 J SX	Y
  %goo6
Md^ 	 ) 2<EK \\\\((* % .8G ^^#!
_db 	6Efjj!!6::.fnn))*V^^$
cdp 	foo&
qdv 	dnn%d#
wd~ 	dmmV4
dD 	5w7G7GH+W5/dmmT*F4&dmmT;79(g;'4(gll+4L
Ed` 	djj&1
adf 	w =>0xh=>FO	
gdr 	!8D'#:FC $..1FO	
sd~ 	<=C]]L
dF 	&'-8f% 6N	
GdZ 	FO
[d` 	66"v}}-I
adj 	66"v}}-I
kdt 	VV$IDM
ud~ 	VV$IDM
dFr>   r#   c                      \ rS rSrSrSrS/rS/rS/rS\	4S\
R                  4S\R                  4S	\R                  4S
\R                  4S\R                   4S\R                   4S\R"                  4S\\" SSS5      4S\\" SSS5      4S\\" SSS5      4S\\" SSS5      4S\4S\R*                  4S\4\" SSSS9\R0                  4\" SSSS9\R0                  4S \R0                  R2                  4S!\R4                  4S"\R4                  4S#\R8                  4S$\4S%\R:                  4S&\4S'\4S(\4/S)\R@                  4/S*\RB                  4S+\4S,\4S-\4S.\4/S/\S04/S1\S04/S2\S04/S3\S04/S4.r"S5r#g6)7r$   i  zy
Lexer for dg,
a functional and object-oriented programming language
running on the CPython 3 VM.

.. versionadded:: 1.6
dgz*.dgz	text/x-dgrj   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?)'''r_   r\   stringz(?i)(br|r?b?)"""r[   z(?i)(br|r?b?)'r^   z(?i)(br|r?b?)"r]   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   drop	dropwhiler   r   exhaustr   flipzfoldl1?r   fstr   r   r   r   headr   r   initr   r   r   r   iteratelastr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   zscanl1?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[()]r4  r  r  r  r6   r  rD   r  ri   r  r  r  )rC   r_   r<  r]   r^   r[   r\   r  N)$r  r  r  r  rz  rh   r  r  r  r   r   r  r   r  r  r  r  r  r   r   r   r  r
   r   r  r  r   r   r9  r7  r   r   r  r8   r  r  r  r>   r;   r$   r$     sJ    DfGII TNw~~&VZZ(fjj),8&,,G*FLL9!6>>2 &(>68*TU &(>68*TU(QR(QR"((--8((3 5
 %]< \\  M %]	< \\
 O\\  " D^^%&*nn645<5E5EG #D)#W\\2tk"5Mm7
r<=C]]L

&'-8f% 6NFO	
 66"
 66"
 VV$
 VV$
aSFr>   r$   c                   B    \ rS rSrSrSrSrS/r/ r/ r	1 Skr
S rS rS	rg
)r%   iP  zO
A Python lexer recognizing Numerical Python builtins.

.. versionadded:: 0.10
NumPyzhttps://numpy.org/numpy>  c_i0r_s_r   addr   r   coscovdotexpeyefftfixinfinvix_logmatr   r   modnanptpputsinstdr   svdtantrivarwhoalenamaxaminbetabmatceilclipconjcopycoshdiagdiffdispdumpfabsfillflatfmodifftimaginfoitemkronlessloadlog2meanmodfndimonespinvpolyprodranfrankrealrintrollseedsignsincsinhsizesortsqrtrI  tanhtesttiletriltriuvdotviewanglearrayr   crossdtypedumpsemptyequalexpm1finfofloorfrexphypotinnerisinfisnanldexploadslog10log1plstsqmgridmsortogridouterplacepowerravelrootsrot90r   shaper   solvesplittracetrapzwherezerosappendarangearccosarcsinarctanargmaxargminaroundastypechoosecumsumdeletedividedsplitdstackfliplrflipudgeterrgumbelhsplithstackinsertinterpinvertisrealkaisermatrixmediannanmaxnanminnansumpoly1dr  repeatresizeround_sampleselectseterrsourcesquaretofiletolistuniqueunwrapvandervsplitvstackalltruearccosharcsinharctan2arctanhargsortasarrayaveragecumprodediff1dextractfftfreqflattengenericgreaterhamminghanningindicesitemsetlexsortloadtxtmaximumminimumndindexnewaxisnonzeropkgloadpoissonpolyaddpolyderpolydivpolyfitpolyintpolymulpolysubpolyvalproductputmaskrandintrequirereshapesavetxtshufflesignbitsqueezeuniformunion1dweibullabsoluteallclosealterdotargwhereasfarrayasmatrixasscalarbartlettbincountbinomialblackmanbyteswapcan_castcompressconvolvecorrcoefdiagflatdiagonaldigitizefftshiftfromfilefromitergetfieldgradientidentityisfiniteisneginfisposinfisscalarissctypeiterablelinspacelogspacemeshgridmultiplynegativerecarrayrollaxissetfieldsetflagssetxor1dsometruesubtractswapaxestostringtypeDicttypenameunique1dvonmises	array_str	base_repr	broadcast	conjugate	correlate	deprecate	getbuffer	geterrobj	histogram	index_exp	iscomplex	isfortran	isrealobj	nanargmax	nanargmin	newbuffer	not_equal	ones_like	piecewise	remainder	row_stack	setdiff1d	seterrobj	tensordot	transpose	vectorize
accumulate
array_repr
arrayrange
asanyarray
atleast_1d
atleast_2d
atleast_3d
bitwise_or
cumproduct
empty_like
fromarrays
frombuffer
frompyfunc
fromstring
getbufsize
geterrcall
issubdtype
left_shift
less_equal
logical_or
nan_to_num
obj2sctype
reciprocal
restoredot
setbufsize
seterrcall
trim_zeros
zeros_likearray_equalarray_equivarray_splitbinary_reprbitwise_andbitwise_notbitwise_xorbyte_boundscommon_typeconcatenateexpand_dimsflatnonzeroget_includehistogram2dhistogramddintersect1dissubclass_issubsctypelogical_andlogical_notlogical_xormintypecodendenumeratepermutationright_shiftsctype2charsetmember1dshow_configtrue_dividearray2stringcolumn_stackfloor_dividefromfunctionint_asbufferiscomplexobjnewbyteordersearchsortedsort_complexgreater_equalrandom_samplereal_if_closeunravel_indexasfortranarrayget_array_wrapintersect1d_numaximum_sctypeapply_over_axesrandom_integersset_numeric_opsstandard_normalapply_along_axisget_printoptionsmay_share_memoryset_printoptionsasarray_chkfiniteascontiguousarrayget_numpy_includecompare_chararraysset_string_functionfastCopyAndTransposeget_numarray_includec              #      #    [         R                  X5       H;  u  p#nU[        L a&  X@R                  ;   a  U[        R
                  U4v   M5  X#U4v   M=     g 7fr  )r   get_tokens_unprocessedr   EXTRA_KEYWORDSr   r  )r  r  indextokenvalues        r;   r  !NumPyLexer.get_tokens_unprocessed  sO     224>  E%}*=*=!=W^^U22E))	 ?s   AAc                 l    U S S n[        U S5      =(       d    SU;   =(       a    SU;   =(       d    SU;   $ )Nr  r  r  zimport numpyzfrom numpy importr  )r  ltexts     r;   r  NumPyLexer.analyse_text  sD    Ud&<= #U"J5(H,?5,H	Jr>   r  N)r  r  r  r  rz  rh   r  r  r  r  r  r  r  r  r  r>   r;   r%   r%   P  s:     D
CiG IIANF*Jr>   r%   )/rz  rer  pygments.lexerr   r   r   r   r   r   r	   r
   r   r   r   r   pygments.utilr   r   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%   r  r>   r;   <module>r     s    
 L L L L 7; ; ; ; %3
A%* A%H [:: [:z"j "H,Q ,Q\3: 3l - -J -`q* qh`j `F^J ^Jr>   