MySQL 8.4.2
Source Code Documentation
Parse_tree_node_tmpl< Context > Class Template Reference

Base class for parse tree nodes (excluding the Parse_tree_root hierarchy) More...

#include <parse_tree_node_base.h>

Inheritance diagram for Parse_tree_node_tmpl< Context >:
[legend]

Public Types

typedef Context context_t
 

Public Member Functions

virtual ~Parse_tree_node_tmpl ()=default
 
bool is_contextualized () const
 
virtual bool contextualize (Context *pc) final
 
void error (Context *pc, const POS &pos) const
 syntax_error() function replacement for deferred reporting of syntax errors More...
 
void error (Context *pc, const POS &pos, const char *msg) const
 syntax_error() function replacement for deferred reporting of syntax errors More...
 
void errorf (Context *pc, const POS &pos, const char *format,...) const
 syntax_error() function replacement for deferred reporting of syntax errors More...
 

Static Public Member Functions

static void * operator new (size_t size, MEM_ROOT *mem_root, const std::nothrow_t &arg=std::nothrow) noexcept
 
static void operator delete (void *ptr, size_t size)
 
static void operator delete (void *, MEM_ROOT *, const std::nothrow_t &) noexcept
 

Public Attributes

POS m_pos
 

Protected Member Functions

 Parse_tree_node_tmpl ()=delete
 
 Parse_tree_node_tmpl (const POS &pos)
 
 Parse_tree_node_tmpl (const POS &start_pos, const POS &end_pos)
 
bool begin_parse_tree (Show_parse_tree *tree)
 
bool end_parse_tree (Show_parse_tree *tree)
 
virtual bool do_contextualize (Context *pc)
 Do all context-sensitive things and mark the node as contextualized. More...
 
virtual void add_json_info (Json_object *json_obj)
 Add all the node-specific json fields. More...
 

Private Member Functions

 Parse_tree_node_tmpl (const Parse_tree_node_tmpl &)
 
void operator= (const Parse_tree_node_tmpl &)
 

Private Attributes

bool contextualized = false
 

Friends

class Item
 

Detailed Description

template<typename Context>
class Parse_tree_node_tmpl< Context >

Base class for parse tree nodes (excluding the Parse_tree_root hierarchy)

Member Typedef Documentation

◆ context_t

template<typename Context >
typedef Context Parse_tree_node_tmpl< Context >::context_t

Constructor & Destructor Documentation

◆ Parse_tree_node_tmpl() [1/4]

template<typename Context >
Parse_tree_node_tmpl< Context >::Parse_tree_node_tmpl ( const Parse_tree_node_tmpl< Context > &  )
private

◆ Parse_tree_node_tmpl() [2/4]

template<typename Context >
Parse_tree_node_tmpl< Context >::Parse_tree_node_tmpl ( )
protecteddelete

◆ Parse_tree_node_tmpl() [3/4]

template<typename Context >
Parse_tree_node_tmpl< Context >::Parse_tree_node_tmpl ( const POS pos)
inlineexplicitprotected

◆ Parse_tree_node_tmpl() [4/4]

template<typename Context >
Parse_tree_node_tmpl< Context >::Parse_tree_node_tmpl ( const POS start_pos,
const POS end_pos 
)
inlineexplicitprotected

◆ ~Parse_tree_node_tmpl()

template<typename Context >
virtual Parse_tree_node_tmpl< Context >::~Parse_tree_node_tmpl ( )
virtualdefault

Member Function Documentation

◆ add_json_info()

template<typename Context >
virtual void Parse_tree_node_tmpl< Context >::add_json_info ( Json_object json_obj)
inlineprotectedvirtual

◆ begin_parse_tree()

template<typename Context >
bool Parse_tree_node_tmpl< Context >::begin_parse_tree ( Show_parse_tree tree)
protected

◆ contextualize()

template<typename Context >
virtual bool Parse_tree_node_tmpl< Context >::contextualize ( Context *  pc)
inlinefinalvirtual

◆ do_contextualize()

template<typename Context >
virtual bool Parse_tree_node_tmpl< Context >::do_contextualize ( Context *  pc)
inlineprotectedvirtual

Do all context-sensitive things and mark the node as contextualized.

Parameters
pccurrent parse context
Return values
falsesuccess
truesyntax/OOM/etc error

Reimplemented in PT_check_constraint_column_attr, PT_default_column_attr, PT_on_update_column_attr, PT_auto_increment_column_attr, PT_serial_default_value_column_attr, PT_column_format_column_attr, PT_storage_media_column_attr, and PT_generated_default_val_column_attr.

◆ end_parse_tree()

template<typename Context >
bool Parse_tree_node_tmpl< Context >::end_parse_tree ( Show_parse_tree tree)
protected

◆ error() [1/2]

template<typename Context >
void Parse_tree_node_tmpl< Context >::error ( Context *  pc,
const POS pos 
) const
inline

syntax_error() function replacement for deferred reporting of syntax errors

Parameters
pcCurrent parse context.
posLocation of the error in lexical scanner buffers.

◆ error() [2/2]

template<typename Context >
void Parse_tree_node_tmpl< Context >::error ( Context *  pc,
const POS pos,
const char *  msg 
) const
inline

syntax_error() function replacement for deferred reporting of syntax errors

Parameters
pcCurrent parse context.
posLocation of the error in lexical scanner buffers.
msgError message.

◆ errorf()

template<typename Context >
void Parse_tree_node_tmpl< Context >::errorf ( Context *  pc,
const POS pos,
const char *  format,
  ... 
) const
inline

syntax_error() function replacement for deferred reporting of syntax errors

Parameters
pcCurrent parse context.
posLocation of the error in lexical scanner buffers.
formatError message format string with optional argument list.

◆ is_contextualized()

template<typename Context >
bool Parse_tree_node_tmpl< Context >::is_contextualized ( ) const
inline

◆ operator delete() [1/2]

template<typename Context >
static void Parse_tree_node_tmpl< Context >::operator delete ( void *  ,
MEM_ROOT ,
const std::nothrow_t &   
)
inlinestaticnoexcept

◆ operator delete() [2/2]

template<typename Context >
static void Parse_tree_node_tmpl< Context >::operator delete ( void *  ptr,
size_t  size 
)
inlinestatic

◆ operator new()

template<typename Context >
static void * Parse_tree_node_tmpl< Context >::operator new ( size_t  size,
MEM_ROOT mem_root,
const std::nothrow_t &  arg = std::nothrow 
)
inlinestaticnoexcept

◆ operator=()

template<typename Context >
void Parse_tree_node_tmpl< Context >::operator= ( const Parse_tree_node_tmpl< Context > &  )
private

Friends And Related Function Documentation

◆ Item

template<typename Context >
friend class Item
friend

Member Data Documentation

◆ contextualized

template<typename Context >
bool Parse_tree_node_tmpl< Context >::contextualized = false
private

◆ m_pos

template<typename Context >
POS Parse_tree_node_tmpl< Context >::m_pos

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