Lines Matching defs:Start
627 /// PluralNumber - Parse an unsigned integer and advance Start.
628 static unsigned PluralNumber(const char *&Start, const char *End) {
631 while (Start != End && *Start >= '0' && *Start <= '9') {
633 Val += *Start - '0';
634 ++Start;
639 /// TestPluralRange - Test if Val is in the parsed range. Modifies Start.
640 static bool TestPluralRange(unsigned Val, const char *&Start, const char *End) {
641 if (*Start != '[') {
642 unsigned Ref = PluralNumber(Start, End);
646 ++Start;
647 unsigned Low = PluralNumber(Start, End);
648 assert(*Start == ',' && "Bad plural expression syntax: expected ,");
649 ++Start;
650 unsigned High = PluralNumber(Start, End);
651 assert(*Start == ']' && "Bad plural expression syntax: expected )");
652 ++Start;
657 static bool EvalPluralExpr(unsigned ValNo, const char *Start, const char *End) {
659 if (*Start == ':')
663 char C = *Start;
666 ++Start;
667 unsigned Arg = PluralNumber(Start, End);
668 assert(*Start == '=' && "Bad plural expression syntax: expected =");
669 ++Start;
671 if (TestPluralRange(ValMod, Start, End))
677 if (TestPluralRange(ValNo, Start, End))
682 Start = std::find(Start, End, ',');
683 if (Start == End)
685 ++Start;