Lines Matching refs:Lexer
119 AsmLexer Lexer; member in __anona4f6dc500111::AsmParser
201 MCAsmLexer &getLexer() override { return Lexer; } in getLexer()
507 : Lexer(MAI), Ctx(Ctx), Out(Out), MAI(MAI), SrcMgr(SM), in AsmParser()
516 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in AsmParser()
578 SrcMgr.AddIncludeFile(Filename, Lexer.getLoc(), IncludedFile); in enterIncludeFile()
583 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in enterIncludeFile()
593 SrcMgr.AddIncludeFile(Filename, Lexer.getLoc(), IncludedFile); in processIncbinFile()
604 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer(), in jumpToLoc()
609 const AsmToken *tok = &Lexer.Lex(); in Lex()
617 tok = &Lexer.Lex(); in Lex()
622 Error(Lexer.getErrLoc(), Lexer.getErr()); in Lex()
655 while (Lexer.isNot(AsmToken::Eof)) { in Run()
718 while (Lexer.isNot(AsmToken::EndOfStatement) && Lexer.isNot(AsmToken::Eof)) in eatToEndOfStatement()
722 if (Lexer.is(AsmToken::EndOfStatement)) in eatToEndOfStatement()
729 while (Lexer.isNot(AsmToken::EndOfStatement) && Lexer.isNot(AsmToken::Eof)) in parseStringToEndOfStatement()
739 while (Lexer.isNot(AsmToken::EndOfStatement) && in parseStringToComma()
740 Lexer.isNot(AsmToken::Comma) && Lexer.isNot(AsmToken::Eof)) in parseStringToComma()
755 if (Lexer.isNot(AsmToken::RParen)) in parseParenExpr()
757 EndLoc = Lexer.getTok().getEndLoc(); in parseParenExpr()
770 if (Lexer.isNot(AsmToken::RBrac)) in parseBracketExpr()
772 EndLoc = Lexer.getTok().getEndLoc(); in parseBracketExpr()
785 AsmToken::TokenKind FirstTokenKind = Lexer.getKind(); in parsePrimaryExpr()
805 if (Lexer.getMAI().getDollarIsPC()) { in parsePrimaryExpr()
822 if (Lexer.is(AsmToken::At)) { in parsePrimaryExpr()
823 Lexer.Lex(); // eat @ in parsePrimaryExpr()
834 } else if (Lexer.is(AsmToken::LParen)) { in parsePrimaryExpr()
835 Lexer.Lex(); // eat ( in parsePrimaryExpr()
838 if (Lexer.isNot(AsmToken::RParen)) { in parsePrimaryExpr()
839 return Error(Lexer.getTok().getLoc(), in parsePrimaryExpr()
842 Lexer.Lex(); // eat ) in parsePrimaryExpr()
888 EndLoc = Lexer.getTok().getEndLoc(); in parsePrimaryExpr()
891 if (Lexer.getKind() == AsmToken::Identifier) { in parsePrimaryExpr()
908 EndLoc = Lexer.getTok().getEndLoc(); in parsePrimaryExpr()
918 EndLoc = Lexer.getTok().getEndLoc(); in parsePrimaryExpr()
928 EndLoc = Lexer.getTok().getEndLoc(); in parsePrimaryExpr()
1039 if (Lexer.getKind() == AsmToken::At) { in parseExpression()
1042 if (Lexer.isNot(AsmToken::Identifier)) in parseExpression()
1085 if (Lexer.isNot(AsmToken::RParen)) in parseParenExprOfDepth()
1087 EndLoc = Lexer.getTok().getEndLoc(); in parseParenExprOfDepth()
1097 SMLoc StartLoc = Lexer.getLoc(); in parseAbsoluteExpression()
1274 unsigned TokPrec = getBinOpPrecedence(Lexer.getKind(), Kind); in parseBinOpRHS()
1291 unsigned NextTokPrec = getBinOpPrecedence(Lexer.getKind(), Dummy); in parseBinOpRHS()
1306 if (Lexer.is(AsmToken::EndOfStatement)) { in parseStatement()
1318 if (Lexer.is(AsmToken::Hash)) in parseStatement()
1322 if (Lexer.is(AsmToken::Integer)) { in parseStatement()
1331 if (Lexer.getKind() != AsmToken::Colon) { in parseStatement()
1336 } else if (Lexer.is(AsmToken::Dot)) { in parseStatement()
1340 } else if (Lexer.is(AsmToken::LCurly)) { in parseStatement()
1345 } else if (Lexer.is(AsmToken::RCurly)) { in parseStatement()
1409 switch (Lexer.getKind()) { in parseStatement()
1461 if (Lexer.is(AsmToken::EndOfStatement)) { in parseStatement()
1463 if (Lexer.is(AsmToken::Eof)) in parseStatement()
1800 if (!Lexer.is(AsmToken::EndOfStatement)) in eatToEndOfLine()
1801 Lexer.LexUntilEndOfLine(); in eatToEndOfLine()
2059 AsmLexerSkipSpaceRAII(AsmLexer &Lexer, bool SkipSpace) : Lexer(Lexer) { in AsmLexerSkipSpaceRAII() argument
2060 Lexer.setSkipSpace(SkipSpace); in AsmLexerSkipSpaceRAII()
2064 Lexer.setSkipSpace(true); in ~AsmLexerSkipSpaceRAII()
2068 AsmLexer &Lexer; member in __anona4f6dc500311::AsmLexerSkipSpaceRAII
2075 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseMacroArgument()
2086 AsmLexerSkipSpaceRAII ScopedSkipSpace(Lexer, IsDarwin); in parseMacroArgument()
2089 if (Lexer.is(AsmToken::Eof) || Lexer.is(AsmToken::Equal)) in parseMacroArgument()
2092 if (ParenLevel == 0 && Lexer.is(AsmToken::Comma)) in parseMacroArgument()
2095 if (Lexer.is(AsmToken::Space)) { in parseMacroArgument()
2102 if (isOperator(Lexer.getKind())) { in parseMacroArgument()
2118 if (Lexer.is(AsmToken::EndOfStatement)) in parseMacroArgument()
2122 if (Lexer.is(AsmToken::LParen)) in parseMacroArgument()
2124 else if (Lexer.is(AsmToken::RParen) && ParenLevel) in parseMacroArgument()
2155 SMLoc IDLoc = Lexer.getLoc(); in parseMacroArguments()
2158 if (Lexer.is(AsmToken::Identifier) && Lexer.peekTok().is(AsmToken::Equal)) { in parseMacroArguments()
2165 if (!Lexer.is(AsmToken::Equal)) { in parseMacroArguments()
2210 FALocs[PI] = Lexer.getLoc(); in parseMacroArguments()
2216 if (Lexer.is(AsmToken::EndOfStatement)) { in parseMacroArguments()
2221 Error(FALocs[FAI].isValid() ? FALocs[FAI] : Lexer.getLoc(), in parseMacroArguments()
2234 if (Lexer.is(AsmToken::Comma)) in parseMacroArguments()
2288 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in handleMacroEntry()
2336 if (Lexer.is(AsmToken::Dollar) || Lexer.is(AsmToken::At)) { in parseIdentifier()
2341 if (Lexer.isNot(AsmToken::Identifier)) in parseIdentifier()
2355 if (Lexer.isNot(AsmToken::Identifier) && Lexer.isNot(AsmToken::String)) in parseIdentifier()
2479 SMLoc OffsetLoc = Lexer.getTok().getLoc(); in parseDirectiveReloc()
2488 if (Lexer.isNot(AsmToken::Comma)) in parseDirectiveReloc()
2490 Lexer.Lex(); in parseDirectiveReloc()
2492 if (Lexer.isNot(AsmToken::Identifier)) in parseDirectiveReloc()
2494 SMLoc NameLoc = Lexer.getTok().getLoc(); in parseDirectiveReloc()
2495 StringRef Name = Lexer.getTok().getIdentifier(); in parseDirectiveReloc()
2496 Lexer.Lex(); in parseDirectiveReloc()
2498 if (Lexer.is(AsmToken::Comma)) { in parseDirectiveReloc()
2499 Lexer.Lex(); in parseDirectiveReloc()
2500 SMLoc ExprLoc = Lexer.getLoc(); in parseDirectiveReloc()
2509 if (Lexer.isNot(AsmToken::EndOfStatement)) in parseDirectiveReloc()
2561 if (Lexer.getKind() == AsmToken::Error) in parseDirectiveOctaValue()
2563 if (Lexer.getKind() != AsmToken::Integer && in parseDirectiveOctaValue()
2564 Lexer.getKind() != AsmToken::BigNum) in parseDirectiveOctaValue()
2872 if ((!HasFillExpr || Lexer.getMAI().getTextAlignFillValue() == FillExpr) && in parseDirectiveAlign()
3415 return Error(Lexer.getLoc(), in parseDirectiveMacro()
3423 if (Lexer.is(AsmToken::Colon)) { in parseDirectiveMacro()
3429 QualLoc = Lexer.getLoc(); in parseDirectiveMacro()
3448 ParamLoc = Lexer.getLoc(); in parseDirectiveMacro()
3863 LCOMM::LCOMMType LCOMM = Lexer.getMAI().getLCOMMDirectiveAlignmentType(); in parseDirectiveComm()
3868 if ((!IsLocal && Lexer.getMAI().getCOMMDirectiveAlignmentIsInBytes()) || in parseDirectiveComm()
4083 if (Lexer.isNot(AsmToken::String)) { in parseDirectiveIfeqs()
4095 if (Lexer.isNot(AsmToken::Comma)) { in parseDirectiveIfeqs()
4106 if (Lexer.isNot(AsmToken::String)) { in parseDirectiveIfeqs()
4216 while (Lexer.isNot(AsmToken::Eof)) in parseDirectiveEnd()
4237 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseDirectiveError()
4238 if (Lexer.isNot(AsmToken::String)) { in parseDirectiveError()
4263 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseDirectiveWarning()
4264 if (Lexer.isNot(AsmToken::String)) { in parseDirectiveWarning()
4427 if (Lexer.is(AsmToken::Identifier) && in parseMacroLikeBody()
4433 if (Lexer.is(AsmToken::Identifier) && getTok().getIdentifier() == ".endr") { in parseMacroLikeBody()
4437 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseMacroLikeBody()
4474 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in instantiateMacroLikeBody()
4495 if (Lexer.isNot(AsmToken::EndOfStatement)) in parseDirectiveRept()
4528 if (Lexer.isNot(AsmToken::Comma)) in parseDirectiveIrp()
4570 if (Lexer.isNot(AsmToken::Comma)) in parseDirectiveIrpc()
4925 MCAsmLexer &Lexer = Parser.getLexer(); in parseAssignmentExpression() local
4928 SMLoc EqualLoc = Lexer.getLoc(); in parseAssignmentExpression()
4940 if (Lexer.isNot(AsmToken::EndOfStatement)) in parseAssignmentExpression()