mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 22:03:02 +00:00
* src/reader.h, src/reader.c (symbol_list_new): Export it.
(symbol_list_prepend): New. * src/parse-gram.y (%union): `list' is a new member. (symbols.1): New, replaces... (terms_to_prec.1, nterms_to_type.1): these. * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set) Take a location as additional argument. Adjust all callers.
This commit is contained in:
12
src/symtab.h
12
src/symtab.h
@@ -54,12 +54,13 @@ typedef short symbol_number_t;
|
||||
typedef struct symbol_s symbol_t;
|
||||
struct symbol_s
|
||||
{
|
||||
/* The key, name of the symbol. */
|
||||
/* The key, name of the symbol. */
|
||||
char *tag;
|
||||
/* Its type. */
|
||||
|
||||
/* Its %type. */
|
||||
char *type_name;
|
||||
|
||||
/* The location of its first occurence. */
|
||||
/* The location of its first occurence. */
|
||||
location_t location;
|
||||
|
||||
symbol_number_t number;
|
||||
@@ -106,11 +107,12 @@ void symbol_make_alias PARAMS ((symbol_t *symbol, symbol_t *symval));
|
||||
|
||||
/* Set the TYPE_NAME associated to SYMBOL. Does nothing if passed 0 as
|
||||
TYPE_NAME. */
|
||||
void symbol_type_set PARAMS ((symbol_t *symbol, char *type_name));
|
||||
void symbol_type_set PARAMS ((symbol_t *symbol, location_t location,
|
||||
char *type_name));
|
||||
|
||||
/* Set the PRECEDENCE associated to SYMBOL. Ensures that SYMBOL is a
|
||||
terminal. Does nothing if invoked with UNDEF_ASSOC as ASSOC. */
|
||||
void symbol_precedence_set PARAMS ((symbol_t *symbol,
|
||||
void symbol_precedence_set PARAMS ((symbol_t *symbol, location_t location,
|
||||
int prec, associativity assoc));
|
||||
|
||||
/* Set the CLASS associated to SYMBOL. */
|
||||
|
||||
Reference in New Issue
Block a user