Grammar corrected by Vadim Zaytsev, see the Grammar Zoo entry for details: ada/ada95/kempe/corrected
Source used for this grammar: Magnus Kempe, Ada 95 Reference Manual, Hypertext version, 1994–1997 [TOC] [Annex]
character
, graphic_character
, identifier
, letter_or_digit
, numeric_literal
, decimal_literal
, numeral
, exponent
, based_literal
, base
, based_numeral
, extended_digit
, character_literal
, string_literal
, string_element
, comment
, pragma
, pragma_argument_association
, basic_declaration
, defining_identifier
, type_declaration
, full_type_declaration
, type_definition
, subtype_declaration
, subtype_indication
, subtype_mark
, constraint
, scalar_constraint
, composite_constraint
, object_declaration
, defining_identifier_list
, number_declaration
, derived_type_definition
, range_constraint
, range
, enumeration_type_definition
, enumeration_literal_specification
, defining_character_literal
, integer_type_definition
, signed_integer_type_definition
, modular_type_definition
, real_type_definition
, floating_point_definition
, real_range_specification
, fixed_point_definition
, ordinary_fixed_point_definition
, decimal_fixed_point_definition
, digits_constraint
, array_type_definition
, unconstrained_array_definition
, index_subtype_definition
, constrained_array_definition
, discrete_subtype_definition
, component_definition
, index_constraint
, discrete_range
, discriminant_part
, unknown_discriminant_part
, known_discriminant_part
, discriminant_specification
, default_expression
, discriminant_constraint
, discriminant_association
, record_type_definition
, record_definition
, component_list
, component_item
, component_declaration
, variant_part
, variant
, discrete_choice_list
, discrete_choice
, record_extension_part
, access_type_definition
, access_to_object_definition
, general_access_modifier
, access_to_subprogram_definition
, access_definition
, incomplete_type_declaration
, declarative_part
, declarative_item
, basic_declarative_item
, body
, proper_body
, name
, direct_name
, prefix
, explicit_dereference
, implicit_dereference
, indexed_component
, slice
, selected_component
, selector_name
, attribute_reference
, attribute_designator
, range_attribute_reference
, range_attribute_designator
, aggregate
, record_aggregate
, record_component_association_list
, record_component_association
, component_choice_list
, extension_aggregate
, ancestor_part
, array_aggregate
, positional_array_aggregate
, named_array_aggregate
, array_component_association
, expression
, relation
, simple_expression
, term
, factor
, primary
, logical_operator
, relational_operator
, binary_adding_operator
, unary_adding_operator
, multiplying_operator
, highest_precedence_operator
, type_conversion
, qualified_expression
, allocator
, sequence_of_statements
, statement
, simple_statement
, compound_statement
, null_statement
, label
, statement_identifier
, assignment_statement
, if_statement
, condition
, case_statement
, case_statement_alternative
, loop_statement
, iteration_scheme
, loop_parameter_specification
, block_statement
, exit_statement
, goto_statement
, subprogram_declaration
, abstract_subprogram_declaration
, subprogram_specification
, designator
, defining_designator
, defining_program_unit_name
, operator_symbol
, defining_operator_symbol
, parameter_profile
, parameter_and_result_profile
, formal_part
, parameter_specification
, mode
, subprogram_body
, procedure_call_statement
, function_call
, actual_parameter_part
, parameter_association
, explicit_actual_parameter
, return_statement
, package_declaration
, package_specification
, package_body
, private_type_declaration
, private_extension_declaration
, use_clause
, use_package_clause
, use_type_clause
, renaming_declaration
, object_renaming_declaration
, exception_renaming_declaration
, package_renaming_declaration
, subprogram_renaming_declaration
, generic_renaming_declaration
, task_type_declaration
, single_task_declaration
, task_definition
, task_item
, task_body
, protected_type_declaration
, single_protected_declaration
, protected_definition
, protected_operation_declaration
, protected_element_declaration
, protected_body
, protected_operation_item
, entry_declaration
, accept_statement
, entry_index
, entry_body
, entry_body_formal_part
, entry_barrier
, entry_index_specification
, entry_call_statement
, requeue_statement
, delay_statement
, delay_until_statement
, delay_relative_statement
, select_statement
, selective_accept
, guard
, select_alternative
, accept_alternative
, delay_alternative
, terminate_alternative
, timed_entry_call
, entry_call_alternative
, conditional_entry_call
, asynchronous_select
, triggering_alternative
, triggering_statement
, abortable_part
, abort_statement
, compilation
, compilation_unit
, library_item
, library_unit_declaration
, library_unit_renaming_declaration
, library_unit_body
, parent_unit_name
, context_clause
, context_item
, with_clause
, body_stub
, subprogram_body_stub
, package_body_stub
, task_body_stub
, protected_body_stub
, subunit
, exception_declaration
, handled_sequence_of_statements
, exception_handler
, choice_parameter_specification
, exception_choice
, raise_statement
, generic_declaration
, generic_subprogram_declaration
, generic_package_declaration
, generic_formal_part
, generic_formal_parameter_declaration
, generic_instantiation
, generic_actual_part
, generic_association
, explicit_generic_actual_parameter
, formal_object_declaration
, formal_type_declaration
, formal_type_definition
, formal_private_type_definition
, formal_derived_type_definition
, formal_discrete_type_definition
, formal_signed_integer_type_definition
, formal_modular_type_definition
, formal_floating_point_definition
, formal_ordinary_fixed_point_definition
, formal_decimal_fixed_point_definition
, formal_array_type_definition
, formal_access_type_definition
, formal_subprogram_declaration
, subprogram_default
, default_name
, formal_package_declaration
, formal_package_actual_part
, representation_clause
, local_name
, attribute_definition_clause
, enumeration_representation_clause
, enumeration_aggregate
, record_representation_clause
, component_clause
, position
, first_bit
, last_bit
, code_statement
, restriction
, delta_constraint
, at_clause
, mod_clause
), 1 root (compilation
), 7 top (character
, comment
, pragma
, logical_operator
, highest_precedence_operator
, statement_identifier
, restriction
), 56 bottom (generic_procedure_name
2, procedure_prefix
, restriction_identifier
, package_instance_name
, format_effector
, identifier_letter
3, block_identifier
, exception_name
3, protected_identifier
2, renamespackage_name
, function_prefix
, entry_name
3, procedure_name
, parent_subtype_indication
, entry_identifier
2, label_name
, static_simple_expression
6, delay_expression
2, entry_direct_name
, loop_statement_identifier
, first_subtype_local_name
2, function_name
, restriction_parameter_identifier
, space_character
, subtype_name
, non_end_of_line_character
, boolean_expression
, variable_name
3, generic_formal_parameter_selector_name
, digit
5, ancestor_subtype_indication
, discriminant_selector_name
2, underline
3, generic_package_name
3, object_name
, block_statement_identifier
, generic_function_name
2, other_control_function
, static_expression
12, component_selector_name
2, pragma_argument_identifier
2, discrete_subtype_indication
2, subprogram_name
, loop_name
, non_quotation_mark_graphic_character
, formal_parameter_selector_name
, task_name
2, package_name
2, label_statement_identifier
, loop_identifier
, task_identifier
2, special_character
, discriminant_direct_name
, library_unit_name
3, component_local_name
, callable_entity_name
).character ::= graphic_character format_effector other_control_function
graphic_character ::= identifier_letter digit space_character special_character
identifier ::= identifier_letterunderline letter_or_digit
letter_or_digit ::= identifier_letter digit
numeric_literal ::= decimal_literal based_literal
decimal_literal ::= numeral "." numeral exponent
numeral ::= digitunderline digit
exponent ::= "E" "+" numeral "E" "-" numeral
based_literal ::= base "#" based_numeral "." based_numeral "#" exponent
base ::= numeral
based_numeral ::= extended_digitunderline extended_digit
extended_digit ::= digit "A" "B" "C" "D" "E" "F"
character_literal ::= "'" graphic_character "'"
string_literal ::= """ string_element """
string_element ::=
""""
non_quotation_mark_graphic_character
comment ::= "-" "-" non_end_of_line_character
pragma ::= "pragma" identifier "(" pragma_argument_association "," pragma_argument_association ")" ";"
pragma_argument_association ::= "=>" name pragma_argument_identifier "=>" expressionpragma_argument_identifier
basic_declaration ::= type_declaration subtype_declaration object_declaration number_declaration subprogram_declaration abstract_subprogram_declaration package_declaration renaming_declaration exception_declaration generic_declaration generic_instantiation
defining_identifier ::= identifier
type_declaration ::= full_type_declaration incomplete_type_declaration private_type_declaration private_extension_declaration
full_type_declaration ::= "type" defining_identifier known_discriminant_part "is" type_definition ";" task_type_declaration protected_type_declaration
type_definition ::= enumeration_type_definition integer_type_definition real_type_definition array_type_definition record_type_definition access_type_definition derived_type_definition
subtype_declaration ::= "subtype" defining_identifier "is" subtype_indication ";"
subtype_indication ::=
subtype_mark constraint
subtype_mark ::= subtype_name
constraint ::= scalar_constraint composite_constraint
scalar_constraint ::= range_constraint digits_constraint delta_constraint
composite_constraint ::= index_constraint discriminant_constraint
object_declaration ::= defining_identifier_list ":" "aliased" "constant" subtype_indication ":=" expression ";" defining_identifier_list ":" "aliased" "constant" array_type_definition ":=" expression ";" single_task_declaration single_protected_declaration
defining_identifier_list ::= defining_identifier "," defining_identifier
number_declaration ::= defining_identifier_list ":" "constant" ":=" static_expression ";"
derived_type_definition ::= "abstract" "new" parent_subtype_indication record_extension_part
range_constraint ::=
"range" range
range ::=
range_attribute_reference
simple_expression ".." simple_expression
enumeration_type_definition ::= "(" enumeration_literal_specification "," enumeration_literal_specification ")"
enumeration_literal_specification ::= defining_identifier defining_character_literal
defining_character_literal ::= character_literal
integer_type_definition ::= signed_integer_type_definition modular_type_definition
signed_integer_type_definition ::= "range" static_simple_expression ".." static_simple_expression
modular_type_definition ::=
"mod" static_expression
real_type_definition ::= floating_point_definition fixed_point_definition
floating_point_definition ::= "digits" static_expression real_range_specification
real_range_specification ::= "range" static_simple_expression ".." static_simple_expression
fixed_point_definition ::= ordinary_fixed_point_definition decimal_fixed_point_definition
ordinary_fixed_point_definition ::=
"delta" static_expression real_range_specification
decimal_fixed_point_definition ::= "delta" static_expression "digits" static_expression real_range_specification
digits_constraint ::= "digits" static_expression range_constraint
array_type_definition ::= unconstrained_array_definition constrained_array_definition
unconstrained_array_definition ::= "array" "(" index_subtype_definition "," index_subtype_definition ")" "of" component_definition
index_subtype_definition ::= subtype_mark "range" "<>"
constrained_array_definition ::= "array" "(" discrete_subtype_definition "," discrete_subtype_definition ")" "of" component_definition
discrete_subtype_definition ::=
discrete_subtype_indication
"range"
component_definition ::= "aliased" subtype_indication
index_constraint ::= "(" discrete_range "," discrete_range ")"
discrete_range ::= discrete_subtype_indication range
discriminant_part ::= unknown_discriminant_part known_discriminant_part
unknown_discriminant_part ::=
"(<>)"
known_discriminant_part ::= "(" discriminant_specification ";" discriminant_specification ")"
discriminant_specification ::= defining_identifier_list ":" subtype_mark ":=" default_expression defining_identifier_list ":" access_definition ":=" default_expression
default_expression ::= expression
discriminant_constraint ::= "(" discriminant_association "," discriminant_association ")"
discriminant_association ::= "|" discriminant_selector_name "=>" expressiondiscriminant_selector_name
record_type_definition ::= "abstract" "tagged" "limited" record_definition
record_definition ::= "record" component_list "end" "record" "null" "record"
component_list ::= component_item component_item"null" ";"component_item variant_part
component_item ::= component_declaration representation_clause
component_declaration ::= defining_identifier_list ":" component_definition ":=" default_expression ";"
variant_part ::= "case" discriminant_direct_name "is" variant variant "end" "case" ";"
variant ::= "when" discrete_choice_list "=>" component_list
discrete_choice_list ::= discrete_choice "|" discrete_choice
discrete_choice ::=
expression
discrete_range
"others"
record_extension_part ::=
"with" record_definition
access_type_definition ::= access_to_object_definition access_to_subprogram_definition
access_to_object_definition ::= "access" general_access_modifier subtype_indication
general_access_modifier ::= "all" "constant"
access_to_subprogram_definition ::= "access" "protected" "procedure" parameter_profile "access" "protected" "function" parameter_and_result_profile
access_definition ::=
"access" subtype_mark
incomplete_type_declaration ::= "type" defining_identifier discriminant_part ";"
declarative_part ::=
declarative_item
declarative_item ::= basic_declarative_item body
basic_declarative_item ::= basic_declaration representation_clause use_clause
body ::= proper_body body_stub
proper_body ::= subprogram_body package_body task_body protected_body
name ::= direct_name explicit_dereference indexed_component slice selected_component attribute_reference type_conversion function_call character_literal
direct_name ::= identifier operator_symbol
prefix ::= name implicit_dereference
explicit_dereference ::= name "." "all"
implicit_dereference ::= name
indexed_component ::= prefix "(" expression "," expression ")"
slice ::= prefix "(" discrete_range ")"
selected_component ::=
prefix "." selector_name
selector_name ::= identifier character_literal operator_symbol
attribute_reference ::=
prefix "'" attribute_designator
attribute_designator ::= identifier "(" static_expression ")" "Access" "Delta" "Digits"
range_attribute_reference ::=
prefix "'" range_attribute_designator
range_attribute_designator ::= "Range" "(" static_expression ")"
aggregate ::= record_aggregate extension_aggregate array_aggregate
record_aggregate ::= "(" record_component_association_list ")"
record_component_association_list ::= record_component_association "," record_component_association "null" "record"
record_component_association ::= "=>" expressioncomponent_choice_list
component_choice_list ::= component_selector_name "|" component_selector_name "others"
extension_aggregate ::= "(" ancestor_part "with" record_component_association_list ")"
ancestor_part ::= expression subtype_mark
array_aggregate ::= positional_array_aggregate named_array_aggregate
positional_array_aggregate ::= "(" expression "," expression "," expression ")" "(" expression "," expression "," "others" "=>" expression ")"
named_array_aggregate ::= "(" array_component_association "," array_component_association ")"
array_component_association ::=
discrete_choice_list "=>" expression
expression ::= relation "and" relation relation "and" "then" relation relation "or" relation relation "or" "else" relation relation "xor" relation
relation ::= simple_expression "not" "in" range simple_expression "not" "in" subtype_markrelational_operator simple_expression simple_expression
simple_expression ::= unary_adding_operatorterm binary_adding_operator term
term ::= factormultiplying_operator factor
factor ::= primary "**" primary "abs" primary "not" primary
primary ::= numeric_literal "null" string_literal aggregate name qualified_expression allocator "(" expression ")"
logical_operator ::= "and" "or" "xor"
relational_operator ::= "=" "/=" "<" "<=" ">" ">="
binary_adding_operator ::= "+" "-" "&"
unary_adding_operator ::= "+" "-"
multiplying_operator ::= "*" "/" "mod" "rem"
highest_precedence_operator ::= "**" "abs" "not"
type_conversion ::= subtype_mark "(" expression ")" subtype_mark "(" name ")"
qualified_expression ::= subtype_mark "'(" expression ")" subtype_mark "'" aggregate
allocator ::= "new" subtype_indication "new" qualified_expression
sequence_of_statements ::=
statement statement
statement ::= labelsimple_statement label compound_statement
simple_statement ::= null_statement assignment_statement exit_statement goto_statement procedure_call_statement return_statement entry_call_statement requeue_statement delay_statement abort_statement raise_statement code_statement
compound_statement ::= if_statement case_statement loop_statement block_statement accept_statement select_statement
null_statement ::= "null" ";"
label ::= "<<" label_statement_identifier ">>"
statement_identifier ::= direct_name
assignment_statement ::= variable_name ":=" expression ";"
if_statement ::= "if" condition "then" sequence_of_statements "elsif" condition "then" sequence_of_statements "else" sequence_of_statements "end" "if" ";"
condition ::= boolean_expression
case_statement ::= "case" expression "is" case_statement_alternative case_statement_alternative "end" "case" ";"
case_statement_alternative ::= "when" discrete_choice_list "=>" sequence_of_statements
loop_statement ::= ":" iteration_scheme "loop" sequence_of_statements "end" "loop" loop_identifier ";"loop_statement_identifier
iteration_scheme ::= "while" condition "for" loop_parameter_specification
loop_parameter_specification ::= defining_identifier "in" "reverse" discrete_subtype_definition
block_statement ::= ":" "declare" declarative_part "begin" handled_sequence_of_statements "end" block_identifier ";"block_statement_identifier
exit_statement ::= "exit" loop_name "when" condition ";"
goto_statement ::= "goto" label_name ";"
subprogram_declaration ::=
subprogram_specification ";"
abstract_subprogram_declaration ::= subprogram_specification "is" "abstract" ";"
subprogram_specification ::= "procedure" defining_program_unit_name parameter_profile "function" defining_designator parameter_and_result_profile
designator ::= "." identifier operator_symbolparent_unit_name
defining_designator ::= defining_program_unit_name defining_operator_symbol
defining_program_unit_name ::= "." defining_identifierparent_unit_name
operator_symbol ::= string_literal
defining_operator_symbol ::= operator_symbol
parameter_profile ::=
formal_part
parameter_and_result_profile ::= formal_part"return" subtype_mark
formal_part ::= "(" parameter_specification ";" parameter_specification ")"
parameter_specification ::= defining_identifier_list ":" mode subtype_mark ":=" default_expression defining_identifier_list ":" access_definition ":=" default_expression
mode ::= "in" "in" "out" "out"
subprogram_body ::= subprogram_specification "is" declarative_part "begin" handled_sequence_of_statements "end" designator ";"
procedure_call_statement ::= procedure_name ";" procedure_prefix actual_parameter_part ";"
function_call ::= function_name function_prefix actual_parameter_part
actual_parameter_part ::= "(" parameter_association "," parameter_association ")"
parameter_association ::= "=>" explicit_actual_parameterformal_parameter_selector_name
explicit_actual_parameter ::= expression variable_name
return_statement ::= "return" expression ";"
package_declaration ::=
package_specification ";"
package_specification ::= "package" defining_program_unit_name "is" basic_declarative_item "private" basic_declarative_item "end" parent_unit_name "." identifier
package_body ::= "package" body defining_program_unit_name "is" declarative_part "begin" handled_sequence_of_statements "end" parent_unit_name "." identifier ";"
private_type_declaration ::= "type" defining_identifier discriminant_part "is" "abstract" "tagged" "limited" "private" ";"
private_extension_declaration ::= "type" defining_identifier discriminant_part "is" "abstract" "new" ancestor_subtype_indication "with" "private" ";"
use_clause ::= use_package_clause use_type_clause
use_package_clause ::= "use" package_name "," package_name ";"
use_type_clause ::= "use" "type" subtype_mark "," subtype_mark ";"
renaming_declaration ::= object_renaming_declaration exception_renaming_declaration package_renaming_declaration subprogram_renaming_declaration generic_renaming_declaration
object_renaming_declaration ::= defining_identifier ":" subtype_mark "renames" object_name ";"
exception_renaming_declaration ::= defining_identifier ":" "exception" "renames" exception_name ";"
package_renaming_declaration ::= "package" defining_program_unit_name renamespackage_name ";"
subprogram_renaming_declaration ::= subprogram_specification "renames" callable_entity_name ";"
generic_renaming_declaration ::= "generic" "package" defining_program_unit_name "renames" generic_package_name ";" "generic" "procedure" defining_program_unit_name "renames" generic_procedure_name ";" "generic" "function" defining_program_unit_name "renames" generic_function_name ";"
task_type_declaration ::= "task" "type" defining_identifier known_discriminant_part "is" task_definition ";"
single_task_declaration ::= "task" defining_identifier "is" task_definition ";"
task_definition ::= task_item"private" task_item "end" task_identifier
task_item ::= entry_declaration representation_clause
task_body ::= "task" body defining_identifier "is" declarative_part "begin" handled_sequence_of_statements "end" task_identifier ";"
protected_type_declaration ::= "protected" "type" defining_identifier known_discriminant_part "is" protected_definition ";"
single_protected_declaration ::= "protected" defining_identifier "is" protected_definition ";"
protected_definition ::= protected_operation_declaration"private" protected_element_declaration "end" protected_identifier
protected_operation_declaration ::= subprogram_declaration entry_declaration representation_clause
protected_element_declaration ::= protected_operation_declaration component_declaration
protected_body ::= "protected" body defining_identifier "is" protected_operation_item "end" protected_identifier ";"
protected_operation_item ::= subprogram_declaration subprogram_body entry_body representation_clause
entry_declaration ::= "entry" defining_identifier "(" discrete_subtype_definition ")" parameter_profile ";"
accept_statement ::= "accept" entry_direct_name "(" entry_index ")" parameter_profile "do" handled_sequence_of_statements "end" entry_identifier ";"
entry_index ::= expression
entry_body ::= "entry" defining_identifier entry_body_formal_part entry_barrier "is" declarative_part "begin" handled_sequence_of_statements "end" entry_identifier ";"
entry_body_formal_part ::= "(" entry_index_specification ")" parameter_profile
entry_barrier ::=
"when" condition
entry_index_specification ::= "for" defining_identifier "in" discrete_subtype_definition
entry_call_statement ::= entry_name actual_parameter_part";"
requeue_statement ::= "requeue" entry_name "with" "abort" ";"
delay_statement ::= delay_until_statement delay_relative_statement
delay_until_statement ::= "delay" "until" delay_expression ";"
delay_relative_statement ::= "delay" delay_expression ";"
select_statement ::= selective_accept timed_entry_call conditional_entry_call asynchronous_select
selective_accept ::= "select" guard select_alternative "or" guard select_alternative "else" sequence_of_statements "end" "select" ";"
guard ::= "when" condition "=>"
select_alternative ::= accept_alternative delay_alternative terminate_alternative
accept_alternative ::=
accept_statement sequence_of_statements
delay_alternative ::=
delay_statement sequence_of_statements
terminate_alternative ::= "terminate" ";"
timed_entry_call ::= "select" entry_call_alternative "or" delay_alternative "end" "select" ";"
entry_call_alternative ::=
entry_call_statement sequence_of_statements
conditional_entry_call ::= "select" entry_call_alternative "else" sequence_of_statements "end" "select" ";"
asynchronous_select ::= "select" triggering_alternative "then" "abort" abortable_part "end" "select" ";"
triggering_alternative ::=
triggering_statement sequence_of_statements
triggering_statement ::= entry_call_statement delay_statement
abortable_part ::= sequence_of_statements
abort_statement ::= "abort" task_name "," task_name ";"
compilation ::=
compilation_unit
compilation_unit ::= context_clause library_item context_clause subunit
library_item ::= "private" library_unit_declaration library_unit_body "private" library_unit_renaming_declaration
library_unit_declaration ::= subprogram_declaration package_declaration generic_declaration generic_instantiation
library_unit_renaming_declaration ::= package_renaming_declaration generic_renaming_declaration subprogram_renaming_declaration
library_unit_body ::= subprogram_body package_body
parent_unit_name ::= name
context_clause ::=
context_item
context_item ::= with_clause use_clause
with_clause ::= "with" library_unit_name "," library_unit_name ";"
body_stub ::= subprogram_body_stub package_body_stub task_body_stub protected_body_stub
subprogram_body_stub ::= subprogram_specification "is" "separate" ";"
package_body_stub ::= "package" body defining_identifier "is" "separate" ";"
task_body_stub ::= "task" body defining_identifier "is" "separate" ";"
protected_body_stub ::= "protected" body defining_identifier "is" "separate" ";"
subunit ::= "separate" "(" parent_unit_name ")" proper_body
exception_declaration ::= defining_identifier_list ":" "exception" ";"
handled_sequence_of_statements ::= sequence_of_statements "exception" exception_handler exception_handler
exception_handler ::= "when" choice_parameter_specification ":" exception_choice "|" exception_choice "=>" sequence_of_statements
choice_parameter_specification ::= defining_identifier
exception_choice ::=
exception_name
"others"
raise_statement ::= "raise" exception_name ";"
generic_declaration ::= generic_subprogram_declaration generic_package_declaration
generic_subprogram_declaration ::=
generic_formal_part subprogram_specification ";"
generic_package_declaration ::=
generic_formal_part package_specification ";"
generic_formal_part ::= "generic" generic_formal_parameter_declaration use_clause
generic_formal_parameter_declaration ::= formal_object_declaration formal_type_declaration formal_subprogram_declaration formal_package_declaration
generic_instantiation ::= "package" defining_program_unit_name "is" "new" generic_package_name generic_actual_part ";" "procedure" defining_program_unit_name "is" "new" generic_procedure_name generic_actual_part ";" "function" defining_designator "is" "new" generic_function_name generic_actual_part ";"
generic_actual_part ::= "(" generic_association "," generic_association ")"
generic_association ::= "=>" explicit_generic_actual_parametergeneric_formal_parameter_selector_name
explicit_generic_actual_parameter ::= expression variable_name subprogram_name entry_name subtype_mark package_instance_name
formal_object_declaration ::= defining_identifier_list ":" mode subtype_mark ":=" default_expression ";"
formal_type_declaration ::= "type" defining_identifier discriminant_part "is" formal_type_definition ";"
formal_type_definition ::= formal_private_type_definition formal_derived_type_definition formal_discrete_type_definition formal_signed_integer_type_definition formal_modular_type_definition formal_floating_point_definition formal_ordinary_fixed_point_definition formal_decimal_fixed_point_definition formal_array_type_definition formal_access_type_definition
formal_private_type_definition ::= "abstract" "tagged" "limited" "private"
formal_derived_type_definition ::= "abstract" "new" subtype_mark "with" "private"
formal_discrete_type_definition ::=
"(<>)"
formal_signed_integer_type_definition ::= "range" "<>"
formal_modular_type_definition ::= "mod" "<>"
formal_floating_point_definition ::= "digits" "<>"
formal_ordinary_fixed_point_definition ::= "delta" "<>"
formal_decimal_fixed_point_definition ::= "delta" "<>" "digits" "<>"
formal_array_type_definition ::= array_type_definition
formal_access_type_definition ::= access_type_definition
formal_subprogram_declaration ::= "with" subprogram_specification "is" subprogram_default ";"
subprogram_default ::=
default_name
"<>"
default_name ::= name
formal_package_declaration ::= "with" "package" defining_identifier "is" "new" generic_package_name formal_package_actual_part ";"
formal_package_actual_part ::= "(<>)" generic_actual_part
representation_clause ::= attribute_definition_clause enumeration_representation_clause record_representation_clause at_clause
local_name ::=
direct_name
direct_name "'" attribute_designator
library_unit_name
attribute_definition_clause ::= "for" local_name "'" attribute_designator "use" expression ";" "for" local_name "'" attribute_designator "use" name ";"
enumeration_representation_clause ::= "for" first_subtype_local_name "use" enumeration_aggregate ";"
enumeration_aggregate ::= array_aggregate
record_representation_clause ::= "for" first_subtype_local_name "use" "record" mod_clause component_clause "end" "record" ";"
component_clause ::= component_local_name "at" position "range" first_bit ".." last_bit ";"
position ::= static_expression
first_bit ::= static_simple_expression
last_bit ::= static_simple_expression
code_statement ::=
qualified_expression ";"
restriction ::=
restriction_identifier
restriction_parameter_identifier "=>" expression
delta_constraint ::= "delta" static_expression range_constraint
at_clause ::= "for" direct_name "use" "at" expression ";"
mod_clause ::= "at" "mod" static_expression ";"