Add support for [+].

* src/ltlast/bunop.cc (bunop::format): Output [*1..] as [+].
* src/ltlvisit/tostring.cc: Output "a*" as "a[*]" for consistency.
* src/ltlparse/ltlparse.yy, src/ltlparse/ltlscan.ll: Recognize [+].
* src/ltltest/tostring.test, src/ltltest/equals.test,
src/tgbatest/ltl2tgba.test: More tests.
This commit is contained in:
Alexandre Duret-Lutz 2010-05-19 17:01:11 +02:00
parent 126b724a98
commit 567b460738
7 changed files with 28 additions and 12 deletions

View file

@ -119,6 +119,14 @@ namespace spot
bunop::format() const
{
std::ostringstream out;
// Syntactic sugaring
if (min_ == 1 && max_ == unbounded)
{
out << "[+]";
return out.str();
}
out << "[*";
if (min_ != 0 || max_ != unbounded)
{