mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
yacc.c: yyerror_range does not need to be preserved accross calls
* data/skeletons/yacc.c (b4_parse_state_variable_macros): Don't define yyerror_range. (yyparse): Add yyerror_range as local variable.
This commit is contained in:
3
TODO
3
TODO
@@ -95,9 +95,6 @@ See also the item "$undefined" below.
|
|||||||
Consider deprecating impure push parsers. They add a lot of complexity, for
|
Consider deprecating impure push parsers. They add a lot of complexity, for
|
||||||
a bad feature.
|
a bad feature.
|
||||||
|
|
||||||
It's not clear to me that yyerror_range really needs to be in pstate,
|
|
||||||
instead of just being a local variable.
|
|
||||||
|
|
||||||
* Bison 3.7
|
* Bison 3.7
|
||||||
** Unit rules / Injection rules (Akim Demaille)
|
** Unit rules / Injection rules (Akim Demaille)
|
||||||
Maybe we could expand unit rules (or "injections", see
|
Maybe we could expand unit rules (or "injections", see
|
||||||
|
|||||||
@@ -211,10 +211,7 @@ m4_define([b4_declare_parser_state_variables],
|
|||||||
/* The location stack. */
|
/* The location stack. */
|
||||||
YYLTYPE yylsa[YYINITDEPTH];
|
YYLTYPE yylsa[YYINITDEPTH];
|
||||||
YYLTYPE *yyls;
|
YYLTYPE *yyls;
|
||||||
YYLTYPE *yylsp;
|
YYLTYPE *yylsp;]])[]b4_lac_if([[
|
||||||
|
|
||||||
/* The locations where the error started and ended. */
|
|
||||||
YYLTYPE yyerror_range[3];]])[]b4_lac_if([[
|
|
||||||
|
|
||||||
yy_state_t yyesa@{]b4_percent_define_get([[parse.lac.es-capacity-initial]])[@};
|
yy_state_t yyesa@{]b4_percent_define_get([[parse.lac.es-capacity-initial]])[@};
|
||||||
yy_state_t *yyes;
|
yy_state_t *yyes;
|
||||||
@@ -264,8 +261,7 @@ $1([yyvs])
|
|||||||
$1([yyvsp])[]b4_locations_if([
|
$1([yyvsp])[]b4_locations_if([
|
||||||
$1([yylsa])
|
$1([yylsa])
|
||||||
$1([yyls])
|
$1([yyls])
|
||||||
$1([yylsp])
|
$1([yylsp])])
|
||||||
$1([yyerror_range])])
|
|
||||||
$1([yystacksize])[]b4_lac_if([
|
$1([yystacksize])[]b4_lac_if([
|
||||||
$1([yyesa])
|
$1([yyesa])
|
||||||
$1([yyes])
|
$1([yyes])
|
||||||
@@ -1559,7 +1555,10 @@ yyparse (]m4_ifset([b4_parse_param], [b4_formals(b4_parse_param)], [void])[)]])[
|
|||||||
/* The variables used to return semantic value and location from the
|
/* The variables used to return semantic value and location from the
|
||||||
action routines. */
|
action routines. */
|
||||||
YYSTYPE yyval;]b4_locations_if([[
|
YYSTYPE yyval;]b4_locations_if([[
|
||||||
YYLTYPE yyloc;]])[
|
YYLTYPE yyloc;
|
||||||
|
|
||||||
|
/* The locations where the error started and ended. */
|
||||||
|
YYLTYPE yyerror_range[3];]])[
|
||||||
|
|
||||||
]b4_parse_error_bmatch([detailed\|verbose],
|
]b4_parse_error_bmatch([detailed\|verbose],
|
||||||
[[ /* Buffer for error messages, and its allocated size. */
|
[[ /* Buffer for error messages, and its allocated size. */
|
||||||
|
|||||||
Reference in New Issue
Block a user