Friday, April 12, 2019

lex program to convert lower case letter to upper case from user input and terminate the program if user enters 0


%{
#include<stdio.h>
%}

%%
[a-z] printf("%c",yytext[0] - ('a' - 'A'));
0 { return 0;}
%%

int main()
{
 yylex();
 return 0;
}

ScreenShot:


2 comments: