Lines Matching refs:Lexer

126   AsmLexer Lexer;  member in __anon1f1fff4e0111::AsmParser
208 MCAsmLexer &getLexer() override { return Lexer; } in getLexer()
234 Lexer.setLexMasmIntegers(V); in setParsingInlineAsm()
687 : Lexer(MAI), Ctx(Ctx), Out(Out), MAI(MAI), SrcMgr(SM), in AsmParser()
695 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in AsmParser()
765 SrcMgr.AddIncludeFile(Filename, Lexer.getLoc(), IncludedFile); in enterIncludeFile()
770 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in enterIncludeFile()
781 SrcMgr.AddIncludeFile(Filename, Lexer.getLoc(), IncludedFile); in processIncbinFile()
802 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer(), in jumpToLoc()
807 if (Lexer.getTok().is(AsmToken::Error)) in Lex()
808 Error(Lexer.getErrLoc(), Lexer.getErr()); in Lex()
818 const AsmToken *tok = &Lexer.Lex(); in Lex()
824 tok = &Lexer.Lex(); in Lex()
882 while (Lexer.isNot(AsmToken::Eof)) { in Run()
890 if (!hasPendingError() && Lexer.getTok().is(AsmToken::Error)) { in Run()
977 while (Lexer.isNot(AsmToken::EndOfStatement) && Lexer.isNot(AsmToken::Eof)) in eatToEndOfStatement()
978 Lexer.Lex(); in eatToEndOfStatement()
981 if (Lexer.is(AsmToken::EndOfStatement)) in eatToEndOfStatement()
982 Lexer.Lex(); in eatToEndOfStatement()
988 while (Lexer.isNot(AsmToken::EndOfStatement) && Lexer.isNot(AsmToken::Eof)) in parseStringToEndOfStatement()
989 Lexer.Lex(); in parseStringToEndOfStatement()
998 while (Lexer.isNot(AsmToken::EndOfStatement) && in parseStringToComma()
999 Lexer.isNot(AsmToken::Comma) && Lexer.isNot(AsmToken::Eof)) in parseStringToComma()
1000 Lexer.Lex(); in parseStringToComma()
1014 if (Lexer.isNot(AsmToken::RParen)) in parseParenExpr()
1016 EndLoc = Lexer.getTok().getEndLoc(); in parseParenExpr()
1043 AsmToken::TokenKind FirstTokenKind = Lexer.getKind(); in parsePrimaryExpr()
1064 if (Lexer.getMAI().getDollarIsPC()) { in parsePrimaryExpr()
1082 if (Lexer.is(AsmToken::At)) { in parsePrimaryExpr()
1094 } else if (Lexer.is(AsmToken::LParen)) { in parsePrimaryExpr()
1154 EndLoc = Lexer.getTok().getEndLoc(); in parsePrimaryExpr()
1157 if (Lexer.getKind() == AsmToken::Identifier) { in parsePrimaryExpr()
1175 EndLoc = Lexer.getTok().getEndLoc(); in parsePrimaryExpr()
1185 EndLoc = Lexer.getTok().getEndLoc(); in parsePrimaryExpr()
1195 EndLoc = Lexer.getTok().getEndLoc(); in parsePrimaryExpr()
1252 if (Lexer.isNot(AsmToken::LParen)) in parsePrimaryExpr()
1257 if (Lexer.isNot(AsmToken::RParen)) in parsePrimaryExpr()
1383 if (Lexer.getKind() == AsmToken::At) { in parseExpression()
1386 if (Lexer.isNot(AsmToken::Identifier)) in parseExpression()
1442 SMLoc StartLoc = Lexer.getLoc(); in parseAbsoluteExpression()
1617 SMLoc StartLoc = Lexer.getLoc(); in parseBinOpRHS()
1620 unsigned TokPrec = getBinOpPrecedence(Lexer.getKind(), Kind); in parseBinOpRHS()
1637 unsigned NextTokPrec = getBinOpPrecedence(Lexer.getKind(), Dummy); in parseBinOpRHS()
1654 while (Lexer.is(AsmToken::Space)) in parseStatement()
1656 if (Lexer.is(AsmToken::EndOfStatement)) { in parseStatement()
1669 if (Lexer.is(AsmToken::HashDirective)) in parseStatement()
1672 if (Lexer.is(AsmToken::Integer)) { in parseStatement()
1683 if (Lexer.getKind() != AsmToken::Colon) { in parseStatement()
1690 } else if (Lexer.is(AsmToken::Dot)) { in parseStatement()
1694 } else if (Lexer.is(AsmToken::LCurly)) { in parseStatement()
1699 } else if (Lexer.is(AsmToken::RCurly)) { in parseStatement()
1703 } else if (Lexer.is(AsmToken::Star) && in parseStatement()
1770 switch (Lexer.getKind()) { in parseStatement()
1809 Lexer.Lex(); in parseStatement()
1810 Lexer.UnLex(AsmToken(AsmToken::EndOfStatement, CommentStr)); in parseStatement()
2246 if (Lexer.isNot(AsmToken::LCurly) && Lexer.isNot(AsmToken::RCurly)) in parseCurlyBlockScope()
2249 SMLoc StartLoc = Lexer.getLoc(); in parseCurlyBlockScope()
2251 if (Lexer.is(AsmToken::EndOfStatement)) in parseCurlyBlockScope()
2255 AsmStrRewrites.emplace_back(AOK_Skip, StartLoc, Lexer.getLoc().getPointer() - in parseCurlyBlockScope()
2520 AsmLexerSkipSpaceRAII(AsmLexer &Lexer, bool SkipSpace) : Lexer(Lexer) { in AsmLexerSkipSpaceRAII() argument
2521 Lexer.setSkipSpace(SkipSpace); in AsmLexerSkipSpaceRAII()
2525 Lexer.setSkipSpace(true); in ~AsmLexerSkipSpaceRAII()
2529 AsmLexer &Lexer; member in __anon1f1fff4e0311::AsmLexerSkipSpaceRAII
2537 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseMacroArgument()
2547 AsmLexerSkipSpaceRAII ScopedSkipSpace(Lexer, IsDarwin); in parseMacroArgument()
2553 if (Lexer.is(AsmToken::Eof) || Lexer.is(AsmToken::Equal)) in parseMacroArgument()
2558 if (Lexer.is(AsmToken::Comma)) in parseMacroArgument()
2561 if (Lexer.is(AsmToken::Space)) { in parseMacroArgument()
2563 Lexer.Lex(); // Eat spaces in parseMacroArgument()
2570 if (isOperator(Lexer.getKind())) { in parseMacroArgument()
2572 Lexer.Lex(); in parseMacroArgument()
2575 if (Lexer.is(AsmToken::Space)) in parseMacroArgument()
2576 Lexer.Lex(); in parseMacroArgument()
2587 if (Lexer.is(AsmToken::EndOfStatement)) in parseMacroArgument()
2591 if (Lexer.is(AsmToken::LParen)) in parseMacroArgument()
2593 else if (Lexer.is(AsmToken::RParen) && ParenLevel) in parseMacroArgument()
2598 Lexer.Lex(); in parseMacroArgument()
2622 SMLoc IDLoc = Lexer.getLoc(); in parseMacroArguments()
2625 if (Lexer.is(AsmToken::Identifier) && Lexer.peekTok().is(AsmToken::Equal)) { in parseMacroArguments()
2629 if (Lexer.isNot(AsmToken::Equal)) in parseMacroArguments()
2641 SMLoc StrLoc = Lexer.getLoc(); in parseMacroArguments()
2643 if (AltMacroMode && Lexer.is(AsmToken::Percent)) { in parseMacroArguments()
2658 } else if (AltMacroMode && Lexer.is(AsmToken::Less) && in parseMacroArguments()
2694 FALocs[PI] = Lexer.getLoc(); in parseMacroArguments()
2700 if (Lexer.is(AsmToken::EndOfStatement)) { in parseMacroArguments()
2705 Error(FALocs[FAI].isValid() ? FALocs[FAI] : Lexer.getLoc(), in parseMacroArguments()
2718 if (Lexer.is(AsmToken::Comma)) in parseMacroArguments()
2768 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in handleMacroEntry()
2816 if (Lexer.is(AsmToken::Dollar) || Lexer.is(AsmToken::At)) { in parseIdentifier()
2822 Lexer.peekTokens(Buf, false); in parseIdentifier()
2832 Lexer.Lex(); // Lexer's Lex guarantees consecutive token. in parseIdentifier()
2840 if (Lexer.isNot(AsmToken::Identifier) && Lexer.isNot(AsmToken::String)) in parseIdentifier()
2946 SMLoc OffsetLoc = Lexer.getTok().getLoc(); in parseDirectiveReloc()
2961 SMLoc NameLoc = Lexer.getTok().getLoc(); in parseDirectiveReloc()
2962 StringRef Name = Lexer.getTok().getIdentifier(); in parseDirectiveReloc()
2965 if (Lexer.is(AsmToken::Comma)) { in parseDirectiveReloc()
2967 SMLoc ExprLoc = Lexer.getLoc(); in parseDirectiveReloc()
3062 Lexer.Lex(); in parseRealValue()
3065 Lexer.Lex(); in parseRealValue()
3067 if (Lexer.is(AsmToken::Error)) in parseRealValue()
3068 return TokError(Lexer.getErr()); in parseRealValue()
3069 if (Lexer.isNot(AsmToken::Integer) && Lexer.isNot(AsmToken::Real) && in parseRealValue()
3070 Lexer.isNot(AsmToken::Identifier)) in parseRealValue()
3118 SMLoc NumBytesLoc = Lexer.getLoc(); in parseDirectiveZero()
3141 SMLoc NumValuesLoc = Lexer.getLoc(); in parseDirectiveFill()
3186 SMLoc OffsetLoc = Lexer.getLoc(); in parseDirectiveOrg()
3285 if ((!HasFillExpr || Lexer.getMAI().getTextAlignFillValue() == FillExpr) && in parseDirectiveAlign()
3936 getStreamer().EmitCFIStartProc(!Simple.empty(), Lexer.getLoc()); in parseDirectiveCFIStartProc()
4234 return Error(Lexer.getLoc(), in parseDirectiveMacro()
4248 if (Lexer.is(AsmToken::Colon)) { in parseDirectiveMacro()
4254 QualLoc = Lexer.getLoc(); in parseDirectiveMacro()
4273 ParamLoc = Lexer.getLoc(); in parseDirectiveMacro()
4289 Lexer.Lex(); in parseDirectiveMacro()
4297 while (Lexer.is(AsmToken::Error)) { in parseDirectiveMacro()
4298 Lexer.Lex(); in parseDirectiveMacro()
4311 Lexer.Lex(); in parseDirectiveMacro()
4571 SMLoc NumBytesLoc = Lexer.getLoc(); in parseDirectiveSpace()
4592 SMLoc NumValuesLoc = Lexer.getLoc(); in parseDirectiveDCB()
4634 SMLoc NumValuesLoc = Lexer.getLoc(); in parseDirectiveRealDCB()
4666 SMLoc NumValuesLoc = Lexer.getLoc(); in parseDirectiveDS()
4764 LCOMM::LCOMMType LCOMM = Lexer.getMAI().getLCOMMDirectiveAlignmentType(); in parseDirectiveComm()
4769 if ((!IsLocal && Lexer.getMAI().getCOMMDirectiveAlignmentIsInBytes()) || in parseDirectiveComm()
4987 if (Lexer.isNot(AsmToken::String)) { in parseDirectiveIfeqs()
4996 if (Lexer.isNot(AsmToken::Comma)) { in parseDirectiveIfeqs()
5005 if (Lexer.isNot(AsmToken::String)) { in parseDirectiveIfeqs()
5109 while (Lexer.isNot(AsmToken::Eof)) in parseDirectiveEnd()
5110 Lexer.Lex(); in parseDirectiveEnd()
5130 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseDirectiveError()
5131 if (Lexer.isNot(AsmToken::String)) in parseDirectiveError()
5154 if (Lexer.isNot(AsmToken::String)) in parseDirectiveWarning()
5357 if (Lexer.is(AsmToken::Identifier) && in parseMacroLikeBody()
5366 if (Lexer.is(AsmToken::Identifier) && getTok().getIdentifier() == ".endr") { in parseMacroLikeBody()
5370 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseMacroLikeBody()
5408 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in instantiateMacroLikeBody()