Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!tgr!NEVILLE%umass-cs.csnet@csnet-relay.arpa
From: NEVILLE%umass-cs.csnet@csnet-relay.arpa
Newsgroups: net.unix-wizards
Subject: Modifications to Unix C compiler
Message-ID: <11526@brl-tgr.ARPA>
Date: Fri, 12-Jul-85 01:02:49 EDT
Article-I.D.: brl-tgr.11526
Posted: Fri Jul 12 01:02:49 1985
Date-Received: Sat, 13-Jul-85 12:11:38 EDT
Sender: news@brl-tgr.ARPA
Lines: 35


   i am in the (very) early stages of some modifications to the portable
("machine-independent part") of the Unix C compiler.  Actually, for reasons
already hashed out locally, the changes will be implemented as a filter
inserted between the pre-processor and the compiler.  This filter must
recognize a number of new storage classes, scoping of variables, etc., and
thus must be in effect a compiler-sans-code-generator.

   i have been digging around in the compiler source to try to understand
the data structures used, symbol table access, and all that rot but
reading lex/yacc generated code with such a proliferation of global
variables is difficult at best.

   If anyone who is familiar with the compiler source could help on this,
it would be sure to save a great deal of time and coffee.  What i need to
do isn't that complicated :

    Having built in a new storage class (say, CLASS_3),
	1.  Parse the program, noting when a variable of class CLASS_3
		is referenced (for either read OR write)
	2.  Replace the variable reference with a pre-defined macro expansion
	3.  Copy all other text onto the output stream

   Of course, there will be a little footwork required to generate/copy text
while working at both the character and token levels, but that's not all
that difficult.

   As i doubt that the rest of the folks on the net would be interested in
replies to this posting, you can respond directly to me.


						ThanX,

						Neville D. Newman
						newman@umass-cs	  (CSnet)