X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/4307347660f48628e307f299eb4fac58ba35fd1a..a42893dda5f4dd2b89fbfe4e497da261159225ca:/doc/syntax.tex diff --git a/doc/syntax.tex b/doc/syntax.tex index 1090262..b18acd5 100644 --- a/doc/syntax.tex +++ b/doc/syntax.tex @@ -585,6 +585,7 @@ class Sub : Super { ::= \alt +\alt \alt \alt \end{grammar} @@ -664,7 +665,7 @@ class Example : Super { ::= "=" - :: "{" "}" | + :: \end{grammar} An @ provides an initial value for one or more slots. If @@ -675,15 +676,12 @@ The first component of the @ must be the nickname of one of the class's superclasses (including itself); the second must be the name of a slot defined in that superclass. -The initializer has one of two forms. -\begin{itemize} -\item A @ enclosed in braces denotes an aggregate initializer. - This is suitable for initializing structure, union or array slots. -\item A @ \emph{not} beginning with an open brace is a `bare' - initializer, and continues until the next @`,' or @`;' which is not within - nested brackets. Bare initializers are suitable for initializing scalar - slots, such as pointers or integers, and strings. -\end{itemize} +\subsubsection{Fragment items} +\begin{grammar} + ::= "{" "}" + + ::= "init" | "teardown" +\end{grammar} \subsubsection{Message items} \begin{grammar}