Static instance support.
[sod] / doc / syntax.tex
index dd6a5f5..6c05acc 100644 (file)
@@ -710,6 +710,27 @@ preprocessor directives in order to declare types and functions for use
 elsewhere in the generated output files.
 
 
+\subsection{Static instance definitions} \label{sec:syntax.module.instance}
+
+\begin{grammar}
+<static-instance-definition> ::=
+  "instance" <identifier> <identifier>
+  @[":" <list>$[\mbox{@<instance-initializer>}]$@] ";"
+
+<instance-initializer> ::= <identifier> "." <identifier> "=" <c-fragment>
+\end{grammar}
+
+Properties:
+\begin{description}
+\item[@"extern"] A boolean flag: if true, then the instance is public, and
+  will be declared in the output header file; if false (the default), then
+  the instance is only available to code defined within the module.
+\item[@"const"] A boolean flag: if true (the default), then the instance is
+  read-only, and may end up in write-protected storage at run-time; if false,
+  then the instance will be writable.
+\end{description}
+
+
 \subsection{Class definitions} \label{sec:syntax.module.class}
 
 \begin{grammar}
@@ -903,6 +924,9 @@ Properties:
 \begin{description}
 \item[@|message_class|] A symbol naming the Lisp class to use to represent
   the message.
+\item[@|readonly|] A boolean indicating whether the message guarantees not to
+  modify its receiver.  If this is true, the receiver will be declared
+  @"const".
 \item[@|combination|] A keyword naming the aggregating method combination to
   use.
 \item[@|most_specific|] A keyword, either @`first' or @`last', according to