OXIESEC PANEL
- Current Dir:
/
/
lib64
/
python2.7
/
lib2to3
Server IP: 191.96.63.230
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/26/2024 03:08:39 AM
rwxr-xr-x
📄
Grammar.txt
6.93 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
Grammar2.7.18.final.0.pickle
39.54 KB
11/15/2023 03:01:18 PM
rw-r--r--
📄
PatternGrammar.txt
793 bytes
11/15/2023 03:01:12 PM
rw-r--r--
📄
PatternGrammar2.7.18.final.0.pickle
2.73 KB
11/15/2023 03:01:18 PM
rw-r--r--
📄
__init__.py
7 bytes
11/15/2023 03:01:12 PM
rw-r--r--
📄
__init__.pyc
127 bytes
11/15/2023 03:01:23 PM
rw-r--r--
📄
__init__.pyo
127 bytes
11/15/2023 03:01:23 PM
rw-r--r--
📄
__main__.py
67 bytes
11/15/2023 03:01:12 PM
rw-r--r--
📄
__main__.pyc
242 bytes
11/15/2023 03:01:23 PM
rw-r--r--
📄
__main__.pyo
242 bytes
11/15/2023 03:01:23 PM
rw-r--r--
📄
btm_matcher.py
6.67 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
btm_matcher.pyc
5.69 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
btm_matcher.pyo
5.69 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
btm_utils.py
9.78 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
btm_utils.pyc
7.39 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
btm_utils.pyo
7.39 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
fixer_base.py
6.62 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
fixer_base.pyc
7.02 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
fixer_base.pyo
7.02 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
fixer_util.py
14.25 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
fixer_util.pyc
14.34 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
fixer_util.pyo
14.34 KB
11/15/2023 03:01:23 PM
rw-r--r--
📁
fixes
-
02/26/2024 03:08:39 AM
rwxr-xr-x
📄
main.py
11.33 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
main.pyc
9.6 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
main.pyo
9.56 KB
11/15/2023 03:01:20 PM
rw-r--r--
📄
patcomp.py
6.9 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
patcomp.pyc
6.45 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
patcomp.pyo
6.14 KB
11/15/2023 03:01:20 PM
rw-r--r--
📁
pgen2
-
02/26/2024 03:08:39 AM
rwxr-xr-x
📄
pygram.py
1.13 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
pygram.pyc
1.41 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
pygram.pyo
1.41 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
pytree.py
28.36 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
pytree.pyc
29.59 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
pytree.pyo
28.73 KB
11/15/2023 03:01:20 PM
rw-r--r--
📄
refactor.py
27.37 KB
11/15/2023 03:01:12 PM
rw-r--r--
📄
refactor.pyc
23.35 KB
11/15/2023 03:01:23 PM
rw-r--r--
📄
refactor.pyo
23.31 KB
11/15/2023 03:01:20 PM
rw-r--r--
Editing: btm_matcher.pyo
Close
� 8�Tec @ 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( ( s+ /usr/lib64/python2.7/lib2to3/btm_matcher.pyt __init__ s ( t __name__t __module__t __doc__t itertoolsR R ( ( ( s+ /usr/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 ( ( s+ /usr/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( ( s+ /usr/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"