MLIR  20.0.0git
Public Types | Public Member Functions | Protected Attributes | List of all members
mlir::detail::AsmParserImpl< BaseT > Class Template Reference

This class provides the implementation of the generic parser methods within AsmParser. More...

#include "AsmParser/AsmParserImpl.h"

+ Inheritance diagram for mlir::detail::AsmParserImpl< BaseT >:

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...
 
BuildergetBuilder () 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< AsmDialectResourceHandleparseResourceHandle (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...
 
Parserparser
 The main parser. More...
 
bool emittedError = false
 A flag that indicates if any errors were emitted during parsing. More...
 

Detailed Description

template<typename BaseT>
class mlir::detail::AsmParserImpl< BaseT >

This class provides the implementation of the generic parser methods within AsmParser.

Definition at line 28 of file AsmParserImpl.h.

Member Typedef Documentation

◆ Delimiter

template<typename BaseT >
using mlir::detail::AsmParserImpl< BaseT >::Delimiter = AsmParser::Delimiter

Definition at line 67 of file AsmParserImpl.h.

Constructor & Destructor Documentation

◆ AsmParserImpl()

template<typename BaseT >
mlir::detail::AsmParserImpl< BaseT >::AsmParserImpl ( SMLoc  nameLoc,
Parser parser 
)
inline

Definition at line 30 of file AsmParserImpl.h.

◆ ~AsmParserImpl()

template<typename BaseT >
mlir::detail::AsmParserImpl< BaseT >::~AsmParserImpl ( )
overridedefault

Member Function Documentation

◆ codeCompleteExpectedTokens()

template<typename BaseT >
void mlir::detail::AsmParserImpl< BaseT >::codeCompleteExpectedTokens ( ArrayRef< StringRef >  tokens)
inlineoverride

◆ didEmitError()

template<typename BaseT >
bool mlir::detail::AsmParserImpl< BaseT >::didEmitError ( ) const
inline

Return if any errors were emitted during parsing.

Definition at line 42 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::emittedError.

◆ emitError()

template<typename BaseT >
InFlightDiagnostic mlir::detail::AsmParserImpl< BaseT >::emitError ( SMLoc  loc,
const Twine &  message 
)
inlineoverride

◆ getBuilder()

template<typename BaseT >
Builder& mlir::detail::AsmParserImpl< BaseT >::getBuilder ( ) const
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().

◆ getCurrentLocation()

template<typename BaseT >
SMLoc mlir::detail::AsmParserImpl< BaseT >::getCurrentLocation ( )
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().

◆ getEncodedSourceLoc()

template<typename BaseT >
Location mlir::detail::AsmParserImpl< BaseT >::getEncodedSourceLoc ( SMLoc  loc)
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.

◆ getNameLoc()

template<typename BaseT >
SMLoc mlir::detail::AsmParserImpl< BaseT >::getNameLoc ( ) const
inlineoverride

Return the location of the original name token.

Definition at line 35 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::nameLoc.

◆ parseAffineExpr()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseAffineExpr ( ArrayRef< std::pair< StringRef, AffineExpr >>  symbolSet,
AffineExpr expr 
)
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.

◆ parseAffineMap()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseAffineMap ( AffineMap map)
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.

◆ parseArrow()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseArrow ( )
inlineoverride

◆ parseArrowTypeList()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseArrowTypeList ( SmallVectorImpl< Type > &  result)
inlineoverride

◆ parseAttribute()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseAttribute ( Attribute result,
Type  type 
)
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().

◆ parseBase64Bytes()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseBase64Bytes ( std::vector< char > *  bytes)
inlineoverride

◆ parseColon()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseColon ( )
inlineoverride

Parse a : token.

Definition at line 100 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseColonType()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseColonType ( Type result)
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().

◆ parseColonTypeList()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseColonTypeList ( SmallVectorImpl< Type > &  result)
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().

◆ parseComma()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseComma ( )
inlineoverride

Parse a , token.

Definition at line 110 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseCommaSeparatedList()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseCommaSeparatedList ( Delimiter  delimiter,
function_ref< ParseResult()>  parseElt,
StringRef  contextMessage 
)
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.

◆ parseCustomAttributeWithFallback()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseCustomAttributeWithFallback ( Attribute result,
Type  type,
function_ref< ParseResult(Attribute &result, Type type)>  parseAttribute 
)
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.

◆ parseCustomTypeWithFallback()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseCustomTypeWithFallback ( Type result,
function_ref< ParseResult(Type &result)>  parseType 
)
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().

◆ parseDimensionList()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseDimensionList ( SmallVectorImpl< int64_t > &  dimensions,
bool  allowDynamic,
bool  withTrailingX 
)
inlineoverride

◆ parseEllipsis()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseEllipsis ( )
inlineoverride

Parses a ....

Definition at line 120 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseEqual()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseEqual ( )
inlineoverride

Parse a = token.

Definition at line 130 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseFloat() [1/2]

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseFloat ( const llvm::fltSemantics &  semantics,
APFloat &  result 
)
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().

◆ parseFloat() [2/2]

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseFloat ( double &  result)
inlineoverride

Parse a floating point value from the stream.

Definition at line 300 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parseFloat().

◆ parseGreater()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseGreater ( )
inlineoverride

Parse a '>' token.

Definition at line 150 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseIntegerSet()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseIntegerSet ( IntegerSet set)
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.

◆ parseKeyword() [1/4]

template<typename BaseT >
ParseResult mlir::AsmParser::parseKeyword
inline

Parse a keyword into 'keyword'.

Definition at line 895 of file OpImplementation.h.

◆ parseKeyword() [2/4]

template<typename BaseT >
ParseResult mlir::AsmParser::parseKeyword
inline

Parse a given keyword.

Definition at line 889 of file OpImplementation.h.

Referenced by mlir::detail::AsmParserImpl< BaseT >::parseKeywordOrCompletion().

◆ parseKeyword() [3/4]

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseKeyword ( StringRef  keyword,
const Twine &  msg 
)
inlineoverride

◆ parseKeyword() [4/4]

template<typename BaseT >
virtual ParseResult mlir::AsmParser::parseKeyword

◆ parseKeywordOrCompletion()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseKeywordOrCompletion ( StringRef *  keyword)
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.

◆ parseLBrace()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseLBrace ( )
inlineoverride

Parse a '{' token.

Definition at line 80 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseLess()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseLess ( )
inlineoverride

Parse a '<' token.

Definition at line 140 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseLParen()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseLParen ( )
inlineoverride

Parse a ( token.

Definition at line 160 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseLSquare()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseLSquare ( )
inlineoverride

Parse a [ token.

Definition at line 180 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseMinus()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseMinus ( )
inlineoverride

Parses a '-' token.

Definition at line 230 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseOptionalArrow()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalArrow ( )
inlineoverride

Parses a -> if present.

Definition at line 75 of file AsmParserImpl.h.

References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.

◆ parseOptionalArrowTypeList()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalArrowTypeList ( SmallVectorImpl< Type > &  result)
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.

◆ parseOptionalAttrDict()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalAttrDict ( NamedAttrList result)
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.

◆ parseOptionalAttrDictWithKeyword()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalAttrDictWithKeyword ( NamedAttrList result)
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.

◆ parseOptionalAttribute() [1/4]

template<typename BaseT >
OptionalParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalAttribute ( ArrayAttr &  result,
Type  type 
)
inlineoverride

◆ parseOptionalAttribute() [2/4]

template<typename BaseT >
OptionalParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalAttribute ( Attribute result,
Type  type 
)
inlineoverride

◆ parseOptionalAttribute() [3/4]

template<typename BaseT >
OptionalParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalAttribute ( StringAttr &  result,
Type  type 
)
inlineoverride

◆ parseOptionalAttribute() [4/4]

template<typename BaseT >
OptionalParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalAttribute ( SymbolRefAttr &  result,
Type  type 
)
inlineoverride

◆ parseOptionalColon()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalColon ( )
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.

◆ parseOptionalColonTypeList()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalColonTypeList ( SmallVectorImpl< Type > &  result)
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().

◆ parseOptionalComma()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalComma ( )
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.

◆ parseOptionalDecimalInteger()

template<typename BaseT >
OptionalParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalDecimalInteger ( APInt &  result)
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.

◆ parseOptionalEllipsis()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalEllipsis ( )
inlineoverride

Parses a ... if present.

Definition at line 125 of file AsmParserImpl.h.

References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.

◆ parseOptionalEqual()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalEqual ( )
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.

◆ parseOptionalGreater()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalGreater ( )
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.

◆ parseOptionalInteger()

template<typename BaseT >
OptionalParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalInteger ( APInt &  result)
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.

◆ parseOptionalKeyword() [1/3]

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalKeyword ( StringRef *  keyword)
inlineoverride

◆ parseOptionalKeyword() [2/3]

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalKeyword ( StringRef *  keyword,
ArrayRef< StringRef >  allowedKeywords 
)
inlineoverride

◆ parseOptionalKeyword() [3/3]

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalKeyword ( StringRef  keyword)
inlineoverride

◆ parseOptionalKeywordOrString()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalKeywordOrString ( std::string *  result)
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().

◆ parseOptionalLBrace()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalLBrace ( )
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.

◆ parseOptionalLess()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalLess ( )
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.

◆ parseOptionalLParen()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalLParen ( )
inlineoverride

Parses a '(' if present.

Definition at line 165 of file AsmParserImpl.h.

References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.

◆ parseOptionalLSquare()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalLSquare ( )
inlineoverride

Parses a '[' if present.

Definition at line 185 of file AsmParserImpl.h.

References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.

◆ parseOptionalMinus()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalMinus ( )
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.

◆ parseOptionalPlus()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalPlus ( )
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.

◆ parseOptionalQuestion()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalQuestion ( )
inlineoverride

Parses a '?' if present.

Definition at line 205 of file AsmParserImpl.h.

References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.

◆ parseOptionalRBrace()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalRBrace ( )
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.

◆ parseOptionalRParen()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalRParen ( )
inlineoverride

Parses a ')' if present.

Definition at line 175 of file AsmParserImpl.h.

References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.

◆ parseOptionalRSquare()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalRSquare ( )
inlineoverride

Parses a ']' if present.

Definition at line 195 of file AsmParserImpl.h.

References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.

◆ parseOptionalStar()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalStar ( )
inlineoverride

Parses a '*' if present.

Definition at line 215 of file AsmParserImpl.h.

References mlir::detail::Parser::consumeIf(), and mlir::detail::AsmParserImpl< BaseT >::parser.

◆ parseOptionalString()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalString ( std::string *  string)
inlineoverride

◆ parseOptionalSymbolName()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalSymbolName ( StringAttr &  result)
inlineoverride

◆ parseOptionalType()

template<typename BaseT >
OptionalParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalType ( Type result)
inlineoverride

Parse an optional type.

Definition at line 531 of file AsmParserImpl.h.

References mlir::detail::Parser::parseOptionalType(), and mlir::detail::AsmParserImpl< BaseT >::parser.

◆ parseOptionalVerticalBar()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseOptionalVerticalBar ( )
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.

◆ parsePlus()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parsePlus ( )
inlineoverride

Parses a '+' token.

Definition at line 220 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseQuestion()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseQuestion ( )
inlineoverride

Parses a '?' token.

Definition at line 200 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseRBrace()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseRBrace ( )
inlineoverride

Parse a } token.

Definition at line 90 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseResourceHandle()

template<typename BaseT >
FailureOr<AsmDialectResourceHandle> mlir::detail::AsmParserImpl< BaseT >::parseResourceHandle ( Dialect dialect)
inlineoverride

◆ parseRParen()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseRParen ( )
inlineoverride

Parse a ) token.

Definition at line 170 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseRSquare()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseRSquare ( )
inlineoverride

Parse a ] token.

Definition at line 190 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseStar()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseStar ( )
inlineoverride

Parses a '*' token.

Definition at line 210 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseType()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseType ( Type result)
inlineoverride

◆ parseVerticalBar()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseVerticalBar ( )
inlineoverride

Parse a '|' token.

Definition at line 240 of file AsmParserImpl.h.

References mlir::detail::AsmParserImpl< BaseT >::parser, and mlir::detail::Parser::parseToken().

◆ parseXInDimensionList()

template<typename BaseT >
ParseResult mlir::detail::AsmParserImpl< BaseT >::parseXInDimensionList ( )
inlineoverride

◆ popCyclicParsing()

template<typename BaseT >
void mlir::detail::AsmParserImpl< BaseT >::popCyclicParsing ( )
inlineoverride

◆ pushCyclicParsing()

template<typename BaseT >
LogicalResult mlir::detail::AsmParserImpl< BaseT >::pushCyclicParsing ( const void *  opaquePointer)
inlineoverride

Member Data Documentation

◆ emittedError

template<typename BaseT >
bool mlir::detail::AsmParserImpl< BaseT >::emittedError = false
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().

◆ nameLoc

template<typename BaseT >
SMLoc mlir::detail::AsmParserImpl< BaseT >::nameLoc
protected

The source location of the dialect symbol.

Definition at line 615 of file AsmParserImpl.h.

Referenced by mlir::detail::AsmParserImpl< BaseT >::getNameLoc().

◆ parser

template<typename BaseT >
Parser& mlir::detail::AsmParserImpl< BaseT >::parser
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().


The documentation for this class was generated from the following file: