bin: Ignore empty lines on input.

* src/bin/common_finput.cc: Here.
* src/ltltest/ltlfilt.test: Test it.
* NEWS: Mention it.
This commit is contained in:
Alexandre Duret-Lutz 2013-05-12 17:32:46 +02:00
parent 9e589422d1
commit 372790a489
3 changed files with 10 additions and 4 deletions

2
NEWS
View file

@ -38,6 +38,8 @@ New in spot 1.1a (not yet released):
- genltl --gh-r generated the wrong formulas due to a typo.
- ltlfilt --eventual and --universal were not handled properly.
- ltlfilt --stutter-invariant would trigger an assert on PSL formulas.
- ltl2tgba, ltl2tgta, ltlcross, and ltlfilt, would all choke on empty
lines in a file of formulas. They now ignore empty lines.
New in spot 1.1 (2013-04-28):

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2012 Laboratoire de Recherche et Développement de
// l'Epita (LRDE).
// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -114,6 +114,7 @@ job_processor::process_stream(std::istream& is,
int linenum = 0;
std::string line;
while (!abort_run && std::getline(is, line))
if (!line.empty())
error |= process_string(line, filename, ++linenum);
return error;
}

View file

@ -31,10 +31,12 @@ checkopt()
diff exp out
}
# The empty lines in the file are meant, we want to make sure that
# they are ignored.
cat >formulas <<EOF
GFa | FGb
F(GFa | Gb)
F(b W GFa)
GFa | Gb
b W GFa
@ -44,6 +46,7 @@ G(a & Xb)
Xa
F(a & !Xa & Xb)
{a & {b|c} }
EOF
checkopt --eventual <<EOF