Home
last modified time | relevance | path

Searched refs:Lexer (Results 1 – 25 of 92) sorted by relevance

1234

/freebsd-12.1/contrib/llvm/lib/MC/MCParser/
H A DWasmAsmParser.cpp36 MCAsmLexer *Lexer; member in __anon7af60ea60111::WasmAsmParser
47 WasmAsmParser() : Parser(nullptr), Lexer(nullptr) { in WasmAsmParser()
53 Lexer = &Parser->getLexer(); in Initialize()
68 auto ok = Lexer->is(Kind); in IsNext()
76 Lexer->getTok()); in Expect()
98 if (Lexer->isNot(AsmToken::Comma)) in parseDirectiveSize()
104 if (Lexer->isNot(AsmToken::EndOfStatement)) in parseDirectiveSize()
115 if (!Lexer->is(AsmToken::Identifier)) in parseDirectiveType()
117 Lexer->getTok()); in parseDirectiveType()
123 Lexer->is(AsmToken::Identifier))) in parseDirectiveType()
[all …]
H A DAsmParser.cpp126 AsmLexer Lexer; member in __anon1f1fff4e0111::AsmParser
808 Error(Lexer.getErrLoc(), Lexer.getErr()); in Lex()
978 Lexer.Lex(); in eatToEndOfStatement()
982 Lexer.Lex(); in eatToEndOfStatement()
989 Lexer.Lex(); in parseStringToEndOfStatement()
1000 Lexer.Lex(); in parseStringToComma()
2520 AsmLexerSkipSpaceRAII(AsmLexer &Lexer, bool SkipSpace) : Lexer(Lexer) { in AsmLexerSkipSpaceRAII() argument
2553 if (Lexer.is(AsmToken::Eof) || Lexer.is(AsmToken::Equal)) in parseMacroArgument()
2598 Lexer.Lex(); in parseMacroArgument()
2816 if (Lexer.is(AsmToken::Dollar) || Lexer.is(AsmToken::At)) { in parseIdentifier()
[all …]
/freebsd-12.1/contrib/llvm/tools/clang/lib/Lex/
H A DLexer.cpp78 void Lexer::anchor() {} in anchor()
134 Lexer::Lexer(FileID FID, const llvm::MemoryBuffer *InputFile, Preprocessor &PP) in Lexer() function in Lexer
147 Lexer::Lexer(SourceLocation fileloc, const LangOptions &langOpts, in Lexer() function in Lexer
159 Lexer::Lexer(FileID FID, const llvm::MemoryBuffer *FromFile, in Lexer() function in Lexer
164 void Lexer::resetExtendedTokenMode() { in resetExtendedTokenMode()
187 Lexer *Lexer::Create_PragmaLexer(SourceLocation SpellingLoc, in Create_PragmaLexer()
196 Lexer *L = new Lexer(SpellingFID, InputFile, PP); in Create_PragmaLexer()
316 StringRef Lexer::getSpelling(SourceLocation loc, in getSpelling()
1263 SourceLocation Lexer::findLocationAfterToken( in findLocationAfterToken()
2777 unsigned Lexer::isNextPPTokenLParen() { in isNextPPTokenLParen()
[all …]
/freebsd-12.1/contrib/llvm/lib/Target/WebAssembly/AsmParser/
H A DWebAssemblyAsmParser.cpp156 MCAsmLexer &Lexer; member in __anon1565d9e10111::WebAssemblyAsmParser
195 Lexer(Parser.getLexer()) { in WebAssemblyAsmParser()
263 auto Ok = Lexer.is(Kind); in isNext()
272 Lexer.getTok()); in expect()
330 auto &Int = Lexer.getTok(); in parseSingleInteger()
350 auto &Offset = Lexer.getTok(); in parseOperandStartingWithInteger()
383 auto &Sep = Lexer.getTok(); in ParseInstruction()
391 auto &Id = Lexer.getTok(); in ParseInstruction()
452 auto &Tok = Lexer.getTok(); in ParseInstruction()
455 auto &Id = Lexer.getTok(); in ParseInstruction()
[all …]
/freebsd-12.1/contrib/llvm/tools/clang/lib/AST/
H A DCommentLexer.cpp91 void Lexer::skipLineStartingDecorations() { in skipLineStartingDecorations()
293 void Lexer::lexCommentText(Token &T) { in lexCommentText()
464 void Lexer::setupAndLexVerbatimBlock(Token &T, in setupAndLexVerbatimBlock()
534 void Lexer::lexVerbatimBlockBody(Token &T) { in lexVerbatimBlockBody()
558 void Lexer::lexVerbatimLineText(Token &T) { in lexVerbatimLineText()
653 void Lexer::lexHTMLStartTag(Token &T) { in lexHTMLStartTag()
715 void Lexer::setupAndLexHTMLEndTag(Token &T) { in setupAndLexHTMLEndTag()
735 void Lexer::lexHTMLEndTag(Token &T) { in lexHTMLEndTag()
742 Lexer::Lexer(llvm::BumpPtrAllocator &Allocator, DiagnosticsEngine &Diags, in Lexer() function in clang::comments::Lexer
751 void Lexer::lex(Token &T) { in lex()
[all …]
/freebsd-12.1/contrib/llvm/lib/Target/Lanai/AsmParser/
H A DLanaiAsmParser.cpp96 MCAsmLexer &Lexer; member in __anon3c7a6daf0111::LanaiAsmParser
744 Lexer.Lex(); // lex '(' in parseIdentifier()
761 Lexer.Lex(); // lex ')' in parseIdentifier()
781 switch (Lexer.getKind()) { in parseImmediate()
821 if (Lexer.getKind() == Lexer.peekTok(true).getKind()) { in parsePrePost()
823 if (Lexer.is(AsmToken::Minus)) in parsePrePost()
825 else if (Lexer.is(AsmToken::Plus)) in parsePrePost()
833 } else if (Lexer.is(AsmToken::Star)) { in parsePrePost()
894 if (Lexer.isNot(AsmToken::LBrac)) { in parseMemoryOperand()
948 if (Lexer.is(AsmToken::RBrac)) { in parseMemoryOperand()
[all …]
/freebsd-12.1/contrib/llvm/tools/clang/include/clang/Lex/
H A DLexer.h77 class Lexer : public PreprocessorLexer {
142 Lexer(FileID FID, const llvm::MemoryBuffer *InputFile, Preprocessor &PP);
147 Lexer(SourceLocation FileLoc, const LangOptions &LangOpts,
153 Lexer(FileID FID, const llvm::MemoryBuffer *FromFile,
156 Lexer(const Lexer &) = delete;
157 Lexer &operator=(const Lexer &) = delete;
162 static Lexer *Create_PragmaLexer(SourceLocation SpellingLoc,
H A DPreprocessor.h394 std::unique_ptr<Lexer> CurLexer;
432 std::unique_ptr<Lexer> TheLexer;
440 std::unique_ptr<Lexer> &&TheLexer, in IncludeStackInfo()
1567 return Lexer::getSpelling(loc, buffer, SourceMgr, LangOpts, invalid);
1579 return Lexer::getSpelling(Tok, SourceMgr, LangOpts, Invalid);
1596 return Lexer::getSpelling(Tok, Buffer, SourceMgr, LangOpts, Invalid);
1641 return Lexer::getImmediateMacroName(Loc, SourceMgr, getLangOpts()); in getImmediateMacroName()
1674 return Lexer::getLocForEndOfToken(Loc, Offset, SourceMgr, LangOpts);
1684 return Lexer::isAtStartOfMacroExpansion(loc, SourceMgr, LangOpts,
2040 void EnterSourceFileWithLexer(Lexer *TheLexer, const DirectoryLookup *Dir);
[all …]
/freebsd-12.1/contrib/llvm/tools/clang/include/clang/AST/
H A DCommentLexer.h27 class Lexer; variable
57 friend class Lexer; variable
217 void dump(const Lexer &L, const SourceManager &SM) const;
221 class Lexer {
223 Lexer(const Lexer &) = delete;
224 void operator=(const Lexer &) = delete;
349 Lexer(llvm::BumpPtrAllocator &Allocator, DiagnosticsEngine &Diags,
H A DCommentBriefParser.h31 Lexer &L;
45 BriefParser(Lexer &L, const CommandTraits &Traits);
H A DCommentParser.h36 Lexer &L;
89 Parser(Lexer &L, Sema &S, llvm::BumpPtrAllocator &Allocator,
/freebsd-12.1/contrib/llvm/lib/Target/Hexagon/AsmParser/
H A DHexagonAsmParser.cpp600 MCAsmLexer &Lexer = getLexer(); in eatToEndOfPacket() local
602 Lexer.Lex(); in eatToEndOfPacket()
603 Lexer.Lex(); in eatToEndOfPacket()
975 Lexer.Lex(); in ParseRegister()
979 bool Type = Lexer.is(AsmToken::Identifier) || Lexer.is(AsmToken::Dot) || in ParseRegister()
980 Lexer.is(AsmToken::Integer) || Lexer.is(AsmToken::Real) || in ParseRegister()
995 EndLoc = Lexer.getLoc(); in ParseRegister()
1004 EndLoc = Lexer.getLoc(); in ParseRegister()
1018 EndLoc = Lexer.getLoc(); in ParseRegister()
1071 Lexer.UnLex(Tokens.back()); in parseExpression()
[all …]
/freebsd-12.1/contrib/llvm/tools/clang/lib/Tooling/Inclusions/
H A DHeaderIncludes.cpp40 llvm::function_ref<unsigned(const SourceManager &, Lexer &, Token &)> in getOffsetAfterTokenSequence() argument
44 Lexer Lex(SM.getMainFileID(), SM.getBuffer(SM.getMainFileID()), SM, in getOffsetAfterTokenSequence()
55 bool checkAndConsumeDirectiveWithName(Lexer &Lex, StringRef Name, Token &Tok) { in checkAndConsumeDirectiveWithName()
65 void skipComments(Lexer &Lex, Token &Tok) { in skipComments()
80 [](const SourceManager &SM, Lexer &Lex, Token Tok) { in getOffsetAfterHeaderGuardsAndComments()
96 bool checkAndConsumeInclusiveDirective(Lexer &Lex, Token &Tok) { in checkAndConsumeInclusiveDirective()
134 [](const SourceManager &SM, Lexer &Lex, Token Tok) { in getMaxHeaderInsertionOffset()
/freebsd-12.1/contrib/llvm/tools/clang/lib/Edit/
H A DCommit.cpp257 unsigned tokLen = Lexer::MeasureTokenLength(spellLoc, SourceMgr, LangOpts); in canInsertAfterToken()
273 loc = Lexer::getLocForEndOfToken(loc, 0, SourceMgr, LangOpts); in canInsertAfterToken()
300 range = Lexer::makeFileCharRange(range, SM, LangOpts); in canRemoveRange()
343 return Lexer::isAtStartOfMacroExpansion(loc, SourceMgr, LangOpts, MacroBegin); in isAtStartOfMacroExpansion()
348 return Lexer::isAtEndOfMacroExpansion(loc, SourceMgr, LangOpts, MacroEnd); in isAtEndOfMacroExpansion()
H A DEditedSource.cpp48 StringRef ArgName = Lexer::getSpelling(SourceMgr.getSpellingLoc(DefArgLoc), in deconstructMacroArgLoc()
318 return !(Lexer::isIdentifierBodyChar(left, LangOpts) && in canBeJoined()
319 Lexer::isIdentifierBodyChar(right, LangOpts)); in canBeJoined()
342 SourceLocation BeginTokLoc = Lexer::GetBeginningOfToken(Loc, SM, LangOpts); in adjustRemoval()
464 return Lexer::getSourceText(CharSourceRange::getCharRange(BLoc, ELoc), in getSourceText()
/freebsd-12.1/contrib/llvm/tools/clang/lib/Frontend/Rewrite/
H A DInclusionRewriter.cpp90 void CommentOutDirective(Lexer &DirectivesLex, const Token &StartToken,
93 bool HandleHasInclude(FileID FileId, Lexer &RawLex,
99 StringRef NextIdentifierName(Lexer &RawLex, Token &RawToken);
315 void InclusionRewriter::CommentOutDirective(Lexer &DirectiveLex, in CommentOutDirective()
340 StringRef InclusionRewriter::NextIdentifierName(Lexer &RawLex, in NextIdentifierName()
353 FileID FileId, Lexer &RawLex, const DirectoryLookup *Lookup, Token &Tok, in HandleHasInclude()
433 Lexer RawLex(FileId, &FromFile, PP.getSourceManager(), PP.getLangOpts()); in Process()
/freebsd-12.1/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/
H A DIssueHash.cpp156 Lexer Lexer(SM.getLocForStartOfFile(SM.getFileID(StartOfLine)), LangOpts, in NormalizeLine() local
161 while (!Lexer.LexFromRawLexer(Token) && NextStart < 2) { in NormalizeLine()
H A DCheckerContext.cpp95 return Lexer::getImmediateMacroName(Loc, getSourceManager(), in getMacroNameOrSpelling()
98 return Lexer::getSpelling(Loc, buf, getSourceManager(), getLangOpts()); in getMacroNameOrSpelling()
/freebsd-12.1/contrib/llvm/tools/clang/lib/Tooling/Refactoring/Extract/
H A DSourceExtraction.cpp24 return Lexer::getSourceText( in isSemicolonAtLocation()
100 Optional<Token> NextToken = Lexer::findNextToken(End, SM, LangOpts); in compute()
/freebsd-12.1/contrib/llvm/tools/clang/lib/ARCMigrate/
H A DTransforms.cpp135 if (!Lexer::isAtEndOfMacroExpansion(loc, SM, Ctx.getLangOpts(), &loc)) in findSemiAfterLocation()
138 loc = Lexer::getLocForEndOfToken(loc, /*Offset=*/0, SM, Ctx.getLangOpts()); in findSemiAfterLocation()
152 Lexer lexer(SM.getLocForStartOfFile(locInfo.first), in findSemiAfterLocation()
399 Lexer lexer(SM.getLocForStartOfFile(locInfo.first), in rewritePropertyAttribute()
480 Lexer lexer(SM.getLocForStartOfFile(locInfo.first), in addPropertyAttribute()
542 str += Lexer::getSourceText( in GCRewriteFinalize()
/freebsd-12.1/contrib/llvm/tools/llvm-mca/
H A DCodeRegionGenerator.cpp116 MCAsmLexer &Lexer = Parser->getLexer(); in parseCodeRegions() local
118 Lexer.setCommentConsumer(&CC); in parseCodeRegions()
/freebsd-12.1/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/
H A DRecursiveSymbolVisitor.h55 Lexer::getLocForEndOfToken(Initializer->getSourceLocation(), in VisitCXXConstructorDecl()
90 Lexer::getLocForEndOfToken(TypeBeginLoc, 0, SM, LangOpts); in VisitTypeLoc()
/freebsd-12.1/contrib/llvm/tools/llvm-mc/
H A Dllvm-mc.cpp245 AsmLexer Lexer(MAI); in AsLexInput() local
246 Lexer.setBuffer(SrcMgr.getMemoryBuffer(SrcMgr.getMainFileID())->getBuffer()); in AsLexInput()
249 while (Lexer.Lex().isNot(AsmToken::Eof)) { in AsLexInput()
250 Lexer.getTok().dump(OS); in AsLexInput()
252 if (Lexer.getTok().getKind() == AsmToken::Error) in AsLexInput()
/freebsd-12.1/contrib/llvm/lib/Object/
H A DCOFFModuleDefinition.cpp89 class Lexer { class
91 Lexer(StringRef S) : Buf(S) {} in Lexer() function in llvm::object::Lexer
354 Lexer Lex;
/freebsd-12.1/contrib/llvm/tools/clang/lib/Tooling/
H A DFixIt.cpp23 return Lexer::getSourceText(CharSourceRange::getTokenRange(Range), in getText()

1234