Jump to content

Annotated King Reference Manual/Program Structure

From Wikibooks, open books for an open world

Compilation Units

[edit | edit source]

Examples

[edit | edit source]

-

Syntax

[edit | edit source]
compilation ::= {compilation_unit}

compilation_unit ::=
            context_clause library_item
          | context_clause subunit

library_item ::=
            [hidden] library_unit_declaration
          | library_unit_body
          | [hidden] library_unit_renaming_declaration

library_unit_declaration ::=
            module_declaration
          | macro_declaration
          | macro_expansion

library_unit_renaming_declaration ::=
            module_renaming_declaration
          | macro_renaming_declaration

library_unit_body ::= subprogram_body | module_body

subunit ::= separate parent_unit_name . proper_body

context_clause ::= {context_item}

context_item ::= use_clause

use_clause ::= use library_unit_name;

Rationale

[edit | edit source]

At library level, subprogram_body shall be only procedure.

Discussions

[edit | edit source]

-