Friday, April 12, 2019

lex program for the language of all strings that do not end with 01


%{
#include<stdio.h>
%}
%%
([0|1]*(11|10|00))|^|0|1 printf("Valid");
.* printf("invalid");
%%
int main()
{
     printf("string that do not end with 01::");
     yylex();
}

ScreenShot:

No comments:

Post a Comment