Commit fb014cc3 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

* src/ltlparse/ltlparse.yy: Handle and diagnose mismatched parentheses.

* src/ltltest/parseerr.test: Add some examples.
parent 1276abd2
2003-08-07 Alexandre Duret-Lutz <adl@gnu.org>
2003-08-08 Alexandre Duret-Lutz <aduret@src.lip6.fr>
* src/ltlparse/ltlparse.yy: Handle and diagnose mismatched parentheses.
* src/ltltest/parseerr.test: Add some examples.
2003-08-07 Alexandre Duret-Lutz <aduret@src.lip6.fr>
* wrap/python/cgi/ltl2tgba.in: Convert GIFs to PNGs. Restrict
the size of dot's output to 1024x1024.
* src/tgbaalgos/dotty.cc (dotty_bfs::start): Do not preset
the size of the graph. Set height=0 for the invisible state.
2003-08-06 Alexandre Duret-Lutz <adl@gnu.org>
2003-08-06 Alexandre Duret-Lutz <aduret@src.lip6.fr>
* src/ltlparse/ltlparse.yy: Fix precedence OP_OR < OP_XOR < OP_AND.
* src/ltlast/binop.cc (binop::instance): Order operands for
......
......@@ -120,11 +120,19 @@ subformula: ATOMIC_PROP
"treating this parenthetical block as false"));
$$ = constant::false_instance();
}
| PAR_OPEN subformula many_errors PAR_CLOSE
{ error_list.push_back(parse_error(@3,
"unexpected input ignored"));
| PAR_OPEN subformula many_errors_diagnosed PAR_CLOSE
{ $$ = $2; }
| PAR_OPEN subformula many_errors_diagnosed END_OF_INPUT
{ error_list.push_back(parse_error(@1 + @2,
"missing closing parenthesis"));
$$ = $2;
}
| PAR_OPEN many_errors_diagnosed END_OF_INPUT
{ error_list.push_back(parse_error(@$,
"missing closing parenthesis, "
"treating this parenthetical block as false"));
$$ = constant::false_instance();
}
| OP_NOT subformula
{ $$ = unop::instance(unop::Not, $2); }
| subformula OP_AND subformula
......
......@@ -51,3 +51,9 @@ 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))'
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 & (+' 'multop(And, constant(0), AP(a))'
check 'a & (' 'multop(And, constant(0), AP(a))'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment