Saturday, 8 September 2018

Write a LEX program to check whether input is multidigit number or string.


            

               Code :

%{
%}
%%
[0-9][0-9]+ {printf("Input is a multi digit number");}
[A-Za-z][A-Za-z]+ {printf("Input is a multi character");}
%%
main()
{
     yylex();
}
int yywrap()
{
     return 1;
}

No comments:

Post a Comment

It's time To increase blogging capability. To have a chance to contribute in digital world. Any Interested People who want to make t...