XylotrechusZ

XylotrechusZ Shell

Uname: Linux premium294.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.1.32 [ PHP INFO ] PHP os: Linux
Server Ip: 104.21.32.1
Your Ip: 216.73.216.223
User: mjbynoyq (1574) | Group: mjbynoyq (1570)
Safe Mode: OFF
Disable Function:
NONE

name : btm_matcher.cpython-38.opt-2.pyc
U

e5d��@shdZddlZddlZddlmZddlmZddlmZGdd�de	�Z
Gd	d
�d
e	�Ziadd�Z
dS)
z+George Boutsioukis <[email protected]>�N)�defaultdict�)�pytree)�reduce_treec@seZdZe��Zdd�ZdS)�BMNodecCs"i|_g|_ttj�|_d|_dS)N�)�transition_table�fixers�nextr�count�id�content��self�r�+/usr/lib64/python3.8/lib2to3/btm_matcher.py�__init__szBMNode.__init__N)�__name__�
__module__�__qualname__�	itertoolsrrrrrrrsrc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�
BottomMatchercCs0t�|_t�|_|jg|_g|_t�d�|_dS)NZRefactoringTool)	�set�matchr�rootZnodesr	�loggingZ	getLoggerZloggerrrrrrs

zBottomMatcher.__init__cCsH|j�|�t|j�}|��}|j||jd�}|D]}|j�|�q2dS)N��start)r	�appendrZpattern_treeZget_linear_subpattern�addr)r�fixerZtreeZlinear�match_nodesZ
match_noderrr�	add_fixer%s
zBottomMatcher.add_fixerc	Cs�|s
|gSt|dt�r`g}|dD]6}|j||d�}|D]}|�|�|dd�|��q:q$|S|d|jkr�t�}||j|d<n|j|d}|dd�r�|j|dd�|d�}n|g}|SdS)Nrrr)�
isinstance�tupler�extendrr)r�patternrr!�alternativeZ	end_nodes�endZ	next_noderrrr1s"zBottomMatcher.addc	Cs�|j}tt�}|D]�}|}|rd|_|jD]$}t|tj�r*|jdkr*d|_qPq*|j	dkrb|j}n|j	}||j
kr�|j
|}|jD]}||�|�q�nH|j}|j
dk	r�|j
jr�q||j
kr�|j
|}|jD]}||�|�q�|j
}qq|S)NT�;Fr)rr�listZwas_checkedZchildrenr#rZLeaf�value�typerr	r�parent)	rZleavesZcurrent_ac_nodeZresultsZleafZcurrent_ast_nodeZchildZ
node_tokenr rrr�runSs8





�



zBottomMatcher.runcs*td��fdd���|j�td�dS)Nz
digraph g{csZ|j��D]J}|j|}td|j|jt|�t|j�f�|dkrLt|j��|�q
dS)Nz%d -> %d [label=%s] //%sr)r�keys�printr�	type_repr�strr	r
)ZnodeZsubnode_keyZsubnode��
print_noderrr4�s
�
z*BottomMatcher.print_ac.<locals>.print_node�})r0rrrr3r�print_ac�s
zBottomMatcher.print_acN)rrrrr"rr.r6rrrrrs
"8rcCsDts8ddlm}|j��D]\}}t|�tkr|t|<qt�||�S)Nr)�python_symbols)�_type_reprsZpygramr7�__dict__�itemsr,�int�
setdefault)Ztype_numr7�name�valrrrr1�s
r1)�
__author__rr�collectionsrrrZ	btm_utilsr�objectrrr8r1rrrr�<module>s	
© 2025 XylotrechusZ