Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
Ë
â{|jß ã óv — d Z dZddlZddlZddlmZ ddlmZ ddlm Z G d„ d e
« Z G d
„ de
« Zi a
d„ Zy)
aŒ 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.z+George Boutsioukis é N)Údefaultdicté )Úpytree)Úreduce_treec ó8 — e Zd ZdZ ej
« Zd„ Zy)ÚBMNodez?Class for a node of the Aho-Corasick automaton used in matchingc ój — i | _ g | _ t t j « | _ d| _ y )NÚ )Útransition_tableÚfixersÚnextr ÚcountÚidÚcontent©Úselfs ú,/usr/lib64/python3.12/lib2to3/btm_matcher.pyÚ__init__zBMNode.__init__ s( € Ø "ˆÔ؈ŒÜ”v—|‘|Ó$ˆŒØˆ�ó N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú itertoolsr r © r r r r s „ ÙI؈I�O‰OÓ€Eór r c ó. — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zy)Ú
BottomMatcherzgThe main matcher class. After instantiating the patterns should
be added using the add_fixer methodc ó¦ — t « | _ t « | _ | j g| _ g | _ t
j d« | _ y )NÚRefactoringTool) ÚsetÚmatchr ÚrootÚnodesr ÚloggingÚ getLoggerÚloggerr s r r zBottomMatcher.__init__ s; € Ü“UˆŒ
Ü“HˆŒ Ø—i‘i�[ˆŒ
؈ŒÜ×'Ñ'Ð(9Ó:ˆ�r c ó — | j j |« t |j « }|j « }| j || j ¬« }|D ] }|j j |« Œ y)zÒ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
reached©ÚstartN)r Úappendr Úpattern_treeÚget_linear_subpatternÚaddr" )r ÚfixerÚtreeÚlinearÚmatch_nodesÚ
match_nodes r Ú add_fixerzBottomMatcher.add_fixer% sh € ð
�‰×ј5Ô!ܘ5×-Ñ-Ó.ˆØ×+Ñ+Ó-ˆØ—h‘h˜v¨T¯Y©Y�hÓ7ˆÛ%ˆJØ×Ñ×$Ñ$ UÕ+ñ &r c óŽ — |s|gS t |d t « rLg }|d D ]@ }| j ||¬« }|D ]&