summaryrefslogtreecommitdiff
path: root/src/parser/cvc/cvc_input.h
diff options
context:
space:
mode:
authorChristopher L. Conway <christopherleeconway@gmail.com>2010-04-28 18:34:11 +0000
committerChristopher L. Conway <christopherleeconway@gmail.com>2010-04-28 18:34:11 +0000
commita72c7a26fda2b9c268912e618fd7d71164e4800a (patch)
treee1694867f049b5328720abc9496cfe926989aae7 /src/parser/cvc/cvc_input.h
parent7a8454030fdbb1e6c2a6db7ce18eafe0764eaf4a (diff)
Refactoring Input/Parser code to support external manipulation of the parser state.
Diffstat (limited to 'src/parser/cvc/cvc_input.h')
-rw-r--r--src/parser/cvc/cvc_input.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/parser/cvc/cvc_input.h b/src/parser/cvc/cvc_input.h
index 4878d015e..0d264f606 100644
--- a/src/parser/cvc/cvc_input.h
+++ b/src/parser/cvc/cvc_input.h
@@ -18,7 +18,7 @@
#ifndef __CVC4__PARSER__CVC_INPUT_H
#define __CVC4__PARSER__CVC_INPUT_H
-#include "parser/antlr_input.h"
+#include "parser/input.h"
#include "parser/cvc/generated/CvcLexer.h"
#include "parser/cvc/generated/CvcParser.h"
@@ -32,7 +32,7 @@ class ExprManager;
namespace parser {
-class CvcInput : public AntlrInput {
+class CvcInput : public Input {
/** The ANTLR3 CVC lexer for the input. */
pCvcLexer d_pCvcLexer;
@@ -41,14 +41,11 @@ class CvcInput : public AntlrInput {
public:
- /** Create a file input.
+ /** Create an input.
*
- * @param exprManager the manager to use when building expressions from the input
- * @param filename the path of the file to read
- * @param useMmap <code>true</code> if the input should use memory-mapped
- * I/O; otherwise, the input will use the standard ANTLR3 I/O implementation.
+ * @param inputStream the input to parse
*/
- CvcInput(ExprManager* exprManager, const std::string& filename, bool useMmap);
+ CvcInput(AntlrInputStream *inputStream);
/** Create a string input.
*
@@ -56,8 +53,10 @@ public:
* @param input the string to read
* @param name the "filename" to use when reporting errors
*/
+/*
CvcInput(ExprManager* exprManager, const std::string& input,
const std::string& name);
+*/
/* Destructor. Frees the lexer and the parser. */
~CvcInput();
@@ -69,14 +68,14 @@ protected:
*
* @throws ParserException if an error is encountered during parsing.
*/
- Command* doParseCommand() throw(ParserException);
+ Command* parseCommand() throw(ParserException);
/** Parse an expression from the input. Returns a null <code>Expr</code>
* if there is no expression there to parse.
*
* @throws ParserException if an error is encountered during parsing.
*/
- Expr doParseExpr() throw(ParserException);
+ Expr parseExpr() throw(ParserException);
private:
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback