Fixed backtracking problem in OneOrMore.

This commit is contained in:
yhirose 2015-08-05 23:37:56 -04:00
parent aa4486219a
commit 85eb054106

View File

@ -652,6 +652,7 @@ public:
const auto& rule = *ope_; const auto& rule = *ope_;
auto len = rule.parse(s + i, n - i, sv, c, dt); auto len = rule.parse(s + i, n - i, sv, c, dt);
if (fail(len)) { if (fail(len)) {
sv.rewind(s + i);
break; break;
} }
i += len; i += len;