]> git.saurik.com Git - bison.git/commitdiff
* data/push.c (yypstate): Add typedef, and update all uses of
authorJoel E. Denny <jdenny@ces.clemson.edu>
Fri, 15 Dec 2006 05:31:26 +0000 (05:31 +0000)
committerJoel E. Denny <jdenny@ces.clemson.edu>
Fri, 15 Dec 2006 05:31:26 +0000 (05:31 +0000)
struct yypstate to just yypstate.
* tests/calc.at (_AT_DATA_CALC_Y): Update here as well.

ChangeLog
data/push.c
tests/calc.at

index cc3a5b00d00503460797488a49b8c154a0420908..dd66b0cc3f7395a47d8bd9bf6ed14816c0abfae3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * data/push.c (yypush_parse): Declare prototype regardless of
index 07069a4f75f82e2c666256afc756112eaffe0e1b..b7eededf9ceb25070e1b7a19fb18418419240d04 100644 (file)
@@ -963,11 +963,12 @@ yysyntax_error (char *yyresult, int yystate, int yychar)
 
 ]b4_push_if([
 struct yypstate;
+typedef struct yypstate yypstate;
 enum { YYPUSH_MORE = 4 };
-]b4_c_function_decl([yypstate_new], [struct yypstate *], [[void], []])[
-]b4_c_function_decl([yypstate_delete], [void], [[struct yypstate *yyps], [yyps]])[
+]b4_c_function_decl([yypstate_new], [yypstate *], [[void], []])[
+]b4_c_function_decl([yypstate_delete], [void], [[yypstate *yyps], [yyps]])[
 ]b4_c_function_decl([yypush_parse], [int],
-   [[struct yypstate *yyps], [yyps]],
+   [[yypstate *yyps], [yyps]],
    [[int yynchar], [yynchar]],
    [[YYSTYPE const *yynlval], [yynlval]]
    b4_locations_if([,[[YYLTYPE const *yynlloc], [yynlloc]]]))[
@@ -1047,9 +1048,9 @@ m4_define([b4_declare_yyparse_variables],
   };
 
 /* 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->yyresult = -1;
   yyps->yyerrstatus = 0;
@@ -1073,7 +1074,7 @@ m4_define([b4_declare_yyparse_variables],
 }
 
 ]b4_c_function_def([yypstate_delete], [void],
-                   [[struct yypstate *yyps], [yyps]])[
+                   [[yypstate *yyps], [yyps]])[
 {
   free (yyps);
 }
@@ -1090,7 +1091,7 @@ b4_push_if([b4_declare_yyparse_variables])
 `-------------------------*/
 
 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]],
                   [[YYSTYPE const *yynlval], [yynlval]]
                  b4_locations_if([,[[YYLTYPE const *yynlloc], [yynlloc]]]))],[
@@ -1690,12 +1691,13 @@ typedef struct YYLTYPE
 )dnl b4_locations_if
 
 ]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], []])[
 ]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],
-   [[struct ]b4_prefix[pstate *]b4_prefix[pstate], []b4_prefix[pstate]],
+   [[]b4_prefix[pstate *]b4_prefix[pstate], []b4_prefix[pstate]],
    [[int yynchar], [yynchar]],
    [[YYSTYPE const *yynlval], [yynlval]]
    b4_locations_if([,[[YYLTYPE const *yynlloc], [yynlloc]]]))[
index d245dd18d3172c3b21bb89b94728b9a6a08a396b..4e67f035ea7b8c1d3cba91fd2da232ab57c3cf7e 100644 (file)
@@ -338,7 +338,7 @@ main (int argc, const char **argv)
 [  yydebug = 1;])])[
 ]AT_PUSH_IF([
   {
-    struct yypstate *pstate = yypstate_new ();
+    yypstate *pstate = yypstate_new ();
     YYSTYPE my_lval;
     ]AT_LOCATION_IF([YYLTYPE my_lloc;])[
     do {