Home | History | Annotate | Download | only in i18n

Lines Matching refs:pos

154                                          ParsePosition& pos, int32_t limit) const;
207 ParsePosition& pos, int32_t limit) const {
208 int32_t start = pos.getIndex();
221 pos.setIndex(i);
303 int32_t parse(const UnicodeString& rule, int32_t pos, int32_t limit, UErrorCode& status);
305 int32_t parseSection(const UnicodeString& rule, int32_t pos, int32_t limit,
362 int32_t RuleHalf::parse(const UnicodeString& rule, int32_t pos, int32_t limit, UErrorCode& status) {
363 int32_t start = pos;
365 pos = parseSection(rule, pos, limit, text, UnicodeString(TRUE, ILLEGAL_TOP, -1), FALSE, status);
371 return pos;
387 * pos on entry points right after it. Accumulate everything
397 int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t limit,
401 int32_t start = pos;
411 while (pos < limit && !done) {
414 UChar c = rule.charAt(pos++);
432 if (UnicodeSet::resemblesPattern(rule, pos-1)) {
433 pp.setIndex(pos-1); // Backup to opening '['
438 pos = pp.getIndex();
443 if (pos == limit) {
446 UChar32 escaped = rule.unescapeAt(pos); // pos is already past '\\'
458 int32_t iq = rule.indexOf(QUOTE, pos);
459 if (iq == pos) {
461 ++pos;
475 rule.extractBetween(pos, iq, scratch);
477 pos = iq+1;
478 if (pos < limit && rule.charAt(pos) == QUOTE) {
480 iq = rule.indexOf(QUOTE, pos+1);
530 pos = parseSection(rule, pos, limit, buf, UnicodeString(TRUE, ILLEGAL_SEG, -1), TRUE, status);
552 int32_t iref = pos;
572 pos = parseSection(rule, iref, limit, buf, UnicodeString(TRUE, ILLEGAL_FUNC, -1), TRUE, status);
596 if (pos == limit) {
603 c = rule.charAt(pos);
606 r = ICU_Utility::parseNumber(rule, pos, 10);
613 pp.setIndex(pos);
625 pos = pp.getIndex();
771 return pos;
925 int32_t pos = 0;
936 while (pos < limit && U_SUCCESS(status)) {
937 UChar c = rule.charAt(pos++);
944 pos = rule.indexOf((UChar)0x000A /*\n*/, pos) + 1;
945 if (pos == 0) {
959 // character, and pos points past c.
960 --pos;
963 if ((pos + ID_TOKEN_LEN + 1) <= limit &&
964 rule.compare(pos, ID_TOKEN_LEN, ID_TOKEN) == 0) {
965 pos += ID_TOKEN_LEN;
966 c = rule.charAt(pos);
967 while (PatternProps::isWhiteSpace(c) && pos < limit) {
968 ++pos;
969 c = rule.charAt(pos);
972 int32_t p = pos;
987 if (p != pos && ICU_Utility::parseChar(rule, p, END_OF_RULE)) {
1007 syntaxError(U_MULTIPLE_COMPOUND_FILTERS, rule, pos, status);
1019 syntaxError(U_INVALID_ID, rule, pos, status);
1023 pos = p;
1053 if (resemblesPragma(rule, pos, limit)) {
1054 int32_t ppp = parsePragma(rule, pos, limit, status);
1056 syntaxError(U_MALFORMED_PRAGMA, rule, pos, status);
1058 pos = ppp;
1061 pos = parseRule(rule, pos, limit, status);
1109 int32_t pos = -1;
1110 const UHashElement* he = variableNames.nextElement(pos);
1119 he = variableNames.nextElement(pos);
1195 * @param pos offset to the first non-whitespace character
1199 UBool TransliteratorParser::resemblesPragma(const UnicodeString& rule, int32_t pos, int32_t limit) {
1201 return ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(TRUE, PRAGMA_USE, 4), NULL) >= 0;
1207 * @param pos offset to the first non-whitespace character
1213 int32_t TransliteratorParser::parsePragma(const UnicodeString& rule, int32_t pos, int32_t limit, UErrorCode& status) {
1217 // know that pos points to /use\s/i; we can skip 4 characters
1219 pos += 4;
1226 int p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(TRUE, PRAGMA_VARIABLE_RANGE, -1), array);
1232 p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(TRUE, PRAGMA_MAXIMUM_BACKUP, -1), array);
1238 p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(TRUE, PRAGMA_NFD_RULES, -1), NULL);
1244 p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(TRUE, PRAGMA_NFC_RULES, -1), NULL);
1256 * at pos. Return the index after the last character parsed. Do not
1259 * Important: The character at pos must be a non-whitespace character
1264 * indicators. Once it does a lexical breakdown of the rule at pos, it
1267 int32_t TransliteratorParser::parseRule(const UnicodeString& rule, int32_t pos, int32_t limit, UErrorCode& status) {
1269 int32_t start = pos;
1283 pos = left->parse(rule, pos, limit, status);
1288 if (pos == limit || u_strchr(gOPERATORS, (op = rule.charAt(--pos))) == NULL) {
1291 ++pos;
1295 (pos < limit && rule.charAt(pos) == FORWARD_RULE_OP)) {
1296 ++pos;
1313 pos = right->parse(rule, pos, limit, status);
1318 if (pos < limit) {
1319 if (rule.charAt(--pos) == END_OF_RULE) {
1320 ++pos;
1355 return pos;
1385 return pos;
1459 return pos;
1473 int32_t pos,
1476 parseError.offset = pos;
1481 int32_t start = uprv_max(pos - LEN, 0);
1482 int32_t stop = pos;
1489 start = pos;
1490 stop = uprv_min(pos + LEN, rule.length());
1497 return pos;
1506 ParsePosition& pos,
1508 UnicodeSet* set = new UnicodeSet(rule, pos, USET_IGNORE_SPACE, parseData, status);