Hello,
was trying to fix the checkpatch error of not using c99 comments in the
file
drivers/staging/rtl8192u/r8192U_dm.c
so I wrote a lex program to do so since there were way too many to do it
manually.
Could anyone have a look at my lex code and tell me if I need to change it.
I have attached the lex code.
As per my testing it works perfectly, would love a second opinion.
Thanks,
Karthik
%{
#include <stdio.h>
%}
%%
"//".* {fprintf(yyout, "/*%s*/", yytext + 2);}
(.|\n) {fprintf(yyout, "%s", yytext);}
%%
main()
{
yyin = fopen("tmp.c", "r");
yyout = fopen("aaa.c", "w");
yylex();
fclose(yyin);
fclose(yyout);
}
yywrap()
{
return 1;
}
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies