mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 00:33:03 +00:00
Also warn about non-used mid-rule values.
* src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule member. (symbol_list_new): Adjust. * src/reader.c (symbol_typed_p): New. (grammar_rule_check): Use it. (grammar_midrule_action): Bind a mid-rule LHS to its rule. Check its rule. * tests/input.at (AT_CHECK_UNUSED_VALUES): New. Use it. * tests/actions.at (Exotic Dollars): Adjust.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* Lists of symbols for Bison
|
||||
|
||||
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -38,6 +38,8 @@ symbol_list_new (symbol *sym, location loc)
|
||||
res->sym = sym;
|
||||
res->location = loc;
|
||||
|
||||
res->mid_rule = NULL;
|
||||
|
||||
res->action = NULL;
|
||||
res->used = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user