From: Kshitij Bansal Date: Thu, 10 Jul 2014 17:06:30 +0000 (-0400) Subject: friendlyparser: go back upto 2 words looking for match X-Git-Tag: cvc5-1.0.0~6701^2~2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5ddaecbf5288bc7ecb551627ab11083264a63b31;p=cvc5.git friendlyparser: go back upto 2 words looking for match --- diff --git a/src/parser/antlr_input.cpp b/src/parser/antlr_input.cpp index d72b311cb..aa431ef42 100644 --- a/src/parser/antlr_input.cpp +++ b/src/parser/antlr_input.cpp @@ -402,7 +402,7 @@ std::string parseErrorHelper(const char* lineStart, int charPositionInLine, cons } else { bool foundCaretPos = false; - for(int tries = 0; tries < 1 && caretPos > 0 && !foundCaretPos; ++tries) { + for(int tries = 0; tries < 2 && caretPos > 0 && !foundCaretPos; ++tries) { // go to nearest alphanumeric string (before current position), // see if that word can be found in original message. If so, // point to that, else keep pointer where it was.