String starts with 'a' and should contain at least 3 b's
%{
%include<stdio.h>
%}
%%
[a]+[b]+[a]*[b]+[a]*[b]+[ab]* {prinf("valid");}
%%
main()
{
yylex();
}
%include<stdio.h>
%}
%%
[a]+[b]+[a]*[b]+[a]*[b]+[ab]* {prinf("valid");}
%%
main()
{
yylex();
}
Comments
Post a Comment