lbttparse: make sure we parse wring2lbtt's output

* src/tgbaalgos/lbtt.cc: Do not expect a new line after the number of
acceptance conditions.
* src/tgbatest/lbttparse.test: Add a test case.
This commit is contained in:
Alexandre Duret-Lutz 2012-10-18 13:58:38 +02:00
parent 676ab41f6f
commit 89b9cc5fd5
2 changed files with 23 additions and 3 deletions

View file

@ -325,9 +325,13 @@ namespace spot
unsigned num_acc = 0;
is >> num_acc;
std::string rest;
std::getline(is, rest);
if (rest[0] == 't' || rest[0] == 'T')
int type;
type = is.peek();
if (type == 't' || type == 'T' || type == 's' || type == 'S')
type = is.get();
if (type == 't' || type == 'T')
return lbtt_read_tgba(num_states, num_acc, is, error, dict,
env, envacc);
else