MySQL 8.0.40
Source Code Documentation
Parser_state Class Reference

Internal state of the parser. More...

#include <sql_lexer_parser_state.h>

Inheritance diagram for Parser_state:
[legend]

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...
 
 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...
 
 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/4]

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/4]

Parser_state::Parser_state ( )
inline

◆ Parser_state() [3/4]

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() [4/4]

Parser_state::Parser_state ( )
inline

Member Function Documentation

◆ add_comment() [1/2]

void Parser_state::add_comment ( )
inline

Signal that the current query has a comment.

◆ add_comment() [2/2]

void Parser_state::add_comment ( )
inline

Signal that the current query has a comment.

◆ has_comment() [1/2]

bool Parser_state::has_comment ( ) const
inline

Check whether the current query has a comment.

◆ has_comment() [2/2]

bool Parser_state::has_comment ( ) const
inline

Check whether the current query has a comment.

◆ init() [1/2]

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

Object initializer.

Must be called before usage.

Return values
falseOK
trueError

◆ init() [2/2]

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() [1/2]

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

◆ reset() [2/2]

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 files: