Fix what looks like an off-by-one error in RegEx::longestMatch()'s lastMatch calculation, and a corresponding +1 in code using longestMatch, and add a test.

This commit is contained in:
Jason Orendorff
2013-10-26 23:29:23 -07:00
parent 7859b29725
commit d2d38e2516
4 changed files with 17 additions and 5 deletions

View File

@@ -19,6 +19,7 @@
int main(int argc, char* argv[]) {
if (argc == 2 && std::string(argv[1]) == "--test") {
StringReader::test();
RegEx::test();
Lexer::test();
return 0;
}