Fixed handling of {1,} quantifiers

This commit is contained in:
rogerl%netscape.com 2000-03-08 01:24:55 +00:00
Родитель 32821cfb59
Коммит 1a509a268e
2 изменённых файлов: 10 добавлений и 10 удалений

Просмотреть файл

@ -1514,12 +1514,12 @@ public class NativeRegExp extends ScriptableObject implements Function {
index = kidMatch;
}
}
if (num < ren.max)
return matchGreedyKid(state, ren, stop, num, ren.max,
if (num == ren.max)
// Have matched the exact count required,
// need to match the rest of the regexp.
break;
return matchGreedyKid(state, ren, stop, num, ren.max,
index, lastKid);
// Have matched the exact count required,
// need to match the rest of the regexp.
break;
}
case REOP_PLUS: {
int kidMatch = matchRENodes(state, (RENode)ren.kid,

Просмотреть файл

@ -1514,12 +1514,12 @@ public class NativeRegExp extends ScriptableObject implements Function {
index = kidMatch;
}
}
if (num < ren.max)
return matchGreedyKid(state, ren, stop, num, ren.max,
if (num == ren.max)
// Have matched the exact count required,
// need to match the rest of the regexp.
break;
return matchGreedyKid(state, ren, stop, num, ren.max,
index, lastKid);
// Have matched the exact count required,
// need to match the rest of the regexp.
break;
}
case REOP_PLUS: {
int kidMatch = matchRENodes(state, (RENode)ren.kid,