Friday, April 12, 2019

lex program for the language of all string not containing 00


%{
     #include<stdio.h>
%}
%%
(1|01)*(0?) printf("Valid");
.* printf("invalid");
%%
main()
{
     printf("string not containing 00::");
     yylex();
}

ScreenShot:

No comments:

Post a Comment