Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!oberon!nunki.usc.edu!jeenglis From: jeenglis@nunki.usc.edu (Joe English) Newsgroups: comp.lang.c Subject: Re: Want a way to strip comments from a Message-ID: <3163@nunki.usc.edu> Date: 20 Mar 89 20:18:22 GMT References: <7150@siemens.UUCP> <9900010@bradley> <4896@cbnews.ATT.COM> <3145@nunki.usc.edu> Organization: University of Southern California, Los Angeles, CA Lines: 27 To: rupley@arizona.edu In-Reply-To: <9797@megaron.arizona.edu> In article <9797@megaron.arizona.edu> you write: >It still doesn't work. It won't uncomment itself. Or the following line: > > '"' /* hi there */ '"' > Thanks -- I had a feeling I was forgetting something. I wrote an uncomment program a couple years ago (and I swear, it *did* work and it wasn't too hard to write :-) and I was trying to recall it from memory. Characters in single-quotes were the other case I forgot about -- and if I had tested the program on it's own source I would have caught that oversight. (I feel really stupid now... I think I'm going to stop posting to this newsgroup, as I have failed to say anything correct or intelligent for about a month now.) The Lex solution posted is much more elegant and simple; but since lex isn't universally available a C version is also useful... (I'm not going to try a third time, though.) --Joe English jeenglis@nunki.usc.edu