Re: Algol 68

harvard!ut-sally!utah-cs!shebs (Stanley Shebs)
Fri, 14 Aug 87 10:00:26 MDT

          From comp.compilers

Related articles
Algol 68 think!mit-eddie!cullvax!drw (1987-04-22)
Re: Algol 68 (1987-08-13)
Re: Algol 68 harvard!ut-sally!utah-cs!shebs (1987-08-14)
Re: Algol 68 harvard!seismo!calgary!alberta!myrias!cmt@husc6.ha (1987-08-15)
Re: Algol 68 harvard!rutgers!petsd!cjh (1987-08-19)
Re: Algol 68 harvard!seismo!mcvax!!cdsm (Chris Moss) (1987-08-26)
| List of all articles for this month |

Date: Fri, 14 Aug 87 10:00:26 MDT
From: harvard!ut-sally!utah-cs!shebs (Stanley Shebs)
Newsgroups: comp.compilers
References: <646@ima.ISC.COM> <648@ima.ISC.COM>
From: harvard!ut-sally!utah-cs!shebs (Stanley Shebs)
Organization: PASS Research Group

In article <648@ima.ISC.COM> (Steven Pemberton) writes:
>On the subject of two-level grammars, it seems to me a pity that they
>receive so little attention. They use an extremely simple mechanism,
>and are as powerful as a Turing machine, so you can define the syntax,
>context conditions, and semantics with the one formalism. Again I
>blame the rather heavy style of the Algol 68 report for giving them a
>bad name. For instance, if they'd only used ROWS-OPTION instead of
>ROWSETY to indicate an optional ROWS, it would have made it much
>easier reading.

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".) The schemes inevitably go all
the way to Turing equivalence, which should be a warning signal that
you're no longer dealing with strings of tokens, except in a purely
formal sense, and that other general computational mechanisms are worth
thinking about (recursive functions, logic, term rewriting, etc).

Of course, the fact that I've been hacking Lisp for the past five years
has nothing to do with this view of grammars. :-)

stan shebs

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.