Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!hp4nl!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.lang.c Subject: Re: request for C comment stripper Message-ID: <989@philmds.UUCP> Date: 23 Mar 89 07:43:01 GMT References: <5693@ux.cs.man.ac.uk> <985@philmds.UUCP> <5695@ux.cs.man.ac.uk> Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 21 In article <5695@ux.cs.man.ac.uk> ian@mucs.UUCP (Ian Cottam) writes: |According to my understanding of the pANS C preprocessor and the |notion of a "translation unit", your example is erroneous as the |comment must be terminated within startcom.h. (As a practical |man I also confirmed my suspicion with the help of gcc :-) ) OK, if your stripper is pANS conforming (whatever that means) it should handle trigraphs too (it doesn't). If it isn't, then, being a practical man, try and test my sample program on an Ultrix 2.x C compiler (4.3 BSD will probably do too). It'll compile just fine. |However, I suspect someone can come up with a case that will |throw my lex script as comment-strippers always require more |thought than people can believe possible. That's exactly the point I'm trying to make all the time: it shouldn't be difficult, it isn't entirely trivial however (it may even depend on the version of pANS you're reading; look for instance for /* in include file names, compare the Feb '87 and May '88 drafts). Leo.