Commit d71ceb3b authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Fix column in LTL error messages, it was off by one.

* src/ltlparse/fmterror.cc (format_parse_errors): Count columns
starting at 1.  Older Bison used to start at 0 but changed to
match the GNU Coding Standards.
* src/ltltest/parseerr.test: Add a test case.
parent 3cf2ddbc
2010-03-10 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Fix column in LTL error messages, it was off by one.
* src/ltlparse/fmterror.cc (format_parse_errors): Count columns
starting at 1. Older Bison used to start at 0 but changed to
match the GNU Coding Standards.
* src/ltltest/parseerr.test: Add a test case.
2010-03-07 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Do not rewrite F(a & GF(b)) = F(a) & GF(b), this can be harmful.
......
// Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
// Copyright (C) 2010 Laboratoire de Recherche et Développement de
// l'Epita (LRDE).
// Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de Paris
// 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
// Université Pierre et Marie Curie.
//
// This file is part of Spot, a model checking library.
//
......@@ -39,7 +41,7 @@ namespace spot
os << ">>> " << ltl_string << std::endl;
ltlyy::location& l = it->first;
unsigned n = 0;
unsigned n = 1;
for (; n < 4 + l.begin.column; ++n)
os << ' ';
// Write at least one '^', even if begin==end.
......
#! /bin/sh
# Copyright (C) 2009 Laboratoire de Recherche et Développement
# Copyright (C) 2009, 2010 Laboratoire de Recherche et Dveloppement
# de l'Epita (LRDE).
# Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
# dpartement Systmes Rpartis Coopratifs (SRC), Universit Pierre
......@@ -30,7 +30,7 @@
check()
{
run 1 ../ltl2text "$1" >stdout
set +x; run 1 ../ltl2text "$1" >stdout 2>stderr; set -x
if test -n "$2"; then
echo "$2" >expect
else
......@@ -43,9 +43,21 @@ check()
cat stdout
echo "instead of"
cat expect
rm -f stdout expect
exit 1
fi
if test -n "$3"; then
echo "$3" >expect
if cmp stderr expect; then
:
else
echo "==== Error output was ===="
cat stderr
echo "==== instead of ===="
cat expect
exit 1
fi
fi
}
# Empty or unparsable strings
......@@ -72,3 +84,12 @@ run 0 ../equals -E 'a & (a + b' 'a & (a + b)'
run 0 ../equals -E 'a & (a + b c' 'a & (0)'
run 0 ../equals -E 'a & (+' 'a & (0)'
run 0 ../equals -E 'a & (' 'a & (0)'
check 'a - b' 'AP(a)' '>>> a - b
^
syntax error, unexpected $undefined
>>> a - b
^^^
ignoring trailing garbage
'
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