• Home
  • Raw
  • Download

Lines Matching refs:CurPtr

50   CurPtr = CurBuf.begin();  in TGLexer()
91 CurPtr = ParentIncludeLoc.getPointer(); in processEOF()
95 TokStart = CurPtr; in processEOF()
107 char CurChar = *CurPtr++; in getNextChar()
114 if (CurPtr-1 != CurBuf.end()) in getNextChar()
118 --CurPtr; // Another call to lex will return EOF again. in getNextChar()
126 if ((*CurPtr == '\n' || (*CurPtr == '\r')) && in getNextChar()
127 *CurPtr != CurChar) in getNextChar()
128 ++CurPtr; // Eat the two char newline sequence. in getNextChar()
134 return *(CurPtr + Index); in peekNextChar()
138 TokStart = CurPtr; in LexToken()
187 ++CurPtr; // Eat second dot. in LexToken()
189 ++CurPtr; // Eat third dot. in LexToken()
211 if (*CurPtr == '/') in LexToken()
213 else if (*CurPtr == '*') { in LexToken()
268 const char *StrStart = CurPtr; in LexString()
272 while (*CurPtr != '"') { in LexString()
274 if (*CurPtr == 0 && CurPtr == CurBuf.end()) in LexString()
277 if (*CurPtr == '\n' || *CurPtr == '\r') in LexString()
280 if (*CurPtr != '\\') { in LexString()
281 CurStrVal += *CurPtr++; in LexString()
285 ++CurPtr; in LexString()
287 switch (*CurPtr) { in LexString()
290 CurStrVal += *CurPtr++; in LexString()
294 ++CurPtr; in LexString()
298 ++CurPtr; in LexString()
303 return ReturnError(CurPtr, "escaped newlines not supported in tblgen"); in LexString()
307 if (CurPtr == CurBuf.end()) in LexString()
311 return ReturnError(CurPtr, "invalid escape in string literal"); in LexString()
315 ++CurPtr; in LexString()
320 if (!isalpha(CurPtr[0]) && CurPtr[0] != '_') in LexVarName()
324 const char *VarNameStart = CurPtr++; in LexVarName()
326 while (isalpha(*CurPtr) || isdigit(*CurPtr) || *CurPtr == '_') in LexVarName()
327 ++CurPtr; in LexVarName()
329 CurStrVal.assign(VarNameStart, CurPtr); in LexVarName()
338 while (isalpha(*CurPtr) || isdigit(*CurPtr) || *CurPtr == '_') in LexIdentifier()
339 ++CurPtr; in LexIdentifier()
342 StringRef Str(IdentStart, CurPtr-IdentStart); in LexIdentifier()
400 CurBuffer = SrcMgr.AddIncludeFile(Filename, SMLoc::getFromPointer(CurPtr), in LexInclude()
410 CurPtr = CurBuf.begin(); in LexInclude()
418 ++CurPtr; // skip the second slash. in SkipBCPLComment()
420 switch (*CurPtr) { in SkipBCPLComment()
426 if (CurPtr == CurBuf.end()) in SkipBCPLComment()
431 ++CurPtr; in SkipBCPLComment()
438 ++CurPtr; // skip the star. in SkipCComment()
449 if (CurPtr[0] != '/') break; in SkipCComment()
451 ++CurPtr; // End the */. in SkipCComment()
457 if (CurPtr[0] != '*') break; in SkipCComment()
458 ++CurPtr; in SkipCComment()
470 if (CurPtr[-1] == '0') { in LexNumber()
471 if (CurPtr[0] == 'x') { in LexNumber()
472 ++CurPtr; in LexNumber()
473 const char *NumStart = CurPtr; in LexNumber()
474 while (isxdigit(CurPtr[0])) in LexNumber()
475 ++CurPtr; in LexNumber()
478 if (CurPtr == NumStart) in LexNumber()
494 } else if (CurPtr[0] == 'b') { in LexNumber()
495 ++CurPtr; in LexNumber()
496 const char *NumStart = CurPtr; in LexNumber()
497 while (CurPtr[0] == '0' || CurPtr[0] == '1') in LexNumber()
498 ++CurPtr; in LexNumber()
501 if (CurPtr == NumStart) in LexNumber()
502 return ReturnError(CurPtr-2, "Invalid binary number"); in LexNumber()
509 if (!isdigit(CurPtr[0])) { in LexNumber()
510 if (CurPtr[-1] == '-') in LexNumber()
512 else if (CurPtr[-1] == '+') in LexNumber()
516 while (isdigit(CurPtr[0])) in LexNumber()
517 ++CurPtr; in LexNumber()
525 if (CurPtr[0] != '{') in LexBracket()
527 ++CurPtr; in LexBracket()
528 const char *CodeStart = CurPtr; in LexBracket()
538 CurStrVal.assign(CodeStart, CurPtr-2); in LexBracket()
548 if (!isalpha(*CurPtr)) in LexExclaim()
549 return ReturnError(CurPtr - 1, "Invalid \"!operator\""); in LexExclaim()
551 const char *Start = CurPtr++; in LexExclaim()
552 while (isalpha(*CurPtr)) in LexExclaim()
553 ++CurPtr; in LexExclaim()
557 StringSwitch<tgtok::TokKind>(StringRef(Start, CurPtr - Start)) in LexExclaim()
628 int NextChar = *CurPtr; in prepIsDirective()
682 TokStart = CurPtr; in prepEatPreprocessorDirective()
687 CurPtr += strlen(PreprocessorDirs[ID].Word); in prepEatPreprocessorDirective()
724 return ReturnError(CurPtr, "Only comments are supported after " + in lexPreprocessor()
765 return ReturnError(CurPtr, "Only comments are supported after #else"); in lexPreprocessor()
793 return ReturnError(CurPtr, "Only comments are supported after #endif"); in lexPreprocessor()
815 return ReturnError(CurPtr, in lexPreprocessor()
846 if (*CurPtr == '#') in prepSkipRegion()
847 ++CurPtr; in prepSkipRegion()
884 } while (CurPtr != CurBuf.end()); in prepSkipRegion()
894 while (*CurPtr == ' ' || *CurPtr == '\t') in prepLexMacroName()
895 ++CurPtr; in prepLexMacroName()
897 TokStart = CurPtr; in prepLexMacroName()
899 if (*CurPtr != '_' && !isalpha(*CurPtr)) in prepLexMacroName()
903 while (isalpha(*CurPtr) || isdigit(*CurPtr) || *CurPtr == '_') in prepLexMacroName()
904 ++CurPtr; in prepLexMacroName()
906 return StringRef(TokStart, CurPtr - TokStart); in prepLexMacroName()
910 while (CurPtr != CurBuf.end()) { in prepSkipLineBegin()
911 switch (*CurPtr) { in prepSkipLineBegin()
931 TokStart = CurPtr; in prepSkipLineBegin()
934 ++CurPtr; in prepSkipLineBegin()
950 ++CurPtr; in prepSkipLineBegin()
959 while (CurPtr != CurBuf.end()) { in prepSkipDirectiveEnd()
960 switch (*CurPtr) { in prepSkipDirectiveEnd()
975 ++CurPtr; in prepSkipDirectiveEnd()
993 TokStart = CurPtr; in prepSkipDirectiveEnd()
994 ++CurPtr; in prepSkipDirectiveEnd()
998 TokStart = CurPtr; in prepSkipDirectiveEnd()
999 PrintError(CurPtr, "Unexpected character"); in prepSkipDirectiveEnd()
1009 TokStart = CurPtr; in prepSkipDirectiveEnd()
1013 ++CurPtr; in prepSkipDirectiveEnd()
1020 while (*CurPtr != '\n' && *CurPtr != '\r' && CurPtr != CurBuf.end()) in prepSkipToLineEnd()
1021 ++CurPtr; in prepSkipToLineEnd()
1044 TokStart = CurPtr; in prepReportPreprocessorStackError()