[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/9] glr: rename lex params
From: |
Akim Demaille |
Subject: |
[PATCH 3/9] glr: rename lex params |
Date: |
Wed, 19 Dec 2012 11:36:04 +0100 |
* data/glr.c (b4_lex_param): Rename as...
(b4_lex_formals): this, for consistency.
Provide arguments a name.
(LEX): Adjust.
---
data/glr.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/data/glr.c b/data/glr.c
index 13c7381..fc59b6b 100644
--- a/data/glr.c
+++ b/data/glr.c
@@ -55,13 +55,12 @@ m4_define([b4_user_formals],
[m4_ifset([b4_parse_param], [, b4_formals(b4_parse_param)])])
-# b4_lex_param
-# ------------
-# Accumule in b4_lex_param all the yylex arguments.
-# Yes, this is quite ugly...
-m4_define([b4_lex_param],
-m4_dquote(b4_pure_if([[[[YYSTYPE *]], [[&yylval]]][]dnl
-b4_locations_if([, [[YYLTYPE *], [&yylloc]]])])dnl
+# b4_lex_formals
+# --------------
+# All the yylex formal arguments.
+m4_define([b4_lex_formals],
+m4_dquote(b4_pure_if([[[[YYSTYPE *yylvalp]], [[&yylval]]][]dnl
+b4_locations_if([, [[YYLTYPE *yyllocp], [&yylloc]]])])dnl
m4_ifdef([b4_lex_param], [, ]b4_lex_param)))
@@ -408,7 +407,9 @@ dnl We probably ought to introduce a type for confl.
]b4_yy_location_print_define[
/* YYLEX -- calling `yylex' with the right arguments. */
-#define YYLEX ]b4_function_call([yylex], [int], b4_lex_param)[
+#ifndef YYLEX
+# define YYLEX ]b4_function_call([yylex], [int], b4_lex_formals)[
+#endif
]b4_pure_if(
[
--
1.8.0.2
- [PATCH 0/9] {master} import improvements from {make-glr-symbol}, Akim Demaille, 2012/12/19
- [PATCH 7/9] gnulib: update, Akim Demaille, 2012/12/19
- [PATCH 4/9] glr.cc: simplifying the handling of parse/lex params, Akim Demaille, 2012/12/19
- [PATCH 6/9] skeletons: fix output directives, Akim Demaille, 2012/12/19
- [PATCH 5/9] yacc.c: style changes, Akim Demaille, 2012/12/19
- [PATCH 1/9] %define variables: backward compatibility, Akim Demaille, 2012/12/19
- [PATCH 2/9] glr.c: move function declaration earlier, Akim Demaille, 2012/12/19
- [PATCH 3/9] glr: rename lex params,
Akim Demaille <=
- [PATCH 9/9] variants: prohibit simple copies, Akim Demaille, 2012/12/19
- [PATCH 8/9] variant: more assertions, Akim Demaille, 2012/12/19