ltlparse: diagnose empty (...) block in lenient mode.

* src/ltlparse/ltlparse.yy (try_recursive_parse): Diagnose
empty strings.
* src/ltltest/lenient.test: Add tests.
This commit is contained in:
Alexandre Duret-Lutz 2012-10-18 00:23:34 +02:00
parent ff0eada81d
commit 676ab41f6f
2 changed files with 16 additions and 1 deletions

View file

@ -33,6 +33,7 @@ cat >input <<EOF
(((a < b ) U ({( b == c - 1 )})))
((((( a < b))) U ( b == c - 1)))
((((( a < b))) U { b == c - 1}!))
()a
EOF
cat >expected <<EOF
@ -44,7 +45,13 @@ cat >expected <<EOF
"a < b" U "b == c - 1"
"a < b" U "b == c - 1"
"a < b" U "b == c - 1"
Xa
EOF
run 0 $ltlfilt --lenient input > output
cmp output expected
run 2 $ltlfilt --lenient -f 'F( )' 2> stderr
grep 'unexpected empty block' stderr