summaryrefslogtreecommitdiff
path: root/src/parser/parser.h
diff options
context:
space:
mode:
authorChristopher L. Conway <christopherleeconway@gmail.com>2010-02-27 18:34:44 +0000
committerChristopher L. Conway <christopherleeconway@gmail.com>2010-02-27 18:34:44 +0000
commite56c41f47d43103a6e8bf744e12229ed6e5a8f19 (patch)
tree39be4124610edf8072206aa85b178b8fe3eab2e2 /src/parser/parser.h
parent14c22833d05f632eb40eb68cc3c68345d891005c (diff)
Adding --mmap option to use memory-mapped file input, which provides a marginal improvement (<5%) on big benchmarks.
Diffstat (limited to 'src/parser/parser.h')
-rw-r--r--src/parser/parser.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/parser/parser.h b/src/parser/parser.h
index da2c630ca..d482b7907 100644
--- a/src/parser/parser.h
+++ b/src/parser/parser.h
@@ -25,6 +25,7 @@
namespace antlr {
class CharScanner;
+ class InputBuffer;
}
namespace CVC4 {
@@ -56,8 +57,8 @@ public:
LANG_AUTO
};
- static Parser* getNewParser(ExprManager* em, InputLanguage lang, std::string filename);
- static Parser* getNewParser(ExprManager* em, InputLanguage lang, std::istream& input);
+ static Parser* getMemoryMappedParser(ExprManager* em, InputLanguage lang, std::string filename);
+ static Parser* getNewParser(ExprManager* em, InputLanguage lang, std::istream& input, std::string filename);
/**
* Destructor.
@@ -96,18 +97,18 @@ private:
* Create a new parser.
* @param em the expression manager to usee
* @param lang the language to parse
- * @param input the input stream to parse
+ * @param inputBuffer the input buffer to parse
* @param filename the filename to attach to the stream
* @param deleteInput wheather to delete the input
* @return the parser
*/
- static Parser* getNewParser(ExprManager* em, InputLanguage lang, std::istream* input, std::string filename, bool deleteInput);
+ static Parser* getNewParser(ExprManager* em, InputLanguage lang, antlr::InputBuffer* inputBuffer, std::string filename);
/**
* Create a new parser given the actual antlr parser.
* @param antlrParser the antlr parser to user
*/
- Parser(std::istream* input, AntlrParser* antlrParser, antlr::CharScanner* antlrLexer, bool deleteInput);
+ Parser(antlr::InputBuffer* inputBuffer, AntlrParser* antlrParser, antlr::CharScanner* antlrLexer);
/** Sets the done flag */
void setDone(bool done = true);
@@ -122,7 +123,7 @@ private:
antlr::CharScanner* d_antlrLexer;
/** The input stream we are using */
- std::istream* d_input;
+ antlr::InputBuffer* d_inputBuffer;
/** Wherther to de-allocate the input */
bool d_deleteInput;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback