llvm/mlir/lib/Parser
Jean Perier 49af2a6275 [mlir][flang] Do not prevent integer types from being parsed as MLIR keywords
DialectAsmParser::parseKeyword is rejecting `'i' digit+` while it is
a valid identifier according to mlir/docs/LangRef.md.

Integer types actually used to be TOK_KEYWORD a while back before the
change: 6af866c58d.

This patch Modifies `isCurrentTokenAKeyword` to return true for tokens that
match integer types too.

The motivation for this change is the parsing of `!fir.type<{` `component-name: component-type,`+ `}>`
type in FIR that represent Fortran derived types. The component-names are
parsed as keywords, and can very well be i32 or any ixxx (which are
valid Fortran derived type component names).

The Quant dialect type parser had to be modified since it relied on `iw` not
being parsed as keywords.

Differential Revision: https://reviews.llvm.org/D108913
2021-09-03 08:20:49 +02:00
..
AffineParser.cpp
AsmParserState.cpp
AttributeParser.cpp [Builder] Eliminate the StringRef/StringAttr forms of getSymbolRefAttr. 2021-08-30 16:05:36 -07:00
CMakeLists.txt
DialectSymbolParser.cpp [mlir][flang] Do not prevent integer types from being parsed as MLIR keywords 2021-09-03 08:20:49 +02:00
Lexer.cpp
Lexer.h
LocationParser.cpp
Parser.cpp Add a new interface allowing to set a default dialect to be used for printing/parsing regions 2021-08-31 17:52:40 +00:00
Parser.h
ParserState.h Add a new interface allowing to set a default dialect to be used for printing/parsing regions 2021-08-31 17:52:40 +00:00
Token.cpp
Token.h
TokenKinds.def
TypeParser.cpp