Current Path: > > opt > alt > python27 > 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 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
fixes | Directory | - | - | |
pgen2 | Directory | - | - | |
Grammar.txt | File | 7094 bytes | January 08 2025 10:43:36. | |
Grammar2.7.18.final.0.pickle | File | 40486 bytes | January 08 2025 10:43:36. | |
PatternGrammar.txt | File | 793 bytes | January 08 2025 10:43:35. | |
PatternGrammar2.7.18.final.0.pickle | File | 2799 bytes | January 08 2025 10:43:35. | |
__init__.py | File | 7 bytes | January 08 2025 10:43:35. | |
__init__.pyc | File | 140 bytes | January 08 2025 10:43:36. | |
__init__.pyo | File | 140 bytes | January 08 2025 10:43:36. | |
__main__.py | File | 67 bytes | January 08 2025 10:43:36. | |
__main__.pyc | File | 255 bytes | January 08 2025 10:43:35. | |
__main__.pyo | File | 255 bytes | January 08 2025 10:43:35. | |
btm_matcher.py | File | 6834 bytes | January 08 2025 10:43:36. | |
btm_matcher.pyc | File | 5973 bytes | January 08 2025 10:43:36. | |
btm_matcher.pyo | File | 5973 bytes | January 08 2025 10:43:36. | |
btm_utils.py | File | 10012 bytes | January 08 2025 10:43:35. | |
btm_utils.pyc | File | 7732 bytes | January 08 2025 10:43:36. | |
btm_utils.pyo | File | 7732 bytes | January 08 2025 10:43:36. | |
fixer_base.py | File | 6780 bytes | January 08 2025 10:43:36. | |
fixer_base.pyc | File | 7394 bytes | January 08 2025 10:43:35. | |
fixer_base.pyo | File | 7394 bytes | January 08 2025 10:43:35. | |
fixer_util.py | File | 14597 bytes | January 08 2025 10:43:36. | |
fixer_util.pyc | File | 15125 bytes | January 08 2025 10:43:36. | |
fixer_util.pyo | File | 15125 bytes | January 08 2025 10:43:36. | |
main.py | File | 11605 bytes | January 08 2025 10:43:35. | |
main.pyc | File | 9961 bytes | January 08 2025 10:43:35. | |
main.pyo | File | 9919 bytes | January 08 2025 10:43:36. | |
patcomp.py | File | 7065 bytes | January 08 2025 10:43:35. | |
patcomp.pyc | File | 6757 bytes | January 08 2025 10:43:35. | |
patcomp.pyo | File | 6445 bytes | January 08 2025 10:43:36. | |
pygram.py | File | 1158 bytes | January 08 2025 10:43:35. | |
pygram.pyc | File | 1480 bytes | January 08 2025 10:43:36. | |
pygram.pyo | File | 1480 bytes | January 08 2025 10:43:36. | |
pytree.py | File | 29039 bytes | January 08 2025 10:43:35. | |
pytree.pyc | File | 31291 bytes | January 08 2025 10:43:36. | |
pytree.pyo | File | 30408 bytes | January 08 2025 10:43:36. | |
refactor.py | File | 28026 bytes | January 08 2025 10:43:35. | |
refactor.pyc | File | 24445 bytes | January 08 2025 10:43:36. | |
refactor.pyo | File | 24403 bytes | January 08 2025 10:43:35. |
� �V~gc @ s� d Z d Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d e f d � � YZ d e f d � � YZ i a d � Z d S( 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( t defaultdicti ( t pytree( t reduce_treet BMNodec B s# e Z d Z e j � Z d � Z RS( s? Class for a node of the Aho-Corasick automaton used in matchingc C s1 i | _ g | _ t t j � | _ d | _ d S( Nt ( t transition_tablet fixerst nextR t countt idt content( t self( ( s8 /opt/alt/python27/lib64/python2.7/lib2to3/btm_matcher.pyt __init__ s ( t __name__t __module__t __doc__t itertoolsR R ( ( ( s8 /opt/alt/python27/lib64/python2.7/lib2to3/btm_matcher.pyR s t BottomMatcherc B s; e Z d Z d � Z d � Z d � Z d � Z d � Z RS( sg The main matcher class. After instantiating the patterns should be added using the add_fixer methodc C sF t � | _ t � | _ | j g | _ g | _ t j d � | _ d S( Nt RefactoringTool( t sett matchR t roott nodesR t loggingt getLoggert logger( R ( ( s8 /opt/alt/python27/lib64/python2.7/lib2to3/btm_matcher.pyR s c C sh | j j | � t | j � } | j � } | j | d | j �} x | D] } | j j | � qJ Wd S( 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 reachedt startN( R t appendR t pattern_treet get_linear_subpatternt addR ( R t fixert treet lineart match_nodest match_node( ( s8 /opt/alt/python27/lib64/python2.7/lib2to3/btm_matcher.pyt add_fixer% s c C s� | s | g St | d t � r� g } xU | d D]I } | j | d | �} x+ | D]# } | j | j | d | � � qS Wq1 W| S| d | j k r� t � } | | j | d <n | j | d } | d r� | j | d d | �} n | g } | Sd S( s5 Recursively adds a linear pattern to the AC automatoni R i N( t isinstancet tupleR t extendR R ( R t patternR R"