• Home
  • Raw
  • Download

Lines Matching refs:CurPtr

152 static const char *isLabelTail(const char *CurPtr) {  in isLabelTail()  argument
154 if (CurPtr[0] == ':') return CurPtr+1; in isLabelTail()
155 if (!isLabelChar(CurPtr[0])) return nullptr; in isLabelTail()
156 ++CurPtr; in isLabelTail()
169 CurPtr = CurBuf.begin(); in LLLexer()
173 char CurChar = *CurPtr++; in getNextChar()
179 if (CurPtr-1 != CurBuf.end()) in getNextChar()
183 --CurPtr; // Another call to lex will return EOF again. in getNextChar()
190 TokStart = CurPtr; in LexToken()
214 if (const char *Ptr = isLabelTail(CurPtr)) { in LexToken()
215 CurPtr = Ptr; in LexToken()
216 StrVal.assign(TokStart, CurPtr-1); in LexToken()
219 if (CurPtr[0] == '.' && CurPtr[1] == '.') { in LexToken()
220 CurPtr += 2; in LexToken()
250 if (CurPtr[0] == '\n' || CurPtr[0] == '\r' || getNextChar() == EOF) in SkipLineComment()
265 CurPtr = Ptr; in LexDollar()
266 StrVal.assign(TokStart, CurPtr - 1); in LexDollar()
271 if (CurPtr[0] == '"') { in LexDollar()
272 ++CurPtr; in LexDollar()
282 StrVal.assign(TokStart + 2, CurPtr - 1); in LexDollar()
302 const char *Start = CurPtr; in ReadString()
311 StrVal.assign(Start, CurPtr-1); in ReadString()
320 const char *NameStart = CurPtr; in ReadVarName()
321 if (isalpha(static_cast<unsigned char>(CurPtr[0])) || in ReadVarName()
322 CurPtr[0] == '-' || CurPtr[0] == '$' || in ReadVarName()
323 CurPtr[0] == '.' || CurPtr[0] == '_') { in ReadVarName()
324 ++CurPtr; in ReadVarName()
325 while (isalnum(static_cast<unsigned char>(CurPtr[0])) || in ReadVarName()
326 CurPtr[0] == '-' || CurPtr[0] == '$' || in ReadVarName()
327 CurPtr[0] == '.' || CurPtr[0] == '_') in ReadVarName()
328 ++CurPtr; in ReadVarName()
330 StrVal.assign(NameStart, CurPtr); in ReadVarName()
338 if (CurPtr[0] == '"') { in LexVar()
339 ++CurPtr; in LexVar()
349 StrVal.assign(TokStart+2, CurPtr-1); in LexVar()
365 if (isdigit(static_cast<unsigned char>(CurPtr[0]))) { in LexVar()
366 for (++CurPtr; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr) in LexVar()
369 uint64_t Val = atoull(TokStart+1, CurPtr); in LexVar()
394 if (CurPtr[0] == ':') { in LexQuote()
395 ++CurPtr; in LexQuote()
412 if (isalpha(static_cast<unsigned char>(CurPtr[0])) || in LexExclaim()
413 CurPtr[0] == '-' || CurPtr[0] == '$' || in LexExclaim()
414 CurPtr[0] == '.' || CurPtr[0] == '_' || CurPtr[0] == '\\') { in LexExclaim()
415 ++CurPtr; in LexExclaim()
416 while (isalnum(static_cast<unsigned char>(CurPtr[0])) || in LexExclaim()
417 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()
432 if (isdigit(static_cast<unsigned char>(CurPtr[0]))) { in LexHash()
433 for (++CurPtr; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr) in LexHash()
436 uint64_t Val = atoull(TokStart+1, CurPtr); in LexHash()
452 const char *StartChar = CurPtr; in LexIdentifier()
453 const char *IntEnd = CurPtr[-1] == 'i' ? nullptr : StartChar; in LexIdentifier()
456 for (; isLabelChar(*CurPtr); ++CurPtr) { in LexIdentifier()
458 if (!IntEnd && !isdigit(static_cast<unsigned char>(*CurPtr))) in LexIdentifier()
459 IntEnd = CurPtr; in LexIdentifier()
460 if (!KeywordEnd && !isalnum(static_cast<unsigned char>(*CurPtr)) && in LexIdentifier()
461 *CurPtr != '_') in LexIdentifier()
462 KeywordEnd = CurPtr; in LexIdentifier()
466 if (*CurPtr == ':') { in LexIdentifier()
467 StrVal.assign(StartChar-1, CurPtr++); in LexIdentifier()
473 if (!IntEnd) IntEnd = CurPtr; in LexIdentifier()
475 CurPtr = IntEnd; in LexIdentifier()
476 uint64_t NumBits = atoull(StartChar, CurPtr); in LexIdentifier()
487 if (!KeywordEnd) KeywordEnd = CurPtr; in LexIdentifier()
488 CurPtr = KeywordEnd; in LexIdentifier()
490 StringRef Keyword(StartChar, CurPtr - StartChar); in LexIdentifier()
817 int len = CurPtr-TokStart-3; in LexIdentifier()
822 CurPtr = TokStart+3; in LexIdentifier()
835 CurPtr = TokStart+2; in LexIdentifier()
840 CurPtr = TokStart+1; in LexIdentifier()
852 CurPtr = TokStart + 2; in Lex0x()
855 if ((CurPtr[0] >= 'K' && CurPtr[0] <= 'M') || CurPtr[0] == 'H') { in Lex0x()
856 Kind = *CurPtr++; in Lex0x()
861 if (!isxdigit(static_cast<unsigned char>(CurPtr[0]))) { in Lex0x()
863 CurPtr = TokStart+1; in Lex0x()
867 while (isxdigit(static_cast<unsigned char>(CurPtr[0]))) in Lex0x()
868 ++CurPtr; in Lex0x()
874 APFloatVal = APFloat(BitsToDouble(HexIntToVal(TokStart+2, CurPtr))); in Lex0x()
883 FP80HexToIntPair(TokStart+3, CurPtr, Pair); in Lex0x()
888 HexToIntPair(TokStart+3, CurPtr, Pair); in Lex0x()
893 HexToIntPair(TokStart+3, CurPtr, Pair); in Lex0x()
898 APInt(16,HexIntToVal(TokStart+3, CurPtr))); in Lex0x()
915 !isdigit(static_cast<unsigned char>(CurPtr[0]))) { in LexDigitOrNegative()
917 if (const char *End = isLabelTail(CurPtr)) { in LexDigitOrNegative()
919 CurPtr = End; in LexDigitOrNegative()
929 for (; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr) in LexDigitOrNegative()
933 if (isLabelChar(CurPtr[0]) || CurPtr[0] == ':') { in LexDigitOrNegative()
934 if (const char *End = isLabelTail(CurPtr)) { in LexDigitOrNegative()
936 CurPtr = End; in LexDigitOrNegative()
943 if (CurPtr[0] != '.') { in LexDigitOrNegative()
946 APSIntVal = APSInt(StringRef(TokStart, CurPtr - TokStart)); in LexDigitOrNegative()
950 ++CurPtr; in LexDigitOrNegative()
953 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr; in LexDigitOrNegative()
955 if (CurPtr[0] == 'e' || CurPtr[0] == 'E') { in LexDigitOrNegative()
956 if (isdigit(static_cast<unsigned char>(CurPtr[1])) || in LexDigitOrNegative()
957 ((CurPtr[1] == '-' || CurPtr[1] == '+') && in LexDigitOrNegative()
958 isdigit(static_cast<unsigned char>(CurPtr[2])))) { in LexDigitOrNegative()
959 CurPtr += 2; in LexDigitOrNegative()
960 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr; in LexDigitOrNegative()
965 StringRef(TokStart, CurPtr - TokStart)); in LexDigitOrNegative()
974 if (!isdigit(static_cast<unsigned char>(CurPtr[0]))) in LexPositive()
978 for (++CurPtr; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr) in LexPositive()
982 if (CurPtr[0] != '.') { in LexPositive()
983 CurPtr = TokStart+1; in LexPositive()
987 ++CurPtr; in LexPositive()
990 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr; in LexPositive()
992 if (CurPtr[0] == 'e' || CurPtr[0] == 'E') { in LexPositive()
993 if (isdigit(static_cast<unsigned char>(CurPtr[1])) || in LexPositive()
994 ((CurPtr[1] == '-' || CurPtr[1] == '+') && in LexPositive()
995 isdigit(static_cast<unsigned char>(CurPtr[2])))) { in LexPositive()
996 CurPtr += 2; in LexPositive()
997 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr; in LexPositive()
1002 StringRef(TokStart, CurPtr - TokStart)); in LexPositive()