summaryrefslogtreecommitdiff
path: root/test/code_error.code.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/code_error.code.c')
-rw-r--r--test/code_error.code.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/test/code_error.code.c b/test/code_error.code.c
index 35050b5..dd3d96b 100644
--- a/test/code_error.code.c
+++ b/test/code_error.code.c
@@ -45,7 +45,6 @@ typedef int YYSTYPE;
#define YYERROR_CALL(msg) yyerror(msg)
extern int YYPARSE_DECL();
-extern int YYLEX_DECL();
#define YYERRCODE 256
#define YYTABLESIZE 0
@@ -136,7 +135,6 @@ extern int YYLEX_DECL();
#endif /* yyrule */
#define YYPREFIX "error_"
extern int YYPARSE_DECL();
-extern int YYLEX_DECL();
extern short yylhs[];
extern short yylen[];
@@ -189,6 +187,11 @@ static YYSTACKDATA yystack;
#include <stdio.h>
+#ifdef YYBYACC
+extern int YYLEX_DECL();
+static void YYERROR_DECL();
+#endif
+
int
main(void)
{
@@ -207,7 +210,7 @@ yyerror(const char* s)
{
printf("%s\n", s);
}
-#line 211 "code_error.code.c"
+#line 214 "code_error.code.c"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -232,18 +235,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;