ltlsynt: fix syntax error handling
Fixes #477. * bin/common_finput.cc (job_processor::process_string): Fix return value. * bin/ltlsynt.cc: Fix handling of syntax errors. While we are here, make sure game_info is destroyed before Spot's globals. * tests/core/ltlsynt.test: Add a test case.
This commit is contained in:
parent
4710577dfe
commit
cb3a833a8d
3 changed files with 80 additions and 69 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2012-2017, 2019 Laboratoire de Recherche et
|
||||
// Copyright (C) 2012-2017, 2019, 2021 Laboratoire de Recherche et
|
||||
// Développement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -125,7 +125,7 @@ job_processor::process_string(const std::string& input,
|
|||
if (filename)
|
||||
error_at_line(0, 0, filename, linenum, "parse error:");
|
||||
pf.format_errors(std::cerr);
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
return process_formula(pf.f, filename, linenum);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue