\chapter{Foreword}

This document describes the syntax of COBOL as supported by GnuCOBOL. It is hoped it will complement Gary Cutler and Vincent Coen's \textit{GnuCOBOL Programmer's Guide} which (currently) does not document recent features added to GnuCOBOL. This document is also formatted in \LaTeX, so that everything looks a bit prettier.

The syntax diagrams were transcribed from GnuCOBOL's parsers. It thus replicates some unusual syntax rules and misses some syntax rules implemented outside the parser. For example, the obsolete identification division comment paragraphs are allowed in any order and the syntax of \hyperref[file-control-entry]{a file-control entry} does not distinguish between SEQUENTIAL, INDEXED and RELATIVE organisations.

This is a draft and so has many flaws. If people find this document useful, I
will try to fix these shortcomings.

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