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

View File

@@ -99,20 +99,17 @@ AT_BISON_CHECK([-o input.c input.y])
AT_COMPILE([input])
AT_PARSER_CHECK([./input '0<0'])
# FIXME: This is an actual bug, but a new one, in the sense that
# no one has ever spotted it! The messages are *wrong*: there should
# be nothing there, it should be expected eof.
AT_PARSER_CHECK([./input '0<0<0'], [1], [],
[syntax error, unexpected '<', expecting '<' or '>'
[syntax error, unexpected '<'
])
AT_PARSER_CHECK([./input '0>0'])
AT_PARSER_CHECK([./input '0>0>0'], [1], [],
[syntax error, unexpected '>', expecting '<' or '>'
[syntax error, unexpected '>'
])
AT_PARSER_CHECK([./input '0<0>0'], [1], [],
[syntax error, unexpected '>', expecting '<' or '>'
[syntax error, unexpected '>'
])
AT_CLEANUP