%{
int line =0, space=0, tabs=0, other=0;
%}
%%
/n {line++;}
" " {space++}
/t {tabs++;}
. {other++;}
%%
int main()
{
yylex();
printf("lines = %d", line);
printf("spaces = %d", space);
printf("tabs = %d", tabs);
printf("other = %d", other);
}
int yywrap(){
return 0;
}
JXsKaW50IGxpbmUgPTAsIHNwYWNlPTAsIHRhYnM9MCwgb3RoZXI9MDsKJX0KCiUlCi9uCXtsaW5lKys7fQoiICIJe3NwYWNlKyt9Ci90CXt0YWJzKys7fQouCXtvdGhlcisrO30KJSUKCmludCBtYWluKCkKewoJeXlsZXgoKTsKCQoJcHJpbnRmKCJsaW5lcyA9ICVkIiwgbGluZSk7CglwcmludGYoInNwYWNlcyA9ICVkIiwgc3BhY2UpOwoJcHJpbnRmKCJ0YWJzID0gJWQiLCB0YWJzKTsKCXByaW50Zigib3RoZXIgPSAlZCIsIG90aGVyKTsKfQoKaW50IHl5d3JhcCgpewpyZXR1cm4gMDsJCgkKfQo=