X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/52489d44456f33e4543cee350cc3eaea5a4426fe..217598dadc1d5aa72f430b1ac5584de8f385b596:/data/yacc.c diff --git a/data/yacc.c b/data/yacc.c index d2d06a10..5b5da3c5 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -667,7 +667,7 @@ b4_c_function([yyreport_parse_error], YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) - if (yycheck[yyx + yyn] == yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) yysize += yystrlen (yytname[yyx]) + 15, yycount++; yysize += yystrlen ("parse error, unexpected ") + 1; yysize += yystrlen (yytname[yytype]); @@ -683,7 +683,7 @@ b4_c_function([yyreport_parse_error], for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) - if (yycheck[yyx + yyn] == yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq);