Viewing File: /opt/alt/python35/lib64/python3.5/lib2to3/__pycache__/btm_matcher.cpython-35.pyc
Yf @ 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 Gd d d e
Z Gd
d d e
Z i a
d d
Z d S)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 <gboutsioukis@gmail.com>