Commit 372790a4 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

bin: Ignore empty lines on input.

* src/bin/common_finput.cc: Here.
* src/ltltest/ltlfilt.test: Test it.
* NEWS: Mention it.
parent 9e589422
...@@ -38,6 +38,8 @@ New in spot 1.1a (not yet released): ...@@ -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):
......
// -*- 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, ...@@ -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() ...@@ -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) ...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment