From mboxrd@z Thu Jan 1 00:00:00 1970 From: karthik.188@gmail.com (karthik nayak) Date: Thu, 18 Dec 2014 00:04:48 +0530 Subject: Solving checkpatch error with lex Message-ID: <5491CCC8.4050409@gmail.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org 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 -------------- next part -------------- %{ #include %} %% "//".* {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; }