Merge pull request #16 from Servostar/11-make-yyerror-use-error

added printing of the string of `yyerror` with `ERROR`
This commit is contained in:
Filleo 2024-04-17 15:23:30 +02:00 committed by GitHub
commit 5a519ab8a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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;
}