mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 12:53:03 +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:
10
src/reader.c
10
src/reader.c
@@ -41,7 +41,7 @@ static int start_flag = 0;
|
||||
/* Nonzero if %union has been seen. */
|
||||
int typed = 0;
|
||||
|
||||
static symbol_list *
|
||||
symbol_list *
|
||||
symbol_list_new (symbol_t *sym, location_t location)
|
||||
{
|
||||
symbol_list *res = XMALLOC (symbol_list, 1);
|
||||
@@ -53,6 +53,14 @@ symbol_list_new (symbol_t *sym, location_t location)
|
||||
return res;
|
||||
}
|
||||
|
||||
symbol_list *
|
||||
symbol_list_prepend (symbol_list *list, symbol_t *symbol, location_t location)
|
||||
{
|
||||
symbol_list *res = symbol_list_new (symbol, location);
|
||||
res->next = list;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------.
|
||||
| Get the data type (alternative in the union) of the value for |
|
||||
|
||||
Reference in New Issue
Block a user