%{
#include<stdio.h>
#include<stdlib.h>
%}
identifier [a-zA-Z_][a-zA-Z0-9+]*
keyword if
|while
|do
|else
|int
|float|double
%%
{number} {printf
("the given
%d is a number",atoi(yytext));} {identifier} {printf("the given %s is a identifier",yytext);}
{keyword} {printf("the given %s is a keyword",yytext);}
.* {printf("the given %s is a keyword",yytext);}
%%
int main(void)
{
printf("enter the input");
yylex();
return 0;
}
JXsKICAjaW5jbHVkZTxzdGRpby5oPgogICNpbmNsdWRlPHN0ZGxpYi5oPgolfQoKCgpudW1iZXIgWzAtOV0rCmlkZW50aWZpZXIgW2EtekEtWl9dW2EtekEtWjAtOStdKgprZXl3b3JkIGlmfHdoaWxlfGRvfGVsc2V8aW50fGZsb2F0fGRvdWJsZQoKJSUKCntudW1iZXJ9IHtwcmludGYoInRoZSBnaXZlbiAlZCBpcyBhIG51bWJlciIsYXRvaSh5eXRleHQpKTt9CntpZGVudGlmaWVyfSB7cHJpbnRmKCJ0aGUgZ2l2ZW4gJXMgaXMgYSBpZGVudGlmaWVyIix5eXRleHQpO30Ke2tleXdvcmR9IHtwcmludGYoInRoZSBnaXZlbiAlcyBpcyBhIGtleXdvcmQiLHl5dGV4dCk7fQouKiB7cHJpbnRmKCJ0aGUgZ2l2ZW4gJXMgaXMgYSBrZXl3b3JkIix5eXRleHQpO30KCiUlCgppbnQgbWFpbih2b2lkKQp7CiAgcHJpbnRmKCJlbnRlciB0aGUgaW5wdXQiKTsKICB5eWxleCgpOwogIHJldHVybiAwOwp9