From d5512ec78e1f19f296efbe11bae533be7173f84c Mon Sep 17 00:00:00 2001 From: Nathan Braswell Date: Sun, 3 Nov 2013 20:36:18 -0500 Subject: [PATCH] Fix the non-working Lexer test. --- src/Lexer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Lexer.cpp b/src/Lexer.cpp index ce6ad93..d3e9af4 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -45,8 +45,8 @@ Symbol Lexer::next() { //std::cout << "Current at is \"" << input.substr(currentPosition) << "\" currentPos is " << currentPosition <getPattern(), true, eatenString); } else { - std::cout << "Found no applicable regex" << std::endl; - std::cout << "Remaining is ||" << input.substr(currentPosition) << "||" << std::endl; + // std::cout << "Found no applicable regex" << std::endl; + // std::cout << "Remaining is ||" << input.substr(currentPosition) << "||" << std::endl; return Symbol("$INVALID$", true); } } @@ -89,7 +89,7 @@ void Lexer::test() { lex.setInput("blah"); s = lex.next(); assert(s.getName() == "a|b" && s.getValue() == "b"); - assert(lex.next() == Symbol()); + assert(lex.next() == Symbol("$INVALID$", true)); } // Lexer can consume all the input at once.