|
| virtual | ~DialectAsmParser () |
| |
| virtual InFlightDiagnostic | emitError (llvm::SMLoc loc, const Twine &message={})=0 |
| | Emit a diagnostic at the specified location and return failure. More...
|
| |
| virtual Builder & | getBuilder () const =0 |
| |
| virtual llvm::SMLoc | getCurrentLocation ()=0 |
| |
| ParseResult | getCurrentLocation (llvm::SMLoc *loc) |
| |
| virtual llvm::SMLoc | getNameLoc () const =0 |
| | Return the location of the original name token. More...
|
| |
| virtual Location | getEncodedSourceLoc (llvm::SMLoc loc)=0 |
| | Re-encode the given source location as an MLIR location and return it. More...
|
| |
| virtual StringRef | getFullSymbolSpec () const =0 |
| |
| virtual ParseResult | parseFloat (double &result)=0 |
| | Parse a floating point value from the stream. More...
|
| |
| template<typename IntT > |
| ParseResult | parseInteger (IntT &result) |
| | Parse an integer value from the stream. More...
|
| |
| virtual OptionalParseResult | parseOptionalInteger (uint64_t &result)=0 |
| | Parse an optional integer value from the stream. More...
|
| |
| template<typename IntT > |
| OptionalParseResult | parseOptionalInteger (IntT &result) |
| |
| virtual ParseResult | parseArrow ()=0 |
| | Parse a '->' token. More...
|
| |
| virtual ParseResult | parseOptionalArrow ()=0 |
| | Parse a '->' token if present. More...
|
| |
| virtual ParseResult | parseLBrace ()=0 |
| | Parse a '{' token. More...
|
| |
| virtual ParseResult | parseOptionalLBrace ()=0 |
| | Parse a '{' token if present. More...
|
| |
| virtual ParseResult | parseRBrace ()=0 |
| | Parse a } token. More...
|
| |
| virtual ParseResult | parseOptionalRBrace ()=0 |
| | Parse a } token if present. More...
|
| |
| virtual ParseResult | parseColon ()=0 |
| | Parse a : token. More...
|
| |
| virtual ParseResult | parseOptionalColon ()=0 |
| | Parse a : token if present. More...
|
| |
| virtual ParseResult | parseComma ()=0 |
| | Parse a , token. More...
|
| |
| virtual ParseResult | parseOptionalComma ()=0 |
| | Parse a , token if present. More...
|
| |
| virtual ParseResult | parseEqual ()=0 |
| | Parse a = token. More...
|
| |
| ParseResult | parseKeyword (StringRef keyword, const Twine &msg="") |
| | Parse a given keyword. More...
|
| |
| ParseResult | parseKeyword (StringRef *keyword) |
| | Parse a keyword into 'keyword'. More...
|
| |
| virtual ParseResult | parseOptionalKeyword (StringRef keyword)=0 |
| | Parse the given keyword if present. More...
|
| |
| virtual ParseResult | parseOptionalKeyword (StringRef *keyword)=0 |
| | Parse a keyword, if present, into 'keyword'. More...
|
| |
| virtual ParseResult | parseLess ()=0 |
| | Parse a '<' token. More...
|
| |
| virtual ParseResult | parseOptionalLess ()=0 |
| | Parse a < token if present. More...
|
| |
| virtual ParseResult | parseGreater ()=0 |
| | Parse a '>' token. More...
|
| |
| virtual ParseResult | parseOptionalGreater ()=0 |
| | Parse a > token if present. More...
|
| |
| virtual ParseResult | parseLParen ()=0 |
| | Parse a ( token. More...
|
| |
| virtual ParseResult | parseOptionalLParen ()=0 |
| | Parse a ( token if present. More...
|
| |
| virtual ParseResult | parseRParen ()=0 |
| | Parse a ) token. More...
|
| |
| virtual ParseResult | parseOptionalRParen ()=0 |
| | Parse a ) token if present. More...
|
| |
| virtual ParseResult | parseLSquare ()=0 |
| | Parse a [ token. More...
|
| |
| virtual ParseResult | parseOptionalLSquare ()=0 |
| | Parse a [ token if present. More...
|
| |
| virtual ParseResult | parseRSquare ()=0 |
| | Parse a ] token. More...
|
| |
| virtual ParseResult | parseOptionalRSquare ()=0 |
| | Parse a ] token if present. More...
|
| |
| virtual ParseResult | parseOptionalEllipsis ()=0 |
| | Parse a ... token if present;. More...
|
| |
| virtual ParseResult | parseOptionalQuestion ()=0 |
| | Parse a ? token. More...
|
| |
| virtual ParseResult | parseOptionalStar ()=0 |
| | Parse a * token. More...
|
| |
| virtual ParseResult | parseAttribute (Attribute &result, Type type={})=0 |
| | Parse an arbitrary attribute and return it in result. More...
|
| |
| template<typename AttrType > |
| ParseResult | parseAttribute (AttrType &result, Type type={}) |
| | Parse an attribute of a specific kind and type. More...
|
| |
| virtual ParseResult | parseType (Type &result)=0 |
| | Parse a type. More...
|
| |
| template<typename TypeType > |
| ParseResult | parseType (TypeType &result) |
| | Parse a type of a specific kind, e.g. a FunctionType. More...
|
| |
| virtual ParseResult | parseDimensionList (SmallVectorImpl< int64_t > &dimensions, bool allowDynamic=true)=0 |
| |
The DialectAsmParser has methods for interacting with the asm parser: parsing things from it, emitting errors etc. It has an intentionally high-level API that is designed to reduce/constrain syntax innovation in individual attributes or types.
| virtual ParseResult mlir::DialectAsmParser::parseDimensionList |
( |
SmallVectorImpl< int64_t > & |
dimensions, |
|
|
bool |
allowDynamic = true |
|
) |
| |
|
pure virtual |
Parse a 'x' separated dimension list. This populates the dimension list, using -1 for the ? dimensions if allowDynamic is set and errors out on ? otherwise.
dimension-list ::= (dimension x)* dimension ::= ? | integer
When allowDynamic is not set, this is used to parse:
static-dimension-list ::= (integer x)*