Friday, April 12, 2019

Lex Program for Regular Expression [a+b]{6}

%{
#include<stdio.h>
%}
%%
[a+b]{6} {printf("valid");}
.* {printf("invalid");}
%%
main()
{
yylex();
}

ScreenShot:

No comments:

Post a Comment