]> git.saurik.com Git - bison.git/commit - src/reader.h
Warn about unused values.
authorAkim Demaille <akim@epita.fr>
Thu, 22 Dec 2005 11:40:05 +0000 (11:40 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 22 Dec 2005 11:40:05 +0000 (11:40 +0000)
commitaffac6132ae6ee354e1497e456b5c81a0c84334f
treee48251aa856d27cefea7e3356d988ccd4799310d
parent8bb4c753e2d626ee90460e6d9f9cbaa2cd1f560d
Warn about unused values.
* src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
a `used' member.
(symbol_list_n_get, symbol_list_n_used_set): New.
(symbol_list_n_type_name_get): Use symbol_list_n_get.
* src/scan-gram.l (handle_action_dollar): Flag used symbols.
* src/reader.c (grammar_current_rule_check): Check that values are
used.
* src/symtab.c (symbol_print): Accept 0.
* tests/existing.at: Remove the type information.
Empty the actions.
Remove useless actions (beware of mid-rule actions: perl -000
-pi -e 's/s*{}(?=[ns]*[|;])//g').
* tests/actions.at (Exotic Dollars): Use unused values.
* tests/calc.at: Likewise.
* tests/glr-regression.at (No users destructors if stack 0 deleted):
Likewise.
* src/gram.c (rule_useful_p, rule_never_reduced_p): Use
rule_useful_p.
13 files changed:
ChangeLog
NEWS
src/gram.c
src/reader.c
src/reader.h
src/scan-gram.l
src/symlist.c
src/symlist.h
src/symtab.c
tests/actions.at
tests/calc.at
tests/existing.at
tests/glr-regression.at