%{
#include <stdio.h>
#include <ctype.h>
int vowel_count = 0;
int consonant_count = 0;
%}
%%
[aeiouAEIOU] { vowel_count++; }
[b-df-hj-np-tv-zB-DF-HJ-NP-TV-Z] { consonant_count++; }
[ \t\n]+ { /* Ignore whitespace and newlines */ }
. { /* Ignore other characters */ }
%%
int main(int argc, char **argv) {
yylex(); // Start lexical analysis
printf("Vowels: %d\n", vowel_count);
printf("Consonants: %d\n", consonant_count);
return 0;
}
int yywrap() {
return 1; // End of file
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxjdHlwZS5oPgoKaW50IHZvd2VsX2NvdW50ID0gMDsKaW50IGNvbnNvbmFudF9jb3VudCA9IDA7CiV9CgolJQoKW2FlaW91QUVJT1VdICAgIHsgdm93ZWxfY291bnQrKzsgfQpbYi1kZi1oai1ucC10di16Qi1ERi1ISi1OUC1UVi1aXSB7IGNvbnNvbmFudF9jb3VudCsrOyB9ClsgXHRcbl0rICAgICAgICB7IC8qIElnbm9yZSB3aGl0ZXNwYWNlIGFuZCBuZXdsaW5lcyAqLyB9Ci4gICAgICAgICAgICAgICB7IC8qIElnbm9yZSBvdGhlciBjaGFyYWN0ZXJzICovIH0KCiUlCgppbnQgbWFpbihpbnQgYXJnYywgY2hhciAqKmFyZ3YpIHsKICAgIHl5bGV4KCk7ICAvLyBTdGFydCBsZXhpY2FsIGFuYWx5c2lzCiAgICBwcmludGYoIlZvd2VsczogJWRcbiIsIHZvd2VsX2NvdW50KTsKICAgIHByaW50ZigiQ29uc29uYW50czogJWRcbiIsIGNvbnNvbmFudF9jb3VudCk7CiAgICByZXR1cm4gMDsKfQoKaW50IHl5d3JhcCgpIHsKICAgIHJldHVybiAxOyAgLy8gRW5kIG9mIGZpbGUKfQo=