Home | History | Annotate | Download | only in i18n

Lines Matching refs:pos

150                                          ParsePosition& pos, int32_t limit) const;
201 ParsePosition& pos, int32_t limit) const {
202 int32_t start = pos.getIndex();
215 pos.setIndex(i);
297 int32_t parse(const UnicodeString& rule, int32_t pos, int32_t limit, UErrorCode& status);
299 int32_t parseSection(const UnicodeString& rule, int32_t pos, int32_t limit,
356 int32_t RuleHalf::parse(const UnicodeString& rule, int32_t pos, int32_t limit, UErrorCode& status) {
357 int32_t start = pos;
359 pos = parseSection(rule, pos, limit, text, ILLEGAL_TOP, FALSE, status);
365 return pos;
381 * pos on entry points right after it. Accumulate everything
391 int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t limit,
395 int32_t start = pos;
405 while (pos < limit && !done) {
408 UChar c = rule.charAt(pos++);
426 if (UnicodeSet::resemblesPattern(rule, pos-1)) {
427 pp.setIndex(pos-1); // Backup to opening '['
432 pos = pp.getIndex();
437 if (pos == limit) {
440 UChar32 escaped = rule.unescapeAt(pos); // pos is already past '\\'
452 int32_t iq = rule.indexOf(QUOTE, pos);
453 if (iq == pos) {
455 ++pos;
469 pos, iq, scratch);
471 pos = iq+1;
472 if (pos < limit && rule.charAt(pos) == QUOTE) {
474 iq = rule.indexOf(QUOTE, pos+1);
524 pos = parseSection(rule, pos, limit, buf, ILLEGAL_SEG, TRUE, status);
546 int32_t iref = pos;
566 pos = parseSection(rule, iref, limit, buf, ILLEGAL_FUNC, TRUE, status);
590 if (pos == limit) {
597 c = rule.charAt(pos);
600 r = ICU_Utility::parseNumber(rule, pos, 10);
607 pp.setIndex(pos);
619 pos = pp.getIndex();
765 return pos;
919 int32_t pos = 0;
930 while (pos < limit && U_SUCCESS(status)) {
931 UChar c = rule.charAt(pos++);
938 pos = rule.indexOf((UChar)0x000A /*\n*/, pos) + 1;
939 if (pos == 0) {
953 // character, and pos points past c.
954 --pos;
957 if ((pos + ID_TOKEN_LEN + 1) <= limit &&
958 rule.compare(pos, ID_TOKEN_LEN, ID_TOKEN) == 0) {
959 pos += ID_TOKEN_LEN;
960 c = rule.charAt(pos);
961 while (uprv_isRuleWhiteSpace(c) && pos < limit) {
962 ++pos;
963 c = rule.charAt(pos);
966 int32_t p = pos;
981 if (p != pos && ICU_Utility::parseChar(rule, p, END_OF_RULE)) {
1001 syntaxError(U_MULTIPLE_COMPOUND_FILTERS, rule, pos, status);
1013 syntaxError(U_INVALID_ID, rule, pos, status);
1017 pos = p;
1047 if (resemblesPragma(rule, pos, limit)) {
1048 int32_t ppp = parsePragma(rule, pos, limit, status);
1050 syntaxError(U_MALFORMED_PRAGMA, rule, pos, status);
1052 pos = ppp;
1055 pos = parseRule(rule, pos, limit, status);
1103 int32_t pos = -1;
1104 const UHashElement* he = variableNames.nextElement(pos);
1113 he = variableNames.nextElement(pos);
1189 * @param pos offset to the first non-whitespace character
1193 UBool TransliteratorParser::resemblesPragma(const UnicodeString& rule, int32_t pos, int32_t limit) {
1195 return ICU_Utility::parsePattern(rule, pos, limit, PRAGMA_USE, NULL) >= 0;
1201 * @param pos offset to the first non-whitespace character
1207 int32_t TransliteratorParser::parsePragma(const UnicodeString& rule, int32_t pos, int32_t limit, UErrorCode& status) {
1211 // know that pos points to /use\s/i; we can skip 4 characters
1213 pos += 4;
1220 int p = ICU_Utility::parsePattern(rule, pos, limit, PRAGMA_VARIABLE_RANGE, array);
1226 p = ICU_Utility::parsePattern(rule, pos, limit, PRAGMA_MAXIMUM_BACKUP, array);
1232 p = ICU_Utility::parsePattern(rule, pos, limit, PRAGMA_NFD_RULES, NULL);
1238 p = ICU_Utility::parsePattern(rule, pos, limit, PRAGMA_NFC_RULES, NULL);
1250 * at pos. Return the index after the last character parsed. Do not
1253 * Important: The character at pos must be a non-whitespace character
1258 * indicators. Once it does a lexical breakdown of the rule at pos, it
1261 int32_t TransliteratorParser::parseRule(const UnicodeString& rule, int32_t pos, int32_t limit, UErrorCode& status) {
1263 int32_t start = pos;
1277 pos = left->parse(rule, pos, limit, status);
1282 if (pos == limit || u_strchr(gOPERATORS, (op = rule.charAt(--pos))) == NULL) {
1285 ++pos;
1289 (pos < limit && rule.charAt(pos) == FORWARD_RULE_OP)) {
1290 ++pos;
1307 pos = right->parse(rule, pos, limit, status);
1312 if (pos < limit) {
1313 if (rule.charAt(--pos) == END_OF_RULE) {
1314 ++pos;
1349 return pos;
1379 return pos;
1453 return pos;
1467 int32_t pos,
1470 parseError.offset = pos;
1475 int32_t start = uprv_max(pos - LEN, 0);
1476 int32_t stop = pos;
1483 start = pos;
1484 stop = uprv_min(pos + LEN, rule.length());
1491 return pos;
1500 ParsePosition& pos,
1502 UnicodeSet* set = new UnicodeSet(rule, pos, USET_IGNORE_SPACE, parseData, status);