1 /********************* -*- C++ -*- */
3 ** This file is part of the CVC4 prototype.
4 ** Copyright (c) 2009 The Analysis of Computer Systems Group (ACSys)
5 ** Courant Institute of Mathematical Sciences
7 ** See the file COPYING in the top-level source directory for licensing
10 ** Parser abstraction.
13 #ifndef __CVC4__PARSER__PARSER_H
14 #define __CVC4__PARSER__PARSER_H
19 #include "cvc4_config.h"
20 #include "parser_exception.h"
24 // Forward declarations
39 class CVC4_PUBLIC Parser
{
44 * Construct the parser that uses the given expression manager.
45 * @param em the expression manager.
47 Parser(ExprManager
* em
);
56 * Parse the next command of the input
58 virtual Command
* parseNextCommand() throw (ParserException
) = 0;
61 * Parse the next expression of the stream
63 virtual Expr
parseNextExpression() throw (ParserException
) = 0;
66 * Check if we are done -- either the end of input has been reached.
72 /** Sets the done flag */
73 void setDone(bool done
= true);
75 /** Expression manager the parser will be using */
76 ExprManager
* d_expr_manager
;
81 }; // end of class Parser
83 }/* CVC4::parser namespace */
86 #endif /* __CVC4__PARSER__PARSER_H */