Fix %error-verbose for conflicts resolved by %nonassoc.

* NEWS (2.5): Document.
* data/glr.c (yyreportSyntaxError): Fix this by checking
yyis_table_ninf.
* data/yacc.c (yysyntax_error): Likewise.
* data/lalr1.cc (yysyntax_error_): Fix this by checking
yytable_ninf_.
* data/lalr1.java (yysyntax_error): Likewise.
* tests/conflicts.at (%nonassoc and eof): Update expected output
and remove FIXME.
This commit is contained in:
Joel E. Denny
2009-08-25 01:13:02 -04:00
parent 8741288212
commit 53f036ce02
9 changed files with 369 additions and 337 deletions

9
NEWS
View File

@@ -146,6 +146,15 @@ Bison News
Bison now warns when a character literal is not of length one. In
some future release, Bison will report an error instead.
** Verbose error messages fixed for nonassociative tokens.
When %error-verbose is specified, syntax error messages produced by
the generated parser include the unexpected token as well as a list of
expected tokens. Previously, this list erroneously included tokens
that would actually induce a syntax error because conflicts for them
were resolved with %nonassoc. Such tokens are now properly omitted
from the list.
* Changes in version 2.4.2 (????-??-??):
** Detection of GNU M4 1.4.6 or newer during configure is improved.