diff options
Diffstat (limited to 'test/calc2.tab.c')
-rw-r--r-- | test/calc2.tab.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/calc2.tab.c b/test/calc2.tab.c index 4cf9c03..15d51e8 100644 --- a/test/calc2.tab.c +++ b/test/calc2.tab.c @@ -127,11 +127,10 @@ typedef int YYSTYPE; #endif /* Parameters sent to yyerror. */ -#define YYERROR_DECL() yyerror(YYSTYPE *v, const char *s) +#define YYERROR_DECL() yyerror(int regs[26], int * base, const char *s) #define YYERROR_CALL(msg) yyerror(regs, base, msg) extern int YYPARSE_DECL(); -extern int YYLEX_DECL(); #define DIGIT 257 #define LETTER 258 @@ -294,6 +293,11 @@ static YYSTACKDATA yystack; #line 65 "calc2.y" /* start of programs */ +#ifdef YYBYACC +extern int YYLEX_DECL(); +static void YYERROR_DECL(); +#endif + int main (void) { @@ -336,7 +340,7 @@ yylex(int *base) } return( c ); } -#line 340 "calc2.tab.c" +#line 344 "calc2.tab.c" #if YYDEBUG #include <stdio.h> /* needed for printf */ @@ -361,18 +365,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; |