/*lex program to count number of words*/
%{
#include<stdio.h>
#include<string.h>
int i = 0;
%}
/* Rules Section*/
%%
([a-zA-Z0-9])* {i++;} /* Rule for counting
number of words*/
"\n" {printf("%d\n", i); i = 0;}
%%
int yywrap(void){}
int main()
{
// The function that starts the analysis
yylex();
return 0;
}
LypsZXggcHJvZ3JhbSB0byBjb3VudCBudW1iZXIgb2Ygd29yZHMqLwoleyAKI2luY2x1ZGU8c3RkaW8uaD4gCiNpbmNsdWRlPHN0cmluZy5oPiAKaW50IGkgPSAwOyAKJX0gCgovKiBSdWxlcyBTZWN0aW9uKi8KJSUgCihbYS16QS1aMC05XSkqIHtpKys7fSAvKiBSdWxlIGZvciBjb3VudGluZyAKCQkJCQkJbnVtYmVyIG9mIHdvcmRzKi8KCiJcbiIge3ByaW50ZigiJWRcbiIsIGkpOyBpID0gMDt9IAolJSAKCmludCB5eXdyYXAodm9pZCl7fSAKCmludCBtYWluKCkgCnsgCgkvLyBUaGUgZnVuY3Rpb24gdGhhdCBzdGFydHMgdGhlIGFuYWx5c2lzIAoJeXlsZXgoKTsgCgoJcmV0dXJuIDA7IAp9IAoK