libyasm/symrec.h

Go to the documentation of this file.
00001 
00034 #ifndef YASM_SYMREC_H
00035 #define YASM_SYMREC_H
00036 
00037 #ifndef YASM_LIB_DECL
00038 #define YASM_LIB_DECL
00039 #endif
00040 
00045 typedef enum yasm_sym_status {
00046     YASM_SYM_NOSTATUS = 0,          
00047     YASM_SYM_USED = 1 << 0,         
00048     YASM_SYM_DEFINED = 1 << 1,      
00049     YASM_SYM_VALUED = 1 << 2,       
00050     YASM_SYM_NOTINTABLE = 1 << 3    
00051 } yasm_sym_status;
00052 
00056 typedef enum yasm_sym_vis {
00057     YASM_SYM_LOCAL = 0,         
00058     YASM_SYM_GLOBAL = 1 << 0,   
00059     YASM_SYM_COMMON = 1 << 1,   
00060     YASM_SYM_EXTERN = 1 << 2,   
00061     YASM_SYM_DLOCAL = 1 << 3    
00062 } yasm_sym_vis;
00063 
00065 YASM_LIB_DECL
00066 yasm_symtab *yasm_symtab_create(void);
00067 
00073 YASM_LIB_DECL
00074 void yasm_symtab_destroy(/*@only@*/ yasm_symtab *symtab);
00075 
00083 YASM_LIB_DECL
00084 /*@dependent@*/ yasm_symrec *yasm_symtab_abs_sym(yasm_symtab *symtab);
00085 
00093 YASM_LIB_DECL
00094 /*@dependent@*/ yasm_symrec *yasm_symtab_use
00095     (yasm_symtab *symtab, const char *name, unsigned long line);
00096 
00105 YASM_LIB_DECL
00106 /*@null@*/ /*@dependent@*/ yasm_symrec *yasm_symtab_get
00107     (yasm_symtab *symtab, const char *name);
00108 
00116 YASM_LIB_DECL
00117 /*@dependent@*/ yasm_symrec *yasm_symtab_define_equ
00118     (yasm_symtab *symtab, const char *name, /*@keep@*/ yasm_expr *e,
00119      unsigned long line);
00120 
00130 YASM_LIB_DECL
00131 /*@dependent@*/ yasm_symrec *yasm_symtab_define_label
00132     (yasm_symtab *symtab, const char *name,
00133      /*@dependent@*/ yasm_bytecode *precbc, int in_table, unsigned long line);
00134 
00145 YASM_LIB_DECL
00146 /*@dependent@*/ yasm_symrec *yasm_symtab_define_curpos
00147     (yasm_symtab *symtab, const char *name,
00148      /*@dependent@*/ yasm_bytecode *precbc, unsigned long line);
00149 
00158 YASM_LIB_DECL
00159 /*@dependent@*/ yasm_symrec *yasm_symtab_define_special
00160     (yasm_symtab *symtab, const char *name, yasm_sym_vis vis);
00161 
00170 YASM_LIB_DECL
00171 /*@dependent@*/ yasm_symrec *yasm_symtab_declare
00172     (yasm_symtab *symtab, const char *name, yasm_sym_vis vis,
00173      unsigned long line);
00174 
00181 YASM_LIB_DECL
00182 void yasm_symrec_declare(yasm_symrec *symrec, yasm_sym_vis vis,
00183                          unsigned long line);
00184 
00190 typedef int (*yasm_symtab_traverse_callback)
00191     (yasm_symrec *sym, /*@null@*/ void *d);
00192 
00200 YASM_LIB_DECL
00201 int /*@alt void@*/ yasm_symtab_traverse
00202     (yasm_symtab *symtab, /*@null@*/ void *d,
00203      yasm_symtab_traverse_callback func);
00204 
00206 typedef struct yasm_symtab_iter yasm_symtab_iter;
00207 
00212 YASM_LIB_DECL
00213 const yasm_symtab_iter *yasm_symtab_first(const yasm_symtab *symtab);
00214 
00219 YASM_LIB_DECL
00220 /*@null@*/ const yasm_symtab_iter *yasm_symtab_next
00221     (const yasm_symtab_iter *prev);
00222 
00227 YASM_LIB_DECL
00228 yasm_symrec *yasm_symtab_iter_value(const yasm_symtab_iter *cur);
00229 
00237 YASM_LIB_DECL
00238 void yasm_symtab_parser_finalize(yasm_symtab *symtab, int undef_extern,
00239                                  yasm_errwarns *errwarns);
00240 
00246 YASM_LIB_DECL
00247 void yasm_symtab_print(yasm_symtab *symtab, FILE *f, int indent_level);
00248 
00253 YASM_LIB_DECL
00254 /*@observer@*/ const char *yasm_symrec_get_name(const yasm_symrec *sym);
00255 
00261 YASM_LIB_DECL
00262 /*@only@*/ char *yasm_symrec_get_global_name(const yasm_symrec *sym,
00263                                              const yasm_object *object);
00264 
00269 YASM_LIB_DECL
00270 yasm_sym_vis yasm_symrec_get_visibility(const yasm_symrec *sym);
00271 
00276 YASM_LIB_DECL
00277 yasm_sym_status yasm_symrec_get_status(const yasm_symrec *sym);
00278 
00283 YASM_LIB_DECL
00284 unsigned long yasm_symrec_get_def_line(const yasm_symrec *sym);
00285 
00290 YASM_LIB_DECL
00291 unsigned long yasm_symrec_get_decl_line(const yasm_symrec *sym);
00292 
00297 YASM_LIB_DECL
00298 unsigned long yasm_symrec_get_use_line(const yasm_symrec *sym);
00299 
00304 YASM_LIB_DECL
00305 /*@observer@*/ /*@null@*/ const yasm_expr *yasm_symrec_get_equ
00306     (const yasm_symrec *sym);
00307 
00309 typedef /*@dependent@*/ yasm_bytecode *yasm_symrec_get_label_bytecodep;
00310 
00317 YASM_LIB_DECL
00318 int yasm_symrec_get_label(const yasm_symrec *sym,
00319                           /*@out@*/ yasm_symrec_get_label_bytecodep *precbc);
00320 
00326 YASM_LIB_DECL
00327 int yasm_symrec_is_abs(const yasm_symrec *sym);
00328 
00333 YASM_LIB_DECL
00334 int yasm_symrec_is_special(const yasm_symrec *sym);
00335 
00340 YASM_LIB_DECL
00341 int yasm_symrec_is_curpos(const yasm_symrec *sym);
00342 
00347 YASM_LIB_DECL
00348 void yasm_symrec_set_objext_valparams
00349     (yasm_symrec *sym, /*@only@*/ yasm_valparamhead *objext_valparams);
00350 
00356 YASM_LIB_DECL
00357 /*@null@*/ /*@dependent@*/ yasm_valparamhead *yasm_symrec_get_objext_valparams
00358     (yasm_symrec *sym);
00359 
00364 YASM_LIB_DECL
00365 void yasm_symrec_set_common_size
00366     (yasm_symrec *sym, /*@only@*/ yasm_expr *common_size);
00367 
00373 YASM_LIB_DECL
00374 /*@dependent@*/ /*@null@*/ yasm_expr **yasm_symrec_get_common_size
00375     (yasm_symrec *sym);
00376 
00382 YASM_LIB_DECL
00383 /*@dependent@*/ /*@null@*/ void *yasm_symrec_get_data
00384     (yasm_symrec *sym, const yasm_assoc_data_callback *callback);
00385 
00392 YASM_LIB_DECL
00393 void yasm_symrec_add_data(yasm_symrec *sym,
00394                           const yasm_assoc_data_callback *callback,
00395                           /*@only@*/ /*@null@*/ void *data);
00396 
00402 YASM_LIB_DECL
00403 void yasm_symrec_print(const yasm_symrec *sym, FILE *f, int indent_level);
00404 
00405 #endif

Generated on Sat Sep 6 01:23:36 2008 for libyasm by  doxygen 1.5.2