* src/ltltest/parseerr.test: Adjust.
* src/ltlparse/ltlparse.yy: Simplify error handling now that Bison will call destructors. Give each operator a full name, so that Bison uses it in error messages.
This commit is contained in:
parent
03704d635e
commit
a87c9d3d33
3 changed files with 92 additions and 101 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#! /bin/sh
|
||||
# Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
# Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
# et Marie Curie.
|
||||
#
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
# 02111-1307, USA.
|
||||
|
||||
|
||||
# Check error recovery in parsing. This also check how the
|
||||
# Check error recovery in parsing. This also checks how the
|
||||
# resulting tree looks like.
|
||||
|
||||
. ./defs || exit 1
|
||||
|
|
@ -49,9 +49,9 @@ check()
|
|||
# Empty or unparsable strings
|
||||
check '' ''
|
||||
check '+' ''
|
||||
check '/2/3/4/5 a + b /6/7/8/' ''
|
||||
|
||||
# leading and trailing garbage are skipped
|
||||
check '/2/3/4/5 a + b /6/7/8/' 'multop(Or, AP(a), AP(b))'
|
||||
check 'a U b c' 'binop(U, AP(a), AP(b))'
|
||||
check 'a &&& b' 'multop(And, constant(0), AP(b))'
|
||||
# (check multop merging while we are at it)
|
||||
|
|
@ -64,12 +64,12 @@ check 'a U b V c R' 'constant(0)'
|
|||
|
||||
# Recovery inside parentheses
|
||||
check 'a U (b c) U e R (f g <=> h)' \
|
||||
'binop(R, binop(U, binop(U, AP(a), AP(b)), AP(e)), AP(f))'
|
||||
'binop(R, binop(U, binop(U, AP(a), constant(0)), AP(e)), constant(0))'
|
||||
check 'a U ((c) U e) R (<=> f g)' \
|
||||
'binop(R, binop(U, AP(a), binop(U, AP(c), AP(e))), constant(0))'
|
||||
|
||||
# Missing parentheses
|
||||
check 'a & (a + b' 'multop(And, AP(a), multop(Or, AP(a), AP(b)))'
|
||||
check 'a & (a + b c' 'multop(And, AP(a), multop(Or, AP(a), AP(b)))'
|
||||
check 'a & (a + b c' 'multop(And, constant(0), AP(a))'
|
||||
check 'a & (+' 'multop(And, constant(0), AP(a))'
|
||||
check 'a & (' 'multop(And, constant(0), AP(a))'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue