/opt/alt/python27/lib64/python2.7/lib2to3
NameSizeModeActions
fixes/-0755rm
pgen2/-0755rm
btm_matcher.py68340644editdlrm
btm_matcher.pyc59730644editdlrm
btm_matcher.pyo59730644editdlrm
btm_utils.py100120644editdlrm
btm_utils.pyc77320644editdlrm
btm_utils.pyo77320644editdlrm
fixer_base.py67800644editdlrm
fixer_base.pyc73940644editdlrm
fixer_base.pyo73940644editdlrm
fixer_util.py145970644editdlrm
fixer_util.pyc151250644editdlrm
fixer_util.pyo151250644editdlrm
Grammar.txt70940644editdlrm
Grammar2.7.18.final.0.pickle404860644editdlrm
main.py116050644editdlrm
main.pyc99610644editdlrm
main.pyo99190644editdlrm
patcomp.py70650644editdlrm
patcomp.pyc67570644editdlrm
patcomp.pyo64450644editdlrm
PatternGrammar.txt7930644editdlrm
PatternGrammar2.7.18.final.0.pickle27990644editdlrm
pygram.py11580644editdlrm
pygram.pyc14800644editdlrm
pygram.pyo14800644editdlrm
pytree.py290390644editdlrm
pytree.pyc312910644editdlrm
pytree.pyo304080644editdlrm
refactor.py280260644editdlrm
refactor.pyc244450644editdlrm
refactor.pyo244030644editdlrm
__init__.py70644editdlrm
__init__.pyc1400644editdlrm
__init__.pyo1400644editdlrm
__main__.py670644editdlrm
__main__.pyc2550644editdlrm
__main__.pyo2550644editdlrm
Edit: /opt/alt/python27/lib64/python2.7/lib2to3/patcomp.pyo (6445B)
ó Þ[ bc@sådZdZddlZddlmZmZmZmZmZm Z ddl m Z ddl m Z de fd „ƒYZd „Zd efd „ƒYZiejd 6ejd6ejd6dd6Zd„Zd„Zd„ZdS(sPattern compiler. The grammar is taken from PatternGrammar.txt. The compiler compiles a pattern to a pytree.*Pattern instance. s#Guido van Rossum iÿÿÿÿNi(tdrivertliteralsttokenttokenizetparsetgrammar(tpytree(tpygramtPatternSyntaxErrorcBseZRS((t__name__t __module__(((s4/opt/alt/python27/lib64/python2.7/lib2to3/patcomp.pyRsc cswttjtjtjfƒ}tjtj|ƒjƒ}x7|D]/}|\}}}}}||kr@|Vq@q@WdS(s6Tokenizes a string suppressing significant whitespace.N( tsetRtNEWLINEtINDENTtDEDENTRtgenerate_tokenstStringIOtreadline( tinputtskipttokenst quintuplettypetvaluetstarttendt line_text((s4/opt/alt/python27/lib64/python2.7/lib2to3/patcomp.pyttokenize_wrappers   tPatternCompilercBsAeZdd„Zeed„Zd„Zdd„Zd„ZRS(cCs…|dkr'tj|_tj|_n'tj|ƒ|_tj|jƒ|_tj |_ tj |_ tj |jdtƒ|_dS(s^Initializer. Takes an optional alternative filename for the pattern grammar. tconvertN(tNoneRtpattern_grammarRtpattern_symbolstsymsRt load_grammartSymbolstpython_grammart pygrammartpython_symbolstpysymstDrivertpattern_convert(tselft grammar_file((s4/opt/alt/python27/lib64/python2.7/lib2to3/patcomp.pyt__init__(s    cCs}t|ƒ}y|jj|d|ƒ}Wn(tjk rR}tt|ƒƒ‚nX|rl|j|ƒ|fS|j|ƒSdS(s=Compiles a pattern string to a nested pytree.*Pattern object.tdebugN(RRt parse_tokensRt ParseErrorRtstrt compile_node(R*RR-t with_treeRtrootte((s4/opt/alt/python27/lib64/python2.7/lib2to3/patcomp.pytcompile_pattern7s cCsT|j|jjkr%|jd}n|j|jjkrÁg|jddd…D]}|j|ƒ^qQ}t|ƒdkr†|dStjg|D]}|g^q“ddddƒ}|j ƒS|j|jj kr=g|jD]}|j|ƒ^qà}t|ƒdkr|dStj|gddddƒ}|j ƒS|j|jj kr|j |jdƒ}tj |ƒ}|j ƒSd}|j} t| ƒdkrÒ| djtjkrÒ| dj}| d} nd} t| ƒdkr| dj|jjkr| d} | d } n|j | | ƒ}| dk r2| j} | d} | jtjkrod} tj}nx| jtjkr“d} tj}nT| jtjkrç|j| dƒ} }t| ƒd krç|j| dƒ}qçn| dksÿ|dkr2|j ƒ}tj|ggd| d|ƒ}q2n|dk rJ||_n|j ƒS( sXCompiles a node, recursively. This is one big switch on the node type. iNiitmintmaxiiÿÿÿÿi(RR!tMatchertchildrent AlternativesR1tlenRtWildcardPatterntoptimizet Alternativet NegatedUnitt compile_basictNegatedPatternRRtEQUALRtRepeatertSTARtHUGEtPLUStLBRACEtget_inttname(R*tnodetchtaltstatptunitstpatternRItnodestrepeatR9tchildR6R7((s4/opt/alt/python27/lib64/python2.7/lib2to3/patcomp.pyR1Cs^21 %   (  +        '  cCs½|d}|jtjkrJttj|jƒƒ}tjt |ƒ|ƒS|jtj krX|j}|j ƒrº|t krt d|ƒ‚n|dr©t dƒ‚ntjt |ƒS|dkrÏd}nF|jdƒst|j|dƒ}|dkrt d|ƒ‚qn|dr?|j|djdƒg}nd}tj||ƒSna|jdkrx|j|dƒS|jd kr¹|j|dƒ}tj|ggd dd dƒSdS( NisInvalid token: %risCan't have details for tokentanyt_sInvalid symbol: %rt(t[R6R7(RRtSTRINGtunicodeRt evalStringRRt LeafPatternt_type_of_literaltNAMEtisuppert TOKEN_MAPRRt startswithtgetattrR'R1R9t NodePatternR<(R*RQRRRJRRtcontentt subpattern((s4/opt/alt/python27/lib64/python2.7/lib2to3/patcomp.pyR@Šs8          cCs t|jƒS(N(tintR(R*RJ((s4/opt/alt/python27/lib64/python2.7/lib2to3/patcomp.pyRH­sN( R R RR,tFalseR5R1R@RH(((s4/opt/alt/python27/lib64/python2.7/lib2to3/patcomp.pyR&s   G #R]RXtNUMBERtTOKENcCs9|djƒrtjS|tjkr1tj|SdSdS(Ni(tisalphaRR]RtopmapR(R((s4/opt/alt/python27/lib64/python2.7/lib2to3/patcomp.pyR\¹s  cCsW|\}}}}|s'||jkr=tj||d|ƒStj||d|ƒSdS(s9Converts raw node information to a Node or Leaf instance.tcontextN(t number2symbolRtNodetLeaf(Rt raw_node_infoRRRkR9((s4/opt/alt/python27/lib64/python2.7/lib2to3/patcomp.pyR)ÂscCstƒj|ƒS(N(RR5(RP((s4/opt/alt/python27/lib64/python2.7/lib2to3/patcomp.pyR5Ës(t__doc__t __author__Rtpgen2RRRRRRtRRt ExceptionRRtobjectRR]RXRgRR_R\R)R5(((s4/opt/alt/python27/lib64/python2.7/lib2to3/patcomp.pyt s .