\begin{diagram}{object types}{objecttype}
\begin{mysyntdiag}
\begin{stack}\\ \lit*{packed} \end{stack}
\lit*{object} 
\begin{stack}\\ heritage \end{stack}
\begin{stack}\\ 
\begin{rep}[b]
  \synt{component\ list} \\ 
  \synt{object\ visibility\ specifier} 
\end{rep}
\end{stack}
\lit*{end}
\end{mysyntdiag}
\begin{mysyntdiag}
\synt{heritage} \lit*( \synt{object\ type\ identifier} \lit* )
\end{mysyntdiag}
\begin{mysyntdiag}
\synt{component\ list} 
\begin{stack}\\ \begin{rep}[b] \synt{field\ definition} \\ \end{rep} \end{stack}
\begin{stack}\\ \begin{rep}[b] \synt{method\ definition} \\ \end{rep} \end{stack}
\end{mysyntdiag}
\begin{mysyntdiag}
\synt{field\ definition} \synt{identifier\ list} \lit*: \synt{type} \lit*;
\end{mysyntdiag}
\begin{mysyntdiag}
\synt{method\ definition} 
\begin{stack} 
\synt{function\ header} \\
\synt{procedure\ header} \\
\synt{constructor\ header} \\
\synt{desctuctor\ header}
\end{stack}
\lit*{;} \synt{method\ directives} 
\end{mysyntdiag}
\begin{mysyntdiag}
\synt{method\ directives}
\begin{stack}\\ \lit*{virtual} \lit*{;} \end{stack}
\begin{stack}\\ \lit*{abstract} \lit*{;} \end{stack}
\begin{stack}\\ \synt{call\ modifiers} \lit*{;} \end{stack}
\end{mysyntdiag}
\begin{mysyntdiag}
\synt{object\ visibility\ specifier}
\begin{stack} 
\lit*{private} \\
\lit*{protected} \\
\lit*{public}
\end{stack}
\end{mysyntdiag}
\end{diagram}
