File libsrc/vre_parse.c


Included Files


Type struct achunk

struct achunk
struct achunk  
   {  
      dl_Node_t ac_Node;  
      char ac_Name[1];  
   }  

Local Variables

vre_strs
static struct match_token vre_strs[]
Used in: vre_Parse_Line()  

ntyp
static struct vre_type_obj* ntyp

Used in: Add_Struct_Elem()  
  End_New_Typ()  
  Start_New_Typ()  
  vre_Parse_Line()  

doing_struct
static int doing_struct

Used in: End_New_Typ()  
  vre_Parse_Line()  

achunk_init
static int achunk_init

Used in: init_achunks()  

achunks
static dl_List_t achunks

Used in: free_c_vars()  
  init_achunks()  

Global Function vre_Parse_File()

int vre_Parse_File ( FILE* fp, const char* fname )
Prototyped in: mplib1/vre.h
Calls: fgetline() libsrc/fgetline.c
  vre_Parse_Line() libsrc/vre_parse.c
  fclose(), fopen(), strlen()
Called by: vre_Interactive_Loop() libsrc/vre_loop.c

Global Function vre_Parse_Line()

int vre_Parse_Line ( FILE* fp, char* line )
Prototyped in: mplib1/vre.h
Calls: Add_Struct_Elem() libsrc/vre_parse.c
  End_New_Typ() libsrc/vre_parse.c
  Start_New_Typ() libsrc/vre_parse.c
  do_typedef() libsrc/vre_parse.c
  match_a_string() libsrc/match_tok.c
  fprintf(), free(), strdup()
Called by: vre_Interactive_Loop() libsrc/vre_loop.c
  vre_Parse_File() libsrc/vre_parse.c
References Variables: doing_struct libsrc/vre_parse.c
  ntyp libsrc/vre_parse.c
  vre_strs libsrc/vre_parse.c

Local Function Add_Struct_Elem()

static int Add_Struct_Elem ( FILE* fp, char* dp )
Calls: free_c_vars() libsrc/vre_parse.c
  get_type_and_var() libsrc/vre_parse.c
  vre_Cat_New_Elem() libsrc/vre_alloc.c
  fprintf()
Called by: vre_Parse_Line() libsrc/vre_parse.c
References Variables: ntyp libsrc/vre_parse.c

Local Function End_New_Typ()

static int End_New_Typ ( FILE* fp )
Calls: dl_Walk_List() libsrc/dl_l_014.c
  vre_Add_Type() libsrc/vre_alloc.c
  fprintf(), free()
Called by: vre_Parse_Line() libsrc/vre_parse.c
References Functions: free_elems() libsrc/vre_parse.c
References Variables: doing_struct libsrc/vre_parse.c
  ntyp libsrc/vre_parse.c

Local Function Start_New_Typ()

static int Start_New_Typ ( FILE* fp, char* dp )
Calls: free_c_vars() libsrc/vre_parse.c
  get_c_var() libsrc/vre_parse.c
  vre_New_Type() libsrc/vre_alloc.c
  fprintf()
Called by: vre_Parse_Line() libsrc/vre_parse.c
References Variables: ntyp libsrc/vre_parse.c

Local Function check_ptr()

static int check_ptr ( char* raw, char** after )
Called by: get_type_and_var() libsrc/vre_parse.c

Local Function do_typedef()

static int do_typedef ( FILE* fp, char* dp )
Calls: free_c_vars() libsrc/vre_parse.c
  get_type_and_var() libsrc/vre_parse.c
  vre_Type_Synonym() libsrc/vre_alloc.c
  fprintf()
Called by: vre_Parse_Line() libsrc/vre_parse.c

Local Function free_c_vars()

static void free_c_vars ( void )
Calls: dl_Walk_List() libsrc/dl_l_014.c
  init_achunks() libsrc/vre_parse.c
Called by: Add_Struct_Elem() libsrc/vre_parse.c
  Start_New_Typ() libsrc/vre_parse.c
  do_typedef() libsrc/vre_parse.c
References Functions: free_em() libsrc/vre_parse.c
References Variables: achunks libsrc/vre_parse.c

Local Function free_elems()

static void free_elems ( void* vp1, void* vp2 )
Calls: free()
Used in: End_New_Typ() libsrc/vre_parse.c

Local Function free_em()

static void free_em ( void* vp1, void* vp2 )
Calls: dl_Remove_Node() libsrc/dl_l_002.c
  free()
Used in: free_c_vars() libsrc/vre_parse.c

Local Function get_arr_sz()

static int get_arr_sz ( char* cp, char** ncp )
Calls: strtol()
Called by: get_c_var() libsrc/vre_parse.c

Local Function get_c_var()

static char* get_c_var ( char* raw, char** after, int* arr_szp )
Calls: dl_Init_Node() libsrc/dl_l_001.c
  get_arr_sz() libsrc/vre_parse.c
  init_achunks() libsrc/vre_parse.c
  __ctype_b_loc(), malloc(), strncpy()
Called by: Start_New_Typ() libsrc/vre_parse.c
  get_type_and_var() libsrc/vre_parse.c

Local Function get_type_and_var()

static int get_type_and_var ( char* dp, char** el_nm, char** tp_nm, int* is_ptr, int* arr_szp, struct vre_type_obj** top )
Calls: check_ptr() libsrc/vre_parse.c
  get_c_var() libsrc/vre_parse.c
  match_string() libsrc/match_tok.c
  vre_Find_Type() libsrc/vre_alloc.c
Called by: Add_Struct_Elem() libsrc/vre_parse.c
  do_typedef() libsrc/vre_parse.c

Local Function init_achunks()

static int init_achunks ( void )
Calls: dl_Init_List() libsrc/dl_l_001.c
Called by: free_c_vars() libsrc/vre_parse.c
  get_c_var() libsrc/vre_parse.c
References Variables: achunk_init libsrc/vre_parse.c
  achunks libsrc/vre_parse.c