projects
/
cvc5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e77ded9
)
Better error for invalid concrete syntax of sorts with too many parens, like (Int...
author
Morgan Deters
<mdeters@cs.nyu.edu>
Wed, 18 Jun 2014 16:02:37 +0000
(12:02 -0400)
committer
Morgan Deters
<mdeters@cs.nyu.edu>
Wed, 18 Jun 2014 16:02:37 +0000
(12:02 -0400)
src/parser/smt2/Smt2.g
patch
|
blob
|
history
diff --git
a/src/parser/smt2/Smt2.g
b/src/parser/smt2/Smt2.g
index 63179cf42467c490368954edbf37f92af6e05d89..8590229a2017407e8abd7aec9a1212be8b4446ba 100644
(file)
--- a/
src/parser/smt2/Smt2.g
+++ b/
src/parser/smt2/Smt2.g
@@
-1483,7
+1483,9
@@
sortSymbol[CVC4::Type& t, CVC4::parser::DeclarationCheck check]
}
| LPAREN_TOK symbol[name,CHECK_NONE,SYM_SORT] sortList[args] RPAREN_TOK
{
- if(name == "Array" &&
+ if(args.empty()) {
+ PARSER_STATE->parseError("Extra parentheses around sort name not permitted in SMT-LIB");
+ } else if(name == "Array" &&
PARSER_STATE->isTheoryEnabled(Smt2::THEORY_ARRAYS) ) {
if(args.size() != 2) {
PARSER_STATE->parseError("Illegal array type.");