SILENT KILLERPanel

Current Path: > > usr > lib64 > python2.7 > > lib2to3


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //usr/lib64/python2.7//lib2to3

NameTypeSizeLast ModifiedActions
fixes Directory - -
pgen2 Directory - -
Grammar.txt File 7094 bytes April 10 2024 04:58:35.
Grammar2.7.18.final.0.pickle File 40486 bytes April 10 2024 04:58:41.
PatternGrammar.txt File 793 bytes April 10 2024 04:58:35.
PatternGrammar2.7.18.final.0.pickle File 2799 bytes April 10 2024 04:58:41.
__init__.py File 7 bytes April 10 2024 04:58:35.
__init__.pyc File 127 bytes April 10 2024 04:58:46.
__init__.pyo File 127 bytes April 10 2024 04:58:46.
__main__.py File 67 bytes April 10 2024 04:58:35.
__main__.pyc File 242 bytes April 10 2024 04:58:46.
__main__.pyo File 242 bytes April 10 2024 04:58:46.
btm_matcher.py File 6834 bytes April 10 2024 04:58:35.
btm_matcher.pyc File 5830 bytes April 10 2024 04:58:46.
btm_matcher.pyo File 5830 bytes April 10 2024 04:58:46.
btm_utils.py File 10012 bytes April 10 2024 04:58:35.
btm_utils.pyc File 7563 bytes April 10 2024 04:58:46.
btm_utils.pyo File 7563 bytes April 10 2024 04:58:46.
fixer_base.py File 6780 bytes April 10 2024 04:58:35.
fixer_base.pyc File 7186 bytes April 10 2024 04:58:46.
fixer_base.pyo File 7186 bytes April 10 2024 04:58:46.
fixer_util.py File 14597 bytes April 10 2024 04:58:35.
fixer_util.pyc File 14683 bytes April 10 2024 04:58:46.
fixer_util.pyo File 14683 bytes April 10 2024 04:58:46.
main.py File 11605 bytes April 10 2024 04:58:35.
main.pyc File 9831 bytes April 10 2024 04:58:46.
main.pyo File 9789 bytes April 10 2024 04:58:43.
patcomp.py File 7065 bytes April 10 2024 04:58:35.
patcomp.pyc File 6601 bytes April 10 2024 04:58:46.
patcomp.pyo File 6289 bytes April 10 2024 04:58:43.
pygram.py File 1158 bytes April 10 2024 04:58:35.
pygram.pyc File 1441 bytes April 10 2024 04:58:46.
pygram.pyo File 1441 bytes April 10 2024 04:58:46.
pytree.py File 29039 bytes April 10 2024 04:58:35.
pytree.pyc File 30303 bytes April 10 2024 04:58:46.
pytree.pyo File 29420 bytes April 10 2024 04:58:43.
refactor.py File 28026 bytes April 10 2024 04:58:35.
refactor.pyc File 23912 bytes April 10 2024 04:58:46.
refactor.pyo File 23870 bytes April 10 2024 04:58:43.

Reading File: //usr/lib64/python2.7//lib2to3/btm_matcher.pyc

�
{fc@s�dZdZddlZddlZddlmZddlmZddlm	Z	de
fd	��YZd
e
fd��YZia
d�ZdS(
s�A bottom-up tree matching algorithm implementation meant to speed
up 2to3's matching process. After the tree patterns are reduced to
their rarest linear path, a linear Aho-Corasick automaton is
created. The linear automaton traverses the linear paths from the
leaves to the root of the AST and returns a set of nodes for further
matching. This reduces significantly the number of candidate nodes.s+George Boutsioukis <gboutsioukis@gmail.com>i����N(tdefaultdicti(tpytree(treduce_treetBMNodecBs#eZdZej�Zd�ZRS(s?Class for a node of the Aho-Corasick automaton used in matchingcCs1i|_g|_ttj�|_d|_dS(Nt(ttransition_tabletfixerstnextRtcounttidtcontent(tself((s+/usr/lib64/python2.7/lib2to3/btm_matcher.pyt__init__s		(t__name__t
__module__t__doc__t	itertoolsRR(((s+/usr/lib64/python2.7/lib2to3/btm_matcher.pyRst
BottomMatchercBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(sgThe main matcher class. After instantiating the patterns should
    be added using the add_fixer methodcCsFt�|_t�|_|jg|_g|_tjd�|_dS(NtRefactoringTool(	tsettmatchRtroottnodesRtloggingt	getLoggertlogger(R((s+/usr/lib64/python2.7/lib2to3/btm_matcher.pyRs
	cCsh|jj|�t|j�}|j�}|j|d|j�}x|D]}|jj|�qJWdS(s�Reduces a fixer's pattern tree to a linear path and adds it
        to the matcher(a common Aho-Corasick automaton). The fixer is
        appended on the matching states and called when they are
        reachedtstartN(RtappendRtpattern_treetget_linear_subpatterntaddR(Rtfixerttreetlineartmatch_nodest
match_node((s+/usr/lib64/python2.7/lib2to3/btm_matcher.pyt	add_fixer%s
cCs�|s
|gSt|dt�r�g}xU|dD]I}|j|d|�}x+|D]#}|j|j|d|��qSWq1W|S|d|jkr�t�}||j|d<n|j|d}|dr�|j|dd|�}n	|g}|SdS(s5Recursively adds a linear pattern to the AC automatoniRiN(t
isinstancettupleRtextendRR(RtpatternRR"talternativet	end_nodestendt	next_node((s+/usr/lib64/python2.7/lib2to3/btm_matcher.pyR1s"
%	
	c	Cs�|j}tt�}x�|D]y}|}xj|r�t|_x?|jD]4}t|tj�rD|j	dkrDt
|_PqDqDW|jdkr�|j	}n	|j}||jkr�|j|}x�|j
D]0}||kr�g||<n||j|�q�Wn�|j}|jdk	r%|jjr%Pn||jkr�|j|}xD|j
D]6}||j�krpg||<n||j|�qKWn|j}q+WqW|S(suThe main interface with the bottom matcher. The tree is
        traversed from the bottom using the constructed
        automaton. Nodes are only checked once as the tree is
        retraversed. When the automaton fails, we give it one more
        shot(in case the above tree matches as a whole with the
        rejected leaf), then we break for the next leaf. There is the
        special case of multiple arguments(see code comments) where we
        recheck the nodes

        Args:
           The leaves of the AST tree to be matched

        Returns:
           A dictionary of node matches with fixers as the keys
        u;iN(RRtlisttTruetwas_checkedtchildrenR%RtLeaftvaluetFalsettypeRRRtparenttNonetkeys(	Rtleavestcurrent_ac_nodetresultstleaftcurrent_ast_nodetchildt
node_tokenR((s+/usr/lib64/python2.7/lib2to3/btm_matcher.pytrunSs>	
		!		

	

cs*dGH�fd���|j�dGHdS(s<Prints a graphviz diagram of the BM automaton(for debugging)s
digraph g{csvxo|jj�D]^}|j|}d|j|jt|�t|j�fGH|dkrd|jGHn�|�qWdS(Ns%d -> %d [label=%s] //%si(RR7R	t	type_reprtstrRR
(tnodetsubnode_keytsubnode(t
print_node(s+/usr/lib64/python2.7/lib2to3/btm_matcher.pyRE�s
't}N(R(R((REs+/usr/lib64/python2.7/lib2to3/btm_matcher.pytprint_ac�s
(R
RRRR$RR?RG(((s+/usr/lib64/python2.7/lib2to3/btm_matcher.pyRs			"	=cCshtsXddlm}x?|jj�D]+\}}t|�tkr&|t|<q&q&Wntj||�S(Ni(tpython_symbols(t_type_reprstpygramRHt__dict__titemsR4tintt
setdefault(ttype_numRHtnametval((s+/usr/lib64/python2.7/lib2to3/btm_matcher.pyR@�s(Rt
__author__RRtcollectionsRRRt	btm_utilsRtobjectRRRIR@(((s+/usr/lib64/python2.7/lib2to3/btm_matcher.pyt<module>s	�

SILENT KILLER Tool