/usr/lib64/python3.9/lib2to3/__pycache__
NameSizeModeActions
btm_matcher.cpython-39.opt-1.pyc48770644editdlrm
btm_matcher.cpython-39.opt-2.pyc33060644editdlrm
btm_matcher.cpython-39.pyc48770644editdlrm
btm_utils.cpython-39.opt-1.pyc61480644editdlrm
btm_utils.cpython-39.opt-2.pyc46360644editdlrm
btm_utils.cpython-39.pyc61480644editdlrm
fixer_base.cpython-39.opt-1.pyc62550644editdlrm
fixer_base.cpython-39.opt-2.pyc35040644editdlrm
fixer_base.cpython-39.pyc62550644editdlrm
fixer_util.cpython-39.opt-1.pyc121700644editdlrm
fixer_util.cpython-39.opt-2.pyc100070644editdlrm
fixer_util.cpython-39.pyc121700644editdlrm
main.cpython-39.opt-1.pyc86710644editdlrm
main.cpython-39.opt-2.pyc69180644editdlrm
main.cpython-39.pyc86890644editdlrm
patcomp.cpython-39.opt-1.pyc53890644editdlrm
patcomp.cpython-39.opt-2.pyc48810644editdlrm
patcomp.cpython-39.pyc56050644editdlrm
pygram.cpython-39.opt-1.pyc12620644editdlrm
pygram.cpython-39.opt-2.pyc10570644editdlrm
pygram.cpython-39.pyc12620644editdlrm
pytree.cpython-39.opt-1.pyc236720644editdlrm
pytree.cpython-39.opt-2.pyc149690644editdlrm
pytree.cpython-39.pyc242950644editdlrm
refactor.cpython-39.opt-1.pyc206130644editdlrm
refactor.cpython-39.opt-2.pyc165670644editdlrm
refactor.cpython-39.pyc206430644editdlrm
__init__.cpython-39.opt-1.pyc3020644editdlrm
__init__.cpython-39.opt-2.pyc3020644editdlrm
__init__.cpython-39.pyc3020644editdlrm
__main__.cpython-39.opt-1.pyc2150644editdlrm
__main__.cpython-39.opt-2.pyc2150644editdlrm
__main__.cpython-39.pyc2150644editdlrm
Edit: /usr/lib64/python3.9/lib2to3/__pycache__/patcomp.cpython-39.opt-1.pyc (5389B)
a ´iŽã@s dZdZddlZddlmZmZmZmZmZm Z ddl m Z ddl m Z Gdd „d e ƒZd d „ZGd d „d eƒZejejejddœZdd„Zdd„Zdd„ZdS)z�Pattern compiler. The grammar is taken from PatternGrammar.txt. The compiler compiles a pattern to a pytree.*Pattern instance. z#Guido van Rossum éNé)ÚdriverÚliteralsÚtokenÚtokenizeÚparseÚgrammar)Úpytree)Úpygramc@s eZdZdS)ÚPatternSyntaxErrorN)Ú__name__Ú __module__Ú __qualname__©rrú'/usr/lib64/python3.9/lib2to3/patcomp.pyr sr c csLtjtjtjh}t t |¡j¡}|D] }|\}}}}}||vr&|Vq&dS)z6Tokenizes a string suppressing significant whitespace.N) rÚNEWLINEÚINDENTÚDEDENTrÚgenerate_tokensÚioÚStringIOÚreadline) ÚinputÚskipÚtokensZ quintupleÚtypeÚvalueÚstartÚendZ line_textrrrÚtokenize_wrappers rc@s:eZdZd dd„Zddd„Zdd„Zdd d „Zd d „ZdS)ÚPatternCompilerNcCsZ|durtj|_tj|_nt |¡|_t |j¡|_tj|_ tj |_ tj |jt d�|_dS)z^Initializer. Takes an optional alternative filename for the pattern grammar. N)Úconvert)r Zpattern_grammarrZpattern_symbolsÚsymsrZ load_grammarZSymbolsZpython_grammarZ pygrammarZpython_symbolsÚpysymsZDriverÚpattern_convert)ÚselfZ grammar_filerrrÚ__init__(s  zPatternCompiler.__init__Fc Csrt|ƒ}z|jj||d�}Wn4tjyP}ztt|ƒƒd‚WYd}~n d}~00|rd| |¡|fS| |¡SdS)z=Compiles a pattern string to a nested pytree.*Pattern object.)ÚdebugN)rrZ parse_tokensrZ ParseErrorr ÚstrÚ compile_node)r%rr'Z with_treerÚrootÚerrrÚcompile_pattern7s$zPatternCompiler.compile_patternc sV|jˆjjkr|jd}|jˆjjkrz‡fdd„|jddd…Dƒ}t|ƒdkrX|dStjdd„|Dƒddd�}| ¡S|jˆjj krʇfd d„|jDƒ}t|ƒdkr°|dStj|gddd�}| ¡S|jˆjj krþˆ  |jdd…¡}t  |¡}| ¡Sd}|j}t|ƒd k�r>|djt jk�r>|dj}|dd…}d}t|ƒdk�rx|d jˆjjk�rx|d }|dd …}ˆ  ||¡}|du�r>|j} | d} | jt jk�r¶d} tj} nX| jt jk�rÐd} tj} n>| jt jk�rˆ | d¡} } t| ƒd k�rˆ | d ¡} n| dk�s"| dk�r>| ¡}tj|gg| | d�}|du�rN||_| ¡S) zXCompiles a node, recursively. This is one big switch on the node type. rcsg|]}ˆ |¡‘qSr©r)©Ú.0Zch©r%rrÚ Oóz0PatternCompiler.compile_node..NércSsg|] }|g‘qSrr)r/Úarrrr1Rr2©ÚminÚmaxcsg|]}ˆ |¡‘qSrr-r.r0rrr1Vr2ééÿÿÿÿé)rr"ZMatcherÚchildrenZ AlternativesÚlenr ÚWildcardPatternÚoptimizeZ AlternativeZ NegatedUnitÚ compile_basicZNegatedPatternrÚEQUALrZRepeaterÚSTARZHUGEÚPLUSÚLBRACEÚget_intÚname) r%ÚnodeZaltsÚpZunitsÚpatternrEÚnodesÚrepeatr;Úchildr6r7rr0rr)Cs^       "    zPatternCompiler.compile_nodecCs@|d}|jtjkr4tt |j¡ƒ}t t |ƒ|¡S|jtj krô|j}|  ¡r„|t vrbt d|ƒ‚|dd…rvt dƒ‚t t |¡S|dkr’d}n,| d¡s¾t|j|dƒ}|dur¾t d|ƒ‚|dd…râ| |djd¡g}nd}t ||¡SnH|jdk�r| |d¡S|jd k�r<| |d¡}tj|ggddd �SdS) NrzInvalid token: %rrzCan't have details for tokenÚanyÚ_zInvalid symbol: %rú(ú[r5)rrÚSTRINGr(rZ evalStringrr Z LeafPatternÚ_type_of_literalÚNAMEÚisupperÚ TOKEN_MAPr Ú startswithÚgetattrr#r)r;Z NodePatternr=)r%rIrJrFrrZcontentÚ subpatternrrrr?Šs8         zPatternCompiler.compile_basiccCs t|jƒS©N)Úintr)r%rFrrrrD­szPatternCompiler.get_int)N)FF)N)r r rr&r,r)r?rDrrrrr &s   G #r )rRrPÚNUMBERZTOKENcCs.|d ¡rtjS|tjvr&tj|SdSdS)Nr)ÚisalpharrRrZopmap)rrrrrQ¹s    rQcCs>|\}}}}|s||jvr*tj|||d�Stj|||d�SdS)z9Converts raw node information to a Node or Leaf instance.)ÚcontextN)Z number2symbolr ZNodeZLeaf)rZ raw_node_inforrr\r;rrrr$Âs r$cCs tƒ |¡SrX)r r,)rHrrrr,Ësr,)Ú__doc__Ú __author__rZpgen2rrrrrrÚr r Ú Exceptionr rÚobjectr rRrPrZrTrQr$r,rrrrÚs"    ý