edu.vub.at.objects.grammar
Interface DefTable


 DefTable

The public interface to a table definition AG element. Example: def tab[size] { init } where tab is a literal symbol and size has to evaluate to a number. The init expression is evaluated size times.

Author:
tvc

Method Summary
 Begin initializer()
          The initializer is at least one expression and may be a sequence of expressions Example: `{ def tab[5] { m() } }.statements[1].initializer == `{ m() }
 Symbol name()
          The name of the table must be a literal symbol Example: `{ def tab[5] { m() } }.statements[1].name == `tab
 Expression sizeExpression()
          The size may be any valid AmbientTalk expression that evaluates to a number Example: `{ def tab[5] { m() } }.statements[1].sizeExpression == `5
 
Methods inherited from interface edu.vub.at.objects.AbstractGrammar
freeVariables
 
Methods inherited from interface edu.vub.at.objects.Object
super
 

Method Detail

name

Symbol name()
The name of the table must be a literal symbol Example: `{ def tab[5] { m() } }.statements[1].name == `tab

Returns:
the name of the table

sizeExpression

Expression sizeExpression()
The size may be any valid AmbientTalk expression that evaluates to a number Example: `{ def tab[5] { m() } }.statements[1].sizeExpression == `5

Returns:
the size expression

initializer

Begin initializer()
The initializer is at least one expression and may be a sequence of expressions Example: `{ def tab[5] { m() } }.statements[1].initializer == `{ m() }

Returns:
the initializer