Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!eecae!netnews.upenn.edu!rutgers!att!ulysses!mhuxo!mhuxu!m10ux!mnc From: mnc@m10ux.UUCP (Michael Condict) Newsgroups: comp.lang.c Subject: Re: Want a way to strip comments from a Summary: lex script to delete comments from C source Message-ID: <893@m10ux.UUCP> Date: 24 Mar 89 05:17:17 GMT References: <7150@siemens.UUCP> <9900010@bradley> <890@m10ux.UUCP> Sender: netnews@m10ux.UUCP Organization: AT&T Bell Labs, Murray Hill Lines: 15 Oops, the previous lex script I posted for deleting comments from C source code is incorrect -- it doesn't recognize: /***...**/ Here is a better one (simpler, too): %% \"([^\\"]*\\(.|\n))*[^\\"]*\" ECHO; "/*"([^*]|"*"+[^/*])*"*"*"*/" ; . ECHO; Okay, I promise to stop now. (Unless there is a bug in this one.) -- Michael Condict {att|allegra}!m10ux!mnc AT&T Bell Labs (201)582-5911 MH 3B-416 Murray Hill, NJ