/* Symbol table manager for Bison,
- Copyright (C) 1984, 1989, 2000 Free Software Foundation, Inc.
+ Copyright 1984, 1989, 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
#include "system.h"
-#include "xalloc.h"
#include "symtab.h"
#include "gram.h"
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];
res->value = 0;
res->prec = 0;
res->assoc = right_assoc;
- res->user_token_number = 0;
+ res->user_token_number = SUNDEF;
res->alias = NULL;
res->class = unknown_sym;
+ res->line = lineno;
nsyms++;
if (bp->type_name)
XFREE (bp->type_name);
#endif
+ XFREE (bp->tag);
XFREE (bp);
bp = bptmp;
}