A program unit is a group of ALGOL constructs that can be compiled as a whole. The following diagram shows the elements that can be included in an ALGOL program.
<program unit>
──┬─<block>──────────────┬─. ─────────────────────┬───────────────────┤ ├─<compound statement>─┤ │ ├─<level 2 procedure>──┘ │ │ ┌◄───────── ; ─────────┐ │ ├───────────────┬─┴─<separate procedure>─┴─┬─ . ─┤ └─<global part>─┘ └─ ; ─┘
<block>
── BEGIN ──<declaration list>──; ──<statement list>── END ────────────┤
<declaration list>
┌◄────── ; ─────┐ ──┴─<declaration>─┴────────────────────────────────────────────────────┤
<statement list>
┌◄───── ; ────┐ ──┴─<statement>─┴──────────────────────────────────────────────────────┤
<compound statement>
── BEGIN ──<statement list>── END ─────────────────────────────────────┤
<level 2 procedure>
──<procedure declaration>──────────────────────────────────────────────┤
<global part>
── [ ──<declaration list>── ] ─────────────────────────────────────────┤
<separate procedure>
──<procedure declaration>──────────────────────────────────────────────┤

