%{
#include <stdio.h>
int lines=0,spaces=0,tabs=0,chars=0;
%}
%%
\n { lines++; chars++; }
\t { tabs++; chars++; }
" " { spaces++; chars++; }
. { chars++; }
%%
int main()
{
yylex();
printf("lines:%d,spaces:%d,tabs:%d,chars:%d",lines,spaces,tabs,chars);
return 0;
}
int yywrap()
{
return 1;
}