%{
#include<stdio.h>
int count=0;
%}
%%
"/*"[^\n]+"*/" {count++;fprintf(yyout,"");}
"//".* { count++; fprintf(yyout,"");}
%%
int main()
{
yyin=fopen("open.c","r");
yyout=fopen("new.c","w");
yylex();
printf("Number of Comments=%d\n",count);
return 0;
}
How to run this file
1. run lex file using command "flex filename.l "
2. it generate the c file which can be execute by command "cc lex.yy.c -ll"
3. it will generate the executable file "./a.out "
Lucky Club: The Definitive Guide to the Best Betting Sites & Sites
ReplyDeleteBetting luckyclub sites for the whole of Europe. A guide to the best betting sites and websites to make money. The betting odds at these sites