[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.128.31.184: ~ $
�
�_c@s�dZddlmZddlmZmZddlmZmZeZ	eZ
ejZeZ
dZdZdZdefd	��YZd
d
�Zd�Zd�Zd
S(s0Utility functions used by the btm_matcher modulei(tpytree(tgrammarttoken(tpattern_symbolstpython_symbolsi����i����i����tMinNodecBsAeZdZddd�Zd�Zd�Zd�Zd�ZRS(s�This class serves as an intermediate representation of the
    pattern tree during the conversion to sets of leaf-to-root
    subpatternscCsC||_||_g|_t|_d|_g|_g|_dS(N(	ttypetnametchildrentFalsetleaftNonetparenttalternativestgroup(tselfRR((s)/usr/lib64/python2.7/lib2to3/btm_utils.pyt__init__s						cCst|j�dt|j�S(Nt (tstrRR(R((s)/usr/lib64/python2.7/lib2to3/btm_utils.pyt__repr__scCsU|}g}xB|rP|jtkr�|jj|�t|j�t|j�kr|t|j�g}g|_|j}qq�|j}d}Pn|jt	kr|j
j|�t|j
�t|j�kr�t|j
�}g|_
|j}qq|j}d}Pn|jtj
kr4|jr4|j|j�n|j|j�|j}qW|S(s�Internal method. Returns a characteristic path of the
        pattern tree. This method must be run for all leaves until the
        linear subpatterns are merged into a singleN(RtTYPE_ALTERNATIVESR
tappendtlenRttupleRRt
TYPE_GROUPRtget_characteristic_subpatternttoken_labelstNAMER(Rtnodetsubp((s)/usr/lib64/python2.7/lib2to3/btm_utils.pytleaf_to_root!s8							
cCs1x*|j�D]}|j�}|r
|Sq
WdS(s�Drives the leaf_to_root method. The reason that
        leaf_to_root must be run multiple times is because we need to
        reject 'group' matches; for example the alternative form
        (a | b c) creates a group [b c] that needs to be matched. Since
        matching multiple linear patterns overcomes the automaton's
        capabilities, leaf_to_root merges each group into a single
        choice based on 'characteristic'ity,

        i.e. (a|b c) -> (a|b) if b more characteristic than c

        Returns: The most 'characteristic'(as defined by
          get_characteristic_subpattern) path for the compiled pattern
          tree.
        N(tleavesR(RtlR((s)/usr/lib64/python2.7/lib2to3/btm_utils.pytget_linear_subpatternKsccsEx-|jD]"}x|j�D]}|VqWq
W|jsA|VndS(s-Generator that returns the leaves of the treeN(RR(Rtchildtx((s)/usr/lib64/python2.7/lib2to3/btm_utils.pyR`s

	N(	t__name__t
__module__t__doc__RRRRR!R(((s)/usr/lib64/python2.7/lib2to3/btm_utils.pyRs			*	c
Csd}|jtjkr(|jd}n|jtjkr�t|j�dkrht|jd|�}q�tdt	�}x�|jD]P}|jj
|�dr�q�nt||�}|dk	r�|jj|�q�q�Wn$|jtjkrxt|j�dkr_tdt
�}x9|jD].}t||�}|r|jj|�qqW|jsud}quq�t|jd|�}n�|jtjkr�t|jdtj�r�|jdjdkr�t|jd|�St|jdtj�r�|jdjdks=t|j�dkrAt|jdd�rA|jdjdkrAdSt}d}d}t}d}	t}
x�|jD]�}|jtjkr�t}|}n<|jtjkr�t}|}	n|jtjkr�|}nt|d�ro|jdkrot}
qoqoW|
rA|jd}t|d�rN|jdkrN|jd	}qNn
|jd}|jtjkr�|jd
kr�tdt�}qTtt|j�r�tdtt|j��}qTtdtt|j��}n�|jtjkr0|jjd�}|tkrtdt|�}qTtdtjd|�}n$|jtjkrTt||�}n|r�|	jdjd
kryd}q�|	jdjdkr�q�t �n|r�|dk	r�xI|jdd!D]4}t||�}|dk	r�|jj|�q�q�Wq�n|r||_!n|S(s�
    Internal function. Reduces a compiled pattern tree to an
    intermediate representation suitable for feeding the
    automaton. This also trims off any optional pattern elements(like
    [a], a*).
    iiRit(t[tvaluet=itanyt'Rt*t+i����N("RRtsymstMatcherRtAlternativesRtreduce_treeRRtindexRtAlternativeRtUnitt
isinstanceRtLeafR)thasattrtTrueR	tDetailstRepeaterRRtTYPE_ANYtgetattrtpysymstSTRINGtstripttokenstNotImplementedErrorR(
RRtnew_nodeR"treducedR
tdetails_nodetalternatives_nodethas_repeatert
repeater_nodethas_variable_namet	name_leafR((s)/usr/lib64/python2.7/lib2to3/btm_utils.pyR2hs�				


	cs,t|t�s|St|�dkr-|dSg}g}dddddg�g}d�x�|D]�}tt|d	���ratt|�fd
���r�|j|�q�tt|�fd���r�|j|�q�|j|�qaqaW|r�|}n|r
|}n|r|}nt|dt�S(
s�Picks the most characteristic from a list of linear patterns
    Current order used is:
    names > common_names > common_chars
    iitintfortiftnotRs[]().,:cSst|�tkS(N(RR(R#((s)/usr/lib64/python2.7/lib2to3/btm_utils.pyt<lambda>�scst|t�o|�kS(N(R6R(R#(tcommon_chars(s)/usr/lib64/python2.7/lib2to3/btm_utils.pyROscst|t�o|�kS(N(R6R(R#(tcommon_names(s)/usr/lib64/python2.7/lib2to3/btm_utils.pyROstkey(R6tlistRR+trec_testRtmax(tsubpatternstsubpatterns_with_namestsubpatterns_with_common_namestsubpatterns_with_common_charst
subpattern((RPRQs)/usr/lib64/python2.7/lib2to3/btm_utils.pyR�s2
					ccsWxP|D]H}t|ttf�rDx*t||�D]}|Vq2Wq||�VqWdS(sPTests test_func on all items of sequence and items of included
    sub-iterablesN(R6RSRRT(tsequencet	test_funcR#ty((s)/usr/lib64/python2.7/lib2to3/btm_utils.pyRTs

N(R&tRtpgen2RRtpygramRRR/R>topmapRARR<RRtobjectRRR2RRT(((s)/usr/lib64/python2.7/lib2to3/btm_utils.pyt<module>s	X�	%

Filemanager

Name Type Size Permission Actions
fixes Folder 0755
pgen2 Folder 0755
.__init__.pyo.40009 File 127 B 0644
.__main__.pyo.40009 File 242 B 0644
.btm_matcher.pyo.40009 File 5.69 KB 0644
.btm_utils.pyo.40009 File 7.39 KB 0644
.fixer_base.pyo.40009 File 7.09 KB 0644
.fixer_util.pyo.40009 File 14.34 KB 0644
.pygram.pyo.40009 File 1.38 KB 0644
Grammar.txt File 6.43 KB 0644
Grammar2.7.5.final.0.pickle File 19.75 KB 0644
PatternGrammar.txt File 793 B 0644
PatternGrammar2.7.5.final.0.pickle File 1.35 KB 0644
__init__.py File 7 B 0644
__init__.pyc File 127 B 0644
__init__.pyo File 127 B 0644
__main__.py File 67 B 0644
__main__.pyc File 242 B 0644
__main__.pyo File 242 B 0644
btm_matcher.py File 6.67 KB 0644
btm_matcher.pyc File 5.69 KB 0644
btm_matcher.pyo File 5.69 KB 0644
btm_utils.py File 9.78 KB 0644
btm_utils.pyc File 7.39 KB 0644
btm_utils.pyo File 7.39 KB 0644
fixer_base.py File 6.69 KB 0644
fixer_base.pyc File 7.09 KB 0644
fixer_base.pyo File 7.09 KB 0644
fixer_util.py File 14.25 KB 0644
fixer_util.pyc File 14.34 KB 0644
fixer_util.pyo File 14.34 KB 0644
main.py File 11.33 KB 0644
main.pyc File 9.6 KB 0644
main.pyo File 9.56 KB 0644
patcomp.py File 6.92 KB 0644
patcomp.pyc File 6.51 KB 0644
patcomp.pyo File 6.21 KB 0644
pygram.py File 1.09 KB 0644
pygram.pyc File 1.38 KB 0644
pygram.pyo File 1.38 KB 0644
pytree.py File 28.36 KB 0644
pytree.pyc File 29.59 KB 0644
pytree.pyo File 28.73 KB 0644
refactor.py File 27.41 KB 0644
refactor.pyc File 23.4 KB 0644
refactor.pyo File 23.35 KB 0644