return d_done;
}
-Command* Parser::parseNextCommand() throw (ParserException) {
+Command* Parser::parseNextCommand() throw(ParserException, AssertionException) {
Command* cmd = 0;
if(!done()) {
try {
return cmd;
}
-Expr Parser::parseNextExpression() throw (ParserException) {
+Expr Parser::parseNextExpression() throw(ParserException, AssertionException) {
Expr result;
if(!done()) {
try {
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) :
#include <string>
#include <iostream>
#include "cvc4_config.h"
-#include "parser_exception.h"
+#include "parser/parser_exception.h"
+#include "util/Assert.h"
#include "antlr_parser.h"
namespace antlr {
* 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