%{
#include<stdio.h>
%}
%%
if |
else |
printf{printf("%s is keyword",yytext);}
[0-9]+ {printf("%s is number",yytext);}
[a-zA-Z]+ {printf("%s is word",yytext);}
.|\n {ECHO;}
%%
int main()
{
printf("Enter the string:");
yylex();
}
int yywrap()
{
return 1;
}
JXsKCSNpbmNsdWRlPHN0ZGlvLmg+CiV9CgolJQppZiB8CmVsc2UgfApwcmludGZ7cHJpbnRmKCIlcyBpcyBrZXl3b3JkIix5eXRleHQpO30KWzAtOV0rIHtwcmludGYoIiVzIGlzIG51bWJlciIseXl0ZXh0KTt9ClthLXpBLVpdKyB7cHJpbnRmKCIlcyBpcyB3b3JkIix5eXRleHQpO30KLnxcbiB7RUNITzt9CiUlCmludCBtYWluKCkKewoJcHJpbnRmKCJFbnRlciB0aGUgc3RyaW5nOiIpOwoJeXlsZXgoKTsKfQppbnQgeXl3cmFwKCkKewoJcmV0dXJuIDE7Cn0=