From 03ed80e50c388d31265b91cc8727e536bb437a51 Mon Sep 17 00:00:00 2001 From: Tino Didriksen Date: Fri, 24 Nov 2023 09:34:10 +0100 Subject: [PATCH] VSTR tags must be generated before checking if they are certain types --- src/GrammarApplicator_runRules.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/GrammarApplicator_runRules.cpp b/src/GrammarApplicator_runRules.cpp index 3ef7e84f..feec8bfa 100644 --- a/src/GrammarApplicator_runRules.cpp +++ b/src/GrammarApplicator_runRules.cpp @@ -919,6 +919,12 @@ uint32_t GrammarApplicator::runRulesOnSingleWindow(SingleWindow& current, const auto theTags = ss_taglist.get(); getTagList(*rule->maplist, theTags); + for (auto& tter : *theTags) { + if (tter->type & T_VSTR) { + VARSTRINGIFY(tter); + } + } + for (auto tter : *theTags) { if(tter->type & T_WORDFORM) { spacesInAddedWf = std::count_if(tter->tag.begin(), tter->tag.end(), [](UChar c){ return c == ' '; }); @@ -1414,6 +1420,12 @@ uint32_t GrammarApplicator::runRulesOnSingleWindow(SingleWindow& current, const auto theTags = ss_taglist.get(); getTagList(*rule->maplist, theTags); + for (auto& tter : *theTags) { + if (tter->type & T_VSTR) { + VARSTRINGIFY(tter); + } + } + Tag* wf = nullptr; for (auto tter : *theTags) { if (tter->type & T_WORDFORM) { @@ -1894,6 +1906,12 @@ uint32_t GrammarApplicator::runRulesOnSingleWindow(SingleWindow& current, const auto theTags = ss_taglist.get(); getTagList(*rule->maplist, theTags); + for (auto& tter : *theTags) { + if (tter->type & T_VSTR) { + VARSTRINGIFY(tter); + } + } + for (auto tter : *theTags) { VARSTRINGIFY(tter); if (tter->type & T_BASEFORM) {