Friday, April 12, 2019

lex program for the language of all strings contains atleast two 0’s


%{
#include<stdio.h>
%}
%%
(0|1)*0(0|1)*0(0|1)* printf("Valid String");
.* printf("invalid string");
%%
int main()
{
     printf("Enter String that contains atleast two 0's::");
     yylex();
}
ScreenShot:


No comments:

Post a Comment