commit 98b1bac240cfc22da787a8d96ead53cb276385df Author: Tanmai Khanna Date: Fri May 15 01:33:34 2020 +0530 ignore secondary tags for pattern matching diff --git a/lttoolbox/fst_processor.cc b/lttoolbox/fst_processor.cc index 6348141..4c9752a 100644 --- a/lttoolbox/fst_processor.cc +++ b/lttoolbox/fst_processor.cc @@ -516,17 +516,39 @@ FSTProcessor::readGeneration(FILE *input, FILE *output) { wstring cad = L""; cad += static_cast(val); + + bool isSecondaryTag = false; + while((val = fgetwc_unlocked(input)) != L'>') { if(feof(input)) { streamError(); } + if(val == L':') + { + isSecondaryTag = true; + break; + } cad += static_cast(val); } cad += static_cast(val); - - return alphabet(cad); + + if(isSecondaryTag) + { + while((val = fgetwc_unlocked(input)) != L'$') + { + //do nothing + } + + outOfWord = true; + return static_cast(L'$'); + } + else + { + return alphabet(cad); + } + } else if(val == L'[') {