Lines Matching +full:a +full:- +full:za +full:- +full:z

1 //===- LLLexer.cpp - Lexer for .ll Files ----------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
37 //===----------------------------------------------------------------------===//
39 //===----------------------------------------------------------------------===//
41 // atoull - Convert an ascii string of decimal digits into the unsigned long
43 // because we know that the input will be matched by a suitable regex...
50 Result += *Buffer-'0'; in atoull()
77 if (End - Buffer >= 16) { in HexToIntPair()
93 /// FP80HexToIntPair - translate an 80 bit FP80 number (20 hexits) into
112 // UnEscapeLexed - Run through the specified buffer and change \xx codes to the
121 if (BIn < EndBuffer-1 && BIn[1] == '\\') { in UnEscapeLexed()
124 } else if (BIn < EndBuffer-2 && in UnEscapeLexed()
137 Str.resize(BOut-Buffer); in UnEscapeLexed()
140 /// isLabelChar - Return true for [-a-zA-Z$._0-9].
142 return isalnum(static_cast<unsigned char>(C)) || C == '-' || C == '$' || in isLabelChar()
146 /// isLabelTail - Return true if this pointer points to a valid end of a label.
155 //===----------------------------------------------------------------------===//
157 //===----------------------------------------------------------------------===//
170 // A nul character in the stream is either the end of the current buffer or in getNextChar()
171 // a random nul in the file. Disambiguate that here. in getNextChar()
172 if (CurPtr-1 != CurBuf.end()) in getNextChar()
176 --CurPtr; // Another call to lex will return EOF again. in getNextChar()
188 // Handle letters: [a-zA-Z_] in LexToken()
209 StrVal.assign(TokStart, CurPtr-1); in LexToken()
228 case '-': in LexToken()
255 /// GlobalVar @[-a-zA-Z$._][-a-zA-Z$._0-9]*
256 /// GlobalVarID @[0-9]+
264 StrVal.assign(TokStart, CurPtr - 1); in LexDollar()
280 StrVal.assign(TokStart + 2, CurPtr - 1); in LexDollar()
291 // Handle ComdatVarName: $[-a-zA-Z$._][-a-zA-Z$._0-9]* in LexDollar()
298 /// ReadString - Read a string until the closing quote.
309 StrVal.assign(Start, CurPtr-1); in ReadString()
316 /// ReadVarName - Read the rest of a token containing a variable name.
320 CurPtr[0] == '-' || CurPtr[0] == '$' || in ReadVarName()
324 CurPtr[0] == '-' || CurPtr[0] == '$' || in ReadVarName()
334 // Lex an ID: [0-9]+. On success, the ID is stored in UIntVal and Token is
363 StrVal.assign(TokStart+2, CurPtr-1); in LexVar()
374 // Handle VarName: [-a-zA-Z$._][-a-zA-Z$._0-9]* in LexVar()
378 // Handle VarID: [0-9]+ in LexVar()
382 /// Lex all tokens that start with a % character.
384 /// LocalVar ::= %[-a-zA-Z$._][-a-zA-Z$._0-9]*
385 /// LocalVarID ::= %[0-9]+
390 /// Lex all tokens that start with a " character.
411 /// Lex all tokens that start with a ! character.
415 // Lex a metadata name as a MetadataVar. in LexExclaim()
417 CurPtr[0] == '-' || CurPtr[0] == '$' || in LexExclaim()
421 CurPtr[0] == '-' || CurPtr[0] == '$' || in LexExclaim()
432 /// Lex all tokens that start with a ^ character.
433 /// SummaryID ::= ^[0-9]+
435 // Handle SummaryID: ^[0-9]+ in LexCaret()
439 /// Lex all tokens that start with a # character.
440 /// AttrGrpID ::= #[0-9]+
443 // Handle AttrGrpID: #[0-9]+ in LexHash()
449 /// Lex a label, integer type, keyword, or hexadecimal integer constant.
450 /// Label [-a-zA-Z$._0-9]+:
451 /// IntegerType i[0-9]+
453 /// HexIntConstant [us]0x[0-9A-Fa-f]+
456 const char *IntEnd = CurPtr[-1] == 'i' ? nullptr : StartChar; in LexIdentifier()
468 // If we stopped due to a colon, unless we were directed to ignore it, in LexIdentifier()
469 // this really is a label. in LexIdentifier()
471 StrVal.assign(StartChar-1, CurPtr++); in LexIdentifier()
475 // Otherwise, this wasn't a label. If this was valid as an integer type, in LexIdentifier()
490 // Otherwise, this was a letter sequence. See which keyword this is. in LexIdentifier()
493 --StartChar; in LexIdentifier()
494 StringRef Keyword(StartChar, CurPtr - StartChar); in LexIdentifier()
514 KEYWORD(weak); // Use as a linkage, and a modifier for "cmpxchg". in LexIdentifier()
674 // ninf already a keyword in LexIdentifier()
679 // sub already a keyword in LexIdentifier()
719 // Use-list order directives. in LexIdentifier()
978 // Check for [us]0x[0-9A-Fa-f]+ which are Hexadecimal constant generated by in LexIdentifier()
979 // the CFE to avoid forcing it to deal with 64-bit numbers. in LexIdentifier()
983 int len = CurPtr-TokStart-3; in LexIdentifier()
1010 /// Lex all tokens that start with a 0x prefix, knowing they match and are not
1012 /// HexFPConstant 0x[0-9A-Fa-f]+
1013 /// HexFP80Constant 0xK[0-9A-Fa-f]+
1014 /// HexFP128Constant 0xL[0-9A-Fa-f]+
1015 /// HexPPC128Constant 0xM[0-9A-Fa-f]+
1016 /// HexHalfConstant 0xH[0-9A-Fa-f]+
1017 /// HexBFloatConstant 0xR[0-9A-Fa-f]+
1039 // HexFPConstant - Floating point constant represented in IEEE format as a in Lex0x()
1051 // F80HexFPConstant - x87 long double in hexadecimal format (10 bytes) in Lex0x()
1056 // F128HexFPConstant - IEEE 128-bit in hexadecimal format (16 bytes) in Lex0x()
1061 // PPC128HexFPConstant - PowerPC 128-bit in hexadecimal format (16 bytes) in Lex0x()
1077 /// Lex tokens for a label or a numeric constant, possibly starting with -.
1078 /// Label [-a-zA-Z$._0-9]+:
1079 /// NInteger -[0-9]+
1080 /// FPConstant [-+]?[0-9]+[.][0-9]*([eE][-+]?[0-9]+)?
1081 /// PInteger [0-9]+
1082 /// HexFPConstant 0x[0-9A-Fa-f]+
1083 /// HexFP80Constant 0xK[0-9A-Fa-f]+
1084 /// HexFP128Constant 0xL[0-9A-Fa-f]+
1085 /// HexPPC128Constant 0xM[0-9A-Fa-f]+
1087 // If the letter after the negative is not a number, this is probably a label. in LexDigitOrNegative()
1090 // Okay, this is not a number after the -, it's probably a label. in LexDigitOrNegative()
1092 StrVal.assign(TokStart, End-1); in LexDigitOrNegative()
1100 // At this point, it is either a label, int or fp constant. in LexDigitOrNegative()
1106 // Check if this is a fully-numeric label: in LexDigitOrNegative()
1116 // Check to see if this really is a string label, e.g. "-1:". in LexDigitOrNegative()
1119 StrVal.assign(TokStart, End-1); in LexDigitOrNegative()
1125 // If the next character is a '.', then it is a fp value, otherwise its in LexDigitOrNegative()
1130 APSIntVal = APSInt(StringRef(TokStart, CurPtr - TokStart)); in LexDigitOrNegative()
1136 // Skip over [0-9]*([eE][-+]?[0-9]+)? in LexDigitOrNegative()
1141 ((CurPtr[1] == '-' || CurPtr[1] == '+') && in LexDigitOrNegative()
1149 StringRef(TokStart, CurPtr - TokStart)); in LexDigitOrNegative()
1153 /// Lex a floating point constant starting with +.
1154 /// FPConstant [-+]?[0-9]+[.][0-9]*([eE][-+]?[0-9]+)?
1156 // If the letter after the negative is a number, this is probably not a in LexPositive()
1165 // At this point, we need a '.'. in LexPositive()
1173 // Skip over [0-9]*([eE][-+]?[0-9]+)? in LexPositive()
1178 ((CurPtr[1] == '-' || CurPtr[1] == '+') && in LexPositive()
1186 StringRef(TokStart, CurPtr - TokStart)); in LexPositive()