EOF encountered inside an action

im having this error when i run flex on this:

%{
    #include "parser.tab.c"
    extern "C" int yylex();
%}

%%

[0-9]+        { yylval.intVal = atoi(yytext); return INTEGER_LITERAL; }
[0-9]+.[0-9]+ { yylval.floatVal = atof(yytext); return FLOAT_LITERAL; }
"+"           { return PLUS; }
"-"           { return MINUS; }
"*"           { return MULT; }
"/"           { return DIV; }
";"           { return SEMI; }
[ \t\r\n\f]   ; /* ignore whitespace */

error on line 15


Flex requires that the specification file you give it ends with a newline character, and yours doesn't. Your editor should add one automatically; if it doesn't, add a blank line and find a better editor.

According to Posix, text files must end with a newline character, and some utility functions -- including flex -- misbehave if they don't.