Commit ae2c05b9 authored by Yu-Hang "Maxin" Tang's avatar Yu-Hang "Maxin" Tang
Browse files

Merge branch 'release/0.8a14'

parents 001d3134 da1ec103
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
# Change log of GraphDot

## 0.8a14 (2021-03-09)

- Minor tweaks to look-ahead rewriter logic.

## 0.8a13 (2021-03-08)

- A new and experimental calling convention to allow evaluations of the
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ from .graph import Graph

__all__ = ['Graph']

__version__ = '0.8a13'
__version__ = '0.8a14'
__author__ = '''Yu-Hang "Maxin" Tang, Oguz Selvitopi, Chi-Feng Wang,
    Thomas H. Li'''
__maintainer__ = 'Yu-Hang "Maxin" Tang'
+8 −7
Original line number Diff line number Diff line
@@ -142,11 +142,12 @@ class LookAheadSequenceRewriter(AbstractRewriter):
    @staticmethod
    def _match_context(tree, s, k, n):
        ptrs = [tree[tree.root] for _ in range(n + 1)]
        for i in range(max(k - n, 0), k):
        for i, loc in enumerate(range(max(k - n, 0), k)):
            for j, p in enumerate(ptrs[:i + 1]):
                if p is not None:
                    try:
                        next, = [c for c in tree.children(p.identifier)
                             if c.tag == s[i]]
                                 if c.tag == s[loc]]
                    except (KeyError, ValueError):
                        next = None
                    ptrs[j] = next