mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 06:13:02 +00:00
Attaching lineno to buckets is stupid, since only one copy of each
symbol is kept, only the line of the first occurrence is kept too. * src/symtab.h, src/symtab.c (bucket): Remove the line member. * src/reader.c (rline_allocated): Remove, unused. (symbol_list): Have a `line' member. (symbol_list_new): New. (readgram): Use it. * src/print.c (print_grammar): Output the rule line numbers. * tests/regression.at (Solved SR Conflicts) (Unresolved SR Conflicts): Adjust. Reported by Hans Aberg.
This commit is contained in:
@@ -49,9 +49,6 @@ hash (const char *key)
|
||||
static bucket *
|
||||
bucket_new (const char *tag, int hashval)
|
||||
{
|
||||
/* Hack, until we have a Bison parser. */
|
||||
extern int lineno;
|
||||
|
||||
bucket *res = XMALLOC (bucket, 1);
|
||||
|
||||
res->link = symtab[hashval];
|
||||
@@ -64,7 +61,6 @@ bucket_new (const char *tag, int hashval)
|
||||
res->user_token_number = SUNDEF;
|
||||
res->alias = NULL;
|
||||
res->class = unknown_sym;
|
||||
res->line = lineno;
|
||||
|
||||
nsyms++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user