]> git.saurik.com Git - bison.git/commitdiff
* src/bison.s1 (YYLEX): Use #if instead of #ifdef.
authorAkim Demaille <akim@epita.fr>
Tue, 7 Nov 2000 15:51:45 +0000 (15:51 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 7 Nov 2000 15:51:45 +0000 (15:51 +0000)
Merge in a single CPP if/else.

ChangeLog
src/bison.s1
src/bison.simple

index 3225286882d6e0fa4d0de59d82597340270d229d..744d79a8c1dc16bf9d197b4a6d2d841a3c19dd2e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-11-07  Akim Demaille  <akim@epita.fr>
+
+       * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
+       Merge in a single CPP if/else.
+
 2000-11-07  Akim Demaille  <akim@epita.fr>
 
        * src/output.c (output): Remove useless variables.
index aee33e27fe327aca9587eeef3cefbc216649b140..aac00ba33f402c24c671a90f98dee991facad8d6 100644 (file)
@@ -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
index aee33e27fe327aca9587eeef3cefbc216649b140..aac00ba33f402c24c671a90f98dee991facad8d6 100644 (file)
@@ -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