\begin{diagram}{Record types}{recordtypes}
\begin{mysyntdiag}
\synt{record\ type} \begin{stack}\\ \lit*{packed} \end{stack} \lit*{record}
\begin{stack}\\ \synt{field\ list} \end{stack} \lit*{end}
\end{mysyntdiag}
\begin{mysyntdiag}
\synt{field\ list} 
\begin{stack} 
\synt{fixed\ fields} \\
\begin{stack}\\ \synt{fixed\ fields} \lit*; \end{stack}  \synt{variant\ part}
\end{stack}
\begin{stack}\\ \lit*; \end{stack}
\end{mysyntdiag}
\begin{mysyntdiag}
\synt{fixed\ fields} 
\begin{rep}[b] \synt{identifier\ list} \lit*: \synt{type} \\ \lit*; \end{rep}
\end{mysyntdiag}
\begin{mysyntdiag}
\synt{variant\ part} 
\lit*{case}
\begin{stack}\\ \synt{identifier} \lit*: \end{stack} 
\synt{ordinal\ type\ identifier} 
\lit*{of} \begin{rep}[b] \synt{variant} \\ \lit*; \end{rep}
\end{mysyntdiag}
\begin{mysyntdiag}
\synt{variant} \begin{rep}[b] \synt{constant} \lit*, \end{rep} 
\lit*: \lit*( \begin{stack}\\ \synt{field\ list} \end{stack} \lit*)
\end{mysyntdiag}
\end{diagram}
