This is working :)
%{
/* this program does the job for identifying C type integer and floats*/
#include <stdio.h>
int c;
%}
%%
[\t ]+ /* ignore whitespace */ ;
[-+]?[0-9]*\.?[0-9]+ { printf ("\"%s\" is a float\n", yytext); }
[-+]?[0-9]+ c = atoi(yytext); if(c < -32767 || c > 32767) {printf("OUT OF RANGE INTEGER");} else {printf("INTEGER");}
\n ECHO; /* which is the default anyway */
%%