* src/symtab.h (SUNDEF): New.

* src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
stand for `uninitialized', instead of 0.
* src/reader.c (packsymbols, parse_thong_decl): Adjust.
* src/lex.c (lex): Adjust.
* tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
Number it 0.
Let yylex return it instead of a plain 0.
Reported by Dick Streefland.
This commit is contained in:
Akim Demaille
2001-11-02 15:26:33 +00:00
parent ae9b5e5a4f
commit 239e5c1a9a
7 changed files with 29 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/* Symbol table manager for Bison,
Copyright 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.
@@ -58,7 +58,7 @@ bucket_new (const char *tag, int 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;