Home | History | Annotate | Download | only in i18n

Lines Matching defs:ce

89 * @param ce collation element
93 inline int hash(uint32_t ce)
95 // the old value UCOL_PRIMARYORDER(ce) % MAX_TABLE_SIZE_ does not work
99 return UCOL_PRIMARYORDER(ce) % MAX_TABLE_SIZE_;
163 // if the ce is a variable, we mask and get only the primary values
284 * Initializing the ce table for a pattern.
323 if (pattern->CE != cetable && pattern->CE) {
324 uprv_free(pattern->CE);
329 int32_t ce;
331 while ((ce = ucol_next(coleiter, status)) != UCOL_NULLORDER &&
333 uint32_t newce = getCE(strsrch, ce);
348 result += (uint16_t)(ucol_getMaxExpansion(coleiter, ce) - 1);
352 pattern->CE = cetable;
409 // ** whether a CE is signed or unsigned. For example, look at routine above this one.)
428 //result += (uint16_t)(ucol_getMaxExpansion(coleiter, ce) - 1);
485 * @param cetable table containing pattern ce
550 * If pattern has no non-ignorable ce, we return a illegal argument error.
567 setShiftTable(pattern->shift, pattern->backShift, pattern->CE,
645 int32_t ce = getCE(strsrch, ucol_next(coleiter, &status));
646 if (ce == UCOL_IGNORABLE) {
650 if (U_FAILURE(status) || ce != strsrch->pattern.CE[count]) {
735 * @param ce the text ce which failed the match.
736 * @param patternceindex index of the ce within the pattern ce buffer which
743 int32_t ce,
747 if (ce != UCOL_NULLORDER) {
748 int32_t shift = pattern->shift[hash(ce)];
885 uint32_t firstce = strsrch->pattern.CE[0];
887 uint32_t ce = UCOL_IGNORABLE;
888 while (U_SUCCESS(*status) && ce != firstce && ce != (uint32_t)UCOL_NULLORDER) {
890 if (ce != firstce && ce != UCOL_IGNORABLE) {
893 ce = ucol_next(coleiter, status);
913 * the first pattern ce does not match the first ce of the character, we bail.
919 * first or last ce that match has to occur within the first character.
938 int32_t firstce = strsrch->pattern.CE[0];
941 int32_t ce = getCE(strsrch, ucol_next(coleiter, &status));
945 while (ce != firstce) {
946 if (ce != UCOL_IGNORABLE) {
949 ce = getCE(strsrch, ucol_next(coleiter, &status));
950 if (U_FAILURE(status) || ce == UCOL_NULLORDER) {
982 ce = ucol_previous(coleiter, &status);
984 (ce != UCOL_NULLORDER && ce != UCOL_IGNORABLE)) {
1020 int32_t firstce = strsrch->pattern.CE[0];
1023 int32_t ce;
1025 while ((ce = getCE(strsrch, ucol_next(coleiter, &status))) != firstce) {
1026 if (U_FAILURE(status) || ce == UCOL_NULLORDER) {
1043 ce = ucol_next(coleiter, &status);
1047 if (ce != UCOL_NULLORDER && ce != UCOL_IGNORABLE) {
1048 ce = getCE(strsrch, ce);
1050 if (ce != UCOL_NULLORDER && ce != UCOL_IGNORABLE) {
1197 // getting rid of the redundant ce, caused by setOffset.
1203 // have to skip the first ce in the expansion buffer.
1215 int32_t *patternce = strsrch->pattern.CE;
1219 int32_t ce = getCE(strsrch, ucol_next(coleiter, status));
1220 if (ce == UCOL_IGNORABLE) {
1227 if (U_FAILURE(*status) || ce != patternce[count]) {
1419 int32_t *patternce = strsrch->pattern.CE;
1422 int32_t ce = getCE(strsrch, ucol_next(coleiter, &status));
1423 if (ce == UCOL_IGNORABLE) {
1426 if (U_FAILURE(status) || ce != *patternce) {
1618 int32_t *ce = strsrch->pattern.CE;
1646 if (textce != UCOL_IGNORABLE && textce != ce[ceindex]) {
1673 if (textce == ce[ceindex]) {
1701 * equivalents and check their corresponding ces with the pattern ce.
1840 // getting rid of the redundant ce, caused by setOffset.
1846 // have to skip the first ce in the expansion buffer.
1858 int32_t *patternce = strsrch->pattern.CE;
1863 int32_t ce = getCE(strsrch, ucol_next(coleiter, status));
1866 if (ce == UCOL_IGNORABLE) {
1874 if (count == 0 && ce != patternce[0]) {
1880 ce = getCE(strsrch, ucol_next(coleiter, status));
1881 while (U_SUCCESS(*status) && ce != expected &&
1882 ce != UCOL_NULLORDER &&
1884 ce = getCE(strsrch, ucol_next(coleiter, status));
1888 if (U_FAILURE(*status) || ce != patternce[count]) {
1968 * @param ce the text ce which failed the match.
1969 * @param patternceindex index of the ce within the pattern ce buffer which
1976 int32_t ce,
1988 if (ce != UCOL_NULLORDER) {
1989 int32_t shift = strsrch->pattern.backShift[hash(ce)];
2038 // getting rid of the redundant ce
2044 // last ce in the expansion buffer
2056 int32_t *patternce = strsrch->pattern.CE;
2060 int32_t ce = getCE(strsrch, ucol_previous(coleiter, status));
2063 if (ce == UCOL_IGNORABLE) {
2071 if (U_FAILURE(*status) || ce != patternce[count - 1]) {
2281 int32_t *ce = strsrch->pattern.CE;
2310 if (textce != UCOL_IGNORABLE && textce != ce[ceindex]) {
2337 if (textce == ce[ceindex]) {
2364 * canonical equivalents and check their corresponding ces with the pattern ce.
2478 // getting rid of the redundant ce
2484 // last ce in the expansion buffer
2496 int32_t *patternce = strsrch->pattern.CE;
2500 int32_t ce = getCE(strsrch, ucol_previous(coleiter, status));
2503 if (ce == UCOL_IGNORABLE) {
2512 ce != patternce[patterncelength - 1]) {
2518 ce = getCE(strsrch, ucol_previous(coleiter, status));
2519 while (U_SUCCESS(*status) && ce != expected &&
2520 ce != UCOL_NULLORDER &&
2522 ce = getCE(strsrch, ucol_previous(coleiter, status));
2526 if (U_FAILURE(*status) || ce != patternce[count - 1]) {
2722 result->pattern.CE = NULL;
2765 if (strsrch->pattern.CE != strsrch->pattern.CEBuffer &&
2766 strsrch->pattern.CE) {
2767 uprv_free(strsrch->pattern.CE);
3440 int64_t ce;
3519 // Get the CE with the specified index.
3523 // The CE value will be UCOL__PROCESSED_NULLORDER at end of input.
3534 // Caller is requesting a new, never accessed before, CE.
3543 // Manage the circular CE buffer indexing
3553 buf[i].ce = ucol_nextProcessed(ceIter, &buf[i].lowIndex, &buf[i].highIndex, &status);
3558 // Get the CE with the specified index.
3562 // The CE value will be UCOL__PROCESSED_NULLORDER at end of input.
3573 // Caller is requesting a new, never accessed before, CE.
3582 // Manage the circular CE buffer indexing
3592 buf[i].ce = ucol_previousProcessed(ceIter, &buf[i].lowIndex, &buf[i].highIndex, &status);
3819 printf(" %8x", strsrch->pattern.CE[ii]);
3831 strsrch->pattern.CE == NULL) {
3857 // target CE space.
3861 // 2. An int64_t CE weight is determined for each resulting unit (high 16 bits are primary strength, next
3864 // CE weight 0 (as for a combining diacritic with secondary weight when the collator strentgh is primary),
3865 // then the CE is deleted, so the following code sees only CEs that are relevant.
3866 // For each CE, the lowIndex and highIndex correspond to where this CE begins and ends in the original text.
3867 // If lowIndex==highIndex, either the CE resulted from an expansion/decomposition of one of the original text
3868 // characters, or the CE marks the limit of the target text (in which case the CE weight is UCOL_PROCESSED_NULLORDER).
3877 // For targetIx > 0, this ceb.get gets a CE that is as far back in the ring buffer
3878 // (compared to the last CE fetched for the previous targetIx value) as we need to go
3890 // Compare CE from target string with CE
3891 // Note that the target CE will be UCOL_PROCESSED_NULLORDER if we reach the end of input,
3893 UCompareCEsResult ceMatch = compareCE64s(targetCEI->ce, patCE, strsrch->search->elementComparisonType);
3908 targetIxOffset += strsrch->pattern.PCELength; // this is now the offset in target CE space to end of the match so far
3910 if (!found && ((targetCEI == NULL) || (targetCEI->ce != UCOL_PROCESSED_NULLORDER))) {
3921 // We have found a match in CE space.
3923 // There still is a chance of match failure if the CE range not correspond to
3931 // Look at the CE following the match. If it is UCOL_NULLORDER the match
3934 // Look at the high and low indices of the CE following the match. If
3936 // 1. The match extended to the last CE from the target text, which is OK, or
3937 // 2. The last CE that was part of the match is in an expansion that extends
3938 // to the first CE after the match. In this case, we reject the match.
3943 if (nextCEI->lowIndex == nextCEI->highIndex && nextCEI->ce != UCOL_PROCESSED_NULLORDER) {
3951 if ( nextCEI->ce == UCOL_PROCESSED_NULLORDER ) {
3954 // As long as the next CE has primary weight of 0,
3957 if ( (((nextCEI->ce) >> 32) & 0xFFFF0000UL) == 0 ) {
3958 UCompareCEsResult ceMatch = compareCE64s(nextCEI->ce, patCE, strsrch->search->elementComparisonType);
3963 // If lowIndex == highIndex, this target CE is part of an expansion of the last matched
3968 // Else the target CE is not part of an expansion of the last matched element, match succeeds
3988 // With exapnsions, the first CE will report the index of the source
4000 // When the last CE's low index is same with its high index, the CE is likely
4005 // the position and the next character produces CE(s). See ticket#8482.
4023 // advanced us beyond the end of the match in CE space, reject this match.
4046 printf("%8x@%d ", ceb.get(ii)->ce, ceb.get(ii)->srcIndex);
4086 printf(" %8x", strsrch->pattern.CE[ii]);
4098 strsrch->pattern.CE == NULL) {
4111 * Pre-load the buffer with the CE's for the grapheme
4113 * we can look at the CE following the match when we
4116 * This will also pre-fetch the first CE that we'll
4148 // target CE space.
4156 // For targetIx > limitIx, this ceb.getPrevious gets a CE that is as far back in the ring buffer
4157 // (compared to the last CE fetched for the previous targetIx value) as we need to go
4172 // Compare CE from target string with CE from the pattern.
4173 // Note that the target CE will be UCOL_NULLORDER if we reach the end of input,
4175 UCompareCEsResult ceMatch = compareCE64s(targetCEI->ce, patCE, strsrch->search->elementComparisonType);
4191 if (!found && ((targetCEI == NULL) || (targetCEI->ce != UCOL_PROCESSED_NULLORDER))) {
4202 // We have found a match in CE space.
4204 // There still is a chance of match failure if the CE range not correspond to
4220 // Look at the high index of the first CE in the match. If it's the same as the
4221 // low index, the first CE in the match is in the middle of an expansion.
4230 // Look at the CE following the match. If it is UCOL_NULLORDER the match
4233 // Look at the high and low indices of the CE following the match. If
4235 // 1. The match extended to the last CE from the target text, which is OK, or
4236 // 2. The last CE that was part of the match is in an expansion that extends
4237 // to the first CE after the match. In this case, we reject the match.
4240 if (nextCEI->lowIndex == nextCEI->highIndex && nextCEI->ce != UCOL_PROCESSED_NULLORDER) {
4257 // advanced us beyond the end of the match in CE space, reject this match.
4270 // the last non-ignorable CE. Combining sequence
4297 printf("%8x@%d ", ceb.get(ii)->ce, ceb.get(ii)->srcIndex);
4333 int32_t *patternce = strsrch->pattern.CE;
4352 // finding the last pattern ce match, imagine composite characters
4371 // the first ce can be a contraction
4447 int32_t *patternce = strsrch->pattern.CE;
4468 // finding the last pattern ce match, imagine composite characters
4482 // the first ce can be a contraction
4561 int32_t *patternce = strsrch->pattern.CE;
4586 // finding the first pattern ce match, imagine composite
4703 int32_t *patternce = strsrch->pattern.CE;
4730 // finding the first pattern ce match, imagine composite
4746 // the first ce can be a contraction