diff options
Diffstat (limited to 'src/parser/antlr_input.h')
-rw-r--r-- | src/parser/antlr_input.h | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/parser/antlr_input.h b/src/parser/antlr_input.h index 8e5e82811..293be0087 100644 --- a/src/parser/antlr_input.h +++ b/src/parser/antlr_input.h @@ -35,12 +35,12 @@ #include "base/output.h" #include "parser/bounded_token_buffer.h" #include "parser/input.h" +#include "parser/line_buffer.h" #include "parser/parser_exception.h" #include "util/bitvector.h" #include "util/integer.h" #include "util/rational.h" - namespace CVC4 { class Command; @@ -62,10 +62,11 @@ private: */ pANTLR3_UINT8 d_inputString; - AntlrInputStream(std::string name, - pANTLR3_INPUT_STREAM input, - bool fileIsTemporary, - pANTLR3_UINT8 inputString); + LineBuffer* d_line_buffer; + + AntlrInputStream(std::string name, pANTLR3_INPUT_STREAM input, + bool fileIsTemporary, pANTLR3_UINT8 inputString, + LineBuffer* line_buffer); /* This is private and unimplemented, because you should never use it. */ AntlrInputStream(const AntlrInputStream& inputStream) CVC4_UNDEFINED; @@ -201,9 +202,6 @@ public: /** Get a bitvector constant from the text of the number and the size token */ static BitVector tokenToBitvector(pANTLR3_COMMON_TOKEN number, pANTLR3_COMMON_TOKEN size); - /** Retrieve the remaining text in this input. */ - std::string getUnparsedText(); - /** Get the ANTLR3 lexer for this input. */ pANTLR3_LEXER getAntlr3Lexer() { return d_lexer; } @@ -243,14 +241,6 @@ protected: virtual void setParser(Parser& parser); };/* class AntlrInput */ -inline std::string AntlrInput::getUnparsedText() { - const char *base = (const char *)d_antlr3InputStream->data; - const char *cur = (const char *)d_antlr3InputStream->nextChar; - - return std::string(cur, d_antlr3InputStream->sizeBuf - (cur - base)); -} - - inline std::string AntlrInput::tokenText(pANTLR3_COMMON_TOKEN token) { if( token->type == ANTLR3_TOKEN_EOF ) { return "<<EOF>>"; |