Lines Matching refs:CurPtr
31 CurPtr = CurBuf->getBufferStart(); in TGLexer()
47 char CurChar = *CurPtr++; in getNextChar()
54 if (CurPtr-1 != CurBuf->getBufferEnd()) in getNextChar()
63 CurPtr = ParentIncludeLoc.getPointer(); in getNextChar()
68 --CurPtr; // Another call to lex will return EOF again. in getNextChar()
76 if ((*CurPtr == '\n' || (*CurPtr == '\r')) && in getNextChar()
77 *CurPtr != CurChar) in getNextChar()
78 ++CurPtr; // Eat the two char newline sequence. in getNextChar()
84 TokStart = CurPtr; in LexToken()
121 if (*CurPtr == '/') in LexToken()
123 else if (*CurPtr == '*') { in LexToken()
142 const char *StrStart = CurPtr; in LexString()
146 while (*CurPtr != '"') { in LexString()
148 if (*CurPtr == 0 && CurPtr == CurBuf->getBufferEnd()) in LexString()
151 if (*CurPtr == '\n' || *CurPtr == '\r') in LexString()
154 if (*CurPtr != '\\') { in LexString()
155 CurStrVal += *CurPtr++; in LexString()
159 ++CurPtr; in LexString()
161 switch (*CurPtr) { in LexString()
164 CurStrVal += *CurPtr++; in LexString()
168 ++CurPtr; in LexString()
172 ++CurPtr; in LexString()
177 return ReturnError(CurPtr, "escaped newlines not supported in tblgen"); in LexString()
181 if (CurPtr == CurBuf->getBufferEnd()) in LexString()
185 return ReturnError(CurPtr, "invalid escape in string literal"); in LexString()
189 ++CurPtr; in LexString()
194 if (!isalpha(CurPtr[0]) && CurPtr[0] != '_') in LexVarName()
198 const char *VarNameStart = CurPtr++; in LexVarName()
200 while (isalpha(*CurPtr) || isdigit(*CurPtr) || *CurPtr == '_') in LexVarName()
201 ++CurPtr; in LexVarName()
203 CurStrVal.assign(VarNameStart, CurPtr); in LexVarName()
213 while (isalpha(*CurPtr) || isdigit(*CurPtr) || *CurPtr == '_' || in LexIdentifier()
214 *CurPtr == '#') in LexIdentifier()
215 ++CurPtr; in LexIdentifier()
218 StringRef Str(IdentStart, CurPtr-IdentStart); in LexIdentifier()
263 CurBuffer = SrcMgr.AddIncludeFile(Filename, SMLoc::getFromPointer(CurPtr), in LexInclude()
273 CurPtr = CurBuf->getBufferStart(); in LexInclude()
278 ++CurPtr; // skip the second slash. in SkipBCPLComment()
280 switch (*CurPtr) { in SkipBCPLComment()
286 if (CurPtr == CurBuf->getBufferEnd()) in SkipBCPLComment()
291 ++CurPtr; in SkipBCPLComment()
298 ++CurPtr; // skip the star. in SkipCComment()
309 if (CurPtr[0] != '/') break; in SkipCComment()
311 ++CurPtr; // End the */. in SkipCComment()
317 if (CurPtr[0] != '*') break; in SkipCComment()
318 ++CurPtr; in SkipCComment()
330 if (CurPtr[-1] == '0') { in LexNumber()
331 if (CurPtr[0] == 'x') { in LexNumber()
332 ++CurPtr; in LexNumber()
333 const char *NumStart = CurPtr; in LexNumber()
334 while (isxdigit(CurPtr[0])) in LexNumber()
335 ++CurPtr; in LexNumber()
338 if (CurPtr == NumStart) in LexNumber()
354 } else if (CurPtr[0] == 'b') { in LexNumber()
355 ++CurPtr; in LexNumber()
356 const char *NumStart = CurPtr; in LexNumber()
357 while (CurPtr[0] == '0' || CurPtr[0] == '1') in LexNumber()
358 ++CurPtr; in LexNumber()
361 if (CurPtr == NumStart) in LexNumber()
362 return ReturnError(CurPtr-2, "Invalid binary number"); in LexNumber()
369 if (!isdigit(CurPtr[0])) { in LexNumber()
370 if (CurPtr[-1] == '-') in LexNumber()
372 else if (CurPtr[-1] == '+') in LexNumber()
376 while (isdigit(CurPtr[0])) in LexNumber()
377 ++CurPtr; in LexNumber()
385 if (CurPtr[0] != '{') in LexBracket()
387 ++CurPtr; in LexBracket()
388 const char *CodeStart = CurPtr; in LexBracket()
398 CurStrVal.assign(CodeStart, CurPtr-2); in LexBracket()
408 if (!isalpha(*CurPtr)) in LexExclaim()
409 return ReturnError(CurPtr - 1, "Invalid \"!operator\""); in LexExclaim()
411 const char *Start = CurPtr++; in LexExclaim()
412 while (isalpha(*CurPtr)) in LexExclaim()
413 ++CurPtr; in LexExclaim()
417 StringSwitch<tgtok::TokKind>(StringRef(Start, CurPtr - Start)) in LexExclaim()