CUBRID Engine  latest
scanner_support.c File Reference
#include "config.h"
#include <math.h>
#include "porting.h"
#include "parser_message.h"
#include "parser.h"
#include "chartype.h"
#include "language_support.h"
#include "intl_support.h"
#include "csql_grammar_scan.h"
#include "memory_alloc.h"
#include "misc_string.h"
Include dependency graph for scanner_support.c:

Go to the source code of this file.

Macros

#define JP_MAXNAME   256
 
#define IS_WHITE_CHAR(c)   ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\0')
 
#define IS_HINT_ON_TABLE(h)   ((h) & (PT_HINT_INDEX_SS | PT_HINT_INDEX_LS))
 

Functions

static char * pt_trim_as_identifier (char *name)
 
int csql_yyget_lineno ()
 
char * pt_makename (const char *name)
 
void pt_parser_line_col (PT_NODE *node)
 
int pt_nextchar (void)
 
void pt_cleanup_hint (PARSER_CONTEXT *parser, PT_HINT hint_table[])
 
void pt_get_hint (const char *text, PT_HINT hint_table[], PT_NODE *node)
 
void pt_check_hint (const char *text, PT_HINT hint_table[], PT_HINT_ENUM *result_hint, bool prev_is_white_char)
 

Variables

int parser_input_host_index = 0
 
int parser_statement_OK = 0
 
PARSER_CONTEXTthis_parser
 
int parser_output_host_index = 0
 
int yycolumn
 
int yycolumn_end
 

Macro Definition Documentation

#define IS_HINT_ON_TABLE (   h)    ((h) & (PT_HINT_INDEX_SS | PT_HINT_INDEX_LS))

Definition at line 46 of file scanner_support.c.

Referenced by pt_check_hint().

#define IS_WHITE_CHAR (   c)    ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\0')

Definition at line 42 of file scanner_support.c.

Referenced by pt_check_hint().

#define JP_MAXNAME   256

Definition at line 32 of file scanner_support.c.

Referenced by pt_check_hint().

Function Documentation

int csql_yyget_lineno ( )

Referenced by pt_parser_line_col().

Here is the caller graph for this function:

void pt_cleanup_hint ( PARSER_CONTEXT parser,
PT_HINT  hint_table[] 
)

Definition at line 136 of file scanner_support.c.

References parser_hint::arg_list, i, NULL, parser_free_node(), and parser_hint::tokens.

void pt_get_hint ( const char *  text,
PT_HINT  hint_table[],
PT_NODE node 
)

Definition at line 156 of file scanner_support.c.

References pt_statement_info::alter, parser_hint::arg_list, pt_statement_info::delete_, pt_query_info::do_cache, pt_query_info::do_not_cache, pt_query_info::flag, parser_node::flag, parser_hint::hint, pt_alter_info::hint, pt_delete_info::hint, pt_insert_info::hint, pt_select_info::hint, pt_query_info::hint, pt_update_info::hint, pt_merge_info::hint, i, pt_merge_info::index_hint, pt_select_info::index_ls, pt_select_info::index_ss, parser_node::info, pt_merge_info::insert, pt_statement_info::insert, pt_insert_info::insert_mode, pt_select_info::jdbc_life_time, pt_statement_info::merge, pt_statement_info::name, parser_node::node_type, NULL, pt_select_info::ordered, pt_name_info::original, PT_ALTER, PT_DELETE, PT_HINT_INDEX_LS, PT_HINT_INDEX_SS, PT_HINT_INSERT_MODE, PT_HINT_JDBC_CACHE, PT_HINT_LK_TIMEOUT, PT_HINT_NO_COVERING_IDX, PT_HINT_NO_HASH_AGGREGATE, PT_HINT_NO_HASH_LIST_SCAN, PT_HINT_NO_IDX_DESC, PT_HINT_NO_INDEX_LS, PT_HINT_NO_INDEX_SS, PT_HINT_NO_LOGGING, PT_HINT_NO_MULTI_RANGE_OPT, PT_HINT_NO_SORT_LIMIT, PT_HINT_NONE, PT_HINT_ORDERED, PT_HINT_QUERY_CACHE, PT_HINT_QUERY_NO_CACHE, PT_HINT_RECOMPILE, PT_HINT_REEXECUTE, PT_HINT_SELECT_BTREE_NODE_INFO, PT_HINT_SELECT_KEY_INFO, PT_HINT_SELECT_PAGE_INFO, PT_HINT_SELECT_RECORD_INFO, PT_HINT_SKIP_UPDATE_NULL, PT_HINT_USE_HASH, PT_HINT_USE_IDX, PT_HINT_USE_IDX_DESC, PT_HINT_USE_INSERT_IDX, PT_HINT_USE_MERGE, PT_HINT_USE_NL, PT_HINT_USE_SBR, PT_HINT_USE_UPDATE_IDX, PT_INSERT, PT_IS_NULL_NODE, PT_IS_QUERY_NODE_TYPE, PT_MERGE, PT_SELECT, PT_UPDATE, pt_query_info::q, pt_query_info::qcache_hint, pt_statement_info::query, parser_node::recompile, pt_query_info::reexecute, pt_query_info::select, stristr(), parser_hint::tokens, pt_merge_info::update, pt_statement_info::update, pt_select_info::use_idx, pt_delete_info::use_idx_hint, pt_update_info::use_idx_hint, pt_select_info::use_merge, pt_delete_info::use_merge_hint, pt_update_info::use_merge_hint, pt_select_info::use_nl, pt_delete_info::use_nl_hint, pt_update_info::use_nl_hint, pt_select_info::using_index, pt_delete_info::waitsecs_hint, pt_insert_info::waitsecs_hint, pt_select_info::waitsecs_hint, pt_update_info::waitsecs_hint, and pt_merge_info::waitsecs_hint.

char* pt_makename ( const char *  name)

Definition at line 68 of file scanner_support.c.

References NULL, and pt_append_string().

Referenced by pt_check_hint(), and pt_trim_as_identifier().

Here is the caller graph for this function:

int pt_nextchar ( void  )

Definition at line 123 of file scanner_support.c.

References parser_context::next_char.

void pt_parser_line_col ( PT_NODE node)

Definition at line 109 of file scanner_support.c.

References parser_node::column_number, csql_yyget_lineno(), parser_node::line_number, NULL, and yycolumn.

Referenced by parser_new_node().

Here is the caller graph for this function:

static char * pt_trim_as_identifier ( char *  name)
static

Definition at line 80 of file scanner_support.c.

References pt_makename(), and strlen.

Referenced by pt_check_hint().

Here is the caller graph for this function:

Variable Documentation

int parser_input_host_index = 0

Definition at line 51 of file scanner_support.c.

Referenced by pt_init_one_statement_parser().

int parser_output_host_index = 0

Definition at line 54 of file scanner_support.c.

Referenced by pt_init_one_statement_parser().

int parser_statement_OK = 0

Definition at line 52 of file scanner_support.c.

PARSER_CONTEXT* this_parser

Definition at line 53 of file scanner_support.c.

Referenced by pt_init_one_statement_parser().

int yycolumn

Referenced by pt_parser_line_col().

int yycolumn_end