158 lines
3.4 KiB
Plaintext
158 lines
3.4 KiB
Plaintext
================================================================================
|
|
with clauses
|
|
================================================================================
|
|
|
|
with Ada.Text_IO, System; -- multiple names, and fully qualified
|
|
limited with Ada; -- limited with
|
|
private with Ada;
|
|
limited private with Ada;
|
|
use Ada.Text_IO, System;
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(compilation
|
|
(compilation_unit
|
|
(with_clause
|
|
(name_list
|
|
(name
|
|
(identifier)
|
|
(identifier))
|
|
(name
|
|
(identifier)))))
|
|
(comment)
|
|
(compilation_unit
|
|
(with_clause
|
|
(name_list
|
|
(name
|
|
(identifier)))))
|
|
(comment)
|
|
(compilation_unit
|
|
(with_clause
|
|
(name_list
|
|
(name
|
|
(identifier)))))
|
|
(compilation_unit
|
|
(with_clause
|
|
(name_list
|
|
(name
|
|
(identifier)))))
|
|
(compilation_unit
|
|
(use_clause
|
|
(name_list
|
|
(name
|
|
(identifier)
|
|
(identifier))
|
|
(name
|
|
(identifier))))))
|
|
|
|
=====
|
|
Case insensitive
|
|
=====
|
|
|
|
PACkaGe P1 Is
|
|
enD;
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(compilation
|
|
(compilation_unit
|
|
(package_specification
|
|
(name
|
|
(identifier)))))
|
|
|
|
================================================================================
|
|
multiple compilation units
|
|
================================================================================
|
|
|
|
package P1 is
|
|
package Nested is
|
|
end Nested;
|
|
end P1;
|
|
|
|
private package Child.P2 is -- comment to be ignored
|
|
private
|
|
end;
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(compilation
|
|
(compilation_unit
|
|
(package_specification
|
|
(name
|
|
(identifier))
|
|
(package_specification
|
|
(name
|
|
(identifier))
|
|
(name
|
|
(identifier)))
|
|
(name
|
|
(identifier))))
|
|
(compilation_unit
|
|
(package_specification
|
|
(name
|
|
(identifier)
|
|
(identifier))
|
|
(comment))))
|
|
|
|
=========
|
|
body
|
|
=========
|
|
|
|
package body Child.P2 is
|
|
package body Nested is
|
|
begin
|
|
null;
|
|
end Nested;
|
|
begin
|
|
null;
|
|
end Child.P2;
|
|
|
|
---
|
|
(compilation
|
|
(compilation_unit
|
|
(proper_body
|
|
(package_body
|
|
(name
|
|
(identifier)
|
|
(identifier))
|
|
(non_empty_declarative_part
|
|
(declarative_item_pragma
|
|
(proper_body
|
|
(package_body
|
|
(name
|
|
(identifier))
|
|
(handled_sequence_of_statements
|
|
(sequence_of_statements
|
|
(statement
|
|
(simple_statement
|
|
(null_statement)))))
|
|
(name
|
|
(identifier))))))
|
|
(handled_sequence_of_statements
|
|
(sequence_of_statements
|
|
(statement
|
|
(simple_statement
|
|
(null_statement)))))
|
|
(name
|
|
(identifier)
|
|
(identifier))))))
|
|
|
|
================================================================================
|
|
separate
|
|
================================================================================
|
|
|
|
separate (Child) package body P2 is
|
|
end;
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(compilation
|
|
(compilation_unit
|
|
(subunit
|
|
(name
|
|
(identifier))
|
|
(proper_body
|
|
(package_body
|
|
(name
|
|
(identifier)))))))
|