Print '{!a}*' rather than '!a*'.
* src/ltlvisit/tostring.cc: Use braces for unary operators in Star. * src/ltltest/tostring.test: Add some PSL formulae, it cannot hurt.
This commit is contained in:
parent
aef6c1a06b
commit
47b2bea865
2 changed files with 13 additions and 3 deletions
|
|
@ -233,7 +233,9 @@ namespace spot
|
|||
return;
|
||||
}
|
||||
// 1* is OK, no need to print {1}*.
|
||||
need_parent = false;
|
||||
// However want braces for {!a}*, the only unary
|
||||
// operator that can be nested with *.
|
||||
need_parent = !!dynamic_cast<const unop*>(uo->child());
|
||||
// Do not output anything yet, star is a postfix operator.
|
||||
break;
|
||||
}
|
||||
|
|
@ -481,8 +483,11 @@ namespace spot
|
|||
os_ << "*";
|
||||
return;
|
||||
}
|
||||
// 1* is OK, no need to print {1}*.
|
||||
// However want braces for {!a}*, the only unary
|
||||
// operator that can be nested with *.
|
||||
need_parent = !!dynamic_cast<const unop*>(uo->child());
|
||||
// Do not output anything yet, star is a postfix operator.
|
||||
need_parent = false;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue