%{
#include <stdio.h>
int word_count = 0;
int line_count = 0;
%}
%%
\n { line_count++; }
[a-zA-Z0-9]+ { word_count++; }
%%
int main() {
yylex();
printf("Word count: %d\n", word_count);
printf("Line count: %d\n", line_count);
return 0;
}
int yywrap() {
return 1;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CmludCB3b3JkX2NvdW50ID0gMDsKaW50IGxpbmVfY291bnQgPSAwOwolfQoKJSUKXG4gICAgICAgIHsgbGluZV9jb3VudCsrOyB9ClthLXpBLVowLTldKyAgIHsgd29yZF9jb3VudCsrOyB9CiUlCgppbnQgbWFpbigpIHsKICAgIHl5bGV4KCk7CiAgICBwcmludGYoIldvcmQgY291bnQ6ICVkXG4iLCB3b3JkX2NvdW50KTsKICAgIHByaW50ZigiTGluZSBjb3VudDogJWRcbiIsIGxpbmVfY291bnQpOwogICAgcmV0dXJuIDA7Cn0KCmludCB5eXdyYXAoKSB7CiAgICByZXR1cm4gMTsKfQo=