diff options
author | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-06-03 22:27:16 +0000 |
---|---|---|
committer | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-06-03 22:27:16 +0000 |
commit | f780dd882fc343cef668d5cd9eed8f515d0e70ed (patch) | |
tree | 5a3432a90d1f30cdc00f2353c0b43a468da09661 /src/parser/antlr_input.h | |
parent | 4cd2a432d621d18f7b811caab8935a617b4771c5 (diff) |
Implementing input from stdin (Fixes: #144)
Diffstat (limited to 'src/parser/antlr_input.h')
-rw-r--r-- | src/parser/antlr_input.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/parser/antlr_input.h b/src/parser/antlr_input.h index 27337c35f..642dc9654 100644 --- a/src/parser/antlr_input.h +++ b/src/parser/antlr_input.h @@ -47,7 +47,9 @@ namespace parser { class AntlrInputStream : public InputStream { pANTLR3_INPUT_STREAM d_input; - AntlrInputStream(std::string name,pANTLR3_INPUT_STREAM input); + AntlrInputStream(std::string name, + pANTLR3_INPUT_STREAM input, + bool fileIsTemporary = false); /* This is private and unimplemented, because you should never use it. */ AntlrInputStream(const AntlrInputStream& inputStream); @@ -67,18 +69,22 @@ public: * @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. */ - static AntlrInputStream* newFileInputStream(const std::string& name, bool useMmap = false) + static AntlrInputStream* newFileInputStream(const std::string& name, + bool useMmap = false) throw (InputStreamException); /** Create an input from an istream. */ - // AntlrInputStream newInputStream(std::istream& input, const std::string& name); + static AntlrInputStream* newStreamInputStream(std::istream& input, + const std::string& name) + throw (InputStreamException); /** Create a string input. * * @param input the string to read * @param name the "filename" to use when reporting errors */ - static AntlrInputStream* newStringInputStream(const std::string& input, const std::string& name) + static AntlrInputStream* newStringInputStream(const std::string& input, + const std::string& name) throw (InputStreamException); }; |