add proper C++ support
This commit is contained in:
6
z5.l
6
z5.l
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user