MySQL  8.0.15
Source Code Documentation
Parser_state Class Reference

Internal state of the parser. More...

#include <sql_lex.h>

Inheritance diagram for Parser_state:
Common_table_expr_parser_state Expression_parser_state Gcol_expr_parser_state Partition_expr_parser_state

Public Member Functions

 Parser_state ()
 
bool init (THD *thd, const char *buff, size_t length)
 Object initializer. More...
 
void reset (const char *found_semicolon, size_t length)
 
void add_comment ()
 Signal that the current query has a comment. More...
 
bool has_comment () const
 Check whether the current query has a comment. More...
 

Public Attributes

Parser_input m_input
 
Lex_input_stream m_lip
 
Yacc_state m_yacc
 
PSI_digest_lockerm_digest_psi
 Current performance digest instrumentation. More...
 

Protected Member Functions

 Parser_state (int grammar_selector_token)
 Constructor for special parsers of partial SQL clauses (DD) More...
 

Private Attributes

bool m_comment
 True if current query contains comments. More...
 

Detailed Description

Internal state of the parser.

The complete state consist of:

  • input parameters that control the parser behavior
  • state data used during lexical parsing,
  • state data used during syntactic parsing.

Constructor & Destructor Documentation

◆ Parser_state() [1/2]

Parser_state::Parser_state ( int  grammar_selector_token)
inlineexplicitprotected

Constructor for special parsers of partial SQL clauses (DD)

Parameters
grammar_selector_tokenSee Lex_input_stream::grammar_selector_token

◆ Parser_state() [2/2]

Parser_state::Parser_state ( )
inline

Member Function Documentation

◆ add_comment()

void Parser_state::add_comment ( )
inline

Signal that the current query has a comment.

◆ has_comment()

bool Parser_state::has_comment ( ) const
inline

Check whether the current query has a comment.

◆ init()

bool Parser_state::init ( THD thd,
const char *  buff,
size_t  length 
)
inline

Object initializer.

Must be called before usage.

Return values
falseOK
trueError

◆ reset()

void Parser_state::reset ( const char *  found_semicolon,
size_t  length 
)
inline

Member Data Documentation

◆ m_comment

bool Parser_state::m_comment
private

True if current query contains comments.

◆ m_digest_psi

PSI_digest_locker* Parser_state::m_digest_psi

Current performance digest instrumentation.

◆ m_input

Parser_input Parser_state::m_input

◆ m_lip

Lex_input_stream Parser_state::m_lip

◆ m_yacc

Yacc_state Parser_state::m_yacc

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