ACC SHELL

Path : /usr/lib/python/lib2to3/pgen2/
File Upload :
Current File : //usr/lib/python/lib2to3/pgen2/tokenize.pyc

Ñò
sÄMc'@sûdZdZdZddkZddkZddklZlZddkTddk	l
Z
gZee
ƒD]"Z
e
d	d
joee
qkqk[ddd
gZ[
d„Zd„Zd„ZdZdZeedeƒeeƒZdZdZdZdZdZeeeeeƒZdZeddƒeeƒZdeZeeeƒZededƒZeeeeƒZ dZ!d Z"d!Z#d"Z$ed#d$ƒZ%ed%d&ƒZ&ed'd(d)d*d+d,d-d.d/ƒ	Z'd0Z(ed1d2ƒZ)ee'e(e)ƒZ*ee e*e&eƒZ+ee+Z,ed3ed4dƒd5ed6dƒƒZ-edee%ƒZ.eee.e e*e-eƒZ/e0ei1e,e/e#e$fƒ\Z2Z3Z4Z5h&ei1e!ƒd46ei1e"ƒd66e4d76e5d86e4d96e5d:6e4d;6e5d<6e4d=6e5d>6e4d?6e5d@6e4dA6e5dB6e4dC6e5dD6e4dE6e5dF6e4dG6e5dH6e4dI6e5dJ6e4dK6e5dL6e4dM6e5dN6e4dO6e5dP6e4dQ6e5dR6e4dS6e5dT6ddU6ddV6ddW6ddX6ddY6ddZ6Z7hZ8xd‡D]Z9e9e8e9<qËWhZ:xdˆD]Z9e9e:e9<qìWdwZ;dxe<fdy„ƒYZ=dze<fd{„ƒYZ>d|„Z?e?d}„Z@d~„ZAdd‰d€„ƒYZBei1dƒZCd‚„ZDdƒ„ZEd„„ZFd…„ZGeHd†joTddkIZIeJeIiKƒdjoe@eLeIiKdƒiMƒq÷e@eIiNiMƒndS(ŠsÀTokenization help for Python programs.

generate_tokens(readline) is a generator that breaks a stream of
text into Python tokens.  It accepts a readline-like method which is called
repeatedly to get the next line of input (or "" 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

Older entry points
    tokenize_loop(readline, tokeneater)
    tokenize(readline, tokeneater=printtoken)
are the same, except instead of generating tokens, tokeneater is a callback
function to which the 5 fields described above are passed as 5 arguments,
each time a new token is found.sKa-Ping Yee <ping@lfw.org>s@GvR, ESR, Tim Peters, Thomas Wouters, Fred Drake, Skip MontanaroiÿÿÿÿN(tBOM_UTF8tlookup(t*i(ttokenit_ttokenizetgenerate_tokenst
untokenizecGsddi|ƒdS(Nt(t|t)(tjoin(tchoices((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pytgroup)scGst|ŒdS(NR(R
(R((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pytany*scGst|ŒdS(Nt?(R
(R((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pytmaybe+ss[ \f\t]*s	#[^\r\n]*s\\\r?\ns[a-zA-Z_]\w*s
0[bB][01]*s0[xX][\da-fA-F]*[lL]?s0[oO]?[0-7]*[lL]?s
[1-9]\d*[lL]?s[eE][-+]?\d+s\d+\.\d*s\.\d+s\d+s\d+[jJ]s[jJ]s[^'\\]*(?:\\.[^'\\]*)*'s[^"\\]*(?:\\.[^"\\]*)*"s%[^'\\]*(?:(?:\\.|'(?!''))[^'\\]*)*'''s%[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""s[ubUB]?[rR]?'''s[ubUB]?[rR]?"""s&[uU]?[rR]?'[^\n'\\]*(?:\\.[^\n'\\]*)*'s&[uU]?[rR]?"[^\n"\\]*(?:\\.[^\n"\\]*)*"s\*\*=?s>>=?s<<=?s<>s!=s//=?s->s[+\-*/%&|^=<>]=?t~s[][(){}]s\r?\ns[:;.,`@]s'[uUbB]?[rR]?'[^\n'\\]*(?:\\.[^\n'\\]*)*t's'[uUbB]?[rR]?"[^\n"\\]*(?:\\.[^\n"\\]*)*t"s'''s"""sr'''sr"""su'''su"""sb'''sb"""sur'''sur"""sbr'''sbr"""sR'''sR"""sU'''sU"""sB'''sB"""suR'''suR"""sUr'''sUr"""sUR'''sUR"""sbR'''sbR"""sBr'''sBr"""sBR'''sBR"""trtRtutUtbtBsr'sr"sR'sR"su'su"sU'sU"sb'sb"sB'sB"sur'sur"sUr'sUr"suR'suR"sUR'sUR"sbr'sbr"sBr'sBr"sbR'sbR"sBR'sBR"it
TokenErrorcBseZRS((t__name__t
__module__(((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pyRstStopTokenizingcBseZRS((RR(((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pyR‘sc	CsA|\}}|\}}d||||t|t|ƒfGHdS(Ns%d,%d-%d,%d:	%s	%s(ttok_nametrepr(	ttypeRtstarttendtlinetsrowtscolterowtecol((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pyt
printtoken“scCs+yt||ƒWntj
onXdS(s:
    The tokenize() function accepts two parameters: one representing the
    input stream, and one providing an output mechanism for tokenize().

    The first parameter, readline, 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 a string.

    The second parameter, tokeneater, must also be a callable object. It is
    called once for each token, with five arguments, corresponding to the
    tuples generated by generate_tokens().
    N(t
tokenize_loopR(treadlinet
tokeneater((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pyR™s
cCs%xt|ƒD]}||Œq
WdS(N(R(R*R+t
token_info((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pyR)¬s
tUntokenizercBs,eZd„Zd„Zd„Zd„ZRS(cCsg|_d|_d|_dS(Nii(ttokenstprev_rowtprev_col(tself((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pyt__init__²s		cCsS|\}}||ijpt‚||i}|o|iid|ƒndS(Nt (R/tAssertionErrorR0R.tappend(R1R!trowtcolt
col_offset((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pytadd_whitespace·s

cCs¼x©|D]¡}t|ƒdjo|i||ƒPn|\}}}}}|i|ƒ|ii|ƒ|\|_|_|ttfjo|id7_d|_qqWdi	|iƒS(Niiit(
tlentcompatR9R.R5R/R0tNEWLINEtNLR(R1titerablettttok_typeRR!R"R#((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pyR¾s
c	Cs4t}g}|ii}|\}}|ttfjo|d7}n|ttfjo
t}nxË|D]Ã}|d \}}|ttfjo|d7}n|tjo|i|ƒqinb|t	jo|i
ƒqinD|ttfjo
t}n'|o|o||dƒt}n||ƒqiWdS(NR3iiÿÿÿÿ(tFalseR.R5tNAMEtNUMBERR=R>tTruetINDENTtDEDENTtpop(	R1RR?t	startlinetindentsttoks_appendttoknumttokvalttok((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pyR<Ìs2






(RRR2R9RR<(((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pyR-°s			scoding[:=]\s*([-\w.]+)cCsd|d iƒiddƒ}|djp|idƒodS|djp|id
ƒodS|S(s(Imitates get_normal_name in tokenizer.c.iRt-sutf-8sutf-8-slatin-1s
iso-8859-1siso-latin-1slatin-1-siso-8859-1-siso-latin-1-(slatin-1s
iso-8859-1siso-latin-1(slatin-1-siso-8859-1-siso-latin-1-(tlowertreplacet
startswith(torig_enctenc((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pyt_get_normal_nameês
csÜt‰d}‡fd†}‡fd†}|ƒ}|itƒot‰|d}n|pdgfS||ƒ}|o||gfS|ƒ}|pd|gfS||ƒ}|o|||gfSd||gfS(sÎ
    The detect_encoding() function is used to detect the encoding that should
    be used to decode a Python source file. It requires one argment, 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.

    If no encoding is specified, then the default of 'utf-8' will be returned.
    cs&yˆƒSWntj
odSXdS(NR:(t
StopIteration((R*(s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pytread_or_stopscsÀy|idƒ}Wntj
odSXti|ƒ}|pdSt|dƒ}yt|ƒ}Wn#tj
otd|ƒ‚nXˆo*|i	djotdƒ‚q¼d}n|S(Ntasciiisunknown encoding: sutf-8sencoding problem: utf-8s	utf-8-sig(
tdecodetUnicodeDecodeErrortNonet	cookie_retfindallRURtLookupErrortSyntaxErrortname(R#tline_stringtmatchestencodingtcodec(t	bom_found(s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pytfind_cookies"
isutf-8N(RBR[RRRRE(R*RcRWRftfirsttsecond((ReR*s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pytdetect_encodingõs(		cCstƒ}|i|ƒS(s¬Transform tokens back into Python source code.

    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 intput:
        # Output text will tokenize the back to the input
        t1 = [tok[:2] for tok in generate_tokens(f.readline)]
        newcode = untokenize(t1)
        readline = iter(newcode.splitlines(1)).next
        t2 = [tok[:2] for tokin generate_tokens(readline)]
        assert t1 == t2
    (R-R(R?tut((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pyR<s	ccs d}}}tidd}}d\}}d}dg}	xy
|ƒ}
Wntj
o
d}
nX|d}dt|
ƒ}}|oú|
ptd|
f‚n|i|
ƒ}|oO|idƒ}}t||
| |
||f||
fVd\}}d}q|oY|
ddjoH|
d	d
jo7t	||
|
|t|
ƒf|fVd}d}q@q||
}||
}q@n||djoH|o@|
pPnd}x~||jop|
|djo|d}nD|
|djo|t
dt
}n|
|d
jo
d}nP|d}q±W||joPn|
|djoÑ|
|djo{|
|idƒ}|t|ƒ}t|||f||t|ƒf|
fVt
|
|||f|t|
ƒf|
fVq@t
tf|
|dj|
|||f|t|
ƒf|
fVq@n||	djo5|	i|ƒt|
| |df||f|
fVnx–||	djoZ||	jotdd|||
fƒ‚n|	d }	td||f||f|
fVqlWn'|
ptd|dff‚nd}x?||jo1ti|
|ƒ}|oâ|idƒ\}}||f||f|}}}|
||!|
|}}||jp|djo%|djot||||
fVq?|djo5t}|djo
t
}n|||||
fVq?|djo0|idƒpt‚t||||
fVq?|tjo~t|}|i|
|ƒ}|o:|idƒ}|
||!}t||||f|
fVq	||f}
|
|}|
}Pq?|tjp"|d tjp|d tjoy|ddjoP||f}
t|pt|dpt|d}|
|d}}|
}Pq	t||||
fVq?||jot||||
fVq?|djo$t
||||f|
fVd}q?|djo|d}n|djo|d}nt||||
fVqt	|
|||f||df|
fV|d}qWq@x2|	dD]&}td|df|dfdfVqRWtd|df|dfdfVdS(sS
    The generate_tokens() generator requires one argment, 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 a string.  Alternately, readline
    can be a callable function terminating with StopIteration:
        readline = open(myfile).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
    logical line; continuation lines are included.
    iRt
0123456789R:isEOF in multi-line stringiþÿÿÿs\
iýÿÿÿs\
R3s	ss#
t#s
iÿÿÿÿs3unindent does not match any outer indentation levels
<tokenize>sEOF in multi-line statementt.s
iis\s([{s)]}N(R:i(R:i(tstringt
ascii_lettersR[RVR;RtmatchR"tSTRINGt
ERRORTOKENttabsizetrstriptCOMMENTR>R5RFtIndentationErrorRGt
pseudoprogtspanRDR=tendswithR4t
triple_quotedtendprogst
single_quotedRCtOPt	ENDMARKER(R*tlnumtparenlevt	continuedt	namecharstnumcharstcontstrtneedconttcontlineRJR#tpostmaxtstrstarttendprogtendmatchR"tcolumnt
comment_tokentnl_postpseudomatchR!tsposteposRtinitialtnewlinetindent((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pyRQs	


)





$
$ 
(

)
 















$t__main__(s'''s"""sr'''sr"""sR'''sR"""su'''su"""sU'''sU"""sb'''sb"""sB'''sB"""sur'''sur"""sUr'''sUr"""suR'''suR"""sUR'''sUR"""sbr'''sbr"""sBr'''sBr"""sbR'''sbR"""sBR'''sBR"""(RRsr'sr"sR'sR"su'su"sU'sU"sb'sb"sB'sB"sur'sur"sUr'sUr"suR'suR"sUR'sUR"sbr'sbr"sBr'sBr"sbR'sbR"sBR'sBR"((Ot__doc__t
__author__t__credits__RntretcodecsRRtlib2to3.pgen2.tokenR:Rt_[1]tdirtxt__all__R
RRt
WhitespacetCommenttIgnoretNamet	Binnumbert	Hexnumbert	Octnumbert	Decnumbert	IntnumbertExponentt
PointfloattExpfloattFloatnumbert
ImagnumbertNumbertSingletDoubletSingle3tDouble3tTripletStringtOperatortBrackettSpecialtFunnyt
PlainTokentTokentContStrtPseudoExtrastPseudoTokentmaptcompilet	tokenprogRwtsingle3progtdouble3progR[R{RzR@R|Rst	ExceptionRRR(RR)R-R\RURiRRRtsysR;targvtopenR*tstdin(((s,/usr/lib/python2.6/lib2to3/pgen2/tokenize.pyt<module>sÚ
<
			
		

'#		8		G		˜


ACC SHELL 2018