Friday, April 12, 2019

lex program for the language of all strings ending in 1 and not containing 00


%{
        #include<stdio.h>
%}
%%
(1|01)+ printf("Valid");
.* printf("Invalid");
%%
main()
{
        printf("string ending with 1 and not containing 00::");
        yylex();
}
ScreenShot:

No comments:

Post a Comment