Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ames!ig!arizona!rupley From: rupley@arizona.edu (John Rupley) Newsgroups: comp.lang.c Subject: Re: Want a way to strip comments from a Summary: Aw, c'mon... Message-ID: <9862@megaron.arizona.edu> Date: 23 Mar 89 23:26:24 GMT References: <7150@siemens.UUCP> <9900010@bradley> <4896@cbnews.ATT.COM> <1179@masscomp.UUCP> Organization: U of Arizona CS Dept, Tucson Lines: 21 In article <1179@masscomp.UUCP>, ftw@masscomp.UUCP (Farrell Woods) writes: >In article <9833@megaron.arizona.edu> rupley@arizona.edu (John Rupley) writes: >>This one fails, too. Try: >> /***/ hi there /**/ > >Shouldn't it be a requirement that the program to be stripped at least compile? >This example will generate a syntax error. Aw, c'mon... be imaginative... replace "hi there" by a proper statement or whatever: /***/ main() {printf("hi there\n");} /**/ Cpp strips the comments (properly) and passes the program text. The buggy C code, which was being discussed in the previous posting, strips everything. Both of the earlier Lex postings do it right, which would seem to be the take-home lesson. John Rupley rupley!local@megaron.arizona.edu