Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 from ihnp4 4.3bsd-beta 6/6/85; site chinet.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!mhuxv!mhuxh!mhuxj!mhuxn!ihnp4!chinet!larryv From: larryv@chinet.UUCP (Larry W. Virden) Newsgroups: net.wanted.sources Subject: Re: partial preprocessing Message-ID: <227@chinet.UUCP> Date: Mon, 25-Nov-85 23:33:31 EST Article-I.D.: chinet.227 Posted: Mon Nov 25 23:33:31 1985 Date-Received: Wed, 27-Nov-85 01:15:24 EST References: <605@osiris.UUCP> Reply-To: larryv@chinet.UUCP (Larry W. Virden) Distribution: na Organization: chi-net, Public Access UN*X, Chicago IL Lines: 37 Along similar lines to the partial preprocessor (which was posted in the not too distant past...) I would like to find a "de-processor"... That is, a program which could be given a series of defines and would make substitions within the text appropriately, as an inverse to a preprocessor. Thus, if I said: #define MAXLEN 256 occurances of 256 would be replaced with MAXLEN ... If I said #define ADD(x,y) ((x) + (y)) Then a = b + c; would be replaced with a = ADD(b,c); This type of program has its various uses. P.S. Does anyone have an EASY to use filter which performs standard "regular expression" replacements within a file? I know that some UNIX systems have SED(1) - I am looking for something much simpler to use: replace 'a[B-Z]' 'A&' < file1 > file2 or something similar. Thanks -- Larry W. Virden A user of the Free Access chinet board... ...!chinet!larryv