autfilt: allow --highlight-word to work on Fin acceptance

Fixes #523.

* bin/autfilt.cc: Remove the restriction.
* tests/core/acc_word.test: Add test case.
* NEWS: Mention the fix.
This commit is contained in:
Alexandre Duret-Lutz 2023-01-24 11:35:14 +01:00
parent 5b0143eba6
commit e5150d0314
3 changed files with 19 additions and 14 deletions

View file

@ -1667,13 +1667,8 @@ namespace
if (!opt->hl_words.empty())
for (auto& [word_aut, color]: opt->hl_words)
{
if (aut->acc().uses_fin_acceptance())
error(2, 0,
"--highlight-word does not yet work with Fin acceptance");
if (auto run = spot::product(aut, word_aut)->accepting_run())
run->project(aut)->highlight(color);
}
if (auto run = spot::product(aut, word_aut)->accepting_run())
run->project(aut)->highlight(color);
timer.stop();
if (opt->uniq)