%{ 

#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; 

} 