]> granicus.if.org Git - re2c/commitdiff
Correctly identify mapped TDFA state with --dump-dfa-raw option.
authorUlya Trofimovich <skvadrik@gmail.com>
Thu, 6 Dec 2018 22:01:25 +0000 (22:01 +0000)
committerUlya Trofimovich <skvadrik@gmail.com>
Thu, 6 Dec 2018 22:01:25 +0000 (22:01 +0000)
re2c/src/dfa/dump.cc

index 08cc78ee72712c1e9e35c5580f912ce49b42fea1..640860814c3bd138027e48813d897ff569639da7 100644 (file)
@@ -108,11 +108,12 @@ void dump_dfa_t::state(const determ_context_t &ctx, bool isnew)
     // transitions (other states)
     else {
         if (!isnew) {
+            const dfa_state_t *o = dfa.states[origin];
             fprintf(stderr,
                 "  i%u [style=dotted]\n"
                 "  i%u:s -> %u:s [style=dotted label=\"",
-                state, state, origin);
-            dump_tcmd(dfa.states[origin]->tcmd[symbol]);
+                state, state, static_cast<uint32_t>(o->arcs[symbol]));
+            dump_tcmd(o->tcmd[symbol]);
             fprintf(stderr, "\"]\n");
         }