MLIR  19.0.0git
Public Member Functions | Public Attributes | List of all members
mlir::detail::ParserState Struct Reference

This class refers to all of the state maintained globally by the parser, such as the current lexer position etc. More...

#include "AsmParser/ParserState.h"

Public Member Functions

 ParserState (const llvm::SourceMgr &sourceMgr, const ParserConfig &config, SymbolState &symbols, AsmParserState *asmState, AsmParserCodeCompleteContext *codeCompleteContext)
 
 ParserState (const ParserState &)=delete
 
void operator= (const ParserState &)=delete
 

Public Attributes

const ParserConfigconfig
 The configuration used to setup the parser. More...
 
Lexer lex
 The lexer for the source file we're parsing. More...
 
Token curToken
 This is the next token that hasn't been consumed yet. More...
 
Token lastToken
 This is the last token that has been consumed. More...
 
SymbolStatesymbols
 The current state for symbol parsing. More...
 
SetVector< const void * > cyclicParsingStack
 Stack of potentially cyclic mutable attributes or type currently being parsed. More...
 
AsmParserStateasmState
 An optional pointer to a struct containing high level parser state to be populated during parsing. More...
 
AsmParserCodeCompleteContextcodeCompleteContext
 An optional code completion context. More...
 
SmallVector< StringRef > defaultDialectStack {"builtin"}
 

Detailed Description

This class refers to all of the state maintained globally by the parser, such as the current lexer position etc.

Definition at line 51 of file ParserState.h.

Constructor & Destructor Documentation

◆ ParserState() [1/2]

mlir::detail::ParserState::ParserState ( const llvm::SourceMgr &  sourceMgr,
const ParserConfig config,
SymbolState symbols,
AsmParserState asmState,
AsmParserCodeCompleteContext codeCompleteContext 
)
inline

Definition at line 52 of file ParserState.h.

◆ ParserState() [2/2]

mlir::detail::ParserState::ParserState ( const ParserState )
delete

Member Function Documentation

◆ operator=()

void mlir::detail::ParserState::operator= ( const ParserState )
delete

Member Data Documentation

◆ asmState

AsmParserState* mlir::detail::ParserState::asmState

An optional pointer to a struct containing high level parser state to be populated during parsing.

Definition at line 83 of file ParserState.h.

Referenced by mlir::detail::Parser::parseAttribute(), mlir::detail::Parser::parseExtendedAttr(), and mlir::detail::AsmParserImpl< BaseT >::parseOptionalSymbolName().

◆ codeCompleteContext

AsmParserCodeCompleteContext* mlir::detail::ParserState::codeCompleteContext

◆ config

const ParserConfig& mlir::detail::ParserState::config

The configuration used to setup the parser.

Definition at line 63 of file ParserState.h.

Referenced by mlir::detail::Parser::getContext().

◆ curToken

Token mlir::detail::ParserState::curToken

◆ cyclicParsingStack

SetVector<const void *> mlir::detail::ParserState::cyclicParsingStack

Stack of potentially cyclic mutable attributes or type currently being parsed.

Definition at line 79 of file ParserState.h.

Referenced by mlir::detail::AsmParserImpl< BaseT >::popCyclicParsing(), and mlir::detail::AsmParserImpl< BaseT >::pushCyclicParsing().

◆ defaultDialectStack

SmallVector<StringRef> mlir::detail::ParserState::defaultDialectStack {"builtin"}

◆ lastToken

Token mlir::detail::ParserState::lastToken

This is the last token that has been consumed.

Definition at line 72 of file ParserState.h.

Referenced by mlir::detail::Parser::consumeToken(), mlir::detail::Parser::getLastToken(), and mlir::detail::Parser::resetToken().

◆ lex

Lexer mlir::detail::ParserState::lex

◆ symbols

SymbolState& mlir::detail::ParserState::symbols

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