diff options
author | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-05-12 20:29:24 +0000 |
---|---|---|
committer | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-05-12 20:29:24 +0000 |
commit | a358ed3b520919acbb72fb9bcd2974ee4165f495 (patch) | |
tree | 52a9dd03f5735114cf196bafbc6a5ee6f5a40b22 /src/parser/parser.h | |
parent | 8d691eac8e478576ebceb6406a8e372db5e3f7f1 (diff) |
Adding ParserBuilder, reducing visibility of Parser and Input constructors
Adding Smt2 subclass of Parser
Checking for multiple calls to set-logic in SMT v2
Diffstat (limited to 'src/parser/parser.h')
-rw-r--r-- | src/parser/parser.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/parser/parser.h b/src/parser/parser.h index c191d9f39..e6e5a2250 100644 --- a/src/parser/parser.h +++ b/src/parser/parser.h @@ -95,6 +95,7 @@ inline std::string toString(SymbolType type) { * declarations. */ class CVC4_PUBLIC Parser { + friend class ParserBuilder; /** The expression manager */ ExprManager *d_exprManager; @@ -123,15 +124,20 @@ class CVC4_PUBLIC Parser { /** Lookup a symbol in the given namespace. */ Expr getSymbol(const std::string& var_name, SymbolType type); -public: - /** Create a parser state. +protected: + /** Create a parser state. NOTE: The parser takes "ownership" of the given + * input and will delete it on destruction. * * @param exprManager the expression manager to use when creating expressions * @param input the parser input */ Parser(ExprManager* exprManager, Input* input, bool strictMode = false); - virtual ~Parser() { } +public: + + virtual ~Parser() { + delete d_input; + } /** Get the associated <code>ExprManager</code>. */ inline ExprManager* getExprManager() const { @@ -145,9 +151,9 @@ public: /** Set the declaration scope manager for this input. NOTE: This should <em>only</me> be * called before parsing begins. Otherwise, previous declarations will be lost. */ - inline void setDeclarationScope(DeclarationScope declScope) { +/* inline void setDeclarationScope(DeclarationScope declScope) { d_declScope = declScope; - } + }*/ /** * Check if we are done -- either the end of input has been reached, or some |