summaryrefslogtreecommitdiff
path: root/data/glr.c
diff options
context:
space:
mode:
authorJoel E. Denny <jdenny@clemson.edu>2009-08-25 01:13:02 -0400
committerJoel E. Denny <jdenny@clemson.edu>2009-08-25 02:58:16 -0400
commit1fa303077dee822a501002089f81c60fd3f5988d (patch)
tree420956ce1ef80b50729a44d120258b3e9cef996b /data/glr.c
parent77373efad24be4ed77391c9e8ab2f85285810311 (diff)
downloadbison-1fa303077dee822a501002089f81c60fd3f5988d.tar.gz
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. (cherry picked from commit 53f036ce027289d3f5e70c88735b88aa6725381d) Conflicts: data/lalr1.cc data/lalr1.java src/parse-gram.c src/parse-gram.h
Diffstat (limited to 'data/glr.c')
-rw-r--r--data/glr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/data/glr.c b/data/glr.c
index d61390ec..41cb607b 100644
--- a/data/glr.c
+++ b/data/glr.c
@@ -2128,7 +2128,8 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
yyfmt = yystpcpy (yyformat, yyunexpected);
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yyis_table_ninf (yytable[yyx + yyn]))
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{