%{
#include <stdio.h>
%}
%%
[aAeEiIoOuU
] { printf
("
'%s' is a Vowel\n"
, yytext
); } [b
-df
-hj
-np
-tv
-zB
-DF
-HJ
-NP
-TV
-Z
] { printf
("
'%s' is a Consonant\n"
, yytext
); } [0-9] { printf
("
'%s' is a Digit\n"
, yytext
); } [^a
-zA
-Z0
-9\n\t
] { printf
("
'%s' is a Special Symbol\n"
, yytext
); } [\n] { /* Ignore newline */ }
. { /* Ignore any other character */ }
%%
int main()
{
printf("Enter a character: ");
yylex();
return 0;
}
int yywrap()
{
return 1;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CiV9CgolJQpbYUFlRWlJb091VV0gICAgICAgeyBwcmludGYoIiclcycgaXMgYSBWb3dlbFxuIiwgeXl0ZXh0KTsgfQpbYi1kZi1oai1ucC10di16Qi1ERi1ISi1OUC1UVi1aXSAgIHsgcHJpbnRmKCInJXMnIGlzIGEgQ29uc29uYW50XG4iLCB5eXRleHQpOyB9ClswLTldICAgICAgICAgICAgICAgeyBwcmludGYoIiclcycgaXMgYSBEaWdpdFxuIiwgeXl0ZXh0KTsgfQpbXmEtekEtWjAtOVxuXHQgXSAgIHsgcHJpbnRmKCInJXMnIGlzIGEgU3BlY2lhbCBTeW1ib2xcbiIsIHl5dGV4dCk7IH0KW1xuXSAgICAgICAgICAgICAgICB7IC8qIElnbm9yZSBuZXdsaW5lICovIH0KLiAgICAgICAgICAgICAgICAgICB7IC8qIElnbm9yZSBhbnkgb3RoZXIgY2hhcmFjdGVyICovIH0KJSUKCmludCBtYWluKCkKewogICAgcHJpbnRmKCJFbnRlciBhIGNoYXJhY3RlcjogIik7CiAgICB5eWxleCgpOwogICAgcmV0dXJuIDA7Cn0KCmludCB5eXdyYXAoKQp7CiAgICByZXR1cm4gMTsKfQo=