diff options
author | Tim King <taking@cs.nyu.edu> | 2018-01-06 15:27:11 -0800 |
---|---|---|
committer | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2018-01-06 17:27:11 -0600 |
commit | 8497910df4d1c254b26f09c3dc5ee6191c970b12 (patch) | |
tree | 495df915de750ad09ade2d9f8844365e5feaeb76 /src/parser/parser.cpp | |
parent | d26e19150d5d3a6cc8cee332a5f2067a7383a129 (diff) |
Removing throw specifiers from src/parser/. (#1486)
Diffstat (limited to 'src/parser/parser.cpp')
-rw-r--r-- | src/parser/parser.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp index 0d8cc1fcb..395f41ba1 100644 --- a/src/parser/parser.cpp +++ b/src/parser/parser.cpp @@ -518,8 +518,10 @@ void Parser::reserveSymbolAtAssertionLevel(const std::string& varName) { } void Parser::checkDeclaration(const std::string& varName, - DeclarationCheck check, SymbolType type, - std::string notes) throw(ParserException) { + DeclarationCheck check, + SymbolType type, + std::string notes) +{ if (!d_checksEnabled) { return; } @@ -549,7 +551,8 @@ void Parser::checkDeclaration(const std::string& varName, } } -void Parser::checkFunctionLike(Expr fun) throw(ParserException) { +void Parser::checkFunctionLike(Expr fun) +{ if (d_checksEnabled && !isFunctionLike(fun)) { stringstream ss; ss << "Expecting function-like symbol, found '"; @@ -559,7 +562,8 @@ void Parser::checkFunctionLike(Expr fun) throw(ParserException) { } } -void Parser::checkArity(Kind kind, unsigned numArgs) throw(ParserException) { +void Parser::checkArity(Kind kind, unsigned numArgs) +{ if (!d_checksEnabled) { return; } @@ -581,7 +585,8 @@ void Parser::checkArity(Kind kind, unsigned numArgs) throw(ParserException) { } } -void Parser::checkOperator(Kind kind, unsigned numArgs) throw(ParserException) { +void Parser::checkOperator(Kind kind, unsigned numArgs) +{ if (d_strictMode && d_logicOperators.find(kind) == d_logicOperators.end()) { parseError("Operator is not defined in the current logic: " + kindToString(kind)); @@ -592,9 +597,8 @@ void Parser::checkOperator(Kind kind, unsigned numArgs) throw(ParserException) { void Parser::addOperator(Kind kind) { d_logicOperators.insert(kind); } void Parser::preemptCommand(Command* cmd) { d_commandQueue.push_back(cmd); } - -Command* Parser::nextCommand() throw(ParserException, - UnsafeInterruptException) { +Command* Parser::nextCommand() +{ Debug("parser") << "nextCommand()" << std::endl; Command* cmd = NULL; if (!d_commandQueue.empty()) { @@ -627,7 +631,8 @@ Command* Parser::nextCommand() throw(ParserException, return cmd; } -Expr Parser::nextExpression() throw(ParserException, UnsafeInterruptException) { +Expr Parser::nextExpression() +{ Debug("parser") << "nextExpression()" << std::endl; const Options& options = d_exprManager->getOptions(); d_resourceManager->spendResource(options.getParseStep()); |