Xref: utzoo comp.lang.c:17141 comp.unix.wizards:15177 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!steinmetz!davidsen From: davidsen@steinmetz.ge.com (Wm. E. Davidsen Jr) Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: Sed wins! It IS possible to strip C comments with 1 sed command! Message-ID: <13408@steinmetz.ge.com> Date: 23 Mar 89 20:38:10 GMT References: <7150@siemens.UUCP> <9900010@bradley> <4221@omepd.UUCP> <981@philmds.UUCP> <982@philmds.UUCP> <2186@solo11.cs.vu.nl> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 16 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@crd.GE.COM) {uunet | philabs}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me