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:
parent
9e589422d1
commit
372790a489
3 changed files with 10 additions and 4 deletions
2
NEWS
2
NEWS
|
|
@ -38,6 +38,8 @@ New in spot 1.1a (not yet released):
|
||||||
- genltl --gh-r generated the wrong formulas due to a typo.
|
- genltl --gh-r generated the wrong formulas due to a typo.
|
||||||
- ltlfilt --eventual and --universal were not handled properly.
|
- ltlfilt --eventual and --universal were not handled properly.
|
||||||
- ltlfilt --stutter-invariant would trigger an assert on PSL formulas.
|
- 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):
|
New in spot 1.1 (2013-04-28):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2012 Laboratoire de Recherche et Développement de
|
// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement
|
||||||
// l'Epita (LRDE).
|
// de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -114,7 +114,8 @@ job_processor::process_stream(std::istream& is,
|
||||||
int linenum = 0;
|
int linenum = 0;
|
||||||
std::string line;
|
std::string line;
|
||||||
while (!abort_run && std::getline(is, line))
|
while (!abort_run && std::getline(is, line))
|
||||||
error |= process_string(line, filename, ++linenum);
|
if (!line.empty())
|
||||||
|
error |= process_string(line, filename, ++linenum);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,12 @@ checkopt()
|
||||||
diff exp out
|
diff exp out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# The empty lines in the file are meant, we want to make sure that
|
||||||
|
# they are ignored.
|
||||||
cat >formulas <<EOF
|
cat >formulas <<EOF
|
||||||
GFa | FGb
|
GFa | FGb
|
||||||
F(GFa | Gb)
|
F(GFa | Gb)
|
||||||
|
|
||||||
F(b W GFa)
|
F(b W GFa)
|
||||||
GFa | Gb
|
GFa | Gb
|
||||||
b W GFa
|
b W GFa
|
||||||
|
|
@ -44,6 +46,7 @@ G(a & Xb)
|
||||||
Xa
|
Xa
|
||||||
F(a & !Xa & Xb)
|
F(a & !Xa & Xb)
|
||||||
{a & {b|c} }
|
{a & {b|c} }
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
checkopt --eventual <<EOF
|
checkopt --eventual <<EOF
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue