Index: branches/apertium-separable/src/lsx_FSTProcessor.cc =================================================================== --- branches/apertium-separable/src/lsx_FSTProcessor.cc (revision 81184) +++ branches/apertium-separable/src/lsx_FSTProcessor.cc (revision 81185) @@ -1301,6 +1301,7 @@ if(s.isFinal(all_finals)) { out = s.filterFinals(all_finals, alphabet, escaped_chars); + // wcout << endl << L"" << out << L"" << endl; new_states.push_back(*initial_state); finalFound = true; @@ -1311,6 +1312,10 @@ { out[i] = L'^'; } + else if(c == L' ') + { + out.erase(i, 1); + } else if(c == L'$' && out[i-1] == L'<' && out[i+1] == L'>') { // out.erase(i+1, 1); @@ -1318,7 +1323,7 @@ out.erase(i-1, 1); } } - out = out.substr(0, out.length()-1); + out = out.substr(0, out.length()-1); // extra ^ at the end if(blankqueue.size() > 0) { fputws(blankqueue.front().c_str(), output); @@ -1326,7 +1331,7 @@ } for(int i=0; i < (int) out.size(); i++) { - if(out[i] == L'$' && blankqueue.size() > 0) + if((out[i] == L'$' || out[i] == L'#') && blankqueue.size() > 0) { out.insert(i+1, blankqueue.front().c_str()); blankqueue.pop(); @@ -1338,16 +1343,12 @@ } alive_states.swap(new_states); } - else if(outOfWord) - { - fputwc(val, output); - continue; + // else if(outOfWord) + // { + // fputwc(val, output); + // continue; + // } } - else - { - wcerr << L"outOfWord error" << endl; - } - } flushBlanks(output); }