X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/e895be217c3be6769708da17c9ae87cb22db040e..4b3a72700ae8799ba6ba07969e2677f2168d32a9:/doc/syntax.tex

diff --git a/doc/syntax.tex b/doc/syntax.tex
index 72329a4..6c05acc 100644
--- a/doc/syntax.tex
+++ b/doc/syntax.tex
@@ -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}
