Thanks to David Cok for reporting this issue.
/* bitvector types */
| BITVECTOR_TOK LPAREN k=numeral RPAREN
- { t = EXPR_MANAGER->mkBitVectorType(k); }
+ { if(k == 0) {
+ PARSER_STATE->parseError("Illegal bitvector size: 0");
+ }
+ t = EXPR_MANAGER->mkBitVectorType(k);
+ }
/* basic types */
| BOOLEAN_TOK { t = EXPR_MANAGER->booleanType(); }
if( numerals.size() != 1 ) {
PARSER_STATE->parseError("Illegal bitvector type.");
}
+ if(numerals.front() == 0) {
+ PARSER_STATE->parseError("Illegal bitvector size: 0");
+ }
t = EXPR_MANAGER->mkBitVectorType(numerals.front());
} else {
std::stringstream ss;