parsetl: improve coverage

* spot/parsetl/parsetl.yy: Adjust one diagnostic.
* spot/parsetl/scantl.ll: Fix recovering of missing closing brace
in lenient mode.
* tests/python/declenv.py: Move some tests...
* tests/python/ltlparse.py: ... here, and add many more.
* NEWS: Mention the lenient mode bug.
This commit is contained in:
Alexandre Duret-Lutz 2017-03-14 17:13:59 +01:00
parent ab8a40cb10
commit 3d3baf449e
5 changed files with 162 additions and 26 deletions

View file

@ -427,7 +427,7 @@ fstarargs: OP_BFSTAR
equalargs: OP_EQUAL_OPEN sqbracketargs
{ $$ = $2; }
| OP_EQUAL_OPEN error OP_SQBKT_CLOSE
{ error_list.emplace_back(@$, "treating this equal block as [*]");
{ error_list.emplace_back(@$, "treating this equal block as [=]");
$$.min = 0U; $$.max = fnode::unbounded(); }
| OP_EQUAL_OPEN error_opt END_OF_INPUT
{ error_list.

View file

@ -1,6 +1,6 @@
/* -*- coding: utf-8 -*-
** Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, Laboratoire de
** Recherche et Développement de l'Epita (LRDE).
** Copyright (C) 2010-2015, 2017, Laboratoire de Recherche et
** Développement de l'Epita (LRDE).
** Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
** département Systèmes Répartis Coopératifs (SRC), Université Pierre
** et Marie Curie.
@ -142,7 +142,7 @@ eol2 (\n\r)+|(\r\n)+
if (!missing_parent)
error_list.push_back(
spot::one_parse_error(*yylloc,
"missing closing parenthese"));
"missing closing parenthesis"));
missing_parent = true;
}
}
@ -192,7 +192,7 @@ eol2 (\n\r)+|(\r\n)+
}
[^{}]+ yylval->str->append(yytext, yyleng);
<<EOF>> {
unput(')');
unput('}');
if (!missing_parent)
error_list.push_back(
spot::one_parse_error(*yylloc,