yacc.c: scope reduction

* data/yacc.c (yysyntax_error): here.
This commit is contained in:
Akim Demaille
2012-12-12 12:38:43 +01:00
parent bb990d3809
commit 4b6d641913

View File

@@ -1247,7 +1247,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
{ {
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
YYSIZE_T yysize = yysize0; YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */ /* Internationalized format string. */
const char *yyformat = YY_NULL; const char *yyformat = YY_NULL;
@@ -1328,11 +1327,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
break; break;
} }
yyarg[yycount++] = yytname[yyx]; yyarg[yycount++] = yytname[yyx];
yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); {
if (! (yysize <= yysize1 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM)) if (! (yysize <= yysize1
return 2; && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
yysize = yysize1; return 2;
yysize = yysize1;
}
} }
}]b4_lac_if([[ }]b4_lac_if([[
# if ]b4_api_PREFIX[DEBUG # if ]b4_api_PREFIX[DEBUG
@@ -1356,10 +1357,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
# undef YYCASE_ # undef YYCASE_
} }
yysize1 = yysize + yystrlen (yyformat); {
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
return 2; if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
yysize = yysize1; return 2;
yysize = yysize1;
}
if (*yymsg_alloc < yysize) if (*yymsg_alloc < yysize)
{ {