mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 16:23:04 +00:00
Warn about dubious constructions like "%token T T".
* src/symtab.h (struct symbol.declared): New member. * src/symtab.c (symbol_new): Initialize it to false. (symbol_class_set): New arg DECLARING, specifying whether this is a declaration that we want to warn about, if there is more than one of them. All uses changed.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* Bison Grammar Scanner -*- C -*-
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -420,7 +420,7 @@ splice (\\[ \f\t\v]*\n)*
|
||||
val->symbol = symbol_get (quotearg_style (escape_quoting_style,
|
||||
last_string),
|
||||
*loc);
|
||||
symbol_class_set (val->symbol, token_sym, *loc);
|
||||
symbol_class_set (val->symbol, token_sym, *loc, false);
|
||||
last_string_1 = last_string[1];
|
||||
symbol_user_token_number_set (val->symbol, last_string_1, *loc);
|
||||
STRING_FREE;
|
||||
|
||||
Reference in New Issue
Block a user