Friday, April 12, 2019

Lex Program for Regular Expression that accepts zero or more occurrences of digit and capital letters


%{
#include<stdio.h>
%}
%%
[A-Z0-9\t]* {printf("valid");}
.* {printf("invalid");}
%%
main()
{
yylex();
}


ScreenShot:


No comments:

Post a Comment