projects
/
cvc5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98f808f
)
Parser error for wrong number of datatypes (#5049)
author
Andrew Reynolds
<andrew.j.reynolds@gmail.com>
Thu, 10 Sep 2020 03:34:36 +0000
(22:34 -0500)
committer
GitHub
<noreply@github.com>
Thu, 10 Sep 2020 03:34:36 +0000
(22:34 -0500)
Fixes #4973.
src/parser/smt2/Smt2.g
patch
|
blob
|
history
diff --git
a/src/parser/smt2/Smt2.g
b/src/parser/smt2/Smt2.g
index 4bb253603bfff3543ca6a8b39f824e4aaea056c6..ea0c3b71431266c0f254ce75e9af24302eeade0d 100644
(file)
--- a/
src/parser/smt2/Smt2.g
+++ b/
src/parser/smt2/Smt2.g
@@
-1265,6
+1265,10
@@
datatypesDef[bool isCo,
RPAREN_TOK
)+
{
+ if (dts.size() != dnames.size())
+ {
+ PARSER_STATE->parseError("Wrong number of datatypes provided.");
+ }
PARSER_STATE->popScope();
cmd->reset(new DatatypeDeclarationCommand(
api::sortVectorToTypes(