Previous: An Extended Example, Up: GNAT Project Manager


11.17 Project File Complete Syntax

     project ::=
       context_clause project_declaration
     
     context_clause ::=
       {with_clause}
     
     with_clause ::=
       with path_name { , path_name } ;
     
     path_name ::=
        string_literal
     
     project_declaration ::=
       simple_project_declaration | project_extension
     
     simple_project_declaration ::=
       project <project_>simple_name is
         {declarative_item}
       end <project_>simple_name;
     
     project_extension ::=
       project <project_>simple_name  extends path_name is
         {declarative_item}
       end <project_>simple_name;
     
     declarative_item ::=
       package_declaration |
       typed_string_declaration |
       other_declarative_item
     
     package_declaration ::=
       package_spec | package_renaming
     
     package_spec ::=
       package package_identifier is
         {simple_declarative_item}
       end package_identifier ;
     
     package_identifier ::=
       Naming | Builder | Compiler | Binder |
       Linker | Finder  | Cross_Reference |
       gnatls | IDE     | Pretty_Printer
     
     package_renaming ::==
       package package_identifier renames
            <project_>simple_name.package_identifier ;
     
     typed_string_declaration ::=
       type <typed_string_>_simple_name is
        ( string_literal {, string_literal} );
     
     other_declarative_item ::=
       attribute_declaration |
       typed_variable_declaration |
       variable_declaration |
       case_construction
     
     attribute_declaration ::=
       full_associative_array_declaration |
       for attribute_designator use expression ;
     
     full_associative_array_declaration ::=
       for <associative_array_attribute_>simple_name use
       <project_>simple_name [ . <package_>simple_Name ] ' <attribute_>simple_name ;
     
     attribute_designator ::=
       <simple_attribute_>simple_name |
       <associative_array_attribute_>simple_name ( string_literal )
     
     typed_variable_declaration ::=
       <typed_variable_>simple_name : <typed_string_>name :=  string_expression ;
     
     variable_declaration ::=
       <variable_>simple_name := expression;
     
     expression ::=
       term {& term}
     
     term ::=
       literal_string |
       string_list |
       <variable_>name |
       external_value |
       attribute_reference
     
     string_literal ::=
       (same as Ada)
     
     string_list ::=
       ( <string_>expression { , <string_>expression } )
     
     external_value ::=
       external ( string_literal [, string_literal] )
     
     attribute_reference ::=
       attribute_prefix ' <simple_attribute_>simple_name [ ( literal_string ) ]
     
     attribute_prefix ::=
       project |
       <project_>simple_name | package_identifier |
       <project_>simple_name . package_identifier
     
     case_construction ::=
       case <typed_variable_>name is
         {case_item}
       end case ;
     
     case_item ::=
       when discrete_choice_list =>
           {case_construction | attribute_declaration}
     
     discrete_choice_list ::=
       string_literal {| string_literal} |
       others
     
     name ::=
       simple_name {. simple_name}
     
     simple_name ::=
       identifier (same as Ada)