%{
#include<stdio.h>
%}
%%
int
| float | char
{printf
("
%s is a Keyword", yytext);}[0-9]+ {printf("%s is a Number", yytext);}
[a-zA-Z][a-zA-Z|0-9]* {printf("%s is an Identifier", yytext);}
[+ | - | * | /] {printf("%s is a Operator", yytext);}
[@|#|$|&] {printf("%s is a Special Symbol", yytext);}
. | \n {ECHO;}
%%
int main()
{
printf("Please enter the string..!");
yylex();
}
int yywrap()
{
return 1;
}
JXsKCSNpbmNsdWRlPHN0ZGlvLmg+CiV9CiUlCmludCB8IGZsb2F0IHwgY2hhciB7cHJpbnRmKCIlcyBpcyBhIEtleXdvcmQiLCB5eXRleHQpO30KWzAtOV0rIHtwcmludGYoIiVzIGlzIGEgTnVtYmVyIiwgeXl0ZXh0KTt9ClthLXpBLVpdW2EtekEtWnwwLTldKiB7cHJpbnRmKCIlcyBpcyBhbiBJZGVudGlmaWVyIiwgeXl0ZXh0KTt9ClsrIHwgLSB8ICogfCAvXSB7cHJpbnRmKCIlcyBpcyBhIE9wZXJhdG9yIiwgeXl0ZXh0KTt9CltAfCN8JHwmXSB7cHJpbnRmKCIlcyBpcyBhIFNwZWNpYWwgU3ltYm9sIiwgeXl0ZXh0KTt9Ci4gfCBcbiB7RUNITzt9CiUlCmludCBtYWluKCkKewoJcHJpbnRmKCJQbGVhc2UgZW50ZXIgdGhlIHN0cmluZy4uISIpOwoJeXlsZXgoKTsKfQppbnQgeXl3cmFwKCkJCnsKCXJldHVybiAxOwp9Cg==