9 #ifndef MLIR_LIB_ASMPARSER_PARSERSTATE_H
10 #define MLIR_LIB_ASMPARSER_PARSERSTATE_H
15 #include "llvm/ADT/SetVector.h"
16 #include "llvm/ADT/StringMap.h"
19 class OpAsmDialectInterface;
38 llvm::StringMap<std::pair<std::string, AsmDialectResourceHandle>>>
static MLIRContext * getContext(OpFoldResult val)
This class provides an abstract interface into the parser for hooking in code completion events.
This class represents state from a parsed MLIR textual format string.
This class breaks up the current file into a token stream.
This class represents a configuration for the MLIR assembly parser.
This represents a token in the MLIR syntax.
Include the generated interface declarations.
This class refers to all of the state maintained globally by the parser, such as the current lexer po...
SetVector< const void * > cyclicParsingStack
Stack of potentially cyclic mutable attributes or type currently being parsed.
SymbolState & symbols
The current state for symbol parsing.
const ParserConfig & config
The configuration used to setup the parser.
Lexer lex
The lexer for the source file we're parsing.
Token curToken
This is the next token that hasn't been consumed yet.
Token lastToken
This is the last token that has been consumed.
AsmParserCodeCompleteContext * codeCompleteContext
An optional code completion context.
AsmParserState * asmState
An optional pointer to a struct containing high level parser state to be populated during parsing.
SmallVector< StringRef > defaultDialectStack
void operator=(const ParserState &)=delete
ParserState(const ParserState &)=delete
ParserState(const llvm::SourceMgr &sourceMgr, const ParserConfig &config, SymbolState &symbols, AsmParserState *asmState, AsmParserCodeCompleteContext *codeCompleteContext)
This class contains record of any parsed top-level symbols.
llvm::StringMap< Attribute > attributeAliasDefinitions
A map from attribute alias identifier to Attribute.
DenseMap< const OpAsmDialectInterface *, llvm::StringMap< std::pair< std::string, AsmDialectResourceHandle > > > dialectResources
A map of dialect resource keys to the resolved resource name and handle to use during parsing.
DenseMap< uint64_t, DistinctAttr > distinctAttributes
A map from unique integer identifier to DistinctAttr.
llvm::StringMap< Type > typeAliasDefinitions
A map from type alias identifier to Type.