I have a lex program as follows. I encounter the error
EOF encountered inside an action LEX program
%{
#include<stdio.h>
#include<math.h>
#include "y.tab.h"
%}
%%
[ \t]+ ;
[0-9]+ {yylval = atoi(yytext);
return INTEGER;}
[-+*/] {return *yytext;}
"(" {return *yytext;}
")" {return *yytext;}
\n {return *yytext;}
. {char msg[25];
sprintf(msg,"%s <%s>","invalid character",yytext);
yyerror(msg);}
Can someone help me out?