]> git.saurik.com Git - bison.git/commitdiff
skeletons: simplify after knr removal
authorAkim Demaille <akim@lrde.epita.fr>
Thu, 2 Aug 2012 12:11:07 +0000 (14:11 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Thu, 2 Aug 2012 13:32:52 +0000 (15:32 +0200)
* data/c.m4 (b4_yydestruct_generate, b4_yy_symbol_print_generate):
They no longer need an argument, it has a single possible value.
* data/glr.c, data/yacc.c: Adjust.

data/c.m4
data/glr.c
data/yacc.c

index 745260dc8f632a3b2806cc76399599104e66c0d5..6133823d28ae07134cb92a426ec890d95abb4567 100644 (file)
--- a/data/c.m4
+++ b/data/c.m4
@@ -407,17 +407,16 @@ b4_syncline([@oline@], [@ofile@])
     break;])
 
 
-# b4_yydestruct_generate(FUNCTION-DECLARATOR)
-# -------------------------------------------
-# Generate the "yydestruct" function, which declaration is issued using
-# FUNCTION-DECLARATOR, which may be "b4_function_define".
+# b4_yydestruct_generate
+# ----------------------
+# Define the "yydestruct" function.
 m4_define_default([b4_yydestruct_generate],
 [[/*-----------------------------------------------.
 | Release the memory associated to this symbol.  |
 `-----------------------------------------------*/
 
 /*ARGSUSED*/
-]$1([yydestruct],
+]b4_function_define([yydestruct],
     [static void],
     [[const char *yymsg],    [yymsg]],
     [[int yytype],           [yytype]],
@@ -440,10 +439,9 @@ m4_ifset([b4_parse_param], [, b4_parse_param]))[
 ])
 
 
-# b4_yy_symbol_print_generate(FUNCTION-DECLARATOR)
-# ------------------------------------------------
-# Generate the "yy_symbol_print" function, which declaration is issued using
-# FUNCTION-DECLARATOR, which may be "b4_function_define".
+# b4_yy_symbol_print_generate
+# ---------------------------
+# Define the "yy_symbol_print" function.
 m4_define_default([b4_yy_symbol_print_generate],
 [[
 /*--------------------------------.
@@ -451,7 +449,7 @@ m4_define_default([b4_yy_symbol_print_generate],
 `--------------------------------*/
 
 /*ARGSUSED*/
-]$1([yy_symbol_value_print],
+]b4_function_define([yy_symbol_value_print],
     [static void],
                [[FILE *yyoutput],                       [yyoutput]],
                [[int yytype],                           [yytype]],
@@ -483,7 +481,7 @@ m4_if(b4_skeleton, ["yacc.c"],
 | Print this symbol on YYOUTPUT.  |
 `--------------------------------*/
 
-]$1([yy_symbol_print],
+]b4_function_define([yy_symbol_print],
     [static void],
                [[FILE *yyoutput],                       [yyoutput]],
                [[int yytype],                           [yytype]],
index 4ceb2bcd6961ebd9ca9bd542e7eb23cfc4ecc1b3..511510d8ff5790699a982a30ad4da316dbacd7ee 100644 (file)
@@ -491,7 +491,7 @@ typedef enum { yyok, yyaccept, yyabort, yyerr } YYRESULTTAG;
       YYFPRINTF Args;                           \
   } while (YYID (0))
 
-]b4_yy_symbol_print_generate([b4_function_define])[
+]b4_yy_symbol_print_generate[
 
 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                  \
   do {                                                                  \
@@ -872,7 +872,7 @@ yyuserMerge (int yyn, YYSTYPE* yy0, YYSTYPE* yy1)
 
                               /* Bison grammar-table manipulation.  */
 
-]b4_yydestruct_generate([b4_function_define])[
+]b4_yydestruct_generate[
 
 /** Number of symbols composing the right hand side of rule #RULE.  */
 static inline int
index 9234cc4e98a3a44b23f802f2f0792ebd87b511d2..0083ebed48fb9d4a3c7963b642b0bf169dcc53ba 100644 (file)
@@ -714,7 +714,7 @@ do {                                                                      \
     }                                                                     \
 } while (YYID (0))
 
-]b4_yy_symbol_print_generate([b4_function_define])[
+]b4_yy_symbol_print_generate[
 
 /*------------------------------------------------------------------.
 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
@@ -1284,7 +1284,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
 }
 #endif /* YYERROR_VERBOSE */
 
-]b4_yydestruct_generate([b4_function_define])[
+]b4_yydestruct_generate[
 
 ]b4_pure_if([], [