Imported Upstream version 20101229
[platform/upstream/byacc.git] / test / pure_calc.tab.c
index 5d10ba8..4608901 100644 (file)
@@ -134,7 +134,6 @@ typedef int YYSTYPE;
 #define YYERROR_CALL(msg) yyerror(msg)
 
 extern int YYPARSE_DECL();
-extern int YYLEX_DECL();
 
 #define DIGIT 257
 #define LETTER 258
@@ -290,6 +289,11 @@ typedef struct {
 #line 63 "pure_calc.y"
  /* start of programs */
 
+#ifdef YYBYACC
+extern int YYLEX_DECL();
+static void YYERROR_DECL();
+#endif
+
 int
 main (void)
 {
@@ -329,7 +333,7 @@ yylex(YYSTYPE *value)
     }
     return( c );
 }
-#line 333 "pure_calc.tab.c"
+#line 337 "pure_calc.tab.c"
 
 #if YYDEBUG
 #include <stdio.h>             /* needed for printf */
@@ -354,18 +358,14 @@ static int yygrowstack(YYSTACKDATA *data)
         newsize = YYMAXDEPTH;
 
     i = data->s_mark - data->s_base;
-    newss = (data->s_base != 0)
-          ? (short *)realloc(data->s_base, newsize * sizeof(*newss))
-          : (short *)malloc(newsize * sizeof(*newss));
+    newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
     if (newss == 0)
         return -1;
 
     data->s_base = newss;
     data->s_mark = newss + i;
 
-    newvs = (data->l_base != 0)
-          ? (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs))
-          : (YYSTYPE *)malloc(newsize * sizeof(*newvs));
+    newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs));
     if (newvs == 0)
         return -1;