From efe094829e9d5b499cc1ec9d22dca2f74b796210 Mon Sep 17 00:00:00 2001 From: "Mike D. Lowis" Date: Fri, 2 Mar 2012 10:44:23 -0500 Subject: [PATCH] Fixed a bug in btparser where an exception was being created but not actually thrown in the match function. This effectively killed the backtracking operation of the parser :-( --- source/parser/btparser/btparser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/parser/btparser/btparser.cpp b/source/parser/btparser/btparser.cpp index 9a01d43..8213468 100644 --- a/source/parser/btparser/btparser.cpp +++ b/source/parser/btparser/btparser.cpp @@ -73,9 +73,10 @@ void BTParser::match(TokenType_T type) { Token& tok = lookaheadToken(1); ostringstream oss; - oss << "Expected token type. Expected " << type << ", received " << tok.type() << "."; + oss << "Unexpected token type. Expected " << type << ", received " << tok.type() << "."; Exception ex( tok.line(), tok.column() ); ex.setMessage(oss.str()); + throw ex; } } -- 2.52.0