mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 16:53:02 +00:00
* data/push.c (yypstate): Add typedef, and update all uses of
struct yypstate to just yypstate. * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2006-12-15 Bob Rossi <bob@brasko.net>
|
||||||
|
and Joel Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
|
* data/push.c (yypstate): Add typedef, and update all uses of
|
||||||
|
struct yypstate to just yypstate.
|
||||||
|
* tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
|
||||||
|
|
||||||
2006-12-14 Bob Rossi <bob@brasko.net>
|
2006-12-14 Bob Rossi <bob@brasko.net>
|
||||||
|
|
||||||
* data/push.c (yypush_parse): Declare prototype regardless of
|
* data/push.c (yypush_parse): Declare prototype regardless of
|
||||||
|
|||||||
22
data/push.c
22
data/push.c
@@ -963,11 +963,12 @@ yysyntax_error (char *yyresult, int yystate, int yychar)
|
|||||||
|
|
||||||
]b4_push_if([
|
]b4_push_if([
|
||||||
struct yypstate;
|
struct yypstate;
|
||||||
|
typedef struct yypstate yypstate;
|
||||||
enum { YYPUSH_MORE = 4 };
|
enum { YYPUSH_MORE = 4 };
|
||||||
]b4_c_function_decl([yypstate_new], [struct yypstate *], [[void], []])[
|
]b4_c_function_decl([yypstate_new], [yypstate *], [[void], []])[
|
||||||
]b4_c_function_decl([yypstate_delete], [void], [[struct yypstate *yyps], [yyps]])[
|
]b4_c_function_decl([yypstate_delete], [void], [[yypstate *yyps], [yyps]])[
|
||||||
]b4_c_function_decl([yypush_parse], [int],
|
]b4_c_function_decl([yypush_parse], [int],
|
||||||
[[struct yypstate *yyps], [yyps]],
|
[[yypstate *yyps], [yyps]],
|
||||||
[[int yynchar], [yynchar]],
|
[[int yynchar], [yynchar]],
|
||||||
[[YYSTYPE const *yynlval], [yynlval]]
|
[[YYSTYPE const *yynlval], [yynlval]]
|
||||||
b4_locations_if([,[[YYLTYPE const *yynlloc], [yynlloc]]]))[
|
b4_locations_if([,[[YYLTYPE const *yynlloc], [yynlloc]]]))[
|
||||||
@@ -1047,9 +1048,9 @@ m4_define([b4_declare_yyparse_variables],
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Initialize the parser data structure. */
|
/* Initialize the parser data structure. */
|
||||||
]b4_c_function_def([yypstate_new], [struct yypstate *])[
|
]b4_c_function_def([yypstate_new], [yypstate *])[
|
||||||
{
|
{
|
||||||
struct yypstate *yyps = (struct yypstate *) malloc (sizeof *yyps);
|
yypstate *yyps = (yypstate *) malloc (sizeof *yyps);
|
||||||
yyps->yystate = 0;
|
yyps->yystate = 0;
|
||||||
yyps->yyresult = -1;
|
yyps->yyresult = -1;
|
||||||
yyps->yyerrstatus = 0;
|
yyps->yyerrstatus = 0;
|
||||||
@@ -1073,7 +1074,7 @@ m4_define([b4_declare_yyparse_variables],
|
|||||||
}
|
}
|
||||||
|
|
||||||
]b4_c_function_def([yypstate_delete], [void],
|
]b4_c_function_def([yypstate_delete], [void],
|
||||||
[[struct yypstate *yyps], [yyps]])[
|
[[yypstate *yyps], [yyps]])[
|
||||||
{
|
{
|
||||||
free (yyps);
|
free (yyps);
|
||||||
}
|
}
|
||||||
@@ -1090,7 +1091,7 @@ b4_push_if([b4_declare_yyparse_variables])
|
|||||||
`-------------------------*/
|
`-------------------------*/
|
||||||
|
|
||||||
b4_push_if([
|
b4_push_if([
|
||||||
b4_c_function_def([yypush_parse], [int], [[struct yypstate *yyps], [yyps]],
|
b4_c_function_def([yypush_parse], [int], [[yypstate *yyps], [yyps]],
|
||||||
[[int yynchar], [yynchar]],
|
[[int yynchar], [yynchar]],
|
||||||
[[YYSTYPE const *yynlval], [yynlval]]
|
[[YYSTYPE const *yynlval], [yynlval]]
|
||||||
b4_locations_if([,[[YYLTYPE const *yynlloc], [yynlloc]]]))],[
|
b4_locations_if([,[[YYLTYPE const *yynlloc], [yynlloc]]]))],[
|
||||||
@@ -1690,12 +1691,13 @@ typedef struct YYLTYPE
|
|||||||
)dnl b4_locations_if
|
)dnl b4_locations_if
|
||||||
|
|
||||||
]b4_push_if([struct ]b4_prefix[pstate;
|
]b4_push_if([struct ]b4_prefix[pstate;
|
||||||
]b4_c_function_decl([]b4_prefix[pstate_new], [struct ]b4_prefix[pstate *],
|
typedef struct ]b4_prefix[pstate ]b4_prefix[pstate;
|
||||||
|
]b4_c_function_decl([]b4_prefix[pstate_new], []b4_prefix[pstate *],
|
||||||
[[void], []])[
|
[[void], []])[
|
||||||
]b4_c_function_decl([]b4_prefix[pstate_delete], [void],
|
]b4_c_function_decl([]b4_prefix[pstate_delete], [void],
|
||||||
[[struct ]b4_prefix[pstate *yyps],[yyps]])[
|
[[]b4_prefix[pstate *yyps],[yyps]])[
|
||||||
]b4_c_function_decl([]b4_prefix[push_parse], [int],
|
]b4_c_function_decl([]b4_prefix[push_parse], [int],
|
||||||
[[struct ]b4_prefix[pstate *]b4_prefix[pstate], []b4_prefix[pstate]],
|
[[]b4_prefix[pstate *]b4_prefix[pstate], []b4_prefix[pstate]],
|
||||||
[[int yynchar], [yynchar]],
|
[[int yynchar], [yynchar]],
|
||||||
[[YYSTYPE const *yynlval], [yynlval]]
|
[[YYSTYPE const *yynlval], [yynlval]]
|
||||||
b4_locations_if([,[[YYLTYPE const *yynlloc], [yynlloc]]]))[
|
b4_locations_if([,[[YYLTYPE const *yynlloc], [yynlloc]]]))[
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ main (int argc, const char **argv)
|
|||||||
[ yydebug = 1;])])[
|
[ yydebug = 1;])])[
|
||||||
]AT_PUSH_IF([
|
]AT_PUSH_IF([
|
||||||
{
|
{
|
||||||
struct yypstate *pstate = yypstate_new ();
|
yypstate *pstate = yypstate_new ();
|
||||||
YYSTYPE my_lval;
|
YYSTYPE my_lval;
|
||||||
]AT_LOCATION_IF([YYLTYPE my_lloc;])[
|
]AT_LOCATION_IF([YYLTYPE my_lloc;])[
|
||||||
do {
|
do {
|
||||||
|
|||||||
Reference in New Issue
Block a user