next up previous contents
Next: Binding Up: Evaluation Rules Previous: Id   Contents

List

<

List       ::= < Expr*, >

The use of <, > as both binary operators and list delimiters makes the grammar ambiguous. Section A.4.2 explains how the ambiguity is resolved.

<

$\mbox{\tt <} \mbox{Expr}_1, \ldots, \mbox{Expr}_n \mbox{\tt >}$ desugars to $\mbox{\tt <} \mbox{Expr}_1 \mbox{\tt >} \;\mbox{\tt +}\;
\mbox{\tt <} \mbox{Expr}_2, \ldots, \mbox{Expr}_n \mbox{\tt >}$

Here, `+' is the concatenation operator on lists.

<

Eval( <>       , C) = emptylist
Eval( < Expr > , C) = _list1(Eval( Expr , C))

As defined in Section A.3.4.4, _list1(val) evaluates to a list containing the single value val.



Allan Heydon, Roy Levin, Timothy Mann, Yuan Yu