Friday, April 12, 2019

lex program to display your name when 0 is entered and nothing should be displayed on the screen


%{
  #include<stdio.h>
%}
%%
0
.* printf("Invalid");
%%
int main()
{
  yylex();
}

screenshot:


No comments:

Post a Comment