\chapter{Identification division}

\newcommand{\commenttext}{\metaelement{comment-text}}

\begin{syntax}
  \begin{0-1}
    \begin{1=}
      \key{IDENTIFICATION} \\
      \miscext{\key{ID}}
    \end{1=}
    DIVISION.
  \end{0-1}
  \newline
  \begin{1=}
    \metaelement{function-id-paragraph} \\
    \metaelement{program-id-paragraph}
  \end{1=}
  \newline
  \begin{0-1}
    \metaelement{options-paragraph} % TO-DO: Can this be mixed up with the comment paragraphs?
  \end{0-1}
  \newline
  \deleted{
    \begin{0+}
      \key{AUTHOR}. \commenttext. \\
      \key{DATE-WRITTEN}. \commenttext. \\
      \key{DATE-MODIFIED}. \commenttext. \\
      \key{DATE-COMPILED}. \commenttext. \\
      \key{INSTALLATION}. \commenttext. \\
      \key{REMARKS}. \commenttext. \\
      \key{SECURITY}. \commenttext. \\
    \end{0+} \gnucobol{\ldots}
  }
\end{syntax}

\subsubsection{Syntax rules}

\subsubsection{General rules}

\section{PROGRAM-ID paragraph}

\begin{syntax}
  \key{PROGRAM-ID}.
  \begin{1=}
    \metaelement{program-name-1} \\
    \literal
  \end{1=}
  \begin{0-1} \key{AS} \literal \end{0-1}

  \begin{0-1} IS
    \begin{1=}
      \begin{1+}
        \key{COMMON} \\

        \begin{1=}
          \key{INITIAL} \\
          \key{RECURSIVE} \\
          \pending{\miscext{\key{RESIDENT}}}
        \end{1=}
      \end{1+}
      PROGRAM \\

      \pending{
        \begin{1=}
          \key{PROTOTYPE} \\
          \miscext{\key{EXTERNAL} PROGRAM}
        \end{1=}
      }
    \end{1=}
  \end{0-1}.
\end{syntax}

\subsubsection{Syntax rules}

\subsubsection{General rules}

\section{FUNCTION-ID paragraph}

\begin{syntax}
  \key{FUNCTION-ID}.
  \begin{1=}
    \functionname \\
    \literal
  \end{1=}
  \begin{0-1} \key{AS} \literal \end{0-1}.
\end{syntax}

\subsubsection{Syntax rules}

\subsubsection{General rules}

\section{OPTIONS paragraph}

\begin{syntax}
  \key{OPTIONS}.

  \begin{0-1}
    \key{ARITHMETIC} IS
    \begin{1=}
      \key{NATIVE} \\
      \pending{\key{STANDARD}} \\
      \obsolete{\pending{\key{STANDARD-BINARY}}} \\
      \obsolete{\pending{\key{STANDARD-DECIMAL}}} \\
      \gnucobol{\key{OSVS}}
    \end{1=}
  \end{0-1}

  \begin{0-1}
    \key{DEFAULT} \key{ROUNDED} MODE IS
    \begin{1=}
      \key{AWAY-FROM-ZERO} \\
      \key{NEAREST-AWAY-FROM-ZERO} \\
      \key{NEAREST-EVEN} \\
      \key{NEAREST-TOWARD-ZERO} \\
      \key{PROHIBITED} \\
      \key{TOWARD-GREATER} \\
      \key{TOWARD-LESSER} \\
      \key{TRUNCATION}
    \end{1=}
  \end{0-1}

  \begin{0-1}
    \key{ENTRY-CONVENTION} IS
    \begin{1=}
      \key{COBOL} \\
      \key{EXTERN} \\
      \key{STDCALL}
    \end{1=}
  \end{0-1}

  \pending{
    \begin{0-1}
      \key{INTERMEDIATE} \key{ROUNDING} IS
      \begin{1=}
        \key{NEAREST-AWAY-FROM-ZERO} \\
        \key{NEAREST-EVEN} \\
        \key{PROHIBITED} \\
        \key{TRUNCATION}
      \end{1=}
    \end{0-1}
  }.
\end{syntax}

\subsubsection{Syntax rules}

\subsubsection{General rules}


%%% Local Variables:
%%% mode: latex
%%% TeX-master: "grammar.tex"
%%% End:
