bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 07/11] skeletons: simplify after knr removal


From: Akim Demaille
Subject: [PATCH 07/11] skeletons: simplify after knr removal
Date: Fri, 3 Aug 2012 10:39:57 +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   | 20 +++++++++-----------
 data/glr.c  |  4 ++--
 data/yacc.c |  4 ++--
 3 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/data/c.m4 b/data/c.m4
index 745260d..6133823 100644
--- a/data/c.m4
+++ b/data/c.m4
@@ -407,17 +407,16 @@ b4_syncline(address@hidden@], address@hidden@])
     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]],
diff --git a/data/glr.c b/data/glr.c
index 4ceb2bc..511510d 100644
--- a/data/glr.c
+++ b/data/glr.c
@@ -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
diff --git a/data/yacc.c b/data/yacc.c
index 9234cc4..0083ebe 100644
--- a/data/yacc.c
+++ b/data/yacc.c
@@ -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([], [
 
-- 
1.7.11.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]