* src/ltlvisit/tostring.cc
(to_string_visitor::visit(const atomic_prop*)): Quote propositions that start with F, G, or X. * src/ltltest/tostring.test: Test quoted propositions. * src/tgbaalgos/save.cc (save_bfs::process_state): Escape " and + characters in formulae. * src/tgbatest/readsave.test: Test for this.
This commit is contained in:
parent
a7ab42e422
commit
8008deeddd
5 changed files with 43 additions and 10 deletions
|
|
@ -78,7 +78,23 @@ namespace spot
|
|||
state* dest = si->current_state();
|
||||
os_ << "\"" << cur << "\", \""
|
||||
<< automata_->format_state(dest) << "\", \"";
|
||||
bdd_print_formula(os_, d, si->current_condition()) << "\",";
|
||||
std::string s = bdd_format_formula(d, si->current_condition());
|
||||
// Escape " and \ characters in s.
|
||||
for (std::string::const_iterator i = s.begin();
|
||||
i != s.end(); ++i)
|
||||
switch (*i)
|
||||
{
|
||||
case '\\':
|
||||
os_ << "\\\\";
|
||||
break;
|
||||
case '"':
|
||||
os_ << "\\\"";
|
||||
break;
|
||||
default:
|
||||
os_ << *i;
|
||||
break;
|
||||
}
|
||||
os_ << "\",";
|
||||
bdd_print_acc(os_, d, si->current_acceptance_conditions());
|
||||
os_ << ";" << std::endl;
|
||||
delete dest;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue