%{
#include<stdio.h>
int c = 0; // character count
int w = 0; // word count
int s = 0; // space count
int l = 0; // line count
%}
%%
" "     { s++; w++; }
[\n]    { l++; w++; }
[\t\n]  { w++; }
[^\t\n] { c++; }
%%
int yywrap()
{return 1;
}
int main()
{yyin = fopen("Info.txt", "r");
    yylex();
    printf("Characters = %d\nWords = %d\nSpaces = %d\nLines= %d\n", c, w, s, l);
   
}
