mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
* 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:
@@ -64,7 +64,8 @@ static void yyungetc (int c);
|
||||
extern void perror (const char *s);
|
||||
%}
|
||||
|
||||
/* BISON Declarations */
|
||||
/* Bison Declarations */
|
||||
%token CALC_EOF 0
|
||||
%token NUM
|
||||
|
||||
%nonassoc '=' /* comparison */
|
||||
@@ -204,7 +205,7 @@ yylex (void)
|
||||
|
||||
/* Return end-of-file. */
|
||||
if (c == EOF)
|
||||
return 0;
|
||||
return CALC_EOF;
|
||||
|
||||
/* Return single chars. */
|
||||
return c;
|
||||
|
||||
Reference in New Issue
Block a user