3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-02 21:37:02 +00:00

update parser

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-10-14 13:06:09 -07:00
parent 13abf5c6a6
commit 77e4340470
3 changed files with 68 additions and 9 deletions

View file

@ -625,8 +625,6 @@ namespace smt2 {
args.push_back(u);
next();
}
if (args.empty())
throw parser_exception("invalid indexed sort, index expected");
sort * r = d->instantiate(pm(), args.size(), args.c_ptr());
if (r == nullptr)
throw parser_exception("invalid sort application");
@ -1520,7 +1518,6 @@ namespace smt2 {
check_identifier("invalid indexed identifier, symbol expected");
symbol r = curr_id();
next();
unsigned num_indices = 0;
while (!curr_is_rparen()) {
if (curr_is_int()) {
if (!curr_numeral().is_unsigned()) {
@ -1545,10 +1542,7 @@ namespace smt2 {
else {
throw parser_exception("invalid indexed identifier, integer, identifier or '(' expected");
}
num_indices++;
}
if (num_indices == 0)
throw parser_exception("invalid indexed identifier, index expected");
next();
return r;
}