[self-interest] Self grammar

Jecel Assumpcao Jr jecel at merlintec.com
Sun Nov 5 22:10:13 UTC 2000

On Sun, 05 Nov 2000, Douglas Atique wrote:
> Hello, Jecel; hello, all.
> I have been following the posts without much time to devote to Self, recently.

You didn't send this to the list, but I am sending this reply there
since it sounded like you meant to.

> > > Can Mango do the job ?
> > 
> > I don't think so - Mango needs a structured grammar that it can
> > translate into a LR(1), LALR(1) or SLR(1) parse table (I once used to
> > know what these were ;-) and you can't write one for Self.
> Why? Can you give more details? I am curious about these language
> and parsing issues. Is Self unsuitable for bottom-up parsing?
> Sorry if this may be off-topic...

Like I said, it has been a long time since I knew what LR(1) (left
recursive with 1 level of look ahead?) and friends are. Ok, with the
web there is no excuse for this:
http://lambda.uta.edu/cse5317/notes/node17.html or

So LR is Left to right, produce Reverse of right derivation. "S" is for
"simple" and "LA" is for "Look Ahead".

Looking back the the archives for the old self-interest list, I see
that I posted the grammar for tinySelf 0 on 9 June 1994 and the Mango
grammar on 20 December 1995. I expressed my opinion then that Self
didn't have a LR grammar and it seems that nobody contradicted me.

It seems that my impression was caused by the need to look ahead
various tokens in order to handle the implicit receivers in tinySelf 0.
This was a very ugly hack to an otherwise clean recursive descent

The Self 3.0 grammar for Mango was never tested (or even finished), but
if it works then clearly what I said about Self syntax was wrong.

-- Jecel

More information about the Self-interest mailing list