Lines Matching refs:CurPtr
32 CurPtr = CurBuf.begin(); in TGLexer()
48 char CurChar = *CurPtr++; in getNextChar()
55 if (CurPtr-1 != CurBuf.end()) in getNextChar()
64 CurPtr = ParentIncludeLoc.getPointer(); in getNextChar()
69 --CurPtr; // Another call to lex will return EOF again. in getNextChar()
77 if ((*CurPtr == '\n' || (*CurPtr == '\r')) && in getNextChar()
78 *CurPtr != CurChar) in getNextChar()
79 ++CurPtr; // Eat the two char newline sequence. in getNextChar()
85 return *(CurPtr + Index); in peekNextChar()
89 TokStart = CurPtr; in LexToken()
127 if (*CurPtr == '/') in LexToken()
129 else if (*CurPtr == '*') { in LexToken()
184 const char *StrStart = CurPtr; in LexString()
188 while (*CurPtr != '"') { in LexString()
190 if (*CurPtr == 0 && CurPtr == CurBuf.end()) in LexString()
193 if (*CurPtr == '\n' || *CurPtr == '\r') in LexString()
196 if (*CurPtr != '\\') { in LexString()
197 CurStrVal += *CurPtr++; in LexString()
201 ++CurPtr; in LexString()
203 switch (*CurPtr) { in LexString()
206 CurStrVal += *CurPtr++; in LexString()
210 ++CurPtr; in LexString()
214 ++CurPtr; in LexString()
219 return ReturnError(CurPtr, "escaped newlines not supported in tblgen"); in LexString()
223 if (CurPtr == CurBuf.end()) in LexString()
227 return ReturnError(CurPtr, "invalid escape in string literal"); in LexString()
231 ++CurPtr; in LexString()
236 if (!isalpha(CurPtr[0]) && CurPtr[0] != '_') in LexVarName()
240 const char *VarNameStart = CurPtr++; in LexVarName()
242 while (isalpha(*CurPtr) || isdigit(*CurPtr) || *CurPtr == '_') in LexVarName()
243 ++CurPtr; in LexVarName()
245 CurStrVal.assign(VarNameStart, CurPtr); in LexVarName()
255 while (isalpha(*CurPtr) || isdigit(*CurPtr) || *CurPtr == '_') in LexIdentifier()
256 ++CurPtr; in LexIdentifier()
259 StringRef Str(IdentStart, CurPtr-IdentStart); in LexIdentifier()
305 CurBuffer = SrcMgr.AddIncludeFile(Filename, SMLoc::getFromPointer(CurPtr), in LexInclude()
323 CurPtr = CurBuf.begin(); in LexInclude()
328 ++CurPtr; // skip the second slash. in SkipBCPLComment()
330 switch (*CurPtr) { in SkipBCPLComment()
336 if (CurPtr == CurBuf.end()) in SkipBCPLComment()
341 ++CurPtr; in SkipBCPLComment()
348 ++CurPtr; // skip the star. in SkipCComment()
359 if (CurPtr[0] != '/') break; in SkipCComment()
361 ++CurPtr; // End the */. in SkipCComment()
367 if (CurPtr[0] != '*') break; in SkipCComment()
368 ++CurPtr; in SkipCComment()
380 if (CurPtr[-1] == '0') { in LexNumber()
381 if (CurPtr[0] == 'x') { in LexNumber()
382 ++CurPtr; in LexNumber()
383 const char *NumStart = CurPtr; in LexNumber()
384 while (isxdigit(CurPtr[0])) in LexNumber()
385 ++CurPtr; in LexNumber()
388 if (CurPtr == NumStart) in LexNumber()
404 } else if (CurPtr[0] == 'b') { in LexNumber()
405 ++CurPtr; in LexNumber()
406 const char *NumStart = CurPtr; in LexNumber()
407 while (CurPtr[0] == '0' || CurPtr[0] == '1') in LexNumber()
408 ++CurPtr; in LexNumber()
411 if (CurPtr == NumStart) in LexNumber()
412 return ReturnError(CurPtr-2, "Invalid binary number"); in LexNumber()
419 if (!isdigit(CurPtr[0])) { in LexNumber()
420 if (CurPtr[-1] == '-') in LexNumber()
422 else if (CurPtr[-1] == '+') in LexNumber()
426 while (isdigit(CurPtr[0])) in LexNumber()
427 ++CurPtr; in LexNumber()
435 if (CurPtr[0] != '{') in LexBracket()
437 ++CurPtr; in LexBracket()
438 const char *CodeStart = CurPtr; in LexBracket()
448 CurStrVal.assign(CodeStart, CurPtr-2); in LexBracket()
458 if (!isalpha(*CurPtr)) in LexExclaim()
459 return ReturnError(CurPtr - 1, "Invalid \"!operator\""); in LexExclaim()
461 const char *Start = CurPtr++; in LexExclaim()
462 while (isalpha(*CurPtr)) in LexExclaim()
463 ++CurPtr; in LexExclaim()
467 StringSwitch<tgtok::TokKind>(StringRef(Start, CurPtr - Start)) in LexExclaim()