/usr/lib64/python3.6/lib2to3/__pycache__
NameSizeModeActions
btm_matcher.cpython-36.opt-1.pyc49340644editdlrm
btm_matcher.cpython-36.opt-2.pyc33630644editdlrm
btm_matcher.cpython-36.pyc49340644editdlrm
btm_utils.cpython-36.opt-1.pyc61330644editdlrm
btm_utils.cpython-36.opt-2.pyc46130644editdlrm
btm_utils.cpython-36.pyc61330644editdlrm
fixer_base.cpython-36.opt-1.pyc62250644editdlrm
fixer_base.cpython-36.opt-2.pyc34640644editdlrm
fixer_base.cpython-36.pyc62250644editdlrm
fixer_util.cpython-36.opt-1.pyc120380644editdlrm
fixer_util.cpython-36.opt-2.pyc98700644editdlrm
fixer_util.cpython-36.pyc120380644editdlrm
main.cpython-36.opt-1.pyc84980644editdlrm
main.cpython-36.opt-2.pyc67430644editdlrm
main.cpython-36.pyc85320644editdlrm
patcomp.cpython-36.opt-1.pyc53570644editdlrm
patcomp.cpython-36.opt-2.pyc48470644editdlrm
patcomp.cpython-36.pyc56040644editdlrm
pygram.cpython-36.opt-1.pyc11780644editdlrm
pygram.cpython-36.opt-2.pyc9730644editdlrm
pygram.cpython-36.pyc11780644editdlrm
pytree.cpython-36.opt-1.pyc244490644editdlrm
pytree.cpython-36.opt-2.pyc150550644editdlrm
pytree.cpython-36.pyc251360644editdlrm
refactor.cpython-36.opt-1.pyc207580644editdlrm
refactor.cpython-36.opt-2.pyc167100644editdlrm
refactor.cpython-36.pyc207910644editdlrm
__init__.cpython-36.opt-1.pyc1230644editdlrm
__init__.cpython-36.opt-2.pyc1230644editdlrm
__init__.cpython-36.pyc1230644editdlrm
__main__.cpython-36.opt-1.pyc2070644editdlrm
__main__.cpython-36.opt-2.pyc2070644editdlrm
__main__.cpython-36.pyc2070644editdlrm
Edit: /usr/lib64/python3.6/lib2to3/__pycache__/patcomp.cpython-36.opt-1.pyc (5357B)
3 \@sdZdZddlZddlmZmZmZmZmZm Z ddl m Z ddl m Z Gdd d e Zd d ZGd d d eZejejejddZddZddZddZdS)zPattern compiler. The grammar is taken from PatternGrammar.txt. The compiler compiles a pattern to a pytree.*Pattern instance. z#Guido van Rossum N)driverliteralstokentokenizeparsegrammar)pytree)pygramc@s eZdZdS)PatternSyntaxErrorN)__name__ __module__ __qualname__rr'/usr/lib64/python3.6/lib2to3/patcomp.pyr sr c csPtjtjtjh}tjtj|j}x(|D] }|\}}}}}||kr(|Vq(WdS)z6Tokenizes a string suppressing significant whitespace.N) rNEWLINEINDENTDEDENTrgenerate_tokensioStringIOreadline) inputskiptokensZ quintupletypevaluestartendZ line_textrrrtokenize_wrappers  rc@s:eZdZd ddZdddZddZdd d Zd d ZdS)PatternCompilerNcCsZ|dkrtj|_tj|_ntj||_tj|j|_tj|_ tj |_ tj |jt d|_dS)z^Initializer. Takes an optional alternative filename for the pattern grammar. N)Zconvert)r Zpattern_grammarrZpattern_symbolssymsrZ load_grammarZSymbolsZpython_grammarZ pygrammarZpython_symbolspysymsZDriverpattern_convert)selfZ grammar_filerrr__init__(s  zPatternCompiler.__init__FcCsnt|}y|jj||d}Wn0tjk rL}ztt|WYdd}~XnX|r`|j||fS|j|SdS)z=Compiles a pattern string to a nested pytree.*Pattern object.)debugN)rrZ parse_tokensrZ ParseErrorr str compile_node)r$rr&Z with_treerrooterrrcompile_pattern7szPatternCompiler.compile_patternc sV|jjjkr|jd}|jjjkrzfdd|jdddD}t|dkrX|dStjdd|Dddd}|jS|jjj krʇfd d|jD}t|dkr|dStj|gddd}|jS|jjj krj |jdd}tj |}|jSd}|j}t|d kr>|djt jkr>|dj}|dd}d}t|dkrx|d jjjkrx|d }|dd}j ||}|dk r>|j} | d} | jt jkrd} tj} nX| jt jkrd} tj} n>| jt jkrj| d} } t| d krj| d } n| dks"| dkr>|j}tj|gg| | d}|dk rN||_|jS)zXCompiles a node, recursively. This is one big switch on the node type. rcsg|]}j|qSr)r().0ch)r$rr Osz0PatternCompiler.compile_node..NrcSsg|] }|gqSrr)r,arrrr.Rs)minmaxcsg|]}j|qSr)r()r,r-)r$rrr.Vsr5r5)rr!ZMatcherchildrenZ Alternativeslenr WildcardPatternoptimizeZ AlternativeZ NegatedUnit compile_basicZNegatedPatternrEQUALrZRepeaterSTARZHUGEPLUSLBRACEget_intname) r$nodeZaltspZunitspatternr@nodesrepeatr6Zchildr1r2r)r$rr(Cs^       "    zPatternCompiler.compile_nodecCs@|d}|jtjkr4ttj|j}tjt ||S|jtj kr|j}|j r|t krbt d||ddrvt dtjt |S|dkrd}n,|jdst|j|d}|dkrt d||ddr|j|djdg}nd}tj||SnH|jdkr|j|dS|jd kr<|j|d}tj|ggddd SdS) NrzInvalid token: %rrzCan't have details for tokenany_zInvalid symbol: %r([)r1r2)rrSTRINGr'rZ evalStringrr Z LeafPattern_type_of_literalNAMEisupper TOKEN_MAPr startswithgetattrr"r(r6Z NodePatternr8)r$rDrErArrZcontent subpatternrrrr:s8         zPatternCompiler.compile_basiccCs t|jS)N)intr)r$rArrrr?szPatternCompiler.get_int)N)FF)N)r r rr%r+r(r:r?rrrrr &s   G #r )rLrJNUMBERZTOKENcCs.|djrtjS|tjkr&tj|SdSdS)Nr)isalpharrLrZopmap)rrrrrKs    rKcCs>|\}}}}|s||jkr*tj|||dStj|||dSdS)z9Converts raw node information to a Node or Leaf instance.)contextN)Z number2symbolr ZNodeZLeaf)rZ raw_node_inforrrUr6rrrr#s r#cCs tj|S)N)r r+)rCrrrr+sr+)__doc__ __author__rZpgen2rrrrrrr r Exceptionr robjectr rLrJrSrNrKr#r+rrrr s