Make it possible to output UTF-8 for dotty().

* src/tgba/tgbaexplicit.hh: Rerganize a bit to
allow different functions to be used to format
states.  Add an enabled_utf8() method to
tgba_explicit_formula.
* src/tgbaalgos/dotty.hh, src/tgbaalgos/dotty.cc:
Simplify the interface by not depending on
dotty_decorator explicitely.
* src/tgba/bddprint.hh (enable_utf8): New function.
* src/tgba/bddprint.cc (enable_utf8): Implement it
and use the global utf8 flag in other functions.
* src/tgbatest/ltl2tgba.cc: Add an -8 option for
UTF-8 outpout.
* wrap/python/spot.i: Adjust for tgbexplicit.hh
changes.
This commit is contained in:
Alexandre Duret-Lutz 2012-04-29 01:15:08 +02:00
parent f082700fb2
commit e93ceebafe
7 changed files with 235 additions and 101 deletions

View file

@ -24,10 +24,12 @@
#include <ostream>
#include "tgba/tgba.hh"
#include "dotty.hh"
#include "dottydec.hh"
#include "tgba/bddprint.hh"
#include "reachiter.hh"
#include "misc/escape.hh"
#include "tgba/tgbatba.hh"
#include "tgba/formula2bdd.hh"
namespace spot
{
@ -126,6 +128,8 @@ namespace spot
dotty_reachable(std::ostream& os, const tgba* g,
bool assume_sba, dotty_decorator* dd)
{
if (!dd)
dd = dotty_decorator::instance();
dotty_bfs d(os, g, assume_sba, dd);
d.run();
return os;