%{
#include <stdio.h>
#include <ctype.h>
int line_count = 0;
int word_count = 0;
%}
%%
\n { line_count++; }
[a-zA-Z_][a-zA-Z0-9_]* { word_count++; }
%%
int main() {
printf("Enter input\n");
yylex();
printf("Lines: %d\n", line_count);
printf("Words: %d\n", word_count);
return 0;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxjdHlwZS5oPgoKaW50IGxpbmVfY291bnQgPSAwOyAgCmludCB3b3JkX2NvdW50ID0gMDsgIAolfQoKJSUKClxuICAgICAgICAgICAgICAgICAgeyBsaW5lX2NvdW50Kys7IH0gICAgICAgICAgICAKW2EtekEtWl9dW2EtekEtWjAtOV9dKiAgeyB3b3JkX2NvdW50Kys7IH0gICAgICAgICAKCiUlCgppbnQgbWFpbigpIHsKICAgIHByaW50ZigiRW50ZXIgaW5wdXRcbiIpOwogICAgCiAgICAKICAgIHl5bGV4KCk7CiAgICAKcHJpbnRmKCJMaW5lczogJWRcbiIsIGxpbmVfY291bnQpOwpwcmludGYoIldvcmRzOiAlZFxuIiwgd29yZF9jb3VudCk7CnJldHVybiAwOwp9