]> granicus.if.org Git - re2c/commitdiff
Clarify that initial state stores 'start_label', not some random label.
authorUlya Trofimovich <skvadrik@gmail.com>
Sun, 24 May 2015 20:33:18 +0000 (21:33 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Sun, 24 May 2015 20:33:18 +0000 (21:33 +0100)
re2c/src/codegen/emit_dfa.cc

index 457c1f643c305e4df68acca6412b8fdbc6d12990..af1f070ec2d01f62fb94782a8f5336d4c6565650 100644 (file)
@@ -83,9 +83,9 @@ void DFA::emit(Output & output, uint32_t& ind, const RegExpMap* specMap, const s
                next_label++;
        }
 
-       uint32_t start_label = next_label;
+       uint32_t start_label = next_label++;
 
-       head->action.set_initial (next_label++, bSaveOnHead);
+       head->action.set_initial (start_label, bSaveOnHead);
 
        if (bUseStartLabel)
        {