• Home
  • Raw
  • Download

Lines Matching refs:Lexer

117   AsmLexer Lexer;  member in __anon5d4cfdd40111::AsmParser
206 MCAsmLexer &getLexer() override { return Lexer; } in getLexer()
262 Lexer.Lex(); in parseEOL()
263 Lexer.UnLex(AsmToken(AsmToken::EndOfStatement, CommentStr)); in parseEOL()
561 : Lexer(MAI), Ctx(Ctx), Out(Out), MAI(MAI), SrcMgr(SM), in AsmParser()
570 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in AsmParser()
632 SrcMgr.AddIncludeFile(Filename, Lexer.getLoc(), IncludedFile); in enterIncludeFile()
637 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in enterIncludeFile()
647 SrcMgr.AddIncludeFile(Filename, Lexer.getLoc(), IncludedFile); in processIncbinFile()
658 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer(), in jumpToLoc()
663 if (Lexer.getTok().is(AsmToken::Error)) in Lex()
664 Error(Lexer.getErrLoc(), Lexer.getErr()); in Lex()
674 const AsmToken *tok = &Lexer.Lex(); in Lex()
680 tok = &Lexer.Lex(); in Lex()
725 while (Lexer.isNot(AsmToken::Eof)) { in Run()
732 if (Lexer.getTok().is(AsmToken::Error)) { in Run()
808 while (Lexer.isNot(AsmToken::EndOfStatement) && Lexer.isNot(AsmToken::Eof)) in eatToEndOfStatement()
809 Lexer.Lex(); in eatToEndOfStatement()
812 if (Lexer.is(AsmToken::EndOfStatement)) in eatToEndOfStatement()
813 Lexer.Lex(); in eatToEndOfStatement()
819 while (Lexer.isNot(AsmToken::EndOfStatement) && Lexer.isNot(AsmToken::Eof)) in parseStringToEndOfStatement()
820 Lexer.Lex(); in parseStringToEndOfStatement()
829 while (Lexer.isNot(AsmToken::EndOfStatement) && in parseStringToComma()
830 Lexer.isNot(AsmToken::Comma) && Lexer.isNot(AsmToken::Eof)) in parseStringToComma()
831 Lexer.Lex(); in parseStringToComma()
845 if (Lexer.isNot(AsmToken::RParen)) in parseParenExpr()
847 EndLoc = Lexer.getTok().getEndLoc(); in parseParenExpr()
860 if (Lexer.isNot(AsmToken::RBrac)) in parseBracketExpr()
862 EndLoc = Lexer.getTok().getEndLoc(); in parseBracketExpr()
875 AsmToken::TokenKind FirstTokenKind = Lexer.getKind(); in parsePrimaryExpr()
895 if (Lexer.getMAI().getDollarIsPC()) { in parsePrimaryExpr()
912 if (Lexer.is(AsmToken::At)) { in parsePrimaryExpr()
924 } else if (Lexer.is(AsmToken::LParen)) { in parsePrimaryExpr()
928 if (Lexer.isNot(AsmToken::RParen)) { in parsePrimaryExpr()
929 return Error(Lexer.getTok().getLoc(), in parsePrimaryExpr()
978 EndLoc = Lexer.getTok().getEndLoc(); in parsePrimaryExpr()
981 if (Lexer.getKind() == AsmToken::Identifier) { in parsePrimaryExpr()
999 EndLoc = Lexer.getTok().getEndLoc(); in parsePrimaryExpr()
1009 EndLoc = Lexer.getTok().getEndLoc(); in parsePrimaryExpr()
1019 EndLoc = Lexer.getTok().getEndLoc(); in parsePrimaryExpr()
1130 if (Lexer.getKind() == AsmToken::At) { in parseExpression()
1133 if (Lexer.isNot(AsmToken::Identifier)) in parseExpression()
1176 if (Lexer.isNot(AsmToken::RParen)) in parseParenExprOfDepth()
1178 EndLoc = Lexer.getTok().getEndLoc(); in parseParenExprOfDepth()
1188 SMLoc StartLoc = Lexer.getLoc(); in parseAbsoluteExpression()
1365 unsigned TokPrec = getBinOpPrecedence(Lexer.getKind(), Kind); in parseBinOpRHS()
1382 unsigned NextTokPrec = getBinOpPrecedence(Lexer.getKind(), Dummy); in parseBinOpRHS()
1398 while (Lexer.is(AsmToken::Space)) in parseStatement()
1400 if (Lexer.is(AsmToken::EndOfStatement)) { in parseStatement()
1408 if (Lexer.is(AsmToken::Hash)) { in parseStatement()
1414 Lexer.Lex(); in parseStatement()
1415 Lexer.UnLex(AsmToken(AsmToken::EndOfStatement, CommentStr)); in parseStatement()
1423 if (Lexer.is(AsmToken::HashDirective)) in parseStatement()
1426 if (Lexer.is(AsmToken::Integer)) { in parseStatement()
1435 if (Lexer.getKind() != AsmToken::Colon) { in parseStatement()
1440 } else if (Lexer.is(AsmToken::Dot)) { in parseStatement()
1444 } else if (Lexer.is(AsmToken::LCurly)) { in parseStatement()
1449 } else if (Lexer.is(AsmToken::RCurly)) { in parseStatement()
1513 switch (Lexer.getKind()) { in parseStatement()
1557 Lexer.Lex(); in parseStatement()
1558 Lexer.UnLex(AsmToken(AsmToken::EndOfStatement, CommentStr)); in parseStatement()
1932 if (Lexer.isNot(AsmToken::LCurly) && Lexer.isNot(AsmToken::RCurly)) in parseCurlyBlockScope()
1935 SMLoc StartLoc = Lexer.getLoc(); in parseCurlyBlockScope()
1937 if (Lexer.is(AsmToken::EndOfStatement)) in parseCurlyBlockScope()
1941 AsmStrRewrites.emplace_back(AOK_Skip, StartLoc, Lexer.getLoc().getPointer() - in parseCurlyBlockScope()
2187 AsmLexerSkipSpaceRAII(AsmLexer &Lexer, bool SkipSpace) : Lexer(Lexer) { in AsmLexerSkipSpaceRAII() argument
2188 Lexer.setSkipSpace(SkipSpace); in AsmLexerSkipSpaceRAII()
2192 Lexer.setSkipSpace(true); in ~AsmLexerSkipSpaceRAII()
2196 AsmLexer &Lexer; member in __anon5d4cfdd40311::AsmLexerSkipSpaceRAII
2203 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseMacroArgument()
2213 AsmLexerSkipSpaceRAII ScopedSkipSpace(Lexer, IsDarwin); in parseMacroArgument()
2219 if (Lexer.is(AsmToken::Eof) || Lexer.is(AsmToken::Equal)) in parseMacroArgument()
2224 if (Lexer.is(AsmToken::Comma)) in parseMacroArgument()
2227 if (Lexer.is(AsmToken::Space)) { in parseMacroArgument()
2229 Lexer.Lex(); // Eat spaces in parseMacroArgument()
2236 if (isOperator(Lexer.getKind())) { in parseMacroArgument()
2238 Lexer.Lex(); in parseMacroArgument()
2241 if (Lexer.is(AsmToken::Space)) in parseMacroArgument()
2242 Lexer.Lex(); in parseMacroArgument()
2253 if (Lexer.is(AsmToken::EndOfStatement)) in parseMacroArgument()
2257 if (Lexer.is(AsmToken::LParen)) in parseMacroArgument()
2259 else if (Lexer.is(AsmToken::RParen) && ParenLevel) in parseMacroArgument()
2264 Lexer.Lex(); in parseMacroArgument()
2288 SMLoc IDLoc = Lexer.getLoc(); in parseMacroArguments()
2291 if (Lexer.is(AsmToken::Identifier) && Lexer.peekTok().is(AsmToken::Equal)) { in parseMacroArguments()
2298 if (!Lexer.is(AsmToken::Equal)) { in parseMacroArguments()
2343 FALocs[PI] = Lexer.getLoc(); in parseMacroArguments()
2349 if (Lexer.is(AsmToken::EndOfStatement)) { in parseMacroArguments()
2354 Error(FALocs[FAI].isValid() ? FALocs[FAI] : Lexer.getLoc(), in parseMacroArguments()
2367 if (Lexer.is(AsmToken::Comma)) in parseMacroArguments()
2421 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in handleMacroEntry()
2469 if (Lexer.is(AsmToken::Dollar) || Lexer.is(AsmToken::At)) { in parseIdentifier()
2473 Lexer.Lex(); // Lexer's Lex guarantees consecutive token. in parseIdentifier()
2474 if (Lexer.isNot(AsmToken::Identifier)) in parseIdentifier()
2488 if (Lexer.isNot(AsmToken::Identifier) && Lexer.isNot(AsmToken::String)) in parseIdentifier()
2612 SMLoc OffsetLoc = Lexer.getTok().getLoc(); in parseDirectiveReloc()
2624 if (Lexer.isNot(AsmToken::Comma)) in parseDirectiveReloc()
2628 if (Lexer.isNot(AsmToken::Identifier)) in parseDirectiveReloc()
2630 SMLoc NameLoc = Lexer.getTok().getLoc(); in parseDirectiveReloc()
2631 StringRef Name = Lexer.getTok().getIdentifier(); in parseDirectiveReloc()
2634 if (Lexer.is(AsmToken::Comma)) { in parseDirectiveReloc()
2636 SMLoc ExprLoc = Lexer.getLoc(); in parseDirectiveReloc()
2645 if (Lexer.isNot(AsmToken::EndOfStatement)) in parseDirectiveReloc()
2697 if (Lexer.getKind() == AsmToken::Error) in parseDirectiveOctaValue()
2699 if (Lexer.getKind() != AsmToken::Integer && in parseDirectiveOctaValue()
2700 Lexer.getKind() != AsmToken::BigNum) in parseDirectiveOctaValue()
2751 Lexer.Lex(); in parseDirectiveRealValue()
2754 Lexer.Lex(); in parseDirectiveRealValue()
2756 if (Lexer.is(AsmToken::Error)) in parseDirectiveRealValue()
2757 return TokError(Lexer.getErr()); in parseDirectiveRealValue()
2758 if (Lexer.isNot(AsmToken::Integer) && Lexer.isNot(AsmToken::Real) && in parseDirectiveRealValue()
2759 Lexer.isNot(AsmToken::Identifier)) in parseDirectiveRealValue()
2786 if (Lexer.is(AsmToken::EndOfStatement)) in parseDirectiveRealValue()
2789 if (Lexer.isNot(AsmToken::Comma)) in parseDirectiveRealValue()
2804 SMLoc NumBytesLoc = Lexer.getLoc(); in parseDirectiveZero()
2831 SMLoc NumValuesLoc = Lexer.getLoc(); in parseDirectiveFill()
2996 if ((!HasFillExpr || Lexer.getMAI().getTextAlignFillValue() == FillExpr) && in parseDirectiveAlign()
3304 if (Lexer.isNot(AsmToken::Comma)) in parseDirectiveCVLinetable()
3313 if (Lexer.isNot(AsmToken::Comma)) in parseDirectiveCVLinetable()
3780 return Error(Lexer.getLoc(), in parseDirectiveMacro()
3788 if (Lexer.is(AsmToken::Colon)) { in parseDirectiveMacro()
3794 QualLoc = Lexer.getLoc(); in parseDirectiveMacro()
3813 ParamLoc = Lexer.getLoc(); in parseDirectiveMacro()
3829 Lexer.Lex(); in parseDirectiveMacro()
3837 while (Lexer.is(AsmToken::Error)) { in parseDirectiveMacro()
3838 Lexer.Lex(); in parseDirectiveMacro()
3851 Lexer.Lex(); in parseDirectiveMacro()
4115 SMLoc NumBytesLoc = Lexer.getLoc(); in parseDirectiveSpace()
4230 LCOMM::LCOMMType LCOMM = Lexer.getMAI().getLCOMMDirectiveAlignmentType(); in parseDirectiveComm()
4235 if ((!IsLocal && Lexer.getMAI().getCOMMDirectiveAlignmentIsInBytes()) || in parseDirectiveComm()
4450 if (Lexer.isNot(AsmToken::String)) { in parseDirectiveIfeqs()
4462 if (Lexer.isNot(AsmToken::Comma)) { in parseDirectiveIfeqs()
4473 if (Lexer.isNot(AsmToken::String)) { in parseDirectiveIfeqs()
4583 while (Lexer.isNot(AsmToken::Eof)) in parseDirectiveEnd()
4604 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseDirectiveError()
4605 if (Lexer.isNot(AsmToken::String)) { in parseDirectiveError()
4630 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseDirectiveWarning()
4631 if (Lexer.isNot(AsmToken::String)) { in parseDirectiveWarning()
4801 if (Lexer.is(AsmToken::Identifier) && in parseMacroLikeBody()
4809 if (Lexer.is(AsmToken::Identifier) && getTok().getIdentifier() == ".endr") { in parseMacroLikeBody()
4813 if (Lexer.isNot(AsmToken::EndOfStatement)) { in parseMacroLikeBody()
4850 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in instantiateMacroLikeBody()
4871 if (Lexer.isNot(AsmToken::EndOfStatement)) in parseDirectiveRept()
4904 if (Lexer.isNot(AsmToken::Comma)) in parseDirectiveIrp()
4946 if (Lexer.isNot(AsmToken::Comma)) in parseDirectiveIrpc()