There is a warning that I could not get rid of it from this code. And this is the code that I could provide :
%{
#include <stdlib.h>
#include <stdio.h>
#include "y.tab.h"
%}
%%
[1-9]+ {
yylval.iVal = atoi(yytext);
printf("NUMBER\n");
return NUMBER;
}
[a-z] {
printf("VARIABLE\n");
yylval.cVal = yytext;
return VARIABLE;
}
[-()<>=+/*\n] {
printf("OPERATOR\n");
return *yytext;
}
"^" {
printf("POW\n");
return *yytext;
}
[ \t]+ ; // Skip whitespaces.
. yyerror("Unknown character.\n");
%%
int yywrap(void)
{
return 1;
}
I got the warning on this part : yylval.cVal = yytext;
. How could it go wrong? Thanks in advance.