From: Ulya Trofimovich Date: Wed, 25 May 2016 09:52:20 +0000 (+0100) Subject: Traverse NFA from left to right when building epsilon-closure. X-Git-Tag: 1.0~39^2~284 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=949596c1e7f6dbdbd841c7e752cc5651d06b21b4;p=re2c Traverse NFA from left to right when building epsilon-closure. --- diff --git a/re2c/src/ir/dfa/determinization.cc b/re2c/src/ir/dfa/determinization.cc index 7b748166..6a9666eb 100644 --- a/re2c/src/ir/dfa/determinization.cc +++ b/re2c/src/ir/dfa/determinization.cc @@ -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;