123 lines
3.9 KiB
Plaintext
123 lines
3.9 KiB
Plaintext
================================================================================
|
|
access types
|
|
================================================================================
|
|
|
|
package P is
|
|
type A is access Integer;
|
|
type B is access not null Integer;
|
|
type C is access constant Integer;
|
|
type D is access all Integer;
|
|
type E is access function return Boolean;
|
|
type F is access protected function return Boolean;
|
|
end;
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(compilation
|
|
(compilation_unit
|
|
(package_specification
|
|
(identifier)
|
|
(type_declaration
|
|
(full_type_declaration
|
|
(identifier)
|
|
(type_definition
|
|
(access_type_definition
|
|
(access_to_object_definition
|
|
(subtype_indication
|
|
(identifier)))))))
|
|
(type_declaration
|
|
(full_type_declaration
|
|
(identifier)
|
|
(type_definition
|
|
(access_type_definition
|
|
(access_to_object_definition
|
|
(subtype_indication
|
|
(null_exclusion)
|
|
(identifier)))))))
|
|
(type_declaration
|
|
(full_type_declaration
|
|
(identifier)
|
|
(type_definition
|
|
(access_type_definition
|
|
(access_to_object_definition
|
|
(general_access_modifier)
|
|
(subtype_indication
|
|
(identifier)))))))
|
|
(type_declaration
|
|
(full_type_declaration
|
|
(identifier)
|
|
(type_definition
|
|
(access_type_definition
|
|
(access_to_object_definition
|
|
(general_access_modifier)
|
|
(subtype_indication
|
|
(identifier)))))))
|
|
(type_declaration
|
|
(full_type_declaration
|
|
(identifier)
|
|
(type_definition
|
|
(access_type_definition
|
|
(access_to_subprogram_definition
|
|
(parameter_and_result_profile
|
|
(result_profile
|
|
(identifier))))))))
|
|
(type_declaration
|
|
(full_type_declaration
|
|
(identifier)
|
|
(type_definition
|
|
(access_type_definition
|
|
(access_to_subprogram_definition
|
|
(parameter_and_result_profile
|
|
(result_profile
|
|
(identifier)))))))))))
|
|
|
|
================================================================================
|
|
Dereference
|
|
================================================================================
|
|
|
|
procedure P is
|
|
begin
|
|
A := Acc.all;
|
|
Proc.all (1);
|
|
end;
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(compilation
|
|
(compilation_unit
|
|
(proper_body
|
|
(subprogram_body
|
|
(subprogram_specification
|
|
(procedure_specification
|
|
(identifier)))
|
|
(handled_sequence_of_statements
|
|
(sequence_of_statements
|
|
(statement
|
|
(simple_statement
|
|
(assignment_statement
|
|
(identifier)
|
|
(assign_value
|
|
(expression
|
|
(relation
|
|
(simple_expression
|
|
(term
|
|
(factor
|
|
(primary
|
|
(identifier)
|
|
(identifier)))))))))))
|
|
(statement
|
|
(simple_statement
|
|
(procedure_call_statement
|
|
(identifier)
|
|
(function_call
|
|
(identifier)
|
|
(actual_parameter_part
|
|
(parameter_association
|
|
(expression
|
|
(relation
|
|
(simple_expression
|
|
(term
|
|
(factor
|
|
(primary
|
|
(numeric_literal)))))))))))))))))))
|