Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!pwa-b!mmintl!franka From: franka@mmintl.UUCP (Frank Adams) Newsgroups: net.lang.c Subject: Re: using indentation rather than braces Message-ID: <1484@mmintl.UUCP> Date: Tue, 20-May-86 19:05:03 EDT Article-I.D.: mmintl.1484 Posted: Tue May 20 19:05:03 1986 Date-Received: Fri, 23-May-86 23:56:52 EDT References: <501@brl-smoke.ARPA> <797@bentley.UUCP> <287@euclid.warwick.UUCP> <301@nbs-amrf.UUCP> <968@umd5.UUCP> Reply-To: franka@mmintl.UUCP (Frank Adams) Organization: Multimate International, E. Hartford, CT Lines: 22 In article <968@umd5.UUCP> zben@umd5.UUCP (Ben Cranston) writes: > >Forgive me if this is too obvious to mention, but it seems to me that using >the indentation information makes life much harder for programs like YACC >and LEX that act by creating C source code. Now they have to keep track of >what column they are outputting to... This isn't all that hard. Such programs must implicitly keep track of depth, frequently by recursion. Adding the additional machinery to make this explicit is not bad. One global variable, and update it every time you enter or exit a block in the generated code. >I just remember doing some assembly macros that tried to make their >expansion obvious by "display"ing the code they were generating to the >listing before actually generating it. There was real gore in getting the >columns lined up right, and in getting meaningful comments... Dealing with such issues in the macro processing portion of an assembler is another matter entirely. Frank Adams ihnp4!philabs!pwa-b!mmintl!franka Multimate International 52 Oakland Ave North E. Hartford, CT 06108