tests: style changes

* tests/glr-regression.at: Issue yyerror before yylex.
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.
build: please Clang++ 3.2+ on Flex scanners

Clang++, with -Wall, rejects code generated by Flex (for C scanners):

  CXX      examples/calc++/examples_calc___calc__-calc++-scanner.o
  In file included from examples/calc++/calc++-scanner.cc:1:
  error: implicit conversion of NULL constant to 'bool' [-Werror,-Wnull-conversion]
  if ( ! ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null) ) {
       ~                                                                  ^~~~~~
                                                                          false
* configure.ac (WARN_NO_NULL_CONVERSION_CXXFLAGS): Compute it.
* examples/calc++/local.mk (examples_calc___calc___CXXFLAGS): Use it.
build: avoid clang's colored diagnostics in the test suite

The syncline tests, which try to recognize compiler diagnostics,
are confused by escapes for colors.

* configure.ac (warn_tests): New, to factor the warnings for both
C and C++ tests.
Add -fno-color-diagnostics to it.
* tests/local.at (AT_TEST_TABLES_AND_PARSE): Do not remove glue
together compiler flags.
warnings: introduce -Wprecedence

The new warning category "precedence" flags useless precedence and
associativity.  -Wprecedence can now be used, it is disabled by default.
The warnings about precedence and associativity are grouped into one, and
the testsuite was corrected accordingly.

* src/complain.h (warnings): Introduce "precedence".
* src/complain.c (warnings_print_categories): Adjust.
* src/getargs.c (warnings_args, warning_types): Likewise.
* src/symtab.h, src/symtab.c (print_associativity_warnings): Remove.
* src/symtab.h (register_assoc): Correct arguments.
* src/symtab.c (print_precedence_warnings): Print both warnings together.
* doc/bison.texi (Bison options): Document the warnings and provide an
example.
* tests/conflicts.at, tests/existing.at, tests/local.at,
* tests/regression.at: Adapt the testsuite for the new category
(-Wprecedence instead of -Wother where appropriate).
news: name contributors

* NEWS: here.
tests: put two related tests together

* tests/conflicts.at (Useless associativity warning): Move next
to "Useless precedence warning".
symlist: use the right stream

* src/symlist.c (symbol_list_syms_print): Use "f", not stderr.
location: pass the location first

* src/location.h, src/location.c (location_print): For consistency
with other data structures and other location_* routines, pass the
location argument first.
* src/complain.c: Adjust.
(location_caret): Likewise.
* src/parse-gram.y: Adjust.
regen
todo: update

Reformulate and give more details on my thoughts concerning the graphical
visualization, and add an entry about a bug in the options processing for
warnings as errors.

* TODO: Here.
variants: avoid type punning issue

This is based on what is recommended by both Scott Meyers, in 'Effective
C++', and Andrei Alexandrescu and Herb Sutter in 'C++ Coding Standards'.

Use a static_cast on void* rather than directly use a reinterpret_cast,
which can have nefarious effects on objects.  However, even though following
this guideline is good practice in general, I am not quite sure how relevant
it is when applied to conversions from POD to objects.  Actually, it might
very well be the opposite: isn't this exactly what reinterpret_cast is for?
What we really want *is* to transmit the memory map as a series of bytes,
which, if I am correct, falls into the kind of "low level" hack for which
this cast is meant.

In any case, this silences the warning, which will be greatly appreciated by
anyone using variants with a compiler supporting -fstrict-aliasing.

* data/variant.hh (as): Here.
* tests/c++.at (Exception safety, C++ Variant-based Symbols, Variants):
Don't use NO_STRICT_ALIAS_CXXFLAGS (revert commit ddb9db15), as type punning
is no longer an issue.
* tests/atlocal.in, configure.ac (NO_STRICT_ALIAS_CXXFLAGS): Remove
definition.
* examples/local.mk (NO_STRICT_ALIAS_CXXFLAGS): Remove from AM_CXXFLAGS.
* doc/bison.texi: Don't mention type punning issues.
tests: use AT_FULL_COMPILE where possible

* tests/c++.at (C++ Variant-based Symbol, Variants): Here.  Rename the
generated input files to use .y instead of .yy, as a requirement for using
AT_FULL_COMPILE instead of a combination of AT_BISON_CHECK and
AT_BISON_COMPILE_CXX.
grammar: free the association tracking graph

The graph introduced by Valentin wasn't free'd after use.

* src/symtab.c (assoc_free): New, clear the array of linked lists with...
(linkedlist_free): This, new.
(print_precedence_warnings): Call assoc_free when done.
(print_assoc_warnings): Free used_assoc after use.
variants: stylistic change

* data/variant.hh (tname): Respect the GNU Coding Standards for this
pointer's declaration.
style: use a for loop instead of a while loop, and scope reduction

* src/reader.c (packgram): Improve readability.
The parser calls grammar_current_rule_end at the end of every rhs,
which adds a NULL to separate the rules.  So there is no need to
check whether "p" is non-null before proceeding.
parser: use api.pure full

* src/parse-gram.y: Use api.pure full instead of silly macro tricks.
style: space changes in the parser

* src/parse-gram.y: Fix spaces.
regen
tests: improve the language independance layer

* tests/local.at (_AT_LANG_DISPATCH): New, shamelessly stolen from
Autoconf's _AT_LANG_DISPATCH.
(AT_LANG_DISPATCH): New.
(AT_YYERROR_FORMALS, AT_YYERROR_PROTOTYPE, AT_YYERROR_DECLARE_EXTERN)
(AT_YYERROR_DECLARE, AT_YYERROR_DEFINE, AT_MAIN_DEFINE, AT_COMPILE)
(AT_FULL_COMPILE):
Use AT_LANG_DISPATCH instead of an ad hoc m4_case.