*/
}
+%parse-param {yyscan_t scanner}
%parse-param {struct cdecl **out}
+%lex-param {yyscan_t scanner}
%define api.pure
%error-verbose
%locations
#include "cdecl.h"
#define FAIL(msg) do { \
- yyerror(&yylloc, NULL, msg); \
+ yyerror(&yylloc, NULL, NULL, msg); \
YYERROR; \
} while (0)
}
%code provides {
-void yyerror(YYLTYPE *, struct cdecl **, const char *);
-int yyparse(struct cdecl **out);
+void yyerror(YYLTYPE *, struct cdecl **, void *, const char *);
+int yyparse(void *scanner, struct cdecl **out);
}
%union {
}
%%
-void yyerror(YYLTYPE *loc, struct cdecl **out, const char *err)
+void
+yyerror(YYLTYPE *loc, struct cdecl **out, yyscan_t scanner, const char *err)
{
if (strstr(err, "T_LEX_ERROR"))
return;