Lines Matching refs:overlap
565 * with a partial overlap because the recursive algorithm would have tried
613 * with a partial overlap because the standard algorithm would have tried
616 * must be matched with a full overlap because the longest-match algorithm
641 // Consider strings; they may overlap with the span.
652 int32_t overlap=spanLengths[i];
653 if(overlap==ALL_CP_CONTAINED) {
660 // Try to match this string at pos-overlap..pos.
661 if(overlap>=LONG_SPAN) {
662 overlap=length16;
664 U16_BACK_1(s16, 0, overlap); // Length of the string minus the last code point.
666 if(overlap>spanLength) {
667 overlap=spanLength;
669 int32_t inc=length16-overlap; // Keep overlap+inc==length16.
675 if(!offsets.containsOffset(inc) && matches16CPB(s, pos-overlap, length, s16, length16)) {
681 if(overlap==0) {
684 --overlap;
691 int32_t overlap=spanLengths[i];
699 // Try to match this string at pos-overlap..pos.
700 if(overlap>=LONG_SPAN) {
701 overlap=length16;
705 if(overlap>spanLength) {
706 overlap=spanLength;
708 int32_t inc=length16-overlap; // Keep overlap+inc==length16.
710 if(inc>rest || overlap<maxOverlap) {
714 if( (overlap>maxOverlap || /* redundant overlap==maxOverlap && */ inc>maxInc) &&
715 matches16CPB(s, pos-overlap, length, s16, length16)
718 maxOverlap=overlap;
721 --overlap;
802 // Consider strings; they may overlap with the span.
816 int32_t overlap=spanBackLengths[i];
817 if(overlap==ALL_CP_CONTAINED) {
824 // Try to match this string at pos-(length16-overlap)..pos-length16.
825 if(overlap>=LONG_SPAN) {
826 overlap=length16;
829 U16_FWD_1(s16, len1, overlap);
830 overlap-=len1; // Length of the string minus the first code point.
832 if(overlap>spanLength) {
833 overlap=spanLength;
835 int32_t dec=length16-overlap; // Keep dec+overlap==length16.
847 if(overlap==0) {
850 --overlap;
857 int32_t overlap=spanBackLengths[i];
865 // Try to match this string at pos-(length16-overlap)..pos-length16.
866 if(overlap>=LONG_SPAN) {
867 overlap=length16;
871 if(overlap>spanLength) {
872 overlap=spanLength;
874 int32_t dec=length16-overlap; // Keep dec+overlap==length16.
876 if(dec>pos || overlap<maxOverlap) {
880 if( (overlap>maxOverlap || /* redundant overlap==maxOverlap && */ dec>maxDec) &&
884 maxOverlap=overlap;
887 --overlap;
963 // Consider strings; they may overlap with the span.
984 int32_t overlap=spanUTF8Lengths[i];
985 if(overlap==ALL_CP_CONTAINED) {
990 // Try to match this string at pos-overlap..pos.
991 if(overlap>=LONG_SPAN) {
992 overlap=length8;
994 U8_BACK_1(s8, 0, overlap); // Length of the string minus the last code point.
996 if(overlap>spanLength) {
997 overlap=spanLength;
999 int32_t inc=length8-overlap; // Keep overlap+inc==length8.
1007 if( !U8_IS_TRAIL(s[pos-overlap]) &&
1009 matches8(s+pos-overlap, s8, length8)
1017 if(overlap==0) {
1020 --overlap;
1032 int32_t overlap=spanUTF8Lengths[i];
1036 // Try to match this string at pos-overlap..pos.
1037 if(overlap>=LONG_SPAN) {
1038 overlap=length8;
1042 if(overlap>spanLength) {
1043 overlap=spanLength;
1045 int32_t inc=length8-overlap; // Keep overlap+inc==length8.
1047 if(inc>rest || overlap<maxOverlap) {
1053 if( !U8_IS_TRAIL(s[pos-overlap]) &&
1054 (overlap>maxOverlap || /* redundant overlap==maxOverlap && */ inc>maxInc) &&
1055 matches8(s+pos-overlap, s8, length8)
1059 maxOverlap=overlap;
1062 --overlap;
1144 // Consider strings; they may overlap with the span.
1164 int32_t overlap=spanBackUTF8Lengths[i];
1165 if(overlap==ALL_CP_CONTAINED) {
1170 // Try to match this string at pos-(length8-overlap)..pos-length8.
1171 if(overlap>=LONG_SPAN) {
1172 overlap=length8;
1175 U8_FWD_1(s8, len1, overlap);
1176 overlap-=len1; // Length of the string minus the first code point.
1178 if(overlap>spanLength) {
1179 overlap=spanLength;
1181 int32_t dec=length8-overlap; // Keep dec+overlap==length8.
1198 if(overlap==0) {
1201 --overlap;
1213 int32_t overlap=spanBackUTF8Lengths[i];
1217 // Try to match this string at pos-(length8-overlap)..pos-length8.
1218 if(overlap>=LONG_SPAN) {
1219 overlap=length8;
1223 if(overlap>spanLength) {
1224 overlap=spanLength;
1226 int32_t dec=length8-overlap; // Keep dec+overlap==length8.
1228 if(dec>pos || overlap<maxOverlap) {
1235 (overlap>maxOverlap || /* redundant overlap==maxOverlap && */ dec>maxDec) &&
1239 maxOverlap=overlap;
1242 --overlap;