bin: add %g options to print acceptance name

Fixes #289.

* spot/twaalgos/stats.cc, spot/twaalgos/stats.hh,
bin/common_aoutput.cc, bin/common_aoutput.hh: plug %g and %G into
acc_cond::name() when arguments are given as %[arg]g.  or %[arg]G.
* tests/core/acc2.test: Add test case.
* doc/org/randaut.org, NEWS: Document it.
This commit is contained in:
Alexandre Duret-Lutz 2017-11-03 22:45:46 +01:00
parent bd39edde27
commit 75a1d6ac61
7 changed files with 110 additions and 18 deletions

View file

@ -70,6 +70,20 @@ namespace spot
print(std::ostream& os, const char*) const override;
};
class SPOT_API printable_acc_cond final: public spot::printable
{
acc_cond val_;
public:
printable_acc_cond&
operator=(const acc_cond& new_val)
{
val_ = new_val;
return *this;
}
void print(std::ostream& os, const char* pos) const override;
};
class SPOT_API printable_scc_info final:
public spot::printable
{
@ -117,7 +131,7 @@ namespace spot
printable_value<unsigned> nondetstates_;
printable_value<unsigned> deterministic_;
printable_value<unsigned> complete_;
printable_value<std::string> gen_acc_;
printable_acc_cond gen_acc_;
};
/// @}