X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/867a3e0085abd0281d41a7a1a56dea143dadf4eb..55f0c7b1f26afabb7f356343f2650626e09fce51:/src/symtab.h diff --git a/src/symtab.h b/src/symtab.h index 725b6cb8..0f87c224 100644 --- a/src/symtab.h +++ b/src/symtab.h @@ -60,10 +60,12 @@ struct symbol uniqstr type_name; location type_location; - char *destructor; + /* Does not own the memory. */ + const char *destructor; location destructor_location; - char *printer; + /* Does not own the memory. */ + const char *printer; location printer_location; symbol_number number; @@ -92,7 +94,7 @@ struct symbol #define NUMBER_UNDEFINED (-1) /* Print a symbol (for debugging). */ -void symbol_print (FILE *f, symbol *s); +void symbol_print (symbol *s, FILE *f); /* Fetch (or create) the symbol associated to KEY. */ symbol *symbol_get (const char *key, location loc); @@ -109,10 +111,10 @@ void symbol_make_alias (symbol *sym, symbol *symval, location loc); void symbol_type_set (symbol *sym, uniqstr type_name, location loc); /* Set the DESTRUCTOR associated with SYM. */ -void symbol_destructor_set (symbol *sym, char *destructor, location loc); +void symbol_destructor_set (symbol *sym, const char *destructor, location loc); /* Set the PRINTER associated with SYM. */ -void symbol_printer_set (symbol *sym, char *printer, location loc); +void symbol_printer_set (symbol *sym, const char *printer, location loc); /* Set the PRECEDENCE associated with SYM. Ensure that SYMBOL is a terminal. Do nothing if invoked with UNDEF_ASSOC as ASSOC. */