Home | History | Annotate | Download | only in i18n

Lines Matching refs:id

95  * Parse a single ID, that is, an ID of the general form
98 * @param id the id to be parsed
107 TransliteratorIDParser::parseSingleID(const UnicodeString& id, int32_t& pos,
112 // The ID will be of the form A, A(), A(B), or (B), where
122 specsA = parseFilterID(id, pos, TRUE);
128 if (ICU_Utility::parseChar(id, pos, OPEN_REV)) {
130 if (!ICU_Utility::parseChar(id, pos, CLOSE_REV)) {
131 specsB = parseFilterID(id, pos, TRUE);
133 if (specsB == NULL || !ICU_Utility::parseChar(id, pos, CLOSE_REV)) {
204 * Parse a filter ID, that is, an ID of the general form
206 * @param id the id to be parsed
213 TransliteratorIDParser::parseFilterID(const UnicodeString& id, int32_t& pos) {
217 Specs* specs = parseFilterID(id, pos, TRUE);
235 * @param id the pattern the parse
254 UnicodeSet* TransliteratorIDParser::parseGlobalFilter(const UnicodeString& id, int32_t& pos,
262 withParens = ICU_Utility::parseChar(id, pos, OPEN_REV) ? 1 : 0;
264 if (!ICU_Utility::parseChar(id, pos, OPEN_REV)) {
270 ICU_Utility::skipWhitespace(id, pos, TRUE);
272 if (UnicodeSet::resemblesPattern(id, pos)) {
275 filter = new UnicodeSet(id, ppos, USET_IGNORE_SPACE, NULL, ec);
288 id.extractBetween(pos, ppos.getIndex(), pattern);
291 if (withParens == 1 && !ICU_Utility::parseChar(id, pos, CLOSE_REV)) {
331 * Parse a compound ID, consisting of an optional forward global
337 * @param id the pattern the parse
339 * @param canonID OUTPUT parameter that receives the canonical ID,
347 * a newly created global filter for this ID in this direction, or
350 * id is consumed without syntax error.
352 UBool TransliteratorIDParser::parseCompoundID(const UnicodeString& id, int32_t dir,
367 filter = parseGlobalFilter(id, pos, dir, withParens, &canonID);
369 if (!ICU_Utility::parseChar(id, pos, ID_DELIM)) {
384 SingleID* single = parseSingleID(id, pos, dir, ec);
396 if (!ICU_Utility::parseChar(id, pos, ID_DELIM)) {
406 // Construct canonical ID
419 filter = parseGlobalFilter(id, pos, dir, withParens, &canonID);
422 ICU_Utility::parseChar(id, pos, ID_DELIM);
434 ICU_Utility::skipWhitespace(id, pos, TRUE);
435 if (pos != id.length()) {
535 * Parse an ID into pieces. Take IDs of the form T, T/V, S-T,
538 * @param id the id string, in any of several forms
543 * id is not well-formed. The variant may be empty.
545 void TransliteratorIDParser::IDtoSTV(const UnicodeString& id,
554 int32_t sep = id.indexOf(TARGET_SEP);
555 int32_t var = id.indexOf(VARIANT_SEP);
557 var = id.length();
563 id.extractBetween(0, var, target);
564 id.extractBetween(var, id.length(), variant);
568 id.extractBetween(0, sep, source);
571 id.extractBetween(++sep, var, target);
572 id.extractBetween(var, id.length(), variant);
576 id.extractBetween(0, var, source);
579 id.extractBetween(var, sep++, variant);
580 id.extractBetween(sep, id.length(), target);
590 * full ID. If the source is empty, then "Any" will be used for the
591 * source, so the ID will always be of the form s-t/v or s-t.
596 UnicodeString& id) {
597 id = source;
598 if (id.length() == 0) {
599 id.setTo(ANY, 3);
601 id.append(TARGET_SEP).append(target);
603 id.append(VARIANT_SEP).append(variant);
605 // NUL-terminate the ID string for getTerminatedBuffer.
607 id.append((UChar)0);
608 id.truncate(id.length()-1);
680 * Parse an ID into component pieces. Take IDs of the form T,
683 * @param id the id string, in any of several forms
685 * offset of the first character to parse in id. On output,
692 * neither source nor target was seen in the parsed id, then the
699 TransliteratorIDParser::parseFilterID(const UnicodeString& id, int32_t& pos,
714 ICU_Utility::skipWhitespace(id, pos, TRUE);
715 if (pos == id.length()) {
721 UnicodeSet::resemblesPattern(id, pos)) {
725 UnicodeSet set(id, ppos, USET_IGNORE_SPACE, NULL, ec);
730 id.extractBetween(pos, ppos.getIndex(), filter);
736 UChar c = id.charAt(pos);
752 UnicodeString spec = ICU_Utility::parseUnicodeIdentifier(id, pos);
844 * special inverse of that ID. If there is no special inverse
863 // If the original ID contained "Any-" then make the
892 Transliterator* TransliteratorIDParser::createBasicInstance(const UnicodeString& id, const UnicodeString* canonID) {
893 return Transliterator::createBasicInstance(id, canonID);