Lines Matching refs:Parser
1 //===- AsmParser.cpp - Parser for Assembly Files --------------------------===//
10 // This class implements the parser for assembly files.
114 /// \brief The concrete assembly parser instance.
135 /// \brief maps directive names to handler methods in parser
264 /// \brief Are macros enabled in the parser?
267 /// \brief Control a flag in the parser that enables or disables macros.
518 // Initialize the platform / file format parser.
1494 // 1. The target-specific assembly parser. Some directives are target
1496 // 2. Asm parser extensions. For example, platform-specific parsers
1497 // (like the ELF parser) register themselves as extensions.
1498 // 3. The generic directive parser implemented by this class. These are
1503 // First query the target-specific parser. It will return 'true' if it
1792 // Don't skip the rest of the line, the instruction parser is responsible for
1845 const AsmParser *Parser = static_cast<const AsmParser *>(Context);
1852 Parser->SrcMgr.FindBufferContainingLoc(Parser->CppHashLoc);
1857 if (!Parser->SavedDiagHandler && DiagCurBuffer &&
1866 if (!Parser->CppHashLineNumber || &DiagSrcMgr != &Parser->SrcMgr ||
1868 if (Parser->SavedDiagHandler)
1869 Parser->SavedDiagHandler(Diag, Parser->SavedDiagContext);
1878 const std::string &Filename = Parser->CppHashFilename;
1882 Parser->SrcMgr.FindLineNumber(Parser->CppHashLoc, CppHashBuf);
1884 Parser->CppHashLineNumber - 1 + (DiagLocLineNo - CppHashLocLineNo);
1890 if (Parser->SavedDiagHandler)
1891 Parser->SavedDiagHandler(NewDiag, Parser->SavedDiagContext);
4923 MCAsmParser &Parser, MCSymbol *&Sym,
4925 MCAsmLexer &Lexer = Parser.getLexer();
4930 if (Parser.parseExpression(Value)) {
4931 Parser.TokError("missing expression");
4932 Parser.eatToEndOfStatement();
4941 return Parser.TokError("unexpected token in assignment");
4944 Parser.Lex();
4948 Sym = Parser.getContext().lookupSymbol(Name);
4955 return Parser.Error(EqualLoc, "Recursive use of '" + Name + "'");
4962 return Parser.Error(EqualLoc, "redefinition of '" + Name + "'");
4964 return Parser.Error(EqualLoc, "invalid assignment to '" + Name + "'");
4966 return Parser.Error(EqualLoc,
4970 Parser.getStreamer().emitValueToOffset(Value, 0);
4973 Sym = Parser.getContext().getOrCreateSymbol(Name);