Listing 2 C Symbol Table Package
int sym_util_debug = 0 ; /* Global debug switch. */ /* Internal variables. */ typedef struct symbol_node { ... } symbol_node ; static symbol_node *symbol_list = NULL ; /* Public functions. */ void sym_add (), sym_delete () ; int sym_lookup (); /* Internal functions. */ static symbol_node *sym_locate () ; void sym_add (name, value) char *name ; int value ; { ... adds NAME/VALUE pair to the symbol table ... } void sym_delete (name) char *name ; { ... deletes NAME from the symbol table ... } int sym_lookup (name) char *name ; { ... returns NAME's value from the symbol table ... } /* Internal function called by the other functions. */ static symbol_node *sym_locate (name) char *name ; { ... locates NAME's node in the symbol list ... } /* End of File */