Friday, April 12, 2019

Lex Program for Regular Expression that accept that accept zero or more occurrences of ‘a’ and single occurrences of ‘b’


%{
#include<stdio.h>
%}
%%
ba* {printf("valid");}
.* {printf("invalid");}
%%
main()
{
yylex();
}

ScreenShot:

No comments:

Post a Comment