%{
#include<stdio.h>
#include<ctype.h>
int vowel_count = 0, conso_count = 0;
%}
%%
[aeiouAEIOU] { vowel_count++; }
[b-df-hj-np-tv-zB-DF-HJ-NP-TV-Z] { conso_count++; }
%%
int main() {
printf("Enter a string: ");
yylex();
printf("Vowels: %d\n", vowel_count);
printf("Consonants: %d\n", conso_count );
return 0;
}
int yywrap(void) {
return 1;
}
JXsKI2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGU8Y3R5cGUuaD4KaW50IHZvd2VsX2NvdW50ID0gMCwgY29uc29fY291bnQgPSAwOwoKJX0KCiUlCgpbYWVpb3VBRUlPVV0geyB2b3dlbF9jb3VudCsrOyB9CltiLWRmLWhqLW5wLXR2LXpCLURGLUhKLU5QLVRWLVpdIHsgY29uc29fY291bnQrKzsgfQoKJSUKCmludCBtYWluKCkgewogICAgcHJpbnRmKCJFbnRlciBhIHN0cmluZzogIik7CiAgICB5eWxleCgpOwogICAgcHJpbnRmKCJWb3dlbHM6ICVkXG4iLCB2b3dlbF9jb3VudCk7CiAgICBwcmludGYoIkNvbnNvbmFudHM6ICVkXG4iLCBjb25zb19jb3VudCApOwogICAgcmV0dXJuIDA7Cn0KaW50IHl5d3JhcCh2b2lkKSB7CiAgICByZXR1cm4gMTsgCiAgICB9Cg==