MLIR
20.0.0git
|
This class provides the implementation of the generic parser methods within AsmParser. More...
#include "AsmParser/AsmParserImpl.h"
Public Types | |
using | Delimiter = AsmParser::Delimiter |
Public Member Functions | |
AsmParserImpl (SMLoc nameLoc, Parser &parser) | |
~AsmParserImpl () override=default | |
SMLoc | getNameLoc () const override |
Return the location of the original name token. More... | |
bool | didEmitError () const |
Return if any errors were emitted during parsing. More... | |
InFlightDiagnostic | emitError (SMLoc loc, const Twine &message) override |
Emit a diagnostic at the specified location and return failure. More... | |
Builder & | getBuilder () const override |
Return a builder which provides useful access to MLIRContext, global objects like types and attributes. More... | |
SMLoc | getCurrentLocation () override |
Get the location of the next token and store it into the argument. More... | |
Location | getEncodedSourceLoc (SMLoc loc) override |
Re-encode the given source location as an MLIR location and return it. More... | |
ParseResult | parseArrow () override |
Parse a -> token. More... | |
ParseResult | parseOptionalArrow () override |
Parses a -> if present. More... | |
ParseResult | parseLBrace () override |
Parse a '{' token. More... | |
ParseResult | parseOptionalLBrace () override |
Parse a '{' token if present. More... | |
ParseResult | parseRBrace () override |
Parse a } token. More... | |
ParseResult | parseOptionalRBrace () override |
Parse a } token if present. More... | |
ParseResult | parseColon () override |
Parse a : token. More... | |
ParseResult | parseOptionalColon () override |
Parse a : token if present. More... | |
ParseResult | parseComma () override |
Parse a , token. More... | |
ParseResult | parseOptionalComma () override |
Parse a , token if present. More... | |
ParseResult | parseEllipsis () override |
Parses a ... . More... | |
ParseResult | parseOptionalEllipsis () override |
Parses a ... if present. More... | |
ParseResult | parseEqual () override |
Parse a = token. More... | |
ParseResult | parseOptionalEqual () override |
Parse a = token if present. More... | |
ParseResult | parseLess () override |
Parse a '<' token. More... | |
ParseResult | parseOptionalLess () override |
Parse a < token if present. More... | |
ParseResult | parseGreater () override |
Parse a '>' token. More... | |
ParseResult | parseOptionalGreater () override |
Parse a > token if present. More... | |
ParseResult | parseLParen () override |
Parse a ( token. More... | |
ParseResult | parseOptionalLParen () override |
Parses a '(' if present. More... | |
ParseResult | parseRParen () override |
Parse a ) token. More... | |
ParseResult | parseOptionalRParen () override |
Parses a ')' if present. More... | |
ParseResult | parseLSquare () override |
Parse a [ token. More... | |
ParseResult | parseOptionalLSquare () override |
Parses a '[' if present. More... | |
ParseResult | parseRSquare () override |
Parse a ] token. More... | |
ParseResult | parseOptionalRSquare () override |
Parses a ']' if present. More... | |
ParseResult | parseQuestion () override |
Parses a '?' token. More... | |
ParseResult | parseOptionalQuestion () override |
Parses a '?' if present. More... | |
ParseResult | parseStar () override |
Parses a '*' token. More... | |
ParseResult | parseOptionalStar () override |
Parses a '*' if present. More... | |
ParseResult | parsePlus () override |
Parses a '+' token. More... | |
ParseResult | parseOptionalPlus () override |
Parses a '+' token if present. More... | |
ParseResult | parseMinus () override |
Parses a '-' token. More... | |
ParseResult | parseOptionalMinus () override |
Parses a '-' token if present. More... | |
ParseResult | parseVerticalBar () override |
Parse a '|' token. More... | |
ParseResult | parseOptionalVerticalBar () override |
Parse a '|' token if present. More... | |
ParseResult | parseOptionalString (std::string *string) override |
Parses a quoted string token if present. More... | |
ParseResult | parseBase64Bytes (std::vector< char > *bytes) override |
Parses a Base64 encoded string of bytes. More... | |
ParseResult | parseFloat (const llvm::fltSemantics &semantics, APFloat &result) override |
Parse a floating point value with given semantics from the stream. More... | |
ParseResult | parseFloat (double &result) override |
Parse a floating point value from the stream. More... | |
OptionalParseResult | parseOptionalInteger (APInt &result) override |
Parse an optional integer value from the stream. More... | |
OptionalParseResult | parseOptionalDecimalInteger (APInt &result) override |
Parse an optional integer value from the stream. More... | |
ParseResult | parseCommaSeparatedList (Delimiter delimiter, function_ref< ParseResult()> parseElt, StringRef contextMessage) override |
Parse a list of comma-separated items with an optional delimiter. More... | |
ParseResult | parseKeyword (StringRef keyword, const Twine &msg) override |
ParseResult | parseOptionalKeyword (StringRef keyword) override |
Parse the given keyword if present. More... | |
ParseResult | parseOptionalKeyword (StringRef *keyword) override |
Parse a keyword, if present, into 'keyword'. More... | |
ParseResult | parseOptionalKeyword (StringRef *keyword, ArrayRef< StringRef > allowedKeywords) override |
Parse a keyword if it is one of the 'allowedKeywords'. More... | |
ParseResult | parseOptionalKeywordOrString (std::string *result) override |
Parse an optional keyword or string and set instance into 'result'.`. More... | |
ParseResult | parseAttribute (Attribute &result, Type type) override |
Parse an arbitrary attribute and return it in result. More... | |
ParseResult | parseCustomAttributeWithFallback (Attribute &result, Type type, function_ref< ParseResult(Attribute &result, Type type)> parseAttribute) override |
Parse a custom attribute with the provided callback, unless the next token is # , in which case the generic parser is invoked. More... | |
ParseResult | parseCustomTypeWithFallback (Type &result, function_ref< ParseResult(Type &result)> parseType) override |
Parse a custom attribute with the provided callback, unless the next token is # , in which case the generic parser is invoked. More... | |
OptionalParseResult | parseOptionalAttribute (Attribute &result, Type type) override |
OptionalParseResult | parseOptionalAttribute (ArrayAttr &result, Type type) override |
OptionalParseResult | parseOptionalAttribute (StringAttr &result, Type type) override |
OptionalParseResult | parseOptionalAttribute (SymbolRefAttr &result, Type type) override |
ParseResult | parseOptionalAttrDict (NamedAttrList &result) override |
Parse a named dictionary into 'result' if it is present. More... | |
ParseResult | parseOptionalAttrDictWithKeyword (NamedAttrList &result) override |
Parse a named dictionary into 'result' if the attributes keyword is present. More... | |
ParseResult | parseAffineMap (AffineMap &map) override |
Parse an affine map instance into 'map'. More... | |
ParseResult | parseAffineExpr (ArrayRef< std::pair< StringRef, AffineExpr >> symbolSet, AffineExpr &expr) override |
Parse an affine expr instance into 'expr' using the already computed mapping from symbols to affine expressions in 'symbolSet'. More... | |
ParseResult | parseIntegerSet (IntegerSet &set) override |
Parse an integer set instance into 'set'. More... | |
ParseResult | parseOptionalSymbolName (StringAttr &result) override |
Parse an optional -identifier and store it (without the '@' symbol) in a string attribute named 'attrName'. More... | |
FailureOr< AsmDialectResourceHandle > | parseResourceHandle (Dialect *dialect) override |
Parse a handle to a resource within the assembly format. More... | |
ParseResult | parseType (Type &result) override |
Parse a type. More... | |
OptionalParseResult | parseOptionalType (Type &result) override |
Parse an optional type. More... | |
ParseResult | parseArrowTypeList (SmallVectorImpl< Type > &result) override |
Parse an arrow followed by a type list. More... | |
ParseResult | parseOptionalArrowTypeList (SmallVectorImpl< Type > &result) override |
Parse an optional arrow followed by a type list. More... | |
ParseResult | parseColonType (Type &result) override |
Parse a colon followed by a type. More... | |
ParseResult | parseColonTypeList (SmallVectorImpl< Type > &result) override |
Parse a colon followed by a type list, which must have at least one type. More... | |
ParseResult | parseOptionalColonTypeList (SmallVectorImpl< Type > &result) override |
Parse an optional colon followed by a type list, which if present must have at least one type. More... | |
ParseResult | parseDimensionList (SmallVectorImpl< int64_t > &dimensions, bool allowDynamic, bool withTrailingX) override |
ParseResult | parseXInDimensionList () override |
LogicalResult | pushCyclicParsing (const void *opaquePointer) override |
void | popCyclicParsing () override |
ParseResult | parseKeywordOrCompletion (StringRef *keyword) override |
Parse a keyword, or an empty string if the current location signals a code completion. More... | |
void | codeCompleteExpectedTokens (ArrayRef< StringRef > tokens) override |
Signal the code completion of a set of expected tokens. More... | |
ParseResult | parseKeyword (StringRef keyword) |
Parse a given keyword. More... | |
virtual ParseResult | parseKeyword (StringRef keyword, const Twine &msg)=0 |
ParseResult | parseKeyword (StringRef *keyword) |
Parse a keyword into 'keyword'. More... | |
Protected Attributes | |
SMLoc | nameLoc |
The source location of the dialect symbol. More... | |
Parser & | parser |
The main parser. More... | |
bool | emittedError = false |
A flag that indicates if any errors were emitted during parsing. More... | |
This class provides the implementation of the generic parser methods within AsmParser.
Definition at line 28 of file AsmParserImpl.h.
using mlir::detail::AsmParserImpl< BaseT >::Delimiter = AsmParser::Delimiter |
Definition at line 67 of file AsmParserImpl.h.
|
inline |
Definition at line 30 of file AsmParserImpl.h.
|
overridedefault |
|
inlineoverride |
Signal the code completion of a set of expected tokens.
Definition at line 607 of file AsmParserImpl.h.
References mlir::detail::Parser::codeCompleteExpectedTokens(), mlir::Token::getSpelling(), mlir::detail::Parser::getToken(), mlir::Token::isCodeCompletion(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inline |
Return if any errors were emitted during parsing.
Definition at line 42 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::emittedError.
|
inlineoverride |
Emit a diagnostic at the specified location and return failure.
Definition at line 45 of file AsmParserImpl.h.
References mlir::detail::Parser::emitError(), mlir::detail::AsmParserImpl< BaseT >::emittedError, and mlir::detail::AsmParserImpl< BaseT >::parser.
Referenced by mlir::detail::AsmParserImpl< BaseT >::parseBase64Bytes(), and mlir::detail::AsmParserImpl< BaseT >::parseKeyword().
|
inlineoverride |
Return a builder which provides useful access to MLIRContext, global objects like types and attributes.
Definition at line 52 of file AsmParserImpl.h.
References mlir::detail::Parser::builder, and mlir::detail::AsmParserImpl< BaseT >::parser.
Referenced by mlir::detail::AsmParserImpl< BaseT >::parseOptionalSymbolName().
|
inlineoverride |
Get the location of the next token and store it into the argument.
This always succeeds.
Definition at line 56 of file AsmParserImpl.h.
References mlir::Token::getLoc(), mlir::detail::Parser::getToken(), and mlir::detail::AsmParserImpl< BaseT >::parser.
Referenced by mlir::detail::AsmParserImpl< BaseT >::parseBase64Bytes(), and mlir::detail::AsmParserImpl< BaseT >::parseKeyword().
|
inlineoverride |
Re-encode the given source location as an MLIR location and return it.
Definition at line 59 of file AsmParserImpl.h.
References mlir::detail::Parser::getEncodedSourceLocation(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Return the location of the original name token.
Definition at line 35 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::nameLoc.
|
inlineoverride |
Parse an affine expr instance into 'expr' using the already computed mapping from symbols to affine expressions in 'symbolSet'.
Definition at line 472 of file AsmParserImpl.h.
References mlir::detail::Parser::parseAffineExprReference(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse an affine map instance into 'map'.
Definition at line 465 of file AsmParserImpl.h.
References mlir::detail::Parser::parseAffineMapReference(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse a ->
token.
Definition at line 70 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
Referenced by mlir::detail::AsmParserImpl< BaseT >::parseArrowTypeList().
|
inlineoverride |
Parse an arrow followed by a type list.
Definition at line 536 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parseArrow(), mlir::detail::Parser::parseFunctionResultTypes(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse an arbitrary attribute and return it in result.
Definition at line 404 of file AsmParserImpl.h.
References mlir::detail::Parser::parseAttribute(), and mlir::detail::AsmParserImpl< BaseT >::parser.
Referenced by mlir::detail::AsmParserImpl< BaseT >::parseCustomAttributeWithFallback().
|
inlineoverride |
Parses a Base64 encoded string of bytes.
Definition at line 261 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeToken(), mlir::detail::AsmParserImpl< BaseT >::emitError(), mlir::detail::AsmParserImpl< BaseT >::getCurrentLocation(), mlir::detail::Parser::getToken(), mlir::detail::Parser::getTokenSpelling(), mlir::Token::is(), mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::toString().
|
inlineoverride |
Parse a :
token.
Definition at line 100 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parse a colon followed by a type.
Definition at line 551 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, mlir::detail::Parser::parseToken(), and mlir::detail::Parser::parseType().
|
inlineoverride |
Parse a colon followed by a type list, which must have at least one type.
Definition at line 557 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, mlir::detail::Parser::parseToken(), and mlir::detail::Parser::parseTypeListNoParens().
|
inlineoverride |
Parse a ,
token.
Definition at line 110 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parse a list of comma-separated items with an optional delimiter.
If a delimiter is provided, then an empty list is allowed. If not, then at least one element will be parsed.
Definition at line 322 of file AsmParserImpl.h.
References mlir::detail::Parser::parseCommaSeparatedList(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse a custom attribute with the provided callback, unless the next token is #
, in which case the generic parser is invoked.
Definition at line 411 of file AsmParserImpl.h.
References mlir::detail::Parser::getToken(), mlir::Token::isNot(), mlir::detail::AsmParserImpl< BaseT >::parseAttribute(), mlir::detail::Parser::parseAttribute(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse a custom attribute with the provided callback, unless the next token is #
, in which case the generic parser is invoked.
Definition at line 423 of file AsmParserImpl.h.
References mlir::detail::Parser::getToken(), mlir::Token::isNot(), mlir::detail::AsmParserImpl< BaseT >::parser, mlir::detail::Parser::parseType(), and mlir::detail::AsmParserImpl< BaseT >::parseType().
|
inlineoverride |
Definition at line 572 of file AsmParserImpl.h.
References mlir::detail::Parser::parseDimensionListRanked(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parses a ...
.
Definition at line 120 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parse a =
token.
Definition at line 130 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parse a floating point value with given semantics from the stream.
Since this implementation parses the string as double precision and only afterwards converts the value to the requested semantic, precision may be lost.
Definition at line 286 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), mlir::detail::Parser::consumeToken(), mlir::detail::Parser::getToken(), mlir::detail::Parser::parseFloatFromLiteral(), and mlir::detail::AsmParserImpl< BaseT >::parser.
Referenced by mlir::detail::AsmParserImpl< BaseT >::parseFloat().
|
inlineoverride |
Parse a floating point value from the stream.
Definition at line 300 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parseFloat().
|
inlineoverride |
Parse a '>' token.
Definition at line 150 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parse an integer set instance into 'set'.
Definition at line 478 of file AsmParserImpl.h.
References mlir::detail::Parser::parseIntegerSetReference(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inline |
Parse a keyword into 'keyword'.
Definition at line 895 of file OpImplementation.h.
|
inline |
Parse a given keyword.
Definition at line 889 of file OpImplementation.h.
Referenced by mlir::detail::AsmParserImpl< BaseT >::parseKeywordOrCompletion().
|
inlineoverride |
Definition at line 332 of file AsmParserImpl.h.
References mlir::detail::Parser::codeCompleteExpectedTokens(), mlir::detail::AsmParserImpl< BaseT >::emitError(), mlir::detail::AsmParserImpl< BaseT >::getCurrentLocation(), mlir::detail::Parser::getToken(), mlir::Token::isCodeCompletion(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalKeyword(), and mlir::detail::AsmParserImpl< BaseT >::parser.
virtual ParseResult mlir::AsmParser::parseKeyword |
|
inlineoverride |
Parse a keyword, or an empty string if the current location signals a code completion.
Definition at line 597 of file AsmParserImpl.h.
References mlir::Token::getSpelling(), mlir::detail::Parser::getToken(), mlir::Token::isCodeCompletion(), mlir::detail::AsmParserImpl< BaseT >::parseKeyword(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse a '{' token.
Definition at line 80 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parse a '<' token.
Definition at line 140 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parse a (
token.
Definition at line 160 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parse a [
token.
Definition at line 180 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parses a '-' token.
Definition at line 230 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parses a ->
if present.
Definition at line 75 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse an optional arrow followed by a type list.
Definition at line 544 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), mlir::detail::Parser::parseFunctionResultTypes(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse a named dictionary into 'result' if it is present.
Definition at line 450 of file AsmParserImpl.h.
References mlir::detail::Parser::getToken(), mlir::Token::isNot(), mlir::detail::Parser::parseAttributeDict(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse a named dictionary into 'result' if the attributes
keyword is present.
Definition at line 458 of file AsmParserImpl.h.
References mlir::detail::Parser::parseAttributeDict(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalKeyword(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Definition at line 436 of file AsmParserImpl.h.
References mlir::detail::Parser::parseOptionalAttribute(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Definition at line 432 of file AsmParserImpl.h.
References mlir::detail::Parser::parseOptionalAttribute(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Definition at line 440 of file AsmParserImpl.h.
References mlir::detail::Parser::parseOptionalAttribute(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Definition at line 444 of file AsmParserImpl.h.
References mlir::detail::Parser::parseOptionalAttribute(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse a :
token if present.
Definition at line 105 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse an optional colon followed by a type list, which if present must have at least one type.
Definition at line 566 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseTypeListNoParens().
|
inlineoverride |
Parse a ,
token if present.
Definition at line 115 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse an optional integer value from the stream.
Definition at line 315 of file AsmParserImpl.h.
References mlir::detail::Parser::parseOptionalDecimalInteger(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parses a ...
if present.
Definition at line 125 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse a =
token if present.
Definition at line 135 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse a >
token if present.
Definition at line 155 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse an optional integer value from the stream.
Definition at line 310 of file AsmParserImpl.h.
References mlir::detail::Parser::parseOptionalInteger(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse a keyword, if present, into 'keyword'.
Definition at line 357 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeToken(), mlir::detail::Parser::getTokenSpelling(), mlir::detail::Parser::isCurrentTokenAKeyword(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse a keyword if it is one of the 'allowedKeywords'.
Definition at line 369 of file AsmParserImpl.h.
References mlir::detail::Parser::codeCompleteOptionalTokens(), mlir::detail::Parser::consumeToken(), mlir::detail::Parser::getToken(), mlir::detail::Parser::getTokenSpelling(), mlir::Token::isCodeCompletion(), mlir::detail::Parser::isCurrentTokenAKeyword(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse the given keyword if present.
Definition at line 344 of file AsmParserImpl.h.
References mlir::detail::Parser::codeCompleteOptionalTokens(), mlir::detail::Parser::consumeToken(), mlir::detail::Parser::getToken(), mlir::detail::Parser::getTokenSpelling(), mlir::Token::isCodeCompletion(), mlir::detail::Parser::isCurrentTokenAKeyword(), and mlir::detail::AsmParserImpl< BaseT >::parser.
Referenced by mlir::detail::AsmParserImpl< BaseT >::parseKeyword(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalAttrDictWithKeyword(), and mlir::detail::AsmParserImpl< BaseT >::parseOptionalKeywordOrString().
|
inlineoverride |
Parse an optional keyword or string and set instance into 'result'.`.
Definition at line 389 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parseOptionalKeyword(), and mlir::detail::AsmParserImpl< BaseT >::parseOptionalString().
|
inlineoverride |
Parse a '{' token if present.
Definition at line 85 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse a <
token if present.
Definition at line 145 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parses a '(' if present.
Definition at line 165 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parses a '[' if present.
Definition at line 185 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parses a '-' token if present.
Definition at line 235 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parses a '+' token if present.
Definition at line 225 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parses a '?' if present.
Definition at line 205 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse a }
token if present.
Definition at line 95 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parses a ')' if present.
Definition at line 175 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parses a ']' if present.
Definition at line 195 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parses a '*' if present.
Definition at line 215 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parses a quoted string token if present.
Definition at line 250 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeToken(), mlir::Token::getStringValue(), mlir::detail::Parser::getToken(), mlir::Token::is(), and mlir::detail::AsmParserImpl< BaseT >::parser.
Referenced by mlir::detail::AsmParserImpl< BaseT >::parseOptionalKeywordOrString().
|
inlineoverride |
Parse an optional -identifier and store it (without the '@' symbol) in a string attribute named 'attrName'.
Definition at line 488 of file AsmParserImpl.h.
References mlir::AsmParserState::addUses(), mlir::detail::ParserState::asmState, mlir::detail::Parser::consumeToken(), mlir::get(), mlir::detail::AsmParserImpl< BaseT >::getBuilder(), mlir::Token::getLocRange(), mlir::detail::Parser::getState(), mlir::Builder::getStringAttr(), mlir::Token::getSymbolReference(), mlir::detail::Parser::getToken(), mlir::Token::isNot(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse an optional type.
Definition at line 531 of file AsmParserImpl.h.
References mlir::detail::Parser::parseOptionalType(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parse a '|' token if present.
Definition at line 245 of file AsmParserImpl.h.
References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Parses a '+' token.
Definition at line 220 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parses a '?' token.
Definition at line 200 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parse a }
token.
Definition at line 90 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parse a handle to a resource within the assembly format.
Definition at line 511 of file AsmParserImpl.h.
References mlir::detail::Parser::emitError(), mlir::Dialect::getNamespace(), mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseResourceHandle().
|
inlineoverride |
Parse a )
token.
Definition at line 170 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parse a ]
token.
Definition at line 190 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parses a '*' token.
Definition at line 210 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Parse a type.
Definition at line 526 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseType().
Referenced by mlir::detail::AsmParserImpl< BaseT >::parseCustomTypeWithFallback().
|
inlineoverride |
Parse a '|' token.
Definition at line 240 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().
|
inlineoverride |
Definition at line 579 of file AsmParserImpl.h.
References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseXInDimensionList().
|
inlineoverride |
Definition at line 587 of file AsmParserImpl.h.
References mlir::detail::ParserState::cyclicParsingStack, mlir::detail::Parser::getState(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
inlineoverride |
Definition at line 583 of file AsmParserImpl.h.
References mlir::detail::ParserState::cyclicParsingStack, mlir::detail::Parser::getState(), and mlir::detail::AsmParserImpl< BaseT >::parser.
|
protected |
A flag that indicates if any errors were emitted during parsing.
Definition at line 621 of file AsmParserImpl.h.
Referenced by mlir::detail::AsmParserImpl< BaseT >::didEmitError(), and mlir::detail::AsmParserImpl< BaseT >::emitError().
|
protected |
The source location of the dialect symbol.
Definition at line 615 of file AsmParserImpl.h.
Referenced by mlir::detail::AsmParserImpl< BaseT >::getNameLoc().
|
protected |
The main parser.
Definition at line 618 of file AsmParserImpl.h.
Referenced by mlir::detail::AsmParserImpl< BaseT >::codeCompleteExpectedTokens(), mlir::detail::AsmParserImpl< BaseT >::emitError(), mlir::detail::AsmParserImpl< BaseT >::getBuilder(), mlir::detail::AsmParserImpl< BaseT >::getCurrentLocation(), mlir::detail::AsmParserImpl< BaseT >::getEncodedSourceLoc(), mlir::detail::AsmParserImpl< BaseT >::parseAffineExpr(), mlir::detail::AsmParserImpl< BaseT >::parseAffineMap(), mlir::detail::AsmParserImpl< BaseT >::parseArrow(), mlir::detail::AsmParserImpl< BaseT >::parseArrowTypeList(), mlir::detail::AsmParserImpl< BaseT >::parseAttribute(), mlir::detail::AsmParserImpl< BaseT >::parseBase64Bytes(), mlir::detail::AsmParserImpl< BaseT >::parseColon(), mlir::detail::AsmParserImpl< BaseT >::parseColonType(), mlir::detail::AsmParserImpl< BaseT >::parseColonTypeList(), mlir::detail::AsmParserImpl< BaseT >::parseComma(), mlir::detail::AsmParserImpl< BaseT >::parseCommaSeparatedList(), mlir::detail::AsmParserImpl< BaseT >::parseCustomAttributeWithFallback(), mlir::detail::AsmParserImpl< BaseT >::parseCustomTypeWithFallback(), mlir::detail::AsmParserImpl< BaseT >::parseDimensionList(), mlir::detail::AsmParserImpl< BaseT >::parseEllipsis(), mlir::detail::AsmParserImpl< BaseT >::parseEqual(), mlir::detail::AsmParserImpl< BaseT >::parseFloat(), mlir::detail::AsmParserImpl< BaseT >::parseGreater(), mlir::detail::AsmParserImpl< BaseT >::parseIntegerSet(), mlir::detail::AsmParserImpl< BaseT >::parseKeyword(), mlir::detail::AsmParserImpl< BaseT >::parseKeywordOrCompletion(), mlir::detail::AsmParserImpl< BaseT >::parseLBrace(), mlir::detail::AsmParserImpl< BaseT >::parseLess(), mlir::detail::AsmParserImpl< BaseT >::parseLParen(), mlir::detail::AsmParserImpl< BaseT >::parseLSquare(), mlir::detail::AsmParserImpl< BaseT >::parseMinus(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalArrow(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalArrowTypeList(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalAttrDict(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalAttrDictWithKeyword(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalAttribute(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalColon(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalColonTypeList(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalComma(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalDecimalInteger(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalEllipsis(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalEqual(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalGreater(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalInteger(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalKeyword(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalLBrace(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalLess(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalLParen(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalLSquare(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalMinus(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalPlus(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalQuestion(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalRBrace(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalRParen(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalRSquare(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalStar(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalString(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalSymbolName(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalType(), mlir::detail::AsmParserImpl< BaseT >::parseOptionalVerticalBar(), mlir::detail::AsmParserImpl< BaseT >::parsePlus(), mlir::detail::AsmParserImpl< BaseT >::parseQuestion(), mlir::detail::AsmParserImpl< BaseT >::parseRBrace(), mlir::detail::AsmParserImpl< BaseT >::parseResourceHandle(), mlir::detail::AsmParserImpl< BaseT >::parseRParen(), mlir::detail::AsmParserImpl< BaseT >::parseRSquare(), mlir::detail::AsmParserImpl< BaseT >::parseStar(), mlir::detail::AsmParserImpl< BaseT >::parseType(), mlir::detail::AsmParserImpl< BaseT >::parseVerticalBar(), mlir::detail::AsmParserImpl< BaseT >::parseXInDimensionList(), mlir::detail::AsmParserImpl< BaseT >::popCyclicParsing(), and mlir::detail::AsmParserImpl< BaseT >::pushCyclicParsing().