<html>
At 11:43 AM 3/3/2003 +0100, Stephane Ducasse wrote:<br>
<blockquote type=cite class=cite cite>...<br>
Alan (I know that you are busy) but what would be your point items for
such a list.<br><br>
<br>
I think that having such a list is important for the people such as Avi
that could use<br>
a much more declarative syntax for DVS.<br><br>
Stef</blockquote><br>
It's basically all laid out in the ANSI Smalltalk document.&nbsp; ANSI
Smalltalk defines an EBNF abstract grammar for all the declarative
program elements. I've summarized the grammar below.&nbsp; Note that
symbols enclosed in double angle brackets &lt;&lt;&gt;&gt; are elements
of the abstract program grammar while symbols enclosed in single angle
brackets are elements of the concrete method syntax grammar. <br><br>
&lt;&lt;Smalltalk program&gt;&gt; ::= &lt;&lt;program element&gt;&gt;+
&lt;&lt;<i>initialization ordering</i>&gt;&gt;<br>
&lt;&lt;program element&gt;&gt; ::=&nbsp; &lt;&lt;class
definition&gt;&gt; |<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&lt;&lt;global
definition&gt;&gt; |<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&lt;&lt;pool&nbsp;
definition&gt;&gt; |<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&lt;&lt;program
initializer definition&gt;&gt;<br><br>
&lt;&lt;class definition&gt;&gt;::=<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&lt;&lt;class
name&gt;&gt; [&lt;&lt;superclass name&gt;&gt;]<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>[&lt;&lt;instance
state&gt;&gt;]<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>[&lt;&lt;class
instance variable names&gt;&gt;]<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>[&lt;&lt;class
variable names&gt;&gt;]<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>[&lt;&lt;imported
pool names&gt;&gt;] <br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>[&lt;&lt;instance
methods&gt;&gt;]<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>[&lt;&lt;class
methods&gt;&gt;]<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>[&lt;&lt;class
initializer&gt;&gt;]<br>
&lt;&lt;class name&gt;&gt; ::= identifier<br>
&lt;&lt;superclass name&gt;&gt; ::= identifier<br>
&lt;&lt;instance state&gt;&gt; :=<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&lt;&lt;<i>byte
indexable</i>&gt;&gt; |<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>[&lt;&lt;<i>object
indexable</i>&gt;&gt;]&nbsp; &lt;&lt;instance variables
names&gt;&gt;<br>
&lt;&lt;instance variables names&gt;&gt; ::= identifier*<br>
&lt;&lt;class instance variable names&gt;&gt; ::= identifier*<br>
&lt;&lt;class variable names&gt;&gt; ::= identifier*<br>
&lt;&lt;imported pool names&gt;&gt; ::= identifier*<br>
&lt;&lt;instance methods&gt;&gt; ::= &lt;method definition&gt;*<br>
&lt;&lt;class methods&gt;&gt; ::= &lt;method definition&gt;*<br>
&lt;&lt;class initializer&gt;&gt; ::= &lt;initializer
definition&gt;<br><br>
&lt;&lt;global definition&gt;&gt; ::=<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>[&lt;&lt;<i>constant
designator</i>&gt;&gt;] &lt;&lt;global name&gt;&gt; [&lt;&lt;variable
initializer&gt;&gt;]<br>
&lt;&lt;global name&gt;&gt; ::= identifier<br>
&lt;&lt;variable initializer&gt;&gt; ::= &lt;initializer
definition&gt;<br><br>
&lt;&lt;pool definition&gt;&gt;&nbsp; ::= &lt;&lt;pool name&gt;&gt;
&lt;&lt;pool variable definition&gt;&gt;*<br>
&lt;&lt;pool name&gt;&gt; ::= identifier<br>
&lt;&lt;pool variable definition&gt;&gt;&nbsp; ::=<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>[&lt;&lt;<i>constant
designator</i>&gt;&gt; &lt;&lt;pool variable name&gt;&gt;
[&lt;&lt;variable initializer&gt;&gt;]<br>
&lt;&lt;pool variable name&gt;&gt; ::= identifier<br><br>
&lt;&lt;program initializer definition &gt;&gt; ::= &lt;initializer
definition&gt;<br><br>
ANSI Smalltalk does not mandate a specific concrete syntax for the
program grammar.&nbsp; However, it does provide one (generally referred
to as SIF) that can be used as an interchange format.&nbsp; Not at all
coincidentally, this format looks a whole lot like traditional chunk file
file-in format.<br><br>
There are only a few things I should mention over and above what's in the
ANSI Smalltalk specification. First, initialization expressions and a
well defined initialization order are quite important.&nbsp; Otherwise,
you can't expect to have predictably repeatable results. The ANSI
standard says that the initialization order needs to be explicitly
specified but any other repeatable technique (for example Java's
initialize on first use rule) would be fine. The ANSI standard provides
for initializers and constant designators for global and pool variables
but does not have them for class variables. Class variables really should
have them, too.&nbsp; Instance variables are really different beasts and
probably can tolerate the lack of&nbsp; initialization
semantics.<br><br>
Finally, I would expect that the work by various people to create SIF
readers and especially Joseph Pelrine ModSqueak work would be valuable
starting points.<br><br>
Allen Wirfs-Brock<br><br>
<br>
<br>
</html>