#ifndef SYMTAB_H_
# define SYMTAB_H_
+# include "struniq.h"
# include "location.h"
# include "assoc.h"
struct symbol_s
{
/* The key, name of the symbol. */
- char *tag;
+ struniq_t tag;
/* The location of its first occurence. */
location_t location;
/* Its %type and associated printer and destructor. */
- char *type_name;
+ struniq_t type_name;
char *destructor;
location_t destructor_location;
char *printer;
/* Set the TYPE_NAME associated to SYMBOL. Does nothing if passed 0 as
TYPE_NAME. */
void symbol_type_set (symbol_t *symbol,
- char *type_name, location_t location);
+ struniq_t type_name, location_t location);
/* Set the DESTRUCTOR associated to SYMBOL. */
void symbol_destructor_set (symbol_t *symbol,
/* A function to apply to each symbol. */
typedef bool (*symbol_processor) (symbol_t *);
-/* Apply PROCESSOR to all the symbols. PROCESSOR must return TRUE: on
- FALSE, the processing stops. */
+/* Apply PROCESSOR to all the symbols. PROCESSOR must return true: on
+ false, the processing stops. */
void symbols_do (symbol_processor processor, void *processor_data);
/* Free all the memory allocated for symbols. */