summaryrefslogtreecommitdiff
path: root/src/parser/parser.cpp
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@cs.nyu.edu>2013-02-22 16:48:13 -0500
committerMorgan Deters <mdeters@cs.nyu.edu>2013-03-08 19:30:49 -0500
commit56b7a4f494dfe069fc4cbdb1dcd05c23c9b59a1d (patch)
treea8dc4d5d2e1ecaba112fa67c9a61e27e5ef07c80 /src/parser/parser.cpp
parent9817df56827b4ee0ee67a33361f8619c5d1df6ed (diff)
Disallow overflow in bitvector literals (parser only)
* For example, (_ bv5 1) is now an error instead of being silently truncated. * Probably inappropriate for 1.0.x because it changes exception specifications.
Diffstat (limited to 'src/parser/parser.cpp')
-rw-r--r--src/parser/parser.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp
index 65d46220b..8b77362b2 100644
--- a/src/parser/parser.cpp
+++ b/src/parser/parser.cpp
@@ -462,15 +462,9 @@ Command* Parser::nextCommand() throw(ParserException) {
} catch(ParserException& e) {
setDone();
throw;
- } catch(Exception& e) {
+ } catch(exception& e) {
setDone();
- stringstream ss;
- // set the language of the stream, otherwise if it contains
- // Exprs or Types it prints in the AST language
- OutputLanguage outlang =
- language::toOutputLanguage(d_input->getLanguage());
- ss << Expr::setlanguage(outlang) << e;
- parseError( ss.str() );
+ parseError(e.what());
}
}
}
@@ -490,11 +484,9 @@ Expr Parser::nextExpression() throw(ParserException) {
} catch(ParserException& e) {
setDone();
throw;
- } catch(Exception& e) {
+ } catch(exception& e) {
setDone();
- stringstream ss;
- ss << e;
- parseError( ss.str() );
+ parseError(e.what());
}
}
Debug("parser") << "nextExpression() => " << result << std::endl;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback