Ада-95. Компилятор GNAT

       

Диаграмма полного синтаксиса файлов проектов


В заключение обсуждения средств управления проектами системы компилятора GNAT, приведем диаграмму полного синтаксиса файлов проектов, которая непосредственно позаимствована из сопроводительной документации GNAT:

project ::= context_clause project_declaration

context_clause ::= {with_clause}

with_clause ::= with literal_string { , literal_string } ;

project_declaration ::= project simple_name [ extends literal_string ] is

{declarative_item} end simple_name;

declarative_item ::= package_declaration | typed_string_declaration | other_declarative_item

package_declaration ::= package simple_name package_completion

package_completion ::= package_body | package_renaming

package body ::= is

{other_declarative_item} end simple_name ;

package_renaming ::== renames simple_name.simple_name ;

typed_string_declaration ::= type _simple_name is

( literal_string {, literal_string} );

other_declarative_item ::= attribute_declaration | typed_variable_declaration | variable_declaration | case_construction

attribute_declaration ::= for attribute use expression ;

attribute ::= simple_name | simple_name ( literal_string )

typed_variable_declaration ::= simple_name : name := string_expression ;

variable_declaration ::= simple_name := expression;

expression ::= term {& term}

term ::= literal_string | string_list | name | external_value | attribute_reference

literal_string ::= (same as Ada)

string_list ::= ( expression { , expression } )

external_value ::= external ( literal_string [, literal_string] )

attribute_reference ::= attribute_parent ' simple_name [ ( literal_string ) ]

attribute_parent ::= project | simple_name | simple_name . simple_name

case_construction ::= case name is

{case_item} end case ;

case_item ::= when discrete_choice_list => {case_construction | attribute_declaration}

discrete_choice_list ::= literal_string {| literal_string}

name ::= simple_name {. simple_name}

simple_name ::= identifier (same as Ada)

Copyright (C) А.Гавва V-0.4w май 2004



Содержание раздела