Lex program for counting the size of string
%{
#include<stdio.h>
%}
%%
[a-z A-Z 0-9 ]* {printf("%d \n ",yyleng);}
%%
int main()
{
yylex();
return 0;
}
#include<stdio.h>
%}
%%
[a-z A-Z 0-9 ]* {printf("%d \n ",yyleng);}
%%
int main()
{
yylex();
return 0;
}
Comments
Post a Comment