python (3.12.0)

(root)/
lib/
python3.12/
__pycache__/
tokenize.cpython-312.pyc

ˑeL	TdZdZdZddlmZddlmZmZddl	Z	ddl
Z
ddlmZddl
ZddlZddlZddldd	lmZddlZej(d
ej*Zej(dej*ZddlZej0gdzZ[Gd
de	j2ddZdZdZdZdZdZeedezzeezZ dZ!dZ"dZ#dZ$dZ%ee"e#e$e%Z&dZ'eddee'zZ(de'zZ)ee(e)Z*ede*d zZ+ee+e*e&Z,d!Z-e
j\d"Z/ee-Z0d#Z1d$Z2d%Z3d&Z4ee0d'ze0d(zZ5ee0d)ze0d*zZ6ee7ejpe9ed+,Z:ed-e:Z;ee,e;e6e!Z<e e<zZ=ee0d.zed/dze0d0zed1dzZ>ed2ee5Z?eee?e,e;e>e!zZ@iZAe-D]"ZBe1eAeBd/z<e2eAeBd1z<e3eAeBd'z<e4eAeBd(z<$[BeCZDeCZEe-D]BZFeFd1zeFd/zfD]ZGeDjeGeFd(zeFd'zfD]ZGeEjeGD[F[Gd3ZIGd4d5eJZKGd6d7eJZLGd8d9ZMd:ZNd;ZOd<ZPd=Zd>ZQd?ZRd@ZSdAZTdDdBZUeVdCk(reSyy)EaoTokenization help for Python programs.

tokenize(readline) is a generator that breaks a stream of bytes into
Python tokens.  It decodes the bytes according to PEP-0263 for
determining source file encoding.

It accepts a readline-like method which is called repeatedly to get the
next line of input (or b"" for EOF).  It generates 5-tuples with these
members:

    the token type (see token.py)
    the token (a string)
    the starting (row, column) indices of the token (a 2-tuple of ints)
    the ending (row, column) indices of the token (a 2-tuple of ints)
    the original line (string)

It is designed to match the working of the Python tokenizer exactly, except
that it produces COMMENT tokens for comments and gives type OP for all
operators.  Additionally, all token lists start with an ENCODING token
which tells you which encoding was used to decode the bytes stream.
zKa-Ping Yee <ping@lfw.org>zpGvR, ESR, Tim Peters, Thomas Wouters, Fred Drake, Skip Montanaro, Raymond Hettinger, Trent Nelson, Michael Foord)open)lookupBOM_UTF8N)
TextIOWrapper)*)EXACT_TOKEN_TYPESz&^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)s^[ \t\f]*(?:[#\r\n]|$))tokenizegenerate_tokensdetect_encoding
untokenize	TokenInfoc"eZdZdZedZy)r
cpd|jt|jfz}d|j|zS)Nz%d (%s)z8TokenInfo(type=%s, string=%r, start=%r, end=%r, line=%r))type)rtok_name_replace)selfannotated_types  </BuggyBox/python/3.12.0/bootstrap/lib/python3.12/tokenize.py__repr__zTokenInfo.__repr__0s9"dii$))1D%EEJ

>
23	4c|jtk(r%|jtvrt|jS|jSN)rOPstringrrs r
exact_typezTokenInfo.exact_type5s299?t{{.??$T[[1199rN)__name__
__module____qualname__rpropertyrrrr
r
/s4
rr
ztype string start end linec0ddj|zdzS)N(|))joinchoicess rgroupr*<sC#((7"33c99rct|dzS)Nrr*r(s ranyr-=s%/C//rct|dzS)N?r,r(s rmayber0>sE7Oc11rz[ \f\t]*z	#[^\r\n]*z\\\r?\nz\w+z0[xX](?:_?[0-9a-fA-F])+z0[bB](?:_?[01])+z0[oO](?:_?[0-7])+z(?:0(?:_?0)*|[1-9](?:_?[0-9])*)z[eE][-+]?[0-9](?:_?[0-9])*z)[0-9](?:_?[0-9])*\.(?:[0-9](?:_?[0-9])*)?z\.[0-9](?:_?[0-9])*z[0-9](?:_?[0-9])*z[0-9](?:_?[0-9])*[jJ]z[jJ]c

gd}dh}|D]q}tj|D]W}tj|Dcgc]}||jfc}D]"}|j	dj|$Ys|Scc}w)N)brufbrfr)
_itertoolspermutationsproductupperaddr')_valid_string_prefixesresultprefixtcr4s      r_all_string_prefixesrCUs>TF('((0	'A ''!)DQ1aggi.)DE
'

2771:&
'	''M*EsBcJtj|tjSr)recompileUNICODE)exprs r_compilerIds
::dBJJ''rz[^'\\]*(?:\\.[^'\\]*)*'z[^"\\]*(?:\\.[^"\\]*)*"z%[^'\\]*(?:(?:\\.|'(?!''))[^'\\]*)*'''z%[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""z'''z"""z'[^\n'\\]*(?:\\.[^\n'\\]*)*'z"[^\n"\\]*(?:\\.[^\n"\\]*)*"T)reversez\r?\nz'[^\n'\\]*(?:\\.[^\n'\\]*)*'z"[^\n"\\]*(?:\\.[^\n"\\]*)*"z
\\\r?\n|\ZceZdZy)
TokenErrorNrrr r"rrrOrOrrOceZdZy)StopTokenizingNrPr"rrrSrSrQrrSc$eZdZdZdZdZdZy)Untokenizerc<g|_d|_d|_d|_y)Nr)tokensprev_rowprev_colencodingrs r__init__zUntokenizer.__init__s


rc|\}}||jks||jk(r@||jkr1tdj|||j|j||jz
}|r%|jjd|zd|_||jz
}|r|jjd|zyy)Nz+start ({},{}) precedes previous end ({},{})z\
r )rYrZ
ValueErrorformatrXappend)rstartrowcol
row_offset
col_offsets      radd_whitespacezUntokenizer.add_whitespacesS#"63;NJ$fS#t}}dmmLN
N4==(
KKv
23DM4==(
KKsZ/0rct|}g}d}|D]}t|dk(r|j||n|\}}}}	}
|tk(r||_@|t
k(rnu|tk(r|j|g|tk(r |j|	\|_
|_|ttfvrd}n|rF|rD|d}|dt|k\r+|jj|t||_d}nn|tk(red|vsd|vr]|	\}}
||
|j dz|j dzf}	t#j$dd|}t#j$dd	|}|j'||jj||	\|_
|_|ttfvs|xjdz
c_
d
|_dj)|jS)NFTrW{}{{}}rr8)iterlencompatENCODINGr[	ENDMARKERINDENTraDEDENTpoprYrZNEWLINENLrXFSTRING_MIDDLEcountrEsubrgr')riterableitindents	startlinerAtok_typetokenrbendlineindentend_lineend_cols              rrzUntokenizer.untokenizes
(^	&	"A1v{Ar"01-HeUC8# %
9$6!u%V#
/2,
t}gr]* 	w 8s6{*KK&&v.$'KDM!	^+%<3%<(+%Hg#W{u{{3/?%?+%++cBR%RSCFF3e4EFF3e4E
&KKu%+.(DM4=GR=(

"
 !
M&	"Nwwt{{##rcRg}|jj}|dttfv}d}t	j
|g|D]}|dd\}}	|tk(r|	|_|ttfvr|	dz
}	|tk(r
|rd|	z}	d}nd}|tk(r|j|	_|tk(r|jy|ttfvrd}nQ|r|r||dd}n?|tk(r6d|	vsd|	vr.tj dd	|	}	tj dd
|	}	||	y)NrFrir^Trjrkrlrmrn)rXrarwrxr9chainrrr[NAMENUMBERSTRINGrtrurvryrEr{)
rrr|r~toks_appendr
prevstringtoktoknumtokvals
          rrqzUntokenizer.compats5kk((!H"
-	
##UGX6!	 C !WNFF! &
$'#
 6\F!
"
v&6!
GR=( 	wGBK(!	>)&=C6MVVCv6FVVCv6FC!	 rN)rrr r\rgrrqr"rrrUrUs1+$Z' rrUct}|j|}|j|j|j}|S)aTransform tokens back into Python source code.
    It returns a bytes object, encoded using the ENCODING
    token, which is the first token sequence output by tokenize.

    Each element returned by the iterable must be a token sequence
    with at least two elements, a token number and token value.  If
    only two tokens are passed, the resulting output is poor.

    Round-trip invariant for full input:
        Untokenized source will match input source exactly

    Round-trip invariant for limited input:
        # Output bytes will tokenize back to the input
        t1 = [tok[:2] for tok in tokenize(f.readline)]
        newcode = untokenize(t1)
        readline = BytesIO(newcode).readline
        t2 = [tok[:2] for tok in tokenize(readline)]
        assert t1 == t2
    )rUrr[encode)r|utouts   rrrs:(
B
--
!C	{{jj%Jrc|ddjjdd}|dk(s|jdry|dvs|jdry	|S)
z(Imitates get_normal_name in tokenizer.c.N_-utf-8zutf-8-)zlatin-1
iso-8859-1ziso-latin-1)zlatin-1-ziso-8859-1-ziso-latin-1-r)lowerreplace
startswith)orig_encencs  r_get_normal_namer.sX3B-



'
'S
1C
g~1
66
~~ABOrcj	jjdd}d}fd}fd}|}|jtr	d|dd}d}|s|gfS||}|r||gfSt
j
|s||gfS|}|s||gfS||}|r|||gfS|||gfS#t$rdYwxYw)	a
    The detect_encoding() function is used to detect the encoding that should
    be used to decode a Python source file.  It requires one argument, readline,
    in the same way as the tokenize() generator.

    It will call readline a maximum of twice, and return the encoding used
    (as a string) and a list of any lines (left as bytes) it has read in.

    It detects the encoding from the presence of a utf-8 bom or an encoding
    cookie as specified in pep-0263.  If both a bom and a cookie are present,
    but disagree, a SyntaxError will be raised.  If the encoding cookie is an
    invalid charset, raise a SyntaxError.  Note that if a utf-8 bom is found,
    'utf-8-sig' is returned.

    If no encoding is specified, then the default of 'utf-8' will be returned.
    NFrc2	S#t$rYywxYw)Nr)
StopIterationreadlinesrread_or_stopz%detect_encoding.<locals>.read_or_stopQs"	:		s
	c	|jd}tj|}|syt
|jd}	t|}r5|dk7r+
d}t|dj}t||d	z
}|S#t$r"d}dj|}t|wxYw#t$r0d|z}t|dj|}t|wxYw)
Nrz'invalid or missing encoding declarationz{} for {!r}rWzunknown encoding: zunknown encoding for {!r}: {}zencoding problem: utf-8z encoding problem for {!r}: utf-8z-sig)
decodeUnicodeDecodeErrorr`SyntaxError	cookie_rematchrr*rLookupError)rline_stringmsgrr[codec	bom_foundfilenames      rfind_cookiez$detect_encoding.<locals>.find_cookieWs(		#++g.K,#EKKN3		#8$E7"#3C"#&&=CCHMC!#&&H="	#;C##**39c""		#	#*X5c""6<<X "c""	#sBB9+B699C2T	utf-8-sig)__self__nameAttributeErrorrrblank_rer)	rr[defaultrrfirstsecondrrs	`      @@rrr9s"$$))IHG$L
NE!	ab	{5!H%  >>% 
^F6"H%((UFO##OsB$$B21B2ct|d}	t|j\}}|jdt	||d}d|_|S#|j
xYw)zXOpen a file in read only mode using the encoding detected by
    detect_encoding().
    rbrT)line_bufferingr3)
_builtin_openrrseekrmodeclose)rbufferr[linestexts     rrrs_8T
*F)&//:%AVXdC	
s?AA!c#Kt|\}}tj|t|d}||dk(rd}t	t
|dddt
|j|dEd{y7w)	a
    The tokenize() generator requires one argument, readline, which
    must be a callable object which provides the same interface as the
    readline() method of built-in file objects.  Each call to the function
    should return one line of input as bytes.  Alternatively, readline
    can be a callable function terminating with StopIteration:
        readline = open(myfile, 'rb').__next__  # Example of alternate readline

    The generator produces 5-tuples with these members: the token type; the
    token string; a 2-tuple (srow, scol) of ints specifying the row and
    column where the token begins in the source; a 2-tuple (erow, ecol) of
    ints specifying the row and column where the token ends in the source;
    and the line on which the token was found.  The line passed is the
    physical line.

    The first token sequence will always be an ENCODING token
    which tells you which encoding was used to decode the bytes stream.
    rNrr)rrr8Textra_tokens)rr9rror
rr!_generate_tokens_from_c_tokenizer__next__)rr[consumedrl_gens    rr	r	sm&)2Hh


hXs(;
<F{"H(FFB??0(Y]^^^sA(A2*A0+A2ct|dS)zTokenize a source reading Python code as unicode strings.

    This has the same API as tokenize(), except that it expects the *readline*
    callable to return str objects instead of bytes.
    Tr)rrs rr
r
s-XDIIrcR
ddl}d
d
fd	}|jd}|jdddd	
|jddd
dd|j}	|jr@|j}t|d5}t
t|j}dddn'd}ttjjd}D]g}|j}|jr|j}d|j|j zz}	t#|	dt$|d|j&diy#1swYvxYw#t($r8}
|
j*ddd\}}||
j*d||fYd}
~
yd}
~
wt,$r5}
|
j*d\}}||
j*d||fYd}
~
yd}
~
wt.$r}
||
Yd}
~
yd}
~
wt0$r}
||
Yd}
~
yd}
~
wt2$rt#dYyt4$r}

d|
zd}
~
wwxYw)Nrctjj|tjjdy)N
)sysstderrwrite)messages rperrorzmain.<locals>.perrors&

!

rc|r|f|z|fz}d|zn|r|d|nd|ztjdy)Nz%s:%d:%d: error: %sz	: error: z	error: %srW)rexit)rrlocationargsrs    rerrorzmain.<locals>.errorsO;)WJ6D(4/0
h89;()rzpython -m tokenize)progrr/zfilename.pyz'the file to tokenize; defaults to stdin)destnargsmetavarhelpz-ez--exactexact
store_truez(display token names using the exact type)ractionrrz<stdin>Trz%d,%d-%d,%d:2015rWrzinterrupted
zunexpected error: %s)NN)argparseArgumentParseradd_argument
parse_argsrrlistr	rrrstdinrrrrbrprintrrIndentationErrorrrOrOSErrorKeyboardInterrupt	Exception)rrparserrrr5rXr
token_typetoken_rangeerrrcolumnrs             @rmainrs
$
$*>
$
?F
Zs -FHiglGID"==}}Hx.
4!hqzz23
4
4!H6		""7F
	EEJzz"--
(EKK%)),CDK 4ellD
E	E
4
4 5xx{1Q'f
chhqk8dF^445xx{f
chhqk8dF^44
c8
c


o%+,
sg$E	D= BE	=EE			H&.FH&+GH&
	GH&'G44H&
H&H!!H&cd|vry|S)zTransform error messages from the C tokenizer into the Python tokenize

    The C tokenizer is more picky than the Python one, so we need to massage
    the error messages a bit for backwards compatibility.
    z)unterminated triple-quoted string literalzEOF in multi-line stringr")rs r_transform_msgrs3c9)Jrc#jK|tj||}ntj|||}	|D]}tj|y#t$rR}t|tk7r|dt
|j}t||j|jfdd}~wwxYww)zWTokenize a source reading Python code as unicode strings using the internal C tokenizerNr)r[r)	_tokenize
TokenizerIterr
_makerrrrrOlinenooffset)sourcer[rr}infoers       rrrs

$
$V,
G

$
$Vh\
Z>	(D//$''	(>7k!QUU#qxx23=	>s)3B3AB3	B0A
B++B00B3__main__)NF)W__doc__
__author____credits__builtinsrrcodecsrrcollections	functoolsior	itertoolsr9rErrrrrFASCIIrr__all__
namedtupler
r*r-r0
WhitespaceCommentIgnoreName	Hexnumber	Binnumber	Octnumber	Decnumber	IntnumberExponent
PointfloatExpfloatFloatnumber
ImagnumberNumberrC	lru_cacherIStringPrefixSingleDoubleSingle3Double3TripleStringmapescapesortedSpecialFunny
PlainTokenTokenContStrPseudoExtrasPseudoTokenendpats_prefixset
single_quoted
triple_quotedrAr4r=tabsizerrOrSrUrrrr	r
rrrrr"rr<module>r6s,*
+#	
#BJJ@"((K	2::0"((;
--66	&&&{4PQ:/1

	c*z12	2U7^	C
&		 	.	)Y	9=	(
?)+-28_=
(*J)
+[7-B
C
	z;		2
((
*,-
$	#
2
2	|e#\E%9	:	|====
?RYY'8$ GH
I
h 
65&$
/
==c:&'==c:&'(]GV45vugtLL

#%'G#GGcM#GGcM&GGeO&GGeO	'


		A#gq3w
!%iU
#!
q
!!&Y%i i X6	Z$z
_8J=~
> zFr