Friday, April 12, 2019

Lex Program for Regular Expression [0-9][A-Z]$

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

ScreenShot:

No comments:

Post a Comment