%{
#include<stdio.h>
int v=0, c=0;
%}
%%
[ \t\n]+ ; /* ignore spaces */
[AEIOUaeiou] { v++; } /* vowels */
[B-DF-HJ-NP-TV-Zb-df-hj-np-tv-z] { c++; } /* consonants */
. ; /* ignore others */
%%
int main(){
printf("Enter the input string: ");
yylex();
printf("\nNo of vowels are : %d", v);
printf("\nNo of consonants are : %d", c);
return 0;
}
int yywrap(){
return 1;
}
JXsKI2luY2x1ZGU8c3RkaW8uaD4KaW50IHY9MCwgYz0wOwolfQoKJSUKWyBcdFxuXSsgICAgICAgIDsgICAgICAgIC8qIGlnbm9yZSBzcGFjZXMgKi8KW0FFSU9VYWVpb3VdICAgIHsgdisrOyB9IC8qIHZvd2VscyAqLwpbQi1ERi1ISi1OUC1UVi1aYi1kZi1oai1ucC10di16XSB7IGMrKzsgfSAvKiBjb25zb25hbnRzICovCi4gICAgICAgICAgICAgICA7ICAgICAgICAvKiBpZ25vcmUgb3RoZXJzICovCiUlCgppbnQgbWFpbigpewogIHByaW50ZigiRW50ZXIgdGhlIGlucHV0IHN0cmluZzogIik7CiAgeXlsZXgoKTsKICBwcmludGYoIlxuTm8gb2Ygdm93ZWxzIGFyZSA6ICVkIiwgdik7CiAgcHJpbnRmKCJcbk5vIG9mIGNvbnNvbmFudHMgYXJlIDogJWQiLCBjKTsKICByZXR1cm4gMDsKfQoKaW50IHl5d3JhcCgpewogIHJldHVybiAxOwp9