diff options
author | Akim Demaille <akim@lrde.epita.fr> | 2012-12-12 12:38:43 +0100 |
---|---|---|
committer | Akim Demaille <akim@lrde.epita.fr> | 2012-12-12 12:41:37 +0100 |
commit | 4b6d641913866dd5e77d24bb9a3c1b79140981b4 (patch) | |
tree | ca088a0bfbb1717f1458b1285398eac0bbeabbbe | |
parent | bb990d38090ac6ccb74c4b6a82fb9d9d7aa157db (diff) | |
download | bison-4b6d641913866dd5e77d24bb9a3c1b79140981b4.tar.gz |
yacc.c: scope reduction
* data/yacc.c (yysyntax_error): here.
-rw-r--r-- | data/yacc.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/data/yacc.c b/data/yacc.c index 810e2b21..b34549f1 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -1247,7 +1247,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, { YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULL; @@ -1328,11 +1327,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, break; } yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } } }]b4_lac_if([[ # if ]b4_api_PREFIX[DEBUG @@ -1356,10 +1357,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, # undef YYCASE_ } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } if (*yymsg_alloc < yysize) { |