Friday, April 12, 2019

Lex Program for all the strings which are accepted by [a|b|c*].


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


No comments:

Post a Comment