added printing of the string of `yyerror` with `ERROR`

This commit is contained in:
Felix Müller 2024-04-17 15:03:21 +02:00
parent 8bd4898440
commit 1e33cc7965
1 changed files with 2 additions and 0 deletions

View File

@ -1,4 +1,5 @@
%{
#include <sys/log.h>
extern int yylineno;
int yyerror(char*);
@ -11,5 +12,6 @@ program: ;
%%
int yyerror(char *s) {
ERROR("%s", s);
return 0;
}