/usr/lib64/python3.9/lib2to3/pgen2/__pycache__
NameSizeModeActions
conv.cpython-39.opt-1.pyc61340644editdlrm
conv.cpython-39.opt-2.pyc36520644editdlrm
conv.cpython-39.pyc69950644editdlrm
driver.cpython-39.opt-1.pyc50970644editdlrm
driver.cpython-39.opt-2.pyc41010644editdlrm
driver.cpython-39.pyc51290644editdlrm
grammar.cpython-39.opt-1.pyc57070644editdlrm
grammar.cpython-39.opt-2.pyc25560644editdlrm
grammar.cpython-39.pyc57070644editdlrm
literals.cpython-39.opt-1.pyc13640644editdlrm
literals.cpython-39.opt-2.pyc12870644editdlrm
literals.cpython-39.pyc15310644editdlrm
parse.cpython-39.opt-1.pyc64660644editdlrm
parse.cpython-39.opt-2.pyc32420644editdlrm
parse.cpython-39.pyc64800644editdlrm
pgen.cpython-39.opt-1.pyc93190644editdlrm
pgen.cpython-39.opt-2.pyc93190644editdlrm
pgen.cpython-39.pyc97220644editdlrm
token.cpython-39.opt-1.pyc18890644editdlrm
token.cpython-39.opt-2.pyc18390644editdlrm
token.cpython-39.pyc18890644editdlrm
tokenize.cpython-39.opt-1.pyc151240644editdlrm
tokenize.cpython-39.opt-2.pyc112300644editdlrm
tokenize.cpython-39.pyc151730644editdlrm
__init__.cpython-39.opt-1.pyc1670644editdlrm
__init__.cpython-39.opt-2.pyc1390644editdlrm
__init__.cpython-39.pyc1670644editdlrm
Edit: /usr/lib64/python3.9/lib2to3/pgen2/__pycache__/tokenize.cpython-39.pyc (15173B)
a ´iRã @sŒdZdZdZddlZddlZddlmZmZddlTddl m Z d d „e e ƒDƒgd ¢Z [ ze WneyzeZ Yn0d d „Zdd„Zdd„Zdd„ZdZdZeedeƒeeƒZdZdZdZdZeddƒZeeeeeƒZdZeddƒeeƒZd eZeeeƒZ ed!e d"ƒZ!ee!e eƒZ"d#Z#d$Z$d%Z%d&Z&d'Z'ee'd(e'd)ƒZ(ee'd*e'd+ƒZ)ed,d-d.d/d0d1d2d3d4ƒ Z*d5Z+ed6d7d8ƒZ,ee*e+e,ƒZ-ee"e-e)eƒZ.ee.Z/ee'd9ed:dƒe'd;edd?d@ƒed=d>dAdBƒBhdC£BZ9e 4e#¡e 4e$¡e7e8dDœdEdF„e9Dƒ¥dGdF„e9Dƒ¥dHdF„e9Dƒ¥Z:d(d)hdIdJ„e9DƒBdKdJ„e9DƒBZ;d:dƒZ?GdQdR„dRe>ƒZ@dSdT„ZAeAfdUdV„ZBdWdX„ZCGdYdZ„dZƒZDe 4d[ejE¡ZFe 4d\ejE¡ZGd]d^„ZHd_d`„ZIdadb„ZJdcdd„ZKeLdek�rˆddlMZMeNeMjOƒdk�r|eBePeMjOdƒjQƒn eBeMjRjQƒdS)faÀ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.zKa-Ping Yee z@GvR, ESR, Tim Peters, Thomas Wouters, Fred Drake, Skip MontanaroéN)ÚBOM_UTF8Úlookup)Ú*é)ÚtokencCsg|]}|ddkr|‘qS)rÚ_©)Ú.0Úxrrú./usr/lib64/python3.9/lib2to3/pgen2/tokenize.pyÚ %ór )ÚtokenizeÚgenerate_tokensÚ untokenizecGsdd |¡dS)Nú(ú|ú))Újoin©Úchoicesrrr Úgroup0r rcGs t|ŽdS)Nr©rrrrr Úany1r rcGs t|ŽdS)Nú?rrrrr Úmaybe2r rcst‡fdd„ˆDƒƒS)Nc3s4|],}ˆdD]}| ¡| ¡kr||VqqdS))ÚN)Úcasefold)r r Úy©Úlrr Ú 4sz _combinations..)Úsetrrrr Ú _combinations3s ÿr#z[ \f\t]*z #[^\r\n]*z\\\r?\nz\w+z0[bB]_?[01]+(?:_[01]+)*z(0[xX]_?[\da-fA-F]+(?:_[\da-fA-F]+)*[lL]?z0[oO]?_?[0-7]+(?:_[0-7]+)*[lL]?z[1-9]\d*(?:_\d+)*[lL]?z0[lL]?z[eE][-+]?\d+(?:_\d+)*z\d+(?:_\d+)*\.(?:\d+(?:_\d+)*)?z\.\d+(?:_\d+)*z \d+(?:_\d+)*z\d+(?:_\d+)*[jJ]z[jJ]z[^'\\]*(?:\\.[^'\\]*)*'z[^"\\]*(?:\\.[^"\\]*)*"z%[^'\\]*(?:(?:\\.|'(?!''))[^'\\]*)*'''z%[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""z'(?:[uUrRbBfF]|[rR][fFbB]|[fFbBuU][rR])?ú'''ú"""z'[^\n'\\]*(?:\\.[^\n'\\]*)*'z"[^\n"\\]*(?:\\.[^\n"\\]*)*"z\*\*=?z>>=?z<<=?z<>z!=z//=?z->z[+\-*/%&@|^=<>]=?ú~z[][(){}]z\r?\nz:=z[:;.,`@]z'[^\n'\\]*(?:\\.[^\n'\\]*)*ú'z"[^\n"\\]*(?:\\.[^\n"\\]*)*ú"ÚrÚRÚfÚFÚbÚB>ZuRÚuÚurZUrÚUZUR)r'r(r$r%cCsi|]}|›d�t“qS©r$)Ú single3prog©r Úprefixrrr Ú yr r6cCsi|]}|›d�t“qS©r%)Ú double3progr4rrr r6zr cCsi|] }|d“qS©Nrr4rrr r6{r cCsh|]}|›d�’qSr2rr4rrr Ú r r:cCsh|]}|›d�’qSr7rr4rrr r:€r cCsh|]}|›d�’qS)r'rr4rrr r:„r cCsh|]}|›d�’qS)r(rr4rrr r:…r éc@s eZdZdS)Ú TokenErrorN©Ú__name__Ú __module__Ú __qualname__rrrr r<Šr r<c@s eZdZdS)ÚStopTokenizingNr=rrrr rAŒr rAc Cs4|\}}|\}}td||||t|t|ƒfƒdS)Nz%d,%d-%d,%d: %s %s)ÚprintÚtok_nameÚrepr) ÚtyperZxxx_todo_changemeZxxx_todo_changeme1ÚlineZsrowZscolZerowZecolrrr Ú printtokenŽs ÿrGcCs&zt||ƒWnty Yn0dS)a: 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)Ú tokenize_looprA)ÚreadlineÚ tokeneaterrrr r”s  rcCst|ƒD] }||ŽqdSr9)r)rIrJZ token_inforrr rH§s rHc@s,eZdZdd„Zdd„Zdd„Zdd„Zd S) Ú UntokenizercCsg|_d|_d|_dS)Nrr)ÚtokensÚprev_rowÚprev_col)Úselfrrr Ú__init__­szUntokenizer.__init__cCs8|\}}||jksJ‚||j}|r4|j d|¡dS)Nú )rMrNrLÚappend)rOÚstartÚrowÚcolÚ col_offsetrrr Úadd_whitespace²s  zUntokenizer.add_whitespacecCs‚|D]p}t|ƒdkr$| ||¡qv|\}}}}}| |¡|j |¡|\|_|_|ttfvr|jd7_d|_qd  |j¡S)Nérrr) ÚlenÚcompatrWrLrRrMrNÚNEWLINEÚNLr)rOÚiterableÚtÚtok_typerrSÚendrFrrr r¹s      zUntokenizer.untokenizec CsÎd}g}|jj}|\}}|ttfvr,|d7}|ttfvr|t kr–|  ¡q@n*|ttfvr¨d}n|rÀ|rÀ||dƒd}||ƒq@dS)NFrQTrXéÿÿÿÿ) rLrRÚNAMEÚNUMBERr[r\ÚASYNCÚAWAITÚINDENTÚDEDENTÚpop) rOrr]Ú startlineÚindentsÚ toks_appendÚtoknumÚtokvalÚtokrrr rZÇs0     zUntokenizer.compatN)r>r?r@rPrWrrZrrrr rK«srKz&^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)s^[ \t\f]*(?:[#\r\n]|$)cCsH|dd… ¡ dd¡}|dks*| d¡r.dS|dvs@| d¡rDd S|S) z(Imitates get_normal_name in tokenizer.c.Né rú-úutf-8zutf-8-)zlatin-1ú iso-8859-1z iso-latin-1)zlatin-1-z iso-8859-1-z iso-latin-1-rr)ÚlowerÚreplaceÚ startswith)Úorig_encÚencrrr Ú_get_normal_nameæsÿrxcs¶d‰d}d}‡fdd„}‡fdd„}|ƒ}| t¡rHd‰|d d…}d }|sT|gfS||ƒ}|rj||gfSt |¡s~||gfS|ƒ}|s’||gfS||ƒ}|rª|||gfS|||gfS) 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. FNrqcs&zˆƒWSty tƒYS0dSr9)Ú StopIterationÚbytesr)rIrr Ú read_or_stops z%detect_encoding..read_or_stopcs’z| d¡}Wnty"YdS0t |¡}|s6dSt| d¡ƒ}z t|ƒ}Wntyntd|ƒ‚Yn0ˆrŽ|j dkr†tdƒ‚|d7}|S)NÚasciirzunknown encoding: rqzencoding problem: utf-8z-sig) ÚdecodeÚUnicodeDecodeErrorÚ cookie_reÚmatchrxrrÚ LookupErrorÚ SyntaxErrorÚname)rFÚ line_stringr€ÚencodingÚcodec)Ú bom_foundrr Ú find_cookie s"     z$detect_encoding..find_cookieTéz utf-8-sig)rurÚblank_rer€)rIr…Údefaultr{rˆÚfirstÚsecondr)r‡rIr Údetect_encodingñs0         rŽcCstƒ}| |¡S)a«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 input: # 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 )rKr)r]Úutrrr r:srccsŒd}}}d\}}d}dg}d}d} d} d} z |ƒ} WntyNd} Yn0|d}dt| ƒ} }|�r0| sztd|ƒ‚| | ¡}|rÈ| d¡} }t|| d|…|||f|| fVd\}}d}nd|�r| dd…d k�r| d d…d k�rt|| ||t| ƒf|fVd}d}q.n|| }|| }q.�nB|dk�rZ|�sZ| �sJ�q4d}| |k�r´| | d k�rp|d}n8| | d k�r�|tdt}n| | dk�r´d}n�q´| d} �qN| |k�rÂ�q4|�rÒ|Vd}| | dv�rˆ| | dk�rR| | d… d¡}| t|ƒ}t ||| f|| t|ƒf| fVt | |d…||f|t| ƒf| fVq.t t f| | dk| | d…|| f|t| ƒf| fVq.||dk�rÀ|  |¡t | d| …|df|| f| fV||dk�r2||v�rêt dd|| | fƒ‚|dd…}| �r| |dk�rd} d} d} td|| f|| f| fV�qÀ| �rr| �rr| |dk�rrd} d} d} n| �sntd|dfƒ‚d}| |kr.t | | ¡}|�r| d¡\}}||f||f|}}} | ||…| |}}|tjv�sè|dk�rü|dk�rüt|||| fV�q.|dv�rHt}|dk�rt }n | �r$d} |�r4|Vd}||||| fV�q.|dk�r†| d¡�rbJ‚|�rr|Vd}t |||| fV�q.|tv�rt|}| | | ¡}|�ræ| d¡} | || …}|�rÐ|Vd}t|||| f| fVn||f}| |d…}| }q.�q.|tv�s2|dd…tv�s2|dd…tv�rª|ddk�r†||f}t|�pjt|d�pjt|d}| |d…d}}| }q.n |�r–|Vd}t|||| fV�q.| ¡�rŠ|dv�ræ| �ræ|dk�rÒtnt|||| fV�qrt|||| f}|dk�r |�s |}�qr|dv�rr|�rr|dtk�rr|ddk�rr|dk�rNd} |d} t|d|d|d|dfVd}|�r‚|Vd}|Vnz|d k�r¾|�r¤|Vd}t |||| f| fVd}nF|d!v�rÒ|d}n|d"v�rä|d}|�rô|Vd}t|||| fVn(t| | || f|| df| fV| d} �qrq.|�rD|Vd}|dd…D]}td|df|dfdfV�qPtd|df|dfdfVdS)#a4 The generate_tokens() 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 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 physical line. r)rrNFrrzEOF in multi-line stringéþÿÿÿz\ éýÿÿÿz\ rQú ú z# ú#z raz3unindent does not match any outer indentation levelz zEOF in multi-line statementÚ.TÚ rXr‰)ÚasyncÚawaitr—)ÚdefÚforr™éú\z([{z)]})ryrYr<r€r`ÚSTRINGÚ ERRORTOKENÚtabsizeÚrstripÚCOMMENTr\rRrfÚIndentationErrorrgÚ pseudoprogÚspanÚstringÚdigitsrcr[ÚendswithÚ triple_quotedÚendprogsÚ single_quotedÚ isidentifierrdrerbÚOPÚ ENDMARKER)rIÚlnumÚparenlevÚ continuedÚcontstrÚneedcontÚcontlinerjZstashedZ async_defZasync_def_indentZ async_def_nlrFÚposÚmaxÚstrstartÚendprogÚendmatchr`ÚcolumnÚ comment_tokenZnl_posÚ pseudomatchrSÚsposÚeposrÚinitialÚnewlinernÚindentrrr rOs„      ÿ*ÿ     ÿ ÿÿ    þ   ÿÿ         ÿþ ÿ  ÿ  ÿ þ  þ ÿrÚ__main__)SÚ__doc__Ú __author__Ú __credits__r¥ÚreÚcodecsrrZlib2to3.pgen2.tokenrrÚdirÚ__all__rzÚ NameErrorÚstrrrrr#Ú WhitespaceÚCommentÚIgnoreÚNameÚ BinnumberÚ HexnumberÚ OctnumberÚ DecnumberÚ IntnumberÚExponentÚ PointfloatÚExpfloatÚ FloatnumberÚ ImagnumberÚNumberÚSingleÚDoubleÚSingle3ÚDouble3Z _litprefixÚTripleÚStringZOperatorZBracketÚSpecialÚFunnyÚ PlainTokenÚTokenÚContStrÚ PseudoExtrasÚ PseudoTokenÚmapÚcompileZ tokenprogr£r3r8Z _strprefixesr©r¨rªrŸÚ Exceptionr<rArGrrHrKÚASCIIrrŠrxrŽrrr>ÚsysrYÚargvÚopenrIÚstdinrrrr ÚsØÿ      ÿ ý  ÿÿþ ÿ   ÿþÿÿ þ ý ü ÿ þÿ ÿ þÿ 8 Ic &