From 553e2b222ff6d27a48d3c9a39a4c0d3f625556b9 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 7 Nov 2000 15:51:45 +0000 Subject: [PATCH] * src/bison.s1 (YYLEX): Use #if instead of #ifdef. Merge in a single CPP if/else. --- ChangeLog | 5 +++++ src/bison.s1 | 19 +++++++++++-------- src/bison.simple | 19 +++++++++++-------- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 32252868..744d79a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-11-07 Akim Demaille + + * src/bison.s1 (YYLEX): Use #if instead of #ifdef. + Merge in a single CPP if/else. + 2000-11-07 Akim Demaille * src/output.c (output): Remove useless variables. diff --git a/src/bison.s1 b/src/bison.s1 index aee33e27..aac00ba3 100644 --- a/src/bison.s1 +++ b/src/bison.s1 @@ -116,11 +116,10 @@ while (0) #define YYTERROR 1 #define YYERRCODE 256 -#ifndef YYPURE -# define YYLEX yylex () -#endif -#ifdef YYPURE +/* YYLEX -- calling `yylex' with the right arguments. */ + +#if YYPURE # ifdef YYLSP_NEEDED # ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) @@ -134,11 +133,14 @@ while (0) # define YYLEX yylex (&yylval) # endif # endif /* !YYLSP_NEEDED */ -#endif +#else /* !YYPURE */ +# define YYLEX yylex () +#endif /* !YYPURE */ + /* If nonreentrant, generate the variables here. */ -#ifndef YYPURE +#if !YYPURE /* The lookahead symbol. */ int yychar; @@ -154,6 +156,7 @@ YYLTYPE yylloc; int yynerrs; #endif /* !YYPURE */ + /* Enable debugging if requested. */ #if YYDEBUG # define YYDPRINTF(Args) \ @@ -304,14 +307,14 @@ yyparse (YYPARSE_PARAM_ARG) int yystacksize = YYINITDEPTH; int yyfree_stacks = 0; -#ifdef YYPURE +#if YYPURE int yychar; YYSTYPE yylval; int yynerrs; # ifdef YYLSP_NEEDED YYLTYPE yylloc; # endif -#endif +#endif /* !YYPURE */ /* The variables used to return semantic value and location from the diff --git a/src/bison.simple b/src/bison.simple index aee33e27..aac00ba3 100644 --- a/src/bison.simple +++ b/src/bison.simple @@ -116,11 +116,10 @@ while (0) #define YYTERROR 1 #define YYERRCODE 256 -#ifndef YYPURE -# define YYLEX yylex () -#endif -#ifdef YYPURE +/* YYLEX -- calling `yylex' with the right arguments. */ + +#if YYPURE # ifdef YYLSP_NEEDED # ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) @@ -134,11 +133,14 @@ while (0) # define YYLEX yylex (&yylval) # endif # endif /* !YYLSP_NEEDED */ -#endif +#else /* !YYPURE */ +# define YYLEX yylex () +#endif /* !YYPURE */ + /* If nonreentrant, generate the variables here. */ -#ifndef YYPURE +#if !YYPURE /* The lookahead symbol. */ int yychar; @@ -154,6 +156,7 @@ YYLTYPE yylloc; int yynerrs; #endif /* !YYPURE */ + /* Enable debugging if requested. */ #if YYDEBUG # define YYDPRINTF(Args) \ @@ -304,14 +307,14 @@ yyparse (YYPARSE_PARAM_ARG) int yystacksize = YYINITDEPTH; int yyfree_stacks = 0; -#ifdef YYPURE +#if YYPURE int yychar; YYSTYPE yylval; int yynerrs; # ifdef YYLSP_NEEDED YYLTYPE yylloc; # endif -#endif +#endif /* !YYPURE */ /* The variables used to return semantic value and location from the -- 2.45.2