[self-interest] Re: Quick question on Self Grammar

Dru Nelson dnelson at redwoodsoft.com
Thu Dec 10 23:06:30 UTC 1998


Hi,

  This does answer the questions. However, what I really was
  trying to find out (what I should have asked), was how
  does this correspond to the grammar mentioned in the programmers
  guide. I'm thinking from a parsing point of view.

  Is this a correct parse?
  doIt.
  expression.
  unary-message.
  receiver smallcap-keyword.
  [expression] smallcap-keyword.
  null smallcap-keyword.

  In essence, most of the messages parse a null
  as the receiver.

> Dru Nelson wrote:
> > 
> > I was reading the self grammar. Am I right in
> > assuming that...
> >   doIt.
> >   or a:
> >   setSlot: 'x' With: doIt.
> > 
> > works, by having the receiver of the unary message
> > doIt (which is probably a slot), is parsed as a
> > null token for each of these expressions. Which
> > would imply the default 'self' :-) as the receiver?
> > 
> > Just a quick check,
> 
> I am not sure if this is what you are asking, but typing
> 
>     doIt
> 
> at the prompt (or in an evaluator in the graphical user interface)
> is indeed parsed as the unary message 'doIt' sent implicitly to
> 'self', which in the case of the prompt is the shell object and
> in the case of an evaluator it is the object represented by the
> outliner the evaluator is in. I'll indicate this by writing it as
> 
>    <self> doIt
> 
> ok? The expression
> 
>    setSlot: 'x' With: doIt.
> 
> would mean
> 
>    <self> selfSlot: 'x' With: (<self> doIt).
> 
> Here the 'doIt' message is sent to 'self' (shell or object represented
> by outliner) and the result of this is used as an argument (along with
> the string object 'x') to the 'selfSlot:With:' message that is also
> sent to 'self'.
> 
> I think I just repeated what you had already written, but if that is
> what you were asking then I hope I've confirmed your impression.
> 
> -- Jecel
> 
> 
> ------------------------------------------------------------------------
> Great gifts for the Holidays or birthdays or anyday for that matter
> Bugs Life action game, Thanksgiving Pooh, Disney videos, toys and CD-ROMs
> http://ads.egroups.com/click/145/1
> 
> Free Web-based e-mail groups -- http://www.eGroups.com
> 
> 
------------------------------------------------------------------------
Free Web-based e-mail groups -- http://www.eGroups.com




More information about the Self-interest mailing list