]> granicus.if.org Git - re2c/commitdiff
Traverse NFA from left to right when building epsilon-closure.
authorUlya Trofimovich <skvadrik@gmail.com>
Wed, 25 May 2016 09:52:20 +0000 (10:52 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Wed, 25 May 2016 09:52:20 +0000 (10:52 +0100)
re2c/src/ir/dfa/determinization.cc

index 7b748166c9303b1af8366af0c2d1066126fdf2dd..6a9666eb7f19fbe7b30186e3e79be45957c54576 100644 (file)
@@ -75,8 +75,8 @@ static void closure(kitem_t *const kernel, kitem_t *&kend,
        ++n->loop;
        switch (n->type) {
                case nfa_state_t::ALT:
-                       closure(kernel, kend, n->alt.out2, tags, badtags, ntags);
                        closure(kernel, kend, n->alt.out1, tags, badtags, ntags);
+                       closure(kernel, kend, n->alt.out2, tags, badtags, ntags);
                        break;
                case nfa_state_t::TAG: {
                        const size_t t = n->tag.info;