Friday, April 12, 2019

Lex Program for Regular Expression [A-Z a-z]{6}

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

ScreeShot:

No comments:

Post a Comment