From 30f5b1ccd3b0cc6e4ac1f6ab7f391753f9bea8d2 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 27 Dec 1995 12:43:49 +0000 Subject: [PATCH] (YYPARSE_PARAM_DECL): In C++, make it always null. (YYPARSE_PARAM_ARG): New macro. (yyparse): Use YYPARSE_PARAM_ARG. --- bison.simple | 14 ++++++++++---- src/bison.s1 | 14 ++++++++++---- src/bison.simple | 14 ++++++++++---- 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/bison.simple b/bison.simple index 0fb74ce7..51ab0f2a 100644 --- a/bison.simple +++ b/bison.simple @@ -201,14 +201,20 @@ __yy_memcpy (char *from, char *to, int count) to the proper pointer type. */ #ifdef YYPARSE_PARAM +#ifdef __cplusplus +#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM +#define YYPARSE_PARAM_DECL +#else /* not __cplusplus */ +#define YYPARSE_PARAM_ARG YYPARSE_PARAM #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -#else -#define YYPARSE_PARAM +#endif /* not __cplusplus */ +#else /* not YYPARSE_PARAM */ +#define YYPARSE_PARAM_ARG #define YYPARSE_PARAM_DECL -#endif +#endif /* not YYPARSE_PARAM */ int -yyparse(YYPARSE_PARAM) +yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { register int yystate; diff --git a/src/bison.s1 b/src/bison.s1 index 0fb74ce7..51ab0f2a 100644 --- a/src/bison.s1 +++ b/src/bison.s1 @@ -201,14 +201,20 @@ __yy_memcpy (char *from, char *to, int count) to the proper pointer type. */ #ifdef YYPARSE_PARAM +#ifdef __cplusplus +#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM +#define YYPARSE_PARAM_DECL +#else /* not __cplusplus */ +#define YYPARSE_PARAM_ARG YYPARSE_PARAM #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -#else -#define YYPARSE_PARAM +#endif /* not __cplusplus */ +#else /* not YYPARSE_PARAM */ +#define YYPARSE_PARAM_ARG #define YYPARSE_PARAM_DECL -#endif +#endif /* not YYPARSE_PARAM */ int -yyparse(YYPARSE_PARAM) +yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { register int yystate; diff --git a/src/bison.simple b/src/bison.simple index 0fb74ce7..51ab0f2a 100644 --- a/src/bison.simple +++ b/src/bison.simple @@ -201,14 +201,20 @@ __yy_memcpy (char *from, char *to, int count) to the proper pointer type. */ #ifdef YYPARSE_PARAM +#ifdef __cplusplus +#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM +#define YYPARSE_PARAM_DECL +#else /* not __cplusplus */ +#define YYPARSE_PARAM_ARG YYPARSE_PARAM #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -#else -#define YYPARSE_PARAM +#endif /* not __cplusplus */ +#else /* not YYPARSE_PARAM */ +#define YYPARSE_PARAM_ARG #define YYPARSE_PARAM_DECL -#endif +#endif /* not YYPARSE_PARAM */ int -yyparse(YYPARSE_PARAM) +yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { register int yystate; -- 2.45.2