Lines Matching refs:index
352 modified.insert(part.index, (UChar)part.value); in autoQuoteApostropheDeep()
395 index==other.index && in operator ==()
432 MessagePattern::parseMessage(int32_t index, int32_t msgStartLength, in parseMessage() argument
443 addPart(UMSGPAT_PART_TYPE_MSG_START, index, msgStartLength, nestingLevel, errorCode); in parseMessage()
444 index+=msgStartLength; in parseMessage()
449 if(index>=msg.length()) { in parseMessage()
452 UChar c=msg.charAt(index++); in parseMessage()
454 if(index==msg.length()) { in parseMessage()
457 addPart(UMSGPAT_PART_TYPE_INSERT_CHAR, index, 0, in parseMessage()
461 c=msg.charAt(index); in parseMessage()
464 addPart(UMSGPAT_PART_TYPE_SKIP_SYNTAX, index++, 1, 0, errorCode); in parseMessage()
472 addPart(UMSGPAT_PART_TYPE_SKIP_SYNTAX, index-1, 1, 0, errorCode); in parseMessage()
475 index=msg.indexOf(u_apos, index+1); in parseMessage()
476 if(index>=0) { in parseMessage()
477 if(/*(index+1)<msg.length() &&*/ msg.charAt(index+1)==u_apos) { in parseMessage()
480 addPart(UMSGPAT_PART_TYPE_SKIP_SYNTAX, ++index, 1, 0, errorCode); in parseMessage()
483 addPart(UMSGPAT_PART_TYPE_SKIP_SYNTAX, index++, 1, 0, errorCode); in parseMessage()
488 index=msg.length(); in parseMessage()
490 addPart(UMSGPAT_PART_TYPE_INSERT_CHAR, index, 0, in parseMessage()
499 addPart(UMSGPAT_PART_TYPE_INSERT_CHAR, index, 0, in parseMessage()
507 addPart(UMSGPAT_PART_TYPE_REPLACE_NUMBER, index-1, 1, 0, errorCode); in parseMessage()
509 index=parseArg(index-1, 1, nestingLevel, parseError, errorCode); in parseMessage()
516 addLimitPart(msgStart, UMSGPAT_PART_TYPE_MSG_LIMIT, index-1, limitLength, in parseMessage()
520 return index-1; in parseMessage()
523 return index; in parseMessage()
532 addLimitPart(msgStart, UMSGPAT_PART_TYPE_MSG_LIMIT, index, 0, nestingLevel, errorCode); in parseMessage()
533 return index; in parseMessage()
537 MessagePattern::parseArg(int32_t index, int32_t argStartLength, int32_t nestingLevel, in parseArg() argument
541 addPart(UMSGPAT_PART_TYPE_ARG_START, index, argStartLength, argType, errorCode); in parseArg()
545 int32_t nameIndex=index=skipWhiteSpace(index+argStartLength); in parseArg()
546 if(index==msg.length()) { in parseArg()
552 index=skipIdentifier(index); in parseArg()
553 int32_t number=parseArgNumber(nameIndex, index); in parseArg()
555 int32_t length=index-nameIndex; in parseArg()
564 int32_t length=index-nameIndex; in parseArg()
577 index=skipWhiteSpace(index); in parseArg()
578 if(index==msg.length()) { in parseArg()
583 UChar c=msg.charAt(index); in parseArg()
592 int32_t typeIndex=index=skipWhiteSpace(index+1); in parseArg()
593 while(index<msg.length() && isArgTypeChar(msg.charAt(index))) { in parseArg()
594 ++index; in parseArg()
596 int32_t length=index-typeIndex; in parseArg()
597 index=skipWhiteSpace(index); in parseArg()
598 if(index==msg.length()) { in parseArg()
603 if(length==0 || ((c=msg.charAt(index))!=u_comma && c!=u_rightCurlyBrace)) { in parseArg()
641 ++index; in parseArg()
643 index=parseSimpleStyle(index, parseError, errorCode); in parseArg()
645 index=parseChoiceStyle(index, nestingLevel, parseError, errorCode); in parseArg()
647 index=parsePluralOrSelectStyle(argType, index, nestingLevel, parseError, errorCode); in parseArg()
652 addLimitPart(argStart, UMSGPAT_PART_TYPE_ARG_LIMIT, index, 1, argType, errorCode); in parseArg()
653 return index+1; in parseArg()
657 MessagePattern::parseSimpleStyle(int32_t index, UParseError *parseError, UErrorCode &errorCode) { in parseSimpleStyle() argument
661 int32_t start=index; in parseSimpleStyle()
663 while(index<msg.length()) { in parseSimpleStyle()
664 UChar c=msg.charAt(index++); in parseSimpleStyle()
668 index=msg.indexOf(u_apos, index); in parseSimpleStyle()
669 if(index<0) { in parseSimpleStyle()
676 ++index; in parseSimpleStyle()
683 int32_t length=--index-start; in parseSimpleStyle()
690 return index; in parseSimpleStyle()
700 MessagePattern::parseChoiceStyle(int32_t index, int32_t nestingLevel, in parseChoiceStyle() argument
705 int32_t start=index; in parseChoiceStyle()
706 index=skipWhiteSpace(index); in parseChoiceStyle()
707 if(index==msg.length() || msg.charAt(index)==u_rightCurlyBrace) { in parseChoiceStyle()
715 int32_t numberIndex=index; in parseChoiceStyle()
716 index=skipDouble(index); in parseChoiceStyle()
717 int32_t length=index-numberIndex; in parseChoiceStyle()
728 parseDouble(numberIndex, index, TRUE, parseError, errorCode); // adds ARG_INT or ARG_DOUBLE in parseChoiceStyle()
733 index=skipWhiteSpace(index); in parseChoiceStyle()
734 if(index==msg.length()) { in parseChoiceStyle()
739 UChar c=msg.charAt(index); in parseChoiceStyle()
745 addPart(UMSGPAT_PART_TYPE_ARG_SELECTOR, index, 1, 0, errorCode); in parseChoiceStyle()
747 … index=parseMessage(++index, 0, nestingLevel+1, UMSGPAT_ARG_TYPE_CHOICE, parseError, errorCode); in parseChoiceStyle()
752 if(index==msg.length()) { in parseChoiceStyle()
753 return index; in parseChoiceStyle()
755 if(msg.charAt(index)==u_rightCurlyBrace) { in parseChoiceStyle()
761 return index; in parseChoiceStyle()
763 index=skipWhiteSpace(index+1); in parseChoiceStyle()
769 int32_t index, int32_t nestingLevel, in parsePluralOrSelectStyle() argument
774 int32_t start=index; in parsePluralOrSelectStyle()
781 index=skipWhiteSpace(index); in parsePluralOrSelectStyle()
782 UBool eos=index==msg.length(); in parsePluralOrSelectStyle()
783 if(eos || msg.charAt(index)==u_rightCurlyBrace) { in parsePluralOrSelectStyle()
794 return index; in parsePluralOrSelectStyle()
796 int32_t selectorIndex=index; in parsePluralOrSelectStyle()
799 index=skipDouble(index+1); in parsePluralOrSelectStyle()
800 int32_t length=index-selectorIndex; in parsePluralOrSelectStyle()
812 parseDouble(selectorIndex+1, index, FALSE, in parsePluralOrSelectStyle()
815 index=skipIdentifier(index); in parsePluralOrSelectStyle()
816 int32_t length=index-selectorIndex; in parsePluralOrSelectStyle()
823 if( UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE(argType) && length==6 && index<msg.length() && in parsePluralOrSelectStyle()
834 int32_t valueIndex=skipWhiteSpace(index+1); // The ':' is at index. in parsePluralOrSelectStyle()
835 index=skipDouble(valueIndex); in parsePluralOrSelectStyle()
836 if(index==valueIndex) { in parsePluralOrSelectStyle()
841 if((index-valueIndex)>Part::MAX_LENGTH) { in parsePluralOrSelectStyle()
846 parseDouble(valueIndex, index, FALSE, in parsePluralOrSelectStyle()
871 index=skipWhiteSpace(index); in parsePluralOrSelectStyle()
872 if(index==msg.length() || msg.charAt(index)!=u_leftCurlyBrace) { in parsePluralOrSelectStyle()
877 index=parseMessage(index, 1, nestingLevel+1, argType, parseError, errorCode); in parsePluralOrSelectStyle()
941 int32_t index=start; in parseDouble() local
942 UChar c=msg.charAt(index++); in parseDouble()
945 if(index==limit) { in parseDouble()
948 c=msg.charAt(index++); in parseDouble()
950 if(index==limit) { in parseDouble()
953 c=msg.charAt(index++); in parseDouble()
956 if(allowInfinity && index==limit) { in parseDouble()
972 if(index==limit) { in parseDouble()
977 c=msg.charAt(index++); in parseDouble()
1004 MessagePattern::skipWhiteSpace(int32_t index) { in skipWhiteSpace() argument
1007 const UChar *t=PatternProps::skipWhiteSpace(s+index, msgLength-index); in skipWhiteSpace()
1012 MessagePattern::skipIdentifier(int32_t index) { in skipIdentifier() argument
1015 const UChar *t=PatternProps::skipIdentifier(s+index, msgLength-index); in skipIdentifier()
1020 MessagePattern::skipDouble(int32_t index) { in skipDouble() argument
1022 while(index<msgLength) { in skipDouble()
1023 UChar c=msg.charAt(index); in skipDouble()
1028 ++index; in skipDouble()
1030 return index; in skipDouble()
1039 MessagePattern::isChoice(int32_t index) { in isChoice() argument
1042 ((c=msg.charAt(index++))==u_c || c==u_C) && in isChoice()
1043 ((c=msg.charAt(index++))==u_h || c==u_H) && in isChoice()
1044 ((c=msg.charAt(index++))==u_o || c==u_O) && in isChoice()
1045 ((c=msg.charAt(index++))==u_i || c==u_I) && in isChoice()
1046 ((c=msg.charAt(index++))==u_c || c==u_C) && in isChoice()
1047 ((c=msg.charAt(index))==u_e || c==u_E); in isChoice()
1051 MessagePattern::isPlural(int32_t index) { in isPlural() argument
1054 ((c=msg.charAt(index++))==u_p || c==u_P) && in isPlural()
1055 ((c=msg.charAt(index++))==u_l || c==u_L) && in isPlural()
1056 ((c=msg.charAt(index++))==u_u || c==u_U) && in isPlural()
1057 ((c=msg.charAt(index++))==u_r || c==u_R) && in isPlural()
1058 ((c=msg.charAt(index++))==u_a || c==u_A) && in isPlural()
1059 ((c=msg.charAt(index))==u_l || c==u_L); in isPlural()
1063 MessagePattern::isSelect(int32_t index) { in isSelect() argument
1066 ((c=msg.charAt(index++))==u_s || c==u_S) && in isSelect()
1067 ((c=msg.charAt(index++))==u_e || c==u_E) && in isSelect()
1068 ((c=msg.charAt(index++))==u_l || c==u_L) && in isSelect()
1069 ((c=msg.charAt(index++))==u_e || c==u_E) && in isSelect()
1070 ((c=msg.charAt(index++))==u_c || c==u_C) && in isSelect()
1071 ((c=msg.charAt(index))==u_t || c==u_T); in isSelect()
1075 MessagePattern::isOrdinal(int32_t index) { in isOrdinal() argument
1078 ((c=msg.charAt(index++))==u_o || c==u_O) && in isOrdinal()
1079 ((c=msg.charAt(index++))==u_r || c==u_R) && in isOrdinal()
1080 ((c=msg.charAt(index++))==u_d || c==u_D) && in isOrdinal()
1081 ((c=msg.charAt(index++))==u_i || c==u_I) && in isOrdinal()
1082 ((c=msg.charAt(index++))==u_n || c==u_N) && in isOrdinal()
1083 ((c=msg.charAt(index++))==u_a || c==u_A) && in isOrdinal()
1084 ((c=msg.charAt(index))==u_l || c==u_L); in isOrdinal()
1101 MessagePattern::addPart(UMessagePatternPartType type, int32_t index, int32_t length, in addPart() argument
1106 part.index=index; in addPart()
1115 UMessagePatternPartType type, int32_t index, int32_t length, in addLimitPart() argument
1118 addPart(type, index, length, value, errorCode); in addLimitPart()
1147 MessagePattern::setParseError(UParseError *parseError, int32_t index) { in setParseError() argument
1151 parseError->offset=index; in setParseError()
1155 int32_t length=index; in setParseError()
1158 if(length>0 && U16_IS_TRAIL(msg[index-length])) { in setParseError()
1162 msg.extract(index-length, length, parseError->preContext); in setParseError()
1166 length=msg.length()-index; in setParseError()
1169 if(length>0 && U16_IS_LEAD(msg[index+length-1])) { in setParseError()
1173 msg.extract(index, length, parseError->postContext); in setParseError()
1212 int32_t index=part.getIndex(); in appendSubMessageWithoutSkipSyntax() local
1214 return result.append(msgString, prevIndex, index-prevIndex); in appendSubMessageWithoutSkipSyntax()
1216 result.append(msgString, prevIndex, index-prevIndex); in appendSubMessageWithoutSkipSyntax()
1219 result.append(msgString, prevIndex, index-prevIndex); in appendSubMessageWithoutSkipSyntax()
1220 prevIndex=index; in appendSubMessageWithoutSkipSyntax()
1222 index=msgPattern.getPart(i).getLimit(); in appendSubMessageWithoutSkipSyntax()
1223 appendReducedApostrophes(msgString, prevIndex, index, result); in appendSubMessageWithoutSkipSyntax()
1224 prevIndex=index; in appendSubMessageWithoutSkipSyntax()