#include "grub2.h"
#include "parser.h"
#include <talloc/talloc.h>
+
+void yyerror(struct grub2_parser *parser, const char *fmt, ...);
%}
%option nounput noinput
/* strip comments */
#.* ;
-. printf("unknown token '%s'\n", yytext); exit(1);
+. {
+ yyerror(yyget_extra(yyscanner), "unknown token '%s'\n", yytext);
+ yyterminate();
+ }
%%