mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 01:03:04 +00:00
* data/push.c (yypvarsinit): Change return type from void* to struct
yypvars*. No longer cast to void* on return. (struct yypvars): Remove yylen since it need not be remembered between yypushparse invocations. (yypushparse): Don't copy between yylen and pv->yylen.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
2006-12-07 Bob Rossi <bob@brasko.net>
|
||||||
|
and Joel Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
|
* data/push.c (yypvarsinit): Change return type from void* to struct
|
||||||
|
yypvars*. No longer cast to void* on return.
|
||||||
|
(struct yypvars): Remove yylen since it need not be remembered between
|
||||||
|
yypushparse invocations.
|
||||||
|
(yypushparse): Don't copy between yylen and pv->yylen.
|
||||||
|
|
||||||
2006-12-05 Bob Rossi <bob@brasko.net>
|
2006-12-05 Bob Rossi <bob@brasko.net>
|
||||||
|
|
||||||
* data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
|
* data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
|
||||||
|
|||||||
@@ -970,7 +970,7 @@ yysyntax_error (char *yyresult, int yystate, int yychar)
|
|||||||
]b4_push_if([
|
]b4_push_if([
|
||||||
struct yypvars;
|
struct yypvars;
|
||||||
enum { YYPUSH_MORE = 4 };
|
enum { YYPUSH_MORE = 4 };
|
||||||
]b4_c_function_decl([yypvarsinit], [void *], [[void], []])[
|
]b4_c_function_decl([yypvarsinit], [struct yypvars *], [[void], []])[
|
||||||
]b4_c_function_decl([yypushparse], [int],
|
]b4_c_function_decl([yypushparse], [int],
|
||||||
[[struct yypvars *yypvars], [yypvars]],
|
[[struct yypvars *yypvars], [yypvars]],
|
||||||
[[int yynchar], [yynchar]],
|
[[int yynchar], [yynchar]],
|
||||||
@@ -1038,7 +1038,6 @@ m4_define([b4_declare_yyparse_variables],
|
|||||||
/* The locations where the error started and ended. */
|
/* The locations where the error started and ended. */
|
||||||
YYLTYPE yyerror_range[2];]]])[
|
YYLTYPE yyerror_range[2];]]])[
|
||||||
YYSIZE_T yystacksize;
|
YYSIZE_T yystacksize;
|
||||||
int yylen;
|
|
||||||
/* 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;
|
YYSTYPE yyval;
|
||||||
@@ -1048,7 +1047,7 @@ m4_define([b4_declare_yyparse_variables],
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Initialize the parser data structure. */
|
/* Initialize the parser data structure. */
|
||||||
void *
|
struct yypvars*
|
||||||
yypvarsinit (void)
|
yypvarsinit (void)
|
||||||
{
|
{
|
||||||
struct yypvars *pv = (struct yypvars *) malloc (sizeof *pv);
|
struct yypvars *pv = (struct yypvars *) malloc (sizeof *pv);
|
||||||
@@ -1071,7 +1070,7 @@ yypvarsinit (void)
|
|||||||
|
|
||||||
]b4_locations_if([ pv->yylsp = pv->yyls;])[
|
]b4_locations_if([ pv->yylsp = pv->yyls;])[
|
||||||
|
|
||||||
return (void *) pv;
|
return pv;
|
||||||
}])
|
}])
|
||||||
m4_divert_pop([KILL])dnl# ====================== End of M4 code.
|
m4_divert_pop([KILL])dnl# ====================== End of M4 code.
|
||||||
|
|
||||||
@@ -1208,7 +1207,6 @@ m4_ifdef([b4_at_dollar_used], [[ yylsp[0] = yylloc;
|
|||||||
yylsp = pv->yylsp;]])[
|
yylsp = pv->yylsp;]])[
|
||||||
|
|
||||||
yystacksize = pv->yystacksize;
|
yystacksize = pv->yystacksize;
|
||||||
yylen = pv->yylen;
|
|
||||||
yyval = pv->yyval;
|
yyval = pv->yyval;
|
||||||
]b4_locations_if([yyloc = pv->yyloc;])[
|
]b4_locations_if([yyloc = pv->yyloc;])[
|
||||||
if (pv->yynew == 0)
|
if (pv->yynew == 0)
|
||||||
@@ -1339,7 +1337,6 @@ yybackup:
|
|||||||
pv->yylsp = yylsp;]])[
|
pv->yylsp = yylsp;]])[
|
||||||
|
|
||||||
pv->yystacksize = yystacksize;
|
pv->yystacksize = yystacksize;
|
||||||
pv->yylen = yylen;
|
|
||||||
pv->yyval = yyval;
|
pv->yyval = yyval;
|
||||||
]b4_locations_if([pv->yyloc = yyloc;])[
|
]b4_locations_if([pv->yyloc = yyloc;])[
|
||||||
goto yypushreturn;
|
goto yypushreturn;
|
||||||
|
|||||||
Reference in New Issue
Block a user