Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
fb014cc3
Commit
fb014cc3
authored
Aug 08, 2003
by
Alexandre Duret-Lutz
Browse files
* src/ltlparse/ltlparse.yy: Handle and diagnose mismatched parentheses.
* src/ltltest/parseerr.test: Add some examples.
parent
1276abd2
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
fb014cc3
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 <ad
l@gnu.org
>
2003-08-06 Alexandre Duret-Lutz <ad
uret@src.lip6.fr
>
* src/ltlparse/ltlparse.yy: Fix precedence OP_OR < OP_XOR < OP_AND.
* src/ltlast/binop.cc (binop::instance): Order operands for
...
...
src/ltlparse/ltlparse.yy
View file @
fb014cc3
...
...
@@ -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
...
...
src/ltltest/parseerr.test
View file @
fb014cc3
...
...
@@ -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))'
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment