kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Solving checkpatch error with lex
@ 2014-12-17 18:34 karthik nayak
  2014-12-17 18:52 ` Valdis.Kletnieks at vt.edu
  2014-12-17 19:07 ` Paul Bolle
  0 siblings, 2 replies; 9+ messages in thread
From: karthik nayak @ 2014-12-17 18:34 UTC (permalink / raw)
  To: kernelnewbies

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 <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;
}

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-12-18  6:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-17 18:34 Solving checkpatch error with lex karthik nayak
2014-12-17 18:52 ` Valdis.Kletnieks at vt.edu
2014-12-17 19:07 ` Paul Bolle
2014-12-17 19:10   ` karthik nayak
2014-12-17 19:36     ` Greg KH
2014-12-17 21:24     ` Valdis.Kletnieks at vt.edu
2014-12-18  0:47       ` Greg KH
2014-12-18  6:07         ` karthik nayak
2014-12-17 19:11   ` Paul Bolle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).