%{
#include <stdio.h>
int vow=0, con=0;
%}
%%
[aeiouAEIOU] { vow++; }
[a-zA-Z] { con++; }
%%
int main()
{
printf("Enter some input: ");
yylex();
printf("No. of vowels = %d\n", vow);
printf("No. of consonants = %d\n", con);
return 0;
}
int yywrap()
{
return 1;
}
Standard output is empty
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
Exception: (3) program ? ERROR: Unknown option (h for help)
Exception: (3) program ? ERROR: Unknown option (h for help)
Exception: (3) program ? ERROR: Can't ignore goal at this port
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
Exception: (3) program ? ERROR: Unknown option (h for help)
Exception: (3) program ? ERROR: Unknown option (h for help)
Exception: (3) program ? ERROR: Unknown option (h for help)
Exception: (3) program ? ERROR: Unknown option (h for help)
Exception: (3) program ? ERROR: Unknown option (h for help)
Exception: (3) program ? ERROR: Can't ignore goal at this port
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
Exception: (3) program ? ERROR: Unknown option (h for help)
Exception: (3) program ? Exception: (3) program ? ERROR: Unknown option (h for help)
Exception: (3) program ? Exception: (3) program ? Exception: (3) program ? Call: (3) program ? ERROR: Unknown option (h for help)
Call: (3) program ? ERROR: '$runtoplevel'/0: Undefined procedure: program/0
Exception: (3) program ? ERROR: Can't ignore goal at this port
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
Exception: (3) program ? ERROR: Unknown option (h for help)
Exception: (3) program ? Call: (3) program ? EOF: exit