From 059b10f5b4a00d0042ddc82b8947576e6549b3fb Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Sat, 8 Apr 2017 19:58:50 +0100 Subject: [PATCH] Don't forget final and fallback commands when looking for history-based tags. --- re2c/src/code/emit_dfa.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/re2c/src/code/emit_dfa.cc b/re2c/src/code/emit_dfa.cc index dd6e4f0b..ee49049b 100644 --- a/re2c/src/code/emit_dfa.cc +++ b/re2c/src/code/emit_dfa.cc @@ -151,6 +151,8 @@ static void find_list_tags(const DFA &dfa, bool *list) for (uint32_t i = 0; i < go.nSpans; ++i) { find_list_tags_cmd(dfa.tcpool[go.span[i].tags], list); } + find_list_tags_cmd(dfa.tcpool[s->rule_tags], list); + find_list_tags_cmd(dfa.tcpool[s->fall_tags], list); } prop_list_tags_cmd(dfa.tcpool[dfa.tags0], list); for (State *s = dfa.head; s; s = s->next) { @@ -159,6 +161,8 @@ static void find_list_tags(const DFA &dfa, bool *list) for (uint32_t i = 0; i < go.nSpans; ++i) { prop_list_tags_cmd(dfa.tcpool[go.span[i].tags], list); } + prop_list_tags_cmd(dfa.tcpool[s->rule_tags], list); + prop_list_tags_cmd(dfa.tcpool[s->fall_tags], list); } } -- 2.40.0