CUBRID Engine  latest
esql_misc.h File Reference
#include <limits.h>
#include "esql_host_variable.h"
#include "esql_hash.h"
#include "parser.h"
#include "variable_string.h"
Include dependency graph for esql_misc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  whenever_action
 
struct  whenever_scope
 

Macros

#define HOST_N_REFS(p)   ((p) ? (p)->n_refs : 0)
 
#define HOST_REFS(p)   ((p) ? (p)->refs : NULL)
 
#define HOST_DESC(p)   ((p) ? (p)->desc : NULL)
 
#define CHECK_HOST_REF(hvars, n)
 
#define MEMBER(set, val)   ((set) & (1 << (val)))
 
#define NEWSET(val)   (1 << (val))
 
#define ECHO   (*echo_fn)(esql_yytext, strlen(esql_yytext))
 
#define ECHO_STR(str, length)   (*echo_fn)((str), length)
 
#define ECHO_SP   ECHO_STR(" ",strlen(" "))
 
#define ECHO_NL   ECHO_STR("\n",strlen("\n"))
 
#define IS_SPECIFIER(p)   ( (p)->class_ == SPECIFIER )
 
#define IS_DECLARATOR(p)   ( (p)->class_ == DECLARATOR )
 
#define IS_ARRAY(p)
 
#define IS_POINTER(p)
 
#define IS_FUNCT(p)
 
#define IS_CHAR(p)   ( IS_SPECIFIER(p) && (p)->decl.s.noun == N_CHR )
 
#define IS_INT(p)   ( IS_SPECIFIER(p) && (p)->decl.s.noun == N_INT )
 
#define IS_UINT(p)   ( IS_INT(p) && (p)->decl.s.is_unsigned )
 
#define IS_LONG(p)   ( IS_INT(p) && (p)->decl.s.is_long )
 
#define IS_ULONG(p)
 
#define IS_UNSIGNED(p)   ( (p)->decl.s.is_unsigned )
 
#define IS_STRUCT(p)
 
#define IS_LABEL(p)
 
#define IS_VARCHAR(p)
 
#define IS_BIT(p)
 
#define IS_VARBIT(p)
 
#define IS_PSEUDO_TYPE(p)
 
#define IS_VAR_TYPE(p)
 
#define IS_AGGREGATE(p)   ( IS_ARRAY(p) || IS_STRUCT(p) )
 
#define IS_PTR_TYPE(p)   ( IS_ARRAY(p) || IS_POINTER(p) )
 
#define IS_TYPEDEF(p)
 
#define IS_CONSTANT(p)
 
#define IS_INT_CONSTANT(p)
 

Typedefs

typedef unsigned int BITSET
 
typedef void(* ECHO_FN) (const char *, int)
 
typedef struct whenever_action WHENEVER_ACTION
 
typedef struct whenever_scope WHENEVER_SCOPE
 

Enumerations

enum  ex_msg {
  EX_ARGS_SET = 1, EX_CURSOR_SET = 2, EX_DECL_SET = 3, EX_ENVIRON_SET = 4,
  EX_ESQLM_SET = 5, EX_ARG_NAME_SET = 6, EX_ARG_DESCRIPTION_SET = 7, EX_ESQLMMAIN_SET = 8,
  EX_ESQLMSCANSUPPORT_SET = 9, EX_HASH_SET = 10, EX_HOSTVAR_SET = 11, EX_MISC_SET = 12,
  EX_SYMBOL_SET = 13, EX_TRANS_SET = 14
}
 
enum  { MSG_OUT_OF_MEMORY = 1 }
 
enum  scanner_mode {
  ECHO_MODE = 0, SQLX_MODE = 1, C_MODE = 2, EXPR_MODE = 3,
  VAR_MODE = 4, HV_MODE = 5, BUFFER_MODE = 6, COMMENT_MODE = 7
}
 

Functions

CURSORpp_new_cursor (char *name, char *static_stmt, int stmtLength, STMT *dynamic_stmt, HOST_LOD *host_refs)
 
void pp_free_cursor (CURSOR *cursor)
 
CURSORpp_lookup_cursor (char *name)
 
void pp_cursor_init (void)
 
void pp_cursor_finish (void)
 
void pp_print_cursors (FILE *fp)
 
void pp_remove_cursors_from_table (CURSOR *chain)
 
void pp_discard_cursor_chain (CURSOR *chain)
 
STMTpp_new_stmt (char *name)
 
void pp_free_stmt (STMT *stmt)
 
void pp_add_spec_to_decl (LINK *p_spec, SYMBOL *decl_chain)
 
void pp_add_symbols_to_table (SYMBOL *sym)
 
void pp_remove_symbols_from_table (SYMBOL *sym_chain)
 
void pp_do_enum (SYMBOL *sym)
 
void pp_push_name_scope (void)
 
void pp_pop_name_scope (void)
 
void pp_make_typedef_names_visible (int)
 
void pp_decl_init (void)
 
void pp_decl_finish (void)
 
void pp_reset_current_type_spec (void)
 
LINKpp_current_type_spec (void)
 
void pp_add_storage_class (int sc)
 
void pp_add_struct_spec (STRUCTDEF *sdef)
 
void pp_add_type_noun (int type)
 
void pp_add_type_adj (int adj)
 
void pp_add_typedefed_spec (LINK *spec)
 
void pp_add_initializer (SYMBOL *sym)
 
void pp_push_spec_scope (void)
 
void pp_pop_spec_scope (void)
 
void pp_disallow_storage_classes (void)
 
void pp_add_cursor_to_scope (CURSOR *cursor)
 
void pp_add_whenever_to_scope (WHEN_CONDITION cond, WHEN_ACTION action, char *name)
 
void pp_print_decls (SYMBOL *sym_chain, int preechoed)
 
void pp_print_specs (LINK *link)
 
void pp_suppress_echo (int)
 
void pp_gather_input_refs (void)
 
void pp_gather_output_refs (void)
 
HOST_LODpp_input_refs (void)
 
HOST_LODpp_output_refs (void)
 
void pp_clear_host_refs (void)
 
HOST_VARpp_new_host_var (HOST_VAR *var, SYMBOL *sym)
 
void pp_free_host_var (HOST_VAR *var)
 
HOST_REFpp_add_host_ref (HOST_VAR *, HOST_VAR *, bool, int *)
 
void pp_free_host_ref (HOST_REF *ref)
 
HOST_LODpp_copy_host_refs (void)
 
HOST_LODpp_detach_host_refs (void)
 
HOST_REFpp_check_type (HOST_REF *ref, BITSET typeset, const char *msg)
 
void pp_check_host_var_list (void)
 
HOST_VARpp_ptr_deref (HOST_VAR *var, int style)
 
HOST_VARpp_struct_deref (HOST_VAR *var, char *field, int indirect)
 
HOST_VARpp_addr_of (HOST_VAR *var)
 
void pp_hv_init (void)
 
void pp_hv_finish (void)
 
HOST_REFpp_add_host_str (char *str)
 
HOST_LODpp_new_host_lod (void)
 
void pp_free_host_lod (HOST_LOD *lod)
 
void pp_clear_host_lod (HOST_LOD *lod)
 
char * pp_switch_to_descriptor (void)
 
void pp_translate_string (varstring *vstr, const char *str, int in_string)
 
unsigned int pp_generic_case_hash (void *p)
 
unsigned int pp_generic_hash (void *p)
 
int pp_generic_case_cmp (void *p1, void *p2)
 
int pp_generic_cmp (void *p1, void *p2)
 
void pp_startup (void)
 
void pp_finish (void)
 
void * pp_malloc (int n)
 
char * pp_strdup (const char *str)
 
PTR_VECpp_new_ptr_vec (PTR_VEC *vec)
 
void pp_free_ptr_vec (PTR_VEC *vec)
 
PTR_VECpp_add_ptr (PTR_VEC *vec, void *new_elem)
 
int pp_ptr_vec_n_elems (PTR_VEC *vec)
 
void ** pp_ptr_vec_elems (PTR_VEC *vec)
 
const char * pp_get_msg (int msg_set, int msg_num)
 
void emit_line_directive (void)
 
void esql_yyinit (void)
 
void esql_yyerror (const char *)
 
void esql_yyverror (const char *,...)
 
void esql_yyvwarn (const char *,...)
 
void esql_yyredef (char *)
 
void esql_yy_enter (enum scanner_mode)
 
void esql_yy_push_mode (enum scanner_mode)
 
void esql_yy_pop_mode (void)
 
void esql_yy_check_mode (void)
 
void esql_yy_sync_lineno (void)
 
void esql_yy_echo (const char *str)
 
void esql_yy_erase_last_token (void)
 
varstringyy_get_buf ()
 
void echo_stream (const char *, int)
 
void echo_vstr (const char *, int)
 
ECHO_FN pp_set_echo (ECHO_FN)
 
SYMTABpp_new_symtab (void)
 
void pp_free_symtab (SYMTAB *, HT_FREE_FN)
 
SYMBOLpp_new_symbol (const char *name, int scope)
 
void pp_discard_symbol (SYMBOL *sym)
 
void pp_discard_symbol_chain (SYMBOL *sym)
 
LINKpp_new_link (void)
 
void pp_discard_link_chain (LINK *p)
 
void pp_discard_link (LINK *p)
 
STRUCTDEFpp_new_structdef (const char *tag)
 
void pp_discard_structdef (STRUCTDEF *sdef)
 
void pp_discard_structdef_chain (STRUCTDEF *sdef)
 
STRUCTDEFpp_new_pseudo_def (SPECIFIER_NOUN type, const char *subscript)
 
void pp_add_declarator (SYMBOL *sym, int type)
 
LINKpp_clone_type (LINK *tchain, LINK **endp)
 
SYMBOLpp_clone_symbol (SYMBOL *sym)
 
int pp_the_same_type (LINK *p1, LINK *p2, int relax)
 
char * pp_sclass_str (int class_)
 
char * pp_attr_str (LINK *type)
 
const char * pp_type_str (LINK *link)
 
void pp_print_syms (FILE *fp)
 
SYMBOLpp_findsym (SYMTAB *symtab, unsigned char *name)
 
void pp_symbol_init (void)
 
void pp_symbol_finish (void)
 
void pp_symbol_stats (FILE *fp)
 
void pp_init_whenever_scope (WHENEVER_SCOPE *scope, WHENEVER_SCOPE *old_scope)
 
void pp_finish_whenever_scope (WHENEVER_SCOPE *scope, WHENEVER_SCOPE *new_scope)
 

Variables

int pp_recognizing_typedef_names
 
int pp_nesting_level
 
char * pt_buffer
 
unsigned int pp_uci_opt
 
int pp_emit_line_directives
 
int pp_dump_scope_info
 
int pp_dump_malloc_info
 
const char * pp_include_path
 
char * pp_include_file
 
int pp_enable_uci_trace
 
int pp_disable_varchar_length
 
int pp_varchar2
 
int pp_unsafe_null
 
int pp_internal_ind
 
const char * prog_name
 
varstring pt_statement_buf
 
varstring pp_subscript_buf
 
varstring pp_host_var_buf
 
char * esql_yyfilename
 
int errors
 
ECHO_FN echo_fn
 
const char * VARCHAR_ARRAY_NAME
 
const char * VARCHAR_LENGTH_NAME
 
SYMTABpp_Symbol_table
 
SYMTABpp_Struct_table
 
static HOST_LODinput_refs
 
static HOST_LODoutput_refs
 

Macro Definition Documentation

#define CHECK_HOST_REF (   hvars,
 
)
Value:
((hvars) && (n) < (hvars)->n_refs ? \
&(hvars)->refs[(n)] : NULL)
#define NULL
Definition: freelistheap.h:34

Definition at line 39 of file esql_misc.h.

#define ECHO   (*echo_fn)(esql_yytext, strlen(esql_yytext))

Definition at line 44 of file esql_misc.h.

#define ECHO_NL   ECHO_STR("\n",strlen("\n"))

Definition at line 47 of file esql_misc.h.

#define ECHO_SP   ECHO_STR(" ",strlen(" "))

Definition at line 46 of file esql_misc.h.

#define ECHO_STR (   str,
  length 
)    (*echo_fn)((str), length)

Definition at line 45 of file esql_misc.h.

#define HOST_DESC (   p)    ((p) ? (p)->desc : NULL)

Definition at line 38 of file esql_misc.h.

#define HOST_N_REFS (   p)    ((p) ? (p)->n_refs : 0)

Definition at line 36 of file esql_misc.h.

#define HOST_REFS (   p)    ((p) ? (p)->refs : NULL)

Definition at line 37 of file esql_misc.h.

#define IS_AGGREGATE (   p)    ( IS_ARRAY(p) || IS_STRUCT(p) )

Definition at line 84 of file esql_misc.h.

#define IS_ARRAY (   p)
Value:
(p)->decl.d.dcl_type == D_ARRAY )
#define IS_DECLARATOR(p)
Definition: esql_misc.h:50
const char ** p
Definition: dynamic_load.c:945

Definition at line 52 of file esql_misc.h.

Referenced by pp_add_declarator(), pp_add_initializer(), pp_add_spec_to_decl(), pp_check(), pp_clone_type(), and pp_discard_link().

#define IS_BIT (   p)
Value:
( IS_SPECIFIER(p) && \
(p)->decl.s.noun == N_BIT )
#define IS_SPECIFIER(p)
Definition: esql_misc.h:49
const char ** p
Definition: dynamic_load.c:945

Definition at line 72 of file esql_misc.h.

#define IS_CHAR (   p)    ( IS_SPECIFIER(p) && (p)->decl.s.noun == N_CHR )

Definition at line 58 of file esql_misc.h.

Referenced by pp_addr_expr(), and pp_check().

#define IS_CONSTANT (   p)
Value:
( IS_SPECIFIER(p) && \
(p)->decl.s.sclass == C_CONSTANT)
#define IS_SPECIFIER(p)
Definition: esql_misc.h:49
const char ** p
Definition: dynamic_load.c:945

Definition at line 89 of file esql_misc.h.

#define IS_DECLARATOR (   p)    ( (p)->class_ == DECLARATOR )

Definition at line 50 of file esql_misc.h.

Referenced by pp_type_str().

#define IS_FUNCT (   p)
Value:
(p)->decl.d.dcl_type == D_FUNCTION)
#define IS_DECLARATOR(p)
Definition: esql_misc.h:50
const char ** p
Definition: dynamic_load.c:945

Definition at line 56 of file esql_misc.h.

Referenced by pp_clone_type(), pp_discard_link(), and pp_discard_symbol().

#define IS_INT (   p)    ( IS_SPECIFIER(p) && (p)->decl.s.noun == N_INT )

Definition at line 59 of file esql_misc.h.

Referenced by pp_add_host_ref().

#define IS_INT_CONSTANT (   p)
Value:
( IS_CONSTANT(p) && \
(p)->decl.s.noun == N_INT)
#define IS_CONSTANT(p)
Definition: esql_misc.h:89
const char ** p
Definition: dynamic_load.c:945

Definition at line 91 of file esql_misc.h.

#define IS_LABEL (   p)
Value:
( IS_SPECIFIER(p) && \
(p)->decl.s.noun == N_LABEL )
#define IS_SPECIFIER(p)
Definition: esql_misc.h:49
const char ** p
Definition: dynamic_load.c:945

Definition at line 68 of file esql_misc.h.

#define IS_LONG (   p)    ( IS_INT(p) && (p)->decl.s.is_long )

Definition at line 61 of file esql_misc.h.

Referenced by pp_add_host_ref().

#define IS_POINTER (   p)
Value:
(p)->decl.d.dcl_type == D_POINTER)
#define IS_DECLARATOR(p)
Definition: esql_misc.h:50
const char ** p
Definition: dynamic_load.c:945

Definition at line 54 of file esql_misc.h.

Referenced by pp_check().

#define IS_PSEUDO_TYPE (   p)
Value:
( IS_SPECIFIER(p) && \
((p)->decl.s.noun == N_VARCHAR || \
(p)->decl.s.noun == N_BIT || \
(p)->decl.s.noun == N_VARBIT) )
#define IS_SPECIFIER(p)
Definition: esql_misc.h:49
const char ** p
Definition: dynamic_load.c:945

Definition at line 76 of file esql_misc.h.

Referenced by pp_add_spec_to_decl(), pp_addr_expr(), pp_print_decls(), and pp_struct_deref().

#define IS_PTR_TYPE (   p)    ( IS_ARRAY(p) || IS_POINTER(p) )

Definition at line 85 of file esql_misc.h.

Referenced by pp_addr_expr(), pp_ptr_deref(), pp_struct_deref(), and pp_the_same_type().

#define IS_SPECIFIER (   p)    ( (p)->class_ == SPECIFIER )

Definition at line 49 of file esql_misc.h.

Referenced by pp_attr_str(), pp_check(), and pp_print_link().

#define IS_STRUCT (   p)
Value:
( IS_SPECIFIER(p) && \
(p)->decl.s.noun == N_STRUCTURE )
#define IS_SPECIFIER(p)
Definition: esql_misc.h:49
const char ** p
Definition: dynamic_load.c:945

Definition at line 66 of file esql_misc.h.

Referenced by pp_struct_deref().

#define IS_TYPEDEF (   p)
Value:
( IS_SPECIFIER(p) && \
(p)->decl.s.sclass == C_TYPEDEF )
#define IS_SPECIFIER(p)
Definition: esql_misc.h:49
const char ** p
Definition: dynamic_load.c:945

Definition at line 87 of file esql_misc.h.

Referenced by pp_add_spec_to_decl().

#define IS_UINT (   p)    ( IS_INT(p) && (p)->decl.s.is_unsigned )

Definition at line 60 of file esql_misc.h.

#define IS_ULONG (   p)
Value:
( IS_INT(p) && (p)->decl.s.is_long && \
(p)->decl.s.is_unsigned )
#define IS_INT(p)
Definition: esql_misc.h:59
const char ** p
Definition: dynamic_load.c:945

Definition at line 62 of file esql_misc.h.

#define IS_UNSIGNED (   p)    ( (p)->decl.s.is_unsigned )

Definition at line 64 of file esql_misc.h.

#define IS_VAR_TYPE (   p)
Value:
( IS_SPECIFIER(p) && \
((p)->decl.s.noun == N_VARCHAR || \
(p)->decl.s.noun == N_VARBIT) )
#define IS_SPECIFIER(p)
Definition: esql_misc.h:49
const char ** p
Definition: dynamic_load.c:945

Definition at line 80 of file esql_misc.h.

Referenced by pp_add_spec_to_decl().

#define IS_VARBIT (   p)
Value:
( IS_SPECIFIER(p) && \
(p)->decl.s.noun == N_VARBIT )
#define IS_SPECIFIER(p)
Definition: esql_misc.h:49
const char ** p
Definition: dynamic_load.c:945

Definition at line 74 of file esql_misc.h.

#define IS_VARCHAR (   p)
Value:
( IS_SPECIFIER(p) && \
(p)->decl.s.noun == N_VARCHAR )
#define IS_SPECIFIER(p)
Definition: esql_misc.h:49
const char ** p
Definition: dynamic_load.c:945

Definition at line 70 of file esql_misc.h.

#define MEMBER (   set,
  val 
)    ((set) & (1 << (val)))

Definition at line 42 of file esql_misc.h.

Referenced by pp_check_type().

#define NEWSET (   val)    (1 << (val))

Definition at line 43 of file esql_misc.h.

Typedef Documentation

typedef unsigned int BITSET

Definition at line 94 of file esql_misc.h.

typedef void(* ECHO_FN) (const char *, int)

Definition at line 95 of file esql_misc.h.

Definition at line 96 of file esql_misc.h.

Definition at line 97 of file esql_misc.h.

Enumeration Type Documentation

anonymous enum
Enumerator
MSG_OUT_OF_MEMORY 

Definition at line 128 of file esql_misc.h.

enum ex_msg
Enumerator
EX_ARGS_SET 
EX_CURSOR_SET 
EX_DECL_SET 
EX_ENVIRON_SET 
EX_ESQLM_SET 
EX_ARG_NAME_SET 
EX_ARG_DESCRIPTION_SET 
EX_ESQLMMAIN_SET 
EX_ESQLMSCANSUPPORT_SET 
EX_HASH_SET 
EX_HOSTVAR_SET 
EX_MISC_SET 
EX_SYMBOL_SET 
EX_TRANS_SET 

Definition at line 110 of file esql_misc.h.

Enumerator
ECHO_MODE 
SQLX_MODE 
C_MODE 
EXPR_MODE 
VAR_MODE 
HV_MODE 
BUFFER_MODE 
COMMENT_MODE 

Definition at line 134 of file esql_misc.h.

Function Documentation

void echo_stream ( const char *  ,
int   
)
void echo_vstr ( const char *  ,
int   
)
void esql_yy_check_mode ( void  )
void esql_yy_echo ( const char *  str)
void esql_yy_enter ( enum  scanner_mode)
void esql_yy_erase_last_token ( void  )
void esql_yy_pop_mode ( void  )
void esql_yy_push_mode ( enum  scanner_mode)
void esql_yy_sync_lineno ( void  )
void esql_yyerror ( const char *  )

Referenced by pp_the_same_type().

Here is the caller graph for this function:

void esql_yyinit ( void  )
void esql_yyredef ( char *  )

Referenced by pp_add_symbols_to_table(), and pp_do_enum().

Here is the caller graph for this function:

void esql_yyvwarn ( const char *  ,
  ... 
)
void pp_add_cursor_to_scope ( CURSOR cursor)

Definition at line 1090 of file esql_declare.c.

References scope::cursor_chain, and cursor::next.

Referenced by pp_new_cursor().

Here is the caller graph for this function:

void pp_add_declarator ( SYMBOL sym,
int  type 
)
void pp_add_initializer ( SYMBOL sym)

Definition at line 1056 of file esql_declare.c.

References link::d, link::decl, IS_ARRAY, NULL, declarator::num_ele, and symbol::type.

PTR_VEC* pp_add_ptr ( PTR_VEC vec,
void *  new_elem 
)

Definition at line 294 of file esql_misc.c.

References ptr_vec::elems, grow_ptr_vec(), ptr_vec::max_elems, ptr_vec::n_elems, and NULL.

void pp_add_whenever_to_scope ( WHEN_CONDITION  cond,
WHEN_ACTION  action,
char *  name 
)
HOST_VAR* pp_addr_of ( HOST_VAR var)
char* pp_attr_str ( LINK type)

Definition at line 620 of file esql_symbol_table.c.

References assert, link::decl, specifier::is_long, specifier::is_short, IS_SPECIFIER, specifier::is_unsigned, N_CHR, N_FLOAT, N_INT, specifier::noun, and link::s.

Referenced by pp_type_str().

Here is the caller graph for this function:

HOST_REF* pp_check_type ( HOST_REF ref,
BITSET  typeset,
const char *  msg 
)
void pp_clear_host_lod ( HOST_LOD lod)

Definition at line 1467 of file esql_host_variable.c.

References host_lod::desc, i, host_lod::n_real_refs, host_lod::n_refs, NULL, pp_free_host_ref(), host_lod::real_refs, and host_lod::refs.

Referenced by pp_clear_host_refs(), and pp_free_host_lod().

Here is the caller graph for this function:

void pp_clear_host_refs ( void  )

Definition at line 167 of file esql_host_variable.c.

References host_lod_chain, host_lod_free_list, input_refs, host_lod::next, NULL, output_refs, and pp_clear_host_lod().

Referenced by pp_hv_init().

Here is the caller graph for this function:

SYMBOL* pp_clone_symbol ( SYMBOL sym)

Definition at line 493 of file esql_symbol_table.c.

References symbol::etype, symbol::level, symbol::name, symbol::next, NULL, pp_clone_type(), pp_new_symbol(), and symbol::type.

Referenced by pp_clone_type().

Here is the caller graph for this function:

LINK* pp_clone_type ( LINK tchain,
LINK **  endp 
)
HOST_LOD* pp_copy_host_refs ( void  )

Definition at line 474 of file esql_host_variable.c.

References NULL, and pp_host_refs.

Referenced by pp_detach_host_refs().

Here is the caller graph for this function:

LINK* pp_current_type_spec ( void  )

Definition at line 663 of file esql_declare.c.

References spec_state::spec.

Referenced by pp_add_dummy_structdef(), pp_hv_init(), and pp_new_pseudo_def().

Here is the caller graph for this function:

void pp_cursor_finish ( void  )

Definition at line 143 of file esql_cursor.c.

References hash_tab_s::free_table, NULL, pp_free_cursor(), and pp_free_stmt().

Referenced by pp_finish().

Here is the caller graph for this function:

void pp_cursor_init ( void  )

Definition at line 132 of file esql_cursor.c.

References es_ht_make_table(), pp_generic_case_cmp(), and pp_generic_case_hash().

Referenced by pp_startup().

Here is the caller graph for this function:

void pp_decl_finish ( void  )

Definition at line 555 of file esql_declare.c.

References free_and_init, pp_pop_name_scope(), and pp_pop_spec_scope().

Referenced by pp_finish().

Here is the caller graph for this function:

void pp_decl_init ( void  )

Definition at line 530 of file esql_declare.c.

References NFRAMES, NULL, pp_make_typedef_names_visible(), pp_malloc(), pp_nesting_level, pp_push_name_scope(), and pp_push_spec_scope().

Referenced by pp_startup().

Here is the caller graph for this function:

HOST_LOD* pp_detach_host_refs ( void  )

Definition at line 494 of file esql_host_variable.c.

References host_lod_chain, host_lod::next, NULL, and pp_copy_host_refs().

void pp_disallow_storage_classes ( void  )

Definition at line 1076 of file esql_declare.c.

References spec_state::sc_allowed.

void pp_discard_cursor_chain ( CURSOR chain)

Definition at line 239 of file esql_cursor.c.

References cursor::next, NULL, and pp_free_cursor().

Referenced by pp_pop_name_scope().

Here is the caller graph for this function:

void pp_discard_link_chain ( LINK p)

Definition at line 248 of file esql_symbol_table.c.

References linkchunk::next, link::next, and pp_discard_link().

Referenced by pp_add_typedefed_spec(), pp_discard_symbol(), pp_free_host_var(), and pp_struct_deref().

Here is the caller graph for this function:

void pp_discard_structdef ( STRUCTDEF sdef)
void pp_discard_structdef_chain ( STRUCTDEF sdef)

Definition at line 369 of file esql_symbol_table.c.

References linkchunk::next, structdef::next, NULL, and pp_discard_structdef().

Referenced by pp_pop_name_scope().

Here is the caller graph for this function:

void pp_discard_symbol_chain ( SYMBOL sym)

Definition at line 183 of file esql_symbol_table.c.

References symbol::next, p, and pp_discard_symbol().

Referenced by pp_discard_link(), pp_discard_structdef(), pp_discard_symbol(), and pp_pop_name_scope().

Here is the caller graph for this function:

SYMBOL* pp_findsym ( SYMTAB symtab,
unsigned char *  name 
)

Definition at line 831 of file esql_symbol_table.c.

References hash_tab_s::find_symbol, and symbol::name.

Referenced by pp_add_symbols_to_table(), and pp_new_pseudo_def().

Here is the caller graph for this function:

void pp_finish ( void  )
void pp_finish_whenever_scope ( WHENEVER_SCOPE scope,
WHENEVER_SCOPE new_scope 
)
void pp_free_cursor ( CURSOR cursor)

Definition at line 90 of file esql_cursor.c.

References es_ht_free_symbol(), free_and_init, cursor::host_refs, cursor::name, pp_free_host_lod(), and cursor::static_stmt.

Referenced by pp_cursor_finish(), and pp_discard_cursor_chain().

Here is the caller graph for this function:

void pp_free_host_lod ( HOST_LOD lod)

Definition at line 1445 of file esql_host_variable.c.

References free_and_init, NULL, pp_clear_host_lod(), and host_lod::real_refs.

Referenced by pp_free_cursor(), and pp_hv_finish().

Here is the caller graph for this function:

void pp_free_host_var ( HOST_VAR var)
void pp_free_ptr_vec ( PTR_VEC vec)
void pp_free_stmt ( STMT stmt)

Definition at line 292 of file esql_cursor.c.

References es_ht_free_symbol(), free_and_init, stmt::name, and NULL.

Referenced by pp_cursor_finish().

Here is the caller graph for this function:

void pp_free_symtab ( SYMTAB ,
HT_FREE_FN   
)

Definition at line 90 of file esql_symbol_table.c.

References hash_tab_s::free_table.

Referenced by pp_symbol_finish().

Here is the caller graph for this function:

void pp_gather_input_refs ( void  )

Definition at line 112 of file esql_host_variable.c.

References input_refs, output_refs, and pp_host_refs.

void pp_gather_output_refs ( void  )

Definition at line 128 of file esql_host_variable.c.

References input_refs, output_refs, and pp_host_refs.

int pp_generic_case_cmp ( void *  p1,
void *  p2 
)

Definition at line 115 of file esql_misc.c.

References intl_mbs_casecmp(), and generic::name.

Referenced by pp_cursor_init().

Here is the caller graph for this function:

unsigned int pp_generic_case_hash ( void *  p)

Definition at line 70 of file esql_misc.c.

References char_tolower(), hashpjw(), i, and generic::name.

Referenced by pp_cursor_init().

Here is the caller graph for this function:

int pp_generic_cmp ( void *  p1,
void *  p2 
)

Definition at line 132 of file esql_misc.c.

References generic::name.

Referenced by pp_new_symtab().

Here is the caller graph for this function:

unsigned int pp_generic_hash ( void *  p)

Definition at line 99 of file esql_misc.c.

References hashpjw(), and generic::name.

Referenced by pp_new_symtab().

Here is the caller graph for this function:

void pp_hv_finish ( void  )

Definition at line 1382 of file esql_host_variable.c.

References host_lod::next, pp_discard_symbol(), and pp_free_host_lod().

Referenced by pp_finish().

Here is the caller graph for this function:

void pp_init_whenever_scope ( WHENEVER_SCOPE scope,
WHENEVER_SCOPE old_scope 
)

Definition at line 67 of file esql_whenever.c.

References default_whenever_scope_initializer, and NULL.

Referenced by pp_push_name_scope().

Here is the caller graph for this function:

HOST_LOD* pp_input_refs ( void  )

Definition at line 144 of file esql_host_variable.c.

References input_refs.

CURSOR* pp_lookup_cursor ( char *  name)

Definition at line 118 of file esql_cursor.c.

References hash_tab_s::find_symbol, and cursor::name.

Referenced by pp_new_cursor().

Here is the caller graph for this function:

void pp_make_typedef_names_visible ( int  )

Definition at line 515 of file esql_declare.c.

References pp_recognizing_typedef_names, and scope::recognizing_typedef_names.

Referenced by pp_decl_init(), pp_pop_name_scope(), and pp_push_name_scope().

Here is the caller graph for this function:

void* pp_malloc ( int  n)
HOST_VAR* pp_new_host_var ( HOST_VAR var,
SYMBOL sym 
)
STMT* pp_new_stmt ( char *  name)
STRUCTDEF* pp_new_structdef ( const char *  tag)
SYMBOL* pp_new_symbol ( const char *  name,
int  scope 
)
SYMTAB* pp_new_symtab ( void  )

Definition at line 78 of file esql_symbol_table.c.

References es_ht_make_table(), pp_generic_cmp(), pp_generic_hash(), and SYMTAB_SIZE.

Referenced by pp_symbol_init().

Here is the caller graph for this function:

HOST_LOD* pp_output_refs ( void  )

Definition at line 154 of file esql_host_variable.c.

References output_refs.

void pp_pop_spec_scope ( void  )

Definition at line 626 of file esql_declare.c.

References assert, and NULL.

Referenced by pp_decl_finish(), and pp_new_pseudo_def().

Here is the caller graph for this function:

void pp_print_cursors ( FILE *  fp)

Definition at line 199 of file esql_cursor.c.

References EX_CURSOR_SET, hash_tab_s::get_symbol_count, MSG_TABLE_TITLE, pp_get_msg(), pp_print_cursor(), and hash_tab_s::print_table.

Referenced by pp_pop_name_scope().

Here is the caller graph for this function:

void pp_print_decls ( SYMBOL sym_chain,
int  preechoed 
)
void pp_print_specs ( LINK link)

Definition at line 1414 of file esql_declare.c.

References D_ARRAY, esql_yyout, pp_print_link(), vs_free(), vs_new(), and vs_str().

void pp_print_syms ( FILE *  fp)

Definition at line 801 of file esql_symbol_table.c.

References es_print_struct(), es_print_symbol(), hash_tab_s::get_symbol_count, NULL, and hash_tab_s::print_table.

Referenced by pp_pop_name_scope().

Here is the caller graph for this function:

void** pp_ptr_vec_elems ( PTR_VEC vec)

Definition at line 335 of file esql_misc.c.

References ptr_vec::elems, ptr_vec::n_elems, and NULL.

int pp_ptr_vec_n_elems ( PTR_VEC vec)

Definition at line 316 of file esql_misc.c.

References ptr_vec::n_elems, and NULL.

void pp_remove_cursors_from_table ( CURSOR chain)

Definition at line 220 of file esql_cursor.c.

References cursor::next, NULL, and hash_tab_s::remove_symbol.

Referenced by pp_pop_name_scope().

Here is the caller graph for this function:

void pp_remove_symbols_from_table ( SYMBOL sym_chain)

Definition at line 361 of file esql_declare.c.

References symbol::next, pp_Symbol_table, and hash_tab_s::remove_symbol.

Referenced by pp_pop_name_scope().

Here is the caller graph for this function:

char* pp_sclass_str ( int  class_)
ECHO_FN pp_set_echo ( ECHO_FN  )
char* pp_strdup ( const char *  str)

Definition at line 372 of file esql_misc.c.

References NULL, pp_malloc(), and strlen.

Referenced by es_write_log(), pp_check_type(), pp_clone_type(), and pp_new_pseudo_def().

Here is the caller graph for this function:

void pp_suppress_echo ( int  )
char* pp_switch_to_descriptor ( void  )
void pp_symbol_finish ( void  )

Definition at line 869 of file esql_symbol_table.c.

References es_ht_free_symbol(), free_and_init, linkchunk::next, structdef::next, symbol::next, NULL, pp_discard_structdef(), pp_discard_symbol(), pp_free_symtab(), and syms_to_free_lists.

Referenced by pp_finish().

Here is the caller graph for this function:

void pp_symbol_init ( void  )

Definition at line 844 of file esql_symbol_table.c.

References links_allocated, links_deallocated, NULL, pp_new_symtab(), sdefs_allocated, sdefs_deallocated, syms_allocated, syms_deallocated, and syms_to_free_lists.

Referenced by pp_startup().

Here is the caller graph for this function:

void pp_symbol_stats ( FILE *  fp)

Definition at line 921 of file esql_symbol_table.c.

References links_allocated, links_deallocated, pp_dump_malloc_info, sdefs_allocated, sdefs_deallocated, syms_allocated, and syms_deallocated.

Referenced by pp_finish().

Here is the caller graph for this function:

void pp_translate_string ( varstring vstr,
const char *  str,
int  in_string 
)

Definition at line 1532 of file esql_host_variable.c.

References NULL, p, vs_putc(), and vs_strcat().

Referenced by pp_add_host_str().

Here is the caller graph for this function:

varstring* yy_get_buf ( )

Variable Documentation

ECHO_FN echo_fn
char* esql_yyfilename
HOST_LOD* input_refs
static
HOST_LOD * output_refs
static
int pp_disable_varchar_length
int pp_dump_malloc_info

Referenced by pp_symbol_stats().

int pp_dump_scope_info

Referenced by pp_pop_name_scope().

int pp_emit_line_directives
varstring pp_host_var_buf

Definition at line 58 of file esql_misc.c.

char* pp_include_file

Referenced by tr_prelude().

const char* pp_include_path
int pp_internal_ind

Referenced by pp_get_ind_addr_expr().

int pp_nesting_level
int pp_recognizing_typedef_names

Definition at line 113 of file esql_declare.c.

Referenced by pp_make_typedef_names_visible().

SYMTAB* pp_Struct_table

Definition at line 51 of file esql_symbol_table.c.

Referenced by pp_add_dummy_structdef(), and pp_remove_structdefs_from_table().

varstring pp_subscript_buf

Definition at line 57 of file esql_misc.c.

unsigned int pp_uci_opt

Referenced by emit_start().

int pp_unsafe_null
int pp_varchar2

Referenced by tr_prelude().

const char* prog_name

Referenced by er_log(), and pp_malloc().

char* pt_buffer
varstring pt_statement_buf
const char* VARCHAR_ARRAY_NAME
const char* VARCHAR_LENGTH_NAME