Friday, April 12, 2019

Lex Program for Regular Expression for new line


%{
#include<stdio.h>
%}
%%
b\n {printf("valid");}
.* {printf("invalid");}
%%
main()
{
yylex();
}
ScreenShot:

No comments:

Post a Comment