Sed wins! It IS possible to strip C comments with 1 sed command!
Wm. E. Davidsen Jr
davidsen at steinmetz.ge.com
Fri Mar 24 06:38:10 AEST 1989
Once upon a time someone gave me a program written in lex and C which
(a) removed all comments, (b) replaced every symbol with a (non-keyword)
token from /usr/dict/words, and (c) formatted the source into N column
lines, refraining only from breaking strings over a line (strings which
*were* broken over lines became single l_o_n_g lines).
It was written when a client of the author found it was cheaper to get
the source by lawsuit than to pay for it.
I have sent a note to the last address I have for the original author
asking permission to post it here.
--
bill davidsen (wedu at crd.GE.COM)
{uunet | philabs}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me
More information about the Comp.unix.wizards
mailing list