Lines Matching refs:Lexer

380   AsmLexer Lexer;  member in __anon60b61cd60111::MasmParser
495 MCAsmLexer &getLexer() override { return Lexer; } in getLexer()
525 Lexer.setLexMasmIntegers(V); in setParsingMSInlineAsm()
1094 : Lexer(MAI), Ctx(Ctx), Out(Out), MAI(MAI), SrcMgr(SM), in MasmParser()
1102 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in MasmParser()
1168 SrcMgr.AddIncludeFile(Filename, Lexer.getLoc(), IncludedFile); in enterIncludeFile()
1173 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in enterIncludeFile()
1181 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer(), in jumpToLoc()
1194 Lexer.Lex(); in expandMacros()
1196 Lexer.UnLex(AsmToken(AsmToken::Error, MacroId)); in expandMacros()
1197 Lexer.Lex(); in expandMacros()
1222 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer(), nullptr, in expandMacros()
1225 Lexer.Lex(); in expandMacros()
1230 if (Lexer.getTok().is(AsmToken::Error)) in Lex()
1231 Error(Lexer.getErrLoc(), Lexer.getErr()); in Lex()
1241 const AsmToken *tok = &Lexer.Lex(); in Lex()
1242 bool StartOfStatement = Lexer.isAtStartOfStatement(); in Lex()
1248 size_t ReadCount = Lexer.peekTokens(Buf); in Lex()
1265 tok = &Lexer.Lex(); in Lex()
1272 Lexer.Lex(); in Lex()
1273 tok = &Lexer.Lex(); in Lex()
1296 size_t ReadCount = Lexer.peekTokens(Buf, ShouldSkipSpace); in peekTok()
1369 while (Lexer.isNot(AsmToken::Eof) || in Run()
1372 if (Lexer.is(AsmToken::Eof)) in Run()
1381 if (Parsed && !hasPendingError() && Lexer.getTok().is(AsmToken::Error)) { in Run()
1453 Out.finish(Lexer.getLoc()); in Run()
1469 while (Lexer.isNot(AsmToken::EndOfStatement)) { in eatToEndOfStatement()
1470 if (Lexer.is(AsmToken::Eof)) { in eatToEndOfStatement()
1480 Lexer.Lex(); in eatToEndOfStatement()
1484 if (Lexer.is(AsmToken::EndOfStatement)) in eatToEndOfStatement()
1485 Lexer.Lex(); in eatToEndOfStatement()
1492 while (Lexer.isNot(EndTok)) { in parseStringRefsTo()
1493 if (Lexer.is(AsmToken::Eof)) { in parseStringRefsTo()
1502 Lexer.Lex(); in parseStringRefsTo()
1505 Lexer.Lex(); in parseStringRefsTo()
1524 while (Lexer.isNot(AsmToken::EndOfStatement) && Lexer.isNot(AsmToken::Eof)) in parseStringToEndOfStatement()
1525 Lexer.Lex(); in parseStringToEndOfStatement()
1539 EndLoc = Lexer.getTok().getEndLoc(); in parseParenExpr()
1568 AsmToken::TokenKind FirstTokenKind = Lexer.getKind(); in parsePrimaryExpr()
1588 if (Lexer.getMAI().getDollarIsPC()) { in parsePrimaryExpr()
1623 } else if (Lexer.is(AsmToken::LParen)) { in parsePrimaryExpr()
1738 EndLoc = Lexer.getTok().getEndLoc(); in parsePrimaryExpr()
1760 EndLoc = Lexer.getTok().getEndLoc(); in parsePrimaryExpr()
1770 EndLoc = Lexer.getTok().getEndLoc(); in parsePrimaryExpr()
1827 if (Lexer.isNot(AsmToken::LParen)) in parsePrimaryExpr()
1932 SMLoc StartLoc = Lexer.getLoc(); in parseAbsoluteExpression()
2032 SMLoc StartLoc = Lexer.getLoc(); in parseBinOpRHS()
2034 AsmToken::TokenKind TokKind = Lexer.getKind(); in parseBinOpRHS()
2035 if (Lexer.getKind() == AsmToken::Identifier) { in parseBinOpRHS()
2036 TokKind = StringSwitch<AsmToken::TokenKind>(Lexer.getTok().getString()) in parseBinOpRHS()
2069 unsigned NextTokPrec = getBinOpPrecedence(Lexer.getKind(), Dummy); in parseBinOpRHS()
2087 while (Lexer.is(AsmToken::Space)) in parseStatement()
2089 if (Lexer.is(AsmToken::EndOfStatement)) { in parseStatement()
2111 if (Lexer.is(AsmToken::HashDirective)) in parseStatement()
2113 if (Lexer.is(AsmToken::Dot)) { in parseStatement()
2117 } else if (Lexer.is(AsmToken::Real)) { in parseStatement()
2206 if (Lexer.is(AsmToken::Colon) && getTargetParser().isLabel(ID)) { in parseStatement()
2245 Lexer.Lex(); in parseStatement()
2246 Lexer.UnLex(AsmToken(AsmToken::EndOfStatement, CommentStr)); in parseStatement()
2539 Lexer.UnLex(ID); in parseStatement()
2729 if (Lexer.isNot(AsmToken::LCurly) && Lexer.isNot(AsmToken::RCurly)) in parseCurlyBlockScope()
2732 SMLoc StartLoc = Lexer.getLoc(); in parseCurlyBlockScope()
2734 if (Lexer.is(AsmToken::EndOfStatement)) in parseCurlyBlockScope()
2738 AsmStrRewrites.emplace_back(AOK_Skip, StartLoc, Lexer.getLoc().getPointer() - in parseCurlyBlockScope()
2986 AsmLexerSkipSpaceRAII(AsmLexer &Lexer, bool SkipSpace) : Lexer(Lexer) { in AsmLexerSkipSpaceRAII() argument
2987 Lexer.setSkipSpace(SkipSpace); in AsmLexerSkipSpaceRAII()
2991 Lexer.setSkipSpace(true); in ~AsmLexerSkipSpaceRAII()
2995 AsmLexer &Lexer; member in __anon60b61cd60411::AsmLexerSkipSpaceRAII
3004 if (Lexer.isNot(EndTok)) { in parseMacroArgument()
3013 SMLoc StrLoc = Lexer.getLoc(), EndLoc; in parseMacroArgument()
3014 if (Lexer.is(AsmToken::Less) && isAngleBracketString(StrLoc, EndLoc)) { in parseMacroArgument()
3027 AsmLexerSkipSpaceRAII ScopedSkipSpace(Lexer, IsDarwin); in parseMacroArgument()
3033 if (Lexer.is(AsmToken::Eof) || Lexer.is(AsmToken::Equal)) in parseMacroArgument()
3037 if (Lexer.is(AsmToken::Comma)) in parseMacroArgument()
3040 if (Lexer.is(AsmToken::Space)) { in parseMacroArgument()
3049 if (isOperator(Lexer.getKind()) && Lexer.isNot(EndTok)) { in parseMacroArgument()
3054 if (Lexer.is(AsmToken::Space)) in parseMacroArgument()
3066 if (Lexer.is(EndTok) && (EndTok != AsmToken::RParen || ParenLevel == 0)) in parseMacroArgument()
3070 if (Lexer.is(AsmToken::LParen)) in parseMacroArgument()
3072 else if (Lexer.is(AsmToken::RParen) && ParenLevel) in parseMacroArgument()
3110 SMLoc IDLoc = Lexer.getLoc(); in parseMacroArguments()
3113 if (Lexer.is(AsmToken::Identifier) && peekTok().is(AsmToken::Equal)) { in parseMacroArguments()
3117 if (Lexer.isNot(AsmToken::Equal)) in parseMacroArguments()
3146 SMLoc StrLoc = Lexer.getLoc(); in parseMacroArguments()
3148 if (Lexer.is(AsmToken::Percent)) { in parseMacroArguments()
3178 FALocs[PI] = Lexer.getLoc(); in parseMacroArguments()
3184 if (Lexer.is(EndTok)) { in parseMacroArguments()
3189 Error(FALocs[FAI].isValid() ? FALocs[FAI] : Lexer.getLoc(), in parseMacroArguments()
3203 if (Lexer.is(AsmToken::Comma)) in parseMacroArguments()
3254 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in handleMacroEntry()
3285 while (Lexer.isNot(AsmToken::Eof)) { in handleMacroInvocation()
3297 if (Parsed && !hasPendingError() && Lexer.getTok().is(AsmToken::Error)) { in handleMacroInvocation()
3320 CurBuffer = SrcMgr.AddNewSourceBuffer(std::move(MacroValue), Lexer.getLoc()); in handleMacroInvocation()
3321 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer(), nullptr, in handleMacroInvocation()
3339 if (Lexer.is(AsmToken::Dollar) || Lexer.is(AsmToken::At)) { in parseIdentifier()
3354 Lexer.Lex(); // Lexer's Lex guarantees consecutive token. in parseIdentifier()
3362 if (Lexer.isNot(AsmToken::Identifier) && Lexer.isNot(AsmToken::String)) in parseIdentifier()
3398 SMLoc StartLoc = Lexer.getLoc(); in parseDirectiveEquate()
3821 Lexer.Lex(); in parseRealValue()
3825 Lexer.Lex(); in parseRealValue()
3828 if (Lexer.is(AsmToken::Error)) in parseRealValue()
3829 return TokError(Lexer.getErr()); in parseRealValue()
3830 if (Lexer.isNot(AsmToken::Integer) && Lexer.isNot(AsmToken::Real) && in parseRealValue()
3831 Lexer.isNot(AsmToken::Identifier)) in parseRealValue()
4008 Lexer.UnLex(AsmToken(AsmToken::Less, Tok.getString().substr(1))); in parseOptionalAngleBracketOpen()
4012 Lexer.UnLex(AsmToken(AsmToken::Greater, Tok.getString().substr(1))); in parseOptionalAngleBracketOpen()
4025 Lexer.UnLex(AsmToken(AsmToken::Greater, Tok.getString().substr(1))); in parseAngleBracketClose()
4664 SMLoc OffsetLoc = Lexer.getLoc(); in parseDirectiveOrg()
5488 getStreamer().emitCFIStartProc(!Simple.empty(), Lexer.getLoc()); in parseDirectiveCFIStartProc()
5759 return Error(Lexer.getLoc(), in parseDirectiveMacro()
5773 if (Lexer.is(AsmToken::Colon)) { in parseDirectiveMacro()
5780 ParamLoc = Lexer.getLoc(); in parseDirectiveMacro()
5787 QualLoc = Lexer.getLoc(); in parseDirectiveMacro()
5812 Lexer.Lex(); in parseDirectiveMacro()
5839 while (Lexer.is(AsmToken::Error)) { in parseDirectiveMacro()
5840 Lexer.Lex(); in parseDirectiveMacro()
5853 Lexer.Lex(); in parseDirectiveMacro()
6049 LCOMM::LCOMMType LCOMM = Lexer.getMAI().getLCOMMDirectiveAlignmentType(); in parseDirectiveComm()
6054 if ((!IsLocal && Lexer.getMAI().getCOMMDirectiveAlignmentIsInBytes()) || in parseDirectiveComm()
6199 if (Lexer.isNot(AsmToken::Comma)) { in parseDirectiveIfidn()
6410 if (Lexer.isNot(AsmToken::Comma)) { in parseDirectiveElseIfidn()
6465 while (Lexer.isNot(AsmToken::Eof)) in parseDirectiveEnd()
6466 Lexer.Lex(); in parseDirectiveEnd()
6482 if (Lexer.isNot(AsmToken::EndOfStatement)) in parseDirectiveError()
6504 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseDirectiveErrorIfb()
6548 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseDirectiveErrorIfdef()
6579 if (Lexer.isNot(AsmToken::Comma)) { in parseDirectiveErrorIfidn()
6599 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseDirectiveErrorIfidn()
6635 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseDirectiveErrorIfe()
6821 if (Lexer.is(AsmToken::Identifier) && in parseMacroLikeBody()
6826 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseMacroLikeBody()
6899 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in expandStatement()
6925 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in instantiateMacroLikeBody()
7018 ParamLoc = Lexer.getLoc(); in parseDirectiveFor()
7025 QualLoc = Lexer.getLoc(); in parseDirectiveFor()