Newer versions of GNU Bison automagically add a prototype for yyparse to
the header file, where previous versions did not. Unfortunately, the
use of yyscan_t in %parse-param causes a build failure now, as yyscan_t
is declared in scan.h. Moreover, since scan.h includes parse.h, we
cannot simply include scan.h in parse.h to get the type definition.
Work around the problem by declaring yyparse as taking a void *
directly.
}
%name-prefix "cdecl__yy"
-%parse-param {yyscan_t scanner}
+%parse-param {void *scanner}
%parse-param {struct cdecl **out}
%lex-param {yyscan_t scanner}
%define api.pure
%%
void
-yyerror(YYLTYPE *loc, yyscan_t scanner, struct cdecl **out,
- const char *err)
+yyerror(YYLTYPE *loc, yyscan_t scanner, struct cdecl **out, const char *err)
{
if (strstr(err, "T_LEX_ERROR"))
return;