Next: , Previous: Basic Syntax, Up: Project File Syntax

10.3.2 Packages

A project file may contain packages. The name of a package must be one of the identifiers (case insensitive) from a predefined list, and a package with a given name may only appear once in a project file. The predefined list includes the following packages:

(The complete list of the package names and their attributes can be found in file prj-attr.adb).

In its simplest form, a package may be empty:

     project Simple is
       package Builder is
       end Builder;
     end Simple;

A package may contain attribute declarations, variable declarations and case constructions, as will be described below.

When there is ambiguity between a project name and a package name, the name always designates the project. To avoid possible confusion, it is always a good idea to avoid naming a project with one of the names allowed for packages or any name that starts with gnat.