|Algol 68 think!mit-eddie!cullvax!drw (1987-04-22)|
|Re: Algol 68 firstname.lastname@example.org (1987-08-13)|
|Re: Algol 68 harvard!ut-sally!utah-cs!shebs (1987-08-14)|
|Re: Algol 68 email@example.com (1987-08-15)|
|Re: Algol 68 harvard!rutgers!petsd!cjh (1987-08-19)|
|Re: Algol 68 harvard!seismo!mcvax!doc.ic.ac.uk!cdsm (Chris Moss) (1987-08-26)|
|Date:||Wed, 19 Aug 87 17:02:27 EDT|
|Organization:||Perkin-Elmer DSG, Tinton Falls, N.J.|
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...?
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.
Full-Name: Christopher J. Henrich
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.
Return to the
Search the comp.compilers archives again.