| 1 |
------------------------------------------------------------------------------ |
| 2 |
-- -- |
| 3 |
-- GNAT COMPILER COMPONENTS -- |
| 4 |
-- -- |
| 5 |
-- S E M _ C H 4 -- |
| 6 |
-- -- |
| 7 |
-- S p e c -- |
| 8 |
-- -- |
| 9 |
-- Copyright (C) 1992-2025, Free Software Foundation, Inc. -- |
| 10 |
-- -- |
| 11 |
-- GNAT is free software; you can redistribute it and/or modify it under -- |
| 12 |
-- terms of the GNU General Public License as published by the Free Soft- -- |
| 13 |
-- ware Foundation; either version 3, or (at your option) any later ver- -- |
| 14 |
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
| 15 |
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- |
| 16 |
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- |
| 17 |
-- for more details. You should have received a copy of the GNU General -- |
| 18 |
-- Public License distributed with GNAT; see file COPYING3. If not, go to -- |
| 19 |
-- http://www.gnu.org/licenses for a complete copy of the license. -- |
| 20 |
-- -- |
| 21 |
-- GNAT was originally developed by the GNAT team at New York University. -- |
| 22 |
-- Extensive contributions were provided by Ada Core Technologies Inc. -- |
| 23 |
-- -- |
| 24 |
------------------------------------------------------------------------------ |
| 25 |
|
| 26 |
with Types; use Types; |
| 27 |
|
| 28 |
package Sem_Ch4 is |
| 29 |
procedure Analyze_Aggregate (N : Node_Id); |
| 30 |
procedure Analyze_Allocator (N : Node_Id); |
| 31 |
procedure Analyze_Arithmetic_Op (N : Node_Id); |
| 32 |
procedure Analyze_Call (N : Node_Id); |
| 33 |
procedure Analyze_Case_Expression (N : Node_Id); |
| 34 |
procedure Analyze_Comparison_Equality_Op (N : Node_Id); |
| 35 |
procedure Analyze_Concatenation (N : Node_Id); |
| 36 |
procedure Analyze_Explicit_Dereference (N : Node_Id); |
| 37 |
procedure Analyze_Expression_With_Actions (N : Node_Id); |
| 38 |
procedure Analyze_If_Expression (N : Node_Id); |
| 39 |
procedure Analyze_Logical_Op (N : Node_Id); |
| 40 |
procedure Analyze_Membership_Op (N : Node_Id); |
| 41 |
procedure Analyze_Mod (N : Node_Id); |
| 42 |
procedure Analyze_Negation (N : Node_Id); |
| 43 |
procedure Analyze_Null (N : Node_Id); |
| 44 |
procedure Analyze_Qualified_Expression (N : Node_Id); |
| 45 |
procedure Analyze_Quantified_Expression (N : Node_Id); |
| 46 |
procedure Analyze_Range (N : Node_Id); |
| 47 |
procedure Analyze_Reference (N : Node_Id); |
| 48 |
procedure Analyze_Selected_Component (N : Node_Id); |
| 49 |
procedure Analyze_Short_Circuit (N : Node_Id); |
| 50 |
procedure Analyze_Slice (N : Node_Id); |
| 51 |
procedure Analyze_Type_Conversion (N : Node_Id); |
| 52 |
procedure Analyze_Unary_Op (N : Node_Id); |
| 53 |
procedure Analyze_Unchecked_Type_Conversion (N : Node_Id); |
| 54 |
|
| 55 |
procedure Ambiguous_Operands (N : Node_Id); |
| 56 |
-- Give an error for comparison, equality and membership operators with |
| 57 |
-- ambiguous operands, and list possible interpretations. |
| 58 |
|
| 59 |
procedure Analyze_Indexed_Component_Form (N : Node_Id); |
| 60 |
-- Prior to semantic analysis, an indexed component node can denote any |
| 61 |
-- of the following syntactic constructs: |
| 62 |
-- a) An indexed component of an array |
| 63 |
-- b) A function call |
| 64 |
-- c) A conversion |
| 65 |
-- d) A slice |
| 66 |
-- The resolution of the construct requires some semantic information |
| 67 |
-- on the prefix and the indexes. |
| 68 |
|
| 69 |
procedure Nondispatching_Call_To_Abstract_Operation |
| 70 |
(N : Node_Id; |
| 71 |
Abstract_Op : Entity_Id); |
| 72 |
-- Give an error, or a warning and rewrite N to raise Program_Error because |
| 73 |
-- it is a nondispatching call to an abstract operation. |
| 74 |
|
| 75 |
function Try_Object_Operation |
| 76 |
(N : Node_Id; |
| 77 |
CW_Test_Only : Boolean := False; |
| 78 |
Allow_Extensions : Boolean := False) return Boolean; |
| 79 |
-- Ada 2005 (AI-252): Support the object.operation notation. If node N is |
| 80 |
-- a call in this notation, it is transformed into a normal subprogram call |
| 81 |
-- where the prefix is a parameter, and True is returned. If node N is not |
| 82 |
-- of this form, it is unchanged, and False is returned. If CW_Test_Only is |
| 83 |
-- true then N is an N_Selected_Component node which is part of a call to |
| 84 |
-- an entry or procedure of a tagged concurrent type and this routine is |
| 85 |
-- invoked to search for class-wide subprograms conflicting with the target |
| 86 |
-- entity. If Allow_Extensions is True, then a prefixed call to a primitive |
| 87 |
-- of an untagged type is allowed (used to give better error messages). |
| 88 |
|
| 89 |
procedure Unresolved_Operator (N : Node_Id); |
| 90 |
-- Give an error for an unresolved operator |
| 91 |
|
| 92 |
end Sem_Ch4; |