Fixed some bugs, including modifing StringReader to treat quoted strings as whole words.

This commit is contained in:
Nathan Braswell
2013-07-02 13:14:40 -04:00
parent 85da0bf646
commit cc6ff21986
5 changed files with 29 additions and 13 deletions

View File

@@ -27,7 +27,7 @@ Symbol* Lexer::next() {
//If we're at the end, return an eof
if (currentPosition == input.length()-1)
return new Symbol("$EOF$", false);
int longestMatch = 0;
int longestMatch = -1;
RegEx* longestRegEx = NULL;
std::string remainingString = input.substr(currentPosition,input.length()-1);
for (std::vector<RegEx*>::size_type i = 0; i < regExs.size(); i++) {