mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 05:13:04 +00:00
* src/symtab.c (symbol_check_alias_consistency): Also check
type names, destructors, and printers. Reported by Alexandre Duret-Lutz. Recode the handling of associativity and precedence in terms of symbol_precedence_set. Accept no redeclaration at all, not even equal to the previous value. (redeclaration): New. Use it to factor redeclaration complaints. (symbol_make_alias): Don't set the type of the alias, let symbol_check_alias_consistency do it as for other features. * src/symtab.h (symbol): Add new member prec_location, and type_location. * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them. * tests/input.at (Incompatible Aliases): New.
This commit is contained in:
@@ -46,6 +46,9 @@ typedef short int symbol_number;
|
||||
|
||||
|
||||
typedef struct symbol symbol;
|
||||
|
||||
/* When extending this structure, be sure to complete
|
||||
symbol_check_alias_consistency. */
|
||||
struct symbol
|
||||
{
|
||||
/* The key, name of the symbol. */
|
||||
@@ -55,12 +58,16 @@ struct symbol
|
||||
|
||||
/* Its %type and associated printer and destructor. */
|
||||
uniqstr type_name;
|
||||
location type_location;
|
||||
|
||||
char *destructor;
|
||||
location destructor_location;
|
||||
|
||||
char *printer;
|
||||
location printer_location;
|
||||
|
||||
symbol_number number;
|
||||
location prec_location;
|
||||
short int prec;
|
||||
assoc assoc;
|
||||
int user_token_number;
|
||||
|
||||
Reference in New Issue
Block a user