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