ltlcross: diagnose missing i/o specifications earlier.

* src/misc/formater.cc, src/misc/formater.hh (scan): New method.
(prime): Use it.
* src/bin/ltlcross.cc (translator_runner::translator_runner): Scan each
specification string, and report those missing an input or output
%-sequence.
* NEWS: Mention it.
This commit is contained in:
Alexandre Duret-Lutz 2013-01-21 10:20:25 +01:00
parent edd687a301
commit 6a547371d7
4 changed files with 52 additions and 12 deletions

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2012 Laboratoire de Recherche et Développement de
// l'Epita (LRDE).
// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -117,16 +117,32 @@ namespace spot
{
}
/// \brief Scan the %-sequences occuring in \a fmt.
///
/// Set has['c'] for each %c in \a fmt. \a has must
/// be 256 wide.
/// @{
void
scan(const char* fmt, std::vector<bool>& has) const;
void
scan(const std::string& fmt, std::vector<bool>& has) const
{
scan(fmt.c_str(), has);
}
/// @}
/// Collect the %-sequences occurring in \a fmt.
/// @{
void
prime(const char* fmt);
/// Collect the %-sequences occurring in \a fmt.
void
prime(const std::string& fmt)
{
prime(fmt.c_str());
}
/// @}
/// Whether %c occurred in the primed formats.
bool