]> git.saurik.com Git - bison.git/commit
grammar: record used associativity and print useless ones
authorValentin Tolmer <nitnelave1@gmail.com>
Tue, 29 Jan 2013 15:27:04 +0000 (16:27 +0100)
committerAkim Demaille <akim@lrde.epita.fr>
Wed, 30 Jan 2013 09:18:39 +0000 (10:18 +0100)
commite8f7155d98c22579c871c293a0daa5f7752e7c2b
tree62ab3c50c996c46ee810d0739233dd5b640aceb8
parent284bc49c832ffe6280907cb6c7788fa06bc58c7c
grammar: record used associativity and print useless ones

Record which symbol associativity is used, and display useless ones.

* src/symtab.h, src/symtab.c (register_assoc, print_assoc_warnings): New
* src/symtab.c (init_assoc, is_assoc_used): New
* src/main.c: Use print_assoc_warnings
* src/conflicts.c: Use register_assoc
* tests/conflicts.at (Useless associativity warning): New.

Due to the new warning, many tests had to be updated.

* tests/conflicts.at tests/existing.at tests/regression.at:
Add the associativity warning in the expected results.
* tests/java.at: Fix the java calculator's grammar to remove a useless
associativity.
* doc/bison.texi (mfcalc example): Fix associativity to remove
warning.
doc/bison.texi
src/conflicts.c
src/main.c
src/symtab.c
src/symtab.h
tests/conflicts.at
tests/existing.at
tests/java.at
tests/regression.at