Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!necntc!ima!johnl From: johnl@ima.UUCP Newsgroups: comp.compilers Subject: Re: Algol 68 Message-ID: <675@ima.ISC.COM> Date: Wed, 19-Aug-87 17:02:27 EDT Article-I.D.: ima.675 Posted: Wed Aug 19 17:02:27 1987 Date-Received: Sat, 22-Aug-87 06:17:13 EDT References: <646@ima.ISC.COM> <648@ima.ISC.COM> Sender: johnl@ima.ISC.COM Reply-To: harvard!rutgers!petsd!cjh Organization: Perkin-Elmer DSG, Tinton Falls, N.J. Lines: 41 Approved: compilers@ima.UUCP In-Reply-To: <652@ima.ISC.COM> In article <652@ima.ISC.COM> Stanley Shebs writes: >Two-level grammars have the same problem that attribute grammars do - >they are based on the belief that the world is linear strings of tokens. >Sooner or later, simple grammars don't work, so people have introduced >some pretty bizarre schemes to patch things up. (My first response to >attribute grammars was the word "kludge".) It has always seemed to me that attribute grammars, based as they are on the parse tree, are a step up from linear strings of tokens. My two complaints about AG are: 1) Because they generate long-distance dependencies (e.g. the type of an identifier depends on a declaration, *somewhere*) the evaluation is expensive (without optimizing tricks). 2) Attribute evaluator generators that I have seen have been too closely tied to particular languages. For instance, one that I know of generates a monolithic Pascal program. Suppose you would prefer Modula 2, in several compilation units, or Ada, or C...? Too bad. Can someone propose an alternative to attribute grammars, as a way to specify context-sensitive syntax in a form suitable for machine processing? I would be interested to know. The answer doesn't have to solve the *whole* problem of compilation; if you can bite off a substantial chunk, that's worth while. Regards, Chris -- Full-Name: Christopher J. Henrich UUCP: ...!hjuxa!petsd!cjh US Mail: MS 313; Concurrent Computer Corporation; 106 Apple St; Tinton Falls, NJ 07724 Phone: (201) 758-7288 Concurrent Computer Corporation is a Perkin-Elmer company. -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.ARPA Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | cca}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request