add proper C++ support

This commit is contained in:
2025-12-04 22:30:59 +01:00
parent eb527222b0
commit a9c04249a2
10 changed files with 19 additions and 5285 deletions

6
z5.l
View File

@@ -7,8 +7,7 @@
#define INFILE_ERROR 1
#define OUTFILE_ERROR 2
extern int yylineno;
void yyerror(char *msg, ...);
void yyerror(const char *msg, ...);
%}
%option noyywrap
@@ -38,7 +37,8 @@ void yyerror(char *msg, ...);
\n {yylineno++;}
. {yyerror("Blad leksykalny\n");}
%%
void yyerror(char *msg, ...)
void yyerror(const char *msg, ...)
{
printf("%d: %s", yylineno, msg);
exit(1);