* 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:
Akim Demaille
2002-06-17 07:04:24 +00:00
parent 74886d31e7
commit 1e0bab9276
8 changed files with 284 additions and 271 deletions

View File

@@ -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 |