From: Morgan Deters Date: Fri, 18 Dec 2009 14:10:10 +0000 (+0000) Subject: more build system fix-ups X-Git-Tag: cvc5-1.0.0~9353 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6ccbdaf56924c29aca8787cbcfd0ac9e8aff97c3;p=cvc5.git more build system fix-ups --- diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp index e919a53e8..0a4b180ec 100644 --- a/src/parser/parser.cpp +++ b/src/parser/parser.cpp @@ -41,7 +41,7 @@ bool Parser::done() const { return d_done; } -Command* Parser::parseNextCommand() throw (ParserException) { +Command* Parser::parseNextCommand() throw(ParserException, AssertionException) { Command* cmd = 0; if(!done()) { try { @@ -58,7 +58,7 @@ Command* Parser::parseNextCommand() throw (ParserException) { return cmd; } -Expr Parser::parseNextExpression() throw (ParserException) { +Expr Parser::parseNextExpression() throw(ParserException, AssertionException) { Expr result; if(!done()) { try { @@ -76,7 +76,9 @@ Expr Parser::parseNextExpression() throw (ParserException) { Parser::~Parser() { delete d_antlrParser; delete d_antlrLexer; - if (d_deleteInput) delete d_input; + if(d_deleteInput) { + delete d_input; + } } Parser::Parser(istream* input, AntlrParser* antlrParser, CharScanner* antlrLexer, bool deleteInput) : diff --git a/src/parser/parser.h b/src/parser/parser.h index d6180b9a3..b099a8142 100644 --- a/src/parser/parser.h +++ b/src/parser/parser.h @@ -19,7 +19,8 @@ #include #include #include "cvc4_config.h" -#include "parser_exception.h" +#include "parser/parser_exception.h" +#include "util/Assert.h" #include "antlr_parser.h" namespace antlr { @@ -65,14 +66,14 @@ public: * Parse the next command of the input. If EOF is encountered a EmptyCommand * is returned and done flag is set. */ - Command* parseNextCommand() throw (ParserException); + Command* parseNextCommand() throw(ParserException, AssertionException); /** * Parse the next expression of the stream. If EOF is encountered a null * expression is returned and done flag is set. * @return the parsed expression */ - Expr parseNextExpression() throw (ParserException); + Expr parseNextExpression() throw(ParserException, AssertionException); /** * Check if we are done -- either the end of input has been reached, or some