Want a way to strip comments from a C file

Tom Stockfisch tps at chem.ucsd.edu
Sat Mar 25 17:03:30 AEST 1989


In article <891 at m10ux.UUCP> mnc at m10ux.UUCP (Michael Condict) writes:
#----------- Lex script to delete comments from C source code ----------------
#%%
#\"([^\\"]*\\(.|\n))*[^\\"]*\"	ECHO;
#"/*"([^*]*"*"[^/])*[^*]*"*/"	;
#.				ECHO;
#Can anyone find anything wrong with this one (he asks stupidly)?

Fails on
	/***/
-- 

|| Tom Stockfisch, UCSD Chemistry	tps at chem.ucsd.edu



More information about the Comp.lang.c mailing list