Lines Matching refs:CurPtr

174 static const char *isLabelTail(const char *CurPtr) {  in isLabelTail()  argument
176 if (CurPtr[0] == ':') return CurPtr+1; in isLabelTail()
177 if (!isLabelChar(CurPtr[0])) return 0; in isLabelTail()
178 ++CurPtr; in isLabelTail()
191 CurPtr = CurBuf->getBufferStart(); in LLLexer()
199 char CurChar = *CurPtr++; in getNextChar()
205 if (CurPtr-1 != CurBuf->getBufferEnd()) in getNextChar()
209 --CurPtr; // Another call to lex will return EOF again. in getNextChar()
216 TokStart = CurPtr; in LexToken()
239 if (const char *Ptr = isLabelTail(CurPtr)) { in LexToken()
240 CurPtr = Ptr; in LexToken()
241 StrVal.assign(TokStart, CurPtr-1); in LexToken()
244 if (CurPtr[0] == '.' && CurPtr[1] == '.') { in LexToken()
245 CurPtr += 2; in LexToken()
250 if (const char *Ptr = isLabelTail(CurPtr)) { in LexToken()
251 CurPtr = Ptr; in LexToken()
252 StrVal.assign(TokStart, CurPtr-1); in LexToken()
281 if (CurPtr[0] == '\n' || CurPtr[0] == '\r' || getNextChar() == EOF) in SkipLineComment()
292 if (CurPtr[0] == '"') { in LexAt()
293 ++CurPtr; in LexAt()
303 StrVal.assign(TokStart+2, CurPtr-1); in LexAt()
315 if (isdigit(CurPtr[0])) { in LexAt()
316 for (++CurPtr; isdigit(CurPtr[0]); ++CurPtr) in LexAt()
319 uint64_t Val = atoull(TokStart+1, CurPtr); in LexAt()
331 const char *Start = CurPtr; in ReadString()
340 StrVal.assign(Start, CurPtr-1); in ReadString()
349 const char *NameStart = CurPtr; in ReadVarName()
350 if (isalpha(CurPtr[0]) || CurPtr[0] == '-' || CurPtr[0] == '$' || in ReadVarName()
351 CurPtr[0] == '.' || CurPtr[0] == '_') { in ReadVarName()
352 ++CurPtr; in ReadVarName()
353 while (isalnum(CurPtr[0]) || CurPtr[0] == '-' || CurPtr[0] == '$' || in ReadVarName()
354 CurPtr[0] == '.' || CurPtr[0] == '_') in ReadVarName()
355 ++CurPtr; in ReadVarName()
357 StrVal.assign(NameStart, CurPtr); in ReadVarName()
369 if (CurPtr[0] == '"') { in LexPercent()
370 ++CurPtr; in LexPercent()
379 if (isdigit(CurPtr[0])) { in LexPercent()
380 for (++CurPtr; isdigit(CurPtr[0]); ++CurPtr) in LexPercent()
383 uint64_t Val = atoull(TokStart+1, CurPtr); in LexPercent()
401 if (CurPtr[0] == ':') { in LexQuote()
402 ++CurPtr; in LexQuote()
414 if (isalpha(CurPtr[0]) || CurPtr[0] == '-' || CurPtr[0] == '$' || in LexExclaim()
415 CurPtr[0] == '.' || CurPtr[0] == '_' || CurPtr[0] == '\\') { in LexExclaim()
416 ++CurPtr; in LexExclaim()
417 while (isalnum(CurPtr[0]) || CurPtr[0] == '-' || CurPtr[0] == '$' || in LexExclaim()
418 CurPtr[0] == '.' || CurPtr[0] == '_' || CurPtr[0] == '\\') in LexExclaim()
419 ++CurPtr; in LexExclaim()
421 StrVal.assign(TokStart+1, CurPtr); // Skip ! in LexExclaim()
434 const char *StartChar = CurPtr; in LexIdentifier()
435 const char *IntEnd = CurPtr[-1] == 'i' ? 0 : StartChar; in LexIdentifier()
438 for (; isLabelChar(*CurPtr); ++CurPtr) { in LexIdentifier()
440 if (!IntEnd && !isdigit(*CurPtr)) IntEnd = CurPtr; in LexIdentifier()
441 if (!KeywordEnd && !isalnum(*CurPtr) && *CurPtr != '_') KeywordEnd = CurPtr; in LexIdentifier()
445 if (*CurPtr == ':') { in LexIdentifier()
446 StrVal.assign(StartChar-1, CurPtr++); in LexIdentifier()
452 if (IntEnd == 0) IntEnd = CurPtr; in LexIdentifier()
454 CurPtr = IntEnd; in LexIdentifier()
455 uint64_t NumBits = atoull(StartChar, CurPtr); in LexIdentifier()
466 if (KeywordEnd == 0) KeywordEnd = CurPtr; in LexIdentifier()
467 CurPtr = KeywordEnd; in LexIdentifier()
469 unsigned Len = CurPtr-StartChar; in LexIdentifier()
668 int len = CurPtr-TokStart-3; in LexIdentifier()
680 CurPtr = TokStart+2; in LexIdentifier()
685 CurPtr = TokStart+1; in LexIdentifier()
697 CurPtr = TokStart + 2; in Lex0x()
700 if (CurPtr[0] >= 'K' && CurPtr[0] <= 'M') { in Lex0x()
701 Kind = *CurPtr++; in Lex0x()
706 if (!isxdigit(CurPtr[0])) { in Lex0x()
708 CurPtr = TokStart+1; in Lex0x()
712 while (isxdigit(CurPtr[0])) in Lex0x()
713 ++CurPtr; in Lex0x()
719 APFloatVal = APFloat(BitsToDouble(HexIntToVal(TokStart+2, CurPtr))); in Lex0x()
728 FP80HexToIntPair(TokStart+3, CurPtr, Pair); in Lex0x()
733 HexToIntPair(TokStart+3, CurPtr, Pair); in Lex0x()
738 HexToIntPair(TokStart+3, CurPtr, Pair); in Lex0x()
755 if (!isdigit(TokStart[0]) && !isdigit(CurPtr[0])) { in LexDigitOrNegative()
757 if (const char *End = isLabelTail(CurPtr)) { in LexDigitOrNegative()
759 CurPtr = End; in LexDigitOrNegative()
769 for (; isdigit(CurPtr[0]); ++CurPtr) in LexDigitOrNegative()
773 if (isLabelChar(CurPtr[0]) || CurPtr[0] == ':') { in LexDigitOrNegative()
774 if (const char *End = isLabelTail(CurPtr)) { in LexDigitOrNegative()
776 CurPtr = End; in LexDigitOrNegative()
783 if (CurPtr[0] != '.') { in LexDigitOrNegative()
786 unsigned Len = CurPtr-TokStart; in LexDigitOrNegative()
803 ++CurPtr; in LexDigitOrNegative()
806 while (isdigit(CurPtr[0])) ++CurPtr; in LexDigitOrNegative()
808 if (CurPtr[0] == 'e' || CurPtr[0] == 'E') { in LexDigitOrNegative()
809 if (isdigit(CurPtr[1]) || in LexDigitOrNegative()
810 ((CurPtr[1] == '-' || CurPtr[1] == '+') && isdigit(CurPtr[2]))) { in LexDigitOrNegative()
811 CurPtr += 2; in LexDigitOrNegative()
812 while (isdigit(CurPtr[0])) ++CurPtr; in LexDigitOrNegative()
824 if (!isdigit(CurPtr[0])) in LexPositive()
828 for (++CurPtr; isdigit(CurPtr[0]); ++CurPtr) in LexPositive()
832 if (CurPtr[0] != '.') { in LexPositive()
833 CurPtr = TokStart+1; in LexPositive()
837 ++CurPtr; in LexPositive()
840 while (isdigit(CurPtr[0])) ++CurPtr; in LexPositive()
842 if (CurPtr[0] == 'e' || CurPtr[0] == 'E') { in LexPositive()
843 if (isdigit(CurPtr[1]) || in LexPositive()
844 ((CurPtr[1] == '-' || CurPtr[1] == '+') && isdigit(CurPtr[2]))) { in LexPositive()
845 CurPtr += 2; in LexPositive()
846 while (isdigit(CurPtr[0])) ++CurPtr; in LexPositive()