%{
#include <stdio.h>
int v = 0, c = 0;
%}
%%
[aeiouAEIOU] v++; // Increment vowel count
[a-zA-Z] c++; // Increment consonant count
%%
int main()
{
printf("ENTER INPUT : ");
yylex(); // Start lexical analysis
printf("VOWELS=%d\nCONSONANTS=%d\n", v, c);
return 0;
}
// Define yywrap function to avoid compiler errors
int yywrap() {
return 1;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgdiA9IDAsIGMgPSAwOwoKJX0KCiUlCgpbYWVpb3VBRUlPVV0gICB2Kys7ICAvLyBJbmNyZW1lbnQgdm93ZWwgY291bnQKW2EtekEtWl0gICAgICAgYysrOyAgLy8gSW5jcmVtZW50IGNvbnNvbmFudCBjb3VudAoKJSUKCmludCBtYWluKCkgIAp7CiAgICBwcmludGYoIkVOVEVSIElOUFVUIDogIik7CiAgICB5eWxleCgpOyAgLy8gU3RhcnQgbGV4aWNhbCBhbmFseXNpcwogICAgcHJpbnRmKCJWT1dFTFM9JWRcbkNPTlNPTkFOVFM9JWRcbiIsIHYsIGMpOwoKICAgIHJldHVybiAwOwp9CgovLyBEZWZpbmUgeXl3cmFwIGZ1bmN0aW9uIHRvIGF2b2lkIGNvbXBpbGVyIGVycm9ycwppbnQgeXl3cmFwKCkgewogICAgcmV0dXJuIDE7Cn0K