From: Christopher L. Conway Date: Mon, 18 Apr 2011 03:10:55 +0000 (+0000) Subject: Fixing output for EOF token in parser errors X-Git-Tag: cvc5-1.0.0~8592 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7d281fba79b1c9f3ae646d3371a0e52e2efd3bba;p=cvc5.git Fixing output for EOF token in parser errors --- diff --git a/src/parser/antlr_input.h b/src/parser/antlr_input.h index 2f12aea03..c48185f58 100644 --- a/src/parser/antlr_input.h +++ b/src/parser/antlr_input.h @@ -219,6 +219,10 @@ inline std::string AntlrInput::getUnparsedText() { inline std::string AntlrInput::tokenText(pANTLR3_COMMON_TOKEN token) { + if( token->type == ANTLR3_TOKEN_EOF ) { + return "<>"; + } + ANTLR3_MARKER start = token->getStartIndex(token); ANTLR3_MARKER end = token->getStopIndex(token); /* start and end are boundary pointers. The text is a string