2005-12-29 Paul Brook <paul@codesourcery.com>
[official-gcc.git] / gcc / ada / sinfo.ads
blobbf5edbc4e65c5eb689b1136382e6abaaa3b51de1
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S I N F O --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2005, 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 2, 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 COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
21 -- --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
28 -- --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
31 -- --
32 ------------------------------------------------------------------------------
34 -- This package defines the structure of the abstract syntax tree. The Tree
35 -- package provides a basic tree structure. Sinfo describes how this structure
36 -- is used to represent the syntax of an Ada program.
38 -- Note: the grammar used here is taken from Version 5.95 of the RM, dated
39 -- November 1994. The grammar in the RM is followed very closely in the tree
40 -- design, and is repeated as part of this source file.
42 -- The tree contains not only the full syntactic representation of the
43 -- program, but also the results of semantic analysis. In particular, the
44 -- nodes for defining identifiers, defining character literals and defining
45 -- operator symbols, collectively referred to as entities, represent what
46 -- would normally be regarded as the symbol table information. In addition a
47 -- number of the tree nodes contain semantic information.
49 -- WARNING: There is a C version of this package. Any changes to this source
50 -- file must be properly reflected in this C header file sinfo.h which is
51 -- created automatically from sinfo.ads using xsinfo.adb.
53 with Types; use Types;
54 with Uintp; use Uintp;
55 with Urealp; use Urealp;
57 package Sinfo is
59 ---------------------------------
60 -- Making Changes to This File --
61 ---------------------------------
63 -- If changes are made to this file, a number of related steps must be
64 -- carried out to ensure consistency. First, if a field access function is
65 -- added, it appears in seven places:
67 -- The documentation associated with the node
68 -- The spec of the access function in sinfo.ads
69 -- The body of the access function in sinfo.adb
70 -- The pragma Inline at the end of sinfo.ads for the access function
71 -- The spec of the set procedure in sinfo.ads
72 -- The body of the set procedure in sinfo.adb
73 -- The pragma Inline at the end of sinfo.ads for the set procedure
75 -- The field chosen must be consistent in all places, and, for a node that
76 -- is a subexpression, must not overlap any of the standard expression
77 -- fields.
79 -- In addition, if any of the standard expression fields is changed, then
80 -- the utiliy program which creates the Treeprs spec (in file treeprs.ads)
81 -- must be updated appropriately, since it special cases expression fields.
83 -- If a new tree node is added, then the following changes are made
85 -- Add it to the documentation in the appropriate place
86 -- Add its fields to this documentation section
87 -- Define it in the appropriate classification in Node_Kind
88 -- In the body (sinfo), add entries to the access functions for all
89 -- its fields (except standard expression fields) to include the new
90 -- node in the checks.
91 -- Add an appropriate section to the case statement in sprint.adb
92 -- Add an appropriate section to the case statement in sem.adb
93 -- Add an appropriate section to the case statement in exp_util.adb
94 -- (Insert_Actions procedure)
95 -- For a subexpression, add an appropriate section to the case
96 -- statement in sem_eval.adb
97 -- For a subexpression, add an appropriate section to the case
98 -- statement in sem_res.adb
100 -- Finally, four utility programs must be run:
102 -- Run CSinfo to check that you have made the changes consistently. It
103 -- checks most of the rules given above, with clear error messages. This
104 -- utility reads sinfo.ads and sinfo.adb and generates a report to
105 -- standard output.
107 -- Run XSinfo to create a-sinfo.h, the corresponding C header. This
108 -- utility reads sinfo.ads and generates a-sinfo.h. Note that it does
109 -- not need to read sinfo.adb, since the contents of the body are
110 -- algorithmically determinable from the spec.
112 -- Run XTreeprs to create treeprs.ads, an updated version of the module
113 -- that is used to drive the tree print routine. This utility reads (but
114 -- does not modify) treeprs.adt, the template that provides the basic
115 -- structure of the file, and then fills in the data from the comments
116 -- in sinfo.ads.
118 -- Run XNmake to create nmake.ads and nmake.adb, the package body and
119 -- spec of the Nmake package which contains functions for constructing
120 -- nodes.
122 -- Note: sometime we could write a utility that actually generated the body
123 -- of sinfo from the spec instead of simply checking it, since, as noted
124 -- above, the contents of the body can be determined from the spec.
126 --------------------------------
127 -- Implicit Nodes in the Tree --
128 --------------------------------
130 -- Generally the structure of the tree very closely follows the grammar as
131 -- defined in the RM. However, certain nodes are omitted to save space and
132 -- simplify semantic processing. Two general classes of such omitted nodes
133 -- are as follows:
135 -- If the only possibilities for a non-terminal are one or more other
136 -- non-terminals (i.e. the rule is a "skinny" rule), then usually the
137 -- corresponding node is omitted from the tree, and the target construct
138 -- appears directly. For example, a real type definition is either
139 -- floating point definition or a fixed point definition. No explicit node
140 -- appears for real type definition. Instead either the floating point
141 -- definition or fixed point definition appears directly.
143 -- If a non-terminal corresponds to a list of some other non-terminal
144 -- (possibly with separating punctuation), then usually it is omitted from
145 -- the tree, and a list of components appears instead. For example,
146 -- sequence of statements does not appear explicitly in the tree. Instead
147 -- a list of statements appears directly.
149 -- Some additional cases of omitted nodes occur and are documented
150 -- individually. In particular, many nodes are omitted in the tree
151 -- generated for an expression.
153 -------------------------------------------
154 -- Handling of Defining Identifier Lists --
155 -------------------------------------------
157 -- In several declarative forms in the syntax, lists of defining
158 -- identifiers appear (object declarations, component declarations, number
159 -- declarations etc.)
161 -- The semantics of such statements are equivalent to a series of identical
162 -- declarations of single defining identifiers (except that conformance
163 -- checks require the same grouping of identifiers in the parameter case).
165 -- To simplify semantic processing, the parser breaks down such multiple
166 -- declaration cases into sequences of single declarations, duplicating
167 -- type and initialization information as required. The flags More_Ids and
168 -- Prev_Ids are used to record the original form of the source in the case
169 -- where the original source used a list of names, More_Ids being set on
170 -- all but the last name and Prev_Ids being set on all but the first name.
171 -- These flags are used to reconstruct the original source (e.g. in the
172 -- Sprint package), and also are included in the conformance checks, but
173 -- otherwise have no semantic significance.
175 -- Note: the reason that we use More_Ids and Prev_Ids rather than
176 -- First_Name and Last_Name flags is so that the flags are off in the
177 -- normal one identifier case, which minimizes tree print output.
179 -----------------------
180 -- Use of Node Lists --
181 -----------------------
183 -- With a few exceptions, if a construction of the form {non-terminal}
184 -- appears in the tree, lists are used in the corresponding tree node (see
185 -- package Nlists for handling of node lists). In this case a field of the
186 -- parent node points to a list of nodes for the non-terminal. The field
187 -- name for such fields has a plural name which always ends in "s". For
188 -- example, a case statement has a field Alternatives pointing to list of
189 -- case statement alternative nodes.
191 -- Only fields pointing to lists have names ending in "s", so generally the
192 -- structure is strongly typed, fields not ending in s point to single
193 -- nodes, and fields ending in s point to lists.
195 -- The following example shows how a traversal of a list is written. We
196 -- suppose here that Stmt points to a N_Case_Statement node which has a
197 -- list field called Alternatives:
199 -- Alt := First (Alternatives (Stmt));
200 -- while Present (Alt) loop
201 -- ..
202 -- -- processing for case statement alternative Alt
203 -- ..
204 -- Alt := Next (Alt);
205 -- end loop;
207 -- The Present function tests for Empty, which in this case signals the end
208 -- of the list. First returns Empty immediately if the list is empty.
209 -- Present is defined in Atree, First and Next are defined in Nlists.
211 -- The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
212 -- contexts, which is handled as described in the previous section, and
213 -- with {,library_unit_NAME} in the N_With_Clause mode, which is handled
214 -- using the First_Name and Last_Name flags, as further detailed in the
215 -- description of the N_With_Clause node.
217 -------------
218 -- Pragmas --
219 -------------
221 -- Pragmas can appear in many different context, but are not included in
222 -- the grammar. Still they must appear in the tree, so they can be properly
223 -- processed.
225 -- Two approaches are used. In some cases, an extra field is defined in an
226 -- appropriate node that contains a list of pragmas appearing in the
227 -- expected context. For example pragmas can appear before an
228 -- Accept_Alternative in a Selective_Accept_Statement, and these pragmas
229 -- appear in the Pragmas_Before field of the N_Accept_Alternative node.
231 -- The other approach is to simply allow pragmas to appear in syntactic
232 -- lists where the grammar (of course) does not include the possibility.
233 -- For example, the Variants field of an N_Variant_Part node points to a
234 -- list that can contain both N_Pragma and N_Variant nodes.
236 -- To make processing easier in the latter case, the Nlists package
237 -- provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
238 -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be handled
239 -- ignoring all pragmas.
241 -- In the case of the variants list, we can either write:
243 -- Variant := First (Variants (N));
244 -- while Present (Variant) loop
245 -- ...
246 -- Variant := Next (Variant);
247 -- end loop;
249 -- or
251 -- Variant := First_Non_Pragma (Variants (N));
252 -- while Present (Variant) loop
253 -- ...
254 -- Variant := Next_Non_Pragma (Variant);
255 -- end loop;
257 -- In the first form of the loop, Variant can either be an N_Pragma or an
258 -- N_Variant node. In the second form, Variant can only be N_Variant since
259 -- all pragmas are skipped.
261 ---------------------
262 -- Optional Fields --
263 ---------------------
265 -- Fields which correspond to a section of the syntax enclosed in square
266 -- brackets are generally omitted (and the corresponding field set to Empty
267 -- for a node, or No_List for a list). The documentation of such fields
268 -- notes these cases. One exception to this rule occurs in the case of
269 -- possibly empty statement sequences (such as the sequence of statements
270 -- in an entry call alternative). Such cases appear in the syntax rules as
271 -- [SEQUENCE_OF_STATEMENTS] and the fields corresponding to such optional
272 -- statement sequences always contain an empty list (not No_List) if no
273 -- statements are present.
275 -- Note: the utility program that constructs the body and spec of the Nmake
276 -- package relies on the format of the comments to determine if a field
277 -- should have a default value in the corresponding make routine. The rule
278 -- is that if the first line of the description of the field contains the
279 -- string "(set to xxx if", then a default value of xxx is provided for
280 -- this field in the corresponding Make_yyy routine.
282 -----------------------------------
283 -- Note on Body/Spec Terminology --
284 -----------------------------------
286 -- In informal discussions about Ada, it is customary to refer to package
287 -- and subprogram specs and bodies. However, this is not technically
288 -- correct, what is normally referred to as a spec or specification is in
289 -- fact a package declaration or subprogram declaration. We are careful in
290 -- GNAT to use the correct terminology and in particular, the full word
291 -- specification is never used as an incorrect substitute for declaration.
292 -- The structure and terminology used in the tree also reflects the grammar
293 -- and thus uses declaration and specification in the technically correct
294 -- manner.
296 -- However, there are contexts in which the informal terminology is useful.
297 -- We have the word "body" to refer to the Interp_Etype declared by the
298 -- declaration of a unit body, and in some contexts we need similar term to
299 -- refer to the entity declared by the package or subprogram declaration,
300 -- and simply using declaration can be confusing since the body also has a
301 -- declaration.
303 -- An example of such a context is the link between the package body and
304 -- its declaration. With_Declaration is confusing, since the package body
305 -- itself is a declaration.
307 -- To deal with this problem, we reserve the informal term Spec, i.e. the
308 -- popular abbreviation used in this context, to refer to the entity
309 -- declared by the package or subprogram declaration. So in the above
310 -- example case, the field in the body is called With_Spec.
312 -- Another important context for the use of the word Spec is in error
313 -- messages, where a hyper-correct use of declaration would be confusing to
314 -- a typical Ada programmer, and even for an expert programmer can cause
315 -- confusion since the body has a declaration as well.
317 -- So, to summarize:
319 -- Declaration always refers to the syntactic entity that is called
320 -- a declaration. In particular, subprogram declaration
321 -- and package declaration are used to describe the
322 -- syntactic entity that includes the semicolon.
324 -- Specification always refers to the syntactic entity that is called
325 -- a specification. In particular, the terms procedure
326 -- specification, function specification, package
327 -- specification, subprogram specification always refer
328 -- to the syntactic entity that has no semicolon.
330 -- Spec is an informal term, used to refer to the entity
331 -- that is declared by a task declaration, protected
332 -- declaration, generic declaration, subprogram
333 -- declaration or package declaration.
335 -- This convention is followed throughout the GNAT documentation
336 -- both internal and external, and in all error message text.
338 ------------------------
339 -- Internal Use Nodes --
340 ------------------------
342 -- These are Node_Kind settings used in the internal implementation which
343 -- are not logically part of the specification.
345 -- N_Unused_At_Start
346 -- Completely unused entry at the start of the enumeration type. This
347 -- is inserted so that no legitimate value is zero, which helps to get
348 -- better debugging behavior, since zero is a likely uninitialized value).
350 -- N_Unused_At_End
351 -- Completely unused entry at the end of the enumeration type. This is
352 -- handy so that arrays with Node_Kind as the index type have an extra
353 -- entry at the end (see for example the use of the Pchar_Pos_Array in
354 -- Treepr, where the extra entry provides the limit value when dealing with
355 -- the last used entry in the array).
357 -----------------------------------------
358 -- Note on the settings of Sloc fields --
359 -----------------------------------------
361 -- The Sloc field of nodes that come from the source is set by the parser.
362 -- For internal nodes, and nodes generated during expansion the Sloc is
363 -- usually set in the call to the constructor for the node. In general the
364 -- Sloc value chosen for an internal node is the Sloc of the source node
365 -- whose processing is responsible for the expansion. For example, the Sloc
366 -- of an inherited primitive operation is the Sloc of the corresponding
367 -- derived type declaration.
369 -- For the nodes of a generic instantiation, the Sloc value is encoded to
370 -- represent both the original Sloc in the generic unit, and the Sloc of
371 -- the instantiation itself. See Sinput.ads for details.
373 -- Subprogram instances create two callable entities: one is the visible
374 -- subprogram instance, and the other is an anonymous subprogram nested
375 -- within a wrapper package that contains the renamings for the actuals.
376 -- Both of these entities have the Sloc of the defining entity in the
377 -- instantiation node. This simplifies some ASIS queries.
379 -----------------------
380 -- Field Definitions --
381 -----------------------
383 -- In the following node definitions, all fields, both syntactic and
384 -- semantic, are documented. The one exception is in the case of entities
385 -- (defining indentifiers, character literals and operator symbols), where
386 -- the usage of the fields depends on the entity kind. Entity fields are
387 -- fully documented in the separate package Einfo.
389 -- In the node definitions, three common sets of fields are abbreviated to
390 -- save both space in the documentation, and also space in the string
391 -- (defined in Tree_Print_Strings) used to print trees. The following
392 -- abbreviations are used:
394 -- Note: the utility program that creates the Treeprs spec (in the file
395 -- xtreeprs.adb) knows about the special fields here, so it must be
396 -- modified if any change is made to these fields.
398 -- "plus fields for binary operator"
399 -- Chars (Name1) Name_Id for the operator
400 -- Left_Opnd (Node2) left operand expression
401 -- Right_Opnd (Node3) right operand expression
402 -- Entity (Node4-Sem) defining entity for operator
403 -- Associated_Node (Node4-Sem) for generic processing
404 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
405 -- Has_Private_View (Flag11-Sem) set in generic units.
407 -- "plus fields for unary operator"
408 -- Chars (Name1) Name_Id for the operator
409 -- Right_Opnd (Node3) right operand expression
410 -- Entity (Node4-Sem) defining entity for operator
411 -- Associated_Node (Node4-Sem) for generic processing
412 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
413 -- Has_Private_View (Flag11-Sem) set in generic units.
415 -- "plus fields for expression"
416 -- Paren_Count number of parentheses levels
417 -- Etype (Node5-Sem) type of the expression
418 -- Is_Overloaded (Flag5-Sem) >1 type interpretation exists
419 -- Is_Static_Expression (Flag6-Sem) set for static expression
420 -- Raises_Constraint_Error (Flag7-Sem) evaluation raises CE
421 -- Must_Not_Freeze (Flag8-Sem) set if must not freeze
422 -- Do_Range_Check (Flag9-Sem) set if a range check needed
423 -- Assignment_OK (Flag15-Sem) set if modification is OK
424 -- Is_Controlling_Actual (Flag16-Sem) set for controlling argument
426 -- Note: see under (EXPRESSION) for further details on the use of
427 -- the Paren_Count field to record the number of parentheses levels.
429 -- Node_Kind is the type used in the Nkind field to indicate the node kind.
430 -- The actual definition of this type is given later (the reason for this
431 -- is that we want the descriptions ordered by logical chapter in the RM,
432 -- but the type definition is reordered to facilitate the definition of
433 -- some subtype ranges. The individual descriptions of the nodes show how
434 -- the various fields are used in each node kind, as well as providing
435 -- logical names for the fields. Functions and procedures are provided for
436 -- accessing and setting these fields using these logical names.
438 -----------------------
439 -- Gigi Restrictions --
440 -----------------------
442 -- The tree passed to Gigi is more restricted than the general tree form.
443 -- For example, as a result of expansion, most of the tasking nodes can
444 -- never appear. For each node to which either a complete or partial
445 -- restriction applies, a note entitled "Gigi restriction" appears which
446 -- documents the restriction.
448 -- Note that most of these restrictions apply only to trees generated when
449 -- code is being generated, since they involved expander actions that
450 -- destroy the tree.
452 ------------------------
453 -- Common Flag Fields --
454 ------------------------
456 -- The following flag fields appear in all nodes
458 -- Analyzed (Flag1)
459 -- This flag is used to indicate that a node (and all its children have
460 -- been analyzed. It is used to avoid reanalysis of a node that has
461 -- already been analyzed, both for efficiency and functional correctness
462 -- reasons.
464 -- Comes_From_Source (Flag2)
465 -- This flag is on for any nodes built by the scanner or parser from the
466 -- source program, and off for any nodes built by the analyzer or
467 -- expander. It indicates that a node comes from the original source.
468 -- This flag is defined in Atree.
470 -- Error_Posted (Flag3)
471 -- This flag is used to avoid multiple error messages being posted on or
472 -- referring to the same node. This flag is set if an error message
473 -- refers to a node or is posted on its source location, and has the
474 -- effect of inhibiting further messages involving this same node.
476 -- Has_Dynamic_Length_Check (Flag10-Sem)
477 -- This flag is present on all nodes. It is set to indicate that one of
478 -- the routines in unit Checks has generated a length check action which
479 -- has been inserted at the flagged node. This is used to avoid the
480 -- generation of duplicate checks.
482 -- Has_Dynamic_Range_Check (Flag12-Sem)
483 -- This flag is present on all nodes. It is set to indicate that one of
484 -- the routines in unit Checks has generated a range check action which
485 -- has been inserted at the flagged node. This is used to avoid the
486 -- generation of duplicate checks.
488 ------------------------------------
489 -- Description of Semantic Fields --
490 ------------------------------------
492 -- The meaning of the syntactic fields is generally clear from their names
493 -- without any further description, since the names are chosen to
494 -- correspond very closely to the syntax in the reference manual. This
495 -- section describes the usage of the semantic fields, which are used to
496 -- contain additional information determined during semantic analysis.
498 -- ABE_Is_Certain (Flag18-Sem)
499 -- This flag is set in an instantiation node or a call node is determined
500 -- to be sure to raise an ABE. This is used to trigger special handling
501 -- of such cases, particularly in the instantiation case where we avoid
502 -- instantiating the body if this flag is set. This flag is also present
503 -- in an N_Formal_Package_Declaration_Node since formal package
504 -- declarations are treated like instantiations, but it is always set to
505 -- False in this context.
507 -- Accept_Handler_Records (List5-Sem)
508 -- This field is present only in an N_Accept_Alternative node. It is used
509 -- to temporarily hold the exception handler records from an accept
510 -- statement in a selective accept. These exception handlers will
511 -- eventually be placed in the Handler_Records list of the procedure
512 -- built for this accept (see Expand_N_Selective_Accept procedure in
513 -- Exp_Ch9 for further details).
515 -- Access_Types_To_Process (Elist2-Sem)
516 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
517 -- Contains the list of access types which may require specific treatment
518 -- when the nature of the type completion is completely known. An example
519 -- of such treatement is the generation of the associated_final_chain.
521 -- Actions (List1-Sem)
522 -- This field contains a sequence of actions that are associated with the
523 -- node holding the field. See the individual node types for details of
524 -- how this field is used, as well as the description of the specific use
525 -- for a particular node type.
527 -- Activation_Chain_Entity (Node3-Sem)
528 -- This is used in tree nodes representing task activators (blocks,
529 -- subprogram bodies, package declarations, and task bodies). It is
530 -- initially Empty, and then gets set to point to the entity for the
531 -- declared Activation_Chain variable when the first task is declared.
532 -- When tasks are declared in the corresponding declarative region this
533 -- entity is located by name (its name is always _Chain) and the declared
534 -- tasks are added to the chain.
536 -- Acts_As_Spec (Flag4-Sem)
537 -- A flag set in the N_Subprogram_Body node for a subprogram body which
538 -- is acting as its own spec. This flag also appears in the compilation
539 -- unit node at the library level for such a subprogram (see further
540 -- description in spec of Lib package).
542 -- Actual_Designated_Subtype (Node2-Sem)
543 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
544 -- needs to known the dynamic constrained subtype of the designated
545 -- object, this attribute is set to that type. This is done for
546 -- N_Free_Statements for access-to-classwide types and access to
547 -- unconstrained packed array types, and for N_Explicit_Dereference when
548 -- the designated type is an unconstrained packed array and the
549 -- dereference is the prefix of a 'Size attribute reference.
551 -- Aggregate_Bounds (Node3-Sem)
552 -- Present in array N_Aggregate nodes. If the aggregate contains
553 -- component associations this field points to an N_Range node whose
554 -- bounds give the lowest and highest discrete choice values. If the
555 -- named aggregate contains a dynamic or null choice this field is empty.
556 -- If the aggregate contains positional elements this field points to an
557 -- N_Integer_Literal node giving the number of positional elements. Note
558 -- that if the aggregate contains positional elements and an other choice
559 -- the N_Integer_Literal only accounts for the number of positional
560 -- elements.
562 -- All_Others (Flag11-Sem)
563 -- Present in an N_Others_Choice node. This flag is set in the case of an
564 -- others exception where all exceptions are to be caught, even those
565 -- that are not normally handled (in particular the tasking abort
566 -- signal). This is used for translation of the at end handler into a
567 -- normal exception handler.
569 -- Assignment_OK (Flag15-Sem)
570 -- This flag is set in a subexpression node for an object, indicating
571 -- that the associated object can be modified, even if this would not
572 -- normally be permissible (either by direct assignment, or by being
573 -- passed as an out or in-out parameter). This is used by the expander
574 -- for a number of purposes, including initialzation of constants and
575 -- limited type objects (such as tasks), setting discriminant fields,
576 -- setting tag values, etc. N_Object_Declaration nodes also have this
577 -- flag defined. Here it is used to indicate that an initialization
578 -- expression is valid, even where it would normally not be allowed (e.g.
579 -- where the type involved is limited).
581 -- Associated_Node (Node4-Sem)
582 -- Present in nodes that can denote an entity: identifiers, character
583 -- literals, operator symbols, expanded names, operator nodes, and
584 -- attribute reference nodes (all these nodes have an Entity field). This
585 -- field is also present in N_Aggregate, N_Selected_Component, and
586 -- N_Extension_Aggregate nodes. This field is used in generic processing
587 -- to create links between the generic template and the generic copy. See
588 -- Sem_Ch12.Get_Associated_Node for full details. Note that this field
589 -- overlaps Entity, which is fine, since, as explained in Sem_Ch12, the
590 -- normal function of Entity is not required at the point where the
591 -- Associated_Node is set. Note also, that in generic templates, this
592 -- means that the Entity field does not necessarily point to an Entity.
593 -- Since the back end is expected to ignore generic templates, this is
594 -- harmless.
596 -- At_End_Proc (Node1)
597 -- This field is present in an N_Handled_Sequence_Of_Statements node. It
598 -- contains an identifier reference for the cleanup procedure to be
599 -- called. See description of this node for further details.
601 -- Backwards_OK (Flag6-Sem)
602 -- A flag present in the N_Assignment_Statement node. It is used only if
603 -- the type being assigned is an array type, and is set if analysis
604 -- determines that it is definitely safe to do the copy backwards, i.e.
605 -- starting at the highest addressed element. Note that if neither of the
606 -- flags Forwards_OK or Backwards_OK is set, it means that the front end
607 -- could not determine that either direction is definitely safe, and a
608 -- runtime check is required.
610 -- Body_To_Inline (Node3-Sem)
611 -- present in subprogram declarations. Denotes analyzed but unexpanded
612 -- body of subprogram, to be used when inlining calls. Present when the
613 -- subprogram has an Inline pragma and inlining is enabled. If the
614 -- declaration is completed by a renaming_as_body, and the renamed en-
615 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
616 -- which is used directly in later calls to the original subprogram.
618 -- Body_Required (Flag13-Sem)
619 -- A flag that appears in the N_Compilation_Unit node indicating that the
620 -- corresponding unit requires a body. For the package case, this
621 -- indicates that a completion is required. In Ada 95, if the flag is not
622 -- set for the package case, then a body may not be present. In Ada 83,
623 -- if the flag is not set for the package case, then body is optional.
624 -- For a subprogram declaration, the flag is set except in the case where
625 -- a pragma Import or Interface applies, in which case no body is
626 -- permitted (in Ada 83 or Ada 95).
628 -- By_Ref (Flag5-Sem)
629 -- A flag present in the N_Return_Statement_Node. It is set when the
630 -- returned expression is already allocated on the secondary stack and
631 -- thus the result is passed by reference rather than copied another
632 -- time.
634 -- Check_Address_Alignment (Flag11-Sem)
635 -- A flag present in N_Attribute_Definition clause for a 'Address
636 -- attribute definition. This flag is set if a dynamic check should be
637 -- generated at the freeze point for the entity to which this address
638 -- clause applies. The reason that we need this flag is that we want to
639 -- check for range checks being suppressed at the point where the
640 -- attribute definition clause is given, rather than testing this at the
641 -- freeze point.
643 -- Compile_Time_Known_Aggregate (Flag18-Sem)
644 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
645 -- evaluated at compile time without raising constraint error. Such
646 -- aggregates can be passed as is to Gigi without any expansion. See
647 -- Sem_Aggr for the specific conditions under which an aggregate has this
648 -- flag set. See also the flag Static_Processing_OK.
650 -- Condition_Actions (List3-Sem)
651 -- This field appears in else-if nodes and in the iteration scheme node
652 -- for while loops. This field is only used during semantic processing to
653 -- temporarily hold actions inserted into the tree. In the tree passed to
654 -- gigi, the condition actions field is always set to No_List. For
655 -- details on how this field is used, see the routine Insert_Actions in
656 -- package Exp_Util, and also the expansion routines for the relevant
657 -- nodes.
659 -- Controlling_Argument (Node1-Sem)
660 -- This field is set in procedure and function call nodes if the call is
661 -- a dispatching call (it is Empty for a non-dispatching call). It
662 -- indicates the source of the call's controlling tag. For procedure
663 -- calls, the Controlling_Argument is one of the actuals. For function
664 -- that has a dispatching result, it is an entity in the context of the
665 -- call that can provide a tag, or else it is the tag of the root type of
666 -- the class. It can also specify a tag directly rather than being a
667 -- tagged object. The latter is needed by the implementations of AI-239
668 -- and AI-260.
670 -- Conversion_OK (Flag14-Sem)
671 -- A flag set on type conversion nodes to indicate that the conversion is
672 -- to be considered as being valid, even though it is the case that the
673 -- conversion is not valid Ada. This is used for Enum_Rep, Fixed_Value
674 -- and Integer_Value attributes, for internal conversions done for
675 -- fixed-point operations, and for certain conversions for calls to
676 -- initialization procedures. If Conversion_OK is set, then Etype must be
677 -- set (the analyzer assumes that Etype has been set). For the case of
678 -- fixed-point operands, it also indicates that the conversion is to be
679 -- direct conversion of the underlying integer result, with no regard to
680 -- the small operand.
682 -- Corresponding_Body (Node5-Sem)
683 -- This field is set in subprogram declarations, package declarations,
684 -- entry declarations of protected types, and in generic units. It
685 -- points to the defining entity for the corresponding body (NOT the
686 -- node for the body itself).
688 -- Corresponding_Formal_Spec (Node3-Sem)
689 -- This field is set in subprogram renaming declarations, where it points
690 -- to the defining entity for a formal subprogram in the case where the
691 -- renaming corresponds to a generic formal subprogram association in an
692 -- instantiation. The field is Empty if the renaming does not correspond
693 -- to such a formal association.
695 -- Corresponding_Generic_Association (Node5-Sem)
696 -- This field is defined for object declarations and object renaming
697 -- declarations. It is set for the declarations within an instance that
698 -- map generic formals to their actuals. If set, the field points to
699 -- a generic_association which is the original parent of the expression
700 -- or name appearing in the declaration. This simplifies ASIS queries.
702 -- Corresponding_Integer_Value (Uint4-Sem)
703 -- This field is set in real literals of fixed-point types (it is not
704 -- used for floating-point types). It contains the integer value used
705 -- to represent the fixed-point value. It is also set on the universal
706 -- real literals used to represent bounds of fixed-point base types
707 -- and their first named subtypes.
709 -- Corresponding_Spec (Node5-Sem)
710 -- This field is set in subprogram, package, task, and protected body
711 -- nodes, where it points to the defining entity in the corresponding
712 -- spec. The attribute is also set in N_With_Clause nodes, where it
713 -- points to the defining entity for the with'ed spec, and in a
714 -- subprogram renaming declaration when it is a Renaming_As_Body. The
715 -- field is Empty if there is no corresponding spec, as in the case of a
716 -- subprogram body that serves as its own spec.
718 -- Corresponding_Stub (Node3-Sem)
719 -- This field is present in an N_Subunit node. It holds the node in
720 -- the parent unit that is the stub declaration for the subunit. it is
721 -- set when analysis of the stub forces loading of the proper body. If
722 -- expansion of the proper body creates new declarative nodes, they are
723 -- inserted at the point of the corresponding_stub.
725 -- Dcheck_Function (Node5-Sem)
726 -- This field is present in an N_Variant node, It references the entity
727 -- for the discriminant checking function for the variant.
729 -- Debug_Statement (Node3)
730 -- This field is present in an N_Pragma node. It is used only for a Debug
731 -- pragma. The parameter is of the form of an expression, as required by
732 -- the pragma syntax, but is actually a procedure call. To simplify
733 -- semantic processing, the parser creates a copy of the argument
734 -- rearranged into a procedure call statement and places it in the
735 -- Debug_Statement field. Note that this field is considered syntactic
736 -- field, since it is created by the parser.
738 -- Default_Expression (Node5-Sem)
739 -- This field is Empty if there is no default expression. If there is a
740 -- simple default expression (one with no side effects), then this field
741 -- simply contains a copy of the Expression field (both point to the tree
742 -- for the default expression). Default_Expression is used for
743 -- conformance checking.
745 -- Delay_Finalize_Attach (Flag14-Sem)
746 -- This flag is present in an N_Object_Declaration node. If it is set,
747 -- then in the case of a controlled type being declared and initialized,
748 -- the normal code for attaching the result to the appropriate local
749 -- finalization list is suppressed. This is used for functions that
750 -- return controlled types without using the secondary stack, where it is
751 -- the caller who must do the attachment.
753 -- Discr_Check_Funcs_Built (Flag11-Sem)
754 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
755 -- discriminant checking functions are constructed. The purpose is to
756 -- avoid attempting to set these functions more than once.
758 -- Do_Accessibility_Check (Flag13-Sem)
759 -- This flag is set on N_Parameter_Specification nodes to indicate
760 -- that an accessibility check is required for the parameter. It is
761 -- not yet decided who takes care of this check (TBD ???).
763 -- Do_Discriminant_Check (Flag13-Sem)
764 -- This flag is set on N_Selected_Component nodes to indicate that a
765 -- discriminant check is required using the discriminant check routine
766 -- associated with the selector. The actual check is generated by the
767 -- expander when processing selected components.
769 -- Do_Division_Check (Flag13-Sem)
770 -- This flag is set on a division operator (/ mod rem) to indicate
771 -- that a zero divide check is required. The actual check is dealt
772 -- with by the backend (all the front end does is to set the flag).
774 -- Do_Length_Check (Flag4-Sem)
775 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
776 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
777 -- is required. It is not determined who deals with this flag (???).
779 -- Do_Overflow_Check (Flag17-Sem)
780 -- This flag is set on an operator where an overflow check is required on
781 -- the operation. The actual check is dealt with by the backend (all the
782 -- front end does is to set the flag). The other cases where this flag is
783 -- used is on a Type_Conversion node and for attribute reference nodes.
784 -- For a type conversion, it means that the conversion is from one base
785 -- type to another, and the value may not fit in the target base type.
786 -- See also the description of Do_Range_Check for this case. The only
787 -- attribute references which use this flag are Pred and Succ, where it
788 -- means that the result should be checked for going outside the base
789 -- range.
791 -- Do_Range_Check (Flag9-Sem)
792 -- This flag is set on an expression which appears in a context where
793 -- a range check is required. The target type is clear from the
794 -- context. The contexts in which this flag can appear are limited to
795 -- the following.
797 -- Right side of an assignment. In this case the target type is
798 -- taken from the left side of the assignment, which is referenced
799 -- by the Name of the N_Assignment_Statement node.
801 -- Subscript expressions in an indexed component. In this case the
802 -- target type is determined from the type of the array, which is
803 -- referenced by the Prefix of the N_Indexed_Component node.
805 -- Argument expression for a parameter, appearing either directly in
806 -- the Parameter_Associations list of a call or as the Expression of an
807 -- N_Parameter_Association node that appears in this list. In either
808 -- case, the check is against the type of the formal. Note that the
809 -- flag is relevant only in IN and IN OUT parameters, and will be
810 -- ignored for OUT parameters, where no check is required in the call,
811 -- and if a check is required on the return, it is generated explicitly
812 -- with a type conversion.
814 -- Initialization expression for the initial value in an object
815 -- declaration. In this case the Do_Range_Check flag is set on
816 -- the initialization expression, and the check is against the
817 -- range of the type of the object being declared.
819 -- The expression of a type conversion. In this case the range check is
820 -- against the target type of the conversion. See also the use of
821 -- Do_Overflow_Check on a type conversion. The distinction is that the
822 -- overflow check protects against a value that is outside the range of
823 -- the target base type, whereas a range check checks that the
824 -- resulting value (which is a value of the base type of the target
825 -- type), satisfies the range constraint of the target type.
827 -- Note: when a range check is required in contexts other than those
828 -- listed above (e.g. in a return statement), an additional type
829 -- conversion node is introduced to represent the required check.
831 -- Do_Storage_Check (Flag17-Sem)
832 -- This flag is set in an N_Allocator node to indicate that a storage
833 -- check is required for the allocation, or in an N_Subprogram_Body node
834 -- to indicate that a stack check is required in the subprogram prolog.
835 -- The N_Allocator case is handled by the routine that expands the call
836 -- to the runtime routine. The N_Subprogram_Body case is handled by the
837 -- backend, and all the semantics does is set the flag.
839 -- Do_Tag_Check (Flag13-Sem)
840 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
841 -- N_Procedure_Call_Statement, N_Type_Conversion or N_Return_Statememt
842 -- node to indicate that the tag check can be suppressed. It is not
843 -- yet decided how this flag is used (TBD ???).
845 -- Elaborate_Present (Flag4-Sem)
846 -- This flag is set in the N_With_Clause node to indicate that pragma
847 -- Elaborate pragma appears for the with'ed units.
849 -- Elaborate_All_Desirable (Flag9-Sem)
850 -- This flag is set in the N_With_Clause mode to indicate that the static
851 -- elaboration processing has determined that an Elaborate_All pragma is
852 -- desirable for correct elaboration for this unit.
854 -- Elaborate_All_Present (Flag14-Sem)
855 -- This flag is set in the N_With_Clause node to indicate that a
856 -- pragma Elaborate_All pragma appears for the with'ed units.
858 -- Elaborate_Desirable (Flag11-Sem)
859 -- This flag is set in the N_With_Clause mode to indicate that the static
860 -- elaboration processing has determined that an Elaborate pragma is
861 -- desirable for correct elaboration for this unit.
863 -- Elaboration_Boolean (Node2-Sem)
864 -- This field is present in function and procedure specification
865 -- nodes. If set, it points to the entity for a Boolean flag that
866 -- must be tested for certain calls to check for access before
867 -- elaboration. See body of Sem_Elab for further details. This
868 -- field is Empty if no elaboration boolean is required.
870 -- Else_Actions (List3-Sem)
871 -- This field is present in conditional expression nodes. During code
872 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
873 -- actions at an appropriate place in the tree to get elaborated at the
874 -- right time. For conditional expressions, we have to be sure that the
875 -- actions for the Else branch are only elaborated if the condition is
876 -- False. The Else_Actions field is used as a temporary parking place for
877 -- these actions. The final tree is always rewritten to eliminate the
878 -- need for this field, so in the tree passed to Gigi, this field is
879 -- always set to No_List.
881 -- Enclosing_Variant (Node2-Sem)
882 -- This field is present in the N_Variant node and identifies the
883 -- Node_Id corresponding to the immediately enclosing variant when
884 -- the variant is nested, and N_Empty otherwise. Set during semantic
885 -- processing of the variant part of a record type.
887 -- Entity (Node4-Sem)
888 -- Appears in all direct names (identifier, character literal, operator
889 -- symbol), as well as expanded names, and attributes that denote
890 -- entities, such as 'Class. Points to the entity for the corresponding
891 -- defining occurrence. Set after name resolution. In the case of
892 -- identifiers in a WITH list, the corresponding defining occurrence is
893 -- in a separately compiled file, and this pointer must be set using the
894 -- library Load procedure. Note that during name resolution, the value in
895 -- Entity may be temporarily incorrect (e.g. during overload resolution,
896 -- Entity is initially set to the first possible correct interpretation,
897 -- and then later modified if necessary to contain the correct value
898 -- after resolution). Note that this field overlaps Associated_Node,
899 -- which is used during generic processing (see Sem_Ch12 for details).
900 -- Note also that in generic templates, this means that the Entity field
901 -- does not always point to an Entity. Since the back end is expected to
902 -- ignore generic templates, this is harmless.
904 -- Entity_Or_Associated_Node (Node4-Sem)
905 -- A synonym for both Entity and Associated_Node. Used by convention in
906 -- the code when referencing this field in cases where it is not known
907 -- whether the field contains an Entity or an Associated_Node.
909 -- Etype (Node5-Sem)
910 -- Appears in all expression nodes, all direct names, and all entities.
911 -- Points to the entity for the related type. Set after type resolution.
912 -- Normally this is the actual subtype of the expression. However, in
913 -- certain contexts such as the right side of an assignment, subscripts,
914 -- arguments to calls, returned value in a function, initial value etc.
915 -- it is the desired target type. In the event that this is different
916 -- from the actual type, the Do_Range_Check flag will be set if a range
917 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
918 -- points to an essentially arbitrary choice from the possible set of
919 -- types.
921 -- Exception_Junk (Flag7-Sem)
922 -- This flag is set in a various nodes appearing in a statement sequence
923 -- to indicate that the corresponding node is an artifact of the
924 -- generated code for exception handling, and should be ignored when
925 -- analyzing the control flow of the relevant sequence of statements
926 -- (e.g. to check that it does not end with a bad return statement).
928 -- Expansion_Delayed (Flag11-Sem)
929 -- Set on aggregates and extension aggregates that need a top-down rather
930 -- than bottom up expansion. Typically aggregate expansion happens bottom
931 -- up. For nested aggregates the expansion is delayed until the enclosing
932 -- aggregate itself is expanded, e.g. in the context of a declaration. To
933 -- delay it we set this flag. This is done to avoid creating a temporary
934 -- for each level of a nested aggregates, and also to prevent the
935 -- premature generation of constraint checks. This is also a requirement
936 -- if we want to generate the proper attachment to the internal
937 -- finalization lists (for record with controlled components). Top down
938 -- expansion of aggregates is also used for in-place array aggregate
939 -- assignment or initialization. When the full context is known, the
940 -- target of the assignment or initialization is used to generate the
941 -- left-hand side of individual assignment to each sub-component.
943 -- First_Inlined_Subprogram (Node3-Sem)
944 -- Present in the N_Compilation_Unit node for the main program. Points to
945 -- a chain of entities for subprograms that are to be inlined. The
946 -- Next_Inlined_Subprogram field of these entities is used as a link
947 -- pointer with Empty marking the end of the list. This field is Empty if
948 -- there are no inlined subprograms or inlining is not active.
950 -- First_Named_Actual (Node4-Sem)
951 -- Present in procedure call statement and function call nodes, and also
952 -- in Intrinsic nodes. Set during semantic analysis to point to the first
953 -- named parameter where parameters are ordered by declaration order (as
954 -- opposed to the actual order in the call which may be different due to
955 -- named associations). Note: this field points to the explicit actual
956 -- parameter itself, not the N_Parameter_Association node (its parent).
958 -- First_Real_Statement (Node2-Sem)
959 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
960 -- Empty. Used only when declarations are moved into the statement part
961 -- of a construct as a result of wrapping an AT END handler that is
962 -- required to cover the declarations. In this case, this field is used
963 -- to remember the location in the statements list of the first real
964 -- statement, i.e. the statement that used to be first in the statement
965 -- list before the declarations were prepended.
967 -- First_Subtype_Link (Node5-Sem)
968 -- Present in N_Freeze_Entity node for an anonymous base type that is
969 -- implicitly created by the declaration of a first subtype. It points to
970 -- the entity for the first subtype.
972 -- Float_Truncate (Flag11-Sem)
973 -- A flag present in type conversion nodes. This is used for float to
974 -- integer conversions where truncation is required rather than rounding.
975 -- Note that Gigi does not handle type conversions from real to integer
976 -- with rounding (see Expand_N_Type_Conversion).
978 -- Forwards_OK (Flag5-Sem)
979 -- A flag present in the N_Assignment_Statement node. It is used only if
980 -- the type being assigned is an array type, and is set if analysis
981 -- determines that it is definitely safe to do the copy forwards, i.e.
982 -- starting at the lowest addressed element. Note that if neither of the
983 -- flags Forwards_OK or Backwards_OK is set, it means that the front end
984 -- could not determine that either direction is definitely safe, and a
985 -- runtime check is required.
987 -- From_At_Mod (Flag4-Sem)
988 -- This flag is set on the attribute definition clause node that is
989 -- generated by a transformation of an at mod phrase in a record
990 -- representation clause. This is used to give slightly different (Ada 83
991 -- compatible) semantics to such a clause, namely it is used to specify a
992 -- minimum acceptable alignment for the base type and all subtypes. In
993 -- Ada 95 terms, the actual alignment of the base type and all subtypes
994 -- must be a multiple of the given value, and the representation clause
995 -- is considered to be type specific instead of subtype specific.
997 -- From_Default (Flag6-Sem)
998 -- This flag is set on the subprogram renaming declaration created in an
999 -- instance for a formal subprogram, when the formal is declared with a
1000 -- box, and there is no explicit actual. If the flag is present, the
1001 -- declaration is treated as an implicit reference to the formal in the
1002 -- ali file.
1004 -- Generic_Parent (Node5-Sem)
1005 -- Generic_parent is defined on declaration nodes that are instances. The
1006 -- value of Generic_Parent is the generic entity from which the instance
1007 -- is obtained. Generic_Parent is also defined for the renaming
1008 -- declarations and object declarations created for the actuals in an
1009 -- instantiation. The generic parent of such a declaration is the
1010 -- corresponding generic association in the Instantiation node.
1012 -- Generic_Parent_Type (Node4-Sem)
1013 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1014 -- actuals of formal private and derived types. Within the instance, the
1015 -- operations on the actual are those inherited from the parent. For a
1016 -- formal private type, the parent type is the generic type itself. The
1017 -- Generic_Parent_Type is also used in an instance to determine whether a
1018 -- private operation overrides an inherited one.
1020 -- Handler_List_Entry (Node2-Sem)
1021 -- This field is present in N_Object_Declaration nodes. It is set only
1022 -- for the Handler_Record entry generated for an exception in zero cost
1023 -- exception handling mode. It references the corresponding item in the
1024 -- handler list, and is used to delete this entry if the corresponding
1025 -- handler is deleted during optimization. For further details on why
1026 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1028 -- Has_No_Elaboration_Code (Flag17-Sem)
1029 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1030 -- or not elaboration code is present for this unit. It is initially set
1031 -- true for subprogram specs and bodies and for all generic units and
1032 -- false for non-generic package specs and bodies. Gigi may set the flag
1033 -- in the non-generic package case if it determines that no elaboration
1034 -- code is generated. Note that this flag is not related to the
1035 -- Is_Preelaborated status, there can be preelaborated packages that
1036 -- generate elaboration code, and non- preelaborated packages which do
1037 -- not generate elaboration code.
1039 -- Has_Priority_Pragma (Flag6-Sem)
1040 -- A flag present in N_Subprogram_Body, N_Task_Definition and
1041 -- N_Protected_Definition nodes to flag the presence of either a Priority
1042 -- or Interrupt_Priority pragma in the declaration sequence (public or
1043 -- private in the task and protected cases)
1045 -- Has_Private_View (Flag11-Sem)
1046 -- A flag present in generic nodes that have an entity, to indicate that
1047 -- the node has a private type. Used to exchange private and full
1048 -- declarations if the visibility at instantiation is different from the
1049 -- visibility at generic definition.
1051 -- Has_Storage_Size_Pragma (Flag5-Sem)
1052 -- A flag present in an N_Task_Definition node to flag the presence of a
1053 -- Storage_Size pragma.
1055 -- Has_Task_Info_Pragma (Flag7-Sem)
1056 -- A flag present in an N_Task_Definition node to flag the presence of a
1057 -- Task_Info pragma. Used to detect duplicate pragmas.
1059 -- Has_Task_Name_Pragma (Flag8-Sem)
1060 -- A flag present in N_Task_Definition nodes to flag the presence of a
1061 -- Task_Name pragma in the declaration sequence for the task.
1063 -- Has_Wide_Character (Flag11-Sem)
1064 -- Present in string literals, set if any wide character (i.e. character
1065 -- code outside the Character range) appears in the string.
1067 -- Hidden_By_Use_Clause (Elist4-Sem)
1068 -- An entity list present in use clauses that appear within
1069 -- instantiations. For the resolution of local entities, entities
1070 -- introduced by these use clauses have priority over global ones, and
1071 -- outer entities must be explicitly hidden/restored on exit.
1073 -- Implicit_With (Flag16-Sem)
1074 -- This flag is set in the N_With_Clause node that is implicitly
1075 -- generated for runtime units that are loaded by the expander, and also
1076 -- for package System, if it is loaded implicitly by a use of the
1077 -- 'Address or 'Tag attribute.
1079 -- Includes_Infinities (Flag11-Sem)
1080 -- This flag is present in N_Range nodes. It is set for the range of
1081 -- unconstrained float types defined in Standard, which include not only
1082 -- the given range of values, but also legtitimately can include infinite
1083 -- values. This flag is false for any float type for which an explicit
1084 -- range is given by the programmer, even if that range is identical to
1085 -- the range for Float.
1087 -- Instance_Spec (Node5-Sem)
1088 -- This field is present in generic instantiation nodes, and also in
1089 -- formal package declaration nodes (formal package declarations are
1090 -- treated in a manner very similar to package instantiations). It points
1091 -- to the node for the spec of the instance, inserted as part of the
1092 -- semantic processing for instantiations in Sem_Ch12.
1094 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1095 -- A flag set in a Block_Statement node to indicate that it is the
1096 -- expansion of an asynchronous entry call. Such a block needs cleanup
1097 -- handler to assure that the call is cancelled.
1099 -- Is_Component_Left_Opnd (Flag13-Sem)
1100 -- Is_Component_Right_Opnd (Flag14-Sem)
1101 -- Present in concatenation nodes, to indicate that the corresponding
1102 -- operand is of the component type of the result. Used in resolving
1103 -- concatenation nodes in instances.
1105 -- Is_Controlling_Actual (Flag16-Sem)
1106 -- This flag is set on in an expression that is a controlling argument in
1107 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1108 -- details of its use.
1110 -- Is_In_Discriminant_Check (Flag11-Sem)
1111 -- This flag is present in a selected component, and is used to indicate
1112 -- that the reference occurs within a discriminant check. The
1113 -- significance is that optimizations based on assuming that the
1114 -- discriminant check has a correct value cannot be performed in this
1115 -- case (or the disriminant check may be optimized away!)
1117 -- Is_Machine_Number (Flag11-Sem)
1118 -- This flag is set in an N_Real_Literal node to indicate that the value
1119 -- is a machine number. This avoids some unnecessary cases of converting
1120 -- real literals to machine numbers.
1122 -- Is_Null_Loop (Flag16-Sem)
1123 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1124 -- can be determined to be null at compile time. This is used to suppress
1125 -- any warnings that would otherwise be issued inside the loop since they
1126 -- are probably not useful.
1128 -- Is_Overloaded (Flag5-Sem)
1129 -- A flag present in all expression nodes. Used temporarily during
1130 -- overloading determination. The setting of this flag is not relevant
1131 -- once overloading analysis is complete.
1133 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1134 -- A flag present only in N_Op_Expon nodes. It is set when the
1135 -- exponentiation is of the forma 2 ** N, where the type of N is an
1136 -- unsigned integral subtype whose size does not exceed the size of
1137 -- Standard_Integer (i.e. a type that can be safely converted to
1138 -- Natural), and the exponentiation appears as the right operand of an
1139 -- integer multiplication or an integer division where the dividend is
1140 -- unsigned. It is also required that overflow checking is off for both
1141 -- the exponentiation and the multiply/divide node. If this set of
1142 -- conditions holds, and the flag is set, then the division or
1143 -- multiplication can be (and is) converted to a shift.
1145 -- Is_Overloaded (Flag5-Sem)
1146 -- A flag present in all expression nodes. Used temporarily during
1147 -- overloading determination. The setting of this flag is not relevant
1148 -- once overloading analysis is complete.
1150 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1151 -- A flag set in a Subprogram_Body block to indicate that it is the
1152 -- implemenation of a protected subprogram. Such a body needs cleanup
1153 -- handler to make sure that the associated protected object is unlocked
1154 -- when the subprogram completes.
1156 -- Is_Static_Expression (Flag6-Sem)
1157 -- Indicates that an expression is a static expression (RM 4.9). See spec
1158 -- of package Sem_Eval for full details on the use of this flag.
1160 -- Is_Subprogram_Descriptor (Flag16-Sem)
1161 -- Present in N_Object_Declaration, and set only for the object
1162 -- declaration generated for a subprogram descriptor in fast exception
1163 -- mode. See Exp_Ch11 for details of use.
1165 -- Is_Task_Allocation_Block (Flag6-Sem)
1166 -- A flag set in a Block_Statement node to indicate that it is the
1167 -- expansion of a task allocator, or the allocator of an object
1168 -- containing tasks. Such a block requires a cleanup handler to call
1169 -- Expunge_Unactivted_Tasks to complete any tasks that have been
1170 -- allocated but not activated when the allocator completes abnormally.
1172 -- Is_Task_Master (Flag5-Sem)
1173 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1174 -- indicate that the construct is a task master (i.e. has declared tasks
1175 -- or declares an access to a task type).
1177 -- Itype (Node1-Sem)
1178 -- Used in N_Itype_Reference node to reference an itype for which it is
1179 -- important to ensure that it is defined. See description of this node
1180 -- for further details.
1182 -- Kill_Range_Check (Flag11-Sem)
1183 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1184 -- result should not be subjected to range checks. This is used for the
1185 -- implementation of Normalize_Scalars.
1187 -- Label_Construct (Node2-Sem)
1188 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1189 -- N_Block_Statement or N_Loop_Statement node to which the label
1190 -- declaration applies. This is not currently used in the compiler
1191 -- itself, but it is useful in the implementation of ASIS queries.
1193 -- Library_Unit (Node4-Sem)
1194 -- In a stub node, Library_Unit points to the compilation unit node of
1195 -- the corresponding subunit.
1197 -- In a with clause node, Library_Unit points to the spec of the with'ed
1198 -- unit.
1200 -- In a compilation unit node, the usage depends on the unit type:
1202 -- For a subprogram body, Library_Unit points to the compilation unit
1203 -- node of the corresponding spec, unless Acts_As_Spec is set, in which
1204 -- case it points to itself.
1206 -- For a package body, Library_Unit points to the compilation unit of
1207 -- the corresponding package spec.
1209 -- For a subprogram spec to which pragma Inline applies, Library_Unit
1210 -- points to the compilation unit node of the corresponding body, if
1211 -- inlining is active.
1213 -- For a generic declaration, Library_Unit points to the compilation
1214 -- unit node of the corresponding generic body.
1216 -- For a subunit, Library_Unit points to the compilation unit node of
1217 -- the parent body.
1219 -- Note that this field is not used to hold the parent pointer for child
1220 -- unit (which might in any case need to use it for some other purpose as
1221 -- described above). Instead for a child unit, implicit with's are
1222 -- generated for all parents.
1224 -- Loop_Actions (List2-Sem)
1225 -- A list present in Component_Association nodes in array aggregates.
1226 -- Used to collect actions that must be executed within the loop because
1227 -- they may need to be evaluated anew each time through.
1229 -- Limited_View_Installed (Flag18-Sem)
1230 -- Present in With_Clauses and in package specifications. If set on
1231 -- with_clause, it indicates that this clause has created the current
1232 -- limited view of the designated package. On a package specification, it
1233 -- indicates that the limited view has already been created because the
1234 -- package is mentioned in a limited_with_clause in the closure of the
1235 -- unit being compiled.
1237 -- Must_Be_Byte_Aligned (Flag14-Sem)
1238 -- This flag is present in N_Attribute_Reference nodes. It can be set
1239 -- only for the Address and Unrestricted_Access attributes. If set it
1240 -- means that the object for which the address/access is given must be on
1241 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
1242 -- of the object is to be made before taking the address (this copy is in
1243 -- the current scope on the stack frame). This is used for certain cases
1244 -- of code generated by the expander that passes parameters by address.
1246 -- The reason the copy is not made by the front end is that the back end
1247 -- has more information about type layout and may be able to (but is not
1248 -- guaranteed to) prevent making unnecessary copies.
1250 -- Must_Not_Freeze (Flag8-Sem)
1251 -- A flag present in all expression nodes. Normally expressions cause
1252 -- freezing as described in the RM. If this flag is set, then this is
1253 -- inhibited. This is used by the analyzer and expander to label nodes
1254 -- that are created by semantic analysis or expansion and which must not
1255 -- cause freezing even though they normally would. This flag is also
1256 -- present in an N_Subtype_Indication node, since we also use these in
1257 -- calls to Freeze_Expression.
1259 -- Next_Entity (Node2-Sem)
1260 -- Present in defining identifiers, defining character literals and
1261 -- defining operator symbols (i.e. in all entities). The entities of a
1262 -- scope are chained, and this field is used as the forward pointer for
1263 -- this list. See Einfo for further details.
1265 -- Next_Named_Actual (Node4-Sem)
1266 -- Present in parameter association node. Set during semantic analysis to
1267 -- point to the next named parameter, where parameters are ordered by
1268 -- declaration order (as opposed to the actual order in the call, which
1269 -- may be different due to named associations). Not that this field
1270 -- points to the explicit actual parameter itself, not to the
1271 -- N_Parameter_Association node (its parent).
1273 -- Next_Rep_Item (Node4-Sem)
1274 -- Present in pragma nodes and attribute definition nodes. Used to link
1275 -- representation items that apply to an entity. See description of
1276 -- First_Rep_Item field in Einfo for full details.
1278 -- Next_Use_Clause (Node3-Sem)
1279 -- While use clauses are active during semantic processing, they are
1280 -- chained from the scope stack entry, using Next_Use_Clause as a link
1281 -- pointer, with Empty marking the end of the list. The head pointer is
1282 -- in the scope stack entry (First_Use_Clause). At the end of semantic
1283 -- processing (i.e. when Gigi sees the tree, the contents of this field
1284 -- is undefined and should not be read).
1286 -- No_Ctrl_Actions (Flag7-Sem)
1287 -- Present in N_Assignment_Statement to indicate that no finalize nor nor
1288 -- adjust should take place on this assignment eventhough the rhs is
1289 -- controlled. This is used in init procs and aggregate expansions where
1290 -- the generated assignments are more initialisations than real
1291 -- assignments.
1293 -- No_Elaboration_Check (Flag14-Sem)
1294 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1295 -- that no elaboration check is needed on the call, because it appears in
1296 -- the context of a local Suppress pragma. This is used on calls within
1297 -- task bodies, where the actual elaboration checks are applied after
1298 -- analysis, when the local scope stack is not present.
1300 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1301 -- Present in N_With_Clause nodes. Set if the with clause is on the
1302 -- package or subprogram spec where the main unit is the corresponding
1303 -- body, and no entities of the with'ed unit are referenced by the spec
1304 -- (an entity may still be referenced in the body, so this flag is used
1305 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1306 -- full details)
1308 -- No_Initialization (Flag13-Sem)
1309 -- Present in N_Object_Declaration & N_Allocator to indicate that the
1310 -- object must not be initialized (by Initialize or call to an init
1311 -- proc). This is needed for controlled aggregates. When the Object
1312 -- declaration has an expression, this flag means that this expression
1313 -- should not be taken into account (needed for in place initialization
1314 -- with aggregates)
1316 -- No_Truncation (Flag17-Sem)
1317 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
1318 -- only if the RM_Size of the source is greater than the RM_Size of the
1319 -- target for scalar operands. Normally in such a case we truncate some
1320 -- higher order bits of the source, and then sign/zero extend the result
1321 -- to form the output value. But if this flag is set, then we do not do
1322 -- any truncation, so for example, if an 8 bit input is converted to 5
1323 -- bit result which is in fact stored in 8 bits, then the high order
1324 -- three bits of the target result will be copied from the source. This
1325 -- is used for properly setting out of range values for use by pragmas
1326 -- Initialize_Scalars and Normalize_Scalars.
1328 -- Original_Discriminant (Node2-Sem)
1329 -- Present in identifiers. Used in references to discriminants that
1330 -- appear in generic units. Because the names of the discriminants may be
1331 -- different in an instance, we use this field to recover the position of
1332 -- the discriminant in the original type, and replace it with the
1333 -- discriminant at the same position in the instantiated type.
1335 -- Original_Entity (Node2-Sem)
1336 -- Present in numeric literals. Used to denote the named number that has
1337 -- been constant-folded into the given literal. If literal is from
1338 -- source, or the result of some other constant-folding operation, then
1339 -- Original_Entity is empty. This field is needed to handle properly
1340 -- named numbers in generic units, where the Associated_Node field
1341 -- interferes with the Entity field, making it impossible to preserve the
1342 -- original entity at the point of instantiation (ASIS problem).
1344 -- Others_Discrete_Choices (List1-Sem)
1345 -- When a case statement or variant is analyzed, the semantic checks
1346 -- determine the actual list of choices that correspond to an others
1347 -- choice. This list is materialized for later use by the expander and
1348 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
1349 -- this materialized list of choices, which is in standard format for a
1350 -- list of discrete choices, except that of course it cannot contain an
1351 -- N_Others_Choice entry.
1353 -- Parameter_List_Truncated (Flag17-Sem)
1354 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. Set
1355 -- (for OpenVMS ports of GNAT only) if the parameter list is truncated as
1356 -- a result of a First_Optional_Parameter specification in an
1357 -- Import_Function, Import_Procedure, or Import_Valued_Procedure pragma.
1358 -- The truncation is done by the expander by removing trailing parameters
1359 -- from the argument list, in accordance with the set of rules allowing
1360 -- such parameter removal. In particular, parameters can be removed
1361 -- working from the end of the parameter list backwards up to and
1362 -- including the entry designated by First_Optional_Parameter in the
1363 -- Import pragma. Parameters can be removed if they are implicit and the
1364 -- default value is a known-at-compile-time value, including the use of
1365 -- the Null_Parameter attribute, or if explicit parameter values are
1366 -- present that match the corresponding defaults.
1368 -- Parent_Spec (Node4-Sem)
1369 -- For a library unit that is a child unit spec (package or subprogram
1370 -- declaration, generic declaration or instantiation, or library level
1371 -- rename, this field points to the compilation unit node for the parent
1372 -- package specification. This field is Empty for library bodies (the
1373 -- parent spec in this case can be found from the corresponding spec).
1375 -- Present_Expr (Uint3-Sem)
1376 -- Present in an N_Variant node. This has a meaningful value only after
1377 -- Gigi has back annotated the tree with representation information. At
1378 -- this point, it contains a reference to a gcc expression that depends
1379 -- on the values of one or more discriminants. Give a set of discriminant
1380 -- values, this expression evaluates to False (zero) if variant is not
1381 -- present, and True (non-zero) if it is present. See unit Repinfo for
1382 -- further details on gigi back annotation. This field is used during
1383 -- ASIS processing (data decomposition annex) to determine if a field is
1384 -- present or not.
1386 -- Print_In_Hex (Flag13-Sem)
1387 -- Set on an N_Integer_Literal node to indicate that the value should be
1388 -- printed in hexadecimal in the sprint listing. Has no effect on
1389 -- legality or semantics of program, only on the displayed output. This
1390 -- is used to clarify output from the packed array cases.
1392 -- Procedure_To_Call (Node4-Sem)
1393 -- Present in N_Allocator, N_Free_Statement, and N_Return_Statement
1394 -- nodes. References the entity for the declaration of the procedure to
1395 -- be called to accomplish the required operation (i.e. for the Allocate
1396 -- procedure in the case of N_Allocator and N_Return_Statement (for
1397 -- allocating the return value), and for the Deallocate procedure in the
1398 -- case of N_Free_Statement.
1400 -- Raises_Constraint_Error (Flag7-Sem)
1401 -- Set on an expression whose evaluation will definitely fail constraint
1402 -- error check. In the case of static expressions, this flag must be set
1403 -- accurately (and if it is set, the expression is typically illegal
1404 -- unless it appears as a non-elaborated branch of a short-circuit form).
1405 -- For a non-static expression, this flag may be set whenever an
1406 -- expression (e.g. an aggregate) is known to raise constraint error. If
1407 -- set, the expression definitely will raise CE if elaborated at runtime.
1408 -- If not set, the expression may or may not raise CE. In other words, on
1409 -- static expressions, the flag is set accurately, on non-static
1410 -- expressions it is set conservatively.
1412 -- Redundant_Use (Flag13-Sem)
1413 -- Present in nodes that can appear as an operand in a use clause or use
1414 -- type clause (identifiers, expanded names, attribute references). Set
1415 -- to indicate that a use is redundant (and therefore need not be undone
1416 -- on scope exit).
1418 -- Return_Type (Node2-Sem)
1419 -- Present in N_Return_Statement node. For a procedure, this is set to
1420 -- Standard_Void_Type. For a function it references the entity for the
1421 -- returned type.
1423 -- Rounded_Result (Flag18-Sem)
1424 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1425 -- Used in the fixed-point cases to indicate that the result must be
1426 -- rounded as a result of the use of the 'Round attribute. Also used for
1427 -- integer N_Op_Divide nodes to indicate that the result should be
1428 -- rounded to the nearest integer (breaking ties away from zero), rather
1429 -- than truncated towards zero as usual. These rounded integer operations
1430 -- are the result of expansion of rounded fixed-point divide, conversion
1431 -- and multiplication operations.
1433 -- Scope (Node3-Sem)
1434 -- Present in defining identifiers, defining character literals and
1435 -- defining operator symbols (i.e. in all entities). The entities of a
1436 -- scope all use this field to reference the corresponding scope entity.
1437 -- See Einfo for further details.
1439 -- Shift_Count_OK (Flag4-Sem)
1440 -- A flag present in shift nodes to indicate that the shift count is
1441 -- known to be in range, i.e. is in the range from zero to word length
1442 -- minus one. If this flag is not set, then the shift count may be
1443 -- outside this range, i.e. larger than the word length, and the code
1444 -- must ensure that such shift counts give the appropriate result.
1446 -- Source_Type (Node1-Sem)
1447 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1448 -- source type entity for the unchecked conversion instantiation
1449 -- which gigi must do size validation for.
1451 -- Static_Processing_OK (Flag4-Sem)
1452 -- Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate
1453 -- flag is set, the full value of the aggregate can be determined at
1454 -- compile time and the aggregate can be passed as is to the back-end. In
1455 -- this event it is irrelevant whether this flag is set or not. However,
1456 -- if the Compile_Time_Known_Aggregate flag is not set but
1457 -- Static_Processing_OK is set, the aggregate can (but need not) be
1458 -- converted into a compile time known aggregate by the expander. See
1459 -- Sem_Aggr for the specific conditions under which an aggregate has its
1460 -- Static_Processing_OK flag set.
1462 -- Storage_Pool (Node1-Sem)
1463 -- Present in N_Allocator, N_Free_Statement and N_Return_Statement nodes.
1464 -- References the entity for the storage pool to be used for the allocate
1465 -- or free call or for the allocation of the returned value from a
1466 -- function. Empty indicates that the global default default pool is to
1467 -- be used. Note that in the case of a return statement, this field is
1468 -- set only if the function returns value of a type whose size is not
1469 -- known at compile time on the secondary stack. It is never set on
1470 -- targets for which the parameter Functions_Return_By_DSP_On_Target in
1471 -- Targparm is True.
1473 -- Target_Type (Node2-Sem)
1474 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
1475 -- type entity for the unchecked conversion instantiation which gigi must
1476 -- do size validation for.
1478 -- Then_Actions (List3-Sem)
1479 -- This field is present in conditional expression nodes. During code
1480 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1481 -- actions at an appropriate place in the tree to get elaborated at the
1482 -- right time. For conditional expressions, we have to be sure that the
1483 -- actions for the Then branch are only elaborated if the condition is
1484 -- True. The Then_Actions field is used as a temporary parking place for
1485 -- these actions. The final tree is always rewritten to eliminate the
1486 -- need for this field, so in the tree passed to Gigi, this field is
1487 -- always set to No_List.
1489 -- Treat_Fixed_As_Integer (Flag14-Sem)
1490 -- This flag appears in operator nodes for divide, multiply, mod and rem
1491 -- on fixed-point operands. It indicates that the operands are to be
1492 -- treated as integer values, ignoring small values. This flag is only
1493 -- set as a result of expansion of fixed-point operations. Typically a
1494 -- fixed-point multplication in the source generates subsidiary
1495 -- multiplication and division operations that work with the underlying
1496 -- integer values and have this flag set. Note that this flag is not
1497 -- needed on other arithmetic operations (add, neg, subtract etc) since
1498 -- in these cases it is always the case that fixed is treated as integer.
1499 -- The Etype field MUST be set if this flag is set. The analyzer knows to
1500 -- leave such nodes alone, and whoever makes them must set the correct
1501 -- Etype value.
1503 -- TSS_Elist (Elist3-Sem)
1504 -- Present in N_Freeze_Entity nodes. Holds an element list containing
1505 -- entries for each TSS (type support subprogram) associated with the
1506 -- frozen type. The elements of the list are the entities for the
1507 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
1508 -- if there are no type support subprograms for the type or if the freeze
1509 -- node is not for a type.
1511 -- Unreferenced_In_Spec (Flag7-Sem)
1512 -- Present in N_With_Clause nodes. Set if the with clause is on the
1513 -- package or subprogram spec where the main unit is the corresponding
1514 -- body, and is not referenced by the spec (it may still be referenced by
1515 -- the body, so this flag is used to generate the proper message (see
1516 -- Sem_Util.Check_Unused_Withs for details)
1518 -- Was_Originally_Stub (Flag13-Sem)
1519 -- This flag is set in the node for a proper body that replaces stub.
1520 -- During the analysis procedure, stubs in some situations get rewritten
1521 -- by the corresponding bodies, and we set this flag to remember that
1522 -- this happened. Note that it is not good enough to rely on the use of
1523 -- Original_Node here because of the case of nested instantiations where
1524 -- the substituted node can be copied.
1526 -- Zero_Cost_Handling (Flag5-Sem)
1527 -- This flag is set in all handled sequence of statement and exception
1528 -- handler nodes if eceptions are to be handled using the zero-cost
1529 -- mechanism (see Ada.Exceptions and System.Exceptions in files
1530 -- a-except.ads/adb and s-except.ads for full details). What gigi needs
1531 -- to do for such a handler is simply to put the code in the handler
1532 -- somewhere. The front end has generated all necessary labels.
1534 --------------------------------------------------
1535 -- Note on Use of End_Label and End_Span Fields --
1536 --------------------------------------------------
1538 -- Several constructs have end lines:
1540 -- Loop Statement end loop [loop_IDENTIFIER];
1541 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
1542 -- Task Definition end [task_IDENTIFIER]
1543 -- Protected Definition end [protected_IDENTIFIER]
1544 -- Protected Body end [protected_IDENTIFIER]
1546 -- Block Statement end [block_IDENTIFIER];
1547 -- Subprogram Body end [DESIGNATOR];
1548 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
1549 -- Task Body end [task_IDENTIFIER];
1550 -- Accept Statement end [entry_IDENTIFIER]];
1551 -- Entry Body end [entry_IDENTIFIER];
1553 -- If Statement end if;
1554 -- Case Statement end case;
1556 -- Record Definition end record;
1557 -- Enumeration Definition );
1559 -- The End_Label and End_Span fields are used to mark the locations of
1560 -- these lines, and also keep track of the label in the case where a label
1561 -- is present.
1563 -- For the first group above, the End_Label field of the corresponding node
1564 -- is used to point to the label identifier. In the case where there is no
1565 -- label in the source, the parser supplies a dummy identifier (with
1566 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
1567 -- marks the location of the token following the END token.
1569 -- For the second group, the use of End_Label is similar, but the End_Label
1570 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
1571 -- simply because in some cases there is no room in the parent node.
1573 -- For the third group, there is never any label, and instead of using
1574 -- End_Label, we use the End_Span field which gives the location of the
1575 -- token following END, relative to the starting Sloc of the construct,
1576 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
1577 -- following the End_Label.
1579 -- The record definition case is handled specially, we treat it as though
1580 -- it required an optional label which is never present, and so the parser
1581 -- always builds a dummy identifier with Comes From Source set False. The
1582 -- reason we do this, rather than using End_Span in this case, is that we
1583 -- want to generate a cross-ref entry for the end of a record, since it
1584 -- represents a scope for name declaration purposes.
1586 -- The enumeration definition case is handled in an exactly similar manner,
1587 -- building a dummy identifier to get a cross-reference.
1589 -- Note: the reason we store the difference as a Uint, instead of storing
1590 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
1591 -- distinguished from other types of values, and we count on all general
1592 -- use fields being self describing. To make things easier for clients,
1593 -- note that we provide function End_Location, and procedure
1594 -- Set_End_Location to allow access to the logical value (which is the
1595 -- Source_Ptr value for the end token).
1597 ---------------------
1598 -- Syntactic Nodes --
1599 ---------------------
1601 ---------------------
1602 -- 2.3 Identifier --
1603 ---------------------
1605 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
1606 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
1608 -- An IDENTIFIER shall not be a reserved word
1610 -- In the Ada grammar identifiers are the bottom level tokens which have
1611 -- very few semantics. Actual program identifiers are direct names. If
1612 -- we were being 100% honest with the grammar, then we would have a node
1613 -- called N_Direct_Name which would point to an identifier. However,
1614 -- that's too many extra nodes, so we just use the N_Identifier node
1615 -- directly as a direct name, and it contains the expression fields and
1616 -- Entity field that correspond to its use as a direct name. In those
1617 -- few cases where identifiers appear in contexts where they are not
1618 -- direct names (pragmas, pragma argument associations, attribute
1619 -- references and attribute definition clauses), the Chars field of the
1620 -- node contains the Name_Id for the identifier name.
1622 -- Note: in GNAT, a reserved word can be treated as an identifier in two
1623 -- cases. First, an incorrect use of a reserved word as an identifier is
1624 -- diagnosed and then treated as a normal identifier. Second, an
1625 -- attribute designator of the form of a reserved word (access, delta,
1626 -- digits, range) is treated as an identifier.
1628 -- Note: The set of letters that is permitted in an identifier depends
1629 -- on the character set in use. See package Csets for full details.
1631 -- N_Identifier
1632 -- Sloc points to identifier
1633 -- Chars (Name1) contains the Name_Id for the identifier
1634 -- Entity (Node4-Sem)
1635 -- Associated_Node (Node4-Sem)
1636 -- Original_Discriminant (Node2-Sem)
1637 -- Redundant_Use (Flag13-Sem)
1638 -- Has_Private_View (Flag11-Sem) (set in generic units)
1639 -- plus fields for expression
1641 --------------------------
1642 -- 2.4 Numeric Literal --
1643 --------------------------
1645 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
1647 ----------------------------
1648 -- 2.4.1 Decimal Literal --
1649 ----------------------------
1651 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
1653 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
1655 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
1657 -- Decimal literals appear in the tree as either integer literal nodes
1658 -- or real literal nodes, depending on whether a period is present.
1660 -- Note: literal nodes appear as a result of direct use of literals
1661 -- in the source program, and also as the result of evaluating
1662 -- expressions at compile time. In the latter case, it is possible
1663 -- to construct real literals that have no syntactic representation
1664 -- using the standard literal format. Such literals are listed by
1665 -- Sprint using the notation [numerator / denominator].
1667 -- Note: the value of an integer literal node created by the front end
1668 -- is never outside the range of values of the base type. However, it
1669 -- can be the case that the value is outside the range of the
1670 -- particular subtype. This happens in the case of integer overflows
1671 -- with checks suppressed.
1673 -- N_Integer_Literal
1674 -- Sloc points to literal
1675 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1676 -- has been constant-folded into its literal value.
1677 -- Intval (Uint3) contains integer value of literal
1678 -- plus fields for expression
1679 -- Print_In_Hex (Flag13-Sem)
1681 -- N_Real_Literal
1682 -- Sloc points to literal
1683 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1684 -- has been constant-folded into its literal value.
1685 -- Realval (Ureal3) contains real value of literal
1686 -- Corresponding_Integer_Value (Uint4-Sem)
1687 -- Is_Machine_Number (Flag11-Sem)
1688 -- plus fields for expression
1690 --------------------------
1691 -- 2.4.2 Based Literal --
1692 --------------------------
1694 -- BASED_LITERAL ::=
1695 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
1697 -- BASE ::= NUMERAL
1699 -- BASED_NUMERAL ::=
1700 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
1702 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
1704 -- Based literals appear in the tree as either integer literal nodes
1705 -- or real literal nodes, depending on whether a period is present.
1707 ----------------------------
1708 -- 2.5 Character Literal --
1709 ----------------------------
1711 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
1713 -- N_Character_Literal
1714 -- Sloc points to literal
1715 -- Chars (Name1) contains the Name_Id for the identifier
1716 -- Char_Literal_Value (Uint2) contains the literal value
1717 -- Entity (Node4-Sem)
1718 -- Associated_Node (Node4-Sem)
1719 -- Has_Private_View (Flag11-Sem) set in generic units.
1720 -- plus fields for expression
1722 -- Note: the Entity field will be missing (set to Empty) for character
1723 -- literals whose type is Standard.Wide_Character or Standard.Character
1724 -- or a type derived from one of these two. In this case the character
1725 -- literal stands for its own coding. The reason we take this irregular
1726 -- short cut is to avoid the need to build lots of junk defining
1727 -- character literal nodes.
1729 -------------------------
1730 -- 2.6 String Literal --
1731 -------------------------
1733 -- STRING LITERAL ::= "{STRING_ELEMENT}"
1735 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
1736 -- single GRAPHIC_CHARACTER other than a quotation mark.
1738 -- N_String_Literal
1739 -- Sloc points to literal
1740 -- Strval (Str3) contains Id of string value
1741 -- Has_Wide_Character (Flag11-Sem)
1742 -- plus fields for expression
1744 ------------------
1745 -- 2.7 Comment --
1746 ------------------
1748 -- A COMMENT starts with two adjacent hyphens and extends up to the
1749 -- end of the line. A COMMENT may appear on any line of a program.
1751 -- Comments are skipped by the scanner and do not appear in the tree.
1752 -- It is possible to reconstruct the position of comments with respect
1753 -- to the elements of the tree by using the source position (Sloc)
1754 -- pointers that appear in every tree node.
1756 -----------------
1757 -- 2.8 Pragma --
1758 -----------------
1760 -- PRAGMA ::= pragma IDENTIFIER
1761 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
1763 -- Note that a pragma may appear in the tree anywhere a declaration
1764 -- or a statement may appear, as well as in some other situations
1765 -- which are explicitly documented.
1767 -- N_Pragma
1768 -- Sloc points to PRAGMA
1769 -- Chars (Name1) identifier name from pragma identifier
1770 -- Pragma_Argument_Associations (List2) (set to No_List if none)
1771 -- Debug_Statement (Node3) (set to Empty if not Debug, Assert)
1772 -- Next_Rep_Item (Node4-Sem)
1774 -- Note: we should have a section on what pragmas are passed on to
1775 -- the back end to be processed. This section should note that pragma
1776 -- Psect_Object is always converted to Common_Object, but there are
1777 -- undoubtedly many other similar notes required ???
1779 --------------------------------------
1780 -- 2.8 Pragma Argument Association --
1781 --------------------------------------
1783 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
1784 -- [pragma_argument_IDENTIFIER =>] NAME
1785 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
1787 -- N_Pragma_Argument_Association
1788 -- Sloc points to first token in association
1789 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
1790 -- Expression (Node3)
1792 ------------------------
1793 -- 2.9 Reserved Word --
1794 ------------------------
1796 -- Reserved words are parsed by the scanner, and returned as the
1797 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
1799 ----------------------------
1800 -- 3.1 Basic Declaration --
1801 ----------------------------
1803 -- BASIC_DECLARATION ::=
1804 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
1805 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
1806 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
1807 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
1808 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
1809 -- | GENERIC_INSTANTIATION
1811 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
1812 -- see further description in section on semantic nodes.
1814 -- Also, in the tree that is constructed, a pragma may appear
1815 -- anywhere that a declaration may appear.
1817 ------------------------------
1818 -- 3.1 Defining Identifier --
1819 ------------------------------
1821 -- DEFINING_IDENTIFIER ::= IDENTIFIER
1823 -- A defining identifier is an entity, which has additional fields
1824 -- depending on the setting of the Ekind field. These additional
1825 -- fields are defined (and access subprograms declared) in package
1826 -- Einfo.
1828 -- Note: N_Defining_Identifier is an extended node whose fields are
1829 -- deliberate layed out to match the layout of fields in an ordinary
1830 -- N_Identifier node allowing for easy alteration of an identifier
1831 -- node into a defining identifier node. For details, see procedure
1832 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
1834 -- N_Defining_Identifier
1835 -- Sloc points to identifier
1836 -- Chars (Name1) contains the Name_Id for the identifier
1837 -- Next_Entity (Node2-Sem)
1838 -- Scope (Node3-Sem)
1839 -- Etype (Node5-Sem)
1841 -----------------------------
1842 -- 3.2.1 Type Declaration --
1843 -----------------------------
1845 -- TYPE_DECLARATION ::=
1846 -- FULL_TYPE_DECLARATION
1847 -- | INCOMPLETE_TYPE_DECLARATION
1848 -- | PRIVATE_TYPE_DECLARATION
1849 -- | PRIVATE_EXTENSION_DECLARATION
1851 ----------------------------------
1852 -- 3.2.1 Full Type Declaration --
1853 ----------------------------------
1855 -- FULL_TYPE_DECLARATION ::=
1856 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
1857 -- is TYPE_DEFINITION;
1858 -- | TASK_TYPE_DECLARATION
1859 -- | PROTECTED_TYPE_DECLARATION
1861 -- The full type declaration node is used only for the first case. The
1862 -- second case (concurrent type declaration), is represented directly
1863 -- by a task type declaration or a protected type declaration.
1865 -- N_Full_Type_Declaration
1866 -- Sloc points to TYPE
1867 -- Defining_Identifier (Node1)
1868 -- Discriminant_Specifications (List4) (set to No_List if none)
1869 -- Type_Definition (Node3)
1870 -- Discr_Check_Funcs_Built (Flag11-Sem)
1872 ----------------------------
1873 -- 3.2.1 Type Definition --
1874 ----------------------------
1876 -- TYPE_DEFINITION ::=
1877 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
1878 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
1879 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
1880 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
1882 --------------------------------
1883 -- 3.2.2 Subtype Declaration --
1884 --------------------------------
1886 -- SUBTYPE_DECLARATION ::=
1887 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION;
1889 -- The subtype indication field is set to Empty for subtypes
1890 -- declared in package Standard (Positive, Natural).
1892 -- N_Subtype_Declaration
1893 -- Sloc points to SUBTYPE
1894 -- Defining_Identifier (Node1)
1895 -- Null_Exclusion_Present (Flag11)
1896 -- Subtype_Indication (Node5)
1897 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
1898 -- Exception_Junk (Flag7-Sem)
1900 -------------------------------
1901 -- 3.2.2 Subtype Indication --
1902 -------------------------------
1904 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
1906 -- Note: if no constraint is present, the subtype indication appears
1907 -- directly in the tree as a subtype mark. The N_Subtype_Indication
1908 -- node is used only if a constraint is present.
1910 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
1911 -- with the null-exclusion part (see AI-231), we had to introduce a new
1912 -- attribute in all the parents of subtype_indication nodes to indicate
1913 -- if the null-exclusion is present.
1915 -- Note: the reason that this node has expression fields is that a
1916 -- subtype indication can appear as an operand of a membership test.
1918 -- N_Subtype_Indication
1919 -- Sloc points to first token of subtype mark
1920 -- Subtype_Mark (Node4)
1921 -- Constraint (Node3)
1922 -- Etype (Node5-Sem)
1923 -- Must_Not_Freeze (Flag8-Sem)
1925 -- Note: Etype is a copy of the Etype field of the Subtype_Mark. The
1926 -- reason for this redundancy is so that in a list of array index types,
1927 -- the Etype can be uniformly accessed to determine the subscript type.
1928 -- This means that no Itype is constructed for the actual subtype that
1929 -- is created by the subtype indication. If such an Itype is required,
1930 -- it is constructed in the context in which the indication appears.
1932 -------------------------
1933 -- 3.2.2 Subtype Mark --
1934 -------------------------
1936 -- SUBTYPE_MARK ::= subtype_NAME
1938 -----------------------
1939 -- 3.2.2 Constraint --
1940 -----------------------
1942 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
1944 ------------------------------
1945 -- 3.2.2 Scalar Constraint --
1946 ------------------------------
1948 -- SCALAR_CONSTRAINT ::=
1949 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
1951 ---------------------------------
1952 -- 3.2.2 Composite Constraint --
1953 ---------------------------------
1955 -- COMPOSITE_CONSTRAINT ::=
1956 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
1958 -------------------------------
1959 -- 3.3.1 Object Declaration --
1960 -------------------------------
1962 -- OBJECT_DECLARATION ::=
1963 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
1964 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION];
1965 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
1966 -- ACCESS_DEFINITION [:= EXPRESSION];
1967 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
1968 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION];
1969 -- | SINGLE_TASK_DECLARATION
1970 -- | SINGLE_PROTECTED_DECLARATION
1972 -- Note: aliased is not permitted in Ada 83 mode
1974 -- The N_Object_Declaration node is only for the first two cases.
1975 -- Single task declaration is handled by P_Task (9.1)
1976 -- Single protected declaration is handled by P_protected (9.5)
1978 -- Although the syntax allows multiple identifiers in the list, the
1979 -- semantics is as though successive declarations were given with
1980 -- identical type definition and expression components. To simplify
1981 -- semantic processing, the parser represents a multiple declaration
1982 -- case as a sequence of single declarations, using the More_Ids and
1983 -- Prev_Ids flags to preserve the original source form as described
1984 -- in the section on "Handling of Defining Identifier Lists".
1986 -- Note: if a range check is required for the initialization
1987 -- expression then the Do_Range_Check flag is set in the Expression,
1988 -- with the check being done against the type given by the object
1989 -- definition, which is also the Etype of the defining identifier.
1991 -- Note: the contents of the Expression field must be ignored (i.e.
1992 -- treated as though it were Empty) if No_Initialization is set True.
1994 -- Note: the back end places some restrictions on the form of the
1995 -- Expression field. If the object being declared is Atomic, then
1996 -- the Expression may not have the form of an aggregate (since this
1997 -- might cause the back end to generate separate assignments). It
1998 -- also cannot be a reference to an object marked as a true constant
1999 -- (Is_True_Constant flag set), where the object is itself initalized
2000 -- with an aggregate. If necessary the front end must generate an
2001 -- extra temporary (with Is_True_Constant set False), and initialize
2002 -- this temporary as required (the temporary itself is not atomic).
2004 -- Note: there is not node kind for object definition. Instead, the
2005 -- corresponding field holds a subtype indication, an array type
2006 -- definition, or (Ada 2005, AI-406) an access definition.
2008 -- N_Object_Declaration
2009 -- Sloc points to first identifier
2010 -- Defining_Identifier (Node1)
2011 -- Aliased_Present (Flag4) set if ALIASED appears
2012 -- Constant_Present (Flag17) set if CONSTANT appears
2013 -- Null_Exclusion_Present (Flag11)
2014 -- Object_Definition (Node4) subtype indic./array type def./ access def.
2015 -- Expression (Node3) (set to Empty if not present)
2016 -- Handler_List_Entry (Node2-Sem)
2017 -- Corresponding_Generic_Association (Node5-Sem)
2018 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2019 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2020 -- No_Initialization (Flag13-Sem)
2021 -- Assignment_OK (Flag15-Sem)
2022 -- Exception_Junk (Flag7-Sem)
2023 -- Delay_Finalize_Attach (Flag14-Sem)
2024 -- Is_Subprogram_Descriptor (Flag16-Sem)
2026 -------------------------------------
2027 -- 3.3.1 Defining Identifier List --
2028 -------------------------------------
2030 -- DEFINING_IDENTIFIER_LIST ::=
2031 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2033 -------------------------------
2034 -- 3.3.2 Number Declaration --
2035 -------------------------------
2037 -- NUMBER_DECLARATION ::=
2038 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2040 -- Although the syntax allows multiple identifiers in the list, the
2041 -- semantics is as though successive declarations were given with
2042 -- identical expressions. To simplify semantic processing, the parser
2043 -- represents a multiple declaration case as a sequence of single
2044 -- declarations, using the More_Ids and Prev_Ids flags to preserve
2045 -- the original source form as described in the section on "Handling
2046 -- of Defining Identifier Lists".
2048 -- N_Number_Declaration
2049 -- Sloc points to first identifier
2050 -- Defining_Identifier (Node1)
2051 -- Expression (Node3)
2052 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2053 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2055 ----------------------------------
2056 -- 3.4 Derived Type Definition --
2057 ----------------------------------
2059 -- DERIVED_TYPE_DEFINITION ::=
2060 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2061 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2063 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
2064 -- in Ada 83 mode
2066 -- Note: a record extension part is required if ABSTRACT is present
2068 -- N_Derived_Type_Definition
2069 -- Sloc points to NEW
2070 -- Abstract_Present (Flag4)
2071 -- Null_Exclusion_Present (Flag11) (set to False if not present)
2072 -- Subtype_Indication (Node5)
2073 -- Record_Extension_Part (Node3) (set to Empty if not present)
2074 -- Limited_Present (Flag17)
2075 -- Task_Present (Flag5) set in task interfaces
2076 -- Protected_Present (Flag6) set in protected interfaces
2077 -- Synchronized_Present (Flag7) set in interfaces
2078 -- Interface_List (List2) (set to No_List if none)
2079 -- Interface_Present (Flag16) set in abstract interfaces
2081 -- Note: Task_Present, Protected_Present, Synchronized_Present,
2082 -- Interface_List, and Interface_Present are used for abstract
2083 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2085 ---------------------------
2086 -- 3.5 Range Constraint --
2087 ---------------------------
2089 -- RANGE_CONSTRAINT ::= range RANGE
2091 -- N_Range_Constraint
2092 -- Sloc points to RANGE
2093 -- Range_Expression (Node4)
2095 ----------------
2096 -- 3.5 Range --
2097 ----------------
2099 -- RANGE ::=
2100 -- RANGE_ATTRIBUTE_REFERENCE
2101 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2103 -- Note: the case of a range given as a range attribute reference
2104 -- appears directly in the tree as an attribute reference.
2106 -- Note: the field name for a reference to a range is Range_Expression
2107 -- rather than Range, because range is a reserved keyword in Ada!
2109 -- Note: the reason that this node has expression fields is that a
2110 -- range can appear as an operand of a membership test. The Etype
2111 -- field is the type of the range (we do NOT construct an implicit
2112 -- subtype to represent the range exactly).
2114 -- N_Range
2115 -- Sloc points to ..
2116 -- Low_Bound (Node1)
2117 -- High_Bound (Node2)
2118 -- Includes_Infinities (Flag11)
2119 -- plus fields for expression
2121 -- Note: if the range appears in a context, such as a subtype
2122 -- declaration, where range checks are required on one or both of
2123 -- the expression fields, then type conversion nodes are inserted
2124 -- to represent the required checks.
2126 ----------------------------------------
2127 -- 3.5.1 Enumeration Type Definition --
2128 ----------------------------------------
2130 -- ENUMERATION_TYPE_DEFINITION ::=
2131 -- (ENUMERATION_LITERAL_SPECIFICATION
2132 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2134 -- Note: the Literals field in the node described below is null for
2135 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2136 -- which special processing handles these types as special cases.
2138 -- N_Enumeration_Type_Definition
2139 -- Sloc points to left parenthesis
2140 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2141 -- End_Label (Node4) (set to Empty if internally generated record)
2143 ----------------------------------------------
2144 -- 3.5.1 Enumeration Literal Specification --
2145 ----------------------------------------------
2147 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2148 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2150 ---------------------------------------
2151 -- 3.5.1 Defining Character Literal --
2152 ---------------------------------------
2154 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2156 -- A defining character literal is an entity, which has additional
2157 -- fields depending on the setting of the Ekind field. These
2158 -- additional fields are defined (and access subprograms declared)
2159 -- in package Einfo.
2161 -- Note: N_Defining_Character_Literal is an extended node whose fields
2162 -- are deliberate layed out to match the layout of fields in an ordinary
2163 -- N_Character_Literal node allowing for easy alteration of a character
2164 -- literal node into a defining character literal node. For details, see
2165 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2167 -- N_Defining_Character_Literal
2168 -- Sloc points to literal
2169 -- Chars (Name1) contains the Name_Id for the identifier
2170 -- Next_Entity (Node2-Sem)
2171 -- Scope (Node3-Sem)
2172 -- Etype (Node5-Sem)
2174 ------------------------------------
2175 -- 3.5.4 Integer Type Definition --
2176 ------------------------------------
2178 -- Note: there is an error in this rule in the latest version of the
2179 -- grammar, so we have retained the old rule pending clarification.
2181 -- INTEGER_TYPE_DEFINITION ::=
2182 -- SIGNED_INTEGER_TYPE_DEFINITION
2183 -- | MODULAR_TYPE_DEFINITION
2185 -------------------------------------------
2186 -- 3.5.4 Signed Integer Type Definition --
2187 -------------------------------------------
2189 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2190 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2192 -- Note: the Low_Bound and High_Bound fields are set to Empty
2193 -- for integer types defined in package Standard.
2195 -- N_Signed_Integer_Type_Definition
2196 -- Sloc points to RANGE
2197 -- Low_Bound (Node1)
2198 -- High_Bound (Node2)
2200 ------------------------------------
2201 -- 3.5.4 Modular Type Definition --
2202 ------------------------------------
2204 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2206 -- N_Modular_Type_Definition
2207 -- Sloc points to MOD
2208 -- Expression (Node3)
2210 ---------------------------------
2211 -- 3.5.6 Real Type Definition --
2212 ---------------------------------
2214 -- REAL_TYPE_DEFINITION ::=
2215 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2217 --------------------------------------
2218 -- 3.5.7 Floating Point Definition --
2219 --------------------------------------
2221 -- FLOATING_POINT_DEFINITION ::=
2222 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2224 -- Note: The Digits_Expression and Real_Range_Specifications fields
2225 -- are set to Empty for floating-point types declared in Standard.
2227 -- N_Floating_Point_Definition
2228 -- Sloc points to DIGITS
2229 -- Digits_Expression (Node2)
2230 -- Real_Range_Specification (Node4) (set to Empty if not present)
2232 -------------------------------------
2233 -- 3.5.7 Real Range Specification --
2234 -------------------------------------
2236 -- REAL_RANGE_SPECIFICATION ::=
2237 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2239 -- N_Real_Range_Specification
2240 -- Sloc points to RANGE
2241 -- Low_Bound (Node1)
2242 -- High_Bound (Node2)
2244 -----------------------------------
2245 -- 3.5.9 Fixed Point Definition --
2246 -----------------------------------
2248 -- FIXED_POINT_DEFINITION ::=
2249 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2251 --------------------------------------------
2252 -- 3.5.9 Ordinary Fixed Point Definition --
2253 --------------------------------------------
2255 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2256 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2258 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2260 -- N_Ordinary_Fixed_Point_Definition
2261 -- Sloc points to DELTA
2262 -- Delta_Expression (Node3)
2263 -- Real_Range_Specification (Node4)
2265 -------------------------------------------
2266 -- 3.5.9 Decimal Fixed Point Definition --
2267 -------------------------------------------
2269 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2270 -- delta static_EXPRESSION
2271 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2273 -- Note: decimal types are not permitted in Ada 83 mode
2275 -- N_Decimal_Fixed_Point_Definition
2276 -- Sloc points to DELTA
2277 -- Delta_Expression (Node3)
2278 -- Digits_Expression (Node2)
2279 -- Real_Range_Specification (Node4) (set to Empty if not present)
2281 ------------------------------
2282 -- 3.5.9 Digits Constraint --
2283 ------------------------------
2285 -- DIGITS_CONSTRAINT ::=
2286 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2288 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2289 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2291 -- N_Digits_Constraint
2292 -- Sloc points to DIGITS
2293 -- Digits_Expression (Node2)
2294 -- Range_Constraint (Node4) (set to Empty if not present)
2296 --------------------------------
2297 -- 3.6 Array Type Definition --
2298 --------------------------------
2300 -- ARRAY_TYPE_DEFINITION ::=
2301 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2303 -----------------------------------------
2304 -- 3.6 Unconstrained Array Definition --
2305 -----------------------------------------
2307 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2308 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2309 -- COMPONENT_DEFINITION
2311 -- Note: dimensionality of array is indicated by number of entries in
2312 -- the Subtype_Marks list, which has one entry for each dimension.
2314 -- N_Unconstrained_Array_Definition
2315 -- Sloc points to ARRAY
2316 -- Subtype_Marks (List2)
2317 -- Component_Definition (Node4)
2319 -----------------------------------
2320 -- 3.6 Index Subtype Definition --
2321 -----------------------------------
2323 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2325 -- There is no explicit node in the tree for an index subtype
2326 -- definition since the N_Unconstrained_Array_Definition node
2327 -- incorporates the type marks which appear in this context.
2329 ---------------------------------------
2330 -- 3.6 Constrained Array Definition --
2331 ---------------------------------------
2333 -- CONSTRAINED_ARRAY_DEFINITION ::=
2334 -- array (DISCRETE_SUBTYPE_DEFINITION
2335 -- {, DISCRETE_SUBTYPE_DEFINITION})
2336 -- of COMPONENT_DEFINITION
2338 -- Note: dimensionality of array is indicated by number of entries
2339 -- in the Discrete_Subtype_Definitions list, which has one entry
2340 -- for each dimension.
2342 -- N_Constrained_Array_Definition
2343 -- Sloc points to ARRAY
2344 -- Discrete_Subtype_Definitions (List2)
2345 -- Component_Definition (Node4)
2347 --------------------------------------
2348 -- 3.6 Discrete Subtype Definition --
2349 --------------------------------------
2351 -- DISCRETE_SUBTYPE_DEFINITION ::=
2352 -- discrete_SUBTYPE_INDICATION | RANGE
2354 -------------------------------
2355 -- 3.6 Component Definition --
2356 -------------------------------
2358 -- COMPONENT_DEFINITION ::=
2359 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
2361 -- Note: although the syntax does not permit a component definition to
2362 -- be an anonymous array (and the parser will diagnose such an attempt
2363 -- with an appropriate message), it is possible for anonymous arrays
2364 -- to appear as component definitions. The semantics and back end handle
2365 -- this case properly, and the expander in fact generates such cases.
2366 -- Access_Definition is an optional field that gives support to
2367 -- Ada 2005 (AI-230). The parser generates nodes that have either the
2368 -- Subtype_Indication field or else the Access_Definition field.
2370 -- N_Component_Definition
2371 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
2372 -- Aliased_Present (Flag4)
2373 -- Null_Exclusion_Present (Flag11)
2374 -- Subtype_Indication (Node5) (set to Empty if not present)
2375 -- Access_Definition (Node3) (set to Empty if not present)
2377 -----------------------------
2378 -- 3.6.1 Index Constraint --
2379 -----------------------------
2381 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
2383 -- It is not in general possible to distinguish between discriminant
2384 -- constraints and index constraints at parse time, since a simple
2385 -- name could be either the subtype mark of a discrete range, or an
2386 -- expression in a discriminant association with no name. Either
2387 -- entry appears simply as the name, and the semantic parse must
2388 -- distinguish between the two cases. Thus we use a common tree
2389 -- node format for both of these constraint types.
2391 -- See Discriminant_Constraint for format of node
2393 ---------------------------
2394 -- 3.6.1 Discrete Range --
2395 ---------------------------
2397 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
2399 ----------------------------
2400 -- 3.7 Discriminant Part --
2401 ----------------------------
2403 -- DISCRIMINANT_PART ::=
2404 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
2406 ------------------------------------
2407 -- 3.7 Unknown Discriminant Part --
2408 ------------------------------------
2410 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
2412 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
2414 -- There is no explicit node in the tree for an unknown discriminant
2415 -- part. Instead the Unknown_Discriminants_Present flag is set in the
2416 -- parent node.
2418 ----------------------------------
2419 -- 3.7 Known Discriminant Part --
2420 ----------------------------------
2422 -- KNOWN_DISCRIMINANT_PART ::=
2423 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
2425 -------------------------------------
2426 -- 3.7 Discriminant Specification --
2427 -------------------------------------
2429 -- DISCRIMINANT_SPECIFICATION ::=
2430 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
2431 -- [:= DEFAULT_EXPRESSION]
2432 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
2433 -- [:= DEFAULT_EXPRESSION]
2435 -- Although the syntax allows multiple identifiers in the list, the
2436 -- semantics is as though successive specifications were given with
2437 -- identical type definition and expression components. To simplify
2438 -- semantic processing, the parser represents a multiple declaration
2439 -- case as a sequence of single specifications, using the More_Ids and
2440 -- Prev_Ids flags to preserve the original source form as described
2441 -- in the section on "Handling of Defining Identifier Lists".
2443 -- N_Discriminant_Specification
2444 -- Sloc points to first identifier
2445 -- Defining_Identifier (Node1)
2446 -- Null_Exclusion_Present (Flag11)
2447 -- Discriminant_Type (Node5) subtype mark or access parameter definition
2448 -- Expression (Node3) (set to Empty if no default expression)
2449 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2450 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2452 -----------------------------
2453 -- 3.7 Default Expression --
2454 -----------------------------
2456 -- DEFAULT_EXPRESSION ::= EXPRESSION
2458 ------------------------------------
2459 -- 3.7.1 Discriminant Constraint --
2460 ------------------------------------
2462 -- DISCRIMINANT_CONSTRAINT ::=
2463 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
2465 -- It is not in general possible to distinguish between discriminant
2466 -- constraints and index constraints at parse time, since a simple
2467 -- name could be either the subtype mark of a discrete range, or an
2468 -- expression in a discriminant association with no name. Either
2469 -- entry appears simply as the name, and the semantic parse must
2470 -- distinguish between the two cases. Thus we use a common tree
2471 -- node format for both of these constraint types.
2473 -- N_Index_Or_Discriminant_Constraint
2474 -- Sloc points to left paren
2475 -- Constraints (List1) points to list of discrete ranges or
2476 -- discriminant associations
2478 -------------------------------------
2479 -- 3.7.1 Discriminant Association --
2480 -------------------------------------
2482 -- DISCRIMINANT_ASSOCIATION ::=
2483 -- [discriminant_SELECTOR_NAME
2484 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
2486 -- Note: a discriminant association that has no selector name list
2487 -- appears directly as an expression in the tree.
2489 -- N_Discriminant_Association
2490 -- Sloc points to first token of discriminant association
2491 -- Selector_Names (List1) (always non-empty, since if no selector
2492 -- names are present, this node is not used, see comment above)
2493 -- Expression (Node3)
2495 ---------------------------------
2496 -- 3.8 Record Type Definition --
2497 ---------------------------------
2499 -- RECORD_TYPE_DEFINITION ::=
2500 -- [[abstract] tagged] [limited] RECORD_DEFINITION
2502 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
2504 -- There is no explicit node in the tree for a record type definition.
2505 -- Instead the flags for Tagged_Present and Limited_Present appear in
2506 -- the N_Record_Definition node for a record definition appearing in
2507 -- the context of a record type definition.
2509 ----------------------------
2510 -- 3.8 Record Definition --
2511 ----------------------------
2513 -- RECORD_DEFINITION ::=
2514 -- record
2515 -- COMPONENT_LIST
2516 -- end record
2517 -- | null record
2519 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
2520 -- flags appear only for a record definition appearing in a record
2521 -- type definition.
2523 -- Note: the NULL RECORD case is not permitted in Ada 83
2525 -- N_Record_Definition
2526 -- Sloc points to RECORD or NULL
2527 -- End_Label (Node4) (set to Empty if internally generated record)
2528 -- Abstract_Present (Flag4)
2529 -- Tagged_Present (Flag15)
2530 -- Limited_Present (Flag17)
2531 -- Component_List (Node1) empty in null record case
2532 -- Null_Present (Flag13) set in null record case
2533 -- Task_Present (Flag5) set in task interfaces
2534 -- Protected_Present (Flag6) set in protected interfaces
2535 -- Synchronized_Present (Flag7) set in interfaces
2536 -- Interface_Present (Flag16) set in abstract interfaces
2537 -- Interface_List (List2) (set to No_List if none)
2539 -- Note: Task_Present, Protected_Present, Synchronized _Present,
2540 -- Interface_List and Interface_Present are used for abstract
2541 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2543 -------------------------
2544 -- 3.8 Component List --
2545 -------------------------
2547 -- COMPONENT_LIST ::=
2548 -- COMPONENT_ITEM {COMPONENT_ITEM}
2549 -- | {COMPONENT_ITEM} VARIANT_PART
2550 -- | null;
2552 -- N_Component_List
2553 -- Sloc points to first token of component list
2554 -- Component_Items (List3)
2555 -- Variant_Part (Node4) (set to Empty if no variant part)
2556 -- Null_Present (Flag13)
2558 -------------------------
2559 -- 3.8 Component Item --
2560 -------------------------
2562 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
2564 -- Note: A component item can also be a pragma, and in the tree
2565 -- that is obtained after semantic processing, a component item
2566 -- can be an N_Null node resulting from a non-recognized pragma.
2568 --------------------------------
2569 -- 3.8 Component Declaration --
2570 --------------------------------
2572 -- COMPONENT_DECLARATION ::=
2573 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
2574 -- [:= DEFAULT_EXPRESSION]
2576 -- Note: although the syntax does not permit a component definition to
2577 -- be an anonymous array (and the parser will diagnose such an attempt
2578 -- with an appropriate message), it is possible for anonymous arrays
2579 -- to appear as component definitions. The semantics and back end handle
2580 -- this case properly, and the expander in fact generates such cases.
2582 -- Although the syntax allows multiple identifiers in the list, the
2583 -- semantics is as though successive declarations were given with the
2584 -- same component definition and expression components. To simplify
2585 -- semantic processing, the parser represents a multiple declaration
2586 -- case as a sequence of single declarations, using the More_Ids and
2587 -- Prev_Ids flags to preserve the original source form as described
2588 -- in the section on "Handling of Defining Identifier Lists".
2590 -- N_Component_Declaration
2591 -- Sloc points to first identifier
2592 -- Defining_Identifier (Node1)
2593 -- Component_Definition (Node4)
2594 -- Expression (Node3) (set to Empty if no default expression)
2595 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2596 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2598 -------------------------
2599 -- 3.8.1 Variant Part --
2600 -------------------------
2602 -- VARIANT_PART ::=
2603 -- case discriminant_DIRECT_NAME is
2604 -- VARIANT
2605 -- {VARIANT}
2606 -- end case;
2608 -- Note: the variants list can contain pragmas as well as variants.
2609 -- In a properly formed program there is at least one variant.
2611 -- N_Variant_Part
2612 -- Sloc points to CASE
2613 -- Name (Node2)
2614 -- Variants (List1)
2616 --------------------
2617 -- 3.8.1 Variant --
2618 --------------------
2620 -- VARIANT ::=
2621 -- when DISCRETE_CHOICE_LIST =>
2622 -- COMPONENT_LIST
2624 -- N_Variant
2625 -- Sloc points to WHEN
2626 -- Discrete_Choices (List4)
2627 -- Component_List (Node1)
2628 -- Enclosing_Variant (Node2-Sem)
2629 -- Present_Expr (Uint3-Sem)
2630 -- Dcheck_Function (Node5-Sem)
2632 ---------------------------------
2633 -- 3.8.1 Discrete Choice List --
2634 ---------------------------------
2636 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
2638 ----------------------------
2639 -- 3.8.1 Discrete Choice --
2640 ----------------------------
2642 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
2644 -- Note: in Ada 83 mode, the expression must be a simple expression
2646 -- The only choice that appears explicitly is the OTHERS choice, as
2647 -- defined here. Other cases of discrete choice (expression and
2648 -- discrete range) appear directly. This production is also used
2649 -- for the OTHERS possibility of an exception choice.
2651 -- Note: in accordance with the syntax, the parser does not check that
2652 -- OTHERS appears at the end on its own in a choice list context. This
2653 -- is a semantic check.
2655 -- N_Others_Choice
2656 -- Sloc points to OTHERS
2657 -- Others_Discrete_Choices (List1-Sem)
2658 -- All_Others (Flag11-Sem)
2660 ----------------------------------
2661 -- 3.9.1 Record Extension Part --
2662 ----------------------------------
2664 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
2666 -- Note: record extension parts are not permitted in Ada 83 mode
2668 --------------------------------------
2669 -- 3.9.4 Interface Type Definition --
2670 --------------------------------------
2672 -- INTERFACE_TYPE_DEFINITION ::=
2673 -- [limited | task | protected | synchronized]
2674 -- interface [interface_list]
2676 -- Note: Interfaces are implemented with N_Record_Definition and
2677 -- N_Derived_Type_Definition nodes because most of the support
2678 -- for the analysis of abstract types has been reused to
2679 -- analyze abstract interfaces.
2681 ----------------------------------
2682 -- 3.10 Access Type Definition --
2683 ----------------------------------
2685 -- ACCESS_TYPE_DEFINITION ::=
2686 -- ACCESS_TO_OBJECT_DEFINITION
2687 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2689 --------------------------
2690 -- 3.10 Null Exclusion --
2691 --------------------------
2693 -- NULL_EXCLUSION ::= not null
2695 ---------------------------------------
2696 -- 3.10 Access To Object Definition --
2697 ---------------------------------------
2699 -- ACCESS_TO_OBJECT_DEFINITION ::=
2700 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
2701 -- SUBTYPE_INDICATION
2703 -- N_Access_To_Object_Definition
2704 -- Sloc points to ACCESS
2705 -- All_Present (Flag15)
2706 -- Null_Exclusion_Present (Flag11)
2707 -- Subtype_Indication (Node5)
2708 -- Constant_Present (Flag17)
2710 -----------------------------------
2711 -- 3.10 General Access Modifier --
2712 -----------------------------------
2714 -- GENERAL_ACCESS_MODIFIER ::= all | constant
2716 -- Note: general access modifiers are not permitted in Ada 83 mode
2718 -- There is no explicit node in the tree for general access modifier.
2719 -- Instead the All_Present or Constant_Present flags are set in the
2720 -- parent node.
2722 -------------------------------------------
2723 -- 3.10 Access To Subprogram Definition --
2724 -------------------------------------------
2726 -- ACCESS_TO_SUBPROGRAM_DEFINITION
2727 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
2728 -- | [NULL_EXCLUSION] access [protected] function
2729 -- PARAMETER_AND_RESULT_PROFILE
2731 -- Note: access to subprograms are not permitted in Ada 83 mode
2733 -- N_Access_Function_Definition
2734 -- Sloc points to ACCESS
2735 -- Null_Exclusion_Present (Flag11)
2736 -- Protected_Present (Flag6)
2737 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2738 -- Result_Definition (Node4) result subtype (subtype mark or access def)
2740 -- N_Access_Procedure_Definition
2741 -- Sloc points to ACCESS
2742 -- Null_Exclusion_Present (Flag11)
2743 -- Protected_Present (Flag6)
2744 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2746 -----------------------------
2747 -- 3.10 Access Definition --
2748 -----------------------------
2750 -- ACCESS_DEFINITION ::=
2751 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
2752 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2754 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
2756 -- N_Access_Definition
2757 -- Sloc points to ACCESS
2758 -- Null_Exclusion_Present (Flag11)
2759 -- All_Present (Flag15)
2760 -- Constant_Present (Flag17)
2761 -- Subtype_Mark (Node4)
2762 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
2764 -----------------------------------------
2765 -- 3.10.1 Incomplete Type Declaration --
2766 -----------------------------------------
2768 -- INCOMPLETE_TYPE_DECLARATION ::=
2769 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
2771 -- N_Incomplete_Type_Declaration
2772 -- Sloc points to TYPE
2773 -- Defining_Identifier (Node1)
2774 -- Discriminant_Specifications (List4) (set to No_List if no
2775 -- discriminant part, or if the discriminant part is an
2776 -- unknown discriminant part)
2777 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
2778 -- Tagged_Present (Flag15)
2780 ----------------------------
2781 -- 3.11 Declarative Part --
2782 ----------------------------
2784 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
2786 -- Note: although the parser enforces the syntactic requirement that
2787 -- a declarative part can contain only declarations, the semantic
2788 -- processing may add statements to the list of actions in a
2789 -- declarative part, so the code generator should be prepared
2790 -- to accept a statement in this position.
2792 ----------------------------
2793 -- 3.11 Declarative Item --
2794 ----------------------------
2796 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
2798 ----------------------------------
2799 -- 3.11 Basic Declarative Item --
2800 ----------------------------------
2802 -- BASIC_DECLARATIVE_ITEM ::=
2803 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
2805 ----------------
2806 -- 3.11 Body --
2807 ----------------
2809 -- BODY ::= PROPER_BODY | BODY_STUB
2811 -----------------------
2812 -- 3.11 Proper Body --
2813 -----------------------
2815 -- PROPER_BODY ::=
2816 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
2818 ---------------
2819 -- 4.1 Name --
2820 ---------------
2822 -- NAME ::=
2823 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
2824 -- | INDEXED_COMPONENT | SLICE
2825 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
2826 -- | TYPE_CONVERSION | FUNCTION_CALL
2827 -- | CHARACTER_LITERAL
2829 ----------------------
2830 -- 4.1 Direct Name --
2831 ----------------------
2833 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
2835 -----------------
2836 -- 4.1 Prefix --
2837 -----------------
2839 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
2841 -------------------------------
2842 -- 4.1 Explicit Dereference --
2843 -------------------------------
2845 -- EXPLICIT_DEREFERENCE ::= NAME . all
2847 -- N_Explicit_Dereference
2848 -- Sloc points to ALL
2849 -- Prefix (Node3)
2850 -- Actual_Designated_Subtype (Node2-Sem)
2851 -- plus fields for expression
2853 -------------------------------
2854 -- 4.1 Implicit Dereference --
2855 -------------------------------
2857 -- IMPLICIT_DEREFERENCE ::= NAME
2859 ------------------------------
2860 -- 4.1.1 Indexed Component --
2861 ------------------------------
2863 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
2865 -- Note: the parser may generate this node in some situations where it
2866 -- should be a function call. The semantic pass must correct this
2867 -- misidentification (which is inevitable at the parser level).
2869 -- N_Indexed_Component
2870 -- Sloc contains a copy of the Sloc value of the Prefix
2871 -- Prefix (Node3)
2872 -- Expressions (List1)
2873 -- plus fields for expression
2875 -- Note: if any of the subscripts requires a range check, then the
2876 -- Do_Range_Check flag is set on the corresponding expression, with
2877 -- the index type being determined from the type of the Prefix, which
2878 -- references the array being indexed.
2880 -- Note: in a fully analyzed and expanded indexed component node, and
2881 -- hence in any such node that gigi sees, if the prefix is an access
2882 -- type, then an explicit dereference operation has been inserted.
2884 ------------------
2885 -- 4.1.2 Slice --
2886 ------------------
2888 -- SLICE ::= PREFIX (DISCRETE_RANGE)
2890 -- Note: an implicit subtype is created to describe the resulting
2891 -- type, so that the bounds of this type are the bounds of the slice.
2893 -- N_Slice
2894 -- Sloc points to first token of prefix
2895 -- Prefix (Node3)
2896 -- Discrete_Range (Node4)
2897 -- plus fields for expression
2899 -------------------------------
2900 -- 4.1.3 Selected Component --
2901 -------------------------------
2903 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
2905 -- Note: selected components that are semantically expanded names get
2906 -- changed during semantic processing into the separate N_Expanded_Name
2907 -- node. See description of this node in the section on semantic nodes.
2909 -- N_Selected_Component
2910 -- Sloc points to period
2911 -- Prefix (Node3)
2912 -- Selector_Name (Node2)
2913 -- Associated_Node (Node4-Sem)
2914 -- Do_Discriminant_Check (Flag13-Sem)
2915 -- Is_In_Discriminant_Check (Flag11-Sem)
2916 -- plus fields for expression
2918 --------------------------
2919 -- 4.1.3 Selector Name --
2920 --------------------------
2922 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
2924 --------------------------------
2925 -- 4.1.4 Attribute Reference --
2926 --------------------------------
2928 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
2930 -- Note: the syntax is quite ambiguous at this point. Consider:
2932 -- A'Length (X) X is part of the attribute designator
2933 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
2934 -- A'Class (X) X is the expression of a type conversion
2936 -- It would be possible for the parser to distinguish these cases
2937 -- by looking at the attribute identifier. However, that would mean
2938 -- more work in introducing new implementation defined attributes,
2939 -- and also it would mean that special processing for attributes
2940 -- would be scattered around, instead of being centralized in the
2941 -- semantic routine that handles an N_Attribute_Reference node.
2942 -- Consequently, the parser in all the above cases stores the
2943 -- expression (X in these examples) as a single element list in
2944 -- in the Expressions field of the N_Attribute_Reference node.
2946 -- Similarly, for attributes like Max which take two arguments,
2947 -- we store the two arguments as a two element list in the
2948 -- Expressions field. Of course it is clear at parse time that
2949 -- this case is really a function call with an attribute as the
2950 -- prefix, but it turns out to be convenient to handle the two
2951 -- argument case in a similar manner to the one argument case,
2952 -- and indeed in general the parser will accept any number of
2953 -- expressions in this position and store them as a list in the
2954 -- attribute reference node. This allows for future addition of
2955 -- attributes that take more than two arguments.
2957 -- Note: named associates are not permitted in function calls where
2958 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
2959 -- to skip the normal subprogram argument processing.
2961 -- Note: for the attributes whose designators are technically keywords,
2962 -- i.e. digits, access, delta, range, the Attribute_Name field contains
2963 -- the corresponding name, even though no identifier is involved.
2965 -- Note: the generated code may contain stream attributes applied to
2966 -- limited types for which no stream routines exist officially. In such
2967 -- case, the result is to use the stream attribute for the underlying
2968 -- full type, or in the case of a protected type, the components
2969 -- (including any disriminants) are merely streamed in order.
2971 -- See Exp_Attr for a complete description of which attributes are
2972 -- passed onto Gigi, and which are handled entirely by the front end.
2974 -- Gigi restriction: For the Pos attribute, the prefix cannot be
2975 -- a non-standard enumeration type or a nonzero/zero semantics
2976 -- boolean type, so the value is simply the stored representation.
2978 -- Note: In generated code, the Address and Unrestricted_Access
2979 -- attributes can be applied to any expression, and the meaning is
2980 -- to create an object containing the value (the object is in the
2981 -- current stack frame), and pass the address of this value. If the
2982 -- Must_Be_Byte_Aligned flag is set, then the object whose address
2983 -- is taken must be on a byte (storage unit) boundary, and if it is
2984 -- not (or may not be), then the generated code must create a copy
2985 -- that is byte aligned, and pass the address of this copy.
2987 -- N_Attribute_Reference
2988 -- Sloc points to apostrophe
2989 -- Prefix (Node3)
2990 -- Attribute_Name (Name2) identifier name from attribute designator
2991 -- Expressions (List1) (set to No_List if no associated expressions)
2992 -- Entity (Node4-Sem) used if the attribute yields a type
2993 -- Associated_Node (Node4-Sem)
2994 -- Do_Overflow_Check (Flag17-Sem)
2995 -- Redundant_Use (Flag13-Sem)
2996 -- Must_Be_Byte_Aligned (Flag14)
2997 -- plus fields for expression
2999 ---------------------------------
3000 -- 4.1.4 Attribute Designator --
3001 ---------------------------------
3003 -- ATTRIBUTE_DESIGNATOR ::=
3004 -- IDENTIFIER [(static_EXPRESSION)]
3005 -- | access | delta | digits
3007 -- There is no explicit node in the tree for an attribute designator.
3008 -- Instead the Attribute_Name and Expressions fields of the parent
3009 -- node (N_Attribute_Reference node) hold the information.
3011 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
3012 -- designator, then they are treated as identifiers internally
3013 -- rather than the keywords of the same name.
3015 --------------------------------------
3016 -- 4.1.4 Range Attribute Reference --
3017 --------------------------------------
3019 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3021 -- A range attribute reference is represented in the tree using the
3022 -- normal N_Attribute_Reference node.
3024 ---------------------------------------
3025 -- 4.1.4 Range Attribute Designator --
3026 ---------------------------------------
3028 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3030 -- A range attribute designator is represented in the tree using the
3031 -- normal N_Attribute_Reference node.
3033 --------------------
3034 -- 4.3 Aggregate --
3035 --------------------
3037 -- AGGREGATE ::=
3038 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3040 -----------------------------
3041 -- 4.3.1 Record Aggregate --
3042 -----------------------------
3044 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3046 -- N_Aggregate
3047 -- Sloc points to left parenthesis
3048 -- Expressions (List1) (set to No_List if none or null record case)
3049 -- Component_Associations (List2) (set to No_List if none)
3050 -- Null_Record_Present (Flag17)
3051 -- Aggregate_Bounds (Node3-Sem)
3052 -- Associated_Node (Node4-Sem)
3053 -- Static_Processing_OK (Flag4-Sem)
3054 -- Compile_Time_Known_Aggregate (Flag18-Sem)
3055 -- Expansion_Delayed (Flag11-Sem)
3056 -- plus fields for expression
3058 -- Note: this structure is used for both record and array aggregates
3059 -- since the two cases are not separable by the parser. The parser
3060 -- makes no attempt to enforce consistency here, so it is up to the
3061 -- semantic phase to make sure that the aggregate is consistent (i.e.
3062 -- that it is not a "half-and-half" case that mixes record and array
3063 -- syntax. In particular, for a record aggregate, the expressions
3064 -- field will be set if there are positional associations.
3066 -- Note: gigi/gcc can handle array aggregates correctly providing that
3067 -- they are entirely positional, and the array subtype involved has a
3068 -- known at compile time length and is not bit packed, or a convention
3069 -- Fortran array with more than one dimension. If these conditions
3070 -- are not met, then the front end must translate the aggregate into
3071 -- an appropriate set of assignments into a temporary.
3073 -- Note: for the record aggregate case, gigi/gcc can handle all cases
3074 -- of record aggregates, including those for packed, and rep-claused
3075 -- records, and also variant records, providing that there are no
3076 -- variable length fields whose size is not known at runtime, and
3077 -- providing that the aggregate is presented in fully named form.
3079 ----------------------------------------------
3080 -- 4.3.1 Record Component Association List --
3081 ----------------------------------------------
3083 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
3084 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3085 -- | null record
3087 -- There is no explicit node in the tree for a record component
3088 -- association list. Instead the Null_Record_Present flag is set in
3089 -- the parent node for the NULL RECORD case.
3091 ------------------------------------------------------
3092 -- 4.3.1 Record Component Association (also 4.3.3) --
3093 ------------------------------------------------------
3095 -- RECORD_COMPONENT_ASSOCIATION ::=
3096 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
3098 -- N_Component_Association
3099 -- Sloc points to first selector name
3100 -- Choices (List1)
3101 -- Loop_Actions (List2-Sem)
3102 -- Expression (Node3)
3103 -- Box_Present (Flag15)
3105 -- Note: this structure is used for both record component associations
3106 -- and array component associations, since the two cases aren't always
3107 -- separable by the parser. The choices list may represent either a
3108 -- list of selector names in the record aggregate case, or a list of
3109 -- discrete choices in the array aggregate case or an N_Others_Choice
3110 -- node (which appears as a singleton list). Box_Present gives support
3111 -- to Ada 2005 (AI-287).
3113 -----------------------------------
3114 -- 4.3.1 Commponent Choice List --
3115 -----------------------------------
3117 -- COMPONENT_CHOICE_LIST ::=
3118 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
3119 -- | others
3121 -- The entries of a component choice list appear in the Choices list
3122 -- of the associated N_Component_Association, as either selector
3123 -- names, or as an N_Others_Choice node.
3125 --------------------------------
3126 -- 4.3.2 Extension Aggregate --
3127 --------------------------------
3129 -- EXTENSION_AGGREGATE ::=
3130 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3132 -- Note: extension aggregates are not permitted in Ada 83 mode
3134 -- N_Extension_Aggregate
3135 -- Sloc points to left parenthesis
3136 -- Ancestor_Part (Node3)
3137 -- Associated_Node (Node4-Sem)
3138 -- Expressions (List1) (set to No_List if none or null record case)
3139 -- Component_Associations (List2) (set to No_List if none)
3140 -- Null_Record_Present (Flag17)
3141 -- Expansion_Delayed (Flag11-Sem)
3142 -- plus fields for expression
3144 --------------------------
3145 -- 4.3.2 Ancestor Part --
3146 --------------------------
3148 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3150 ----------------------------
3151 -- 4.3.3 Array Aggregate --
3152 ----------------------------
3154 -- ARRAY_AGGREGATE ::=
3155 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3157 ---------------------------------------
3158 -- 4.3.3 Positional Array Aggregate --
3159 ---------------------------------------
3161 -- POSITIONAL_ARRAY_AGGREGATE ::=
3162 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3163 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3165 -- See Record_Aggregate (4.3.1) for node structure
3167 ----------------------------------
3168 -- 4.3.3 Named Array Aggregate --
3169 ----------------------------------
3171 -- NAMED_ARRAY_AGGREGATE ::=
3172 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3174 -- See Record_Aggregate (4.3.1) for node structure
3176 ----------------------------------------
3177 -- 4.3.3 Array Component Association --
3178 ----------------------------------------
3180 -- ARRAY_COMPONENT_ASSOCIATION ::=
3181 -- DISCRETE_CHOICE_LIST => EXPRESSION
3183 -- See Record_Component_Association (4.3.1) for node structure
3185 --------------------------------------------------
3186 -- 4.4 Expression/Relation/Term/Factor/Primary --
3187 --------------------------------------------------
3189 -- EXPRESSION ::=
3190 -- RELATION {and RELATION} | RELATION {and then RELATION}
3191 -- | RELATION {or RELATION} | RELATION {or else RELATION}
3192 -- | RELATION {xor RELATION}
3194 -- RELATION ::=
3195 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3196 -- | SIMPLE_EXPRESSION [not] in RANGE
3197 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3199 -- SIMPLE_EXPRESSION ::=
3200 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3202 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3204 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3206 -- No nodes are generated for any of these constructs. Instead, the
3207 -- node for the operator appears directly. When we refer to an
3208 -- expression in this description, we mean any of the possible
3209 -- consistuent components of an expression (e.g. identifier is
3210 -- an example of an expression).
3212 ------------------
3213 -- 4.4 Primary --
3214 ------------------
3216 -- PRIMARY ::=
3217 -- NUMERIC_LITERAL | null
3218 -- | STRING_LITERAL | AGGREGATE
3219 -- | NAME | QUALIFIED_EXPRESSION
3220 -- | ALLOCATOR | (EXPRESSION)
3222 -- Usually there is no explicit node in the tree for primary. Instead
3223 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3224 -- exceptions. First, there is an explicit node for a null primary.
3226 -- N_Null
3227 -- Sloc points to NULL
3228 -- plus fields for expression
3230 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3231 -- that the parser keep track of which subexpressions are enclosed
3232 -- in parentheses, and how many levels of parentheses are used. This
3233 -- information is required for optimization purposes, and also for
3234 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3235 -- conform with ((((1)))) in the body).
3237 -- The parentheses are recorded by keeping a Paren_Count field in every
3238 -- subexpression node (it is actually present in all nodes, but only
3239 -- used in subexpression nodes). This count records the number of
3240 -- levels of parentheses. If the number of levels in the source exceeds
3241 -- the maximum accomodated by this count, then the count is simply left
3242 -- at the maximum value. This means that there are some pathalogical
3243 -- cases of failure to detect conformance failures (e.g. an expression
3244 -- with 500 levels of parens will conform with one with 501 levels),
3245 -- but we do not need to lose sleep over this.
3247 -- Historical note: in versions of GNAT prior to 1.75, there was a node
3248 -- type N_Parenthesized_Expression used to accurately record unlimited
3249 -- numbers of levels of parentheses. However, it turned out to be a
3250 -- real nuisance to have to take into account the possible presence of
3251 -- this node during semantic analysis, since basically parentheses have
3252 -- zero relevance to semantic analysis.
3254 -- Note: the level of parentheses always present in things like
3255 -- aggregates does not count, only the parentheses in the primary
3256 -- (EXPRESSION) affect the setting of the Paren_Count field.
3258 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
3259 -- treated as though it were Empty) if No_Initialization is set True.
3261 --------------------------------------
3262 -- 4.5 Short Circuit Control Forms --
3263 --------------------------------------
3265 -- EXPRESSION ::=
3266 -- RELATION {and then RELATION} | RELATION {or else RELATION}
3268 -- Gigi restriction: For both these control forms, the operand and
3269 -- result types are always Standard.Boolean. The expander inserts the
3270 -- required conversion operations where needed to ensure this is the
3271 -- case.
3273 -- N_And_Then
3274 -- Sloc points to AND of AND THEN
3275 -- Left_Opnd (Node2)
3276 -- Right_Opnd (Node3)
3277 -- Actions (List1-Sem)
3278 -- plus fields for expression
3280 -- N_Or_Else
3281 -- Sloc points to OR of OR ELSE
3282 -- Left_Opnd (Node2)
3283 -- Right_Opnd (Node3)
3284 -- Actions (List1-Sem)
3285 -- plus fields for expression
3287 -- Note: The Actions field is used to hold actions associated with
3288 -- the right hand operand. These have to be treated specially since
3289 -- they are not unconditionally executed. See Insert_Actions for a
3290 -- more detailed description of how these actions are handled.
3292 ---------------------------
3293 -- 4.5 Membership Tests --
3294 ---------------------------
3296 -- RELATION ::=
3297 -- SIMPLE_EXPRESSION [not] in RANGE
3298 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3300 -- Note: although the grammar above allows only a range or a
3301 -- subtype mark, the parser in fact will accept any simple
3302 -- expression in place of a subtype mark. This means that the
3303 -- semantic analyzer must be prepared to deal with, and diagnose
3304 -- a simple expression other than a name for the right operand.
3305 -- This simplifies error recovery in the parser.
3307 -- N_In
3308 -- Sloc points to IN
3309 -- Left_Opnd (Node2)
3310 -- Right_Opnd (Node3)
3311 -- plus fields for expression
3313 -- N_Not_In
3314 -- Sloc points to NOT of NOT IN
3315 -- Left_Opnd (Node2)
3316 -- Right_Opnd (Node3)
3317 -- plus fields for expression
3319 --------------------
3320 -- 4.5 Operators --
3321 --------------------
3323 -- LOGICAL_OPERATOR ::= and | or | xor
3325 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
3327 -- BINARY_ADDING_OPERATOR ::= + | - | &
3329 -- UNARY_ADDING_OPERATOR ::= + | -
3331 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
3333 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
3335 -- Sprint syntax if Treat_Fixed_As_Integer is set:
3337 -- x #* y
3338 -- x #/ y
3339 -- x #mod y
3340 -- x #rem y
3342 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
3343 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
3344 -- All handling of smalls for multiplication and division is handled
3345 -- by the front end (mod and rem result only from expansion). Gigi
3346 -- thus never needs to worry about small values (for other operators
3347 -- operating on fixed-point, e.g. addition, the small value does not
3348 -- have any semantic effect anyway, these are always integer operations.
3350 -- Gigi restriction: For all operators taking Boolean operands, the
3351 -- type is always Standard.Boolean. The expander inserts the required
3352 -- conversion operations where needed to ensure this is the case.
3354 -- N_Op_And
3355 -- Sloc points to AND
3356 -- Do_Length_Check (Flag4-Sem)
3357 -- plus fields for binary operator
3358 -- plus fields for expression
3360 -- N_Op_Or
3361 -- Sloc points to OR
3362 -- Do_Length_Check (Flag4-Sem)
3363 -- plus fields for binary operator
3364 -- plus fields for expression
3366 -- N_Op_Xor
3367 -- Sloc points to XOR
3368 -- Do_Length_Check (Flag4-Sem)
3369 -- plus fields for binary operator
3370 -- plus fields for expression
3372 -- N_Op_Eq
3373 -- Sloc points to =
3374 -- plus fields for binary operator
3375 -- plus fields for expression
3377 -- N_Op_Ne
3378 -- Sloc points to /=
3379 -- plus fields for binary operator
3380 -- plus fields for expression
3382 -- N_Op_Lt
3383 -- Sloc points to <
3384 -- plus fields for binary operator
3385 -- plus fields for expression
3387 -- N_Op_Le
3388 -- Sloc points to <=
3389 -- plus fields for binary operator
3390 -- plus fields for expression
3392 -- N_Op_Gt
3393 -- Sloc points to >
3394 -- plus fields for binary operator
3395 -- plus fields for expression
3397 -- N_Op_Ge
3398 -- Sloc points to >=
3399 -- plus fields for binary operator
3400 -- plus fields for expression
3402 -- N_Op_Add
3403 -- Sloc points to + (binary)
3404 -- plus fields for binary operator
3405 -- plus fields for expression
3407 -- N_Op_Subtract
3408 -- Sloc points to - (binary)
3409 -- plus fields for binary operator
3410 -- plus fields for expression
3412 -- N_Op_Concat
3413 -- Sloc points to &
3414 -- Is_Component_Left_Opnd (Flag13-Sem)
3415 -- Is_Component_Right_Opnd (Flag14-Sem)
3416 -- plus fields for binary operator
3417 -- plus fields for expression
3419 -- N_Op_Multiply
3420 -- Sloc points to *
3421 -- Treat_Fixed_As_Integer (Flag14-Sem)
3422 -- Rounded_Result (Flag18-Sem)
3423 -- plus fields for binary operator
3424 -- plus fields for expression
3426 -- N_Op_Divide
3427 -- Sloc points to /
3428 -- Treat_Fixed_As_Integer (Flag14-Sem)
3429 -- Do_Division_Check (Flag13-Sem)
3430 -- Rounded_Result (Flag18-Sem)
3431 -- plus fields for binary operator
3432 -- plus fields for expression
3434 -- N_Op_Mod
3435 -- Sloc points to MOD
3436 -- Treat_Fixed_As_Integer (Flag14-Sem)
3437 -- Do_Division_Check (Flag13-Sem)
3438 -- plus fields for binary operator
3439 -- plus fields for expression
3441 -- N_Op_Rem
3442 -- Sloc points to REM
3443 -- Treat_Fixed_As_Integer (Flag14-Sem)
3444 -- Do_Division_Check (Flag13-Sem)
3445 -- plus fields for binary operator
3446 -- plus fields for expression
3448 -- N_Op_Expon
3449 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
3450 -- Sloc points to **
3451 -- plus fields for binary operator
3452 -- plus fields for expression
3454 -- N_Op_Plus
3455 -- Sloc points to + (unary)
3456 -- plus fields for unary operator
3457 -- plus fields for expression
3459 -- N_Op_Minus
3460 -- Sloc points to - (unary)
3461 -- plus fields for unary operator
3462 -- plus fields for expression
3464 -- N_Op_Abs
3465 -- Sloc points to ABS
3466 -- plus fields for unary operator
3467 -- plus fields for expression
3469 -- N_Op_Not
3470 -- Sloc points to NOT
3471 -- plus fields for unary operator
3472 -- plus fields for expression
3474 -- See also shift operators in section B.2
3476 -- Note on fixed-point operations passed to Gigi: For adding operators,
3477 -- the semantics is to treat these simply as integer operations, with
3478 -- the small values being ignored (the bounds are already stored in
3479 -- units of small, so that constraint checking works as usual). For the
3480 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
3481 -- point operands if the Treat_Fixed_As_Integer flag is set and will
3482 -- thus treat these nodes in identical manner, ignoring small values.
3484 --------------------------
3485 -- 4.6 Type Conversion --
3486 --------------------------
3488 -- TYPE_CONVERSION ::=
3489 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
3491 -- In the (NAME) case, the name is stored as the expression
3493 -- Note: the parser never generates a type conversion node, since it
3494 -- looks like an indexed component which is generated by preference.
3495 -- The semantic pass must correct this misidentification.
3497 -- Gigi handles conversions that involve no change in the root type,
3498 -- and also all conversions from integer to floating-point types.
3499 -- Conversions from floating-point to integer are only handled in
3500 -- the case where Float_Truncate flag set. Other conversions from
3501 -- floating-point to integer (involving rounding) and all conversions
3502 -- involving fixed-point types are handled by the expander.
3504 -- Sprint syntax if Float_Truncate set: X^(Y)
3505 -- Sprint syntax if Conversion_OK set X?(Y)
3506 -- Sprint syntax if both flags set X?^(Y)
3508 -- Note: If either the operand or result type is fixed-point, Gigi will
3509 -- only see a type conversion node with Conversion_OK set. The front end
3510 -- takes care of all handling of small's for fixed-point conversions.
3512 -- N_Type_Conversion
3513 -- Sloc points to first token of subtype mark
3514 -- Subtype_Mark (Node4)
3515 -- Expression (Node3)
3516 -- Do_Tag_Check (Flag13-Sem)
3517 -- Do_Length_Check (Flag4-Sem)
3518 -- Do_Overflow_Check (Flag17-Sem)
3519 -- Float_Truncate (Flag11-Sem)
3520 -- Rounded_Result (Flag18-Sem)
3521 -- Conversion_OK (Flag14-Sem)
3522 -- plus fields for expression
3524 -- Note: if a range check is required, then the Do_Range_Check flag
3525 -- is set in the Expression with the check being done against the
3526 -- target type range (after the base type conversion, if any).
3528 -------------------------------
3529 -- 4.7 Qualified Expression --
3530 -------------------------------
3532 -- QUALIFIED_EXPRESSION ::=
3533 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
3535 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
3536 -- the expression, so the Expression field of this node always points
3537 -- to a parenthesized expression in this case (i.e. Paren_Count will
3538 -- always be non-zero for the referenced expression if it is not an
3539 -- aggregate).
3541 -- N_Qualified_Expression
3542 -- Sloc points to apostrophe
3543 -- Subtype_Mark (Node4)
3544 -- Expression (Node3) expression or aggregate
3545 -- plus fields for expression
3547 --------------------
3548 -- 4.8 Allocator --
3549 --------------------
3551 -- ALLOCATOR ::=
3552 -- new [NULL_EXCLUSION] SUBTYPE_INDICATION | new QUALIFIED_EXPRESSION
3554 -- Sprint syntax (when storage pool present)
3555 -- new xxx (storage_pool = pool)
3557 -- N_Allocator
3558 -- Sloc points to NEW
3559 -- Expression (Node3) subtype indication or qualified expression
3560 -- Null_Exclusion_Present (Flag11)
3561 -- Storage_Pool (Node1-Sem)
3562 -- Procedure_To_Call (Node4-Sem)
3563 -- No_Initialization (Flag13-Sem)
3564 -- Do_Storage_Check (Flag17-Sem)
3565 -- plus fields for expression
3567 ---------------------------------
3568 -- 5.1 Sequence Of Statements --
3569 ---------------------------------
3571 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
3573 -- Note: Although the parser will not accept a declaration as a
3574 -- statement, the semantic analyzer may insert declarations (e.g.
3575 -- declarations of implicit types needed for execution of other
3576 -- statements) into a sequence of statements, so the code genmerator
3577 -- should be prepared to accept a declaration where a statement is
3578 -- expected. Note also that pragmas can appear as statements.
3580 --------------------
3581 -- 5.1 Statement --
3582 --------------------
3584 -- STATEMENT ::=
3585 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
3587 -- There is no explicit node in the tree for a statement. Instead, the
3588 -- individual statement appears directly. Labels are treated as a
3589 -- kind of statement, i.e. they are linked into a statement list at
3590 -- the point they appear, so the labeled statement appears following
3591 -- the label or labels in the statement list.
3593 ---------------------------
3594 -- 5.1 Simple Statement --
3595 ---------------------------
3597 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
3598 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
3599 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
3600 -- | RETURN_STATEMENT | ENTRY_CALL_STATEMENT
3601 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
3602 -- | ABORT_STATEMENT | RAISE_STATEMENT
3603 -- | CODE_STATEMENT
3605 -----------------------------
3606 -- 5.1 Compound Statement --
3607 -----------------------------
3609 -- COMPOUND_STATEMENT ::=
3610 -- IF_STATEMENT | CASE_STATEMENT
3611 -- | LOOP_STATEMENT | BLOCK_STATEMENT
3612 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
3614 -------------------------
3615 -- 5.1 Null Statement --
3616 -------------------------
3618 -- NULL_STATEMENT ::= null;
3620 -- N_Null_Statement
3621 -- Sloc points to NULL
3623 ----------------
3624 -- 5.1 Label --
3625 ----------------
3627 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
3629 -- Note that the occurrence of a label is not a defining identifier,
3630 -- but rather a referencing occurrence. The defining occurrence is
3631 -- in the implicit label declaration which occurs in the innermost
3632 -- enclosing block.
3634 -- N_Label
3635 -- Sloc points to <<
3636 -- Identifier (Node1) direct name of statement identifier
3637 -- Exception_Junk (Flag7-Sem)
3639 -------------------------------
3640 -- 5.1 Statement Identifier --
3641 -------------------------------
3643 -- STATEMENT_INDENTIFIER ::= DIRECT_NAME
3645 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
3646 -- (not an OPERATOR_SYMBOL)
3648 -------------------------------
3649 -- 5.2 Assignment Statement --
3650 -------------------------------
3652 -- ASSIGNMENT_STATEMENT ::=
3653 -- variable_NAME := EXPRESSION;
3655 -- N_Assignment_Statement
3656 -- Sloc points to :=
3657 -- Name (Node2)
3658 -- Expression (Node3)
3659 -- Do_Tag_Check (Flag13-Sem)
3660 -- Do_Length_Check (Flag4-Sem)
3661 -- Forwards_OK (Flag5-Sem)
3662 -- Backwards_OK (Flag6-Sem)
3663 -- No_Ctrl_Actions (Flag7-Sem)
3665 -- Note: if a range check is required, then the Do_Range_Check flag
3666 -- is set in the Expression (right hand side), with the check being
3667 -- done against the type of the Name (left hand side).
3669 -- Note: the back end places some restrictions on the form of the
3670 -- Expression field. If the object being assigned to is Atomic, then
3671 -- the Expression may not have the form of an aggregate (since this
3672 -- might cause the back end to generate separate assignments). It
3673 -- also cannot be a reference to an object marked as a true constant
3674 -- (Is_True_Constant flag set), where the object is itself initalized
3675 -- with an aggregate. If necessary the front end must generate an
3676 -- extra temporary (with Is_True_Constant set False), and initialize
3677 -- this temporary as required (the temporary itself is not atomic).
3679 -----------------------
3680 -- 5.3 If Statement --
3681 -----------------------
3683 -- IF_STATEMENT ::=
3684 -- if CONDITION then
3685 -- SEQUENCE_OF_STATEMENTS
3686 -- {elsif CONDITION then
3687 -- SEQUENCE_OF_STATEMENTS}
3688 -- [else
3689 -- SEQUENCE_OF_STATEMENTS]
3690 -- end if;
3692 -- Gigi restriction: This expander ensures that the type of the
3693 -- Condition fields is always Standard.Boolean, even if the type
3694 -- in the source is some non-standard boolean type.
3696 -- N_If_Statement
3697 -- Sloc points to IF
3698 -- Condition (Node1)
3699 -- Then_Statements (List2)
3700 -- Elsif_Parts (List3) (set to No_List if none present)
3701 -- Else_Statements (List4) (set to No_List if no else part present)
3702 -- End_Span (Uint5) (set to No_Uint if expander generated)
3704 -- N_Elsif_Part
3705 -- Sloc points to ELSIF
3706 -- Condition (Node1)
3707 -- Then_Statements (List2)
3708 -- Condition_Actions (List3-Sem)
3710 --------------------
3711 -- 5.3 Condition --
3712 --------------------
3714 -- CONDITION ::= boolean_EXPRESSION
3716 -------------------------
3717 -- 5.4 Case Statement --
3718 -------------------------
3720 -- CASE_STATEMENT ::=
3721 -- case EXPRESSION is
3722 -- CASE_STATEMENT_ALTERNATIVE
3723 -- {CASE_STATEMENT_ALTERNATIVE}
3724 -- end case;
3726 -- Note: the Alternatives can contain pragmas. These only occur at
3727 -- the start of the list, since any pragmas occurring after the first
3728 -- alternative are absorbed into the corresponding statement sequence.
3730 -- N_Case_Statement
3731 -- Sloc points to CASE
3732 -- Expression (Node3)
3733 -- Alternatives (List4)
3734 -- End_Span (Uint5) (set to No_Uint if expander generated)
3736 -------------------------------------
3737 -- 5.4 Case Statement Alternative --
3738 -------------------------------------
3740 -- CASE_STATEMENT_ALTERNATIVE ::=
3741 -- when DISCRETE_CHOICE_LIST =>
3742 -- SEQUENCE_OF_STATEMENTS
3744 -- N_Case_Statement_Alternative
3745 -- Sloc points to WHEN
3746 -- Discrete_Choices (List4)
3747 -- Statements (List3)
3749 -------------------------
3750 -- 5.5 Loop Statement --
3751 -------------------------
3753 -- LOOP_STATEMENT ::=
3754 -- [loop_STATEMENT_IDENTIFIER :]
3755 -- [ITERATION_SCHEME] loop
3756 -- SEQUENCE_OF_STATEMENTS
3757 -- end loop [loop_IDENTIFIER];
3759 -- Note: The occurrence of a loop label is not a defining identifier
3760 -- but rather a referencing occurrence. The defining occurrence is in
3761 -- the implicit label declaration which occurs in the innermost
3762 -- enclosing block.
3764 -- Note: there is always a loop statement identifier present in
3765 -- the tree, even if none was given in the source. In the case where
3766 -- no loop identifier is given in the source, the parser creates
3767 -- a name of the form _Loop_n, where n is a decimal integer (the
3768 -- two underlines ensure that the loop names created in this manner
3769 -- do not conflict with any user defined identifiers), and the flag
3770 -- Has_Created_Identifier is set to True. The only exception to the
3771 -- rule that all loop statement nodes have identifiers occurs for
3772 -- loops constructed by the expander, and the semantic analyzer will
3773 -- create and supply dummy loop identifiers in these cases.
3775 -- N_Loop_Statement
3776 -- Sloc points to LOOP
3777 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
3778 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
3779 -- Statements (List3)
3780 -- End_Label (Node4)
3781 -- Has_Created_Identifier (Flag15)
3782 -- Is_Null_Loop (Flag16)
3784 --------------------------
3785 -- 5.5 Iteration Scheme --
3786 --------------------------
3788 -- ITERATION_SCHEME ::=
3789 -- while CONDITION | for LOOP_PARAMETER_SPECIFICATION
3791 -- Gigi restriction: This expander ensures that the type of the
3792 -- Condition field is always Standard.Boolean, even if the type
3793 -- in the source is some non-standard boolean type.
3795 -- N_Iteration_Scheme
3796 -- Sloc points to WHILE or FOR
3797 -- Condition (Node1) (set to Empty if FOR case)
3798 -- Condition_Actions (List3-Sem)
3799 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
3801 ---------------------------------------
3802 -- 5.5 Loop parameter specification --
3803 ---------------------------------------
3805 -- LOOP_PARAMETER_SPECIFICATION ::=
3806 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
3808 -- N_Loop_Parameter_Specification
3809 -- Sloc points to first identifier
3810 -- Defining_Identifier (Node1)
3811 -- Reverse_Present (Flag15)
3812 -- Discrete_Subtype_Definition (Node4)
3814 --------------------------
3815 -- 5.6 Block Statement --
3816 --------------------------
3818 -- BLOCK_STATEMENT ::=
3819 -- [block_STATEMENT_IDENTIFIER:]
3820 -- [declare
3821 -- DECLARATIVE_PART]
3822 -- begin
3823 -- HANDLED_SEQUENCE_OF_STATEMENTS
3824 -- end [block_IDENTIFIER];
3826 -- Note that the occurrence of a block identifier is not a defining
3827 -- identifier, but rather a referencing occurrence. The defining
3828 -- occurrence is in the implicit label declaration which occurs in
3829 -- the innermost enclosing block.
3831 -- Note: there is always a block statement identifier present in
3832 -- the tree, even if none was given in the source. In the case where
3833 -- no block identifier is given in the source, the parser creates
3834 -- a name of the form _Block_n, where n is a decimal integer (the
3835 -- two underlines ensure that the block names created in this manner
3836 -- do not conflict with any user defined identifiers), and the flag
3837 -- Has_Created_Identifier is set to True. The only exception to the
3838 -- rule that all loop statement nodes have identifiers occurs for
3839 -- blocks constructed by the expander, and the semantic analyzer
3840 -- creates and supplies dummy names for the blocks).
3842 -- N_Block_Statement
3843 -- Sloc points to DECLARE or BEGIN
3844 -- Identifier (Node1) block direct name (set to Empty if not present)
3845 -- Declarations (List2) (set to No_List if no DECLARE part)
3846 -- Handled_Statement_Sequence (Node4)
3847 -- Is_Task_Master (Flag5-Sem)
3848 -- Activation_Chain_Entity (Node3-Sem)
3849 -- Has_Created_Identifier (Flag15)
3850 -- Is_Task_Allocation_Block (Flag6)
3851 -- Is_Asynchronous_Call_Block (Flag7)
3853 -------------------------
3854 -- 5.7 Exit Statement --
3855 -------------------------
3857 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
3859 -- Gigi restriction: This expander ensures that the type of the
3860 -- Condition field is always Standard.Boolean, even if the type
3861 -- in the source is some non-standard boolean type.
3863 -- N_Exit_Statement
3864 -- Sloc points to EXIT
3865 -- Name (Node2) (set to Empty if no loop name present)
3866 -- Condition (Node1) (set to Empty if no when part present)
3868 -------------------------
3869 -- 5.9 Goto Statement --
3870 -------------------------
3872 -- GOTO_STATEMENT ::= goto label_NAME;
3874 -- N_Goto_Statement
3875 -- Sloc points to GOTO
3876 -- Name (Node2)
3877 -- Exception_Junk (Flag7-Sem)
3879 ---------------------------------
3880 -- 6.1 Subprogram Declaration --
3881 ---------------------------------
3883 -- SUBPROGRAM_DECLARATION ::= SUBPROGRAM_SPECIFICATION;
3885 -- N_Subprogram_Declaration
3886 -- Sloc points to FUNCTION or PROCEDURE
3887 -- Specification (Node1)
3888 -- Body_To_Inline (Node3-Sem)
3889 -- Corresponding_Body (Node5-Sem)
3890 -- Parent_Spec (Node4-Sem)
3892 ------------------------------------------
3893 -- 6.1 Abstract Subprogram Declaration --
3894 ------------------------------------------
3896 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
3897 -- SUBPROGRAM_SPECIFICATION is abstract;
3899 -- N_Abstract_Subprogram_Declaration
3900 -- Sloc points to ABSTRACT
3901 -- Specification (Node1)
3903 -----------------------------------
3904 -- 6.1 Subprogram Specification --
3905 -----------------------------------
3907 -- SUBPROGRAM_SPECIFICATION ::=
3908 -- [[not] overriding]
3909 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
3910 -- | [[not] overriding]
3911 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
3913 -- Note: there are no separate nodes for the profiles, instead the
3914 -- information appears directly in the following nodes.
3916 -- N_Function_Specification
3917 -- Sloc points to FUNCTION
3918 -- Defining_Unit_Name (Node1) (the designator)
3919 -- Elaboration_Boolean (Node2-Sem)
3920 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3921 -- Null_Exclusion_Present (Flag11)
3922 -- Result_Definition (Node4) for result subtype
3923 -- Generic_Parent (Node5-Sem)
3924 -- Must_Override (Flag14) set if overriding indicator present
3925 -- Must_Not_Override (Flag15) set if not_overriding indicator present
3927 -- N_Procedure_Specification
3928 -- Sloc points to PROCEDURE
3929 -- Defining_Unit_Name (Node1)
3930 -- Elaboration_Boolean (Node2-Sem)
3931 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3932 -- Generic_Parent (Node5-Sem)
3933 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
3934 -- Must_Override (Flag14) set if overriding indicator present
3935 -- Must_Not_Override (Flag15) set if not_overriding indicator present
3937 -- Note: overriding indicator is an Ada 2005 feature
3939 ---------------------
3940 -- 6.1 Designator --
3941 ---------------------
3943 -- DESIGNATOR ::=
3944 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
3946 -- Designators that are simply identifiers or operator symbols appear
3947 -- directly in the tree in this form. The following node is used only
3948 -- in the case where the designator has a parent unit name component.
3950 -- N_Designator
3951 -- Sloc points to period
3952 -- Name (Node2) holds the parent unit name. Note that this is always
3953 -- non-Empty, since this node is only used for the case where a
3954 -- parent library unit package name is present.
3955 -- Identifier (Node1)
3957 -- Note that the identifier can also be an operator symbol here
3959 ------------------------------
3960 -- 6.1 Defining Designator --
3961 ------------------------------
3963 -- DEFINING_DESIGNATOR ::=
3964 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
3966 -------------------------------------
3967 -- 6.1 Defining Program Unit Name --
3968 -------------------------------------
3970 -- DEFINING_PROGRAM_UNIT_NAME ::=
3971 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
3973 -- The parent unit name is present only in the case of a child unit
3974 -- name (permissible only for Ada 95 for a library level unit, i.e.
3975 -- a unit at scope level one). If no such name is present, the defining
3976 -- program unit name is represented simply as the defining identifier.
3977 -- In the child unit case, the following node is used to represent the
3978 -- child unit name.
3980 -- N_Defining_Program_Unit_Name
3981 -- Sloc points to period
3982 -- Name (Node2) holds the parent unit name. Note that this is always
3983 -- non-Empty, since this node is only used for the case where a
3984 -- parent unit name is present.
3985 -- Defining_Identifier (Node1)
3987 --------------------------
3988 -- 6.1 Operator Symbol --
3989 --------------------------
3991 -- OPERATOR_SYMBOL ::= STRING_LITERAL
3993 -- Note: the fields of the N_Operator_Symbol node are laid out to
3994 -- match the corresponding fields of an N_Character_Literal node. This
3995 -- allows easy conversion of the operator symbol node into a character
3996 -- literal node in the case where a string constant of the form of an
3997 -- operator symbol is scanned out as such, but turns out semantically
3998 -- to be a string literal that is not an operator. For details see
3999 -- Sinfo.CN.Change_Operator_Symbol_To_String_Literal.
4001 -- N_Operator_Symbol
4002 -- Sloc points to literal
4003 -- Chars (Name1) contains the Name_Id for the operator symbol
4004 -- Strval (Str3) Id of string value. This is used if the operator
4005 -- symbol turns out to be a normal string after all.
4006 -- Entity (Node4-Sem)
4007 -- Associated_Node (Node4-Sem)
4008 -- Has_Private_View (Flag11-Sem) set in generic units.
4009 -- Etype (Node5-Sem)
4011 -- Note: the Strval field may be set to No_String for generated
4012 -- operator symbols that are known not to be string literals
4013 -- semantically.
4015 -----------------------------------
4016 -- 6.1 Defining Operator Symbol --
4017 -----------------------------------
4019 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
4021 -- A defining operator symbol is an entity, which has additional
4022 -- fields depending on the setting of the Ekind field. These
4023 -- additional fields are defined (and access subprograms declared)
4024 -- in package Einfo.
4026 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
4027 -- are deliberately layed out to match the layout of fields in an
4028 -- ordinary N_Operator_Symbol node allowing for easy alteration of
4029 -- an operator symbol node into a defining operator symbol node.
4030 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
4031 -- for further details.
4033 -- N_Defining_Operator_Symbol
4034 -- Sloc points to literal
4035 -- Chars (Name1) contains the Name_Id for the operator symbol
4036 -- Next_Entity (Node2-Sem)
4037 -- Scope (Node3-Sem)
4038 -- Etype (Node5-Sem)
4040 ----------------------------
4041 -- 6.1 Parameter Profile --
4042 ----------------------------
4044 -- PARAMETER_PROFILE ::= [FORMAL_PART]
4046 ---------------------------------------
4047 -- 6.1 Parameter and Result Profile --
4048 ---------------------------------------
4050 -- PARAMETER_AND_RESULT_PROFILE ::=
4051 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
4052 -- | [FORMAL_PART] return ACCESS_DEFINITION
4054 -- There is no explicit node in the tree for a parameter and result
4055 -- profile. Instead the information appears directly in the parent.
4057 ----------------------
4058 -- 6.1 Formal part --
4059 ----------------------
4061 -- FORMAL_PART ::=
4062 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
4064 ----------------------------------
4065 -- 6.1 Parameter specification --
4066 ----------------------------------
4068 -- PARAMETER_SPECIFICATION ::=
4069 -- DEFINING_IDENTIFIER_LIST : MODE [NULL_EXCLUSION] SUBTYPE_MARK
4070 -- [:= DEFAULT_EXPRESSION]
4071 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
4072 -- [:= DEFAULT_EXPRESSION]
4074 -- Although the syntax allows multiple identifiers in the list, the
4075 -- semantics is as though successive specifications were given with
4076 -- identical type definition and expression components. To simplify
4077 -- semantic processing, the parser represents a multiple declaration
4078 -- case as a sequence of single Specifications, using the More_Ids and
4079 -- Prev_Ids flags to preserve the original source form as described
4080 -- in the section on "Handling of Defining Identifier Lists".
4082 -- N_Parameter_Specification
4083 -- Sloc points to first identifier
4084 -- Defining_Identifier (Node1)
4085 -- In_Present (Flag15)
4086 -- Out_Present (Flag17)
4087 -- Null_Exclusion_Present (Flag11)
4088 -- Parameter_Type (Node2) subtype mark or access definition
4089 -- Expression (Node3) (set to Empty if no default expression present)
4090 -- Do_Accessibility_Check (Flag13-Sem)
4091 -- More_Ids (Flag5) (set to False if no more identifiers in list)
4092 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
4093 -- Default_Expression (Node5-Sem)
4095 ---------------
4096 -- 6.1 Mode --
4097 ---------------
4099 -- MODE ::= [in] | in out | out
4101 -- There is no explicit node in the tree for the Mode. Instead the
4102 -- In_Present and Out_Present flags are set in the parent node to
4103 -- record the presence of keywords specifying the mode.
4105 --------------------------
4106 -- 6.3 Subprogram Body --
4107 --------------------------
4109 -- SUBPROGRAM_BODY ::=
4110 -- SUBPROGRAM_SPECIFICATION is
4111 -- DECLARATIVE_PART
4112 -- begin
4113 -- HANDLED_SEQUENCE_OF_STATEMENTS
4114 -- end [DESIGNATOR];
4116 -- N_Subprogram_Body
4117 -- Sloc points to FUNCTION or PROCEDURE
4118 -- Specification (Node1)
4119 -- Declarations (List2)
4120 -- Handled_Statement_Sequence (Node4)
4121 -- Activation_Chain_Entity (Node3-Sem)
4122 -- Corresponding_Spec (Node5-Sem)
4123 -- Acts_As_Spec (Flag4-Sem)
4124 -- Bad_Is_Detected (Flag15) used only by parser
4125 -- Do_Storage_Check (Flag17-Sem)
4126 -- Has_Priority_Pragma (Flag6-Sem)
4127 -- Is_Protected_Subprogram_Body (Flag7-Sem)
4128 -- Is_Task_Master (Flag5-Sem)
4129 -- Was_Originally_Stub (Flag13-Sem)
4131 -----------------------------------
4132 -- 6.4 Procedure Call Statement --
4133 -----------------------------------
4135 -- PROCEDURE_CALL_STATEMENT ::=
4136 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
4138 -- Note: the reason that a procedure call has expression fields is
4139 -- that it semantically resembles an expression, e.g. overloading is
4140 -- allowed and a type is concocted for semantic processing purposes.
4141 -- Certain of these fields, such as Parens are not relevant, but it
4142 -- is easier to just supply all of them together!
4144 -- N_Procedure_Call_Statement
4145 -- Sloc points to first token of name or prefix
4146 -- Name (Node2) stores name or prefix
4147 -- Parameter_Associations (List3) (set to No_List if no
4148 -- actual parameter part)
4149 -- First_Named_Actual (Node4-Sem)
4150 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4151 -- Do_Tag_Check (Flag13-Sem)
4152 -- No_Elaboration_Check (Flag14-Sem)
4153 -- Parameter_List_Truncated (Flag17-Sem)
4154 -- ABE_Is_Certain (Flag18-Sem)
4155 -- plus fields for expression
4157 -- If any IN parameter requires a range check, then the corresponding
4158 -- argument expression has the Do_Range_Check flag set, and the range
4159 -- check is done against the formal type. Note that this argument
4160 -- expression may appear directly in the Parameter_Associations list,
4161 -- or may be a descendent of an N_Parameter_Association node that
4162 -- appears in this list.
4164 ------------------------
4165 -- 6.4 Function Call --
4166 ------------------------
4168 -- FUNCTION_CALL ::=
4169 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
4171 -- Note: the parser may generate an indexed component node or simply
4172 -- a name node instead of a function call node. The semantic pass must
4173 -- correct this misidentification.
4175 -- N_Function_Call
4176 -- Sloc points to first token of name or prefix
4177 -- Name (Node2) stores name or prefix
4178 -- Parameter_Associations (List3) (set to No_List if no
4179 -- actual parameter part)
4180 -- First_Named_Actual (Node4-Sem)
4181 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4182 -- Do_Tag_Check (Flag13-Sem)
4183 -- No_Elaboration_Check (Flag14-Sem)
4184 -- Parameter_List_Truncated (Flag17-Sem)
4185 -- ABE_Is_Certain (Flag18-Sem)
4186 -- plus fields for expression
4188 --------------------------------
4189 -- 6.4 Actual Parameter Part --
4190 --------------------------------
4192 -- ACTUAL_PARAMETER_PART ::=
4193 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
4195 --------------------------------
4196 -- 6.4 Parameter Association --
4197 --------------------------------
4199 -- PARAMETER_ASSOCIATION ::=
4200 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
4202 -- Note: the N_Parameter_Association node is built only if a formal
4203 -- parameter selector name is present, otherwise the parameter
4204 -- association appears in the tree simply as the node for the
4205 -- explicit actual parameter.
4207 -- N_Parameter_Association
4208 -- Sloc points to formal parameter
4209 -- Selector_Name (Node2) (always non-Empty, since this node is
4210 -- only used if a formal parameter selector name is present)
4211 -- Explicit_Actual_Parameter (Node3)
4212 -- Next_Named_Actual (Node4-Sem)
4214 ---------------------------
4215 -- 6.4 Actual Parameter --
4216 ---------------------------
4218 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
4220 ---------------------------
4221 -- 6.5 Return Statement --
4222 ---------------------------
4224 -- RETURN_STATEMENT ::= return [EXPRESSION];
4226 -- N_Return_Statement
4227 -- Sloc points to RETURN
4228 -- Expression (Node3) (set to Empty if no expression present)
4229 -- Storage_Pool (Node1-Sem)
4230 -- Procedure_To_Call (Node4-Sem)
4231 -- Do_Tag_Check (Flag13-Sem)
4232 -- Return_Type (Node2-Sem)
4233 -- By_Ref (Flag5-Sem)
4235 -- Note: if a range check is required, then Do_Range_Check is set
4236 -- on the Expression. The range check is against Return_Type.
4238 ------------------------------
4239 -- 7.1 Package Declaration --
4240 ------------------------------
4242 -- PACKAGE_DECLARATION ::= PACKAGE_SPECIFICATION;
4244 -- Note: the activation chain entity for a package spec is used for
4245 -- all tasks declared in the package spec, or in the package body.
4247 -- N_Package_Declaration
4248 -- Sloc points to PACKAGE
4249 -- Specification (Node1)
4250 -- Corresponding_Body (Node5-Sem)
4251 -- Parent_Spec (Node4-Sem)
4252 -- Activation_Chain_Entity (Node3-Sem)
4254 --------------------------------
4255 -- 7.1 Package Specification --
4256 --------------------------------
4258 -- PACKAGE_SPECIFICATION ::=
4259 -- package DEFINING_PROGRAM_UNIT_NAME is
4260 -- {BASIC_DECLARATIVE_ITEM}
4261 -- [private
4262 -- {BASIC_DECLARATIVE_ITEM}]
4263 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
4265 -- N_Package_Specification
4266 -- Sloc points to PACKAGE
4267 -- Defining_Unit_Name (Node1)
4268 -- Visible_Declarations (List2)
4269 -- Private_Declarations (List3) (set to No_List if no private
4270 -- part present)
4271 -- End_Label (Node4)
4272 -- Generic_Parent (Node5-Sem)
4273 -- Limited_View_Installed (Flag18-Sem)
4275 -----------------------
4276 -- 7.1 Package Body --
4277 -----------------------
4279 -- PACKAGE_BODY ::=
4280 -- package body DEFINING_PROGRAM_UNIT_NAME is
4281 -- DECLARATIVE_PART
4282 -- [begin
4283 -- HANDLED_SEQUENCE_OF_STATEMENTS]
4284 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
4286 -- N_Package_Body
4287 -- Sloc points to PACKAGE
4288 -- Defining_Unit_Name (Node1)
4289 -- Declarations (List2)
4290 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
4291 -- Corresponding_Spec (Node5-Sem)
4292 -- Was_Originally_Stub (Flag13-Sem)
4294 -- Note: if a source level package does not contain a handled sequence
4295 -- of statements, then the parser supplies a dummy one with a null
4296 -- sequence of statements. Comes_From_Source will be False in this
4297 -- constructed sequence. The reason we need this is for the End_Label
4298 -- field in the HSS.
4300 -----------------------------------
4301 -- 7.4 Private Type Declaration --
4302 -----------------------------------
4304 -- PRIVATE_TYPE_DECLARATION ::=
4305 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
4306 -- is [[abstract] tagged] [limited] private;
4308 -- Note: TAGGED is not permitted in Ada 83 mode
4310 -- N_Private_Type_Declaration
4311 -- Sloc points to TYPE
4312 -- Defining_Identifier (Node1)
4313 -- Discriminant_Specifications (List4) (set to No_List if no
4314 -- discriminant part)
4315 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4316 -- Abstract_Present (Flag4)
4317 -- Tagged_Present (Flag15)
4318 -- Limited_Present (Flag17)
4320 ----------------------------------------
4321 -- 7.4 Private Extension Declaration --
4322 ----------------------------------------
4324 -- PRIVATE_EXTENSION_DECLARATION ::=
4325 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
4326 -- [abstract] [limited] new ancestor_SUBTYPE_INDICATION
4327 -- [and INTERFACE_LIST] with private;
4329 -- Note: LIMITED, and private extension declarations are not allowed
4330 -- in Ada 83 mode.
4332 -- N_Private_Extension_Declaration
4333 -- Sloc points to TYPE
4334 -- Defining_Identifier (Node1)
4335 -- Discriminant_Specifications (List4) (set to No_List if no
4336 -- discriminant part)
4337 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4338 -- Abstract_Present (Flag4)
4339 -- Limited_Present (Flag17)
4340 -- Subtype_Indication (Node5)
4341 -- Interface_List (List2) (set to No_List if none)
4343 ---------------------
4344 -- 8.4 Use Clause --
4345 ---------------------
4347 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
4349 -----------------------------
4350 -- 8.4 Use Package Clause --
4351 -----------------------------
4353 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
4355 -- N_Use_Package_Clause
4356 -- Sloc points to USE
4357 -- Names (List2)
4358 -- Next_Use_Clause (Node3-Sem)
4359 -- Hidden_By_Use_Clause (Elist4-Sem)
4361 --------------------------
4362 -- 8.4 Use Type Clause --
4363 --------------------------
4365 -- USE_TYPE_CLAUSE ::= use type SUBTYPE_MARK {, SUBTYPE_MARK};
4367 -- Note: use type clause is not permitted in Ada 83 mode
4369 -- N_Use_Type_Clause
4370 -- Sloc points to USE
4371 -- Subtype_Marks (List2)
4372 -- Next_Use_Clause (Node3-Sem)
4373 -- Hidden_By_Use_Clause (Elist4-Sem)
4375 -------------------------------
4376 -- 8.5 Renaming Declaration --
4377 -------------------------------
4379 -- RENAMING_DECLARATION ::=
4380 -- OBJECT_RENAMING_DECLARATION
4381 -- | EXCEPTION_RENAMING_DECLARATION
4382 -- | PACKAGE_RENAMING_DECLARATION
4383 -- | SUBPROGRAM_RENAMING_DECLARATION
4384 -- | GENERIC_RENAMING_DECLARATION
4386 --------------------------------------
4387 -- 8.5 Object Renaming Declaration --
4388 --------------------------------------
4390 -- OBJECT_RENAMING_DECLARATION ::=
4391 -- DEFINING_IDENTIFIER : SUBTYPE_MARK renames object_NAME;
4392 -- | DEFINING_IDENTIFIER : ACCESS_DEFINITION renames object_NAME;
4394 -- Note: Access_Definition is an optional field that gives support to
4395 -- Ada 2005 (AI-230). The parser generates nodes that have either the
4396 -- Subtype_Indication field or else the Access_Definition field.
4398 -- N_Object_Renaming_Declaration
4399 -- Sloc points to first identifier
4400 -- Defining_Identifier (Node1)
4401 -- Subtype_Mark (Node4) (set to Empty if not present)
4402 -- Access_Definition (Node3) (set to Empty if not present)
4403 -- Name (Node2)
4404 -- Corresponding_Generic_Association (Node5-Sem)
4406 -----------------------------------------
4407 -- 8.5 Exception Renaming Declaration --
4408 -----------------------------------------
4410 -- EXCEPTION_RENAMING_DECLARATION ::=
4411 -- DEFINING_IDENTIFIER : exception renames exception_NAME;
4413 -- N_Exception_Renaming_Declaration
4414 -- Sloc points to first identifier
4415 -- Defining_Identifier (Node1)
4416 -- Name (Node2)
4418 ---------------------------------------
4419 -- 8.5 Package Renaming Declaration --
4420 ---------------------------------------
4422 -- PACKAGE_RENAMING_DECLARATION ::=
4423 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME;
4425 -- N_Package_Renaming_Declaration
4426 -- Sloc points to PACKAGE
4427 -- Defining_Unit_Name (Node1)
4428 -- Name (Node2)
4429 -- Parent_Spec (Node4-Sem)
4431 ------------------------------------------
4432 -- 8.5 Subprogram Renaming Declaration --
4433 ------------------------------------------
4435 -- SUBPROGRAM_RENAMING_DECLARATION ::=
4436 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
4438 -- N_Subprogram_Renaming_Declaration
4439 -- Sloc points to RENAMES
4440 -- Specification (Node1)
4441 -- Name (Node2)
4442 -- Parent_Spec (Node4-Sem)
4443 -- Corresponding_Spec (Node5-Sem)
4444 -- Corresponding_Formal_Spec (Node3-Sem)
4445 -- From_Default (Flag6-Sem)
4447 -----------------------------------------
4448 -- 8.5.5 Generic Renaming Declaration --
4449 -----------------------------------------
4451 -- GENERIC_RENAMING_DECLARATION ::=
4452 -- generic package DEFINING_PROGRAM_UNIT_NAME
4453 -- renames generic_package_NAME
4454 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
4455 -- renames generic_procedure_NAME
4456 -- | generic function DEFINING_PROGRAM_UNIT_NAME
4457 -- renames generic_function_NAME
4459 -- N_Generic_Package_Renaming_Declaration
4460 -- Sloc points to GENERIC
4461 -- Defining_Unit_Name (Node1)
4462 -- Name (Node2)
4463 -- Parent_Spec (Node4-Sem)
4465 -- N_Generic_Procedure_Renaming_Declaration
4466 -- Sloc points to GENERIC
4467 -- Defining_Unit_Name (Node1)
4468 -- Name (Node2)
4469 -- Parent_Spec (Node4-Sem)
4471 -- N_Generic_Function_Renaming_Declaration
4472 -- Sloc points to GENERIC
4473 -- Defining_Unit_Name (Node1)
4474 -- Name (Node2)
4475 -- Parent_Spec (Node4-Sem)
4477 --------------------------------
4478 -- 9.1 Task Type Declaration --
4479 --------------------------------
4481 -- TASK_TYPE_DECLARATION ::=
4482 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4483 -- [is [new INTERFACE_LIST with] TASK_DEFINITITION];
4485 -- N_Task_Type_Declaration
4486 -- Sloc points to TASK
4487 -- Defining_Identifier (Node1)
4488 -- Discriminant_Specifications (List4) (set to No_List if no
4489 -- discriminant part)
4490 -- Interface_List (List2) (set to No_List if none)
4491 -- Task_Definition (Node3) (set to Empty if not present)
4492 -- Corresponding_Body (Node5-Sem)
4494 ----------------------------------
4495 -- 9.1 Single Task Declaration --
4496 ----------------------------------
4498 -- SINGLE_TASK_DECLARATION ::=
4499 -- task DEFINING_IDENTIFIER
4500 -- [is [new INTERFACE_LIST with] TASK_DEFINITITION];
4502 -- N_Single_Task_Declaration
4503 -- Sloc points to TASK
4504 -- Defining_Identifier (Node1)
4505 -- Interface_List (List2) (set to No_List if none)
4506 -- Task_Definition (Node3) (set to Empty if not present)
4508 --------------------------
4509 -- 9.1 Task Definition --
4510 --------------------------
4512 -- TASK_DEFINITION ::=
4513 -- {TASK_ITEM}
4514 -- [private
4515 -- {TASK_ITEM}]
4516 -- end [task_IDENTIFIER]
4518 -- Note: as a result of semantic analysis, the list of task items can
4519 -- include implicit type declarations resulting from entry families.
4521 -- N_Task_Definition
4522 -- Sloc points to first token of task definition
4523 -- Visible_Declarations (List2)
4524 -- Private_Declarations (List3) (set to No_List if no private part)
4525 -- End_Label (Node4)
4526 -- Has_Priority_Pragma (Flag6-Sem)
4527 -- Has_Storage_Size_Pragma (Flag5-Sem)
4528 -- Has_Task_Info_Pragma (Flag7-Sem)
4529 -- Has_Task_Name_Pragma (Flag8-Sem)
4531 --------------------
4532 -- 9.1 Task Item --
4533 --------------------
4535 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
4537 --------------------
4538 -- 9.1 Task Body --
4539 --------------------
4541 -- TASK_BODY ::=
4542 -- task body task_DEFINING_IDENTIFIER is
4543 -- DECLARATIVE_PART
4544 -- begin
4545 -- HANDLED_SEQUENCE_OF_STATEMENTS
4546 -- end [task_IDENTIFIER];
4548 -- Gigi restriction: This node never appears
4550 -- N_Task_Body
4551 -- Sloc points to TASK
4552 -- Defining_Identifier (Node1)
4553 -- Declarations (List2)
4554 -- Handled_Statement_Sequence (Node4)
4555 -- Is_Task_Master (Flag5-Sem)
4556 -- Activation_Chain_Entity (Node3-Sem)
4557 -- Corresponding_Spec (Node5-Sem)
4558 -- Was_Originally_Stub (Flag13-Sem)
4560 -------------------------------------
4561 -- 9.4 Protected Type Declaration --
4562 -------------------------------------
4564 -- PROTECTED_TYPE_DECLARATION ::=
4565 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4566 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4568 -- Note: protected type declarations are not permitted in Ada 83 mode
4570 -- N_Protected_Type_Declaration
4571 -- Sloc points to PROTECTED
4572 -- Defining_Identifier (Node1)
4573 -- Discriminant_Specifications (List4) (set to No_List if no
4574 -- discriminant part)
4575 -- Interface_List (List2) (set to No_List if none)
4576 -- Protected_Definition (Node3)
4577 -- Corresponding_Body (Node5-Sem)
4579 ---------------------------------------
4580 -- 9.4 Single Protected Declaration --
4581 ---------------------------------------
4583 -- SINGLE_PROTECTED_DECLARATION ::=
4584 -- protected DEFINING_IDENTIFIER
4585 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4587 -- Note: single protected declarations are not allowed in Ada 83 mode
4589 -- N_Single_Protected_Declaration
4590 -- Sloc points to PROTECTED
4591 -- Defining_Identifier (Node1)
4592 -- Interface_List (List2) (set to No_List if none)
4593 -- Protected_Definition (Node3)
4595 -------------------------------
4596 -- 9.4 Protected Definition --
4597 -------------------------------
4599 -- PROTECTED_DEFINITION ::=
4600 -- {PROTECTED_OPERATION_DECLARATION}
4601 -- [private
4602 -- {PROTECTED_ELEMENT_DECLARATION}]
4603 -- end [protected_IDENTIFIER]
4605 -- N_Protected_Definition
4606 -- Sloc points to first token of protected definition
4607 -- Visible_Declarations (List2)
4608 -- Private_Declarations (List3) (set to No_List if no private part)
4609 -- End_Label (Node4)
4610 -- Has_Priority_Pragma (Flag6-Sem)
4612 ------------------------------------------
4613 -- 9.4 Protected Operation Declaration --
4614 ------------------------------------------
4616 -- PROTECTED_OPERATION_DECLARATION ::=
4617 -- SUBPROGRAM_DECLARATION
4618 -- | ENTRY_DECLARATION
4619 -- | REPRESENTATION_CLAUSE
4621 ----------------------------------------
4622 -- 9.4 Protected Element Declaration --
4623 ----------------------------------------
4625 -- PROTECTED_ELEMENT_DECLARATION ::=
4626 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
4628 -------------------------
4629 -- 9.4 Protected Body --
4630 -------------------------
4632 -- PROTECTED_BODY ::=
4633 -- protected body DEFINING_IDENTIFIER is
4634 -- {PROTECTED_OPERATION_ITEM}
4635 -- end [protected_IDENTIFIER];
4637 -- Note: protected bodies are not allowed in Ada 83 mode
4639 -- Gigi restriction: This node never appears
4641 -- N_Protected_Body
4642 -- Sloc points to PROTECTED
4643 -- Defining_Identifier (Node1)
4644 -- Declarations (List2) protected operation items (and pragmas)
4645 -- End_Label (Node4)
4646 -- Corresponding_Spec (Node5-Sem)
4647 -- Was_Originally_Stub (Flag13-Sem)
4649 -----------------------------------
4650 -- 9.4 Protected Operation Item --
4651 -----------------------------------
4653 -- PROTECTED_OPERATION_ITEM ::=
4654 -- SUBPROGRAM_DECLARATION
4655 -- | SUBPROGRAM_BODY
4656 -- | ENTRY_BODY
4657 -- | REPRESENTATION_CLAUSE
4659 ------------------------------
4660 -- 9.5.2 Entry Declaration --
4661 ------------------------------
4663 -- ENTRY_DECLARATION ::=
4664 -- [[not] overriding]
4665 -- entry DEFINING_IDENTIFIER
4666 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE;
4668 -- N_Entry_Declaration
4669 -- Sloc points to ENTRY
4670 -- Defining_Identifier (Node1)
4671 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
4672 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4673 -- Corresponding_Body (Node5-Sem)
4674 -- Must_Override (Flag14) set if overriding indicator present
4675 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4677 -- Note: overriding indicator is an Ada 2005 feature
4679 -----------------------------
4680 -- 9.5.2 Accept statement --
4681 -----------------------------
4683 -- ACCEPT_STATEMENT ::=
4684 -- accept entry_DIRECT_NAME
4685 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
4686 -- HANDLED_SEQUENCE_OF_STATEMENTS
4687 -- end [entry_IDENTIFIER]];
4689 -- Gigi restriction: This node never appears
4691 -- Note: there are no explicit declarations allowed in an accept
4692 -- statement. However, the implicit declarations for any statement
4693 -- identifiers (labels and block/loop identifiers) are declarations
4694 -- that belong logically to the accept statement, and that is why
4695 -- there is a Declarations field in this node.
4697 -- N_Accept_Statement
4698 -- Sloc points to ACCEPT
4699 -- Entry_Direct_Name (Node1)
4700 -- Entry_Index (Node5) (set to Empty if not present)
4701 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4702 -- Handled_Statement_Sequence (Node4)
4703 -- Declarations (List2) (set to No_List if no declarations)
4705 ------------------------
4706 -- 9.5.2 Entry Index --
4707 ------------------------
4709 -- ENTRY_INDEX ::= EXPRESSION
4711 -----------------------
4712 -- 9.5.2 Entry Body --
4713 -----------------------
4715 -- ENTRY_BODY ::=
4716 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
4717 -- DECLARATIVE_PART
4718 -- begin
4719 -- HANDLED_SEQUENCE_OF_STATEMENTS
4720 -- end [entry_IDENTIFIER];
4722 -- ENTRY_BARRIER ::= when CONDITION
4724 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
4725 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
4726 -- too full (it would otherwise have too many fields)
4728 -- Gigi restriction: This node never appears
4730 -- N_Entry_Body
4731 -- Sloc points to ENTRY
4732 -- Defining_Identifier (Node1)
4733 -- Entry_Body_Formal_Part (Node5)
4734 -- Declarations (List2)
4735 -- Handled_Statement_Sequence (Node4)
4736 -- Activation_Chain_Entity (Node3-Sem)
4738 -----------------------------------
4739 -- 9.5.2 Entry Body Formal Part --
4740 -----------------------------------
4742 -- ENTRY_BODY_FORMAL_PART ::=
4743 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
4745 -- Note that an entry body formal part node is present even if it is
4746 -- empty. This reflects the grammar, in which it is the components of
4747 -- the entry body formal part that are optional, not the entry body
4748 -- formal part itself. Also this means that the barrier condition
4749 -- always has somewhere to be stored.
4751 -- Gigi restriction: This node never appears
4753 -- N_Entry_Body_Formal_Part
4754 -- Sloc points to first token
4755 -- Entry_Index_Specification (Node4) (set to Empty if not present)
4756 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4757 -- Condition (Node1) from entry barrier of entry body
4759 --------------------------
4760 -- 9.5.2 Entry Barrier --
4761 --------------------------
4763 -- ENTRY_BARRIER ::= when CONDITION
4765 --------------------------------------
4766 -- 9.5.2 Entry Index Specification --
4767 --------------------------------------
4769 -- ENTRY_INDEX_SPECIFICATION ::=
4770 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
4772 -- Gigi restriction: This node never appears
4774 -- N_Entry_Index_Specification
4775 -- Sloc points to FOR
4776 -- Defining_Identifier (Node1)
4777 -- Discrete_Subtype_Definition (Node4)
4779 ---------------------------------
4780 -- 9.5.3 Entry Call Statement --
4781 ---------------------------------
4783 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
4785 -- The parser may generate a procedure call for this construct. The
4786 -- semantic pass must correct this misidentification where needed.
4788 -- Gigi restriction: This node never appears
4790 -- N_Entry_Call_Statement
4791 -- Sloc points to first token of name
4792 -- Name (Node2)
4793 -- Parameter_Associations (List3) (set to No_List if no
4794 -- actual parameter part)
4795 -- First_Named_Actual (Node4-Sem)
4797 ------------------------------
4798 -- 9.5.4 Requeue Statement --
4799 ------------------------------
4801 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
4803 -- Note: requeue statements are not permitted in Ada 83 mode
4805 -- Gigi restriction: This node never appears
4807 -- N_Requeue_Statement
4808 -- Sloc points to REQUEUE
4809 -- Name (Node2)
4810 -- Abort_Present (Flag15)
4812 --------------------------
4813 -- 9.6 Delay Statement --
4814 --------------------------
4816 -- DELAY_STATEMENT ::=
4817 -- DELAY_UNTIL_STATEMENT
4818 -- | DELAY_RELATIVE_STATEMENT
4820 --------------------------------
4821 -- 9.6 Delay Until Statement --
4822 --------------------------------
4824 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
4826 -- Note: delay until statements are not permitted in Ada 83 mode
4828 -- Gigi restriction: This node never appears
4830 -- N_Delay_Until_Statement
4831 -- Sloc points to DELAY
4832 -- Expression (Node3)
4834 -----------------------------------
4835 -- 9.6 Delay Relative Statement --
4836 -----------------------------------
4838 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
4840 -- Gigi restriction: This node never appears
4842 -- N_Delay_Relative_Statement
4843 -- Sloc points to DELAY
4844 -- Expression (Node3)
4846 ---------------------------
4847 -- 9.7 Select Statement --
4848 ---------------------------
4850 -- SELECT_STATEMENT ::=
4851 -- SELECTIVE_ACCEPT
4852 -- | TIMED_ENTRY_CALL
4853 -- | CONDITIONAL_ENTRY_CALL
4854 -- | ASYNCHRONOUS_SELECT
4856 -----------------------------
4857 -- 9.7.1 Selective Accept --
4858 -----------------------------
4860 -- SELECTIVE_ACCEPT ::=
4861 -- select
4862 -- [GUARD]
4863 -- SELECT_ALTERNATIVE
4864 -- {or
4865 -- [GUARD]
4866 -- SELECT_ALTERNATIVE}
4867 -- [else
4868 -- SEQUENCE_OF_STATEMENTS]
4869 -- end select;
4871 -- Gigi restriction: This node never appears
4873 -- Note: the guard expression, if present, appears in the node for
4874 -- the select alternative.
4876 -- N_Selective_Accept
4877 -- Sloc points to SELECT
4878 -- Select_Alternatives (List1)
4879 -- Else_Statements (List4) (set to No_List if no else part)
4881 ------------------
4882 -- 9.7.1 Guard --
4883 ------------------
4885 -- GUARD ::= when CONDITION =>
4887 -- As noted above, the CONDITION that is part of a GUARD is included
4888 -- in the node for the select alernative for convenience.
4890 -------------------------------
4891 -- 9.7.1 Select Alternative --
4892 -------------------------------
4894 -- SELECT_ALTERNATIVE ::=
4895 -- ACCEPT_ALTERNATIVE
4896 -- | DELAY_ALTERNATIVE
4897 -- | TERMINATE_ALTERNATIVE
4899 -------------------------------
4900 -- 9.7.1 Accept Alternative --
4901 -------------------------------
4903 -- ACCEPT_ALTERNATIVE ::=
4904 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
4906 -- Gigi restriction: This node never appears
4908 -- N_Accept_Alternative
4909 -- Sloc points to ACCEPT
4910 -- Accept_Statement (Node2)
4911 -- Condition (Node1) from the guard (set to Empty if no guard present)
4912 -- Statements (List3) (set to Empty_List if no statements)
4913 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4914 -- Accept_Handler_Records (List5-Sem)
4916 ------------------------------
4917 -- 9.7.1 Delay Alternative --
4918 ------------------------------
4920 -- DELAY_ALTERNATIVE ::=
4921 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
4923 -- Gigi restriction: This node never appears
4925 -- N_Delay_Alternative
4926 -- Sloc points to DELAY
4927 -- Delay_Statement (Node2)
4928 -- Condition (Node1) from the guard (set to Empty if no guard present)
4929 -- Statements (List3) (set to Empty_List if no statements)
4930 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4932 ----------------------------------
4933 -- 9.7.1 Terminate Alternative --
4934 ----------------------------------
4936 -- TERMINATE_ALTERNATIVE ::= terminate;
4938 -- Gigi restriction: This node never appears
4940 -- N_Terminate_Alternative
4941 -- Sloc points to TERMINATE
4942 -- Condition (Node1) from the guard (set to Empty if no guard present)
4943 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4944 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
4946 -----------------------------
4947 -- 9.7.2 Timed Entry Call --
4948 -----------------------------
4950 -- TIMED_ENTRY_CALL ::=
4951 -- select
4952 -- ENTRY_CALL_ALTERNATIVE
4953 -- or
4954 -- DELAY_ALTERNATIVE
4955 -- end select;
4957 -- Gigi restriction: This node never appears
4959 -- N_Timed_Entry_Call
4960 -- Sloc points to SELECT
4961 -- Entry_Call_Alternative (Node1)
4962 -- Delay_Alternative (Node4)
4964 -----------------------------------
4965 -- 9.7.2 Entry Call Alternative --
4966 -----------------------------------
4968 -- ENTRY_CALL_ALTERNATIVE ::=
4969 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
4971 -- PROCEDURE_OR_ENTRY_CALL ::=
4972 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
4974 -- Gigi restriction: This node never appears
4976 -- N_Entry_Call_Alternative
4977 -- Sloc points to first token of entry call statement
4978 -- Entry_Call_Statement (Node1)
4979 -- Statements (List3) (set to Empty_List if no statements)
4980 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4982 -----------------------------------
4983 -- 9.7.3 Conditional Entry Call --
4984 -----------------------------------
4986 -- CONDITIONAL_ENTRY_CALL ::=
4987 -- select
4988 -- ENTRY_CALL_ALTERNATIVE
4989 -- else
4990 -- SEQUENCE_OF_STATEMENTS
4991 -- end select;
4993 -- Gigi restriction: This node never appears
4995 -- N_Conditional_Entry_Call
4996 -- Sloc points to SELECT
4997 -- Entry_Call_Alternative (Node1)
4998 -- Else_Statements (List4)
5000 --------------------------------
5001 -- 9.7.4 Asynchronous Select --
5002 --------------------------------
5004 -- ASYNCHRONOUS_SELECT ::=
5005 -- select
5006 -- TRIGGERING_ALTERNATIVE
5007 -- then abort
5008 -- ABORTABLE_PART
5009 -- end select;
5011 -- Note: asynchronous select is not permitted in Ada 83 mode
5013 -- Gigi restriction: This node never appears
5015 -- N_Asynchronous_Select
5016 -- Sloc points to SELECT
5017 -- Triggering_Alternative (Node1)
5018 -- Abortable_Part (Node2)
5020 -----------------------------------
5021 -- 9.7.4 Triggering Alternative --
5022 -----------------------------------
5024 -- TRIGGERING_ALTERNATIVE ::=
5025 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
5027 -- Gigi restriction: This node never appears
5029 -- N_Triggering_Alternative
5030 -- Sloc points to first token of triggering statement
5031 -- Triggering_Statement (Node1)
5032 -- Statements (List3) (set to Empty_List if no statements)
5033 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5035 ---------------------------------
5036 -- 9.7.4 Triggering Statement --
5037 ---------------------------------
5039 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
5041 ---------------------------
5042 -- 9.7.4 Abortable Part --
5043 ---------------------------
5045 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
5047 -- Gigi restriction: This node never appears
5049 -- N_Abortable_Part
5050 -- Sloc points to ABORT
5051 -- Statements (List3)
5053 --------------------------
5054 -- 9.8 Abort Statement --
5055 --------------------------
5057 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
5059 -- Gigi restriction: This node never appears
5061 -- N_Abort_Statement
5062 -- Sloc points to ABORT
5063 -- Names (List2)
5065 -------------------------
5066 -- 10.1.1 Compilation --
5067 -------------------------
5069 -- COMPILATION ::= {COMPILATION_UNIT}
5071 -- There is no explicit node in the tree for a compilation, since in
5072 -- general the compiler is processing only a single compilation unit
5073 -- at a time. It is possible to parse multiple units in syntax check
5074 -- only mode, but they the trees are discarded in any case.
5076 ------------------------------
5077 -- 10.1.1 Compilation Unit --
5078 ------------------------------
5080 -- COMPILATION_UNIT ::=
5081 -- CONTEXT_CLAUSE LIBRARY_ITEM
5082 -- | CONTEXT_CLAUSE SUBUNIT
5084 -- The N_Compilation_Unit node itself respresents the above syntax.
5085 -- However, there are two additional items not reflected in the above
5086 -- syntax. First we have the global declarations that are added by the
5087 -- code generator. These are outer level declarations (so they cannot
5088 -- be represented as being inside the units). An example is the wrapper
5089 -- subprograms that are created to do ABE checking. As always a list of
5090 -- declarations can contain actions as well (i.e. statements), and such
5091 -- statements are executed as part of the elaboration of the unit. Note
5092 -- that all such declarations are elaborated before the library unit.
5094 -- Similarly, certain actions need to be elaborated at the completion
5095 -- of elaboration of the library unit (notably the statement that sets
5096 -- the Boolean flag indicating that elaboration is complete).
5098 -- The third item not reflected in the syntax is pragmas that appear
5099 -- after the compilation unit. As always pragmas are a problem since
5100 -- they are not part of the formal syntax, but can be stuck into the
5101 -- source following a set of ad hoc rules, and we have to find an ad
5102 -- hoc way of sticking them into the tree. For pragmas that appear
5103 -- before the library unit, we just consider them to be part of the
5104 -- context clause, and pragmas can appear in the Context_Items list
5105 -- of the compilation unit. However, pragmas can also appear after
5106 -- the library item.
5108 -- To deal with all these problems, we create an auxiliary node for
5109 -- a compilation unit, referenced from the N_Compilation_Unit node
5110 -- that contains these three items.
5112 -- N_Compilation_Unit
5113 -- Sloc points to first token of defining unit name
5114 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
5115 -- Context_Items (List1) context items and pragmas preceding unit
5116 -- Private_Present (Flag15) set if library unit has private keyword
5117 -- Unit (Node2) library item or subunit
5118 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
5119 -- Has_No_Elaboration_Code (Flag17-Sem)
5120 -- Body_Required (Flag13-Sem) set for spec if body is required
5121 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
5122 -- First_Inlined_Subprogram (Node3-Sem)
5124 -- N_Compilation_Unit_Aux
5125 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
5126 -- Declarations (List2) (set to No_List if no global declarations)
5127 -- Actions (List1) (set to No_List if no actions)
5128 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
5129 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
5131 --------------------------
5132 -- 10.1.1 Library Item --
5133 --------------------------
5135 -- LIBRARY_ITEM ::=
5136 -- [private] LIBRARY_UNIT_DECLARATION
5137 -- | LIBRARY_UNIT_BODY
5138 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
5140 -- Note: PRIVATE is not allowed in Ada 83 mode
5142 -- There is no explicit node in the tree for library item, instead
5143 -- the declaration or body, and the flag for private if present,
5144 -- appear in the N_Compilation_Unit clause.
5146 ----------------------------------------
5147 -- 10.1.1 Library Unit Declararation --
5148 ----------------------------------------
5150 -- LIBRARY_UNIT_DECLARATION ::=
5151 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
5152 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
5154 -------------------------------------------------
5155 -- 10.1.1 Library Unit Renaming Declararation --
5156 -------------------------------------------------
5158 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
5159 -- PACKAGE_RENAMING_DECLARATION
5160 -- | GENERIC_RENAMING_DECLARATION
5161 -- | SUBPROGRAM_RENAMING_DECLARATION
5163 -------------------------------
5164 -- 10.1.1 Library unit body --
5165 -------------------------------
5167 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
5169 ------------------------------
5170 -- 10.1.1 Parent Unit Name --
5171 ------------------------------
5173 -- PARENT_UNIT_NAME ::= NAME
5175 ----------------------------
5176 -- 10.1.2 Context clause --
5177 ----------------------------
5179 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
5181 -- The context clause can include pragmas, and any pragmas that appear
5182 -- before the context clause proper (i.e. all configuration pragmas,
5183 -- also appear at the front of this list).
5185 --------------------------
5186 -- 10.1.2 Context_Item --
5187 --------------------------
5189 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
5191 -------------------------
5192 -- 10.1.2 With clause --
5193 -------------------------
5195 -- WITH_CLAUSE ::=
5196 -- with library_unit_NAME {,library_unit_NAME};
5198 -- A separate With clause is built for each name, so that we have
5199 -- a Corresponding_Spec field for each with'ed spec. The flags
5200 -- First_Name and Last_Name are used to reconstruct the exact
5201 -- source form. When a list of names appears in one with clause,
5202 -- the first name in the list has First_Name set, and the last
5203 -- has Last_Name set. If the with clause has only one name, then
5204 -- both of the flags First_Name and Last_Name are set in this name.
5206 -- Note: in the case of implicit with's that are installed by the
5207 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
5208 -- set to Standard_Location, but it is incorrect to test the Sloc
5209 -- to find out if a with clause is implicit, test the flag instead.
5211 -- N_With_Clause
5212 -- Sloc points to first token of library unit name
5213 -- Name (Node2)
5214 -- Library_Unit (Node4-Sem)
5215 -- Corresponding_Spec (Node5-Sem)
5216 -- First_Name (Flag5) (set to True if first name or only one name)
5217 -- Last_Name (Flag6) (set to True if last name or only one name)
5218 -- Context_Installed (Flag13-Sem)
5219 -- Elaborate_Present (Flag4-Sem)
5220 -- Elaborate_All_Present (Flag14-Sem)
5221 -- Elaborate_All_Desirable (Flag9-Sem)
5222 -- Elaborate_Desirable (Flag11-Sem)
5223 -- Private_Present (Flag15) set if with_clause has private keyword
5224 -- Implicit_With (Flag16-Sem)
5225 -- Limited_Present (Flag17) set if LIMITED is present
5226 -- Limited_View_Installed (Flag18-Sem)
5227 -- Unreferenced_In_Spec (Flag7-Sem)
5228 -- No_Entities_Ref_In_Spec (Flag8-Sem)
5230 -- Note: Limited_Present and Limited_View_Installed give support to
5231 -- Ada 2005 (AI-50217).
5232 -- Similarly, Private_Present gives support to AI-50262.
5234 ----------------------
5235 -- With_Type clause --
5236 ----------------------
5238 -- This is a GNAT extension, used to implement mutually recursive
5239 -- types declared in different packages.
5241 -- WITH_TYPE_CLAUSE ::=
5242 -- with type type_NAME is access | with type type_NAME is tagged
5244 -- N_With_Type_Clause
5245 -- Sloc points to first token of type name
5246 -- Name (Node2)
5247 -- Tagged_Present (Flag15)
5249 ---------------------
5250 -- 10.2 Body stub --
5251 ---------------------
5253 -- BODY_STUB ::=
5254 -- SUBPROGRAM_BODY_STUB
5255 -- | PACKAGE_BODY_STUB
5256 -- | TASK_BODY_STUB
5257 -- | PROTECTED_BODY_STUB
5259 ----------------------------------
5260 -- 10.1.3 Subprogram Body Stub --
5261 ----------------------------------
5263 -- SUBPROGRAM_BODY_STUB ::=
5264 -- SUBPROGRAM_SPECIFICATION is separate;
5266 -- N_Subprogram_Body_Stub
5267 -- Sloc points to FUNCTION or PROCEDURE
5268 -- Specification (Node1)
5269 -- Library_Unit (Node4-Sem) points to the subunit
5270 -- Corresponding_Body (Node5-Sem)
5272 -------------------------------
5273 -- 10.1.3 Package Body Stub --
5274 -------------------------------
5276 -- PACKAGE_BODY_STUB ::=
5277 -- package body DEFINING_IDENTIFIER is separate;
5279 -- N_Package_Body_Stub
5280 -- Sloc points to PACKAGE
5281 -- Defining_Identifier (Node1)
5282 -- Library_Unit (Node4-Sem) points to the subunit
5283 -- Corresponding_Body (Node5-Sem)
5285 ----------------------------
5286 -- 10.1.3 Task Body Stub --
5287 ----------------------------
5289 -- TASK_BODY_STUB ::=
5290 -- task body DEFINING_IDENTIFIER is separate;
5292 -- N_Task_Body_Stub
5293 -- Sloc points to TASK
5294 -- Defining_Identifier (Node1)
5295 -- Library_Unit (Node4-Sem) points to the subunit
5296 -- Corresponding_Body (Node5-Sem)
5298 ---------------------------------
5299 -- 10.1.3 Protected Body Stub --
5300 ---------------------------------
5302 -- PROTECTED_BODY_STUB ::=
5303 -- protected body DEFINING_IDENTIFIER is separate;
5305 -- Note: protected body stubs are not allowed in Ada 83 mode
5307 -- N_Protected_Body_Stub
5308 -- Sloc points to PROTECTED
5309 -- Defining_Identifier (Node1)
5310 -- Library_Unit (Node4-Sem) points to the subunit
5311 -- Corresponding_Body (Node5-Sem)
5313 ---------------------
5314 -- 10.1.3 Subunit --
5315 ---------------------
5317 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
5319 -- N_Subunit
5320 -- Sloc points to SEPARATE
5321 -- Name (Node2) is the name of the parent unit
5322 -- Proper_Body (Node1) is the subunit body
5323 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
5325 ---------------------------------
5326 -- 11.1 Exception Declaration --
5327 ---------------------------------
5329 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception;
5331 -- For consistency with object declarations etc, the parser converts
5332 -- the case of multiple identifiers being declared to a series of
5333 -- declarations in which the expression is copied, using the More_Ids
5334 -- and Prev_Ids flags to remember the souce form as described in the
5335 -- section on "Handling of Defining Identifier Lists".
5337 -- N_Exception_Declaration
5338 -- Sloc points to EXCEPTION
5339 -- Defining_Identifier (Node1)
5340 -- Expression (Node3-Sem)
5341 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5342 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5344 ------------------------------------------
5345 -- 11.2 Handled Sequence Of Statements --
5346 ------------------------------------------
5348 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
5349 -- SEQUENCE_OF_STATEMENTS
5350 -- [exception
5351 -- EXCEPTION_HANDLER
5352 -- {EXCEPTION_HANDLER}]
5353 -- [at end
5354 -- cleanup_procedure_call (param, param, param, ...);]
5356 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
5357 -- used only internally currently, but is considered to be syntactic.
5358 -- At the moment, the only cleanup action allowed is a single call to
5359 -- a parameterless procedure, and the Identifier field of the node is
5360 -- the procedure to be called. Also there is a current restriction
5361 -- that exception handles and a cleanup cannot be present in the same
5362 -- frame, so at least one of Exception_Handlers or the Identifier must
5363 -- be missing.
5365 -- Actually, more accurately, this restriction applies to the original
5366 -- source program. In the expanded tree, if the At_End_Proc field is
5367 -- present, then there will also be an exception handler of the form:
5369 -- when all others =>
5370 -- cleanup;
5371 -- raise;
5373 -- where cleanup is the procedure to be generated. The reason we do
5374 -- this is so that the front end can handle the necessary entries in
5375 -- the exception tables, and other exception handler actions required
5376 -- as part of the normal handling for exception handlers.
5378 -- The AT END cleanup handler protects only the sequence of statements
5379 -- (not the associated declarations of the parent), just like exception
5380 -- handlers. The big difference is that the cleanup procedure is called
5381 -- on either a normal or an abnormal exit from the statement sequence.
5383 -- Note: the list of Exception_Handlers can contain pragmas as well
5384 -- as actual handlers. In practice these pragmas can only occur at
5385 -- the start of the list, since any pragmas occurring later on will
5386 -- be included in the statement list of the corresponding handler.
5388 -- Note: although in the Ada syntax, the sequence of statements in
5389 -- a handled sequence of statements can only contain statements, we
5390 -- allow free mixing of declarations and statements in the resulting
5391 -- expanded tree. This is for example used to deal with the case of
5392 -- a cleanup procedure that must handle declarations as well as the
5393 -- statements of a block.
5395 -- N_Handled_Sequence_Of_Statements
5396 -- Sloc points to first token of first statement
5397 -- Statements (List3)
5398 -- End_Label (Node4) (set to Empty if expander generated)
5399 -- Exception_Handlers (List5) (set to No_List if none present)
5400 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
5401 -- First_Real_Statement (Node2-Sem)
5402 -- Zero_Cost_Handling (Flag5-Sem)
5404 -- Note: the parent always contains a Declarations field which contains
5405 -- declarations associated with the handled sequence of statements. This
5406 -- is true even in the case of an accept statement (see description of
5407 -- the N_Accept_Statement node).
5409 -- End_Label refers to the containing construct
5411 -----------------------------
5412 -- 11.2 Exception Handler --
5413 -----------------------------
5415 -- EXCEPTION_HANDLER ::=
5416 -- when [CHOICE_PARAMETER_SPECIFICATION :]
5417 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
5418 -- SEQUENCE_OF_STATEMENTS
5420 -- Note: choice parameter specification is not allowed in Ada 83 mode
5422 -- N_Exception_Handler
5423 -- Sloc points to WHEN
5424 -- Choice_Parameter (Node2) (set to Empty if not present)
5425 -- Exception_Choices (List4)
5426 -- Statements (List3)
5427 -- Zero_Cost_Handling (Flag5-Sem)
5429 ------------------------------------------
5430 -- 11.2 Choice parameter specification --
5431 ------------------------------------------
5433 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
5435 ----------------------------
5436 -- 11.2 Exception Choice --
5437 ----------------------------
5439 -- EXCEPTION_CHOICE ::= exception_NAME | others
5441 -- Except in the case of OTHERS, no explicit node appears in the tree
5442 -- for exception choice. Instead the exception name appears directly.
5443 -- An OTHERS choice is represented by a N_Others_Choice node (see
5444 -- section 3.8.1.
5446 -- Note: for the exception choice created for an at end handler, the
5447 -- exception choice is an N_Others_Choice node with All_Others set.
5449 ---------------------------
5450 -- 11.3 Raise Statement --
5451 ---------------------------
5453 -- RAISE_STATEMENT ::= raise [exception_NAME];
5455 -- In Ada 2005, we have
5457 -- RAISE_STATEMENT ::= raise; | raise exception_NAME [with EXPRESSION];
5459 -- N_Raise_Statement
5460 -- Sloc points to RAISE
5461 -- Name (Node2) (set to Empty if no exception name present)
5462 -- Expression (Node3) (set to Empty if no expression present)
5464 -------------------------------
5465 -- 12.1 Generic Declaration --
5466 -------------------------------
5468 -- GENERIC_DECLARATION ::=
5469 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
5471 ------------------------------------------
5472 -- 12.1 Generic Subprogram Declaration --
5473 ------------------------------------------
5475 -- GENERIC_SUBPROGRAM_DECLARATION ::=
5476 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION;
5478 -- Note: Generic_Formal_Declarations can include pragmas
5480 -- N_Generic_Subprogram_Declaration
5481 -- Sloc points to GENERIC
5482 -- Specification (Node1) subprogram specification
5483 -- Corresponding_Body (Node5-Sem)
5484 -- Generic_Formal_Declarations (List2) from generic formal part
5485 -- Parent_Spec (Node4-Sem)
5487 ---------------------------------------
5488 -- 12.1 Generic Package Declaration --
5489 ---------------------------------------
5491 -- GENERIC_PACKAGE_DECLARATION ::=
5492 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION;
5494 -- Note: when we do generics right, the Activation_Chain_Entity entry
5495 -- for this node can be removed (since the expander won't see generic
5496 -- units any more)???.
5498 -- Note: Generic_Formal_Declarations can include pragmas
5500 -- N_Generic_Package_Declaration
5501 -- Sloc points to GENERIC
5502 -- Specification (Node1) package specification
5503 -- Corresponding_Body (Node5-Sem)
5504 -- Generic_Formal_Declarations (List2) from generic formal part
5505 -- Parent_Spec (Node4-Sem)
5506 -- Activation_Chain_Entity (Node3-Sem)
5508 -------------------------------
5509 -- 12.1 Generic Formal Part --
5510 -------------------------------
5512 -- GENERIC_FORMAL_PART ::=
5513 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
5515 ------------------------------------------------
5516 -- 12.1 Generic Formal Parameter Declaration --
5517 ------------------------------------------------
5519 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
5520 -- FORMAL_OBJECT_DECLARATION
5521 -- | FORMAL_TYPE_DECLARATION
5522 -- | FORMAL_SUBPROGRAM_DECLARATION
5523 -- | FORMAL_PACKAGE_DECLARATION
5525 ---------------------------------
5526 -- 12.3 Generic Instantiation --
5527 ---------------------------------
5529 -- GENERIC_INSTANTIATION ::=
5530 -- package DEFINING_PROGRAM_UNIT_NAME is
5531 -- new generic_package_NAME [GENERIC_ACTUAL_PART];
5532 -- | [[not] overriding]
5533 -- procedure DEFINING_PROGRAM_UNIT_NAME is
5534 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART];
5535 -- | [[not] overriding]
5536 -- function DEFINING_DESIGNATOR is
5537 -- new generic_function_NAME [GENERIC_ACTUAL_PART];
5539 -- N_Package_Instantiation
5540 -- Sloc points to PACKAGE
5541 -- Defining_Unit_Name (Node1)
5542 -- Name (Node2)
5543 -- Generic_Associations (List3) (set to No_List if no
5544 -- generic actual part)
5545 -- Parent_Spec (Node4-Sem)
5546 -- Instance_Spec (Node5-Sem)
5547 -- ABE_Is_Certain (Flag18-Sem)
5549 -- N_Procedure_Instantiation
5550 -- Sloc points to PROCEDURE
5551 -- Defining_Unit_Name (Node1)
5552 -- Name (Node2)
5553 -- Parent_Spec (Node4-Sem)
5554 -- Generic_Associations (List3) (set to No_List if no
5555 -- generic actual part)
5556 -- Instance_Spec (Node5-Sem)
5557 -- Must_Override (Flag14) set if overriding indicator present
5558 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5559 -- ABE_Is_Certain (Flag18-Sem)
5561 -- N_Function_Instantiation
5562 -- Sloc points to FUNCTION
5563 -- Defining_Unit_Name (Node1)
5564 -- Name (Node2)
5565 -- Generic_Associations (List3) (set to No_List if no
5566 -- generic actual part)
5567 -- Parent_Spec (Node4-Sem)
5568 -- Instance_Spec (Node5-Sem)
5569 -- Must_Override (Flag14) set if overriding indicator present
5570 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5571 -- ABE_Is_Certain (Flag18-Sem)
5573 -- Note: overriding indicator is an Ada 2005 feature
5575 ------------------------------
5576 -- 12.3 Generic Actual Part --
5577 ------------------------------
5579 -- GENERIC_ACTUAL_PART ::=
5580 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
5582 -------------------------------
5583 -- 12.3 Generic Association --
5584 -------------------------------
5586 -- GENERIC_ASSOCIATION ::=
5587 -- [generic_formal_parameter_SELECTOR_NAME =>]
5588 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER
5590 -- Note: unlike the procedure call case, a generic association node
5591 -- is generated for every association, even if no formal is present.
5592 -- In this case the parser will leave the Selector_Name field set
5593 -- to Empty, to be filled in later by the semantic pass.
5595 -- N_Generic_Association
5596 -- Sloc points to first token of generic association
5597 -- Selector_Name (Node2) (set to Empty if no formal
5598 -- parameter selector name)
5599 -- Explicit_Generic_Actual_Parameter (Node1)
5601 ---------------------------------------------
5602 -- 12.3 Explicit Generic Actual Parameter --
5603 ---------------------------------------------
5605 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
5606 -- EXPRESSION | variable_NAME | subprogram_NAME
5607 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
5609 -------------------------------------
5610 -- 12.4 Formal Object Declaration --
5611 -------------------------------------
5613 -- FORMAL_OBJECT_DECLARATION ::=
5614 -- DEFINING_IDENTIFIER_LIST :
5615 -- MODE SUBTYPE_MARK [:= DEFAULT_EXPRESSION];
5617 -- Although the syntax allows multiple identifiers in the list, the
5618 -- semantics is as though successive declarations were given with
5619 -- identical type definition and expression components. To simplify
5620 -- semantic processing, the parser represents a multiple declaration
5621 -- case as a sequence of single declarations, using the More_Ids and
5622 -- Prev_Ids flags to preserve the original source form as described
5623 -- in the section on "Handling of Defining Identifier Lists".
5625 -- N_Formal_Object_Declaration
5626 -- Sloc points to first identifier
5627 -- Defining_Identifier (Node1)
5628 -- In_Present (Flag15)
5629 -- Out_Present (Flag17)
5630 -- Subtype_Mark (Node4)
5631 -- Expression (Node3) (set to Empty if no default expression)
5632 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5633 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5635 -----------------------------------
5636 -- 12.5 Formal Type Declaration --
5637 -----------------------------------
5639 -- FORMAL_TYPE_DECLARATION ::=
5640 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5641 -- is FORMAL_TYPE_DEFINITION;
5643 -- N_Formal_Type_Declaration
5644 -- Sloc points to TYPE
5645 -- Defining_Identifier (Node1)
5646 -- Formal_Type_Definition (Node3)
5647 -- Discriminant_Specifications (List4) (set to No_List if no
5648 -- discriminant part)
5649 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5651 ----------------------------------
5652 -- 12.5 Formal type definition --
5653 ----------------------------------
5655 -- FORMAL_TYPE_DEFINITION ::=
5656 -- FORMAL_PRIVATE_TYPE_DEFINITION
5657 -- | FORMAL_DERIVED_TYPE_DEFINITION
5658 -- | FORMAL_DISCRETE_TYPE_DEFINITION
5659 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
5660 -- | FORMAL_MODULAR_TYPE_DEFINITION
5661 -- | FORMAL_FLOATING_POINT_DEFINITION
5662 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
5663 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
5664 -- | FORMAL_ARRAY_TYPE_DEFINITION
5665 -- | FORMAL_ACCESS_TYPE_DEFINITION
5666 -- | FORMAL_INTERFACE_TYPE_DEFINITION
5668 ---------------------------------------------
5669 -- 12.5.1 Formal Private Type Definition --
5670 ---------------------------------------------
5672 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
5673 -- [[abstract] tagged] [limited] private
5675 -- Note: TAGGED is not allowed in Ada 83 mode
5677 -- N_Formal_Private_Type_Definition
5678 -- Sloc points to PRIVATE
5679 -- Abstract_Present (Flag4)
5680 -- Tagged_Present (Flag15)
5681 -- Limited_Present (Flag17)
5683 --------------------------------------------
5684 -- 12.5.1 Formal Derived Type Definition --
5685 --------------------------------------------
5687 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
5688 -- [abstract] [limited]
5689 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
5690 -- Note: this construct is not allowed in Ada 83 mode
5692 -- N_Formal_Derived_Type_Definition
5693 -- Sloc points to NEW
5694 -- Subtype_Mark (Node4)
5695 -- Private_Present (Flag15)
5696 -- Abstract_Present (Flag4)
5697 -- Limited_Present (Flag17)
5698 -- Interface_List (List2) (set to No_List if none)
5700 ---------------------------------------------
5701 -- 12.5.2 Formal Discrete Type Definition --
5702 ---------------------------------------------
5704 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
5706 -- N_Formal_Discrete_Type_Definition
5707 -- Sloc points to (
5709 ---------------------------------------------------
5710 -- 12.5.2 Formal Signed Integer Type Definition --
5711 ---------------------------------------------------
5713 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
5715 -- N_Formal_Signed_Integer_Type_Definition
5716 -- Sloc points to RANGE
5718 --------------------------------------------
5719 -- 12.5.2 Formal Modular Type Definition --
5720 --------------------------------------------
5722 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
5724 -- N_Formal_Modular_Type_Definition
5725 -- Sloc points to MOD
5727 ----------------------------------------------
5728 -- 12.5.2 Formal Floating Point Definition --
5729 ----------------------------------------------
5731 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
5733 -- N_Formal_Floating_Point_Definition
5734 -- Sloc points to DIGITS
5736 ----------------------------------------------------
5737 -- 12.5.2 Formal Ordinary Fixed Point Definition --
5738 ----------------------------------------------------
5740 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
5742 -- N_Formal_Ordinary_Fixed_Point_Definition
5743 -- Sloc points to DELTA
5745 ---------------------------------------------------
5746 -- 12.5.2 Formal Decimal Fixed Point Definition --
5747 ---------------------------------------------------
5749 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
5751 -- Note: formal decimal fixed point definition not allowed in Ada 83
5753 -- N_Formal_Decimal_Fixed_Point_Definition
5754 -- Sloc points to DELTA
5756 ------------------------------------------
5757 -- 12.5.3 Formal Array Type Definition --
5758 ------------------------------------------
5760 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
5762 -------------------------------------------
5763 -- 12.5.4 Formal Access Type Definition --
5764 -------------------------------------------
5766 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
5768 ----------------------------------------------
5769 -- 12.5.5 Formal Interface Type Definition --
5770 ----------------------------------------------
5772 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
5774 -----------------------------------------
5775 -- 12.6 Formal Subprogram Declaration --
5776 -----------------------------------------
5778 -- FORMAL_SUBPROGRAM_DECLARATION ::=
5779 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
5780 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
5782 --------------------------------------------------
5783 -- 12.6 Formal Concrete Subprogram Declaration --
5784 --------------------------------------------------
5786 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
5787 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT];
5789 -- N_Formal_Concrete_Subprogram_Declaration
5790 -- Sloc points to WITH
5791 -- Specification (Node1)
5792 -- Default_Name (Node2) (set to Empty if no subprogram default)
5793 -- Box_Present (Flag15)
5795 -- Note: if no subprogram default is present, then Name is set
5796 -- to Empty, and Box_Present is False.
5798 --------------------------------------------------
5799 -- 12.6 Formal Abstract Subprogram Declaration --
5800 --------------------------------------------------
5802 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
5803 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT];
5805 -- N_Formal_Abstract_Subprogram_Declaration
5806 -- Sloc points to WITH
5807 -- Specification (Node1)
5808 -- Default_Name (Node2) (set to Empty if no subprogram default)
5809 -- Box_Present (Flag15)
5811 -- Note: if no subprogram default is present, then Name is set
5812 -- to Empty, and Box_Present is False.
5814 ------------------------------
5815 -- 12.6 Subprogram Default --
5816 ------------------------------
5818 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
5820 -- There is no separate node in the tree for a subprogram default.
5821 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
5822 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
5823 -- default name or box indication, as needed.
5825 ------------------------
5826 -- 12.6 Default Name --
5827 ------------------------
5829 -- DEFAULT_NAME ::= NAME
5831 --------------------------------------
5832 -- 12.7 Formal Package Declaration --
5833 --------------------------------------
5835 -- FORMAL_PACKAGE_DECLARATION ::=
5836 -- with package DEFINING_IDENTIFIER
5837 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART;
5839 -- Note: formal package declarations not allowed in Ada 83 mode
5841 -- N_Formal_Package_Declaration
5842 -- Sloc points to WITH
5843 -- Defining_Identifier (Node1)
5844 -- Name (Node2)
5845 -- Generic_Associations (List3) (set to No_List if (<>) case or
5846 -- empty generic actual part)
5847 -- Box_Present (Flag15)
5848 -- Instance_Spec (Node5-Sem)
5849 -- ABE_Is_Certain (Flag18-Sem)
5851 --------------------------------------
5852 -- 12.7 Formal Package Actual Part --
5853 --------------------------------------
5855 -- FORMAL_PACKAGE_ACTUAL_PART ::=
5856 -- (<>) | [GENERIC_ACTUAL_PART]
5858 -- There is no explicit node in the tree for a formal package
5859 -- actual part. Instead the information appears in the parent node
5860 -- (i.e. the formal package declaration node itself).
5862 ---------------------------------
5863 -- 13.1 Representation clause --
5864 ---------------------------------
5866 -- REPRESENTATION_CLAUSE ::=
5867 -- ATTRIBUTE_DEFINITION_CLAUSE
5868 -- | ENUMERATION_REPRESENTATION_CLAUSE
5869 -- | RECORD_REPRESENTATION_CLAUSE
5870 -- | AT_CLAUSE
5872 ----------------------
5873 -- 13.1 Local Name --
5874 ----------------------
5876 -- LOCAL_NAME :=
5877 -- DIRECT_NAME
5878 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
5879 -- | library_unit_NAME
5881 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
5882 -- as an attribute reference, which has essentially the same form.
5884 ---------------------------------------
5885 -- 13.3 Attribute definition clause --
5886 ---------------------------------------
5888 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
5889 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
5890 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
5892 -- In Ada 83, the expression must be a simple expression and the
5893 -- local name must be a direct name.
5895 -- Note: the only attribute definition clause that is processed by
5896 -- gigi is an address clause. For all other cases, the information
5897 -- is extracted by the front end and either results in setting entity
5898 -- information, e.g. Esize for the Size clause, or in appropriate
5899 -- expansion actions (e.g. in the case of Storage_Size).
5901 -- For an address clause, Gigi constructs the appropriate addressing
5902 -- code. It also ensures that no aliasing optimizations are made
5903 -- for the object for which the address clause appears.
5905 -- Note: for an address clause used to achieve an overlay:
5907 -- A : Integer;
5908 -- B : Integer;
5909 -- for B'Address use A'Address;
5911 -- the above rule means that Gigi will ensure that no optimizations
5912 -- will be made for B that would violate the implementation advice
5913 -- of RM 13.3(19). However, this advice applies only to B and not
5914 -- to A, which seems unfortunate. The GNAT front end will mark the
5915 -- object A as volatile to also prevent unwanted optimization
5916 -- assumptions based on no aliasing being made for B.
5918 -- N_Attribute_Definition_Clause
5919 -- Sloc points to FOR
5920 -- Name (Node2) the local name
5921 -- Chars (Name1) the identifier name from the attribute designator
5922 -- Expression (Node3) the expression or name
5923 -- Next_Rep_Item (Node4-Sem)
5924 -- From_At_Mod (Flag4-Sem)
5925 -- Check_Address_Alignment (Flag11-Sem)
5927 ---------------------------------------------
5928 -- 13.4 Enumeration representation clause --
5929 ---------------------------------------------
5931 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
5932 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
5934 -- In Ada 83, the name must be a direct name
5936 -- N_Enumeration_Representation_Clause
5937 -- Sloc points to FOR
5938 -- Identifier (Node1) direct name
5939 -- Array_Aggregate (Node3)
5940 -- Next_Rep_Item (Node4-Sem)
5942 ---------------------------------
5943 -- 13.4 Enumeration aggregate --
5944 ---------------------------------
5946 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
5948 ------------------------------------------
5949 -- 13.5.1 Record representation clause --
5950 ------------------------------------------
5952 -- RECORD_REPRESENTATION_CLAUSE ::=
5953 -- for first_subtype_LOCAL_NAME use
5954 -- record [MOD_CLAUSE]
5955 -- {COMPONENT_CLAUSE}
5956 -- end record;
5958 -- Gigi restriction: Mod_Clause is always Empty (if present it is
5959 -- replaced by a corresponding Alignment attribute definition clause).
5961 -- Note: Component_Clauses can include pragmas
5963 -- N_Record_Representation_Clause
5964 -- Sloc points to FOR
5965 -- Identifier (Node1) direct name
5966 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
5967 -- Component_Clauses (List3)
5968 -- Next_Rep_Item (Node4-Sem)
5970 ------------------------------
5971 -- 13.5.1 Component clause --
5972 ------------------------------
5974 -- COMPONENT_CLAUSE ::=
5975 -- component_LOCAL_NAME at POSITION
5976 -- range FIRST_BIT .. LAST_BIT;
5978 -- N_Component_Clause
5979 -- Sloc points to AT
5980 -- Component_Name (Node1) points to Name or Attribute_Reference
5981 -- Position (Node2)
5982 -- First_Bit (Node3)
5983 -- Last_Bit (Node4)
5985 ----------------------
5986 -- 13.5.1 Position --
5987 ----------------------
5989 -- POSITION ::= static_EXPRESSION
5991 -----------------------
5992 -- 13.5.1 First_Bit --
5993 -----------------------
5995 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
5997 ----------------------
5998 -- 13.5.1 Last_Bit --
5999 ----------------------
6001 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
6003 --------------------------
6004 -- 13.8 Code statement --
6005 --------------------------
6007 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
6009 -- Note: in GNAT, the qualified expression has the form
6011 -- Asm_Insn'(Asm (...));
6013 -- or
6015 -- Asm_Insn'(Asm_Volatile (...))
6017 -- See package System.Machine_Code in file s-maccod.ads for details
6018 -- on the allowed parameters to Asm[_Volatile]. There are two ways
6019 -- this node can arise, as a code statement, in which case the
6020 -- expression is the qualified expression, or as a result of the
6021 -- expansion of an intrinsic call to the Asm or Asm_Input procedure.
6023 -- N_Code_Statement
6024 -- Sloc points to first token of the expression
6025 -- Expression (Node3)
6027 -- Note: package Exp_Code contains an abstract functional interface
6028 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
6030 ------------------------
6031 -- 13.12 Restriction --
6032 ------------------------
6034 -- RESTRICTION ::=
6035 -- restriction_IDENTIFIER
6036 -- | restriction_parameter_IDENTIFIER => EXPRESSION
6038 -- There is no explicit node for restrictions. Instead the restriction
6039 -- appears in normal pragma syntax as a pragma argument association,
6040 -- which has the same syntactic form.
6042 --------------------------
6043 -- B.2 Shift Operators --
6044 --------------------------
6046 -- Calls to the intrinsic shift functions are converted to one of
6047 -- the following shift nodes, which have the form of normal binary
6048 -- operator names. Note that for a given shift operation, one node
6049 -- covers all possible types, as for normal operators.
6051 -- Note: it is perfectly permissible for the expander to generate
6052 -- shift operation nodes directly, in which case they will be analyzed
6053 -- and parsed in the usual manner.
6055 -- Sprint syntax: shift-function-name!(expr, count)
6057 -- Note: the Left_Opnd field holds the first argument (the value to
6058 -- be shifted). The Right_Opnd field holds the second argument (the
6059 -- shift count). The Chars field is the name of the intrinsic function.
6061 -- N_Op_Rotate_Left
6062 -- Sloc points to the function name
6063 -- plus fields for binary operator
6064 -- plus fields for expression
6065 -- Shift_Count_OK (Flag4-Sem)
6067 -- N_Op_Rotate_Right
6068 -- Sloc points to the function name
6069 -- plus fields for binary operator
6070 -- plus fields for expression
6071 -- Shift_Count_OK (Flag4-Sem)
6073 -- N_Op_Shift_Left
6074 -- Sloc points to the function name
6075 -- plus fields for binary operator
6076 -- plus fields for expression
6077 -- Shift_Count_OK (Flag4-Sem)
6079 -- N_Op_Shift_Right_Arithmetic
6080 -- Sloc points to the function name
6081 -- plus fields for binary operator
6082 -- plus fields for expression
6083 -- Shift_Count_OK (Flag4-Sem)
6085 -- N_Op_Shift_Right
6086 -- Sloc points to the function name
6087 -- plus fields for binary operator
6088 -- plus fields for expression
6089 -- Shift_Count_OK (Flag4-Sem)
6091 --------------------------
6092 -- Obsolescent Features --
6093 --------------------------
6095 -- The syntax descriptions and tree nodes for obsolescent features are
6096 -- grouped together, corresponding to their location in appendix I in
6097 -- the RM. However, parsing and semantic analysis for these constructs
6098 -- is located in an appropriate chapter (see individual notes).
6100 ---------------------------
6101 -- J.3 Delta Constraint --
6102 ---------------------------
6104 -- Note: the parse routine for this construct is located in section
6105 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
6106 -- where delta constraint logically belongs.
6108 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
6110 -- N_Delta_Constraint
6111 -- Sloc points to DELTA
6112 -- Delta_Expression (Node3)
6113 -- Range_Constraint (Node4) (set to Empty if not present)
6115 --------------------
6116 -- J.7 At Clause --
6117 --------------------
6119 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
6121 -- Note: the parse routine for this construct is located in Par-Ch13,
6122 -- and the semantic analysis is in Sem_Ch13, where at clause logically
6123 -- belongs if it were not obsolescent.
6125 -- Note: in Ada 83 the expression must be a simple expression
6127 -- Gigi restriction: This node never appears, it is rewritten as an
6128 -- address attribute definition clause.
6130 -- N_At_Clause
6131 -- Sloc points to FOR
6132 -- Identifier (Node1)
6133 -- Expression (Node3)
6135 ---------------------
6136 -- J.8 Mod clause --
6137 ---------------------
6139 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
6141 -- Note: the parse routine for this construct is located in Par-Ch13,
6142 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
6143 -- belongs if it were not obsolescent.
6145 -- Note: in Ada 83, the expression must be a simple expression
6147 -- Gigi restriction: this node never appears. It is replaced
6148 -- by a corresponding Alignment attribute definition clause.
6150 -- Note: pragmas can appear before and after the MOD_CLAUSE since
6151 -- its name has "clause" in it. This is rather strange, but is quite
6152 -- definitely specified. The pragmas before are collected in the
6153 -- Pragmas_Before field of the mod clause node itself, and pragmas
6154 -- after are simply swallowed up in the list of component clauses.
6156 -- N_Mod_Clause
6157 -- Sloc points to AT
6158 -- Expression (Node3)
6159 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
6161 --------------------
6162 -- Semantic Nodes --
6163 --------------------
6165 -- These semantic nodes are used to hold additional semantic information.
6166 -- They are inserted into the tree as a result of semantic processing.
6167 -- Although there are no legitimate source syntax constructions that
6168 -- correspond directly to these nodes, we need a source syntax for the
6169 -- reconstructed tree printed by Sprint, and the node descriptions here
6170 -- show this syntax.
6172 ----------------------------
6173 -- Conditional Expression --
6174 ----------------------------
6176 -- This node is used to represent an expression corresponding to the
6177 -- C construct (condition ? then-expression : else_expression), where
6178 -- Expressions is a three element list, whose first expression is the
6179 -- condition, and whose second and third expressions are the then and
6180 -- else expressions respectively.
6182 -- Note: the Then_Actions and Else_Actions fields are always set to
6183 -- No_List in the tree passed to Gigi. These fields are used only
6184 -- for temporary processing purposes in the expander.
6186 -- Sprint syntax: (if expr then expr else expr)
6188 -- N_Conditional_Expression
6189 -- Sloc points to related node
6190 -- Expressions (List1)
6191 -- Then_Actions (List2-Sem)
6192 -- Else_Actions (List3-Sem)
6193 -- plus fields for expression
6195 -- Note: in the case where a debug source file is generated, the Sloc
6196 -- for this node points to the IF keyword in the Sprint file output.
6198 -------------------
6199 -- Expanded_Name --
6200 -------------------
6202 -- The N_Expanded_Name node is used to represent a selected component
6203 -- name that has been resolved to an expanded name. The semantic phase
6204 -- replaces N_Selected_Component nodes that represent names by the use
6205 -- of this node, leaving the N_Selected_Component node used only when
6206 -- the prefix is a record or protected type.
6208 -- The fields of the N_Expanded_Name node are layed out identically
6209 -- to those of the N_Selected_Component node, allowing conversion of
6210 -- an expanded name node to a selected component node to be done
6211 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
6213 -- There is no special sprint syntax for an expanded name
6215 -- N_Expanded_Name
6216 -- Sloc points to the period
6217 -- Chars (Name1) copy of Chars field of selector name
6218 -- Prefix (Node3)
6219 -- Selector_Name (Node2)
6220 -- Entity (Node4-Sem)
6221 -- Associated_Node (Node4-Sem)
6222 -- Redundant_Use (Flag13-Sem)
6223 -- Has_Private_View (Flag11-Sem) set in generic units.
6224 -- plus fields for expression
6226 --------------------
6227 -- Free Statement --
6228 --------------------
6230 -- The N_Free_Statement node is generated as a result of a call to an
6231 -- instantiation of Unchecked_Deallocation. The instantiation of this
6232 -- generic is handled specially and generates this node directly.
6234 -- Sprint syntax: free expression
6236 -- N_Free_Statement
6237 -- Sloc is copied from the unchecked deallocation call
6238 -- Expression (Node3) argument to unchecked deallocation call
6239 -- Storage_Pool (Node1-Sem)
6240 -- Procedure_To_Call (Node4-Sem)
6241 -- Actual_Designated_Subtype (Node2-Sem)
6243 -- Note: in the case where a debug source file is generated, the Sloc
6244 -- for this node points to the FREE keyword in the Sprint file output.
6246 -------------------
6247 -- Freeze Entity --
6248 -------------------
6250 -- This node marks the point in a declarative part at which an entity
6251 -- declared therein becomes frozen. The expander places initialization
6252 -- procedures for types at those points. Gigi uses the freezing point
6253 -- to elaborate entities that may depend on previous private types.
6255 -- See the section in Einfo "Delayed Freezing and Elaboration" for
6256 -- a full description of the use of this node.
6258 -- The Entity field points back to the entity for the type (whose
6259 -- Freeze_Node field points back to this freeze node).
6261 -- The Actions field contains a list of declarations and statements
6262 -- generated by the expander which are associated with the freeze
6263 -- node, and are elaborated as though the freeze node were replaced
6264 -- by this sequence of actions.
6266 -- Note: the Sloc field in the freeze node references a construct
6267 -- associated with the freezing point. This is used for posting
6268 -- messages in some error/warning situations, e.g. the case where
6269 -- a primitive operation of a tagged type is declared too late.
6271 -- Sprint syntax: freeze entity-name [
6272 -- freeze actions
6273 -- ]
6275 -- N_Freeze_Entity
6276 -- Sloc points near freeze point (see above special note)
6277 -- Entity (Node4-Sem)
6278 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
6279 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
6280 -- Actions (List1) (set to No_List if no freeze actions)
6281 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
6283 -- The Actions field holds actions associated with the freeze. These
6284 -- actions are elaborated at the point where the type is frozen.
6286 -- Note: in the case where a debug source file is generated, the Sloc
6287 -- for this node points to the FREEZE keyword in the Sprint file output.
6289 --------------------------------
6290 -- Implicit Label Declaration --
6291 --------------------------------
6293 -- An implicit label declaration is created for every occurrence of a
6294 -- label on a statement or a label on a block or loop. It is chained
6295 -- in the declarations of the innermost enclosing block as specified
6296 -- in RM section 5.1 (3).
6298 -- The Defining_Identifier is the actual identifier for the
6299 -- statement identifier. Note that the occurrence of the label
6300 -- is a reference, NOT the defining occurrence. The defining
6301 -- occurrence occurs at the head of the innermost enclosing
6302 -- block, and is represented by this node.
6304 -- Note: from the grammar, this might better be called an implicit
6305 -- statement identifier declaration, but the term we choose seems
6306 -- friendlier, since at least informally statement identifiers are
6307 -- called labels in both cases (i.e. when used in labels, and when
6308 -- used as the identifiers of blocks and loops).
6310 -- Note: although this is logically a semantic node, since it does
6311 -- not correspond directly to a source syntax construction, these
6312 -- nodes are actually created by the parser in a post pass done just
6313 -- after parsing is complete, before semantic analysis is started (see
6314 -- the Par.Labl subunit in file par-labl.adb).
6316 -- Sprint syntax: labelname : label;
6318 -- N_Implicit_Label_Declaration
6319 -- Sloc points to the << of the label
6320 -- Defining_Identifier (Node1)
6321 -- Label_Construct (Node2-Sem)
6323 -- Note: in the case where a debug source file is generated, the Sloc
6324 -- for this node points to the label name in the generated declaration.
6326 ---------------------
6327 -- Itype_Reference --
6328 ---------------------
6330 -- This node is used to create a reference to an Itype. The only
6331 -- purpose is to make sure that the Itype is defined if this is the
6332 -- first reference.
6334 -- A typical use of this node is when an Itype is to be referenced in
6335 -- two branches of an if statement. In this case it is important that
6336 -- the first use of the Itype not be inside the conditional, since
6337 -- then it might not be defined if the wrong branch of the if is
6338 -- taken in the case where the definition generates elaboration code.
6340 -- The Itype field points to the referenced Itype
6342 -- sprint syntax: reference itype-name
6344 -- N_Itype_Reference
6345 -- Sloc points to the node generating the reference
6346 -- Itype (Node1-Sem)
6348 -- Note: in the case where a debug source file is generated, the Sloc
6349 -- for this node points to the REFERENCE keyword in the file output.
6351 ---------------------
6352 -- Raise_xxx_Error --
6353 ---------------------
6355 -- One of these nodes is created during semantic analysis to replace
6356 -- a node for an expression that is determined to definitely raise
6357 -- the corresponding exception.
6359 -- The N_Raise_xxx_Error node may also stand alone in place
6360 -- of a declaration or statement, in which case it simply causes
6361 -- the exception to be raised (i.e. it is equivalent to a raise
6362 -- statement that raises the corresponding exception). This use
6363 -- is distinguished by the fact that the Etype in this case is
6364 -- Standard_Void_Type, In the subexprssion case, the Etype is the
6365 -- same as the type of the subexpression which it replaces.
6367 -- If Condition is empty, then the raise is unconditional. If the
6368 -- Condition field is non-empty, it is a boolean expression which
6369 -- is first evaluated, and the exception is raised only if the
6370 -- value of the expression is True. In the unconditional case, the
6371 -- creation of this node is usually accompanied by a warning message
6372 -- error. The creation of this node will usually be accompanied by a
6373 -- message (unless it appears within the right operand of a short
6374 -- circuit form whose left argument is static and decisively
6375 -- eliminates elaboration of the raise operation.
6377 -- The exception is generated with a message that contains the
6378 -- file name and line number, and then appended text. The Reason
6379 -- code shows the text to be added. The Reason code is an element
6380 -- of the type Types.RT_Exception_Code, and indicates both the
6381 -- message to be added, and the exception to be raised (which must
6382 -- match the node type). The value is stored by storing a Uint which
6383 -- is the Pos value of the enumeration element in this type.
6385 -- Gigi restriction: This expander ensures that the type of the
6386 -- Condition field is always Standard.Boolean, even if the type
6387 -- in the source is some non-standard boolean type.
6389 -- Sprint syntax: [xxx_error "msg"]
6390 -- or: [xxx_error when condition "msg"]
6392 -- N_Raise_Constraint_Error
6393 -- Sloc references related construct
6394 -- Condition (Node1) (set to Empty if no condition)
6395 -- Reason (Uint3)
6396 -- plus fields for expression
6398 -- N_Raise_Program_Error
6399 -- Sloc references related construct
6400 -- Condition (Node1) (set to Empty if no condition)
6401 -- Reason (Uint3)
6402 -- plus fields for expression
6404 -- N_Raise_Storage_Error
6405 -- Sloc references related construct
6406 -- Condition (Node1) (set to Empty if no condition)
6407 -- Reason (Uint3)
6408 -- plus fields for expression
6410 -- Note: Sloc is copied from the expression generating the exception.
6411 -- In the case where a debug source file is generated, the Sloc for
6412 -- this node points to the left bracket in the Sprint file output.
6414 ---------------
6415 -- Reference --
6416 ---------------
6418 -- For a number of purposes, we need to construct references to objects.
6419 -- These references are subsequently treated as normal access values.
6420 -- An example is the construction of the parameter block passed to a
6421 -- task entry. The N_Reference node is provided for this purpose. It is
6422 -- similar in effect to the use of the Unrestricted_Access attribute,
6423 -- and like Unrestricted_Access can be applied to objects which would
6424 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
6425 -- objects which are not aliased, and slices). In addition it can be
6426 -- applied to composite type values as well as objects, including string
6427 -- values and aggregates.
6429 -- Note: we use the Prefix field for this expression so that the
6430 -- resulting node can be treated using common code with the attribute
6431 -- nodes for the 'Access and related attributes. Logically it would make
6432 -- more sense to call it an Expression field, but then we would have to
6433 -- special case the treatment of the N_Reference node.
6435 -- Sprint syntax: prefix'reference
6437 -- N_Reference
6438 -- Sloc is copied from the expression
6439 -- Prefix (Node3)
6440 -- plus fields for expression
6442 -- Note: in the case where a debug source file is generated, the Sloc
6443 -- for this node points to the quote in the Sprint file output.
6445 ---------------------
6446 -- Subprogram_Info --
6447 ---------------------
6449 -- This node generates the appropriate Subprogram_Info value for a
6450 -- given procedure. See Ada.Exceptions for further details
6452 -- Sprint syntax: subprog'subprogram_info
6454 -- N_Subprogram_Info
6455 -- Sloc points to the entity for the procedure
6456 -- Identifier (Node1) identifier referencing the procedure
6457 -- Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc
6459 -- Note: in the case where a debug source file is generated, the Sloc
6460 -- for this node points to the quote in the Sprint file output.
6462 --------------------------
6463 -- Unchecked Expression --
6464 --------------------------
6466 -- An unchecked expression is one that must be analyzed and resolved
6467 -- with all checks off, regardless of the current setting of scope
6468 -- suppress flags.
6470 -- Sprint syntax: `(expression)
6472 -- Note: this node is always removed from the tree (and replaced by
6473 -- its constituent expression) on completion of analysis, so it only
6474 -- appears in intermediate trees, and will never be seen by Gigi.
6476 -- N_Unchecked_Expression
6477 -- Sloc is a copy of the Sloc of the expression
6478 -- Expression (Node3)
6479 -- plus fields for expression
6481 -- Note: in the case where a debug source file is generated, the Sloc
6482 -- for this node points to the back quote in the Sprint file output.
6484 -------------------------------
6485 -- Unchecked Type Conversion --
6486 -------------------------------
6488 -- An unchecked type conversion node represents the semantic action
6489 -- corresponding to a call to an instantiation of Unchecked_Conversion.
6490 -- It is generated as a result of actual use of Unchecked_Conversion
6491 -- and also the expander generates unchecked type conversion nodes
6492 -- directly for expansion of complex semantic actions.
6494 -- Note: an unchecked type conversion is a variable as far as the
6495 -- semantics are concerned, which is convenient for the expander.
6496 -- This does not change what Ada source programs are legal, since
6497 -- clearly a function call to an instantiation of Unchecked_Conversion
6498 -- is not a variable in any case.
6500 -- Sprint syntax: subtype-mark!(expression)
6502 -- N_Unchecked_Type_Conversion
6503 -- Sloc points to related node in source
6504 -- Subtype_Mark (Node4)
6505 -- Expression (Node3)
6506 -- Kill_Range_Check (Flag11-Sem)
6507 -- No_Truncation (Flag17-Sem)
6508 -- plus fields for expression
6510 -- Note: in the case where a debug source file is generated, the Sloc
6511 -- for this node points to the exclamation in the Sprint file output.
6513 -----------------------------------
6514 -- Validate_Unchecked_Conversion --
6515 -----------------------------------
6517 -- The front end does most of the validation of unchecked conversion,
6518 -- including checking sizes (this is done after the back end is called
6519 -- to take advantage of back-annotation of calculated sizes).
6521 -- The front end also deals with specific cases that are not allowed
6522 -- e.g. involving unconstrained array types.
6524 -- For the case of the standard gigi backend, this means that all
6525 -- checks are done in the front-end.
6527 -- However, in the case of specialized back-ends, notably the JVM
6528 -- backend for JGNAT, additional requirements and restrictions apply
6529 -- to unchecked conversion, and these are most conveniently performed
6530 -- in the specialized back-end.
6532 -- To accommodate this requirement, for such back ends, the following
6533 -- special node is generated recording an unchecked conversion that
6534 -- needs to be validated. The back end should post an appropriate
6535 -- error message if the unchecked conversion is invalid or warrants
6536 -- a special warning message.
6538 -- Source_Type and Target_Type point to the entities for the two
6539 -- types involved in the unchecked conversion instantiation that
6540 -- is to be validated.
6542 -- Sprint syntax: validate Unchecked_Conversion (source, target);
6544 -- N_Validate_Unchecked_Conversion
6545 -- Sloc points to instantiation (location for warning message)
6546 -- Source_Type (Node1-Sem)
6547 -- Target_Type (Node2-Sem)
6549 -- Note: in the case where a debug source file is generated, the Sloc
6550 -- for this node points to the VALIDATE keyword in the file output.
6552 -----------
6553 -- Empty --
6554 -----------
6556 -- Used as the contents of the Nkind field of the dummy Empty node
6557 -- and in some other situations to indicate an uninitialized value.
6559 -- N_Empty
6560 -- Chars (Name1) is set to No_Name
6562 -----------
6563 -- Error --
6564 -----------
6566 -- Used as the contents of the Nkind field of the dummy Error node.
6567 -- Has an Etype field, which gets set to Any_Type later on, to help
6568 -- error recovery (Error_Posted is also set in the Error node).
6570 -- N_Error
6571 -- Chars (Name1) is set to Error_Name
6572 -- Etype (Node5-Sem)
6574 --------------------------
6575 -- Node Type Definition --
6576 --------------------------
6578 -- The following is the definition of the Node_Kind type. As previously
6579 -- discussed, this is separated off to allow rearrangement of the order
6580 -- to facilitiate definition of subtype ranges. The comments show the
6581 -- subtype classes which apply to each set of node kinds. The first
6582 -- entry in the comment characterizes the following list of nodes.
6584 type Node_Kind is (
6585 N_Unused_At_Start,
6587 -- N_Representation_Clause
6589 N_At_Clause,
6590 N_Component_Clause,
6591 N_Enumeration_Representation_Clause,
6592 N_Mod_Clause,
6593 N_Record_Representation_Clause,
6595 -- N_Representation_Clause, N_Has_Chars
6597 N_Attribute_Definition_Clause,
6599 -- N_Has_Chars
6601 N_Empty,
6602 N_Pragma,
6603 N_Pragma_Argument_Association,
6605 -- N_Has_Etype
6607 N_Error,
6609 -- N_Entity, N_Has_Etype, N_Has_Chars
6611 N_Defining_Character_Literal,
6612 N_Defining_Identifier,
6613 N_Defining_Operator_Symbol,
6615 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
6617 N_Expanded_Name,
6619 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
6620 -- N_Has_Chars, N_Has_Entity
6622 N_Identifier,
6623 N_Operator_Symbol,
6625 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
6626 -- N_Has_Chars, N_Has_Entity
6628 N_Character_Literal,
6630 -- N_Binary_Op, N_Op, N_Subexpr,
6631 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
6633 N_Op_Add,
6634 N_Op_Concat,
6635 N_Op_Expon,
6636 N_Op_Subtract,
6638 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
6639 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
6641 N_Op_Divide,
6642 N_Op_Mod,
6643 N_Op_Multiply,
6644 N_Op_Rem,
6646 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
6647 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
6649 N_Op_And,
6651 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
6652 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
6654 N_Op_Eq,
6655 N_Op_Ge,
6656 N_Op_Gt,
6657 N_Op_Le,
6658 N_Op_Lt,
6659 N_Op_Ne,
6661 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
6662 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
6664 N_Op_Or,
6665 N_Op_Xor,
6667 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
6668 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
6670 N_Op_Rotate_Left,
6671 N_Op_Rotate_Right,
6672 N_Op_Shift_Left,
6673 N_Op_Shift_Right,
6674 N_Op_Shift_Right_Arithmetic,
6676 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
6677 -- N_Has_Chars, N_Has_Entity
6679 N_Op_Abs,
6680 N_Op_Minus,
6681 N_Op_Not,
6682 N_Op_Plus,
6684 -- N_Subexpr, N_Has_Etype, N_Has_Entity
6686 N_Attribute_Reference,
6688 -- N_Subexpr, N_Has_Etype
6690 N_And_Then,
6691 N_Conditional_Expression,
6692 N_Explicit_Dereference,
6693 N_Function_Call,
6694 N_In,
6695 N_Indexed_Component,
6696 N_Integer_Literal,
6697 N_Not_In,
6698 N_Null,
6699 N_Or_Else,
6700 N_Procedure_Call_Statement,
6701 N_Qualified_Expression,
6703 -- N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
6705 N_Raise_Constraint_Error,
6706 N_Raise_Program_Error,
6707 N_Raise_Storage_Error,
6709 -- N_Subexpr, N_Has_Etype
6711 N_Aggregate,
6712 N_Allocator,
6713 N_Extension_Aggregate,
6714 N_Range,
6715 N_Real_Literal,
6716 N_Reference,
6717 N_Selected_Component,
6718 N_Slice,
6719 N_String_Literal,
6720 N_Subprogram_Info,
6721 N_Type_Conversion,
6722 N_Unchecked_Expression,
6723 N_Unchecked_Type_Conversion,
6725 -- N_Has_Etype
6727 N_Subtype_Indication,
6729 -- N_Declaration
6731 N_Component_Declaration,
6732 N_Entry_Declaration,
6733 N_Formal_Object_Declaration,
6734 N_Formal_Type_Declaration,
6735 N_Full_Type_Declaration,
6736 N_Incomplete_Type_Declaration,
6737 N_Loop_Parameter_Specification,
6738 N_Object_Declaration,
6739 N_Protected_Type_Declaration,
6740 N_Private_Extension_Declaration,
6741 N_Private_Type_Declaration,
6742 N_Subtype_Declaration,
6744 -- N_Subprogram_Specification, N_Declaration
6746 N_Function_Specification,
6747 N_Procedure_Specification,
6749 -- N_Access_To_Subprogram_Definition
6751 N_Access_Function_Definition,
6752 N_Access_Procedure_Definition,
6754 -- N_Later_Decl_Item
6756 N_Task_Type_Declaration,
6758 -- N_Body_Stub, N_Later_Decl_Item
6760 N_Package_Body_Stub,
6761 N_Protected_Body_Stub,
6762 N_Subprogram_Body_Stub,
6763 N_Task_Body_Stub,
6765 -- N_Generic_Instantiation, N_Later_Decl_Item
6766 -- N_Subprogram_Instantiation
6768 N_Function_Instantiation,
6769 N_Procedure_Instantiation,
6771 -- N_Generic_Instantiation, N_Later_Decl_Item
6773 N_Package_Instantiation,
6775 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
6777 N_Package_Body,
6778 N_Subprogram_Body,
6780 -- N_Later_Decl_Item, N_Proper_Body
6782 N_Protected_Body,
6783 N_Task_Body,
6785 -- N_Later_Decl_Item
6787 N_Implicit_Label_Declaration,
6788 N_Package_Declaration,
6789 N_Single_Task_Declaration,
6790 N_Subprogram_Declaration,
6791 N_Use_Package_Clause,
6793 -- N_Generic_Declaration, N_Later_Decl_Item
6795 N_Generic_Package_Declaration,
6796 N_Generic_Subprogram_Declaration,
6798 -- N_Array_Type_Definition
6800 N_Constrained_Array_Definition,
6801 N_Unconstrained_Array_Definition,
6803 -- N_Renaming_Declaration
6805 N_Exception_Renaming_Declaration,
6806 N_Object_Renaming_Declaration,
6807 N_Package_Renaming_Declaration,
6808 N_Subprogram_Renaming_Declaration,
6810 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
6812 N_Generic_Function_Renaming_Declaration,
6813 N_Generic_Package_Renaming_Declaration,
6814 N_Generic_Procedure_Renaming_Declaration,
6816 -- N_Statement_Other_Than_Procedure_Call
6818 N_Abort_Statement,
6819 N_Accept_Statement,
6820 N_Assignment_Statement,
6821 N_Asynchronous_Select,
6822 N_Block_Statement,
6823 N_Case_Statement,
6824 N_Code_Statement,
6825 N_Conditional_Entry_Call,
6827 -- N_Statement_Other_Than_Procedure_Call. N_Delay_Statement
6829 N_Delay_Relative_Statement,
6830 N_Delay_Until_Statement,
6832 -- N_Statement_Other_Than_Procedure_Call
6834 N_Entry_Call_Statement,
6835 N_Free_Statement,
6836 N_Goto_Statement,
6837 N_Loop_Statement,
6838 N_Null_Statement,
6839 N_Raise_Statement,
6840 N_Requeue_Statement,
6841 N_Return_Statement,
6842 N_Selective_Accept,
6843 N_Timed_Entry_Call,
6845 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
6847 N_Exit_Statement,
6848 N_If_Statement,
6850 -- N_Has_Condition
6852 N_Accept_Alternative,
6853 N_Delay_Alternative,
6854 N_Elsif_Part,
6855 N_Entry_Body_Formal_Part,
6856 N_Iteration_Scheme,
6857 N_Terminate_Alternative,
6859 -- N_Formal_Subprogram_Declaration
6861 N_Formal_Abstract_Subprogram_Declaration,
6862 N_Formal_Concrete_Subprogram_Declaration,
6864 -- Other nodes (not part of any subtype class)
6866 N_Abortable_Part,
6867 N_Abstract_Subprogram_Declaration,
6868 N_Access_Definition,
6869 N_Access_To_Object_Definition,
6870 N_Case_Statement_Alternative,
6871 N_Compilation_Unit,
6872 N_Compilation_Unit_Aux,
6873 N_Component_Association,
6874 N_Component_Definition,
6875 N_Component_List,
6876 N_Derived_Type_Definition,
6877 N_Decimal_Fixed_Point_Definition,
6878 N_Defining_Program_Unit_Name,
6879 N_Delta_Constraint,
6880 N_Designator,
6881 N_Digits_Constraint,
6882 N_Discriminant_Association,
6883 N_Discriminant_Specification,
6884 N_Enumeration_Type_Definition,
6885 N_Entry_Body,
6886 N_Entry_Call_Alternative,
6887 N_Entry_Index_Specification,
6888 N_Exception_Declaration,
6889 N_Exception_Handler,
6890 N_Floating_Point_Definition,
6891 N_Formal_Decimal_Fixed_Point_Definition,
6892 N_Formal_Derived_Type_Definition,
6893 N_Formal_Discrete_Type_Definition,
6894 N_Formal_Floating_Point_Definition,
6895 N_Formal_Modular_Type_Definition,
6896 N_Formal_Ordinary_Fixed_Point_Definition,
6897 N_Formal_Package_Declaration,
6898 N_Formal_Private_Type_Definition,
6899 N_Formal_Signed_Integer_Type_Definition,
6900 N_Freeze_Entity,
6901 N_Generic_Association,
6902 N_Handled_Sequence_Of_Statements,
6903 N_Index_Or_Discriminant_Constraint,
6904 N_Itype_Reference,
6905 N_Label,
6906 N_Modular_Type_Definition,
6907 N_Number_Declaration,
6908 N_Ordinary_Fixed_Point_Definition,
6909 N_Others_Choice,
6910 N_Package_Specification,
6911 N_Parameter_Association,
6912 N_Parameter_Specification,
6913 N_Protected_Definition,
6914 N_Range_Constraint,
6915 N_Real_Range_Specification,
6916 N_Record_Definition,
6917 N_Signed_Integer_Type_Definition,
6918 N_Single_Protected_Declaration,
6919 N_Subunit,
6920 N_Task_Definition,
6921 N_Triggering_Alternative,
6922 N_Use_Type_Clause,
6923 N_Validate_Unchecked_Conversion,
6924 N_Variant,
6925 N_Variant_Part,
6926 N_With_Clause,
6927 N_With_Type_Clause,
6928 N_Unused_At_End);
6930 for Node_Kind'Size use 8;
6931 -- The data structures in Atree assume this!
6933 ----------------------------
6934 -- Node Class Definitions --
6935 ----------------------------
6937 subtype N_Access_To_Subprogram_Definition is Node_Kind range
6938 N_Access_Function_Definition ..
6939 N_Access_Procedure_Definition;
6941 subtype N_Array_Type_Definition is Node_Kind range
6942 N_Constrained_Array_Definition ..
6943 N_Unconstrained_Array_Definition;
6945 subtype N_Binary_Op is Node_Kind range
6946 N_Op_Add ..
6947 N_Op_Shift_Right_Arithmetic;
6949 subtype N_Body_Stub is Node_Kind range
6950 N_Package_Body_Stub ..
6951 N_Task_Body_Stub;
6953 subtype N_Declaration is Node_Kind range
6954 N_Component_Declaration ..
6955 N_Procedure_Specification;
6956 -- Note: this includes all constructs normally thought of as declarations
6957 -- except those which are separately grouped as later declarations.
6959 subtype N_Delay_Statement is Node_Kind range
6960 N_Delay_Relative_Statement ..
6961 N_Delay_Until_Statement;
6963 subtype N_Direct_Name is Node_Kind range
6964 N_Identifier ..
6965 N_Character_Literal;
6967 subtype N_Entity is Node_Kind range
6968 N_Defining_Character_Literal ..
6969 N_Defining_Operator_Symbol;
6971 subtype N_Formal_Subprogram_Declaration is Node_Kind range
6972 N_Formal_Abstract_Subprogram_Declaration ..
6973 N_Formal_Concrete_Subprogram_Declaration;
6975 subtype N_Generic_Declaration is Node_Kind range
6976 N_Generic_Package_Declaration ..
6977 N_Generic_Subprogram_Declaration;
6979 subtype N_Generic_Instantiation is Node_Kind range
6980 N_Function_Instantiation ..
6981 N_Package_Instantiation;
6983 subtype N_Generic_Renaming_Declaration is Node_Kind range
6984 N_Generic_Function_Renaming_Declaration ..
6985 N_Generic_Procedure_Renaming_Declaration;
6987 subtype N_Has_Chars is Node_Kind range
6988 N_Attribute_Definition_Clause ..
6989 N_Op_Plus;
6991 subtype N_Has_Entity is Node_Kind range
6992 N_Expanded_Name ..
6993 N_Attribute_Reference;
6994 -- Nodes that have Entity fields
6995 -- Warning: DOES NOT INCLUDE N_Freeze_Entity!
6997 subtype N_Has_Etype is Node_Kind range
6998 N_Error ..
6999 N_Subtype_Indication;
7001 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
7002 N_Op_Divide ..
7003 N_Op_Rem;
7005 subtype N_Later_Decl_Item is Node_Kind range
7006 N_Task_Type_Declaration ..
7007 N_Generic_Subprogram_Declaration;
7008 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and
7009 -- includes only those items which can appear as later declarative
7010 -- items. This also includes N_Implicit_Label_Declaration which is
7011 -- not specifically in the grammar but may appear as a valid later
7012 -- declarative items. It does NOT include N_Pragma which can also
7013 -- appear among later declarative items. It does however include
7014 -- N_Protected_Body, which is a bit peculiar, but harmless since
7015 -- this cannot appear in Ada 83 mode anyway.
7017 subtype N_Op is Node_Kind range
7018 N_Op_Add ..
7019 N_Op_Plus;
7021 subtype N_Op_Boolean is Node_Kind range
7022 N_Op_And ..
7023 N_Op_Xor;
7024 -- Binary operators which take operands of a boolean type, and yield
7025 -- a result of a boolean type.
7027 subtype N_Op_Compare is Node_Kind range
7028 N_Op_Eq ..
7029 N_Op_Ne;
7031 subtype N_Op_Shift is Node_Kind range
7032 N_Op_Rotate_Left ..
7033 N_Op_Shift_Right_Arithmetic;
7035 subtype N_Proper_Body is Node_Kind range
7036 N_Package_Body ..
7037 N_Task_Body;
7039 subtype N_Raise_xxx_Error is Node_Kind range
7040 N_Raise_Constraint_Error ..
7041 N_Raise_Storage_Error;
7043 subtype N_Renaming_Declaration is Node_Kind range
7044 N_Exception_Renaming_Declaration ..
7045 N_Generic_Procedure_Renaming_Declaration;
7047 subtype N_Representation_Clause is Node_Kind range
7048 N_At_Clause ..
7049 N_Attribute_Definition_Clause;
7051 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
7052 N_Abort_Statement ..
7053 N_If_Statement;
7054 -- Note that this includes all statement types except for the cases of the
7055 -- N_Procedure_Call_Statement which is considered to be a subexpression
7056 -- (since overloading is possible, so it needs to go through the normal
7057 -- overloading resolution for expressions).
7059 subtype N_Subprogram_Instantiation is Node_Kind range
7060 N_Function_Instantiation ..
7061 N_Procedure_Instantiation;
7063 subtype N_Has_Condition is Node_Kind range
7064 N_Exit_Statement ..
7065 N_Terminate_Alternative;
7066 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
7068 subtype N_Subexpr is Node_Kind range
7069 N_Expanded_Name ..
7070 N_Unchecked_Type_Conversion;
7071 -- Nodes with expression fields
7073 subtype N_Subprogram_Specification is Node_Kind range
7074 N_Function_Specification ..
7075 N_Procedure_Specification;
7077 subtype N_Unary_Op is Node_Kind range
7078 N_Op_Abs ..
7079 N_Op_Plus;
7081 subtype N_Unit_Body is Node_Kind range
7082 N_Package_Body ..
7083 N_Subprogram_Body;
7085 ---------------------------
7086 -- Node Access Functions --
7087 ---------------------------
7089 -- The following functions return the contents of the indicated field of
7090 -- the node referenced by the argument, which is a Node_Id. They provide
7091 -- logical access to fields in the node which could be accessed using the
7092 -- Atree.Unchecked_Access package, but the idea is always to use these
7093 -- higher level routines which preserve strong typing. In debug mode,
7094 -- these routines check that they are being applied to an appropriate
7095 -- node, as well as checking that the node is in range.
7097 function ABE_Is_Certain
7098 (N : Node_Id) return Boolean; -- Flag18
7100 function Abort_Present
7101 (N : Node_Id) return Boolean; -- Flag15
7103 function Abortable_Part
7104 (N : Node_Id) return Node_Id; -- Node2
7106 function Abstract_Present
7107 (N : Node_Id) return Boolean; -- Flag4
7109 function Accept_Handler_Records
7110 (N : Node_Id) return List_Id; -- List5
7112 function Accept_Statement
7113 (N : Node_Id) return Node_Id; -- Node2
7115 function Access_Definition
7116 (N : Node_Id) return Node_Id; -- Node3
7118 function Access_To_Subprogram_Definition
7119 (N : Node_Id) return Node_Id; -- Node3
7121 function Access_Types_To_Process
7122 (N : Node_Id) return Elist_Id; -- Elist2
7124 function Actions
7125 (N : Node_Id) return List_Id; -- List1
7127 function Activation_Chain_Entity
7128 (N : Node_Id) return Node_Id; -- Node3
7130 function Acts_As_Spec
7131 (N : Node_Id) return Boolean; -- Flag4
7133 function Actual_Designated_Subtype
7134 (N : Node_Id) return Node_Id; -- Node2
7136 function Aggregate_Bounds
7137 (N : Node_Id) return Node_Id; -- Node3
7139 function Aliased_Present
7140 (N : Node_Id) return Boolean; -- Flag4
7142 function All_Others
7143 (N : Node_Id) return Boolean; -- Flag11
7145 function All_Present
7146 (N : Node_Id) return Boolean; -- Flag15
7148 function Alternatives
7149 (N : Node_Id) return List_Id; -- List4
7151 function Ancestor_Part
7152 (N : Node_Id) return Node_Id; -- Node3
7154 function Array_Aggregate
7155 (N : Node_Id) return Node_Id; -- Node3
7157 function Assignment_OK
7158 (N : Node_Id) return Boolean; -- Flag15
7160 function Associated_Node
7161 (N : Node_Id) return Node_Id; -- Node4
7163 function At_End_Proc
7164 (N : Node_Id) return Node_Id; -- Node1
7166 function Attribute_Name
7167 (N : Node_Id) return Name_Id; -- Name2
7169 function Aux_Decls_Node
7170 (N : Node_Id) return Node_Id; -- Node5
7172 function Backwards_OK
7173 (N : Node_Id) return Boolean; -- Flag6
7175 function Bad_Is_Detected
7176 (N : Node_Id) return Boolean; -- Flag15
7178 function By_Ref
7179 (N : Node_Id) return Boolean; -- Flag5
7181 function Body_Required
7182 (N : Node_Id) return Boolean; -- Flag13
7184 function Body_To_Inline
7185 (N : Node_Id) return Node_Id; -- Node3
7187 function Box_Present
7188 (N : Node_Id) return Boolean; -- Flag15
7190 function Char_Literal_Value
7191 (N : Node_Id) return Uint; -- Uint2
7193 function Chars
7194 (N : Node_Id) return Name_Id; -- Name1
7196 function Check_Address_Alignment
7197 (N : Node_Id) return Boolean; -- Flag11
7199 function Choice_Parameter
7200 (N : Node_Id) return Node_Id; -- Node2
7202 function Choices
7203 (N : Node_Id) return List_Id; -- List1
7205 function Compile_Time_Known_Aggregate
7206 (N : Node_Id) return Boolean; -- Flag18
7208 function Component_Associations
7209 (N : Node_Id) return List_Id; -- List2
7211 function Component_Clauses
7212 (N : Node_Id) return List_Id; -- List3
7214 function Component_Definition
7215 (N : Node_Id) return Node_Id; -- Node4
7217 function Component_Items
7218 (N : Node_Id) return List_Id; -- List3
7220 function Component_List
7221 (N : Node_Id) return Node_Id; -- Node1
7223 function Component_Name
7224 (N : Node_Id) return Node_Id; -- Node1
7226 function Condition
7227 (N : Node_Id) return Node_Id; -- Node1
7229 function Condition_Actions
7230 (N : Node_Id) return List_Id; -- List3
7232 function Config_Pragmas
7233 (N : Node_Id) return List_Id; -- List4
7235 function Constant_Present
7236 (N : Node_Id) return Boolean; -- Flag17
7238 function Constraint
7239 (N : Node_Id) return Node_Id; -- Node3
7241 function Constraints
7242 (N : Node_Id) return List_Id; -- List1
7244 function Context_Installed
7245 (N : Node_Id) return Boolean; -- Flag13
7247 function Context_Items
7248 (N : Node_Id) return List_Id; -- List1
7250 function Controlling_Argument
7251 (N : Node_Id) return Node_Id; -- Node1
7253 function Conversion_OK
7254 (N : Node_Id) return Boolean; -- Flag14
7256 function Corresponding_Body
7257 (N : Node_Id) return Node_Id; -- Node5
7259 function Corresponding_Formal_Spec
7260 (N : Node_Id) return Node_Id; -- Node3
7262 function Corresponding_Generic_Association
7263 (N : Node_Id) return Node_Id; -- Node5
7265 function Corresponding_Integer_Value
7266 (N : Node_Id) return Uint; -- Uint4
7268 function Corresponding_Spec
7269 (N : Node_Id) return Node_Id; -- Node5
7271 function Corresponding_Stub
7272 (N : Node_Id) return Node_Id; -- Node3
7274 function Dcheck_Function
7275 (N : Node_Id) return Entity_Id; -- Node5
7277 function Debug_Statement
7278 (N : Node_Id) return Node_Id; -- Node3
7280 function Declarations
7281 (N : Node_Id) return List_Id; -- List2
7283 function Default_Expression
7284 (N : Node_Id) return Node_Id; -- Node5
7286 function Default_Name
7287 (N : Node_Id) return Node_Id; -- Node2
7289 function Defining_Identifier
7290 (N : Node_Id) return Entity_Id; -- Node1
7292 function Defining_Unit_Name
7293 (N : Node_Id) return Node_Id; -- Node1
7295 function Delay_Alternative
7296 (N : Node_Id) return Node_Id; -- Node4
7298 function Delay_Finalize_Attach
7299 (N : Node_Id) return Boolean; -- Flag14
7301 function Delay_Statement
7302 (N : Node_Id) return Node_Id; -- Node2
7304 function Delta_Expression
7305 (N : Node_Id) return Node_Id; -- Node3
7307 function Digits_Expression
7308 (N : Node_Id) return Node_Id; -- Node2
7310 function Discr_Check_Funcs_Built
7311 (N : Node_Id) return Boolean; -- Flag11
7313 function Discrete_Choices
7314 (N : Node_Id) return List_Id; -- List4
7316 function Discrete_Range
7317 (N : Node_Id) return Node_Id; -- Node4
7319 function Discrete_Subtype_Definition
7320 (N : Node_Id) return Node_Id; -- Node4
7322 function Discrete_Subtype_Definitions
7323 (N : Node_Id) return List_Id; -- List2
7325 function Discriminant_Specifications
7326 (N : Node_Id) return List_Id; -- List4
7328 function Discriminant_Type
7329 (N : Node_Id) return Node_Id; -- Node5
7331 function Do_Accessibility_Check
7332 (N : Node_Id) return Boolean; -- Flag13
7334 function Do_Discriminant_Check
7335 (N : Node_Id) return Boolean; -- Flag13
7337 function Do_Division_Check
7338 (N : Node_Id) return Boolean; -- Flag13
7340 function Do_Length_Check
7341 (N : Node_Id) return Boolean; -- Flag4
7343 function Do_Overflow_Check
7344 (N : Node_Id) return Boolean; -- Flag17
7346 function Do_Range_Check
7347 (N : Node_Id) return Boolean; -- Flag9
7349 function Do_Storage_Check
7350 (N : Node_Id) return Boolean; -- Flag17
7352 function Do_Tag_Check
7353 (N : Node_Id) return Boolean; -- Flag13
7355 function Elaborate_All_Desirable
7356 (N : Node_Id) return Boolean; -- Flag9
7358 function Elaborate_All_Present
7359 (N : Node_Id) return Boolean; -- Flag14
7361 function Elaborate_Desirable
7362 (N : Node_Id) return Boolean; -- Flag11
7364 function Elaborate_Present
7365 (N : Node_Id) return Boolean; -- Flag4
7367 function Elaboration_Boolean
7368 (N : Node_Id) return Node_Id; -- Node2
7370 function Else_Actions
7371 (N : Node_Id) return List_Id; -- List3
7373 function Else_Statements
7374 (N : Node_Id) return List_Id; -- List4
7376 function Elsif_Parts
7377 (N : Node_Id) return List_Id; -- List3
7379 function Enclosing_Variant
7380 (N : Node_Id) return Node_Id; -- Node2
7382 function End_Label
7383 (N : Node_Id) return Node_Id; -- Node4
7385 function End_Span
7386 (N : Node_Id) return Uint; -- Uint5
7388 function Entity
7389 (N : Node_Id) return Node_Id; -- Node4
7391 function Entity_Or_Associated_Node
7392 (N : Node_Id) return Node_Id; -- Node4
7394 function Entry_Body_Formal_Part
7395 (N : Node_Id) return Node_Id; -- Node5
7397 function Entry_Call_Alternative
7398 (N : Node_Id) return Node_Id; -- Node1
7400 function Entry_Call_Statement
7401 (N : Node_Id) return Node_Id; -- Node1
7403 function Entry_Direct_Name
7404 (N : Node_Id) return Node_Id; -- Node1
7406 function Entry_Index
7407 (N : Node_Id) return Node_Id; -- Node5
7409 function Entry_Index_Specification
7410 (N : Node_Id) return Node_Id; -- Node4
7412 function Etype
7413 (N : Node_Id) return Node_Id; -- Node5
7415 function Exception_Choices
7416 (N : Node_Id) return List_Id; -- List4
7418 function Exception_Handlers
7419 (N : Node_Id) return List_Id; -- List5
7421 function Exception_Junk
7422 (N : Node_Id) return Boolean; -- Flag7
7424 function Explicit_Actual_Parameter
7425 (N : Node_Id) return Node_Id; -- Node3
7427 function Expansion_Delayed
7428 (N : Node_Id) return Boolean; -- Flag11
7430 function Explicit_Generic_Actual_Parameter
7431 (N : Node_Id) return Node_Id; -- Node1
7433 function Expression
7434 (N : Node_Id) return Node_Id; -- Node3
7436 function Expressions
7437 (N : Node_Id) return List_Id; -- List1
7439 function First_Bit
7440 (N : Node_Id) return Node_Id; -- Node3
7442 function First_Inlined_Subprogram
7443 (N : Node_Id) return Entity_Id; -- Node3
7445 function First_Name
7446 (N : Node_Id) return Boolean; -- Flag5
7448 function First_Named_Actual
7449 (N : Node_Id) return Node_Id; -- Node4
7451 function First_Real_Statement
7452 (N : Node_Id) return Node_Id; -- Node2
7454 function First_Subtype_Link
7455 (N : Node_Id) return Entity_Id; -- Node5
7457 function Float_Truncate
7458 (N : Node_Id) return Boolean; -- Flag11
7460 function Formal_Type_Definition
7461 (N : Node_Id) return Node_Id; -- Node3
7463 function Forwards_OK
7464 (N : Node_Id) return Boolean; -- Flag5
7466 function From_At_Mod
7467 (N : Node_Id) return Boolean; -- Flag4
7469 function From_Default
7470 (N : Node_Id) return Boolean; -- Flag6
7472 function Generic_Associations
7473 (N : Node_Id) return List_Id; -- List3
7475 function Generic_Formal_Declarations
7476 (N : Node_Id) return List_Id; -- List2
7478 function Generic_Parent
7479 (N : Node_Id) return Node_Id; -- Node5
7481 function Generic_Parent_Type
7482 (N : Node_Id) return Node_Id; -- Node4
7484 function Handled_Statement_Sequence
7485 (N : Node_Id) return Node_Id; -- Node4
7487 function Handler_List_Entry
7488 (N : Node_Id) return Node_Id; -- Node2
7490 function Has_Created_Identifier
7491 (N : Node_Id) return Boolean; -- Flag15
7493 function Has_Dynamic_Length_Check
7494 (N : Node_Id) return Boolean; -- Flag10
7496 function Has_Dynamic_Range_Check
7497 (N : Node_Id) return Boolean; -- Flag12
7499 function Has_No_Elaboration_Code
7500 (N : Node_Id) return Boolean; -- Flag17
7502 function Has_Priority_Pragma
7503 (N : Node_Id) return Boolean; -- Flag6
7505 function Has_Private_View
7506 (N : Node_Id) return Boolean; -- Flag11
7508 function Has_Storage_Size_Pragma
7509 (N : Node_Id) return Boolean; -- Flag5
7511 function Has_Task_Info_Pragma
7512 (N : Node_Id) return Boolean; -- Flag7
7514 function Has_Task_Name_Pragma
7515 (N : Node_Id) return Boolean; -- Flag8
7517 function Has_Wide_Character
7518 (N : Node_Id) return Boolean; -- Flag11
7520 function Hidden_By_Use_Clause
7521 (N : Node_Id) return Elist_Id; -- Elist4
7523 function High_Bound
7524 (N : Node_Id) return Node_Id; -- Node2
7526 function Identifier
7527 (N : Node_Id) return Node_Id; -- Node1
7529 function Interface_List
7530 (N : Node_Id) return List_Id; -- List2
7532 function Interface_Present
7533 (N : Node_Id) return Boolean; -- Flag16
7535 function Implicit_With
7536 (N : Node_Id) return Boolean; -- Flag16
7538 function In_Present
7539 (N : Node_Id) return Boolean; -- Flag15
7541 function Includes_Infinities
7542 (N : Node_Id) return Boolean; -- Flag11
7544 function Instance_Spec
7545 (N : Node_Id) return Node_Id; -- Node5
7547 function Intval
7548 (N : Node_Id) return Uint; -- Uint3
7550 function Is_Asynchronous_Call_Block
7551 (N : Node_Id) return Boolean; -- Flag7
7553 function Is_Component_Left_Opnd
7554 (N : Node_Id) return Boolean; -- Flag13
7556 function Is_Component_Right_Opnd
7557 (N : Node_Id) return Boolean; -- Flag14
7559 function Is_Controlling_Actual
7560 (N : Node_Id) return Boolean; -- Flag16
7562 function Is_In_Discriminant_Check
7563 (N : Node_Id) return Boolean; -- Flag11
7565 function Is_Machine_Number
7566 (N : Node_Id) return Boolean; -- Flag11
7568 function Is_Null_Loop
7569 (N : Node_Id) return Boolean; -- Flag16
7571 function Is_Overloaded
7572 (N : Node_Id) return Boolean; -- Flag5
7574 function Is_Power_Of_2_For_Shift
7575 (N : Node_Id) return Boolean; -- Flag13
7577 function Is_Protected_Subprogram_Body
7578 (N : Node_Id) return Boolean; -- Flag7
7580 function Is_Static_Expression
7581 (N : Node_Id) return Boolean; -- Flag6
7583 function Is_Subprogram_Descriptor
7584 (N : Node_Id) return Boolean; -- Flag16
7586 function Is_Task_Allocation_Block
7587 (N : Node_Id) return Boolean; -- Flag6
7589 function Is_Task_Master
7590 (N : Node_Id) return Boolean; -- Flag5
7592 function Iteration_Scheme
7593 (N : Node_Id) return Node_Id; -- Node2
7595 function Itype
7596 (N : Node_Id) return Entity_Id; -- Node1
7598 function Kill_Range_Check
7599 (N : Node_Id) return Boolean; -- Flag11
7601 function Label_Construct
7602 (N : Node_Id) return Node_Id; -- Node2
7604 function Left_Opnd
7605 (N : Node_Id) return Node_Id; -- Node2
7607 function Last_Bit
7608 (N : Node_Id) return Node_Id; -- Node4
7610 function Last_Name
7611 (N : Node_Id) return Boolean; -- Flag6
7613 function Library_Unit
7614 (N : Node_Id) return Node_Id; -- Node4
7616 function Limited_View_Installed
7617 (N : Node_Id) return Boolean; -- Flag18
7619 function Limited_Present
7620 (N : Node_Id) return Boolean; -- Flag17
7622 function Literals
7623 (N : Node_Id) return List_Id; -- List1
7625 function Loop_Actions
7626 (N : Node_Id) return List_Id; -- List2
7628 function Loop_Parameter_Specification
7629 (N : Node_Id) return Node_Id; -- Node4
7631 function Low_Bound
7632 (N : Node_Id) return Node_Id; -- Node1
7634 function Mod_Clause
7635 (N : Node_Id) return Node_Id; -- Node2
7637 function More_Ids
7638 (N : Node_Id) return Boolean; -- Flag5
7640 function Must_Be_Byte_Aligned
7641 (N : Node_Id) return Boolean; -- Flag14
7643 function Must_Not_Freeze
7644 (N : Node_Id) return Boolean; -- Flag8
7646 function Must_Not_Override
7647 (N : Node_Id) return Boolean; -- Flag15
7649 function Must_Override
7650 (N : Node_Id) return Boolean; -- Flag14
7652 function Name
7653 (N : Node_Id) return Node_Id; -- Node2
7655 function Names
7656 (N : Node_Id) return List_Id; -- List2
7658 function Next_Entity
7659 (N : Node_Id) return Node_Id; -- Node2
7661 function Next_Named_Actual
7662 (N : Node_Id) return Node_Id; -- Node4
7664 function Next_Rep_Item
7665 (N : Node_Id) return Node_Id; -- Node4
7667 function Next_Use_Clause
7668 (N : Node_Id) return Node_Id; -- Node3
7670 function No_Ctrl_Actions
7671 (N : Node_Id) return Boolean; -- Flag7
7673 function No_Elaboration_Check
7674 (N : Node_Id) return Boolean; -- Flag14
7676 function No_Entities_Ref_In_Spec
7677 (N : Node_Id) return Boolean; -- Flag8
7679 function No_Initialization
7680 (N : Node_Id) return Boolean; -- Flag13
7682 function No_Truncation
7683 (N : Node_Id) return Boolean; -- Flag17
7685 function Null_Present
7686 (N : Node_Id) return Boolean; -- Flag13
7688 function Null_Exclusion_Present
7689 (N : Node_Id) return Boolean; -- Flag11
7691 function Null_Record_Present
7692 (N : Node_Id) return Boolean; -- Flag17
7694 function Object_Definition
7695 (N : Node_Id) return Node_Id; -- Node4
7697 function Original_Discriminant
7698 (N : Node_Id) return Node_Id; -- Node2
7700 function Original_Entity
7701 (N : Node_Id) return Entity_Id; -- Node2
7703 function Others_Discrete_Choices
7704 (N : Node_Id) return List_Id; -- List1
7706 function Out_Present
7707 (N : Node_Id) return Boolean; -- Flag17
7709 function Parameter_Associations
7710 (N : Node_Id) return List_Id; -- List3
7712 function Parameter_List_Truncated
7713 (N : Node_Id) return Boolean; -- Flag17
7715 function Parameter_Specifications
7716 (N : Node_Id) return List_Id; -- List3
7718 function Parameter_Type
7719 (N : Node_Id) return Node_Id; -- Node2
7721 function Parent_Spec
7722 (N : Node_Id) return Node_Id; -- Node4
7724 function Position
7725 (N : Node_Id) return Node_Id; -- Node2
7727 function Pragma_Argument_Associations
7728 (N : Node_Id) return List_Id; -- List2
7730 function Pragmas_After
7731 (N : Node_Id) return List_Id; -- List5
7733 function Pragmas_Before
7734 (N : Node_Id) return List_Id; -- List4
7736 function Prefix
7737 (N : Node_Id) return Node_Id; -- Node3
7739 function Present_Expr
7740 (N : Node_Id) return Uint; -- Uint3
7742 function Prev_Ids
7743 (N : Node_Id) return Boolean; -- Flag6
7745 function Print_In_Hex
7746 (N : Node_Id) return Boolean; -- Flag13
7748 function Private_Declarations
7749 (N : Node_Id) return List_Id; -- List3
7751 function Private_Present
7752 (N : Node_Id) return Boolean; -- Flag15
7754 function Procedure_To_Call
7755 (N : Node_Id) return Node_Id; -- Node4
7757 function Proper_Body
7758 (N : Node_Id) return Node_Id; -- Node1
7760 function Protected_Definition
7761 (N : Node_Id) return Node_Id; -- Node3
7763 function Protected_Present
7764 (N : Node_Id) return Boolean; -- Flag6
7766 function Raises_Constraint_Error
7767 (N : Node_Id) return Boolean; -- Flag7
7769 function Range_Constraint
7770 (N : Node_Id) return Node_Id; -- Node4
7772 function Range_Expression
7773 (N : Node_Id) return Node_Id; -- Node4
7775 function Real_Range_Specification
7776 (N : Node_Id) return Node_Id; -- Node4
7778 function Realval
7779 (N : Node_Id) return Ureal; -- Ureal3
7781 function Reason
7782 (N : Node_Id) return Uint; -- Uint3
7784 function Record_Extension_Part
7785 (N : Node_Id) return Node_Id; -- Node3
7787 function Redundant_Use
7788 (N : Node_Id) return Boolean; -- Flag13
7790 function Result_Definition
7791 (N : Node_Id) return Node_Id; -- Node4
7793 function Return_Type
7794 (N : Node_Id) return Node_Id; -- Node2
7796 function Reverse_Present
7797 (N : Node_Id) return Boolean; -- Flag15
7799 function Right_Opnd
7800 (N : Node_Id) return Node_Id; -- Node3
7802 function Rounded_Result
7803 (N : Node_Id) return Boolean; -- Flag18
7805 function Scope
7806 (N : Node_Id) return Node_Id; -- Node3
7808 function Select_Alternatives
7809 (N : Node_Id) return List_Id; -- List1
7811 function Selector_Name
7812 (N : Node_Id) return Node_Id; -- Node2
7814 function Selector_Names
7815 (N : Node_Id) return List_Id; -- List1
7817 function Shift_Count_OK
7818 (N : Node_Id) return Boolean; -- Flag4
7820 function Source_Type
7821 (N : Node_Id) return Entity_Id; -- Node1
7823 function Specification
7824 (N : Node_Id) return Node_Id; -- Node1
7826 function Statements
7827 (N : Node_Id) return List_Id; -- List3
7829 function Static_Processing_OK
7830 (N : Node_Id) return Boolean; -- Flag4
7832 function Storage_Pool
7833 (N : Node_Id) return Node_Id; -- Node1
7835 function Strval
7836 (N : Node_Id) return String_Id; -- Str3
7838 function Subtype_Indication
7839 (N : Node_Id) return Node_Id; -- Node5
7841 function Subtype_Mark
7842 (N : Node_Id) return Node_Id; -- Node4
7844 function Subtype_Marks
7845 (N : Node_Id) return List_Id; -- List2
7847 function Synchronized_Present
7848 (N : Node_Id) return Boolean; -- Flag7
7850 function Tagged_Present
7851 (N : Node_Id) return Boolean; -- Flag15
7853 function Target_Type
7854 (N : Node_Id) return Entity_Id; -- Node2
7856 function Task_Definition
7857 (N : Node_Id) return Node_Id; -- Node3
7859 function Task_Present
7860 (N : Node_Id) return Boolean; -- Flag5
7862 function Then_Actions
7863 (N : Node_Id) return List_Id; -- List2
7865 function Then_Statements
7866 (N : Node_Id) return List_Id; -- List2
7868 function Treat_Fixed_As_Integer
7869 (N : Node_Id) return Boolean; -- Flag14
7871 function Triggering_Alternative
7872 (N : Node_Id) return Node_Id; -- Node1
7874 function Triggering_Statement
7875 (N : Node_Id) return Node_Id; -- Node1
7877 function TSS_Elist
7878 (N : Node_Id) return Elist_Id; -- Elist3
7880 function Type_Definition
7881 (N : Node_Id) return Node_Id; -- Node3
7883 function Unit
7884 (N : Node_Id) return Node_Id; -- Node2
7886 function Unknown_Discriminants_Present
7887 (N : Node_Id) return Boolean; -- Flag13
7889 function Unreferenced_In_Spec
7890 (N : Node_Id) return Boolean; -- Flag7
7892 function Variant_Part
7893 (N : Node_Id) return Node_Id; -- Node4
7895 function Variants
7896 (N : Node_Id) return List_Id; -- List1
7898 function Visible_Declarations
7899 (N : Node_Id) return List_Id; -- List2
7901 function Was_Originally_Stub
7902 (N : Node_Id) return Boolean; -- Flag13
7904 function Zero_Cost_Handling
7905 (N : Node_Id) return Boolean; -- Flag5
7907 -- End functions (note used by xsinfo utility program to end processing)
7909 ----------------------------
7910 -- Node Update Procedures --
7911 ----------------------------
7913 -- These are the corresponding node update routines, which again provide
7914 -- a high level logical access with type checking. In addition to setting
7915 -- the indicated field of the node N to the given Val, in the case of
7916 -- tree pointers (List1-4), the parent pointer of the Val node is set to
7917 -- point back to node N. This automates the setting of the parent pointer.
7919 procedure Set_ABE_Is_Certain
7920 (N : Node_Id; Val : Boolean := True); -- Flag18
7922 procedure Set_Abort_Present
7923 (N : Node_Id; Val : Boolean := True); -- Flag15
7925 procedure Set_Abortable_Part
7926 (N : Node_Id; Val : Node_Id); -- Node2
7928 procedure Set_Abstract_Present
7929 (N : Node_Id; Val : Boolean := True); -- Flag4
7931 procedure Set_Accept_Handler_Records
7932 (N : Node_Id; Val : List_Id); -- List5
7934 procedure Set_Accept_Statement
7935 (N : Node_Id; Val : Node_Id); -- Node2
7937 procedure Set_Access_Definition
7938 (N : Node_Id; Val : Node_Id); -- Node3
7940 procedure Set_Access_To_Subprogram_Definition
7941 (N : Node_Id; Val : Node_Id); -- Node3
7943 procedure Set_Access_Types_To_Process
7944 (N : Node_Id; Val : Elist_Id); -- Elist2
7946 procedure Set_Actions
7947 (N : Node_Id; Val : List_Id); -- List1
7949 procedure Set_Activation_Chain_Entity
7950 (N : Node_Id; Val : Node_Id); -- Node3
7952 procedure Set_Acts_As_Spec
7953 (N : Node_Id; Val : Boolean := True); -- Flag4
7955 procedure Set_Actual_Designated_Subtype
7956 (N : Node_Id; Val : Node_Id); -- Node2
7958 procedure Set_Aggregate_Bounds
7959 (N : Node_Id; Val : Node_Id); -- Node3
7961 procedure Set_Aliased_Present
7962 (N : Node_Id; Val : Boolean := True); -- Flag4
7964 procedure Set_All_Others
7965 (N : Node_Id; Val : Boolean := True); -- Flag11
7967 procedure Set_All_Present
7968 (N : Node_Id; Val : Boolean := True); -- Flag15
7970 procedure Set_Alternatives
7971 (N : Node_Id; Val : List_Id); -- List4
7973 procedure Set_Ancestor_Part
7974 (N : Node_Id; Val : Node_Id); -- Node3
7976 procedure Set_Array_Aggregate
7977 (N : Node_Id; Val : Node_Id); -- Node3
7979 procedure Set_Assignment_OK
7980 (N : Node_Id; Val : Boolean := True); -- Flag15
7982 procedure Set_Associated_Node
7983 (N : Node_Id; Val : Node_Id); -- Node4
7985 procedure Set_Attribute_Name
7986 (N : Node_Id; Val : Name_Id); -- Name2
7988 procedure Set_At_End_Proc
7989 (N : Node_Id; Val : Node_Id); -- Node1
7991 procedure Set_Aux_Decls_Node
7992 (N : Node_Id; Val : Node_Id); -- Node5
7994 procedure Set_Backwards_OK
7995 (N : Node_Id; Val : Boolean := True); -- Flag6
7997 procedure Set_Bad_Is_Detected
7998 (N : Node_Id; Val : Boolean := True); -- Flag15
8000 procedure Set_Body_Required
8001 (N : Node_Id; Val : Boolean := True); -- Flag13
8003 procedure Set_Body_To_Inline
8004 (N : Node_Id; Val : Node_Id); -- Node3
8006 procedure Set_Box_Present
8007 (N : Node_Id; Val : Boolean := True); -- Flag15
8009 procedure Set_By_Ref
8010 (N : Node_Id; Val : Boolean := True); -- Flag5
8012 procedure Set_Char_Literal_Value
8013 (N : Node_Id; Val : Uint); -- Uint2
8015 procedure Set_Chars
8016 (N : Node_Id; Val : Name_Id); -- Name1
8018 procedure Set_Check_Address_Alignment
8019 (N : Node_Id; Val : Boolean := True); -- Flag11
8021 procedure Set_Choice_Parameter
8022 (N : Node_Id; Val : Node_Id); -- Node2
8024 procedure Set_Choices
8025 (N : Node_Id; Val : List_Id); -- List1
8027 procedure Set_Compile_Time_Known_Aggregate
8028 (N : Node_Id; Val : Boolean := True); -- Flag18
8030 procedure Set_Component_Associations
8031 (N : Node_Id; Val : List_Id); -- List2
8033 procedure Set_Component_Clauses
8034 (N : Node_Id; Val : List_Id); -- List3
8036 procedure Set_Component_Definition
8037 (N : Node_Id; Val : Node_Id); -- Node4
8039 procedure Set_Component_Items
8040 (N : Node_Id; Val : List_Id); -- List3
8042 procedure Set_Component_List
8043 (N : Node_Id; Val : Node_Id); -- Node1
8045 procedure Set_Component_Name
8046 (N : Node_Id; Val : Node_Id); -- Node1
8048 procedure Set_Condition
8049 (N : Node_Id; Val : Node_Id); -- Node1
8051 procedure Set_Condition_Actions
8052 (N : Node_Id; Val : List_Id); -- List3
8054 procedure Set_Config_Pragmas
8055 (N : Node_Id; Val : List_Id); -- List4
8057 procedure Set_Constant_Present
8058 (N : Node_Id; Val : Boolean := True); -- Flag17
8060 procedure Set_Constraint
8061 (N : Node_Id; Val : Node_Id); -- Node3
8063 procedure Set_Constraints
8064 (N : Node_Id; Val : List_Id); -- List1
8066 procedure Set_Context_Installed
8067 (N : Node_Id; Val : Boolean := True); -- Flag13
8069 procedure Set_Context_Items
8070 (N : Node_Id; Val : List_Id); -- List1
8072 procedure Set_Controlling_Argument
8073 (N : Node_Id; Val : Node_Id); -- Node1
8075 procedure Set_Conversion_OK
8076 (N : Node_Id; Val : Boolean := True); -- Flag14
8078 procedure Set_Corresponding_Body
8079 (N : Node_Id; Val : Node_Id); -- Node5
8081 procedure Set_Corresponding_Formal_Spec
8082 (N : Node_Id; Val : Node_Id); -- Node3
8084 procedure Set_Corresponding_Generic_Association
8085 (N : Node_Id; Val : Node_Id); -- Node5
8087 procedure Set_Corresponding_Integer_Value
8088 (N : Node_Id; Val : Uint); -- Uint4
8090 procedure Set_Corresponding_Spec
8091 (N : Node_Id; Val : Node_Id); -- Node5
8093 procedure Set_Corresponding_Stub
8094 (N : Node_Id; Val : Node_Id); -- Node3
8096 procedure Set_Dcheck_Function
8097 (N : Node_Id; Val : Entity_Id); -- Node5
8099 procedure Set_Debug_Statement
8100 (N : Node_Id; Val : Node_Id); -- Node3
8102 procedure Set_Declarations
8103 (N : Node_Id; Val : List_Id); -- List2
8105 procedure Set_Default_Expression
8106 (N : Node_Id; Val : Node_Id); -- Node5
8108 procedure Set_Default_Name
8109 (N : Node_Id; Val : Node_Id); -- Node2
8111 procedure Set_Defining_Identifier
8112 (N : Node_Id; Val : Entity_Id); -- Node1
8114 procedure Set_Defining_Unit_Name
8115 (N : Node_Id; Val : Node_Id); -- Node1
8117 procedure Set_Delay_Alternative
8118 (N : Node_Id; Val : Node_Id); -- Node4
8120 procedure Set_Delay_Finalize_Attach
8121 (N : Node_Id; Val : Boolean := True); -- Flag14
8123 procedure Set_Delay_Statement
8124 (N : Node_Id; Val : Node_Id); -- Node2
8126 procedure Set_Delta_Expression
8127 (N : Node_Id; Val : Node_Id); -- Node3
8129 procedure Set_Digits_Expression
8130 (N : Node_Id; Val : Node_Id); -- Node2
8132 procedure Set_Discr_Check_Funcs_Built
8133 (N : Node_Id; Val : Boolean := True); -- Flag11
8135 procedure Set_Discrete_Choices
8136 (N : Node_Id; Val : List_Id); -- List4
8138 procedure Set_Discrete_Range
8139 (N : Node_Id; Val : Node_Id); -- Node4
8141 procedure Set_Discrete_Subtype_Definition
8142 (N : Node_Id; Val : Node_Id); -- Node4
8144 procedure Set_Discrete_Subtype_Definitions
8145 (N : Node_Id; Val : List_Id); -- List2
8147 procedure Set_Discriminant_Specifications
8148 (N : Node_Id; Val : List_Id); -- List4
8150 procedure Set_Discriminant_Type
8151 (N : Node_Id; Val : Node_Id); -- Node5
8153 procedure Set_Do_Accessibility_Check
8154 (N : Node_Id; Val : Boolean := True); -- Flag13
8156 procedure Set_Do_Discriminant_Check
8157 (N : Node_Id; Val : Boolean := True); -- Flag13
8159 procedure Set_Do_Division_Check
8160 (N : Node_Id; Val : Boolean := True); -- Flag13
8162 procedure Set_Do_Length_Check
8163 (N : Node_Id; Val : Boolean := True); -- Flag4
8165 procedure Set_Do_Overflow_Check
8166 (N : Node_Id; Val : Boolean := True); -- Flag17
8168 procedure Set_Do_Range_Check
8169 (N : Node_Id; Val : Boolean := True); -- Flag9
8171 procedure Set_Do_Storage_Check
8172 (N : Node_Id; Val : Boolean := True); -- Flag17
8174 procedure Set_Do_Tag_Check
8175 (N : Node_Id; Val : Boolean := True); -- Flag13
8177 procedure Set_Elaborate_All_Desirable
8178 (N : Node_Id; Val : Boolean := True); -- Flag9
8180 procedure Set_Elaborate_All_Present
8181 (N : Node_Id; Val : Boolean := True); -- Flag14
8183 procedure Set_Elaborate_Desirable
8184 (N : Node_Id; Val : Boolean := True); -- Flag11
8186 procedure Set_Elaborate_Present
8187 (N : Node_Id; Val : Boolean := True); -- Flag4
8189 procedure Set_Elaboration_Boolean
8190 (N : Node_Id; Val : Node_Id); -- Node2
8192 procedure Set_Else_Actions
8193 (N : Node_Id; Val : List_Id); -- List3
8195 procedure Set_Else_Statements
8196 (N : Node_Id; Val : List_Id); -- List4
8198 procedure Set_Elsif_Parts
8199 (N : Node_Id; Val : List_Id); -- List3
8201 procedure Set_Enclosing_Variant
8202 (N : Node_Id; Val : Node_Id); -- Node2
8204 procedure Set_End_Label
8205 (N : Node_Id; Val : Node_Id); -- Node4
8207 procedure Set_End_Span
8208 (N : Node_Id; Val : Uint); -- Uint5
8210 procedure Set_Entity
8211 (N : Node_Id; Val : Node_Id); -- Node4
8213 procedure Set_Entry_Body_Formal_Part
8214 (N : Node_Id; Val : Node_Id); -- Node5
8216 procedure Set_Entry_Call_Alternative
8217 (N : Node_Id; Val : Node_Id); -- Node1
8219 procedure Set_Entry_Call_Statement
8220 (N : Node_Id; Val : Node_Id); -- Node1
8222 procedure Set_Entry_Direct_Name
8223 (N : Node_Id; Val : Node_Id); -- Node1
8225 procedure Set_Entry_Index
8226 (N : Node_Id; Val : Node_Id); -- Node5
8228 procedure Set_Entry_Index_Specification
8229 (N : Node_Id; Val : Node_Id); -- Node4
8231 procedure Set_Etype
8232 (N : Node_Id; Val : Node_Id); -- Node5
8234 procedure Set_Exception_Choices
8235 (N : Node_Id; Val : List_Id); -- List4
8237 procedure Set_Exception_Handlers
8238 (N : Node_Id; Val : List_Id); -- List5
8240 procedure Set_Exception_Junk
8241 (N : Node_Id; Val : Boolean := True); -- Flag7
8243 procedure Set_Expansion_Delayed
8244 (N : Node_Id; Val : Boolean := True); -- Flag11
8246 procedure Set_Explicit_Actual_Parameter
8247 (N : Node_Id; Val : Node_Id); -- Node3
8249 procedure Set_Explicit_Generic_Actual_Parameter
8250 (N : Node_Id; Val : Node_Id); -- Node1
8252 procedure Set_Expression
8253 (N : Node_Id; Val : Node_Id); -- Node3
8255 procedure Set_Expressions
8256 (N : Node_Id; Val : List_Id); -- List1
8258 procedure Set_First_Bit
8259 (N : Node_Id; Val : Node_Id); -- Node3
8261 procedure Set_First_Inlined_Subprogram
8262 (N : Node_Id; Val : Entity_Id); -- Node3
8264 procedure Set_First_Name
8265 (N : Node_Id; Val : Boolean := True); -- Flag5
8267 procedure Set_First_Named_Actual
8268 (N : Node_Id; Val : Node_Id); -- Node4
8270 procedure Set_First_Real_Statement
8271 (N : Node_Id; Val : Node_Id); -- Node2
8273 procedure Set_First_Subtype_Link
8274 (N : Node_Id; Val : Entity_Id); -- Node5
8276 procedure Set_Float_Truncate
8277 (N : Node_Id; Val : Boolean := True); -- Flag11
8279 procedure Set_Formal_Type_Definition
8280 (N : Node_Id; Val : Node_Id); -- Node3
8282 procedure Set_Forwards_OK
8283 (N : Node_Id; Val : Boolean := True); -- Flag5
8285 procedure Set_From_At_Mod
8286 (N : Node_Id; Val : Boolean := True); -- Flag4
8288 procedure Set_From_Default
8289 (N : Node_Id; Val : Boolean := True); -- Flag6
8291 procedure Set_Generic_Associations
8292 (N : Node_Id; Val : List_Id); -- List3
8294 procedure Set_Generic_Formal_Declarations
8295 (N : Node_Id; Val : List_Id); -- List2
8297 procedure Set_Generic_Parent
8298 (N : Node_Id; Val : Node_Id); -- Node5
8300 procedure Set_Generic_Parent_Type
8301 (N : Node_Id; Val : Node_Id); -- Node4
8303 procedure Set_Handled_Statement_Sequence
8304 (N : Node_Id; Val : Node_Id); -- Node4
8306 procedure Set_Handler_List_Entry
8307 (N : Node_Id; Val : Node_Id); -- Node2
8309 procedure Set_Has_Created_Identifier
8310 (N : Node_Id; Val : Boolean := True); -- Flag15
8312 procedure Set_Has_Dynamic_Length_Check
8313 (N : Node_Id; Val : Boolean := True); -- Flag10
8315 procedure Set_Has_Dynamic_Range_Check
8316 (N : Node_Id; Val : Boolean := True); -- Flag12
8318 procedure Set_Has_No_Elaboration_Code
8319 (N : Node_Id; Val : Boolean := True); -- Flag17
8321 procedure Set_Has_Priority_Pragma
8322 (N : Node_Id; Val : Boolean := True); -- Flag6
8324 procedure Set_Has_Private_View
8325 (N : Node_Id; Val : Boolean := True); -- Flag11
8327 procedure Set_Has_Storage_Size_Pragma
8328 (N : Node_Id; Val : Boolean := True); -- Flag5
8330 procedure Set_Has_Task_Info_Pragma
8331 (N : Node_Id; Val : Boolean := True); -- Flag7
8333 procedure Set_Has_Task_Name_Pragma
8334 (N : Node_Id; Val : Boolean := True); -- Flag8
8336 procedure Set_Has_Wide_Character
8337 (N : Node_Id; Val : Boolean := True); -- Flag11
8339 procedure Set_Hidden_By_Use_Clause
8340 (N : Node_Id; Val : Elist_Id); -- Elist4
8342 procedure Set_High_Bound
8343 (N : Node_Id; Val : Node_Id); -- Node2
8345 procedure Set_Identifier
8346 (N : Node_Id; Val : Node_Id); -- Node1
8348 procedure Set_Interface_List
8349 (N : Node_Id; Val : List_Id); -- List2
8351 procedure Set_Interface_Present
8352 (N : Node_Id; Val : Boolean := True); -- Flag16
8354 procedure Set_Implicit_With
8355 (N : Node_Id; Val : Boolean := True); -- Flag16
8357 procedure Set_In_Present
8358 (N : Node_Id; Val : Boolean := True); -- Flag15
8360 procedure Set_Includes_Infinities
8361 (N : Node_Id; Val : Boolean := True); -- Flag11
8363 procedure Set_Instance_Spec
8364 (N : Node_Id; Val : Node_Id); -- Node5
8366 procedure Set_Intval
8367 (N : Node_Id; Val : Uint); -- Uint3
8369 procedure Set_Is_Asynchronous_Call_Block
8370 (N : Node_Id; Val : Boolean := True); -- Flag7
8372 procedure Set_Is_Component_Left_Opnd
8373 (N : Node_Id; Val : Boolean := True); -- Flag13
8375 procedure Set_Is_Component_Right_Opnd
8376 (N : Node_Id; Val : Boolean := True); -- Flag14
8378 procedure Set_Is_Controlling_Actual
8379 (N : Node_Id; Val : Boolean := True); -- Flag16
8381 procedure Set_Is_In_Discriminant_Check
8382 (N : Node_Id; Val : Boolean := True); -- Flag11
8384 procedure Set_Is_Machine_Number
8385 (N : Node_Id; Val : Boolean := True); -- Flag11
8387 procedure Set_Is_Null_Loop
8388 (N : Node_Id; Val : Boolean := True); -- Flag16
8390 procedure Set_Is_Overloaded
8391 (N : Node_Id; Val : Boolean := True); -- Flag5
8393 procedure Set_Is_Power_Of_2_For_Shift
8394 (N : Node_Id; Val : Boolean := True); -- Flag13
8396 procedure Set_Is_Protected_Subprogram_Body
8397 (N : Node_Id; Val : Boolean := True); -- Flag7
8399 procedure Set_Is_Static_Expression
8400 (N : Node_Id; Val : Boolean := True); -- Flag6
8402 procedure Set_Is_Subprogram_Descriptor
8403 (N : Node_Id; Val : Boolean := True); -- Flag16
8405 procedure Set_Is_Task_Allocation_Block
8406 (N : Node_Id; Val : Boolean := True); -- Flag6
8408 procedure Set_Is_Task_Master
8409 (N : Node_Id; Val : Boolean := True); -- Flag5
8411 procedure Set_Iteration_Scheme
8412 (N : Node_Id; Val : Node_Id); -- Node2
8414 procedure Set_Itype
8415 (N : Node_Id; Val : Entity_Id); -- Node1
8417 procedure Set_Kill_Range_Check
8418 (N : Node_Id; Val : Boolean := True); -- Flag11
8420 procedure Set_Last_Bit
8421 (N : Node_Id; Val : Node_Id); -- Node4
8423 procedure Set_Last_Name
8424 (N : Node_Id; Val : Boolean := True); -- Flag6
8426 procedure Set_Library_Unit
8427 (N : Node_Id; Val : Node_Id); -- Node4
8429 procedure Set_Label_Construct
8430 (N : Node_Id; Val : Node_Id); -- Node2
8432 procedure Set_Left_Opnd
8433 (N : Node_Id; Val : Node_Id); -- Node2
8435 procedure Set_Limited_View_Installed
8436 (N : Node_Id; Val : Boolean := True); -- Flag18
8438 procedure Set_Limited_Present
8439 (N : Node_Id; Val : Boolean := True); -- Flag17
8441 procedure Set_Literals
8442 (N : Node_Id; Val : List_Id); -- List1
8444 procedure Set_Loop_Actions
8445 (N : Node_Id; Val : List_Id); -- List2
8447 procedure Set_Loop_Parameter_Specification
8448 (N : Node_Id; Val : Node_Id); -- Node4
8450 procedure Set_Low_Bound
8451 (N : Node_Id; Val : Node_Id); -- Node1
8453 procedure Set_Mod_Clause
8454 (N : Node_Id; Val : Node_Id); -- Node2
8456 procedure Set_More_Ids
8457 (N : Node_Id; Val : Boolean := True); -- Flag5
8459 procedure Set_Must_Be_Byte_Aligned
8460 (N : Node_Id; Val : Boolean := True); -- Flag14
8462 procedure Set_Must_Not_Freeze
8463 (N : Node_Id; Val : Boolean := True); -- Flag8
8465 procedure Set_Must_Not_Override
8466 (N : Node_Id; Val : Boolean := True); -- Flag15
8468 procedure Set_Must_Override
8469 (N : Node_Id; Val : Boolean := True); -- Flag14
8471 procedure Set_Name
8472 (N : Node_Id; Val : Node_Id); -- Node2
8474 procedure Set_Names
8475 (N : Node_Id; Val : List_Id); -- List2
8477 procedure Set_Next_Entity
8478 (N : Node_Id; Val : Node_Id); -- Node2
8480 procedure Set_Next_Named_Actual
8481 (N : Node_Id; Val : Node_Id); -- Node4
8483 procedure Set_Next_Rep_Item
8484 (N : Node_Id; Val : Node_Id); -- Node4
8486 procedure Set_Next_Use_Clause
8487 (N : Node_Id; Val : Node_Id); -- Node3
8489 procedure Set_No_Ctrl_Actions
8490 (N : Node_Id; Val : Boolean := True); -- Flag7
8492 procedure Set_No_Elaboration_Check
8493 (N : Node_Id; Val : Boolean := True); -- Flag14
8495 procedure Set_No_Entities_Ref_In_Spec
8496 (N : Node_Id; Val : Boolean := True); -- Flag8
8498 procedure Set_No_Initialization
8499 (N : Node_Id; Val : Boolean := True); -- Flag13
8501 procedure Set_No_Truncation
8502 (N : Node_Id; Val : Boolean := True); -- Flag17
8504 procedure Set_Null_Present
8505 (N : Node_Id; Val : Boolean := True); -- Flag13
8507 procedure Set_Null_Exclusion_Present
8508 (N : Node_Id; Val : Boolean := True); -- Flag11
8510 procedure Set_Null_Record_Present
8511 (N : Node_Id; Val : Boolean := True); -- Flag17
8513 procedure Set_Object_Definition
8514 (N : Node_Id; Val : Node_Id); -- Node4
8516 procedure Set_Original_Discriminant
8517 (N : Node_Id; Val : Node_Id); -- Node2
8519 procedure Set_Original_Entity
8520 (N : Node_Id; Val : Entity_Id); -- Node2
8522 procedure Set_Others_Discrete_Choices
8523 (N : Node_Id; Val : List_Id); -- List1
8525 procedure Set_Out_Present
8526 (N : Node_Id; Val : Boolean := True); -- Flag17
8528 procedure Set_Parameter_Associations
8529 (N : Node_Id; Val : List_Id); -- List3
8531 procedure Set_Parameter_List_Truncated
8532 (N : Node_Id; Val : Boolean := True); -- Flag17
8534 procedure Set_Parameter_Specifications
8535 (N : Node_Id; Val : List_Id); -- List3
8537 procedure Set_Parameter_Type
8538 (N : Node_Id; Val : Node_Id); -- Node2
8540 procedure Set_Parent_Spec
8541 (N : Node_Id; Val : Node_Id); -- Node4
8543 procedure Set_Position
8544 (N : Node_Id; Val : Node_Id); -- Node2
8546 procedure Set_Pragma_Argument_Associations
8547 (N : Node_Id; Val : List_Id); -- List2
8549 procedure Set_Pragmas_After
8550 (N : Node_Id; Val : List_Id); -- List5
8552 procedure Set_Pragmas_Before
8553 (N : Node_Id; Val : List_Id); -- List4
8555 procedure Set_Prefix
8556 (N : Node_Id; Val : Node_Id); -- Node3
8558 procedure Set_Present_Expr
8559 (N : Node_Id; Val : Uint); -- Uint3
8561 procedure Set_Prev_Ids
8562 (N : Node_Id; Val : Boolean := True); -- Flag6
8564 procedure Set_Print_In_Hex
8565 (N : Node_Id; Val : Boolean := True); -- Flag13
8567 procedure Set_Private_Declarations
8568 (N : Node_Id; Val : List_Id); -- List3
8570 procedure Set_Private_Present
8571 (N : Node_Id; Val : Boolean := True); -- Flag15
8573 procedure Set_Procedure_To_Call
8574 (N : Node_Id; Val : Node_Id); -- Node4
8576 procedure Set_Proper_Body
8577 (N : Node_Id; Val : Node_Id); -- Node1
8579 procedure Set_Protected_Definition
8580 (N : Node_Id; Val : Node_Id); -- Node3
8582 procedure Set_Protected_Present
8583 (N : Node_Id; Val : Boolean := True); -- Flag6
8585 procedure Set_Raises_Constraint_Error
8586 (N : Node_Id; Val : Boolean := True); -- Flag7
8588 procedure Set_Range_Constraint
8589 (N : Node_Id; Val : Node_Id); -- Node4
8591 procedure Set_Range_Expression
8592 (N : Node_Id; Val : Node_Id); -- Node4
8594 procedure Set_Real_Range_Specification
8595 (N : Node_Id; Val : Node_Id); -- Node4
8597 procedure Set_Realval
8598 (N : Node_Id; Val : Ureal); -- Ureal3
8600 procedure Set_Reason
8601 (N : Node_Id; Val : Uint); -- Uint3
8603 procedure Set_Record_Extension_Part
8604 (N : Node_Id; Val : Node_Id); -- Node3
8606 procedure Set_Redundant_Use
8607 (N : Node_Id; Val : Boolean := True); -- Flag13
8609 procedure Set_Result_Definition
8610 (N : Node_Id; Val : Node_Id); -- Node4
8612 procedure Set_Return_Type
8613 (N : Node_Id; Val : Node_Id); -- Node2
8615 procedure Set_Reverse_Present
8616 (N : Node_Id; Val : Boolean := True); -- Flag15
8618 procedure Set_Right_Opnd
8619 (N : Node_Id; Val : Node_Id); -- Node3
8621 procedure Set_Rounded_Result
8622 (N : Node_Id; Val : Boolean := True); -- Flag18
8624 procedure Set_Scope
8625 (N : Node_Id; Val : Node_Id); -- Node3
8627 procedure Set_Select_Alternatives
8628 (N : Node_Id; Val : List_Id); -- List1
8630 procedure Set_Selector_Name
8631 (N : Node_Id; Val : Node_Id); -- Node2
8633 procedure Set_Selector_Names
8634 (N : Node_Id; Val : List_Id); -- List1
8636 procedure Set_Shift_Count_OK
8637 (N : Node_Id; Val : Boolean := True); -- Flag4
8639 procedure Set_Source_Type
8640 (N : Node_Id; Val : Entity_Id); -- Node1
8642 procedure Set_Specification
8643 (N : Node_Id; Val : Node_Id); -- Node1
8645 procedure Set_Statements
8646 (N : Node_Id; Val : List_Id); -- List3
8648 procedure Set_Static_Processing_OK
8649 (N : Node_Id; Val : Boolean); -- Flag4
8651 procedure Set_Storage_Pool
8652 (N : Node_Id; Val : Node_Id); -- Node1
8654 procedure Set_Strval
8655 (N : Node_Id; Val : String_Id); -- Str3
8657 procedure Set_Subtype_Indication
8658 (N : Node_Id; Val : Node_Id); -- Node5
8660 procedure Set_Subtype_Mark
8661 (N : Node_Id; Val : Node_Id); -- Node4
8663 procedure Set_Subtype_Marks
8664 (N : Node_Id; Val : List_Id); -- List2
8666 procedure Set_Synchronized_Present
8667 (N : Node_Id; Val : Boolean := True); -- Flag7
8669 procedure Set_Tagged_Present
8670 (N : Node_Id; Val : Boolean := True); -- Flag15
8672 procedure Set_Target_Type
8673 (N : Node_Id; Val : Entity_Id); -- Node2
8675 procedure Set_Task_Definition
8676 (N : Node_Id; Val : Node_Id); -- Node3
8678 procedure Set_Task_Present
8679 (N : Node_Id; Val : Boolean := True); -- Flag5
8681 procedure Set_Then_Actions
8682 (N : Node_Id; Val : List_Id); -- List2
8684 procedure Set_Then_Statements
8685 (N : Node_Id; Val : List_Id); -- List2
8687 procedure Set_Treat_Fixed_As_Integer
8688 (N : Node_Id; Val : Boolean := True); -- Flag14
8690 procedure Set_Triggering_Alternative
8691 (N : Node_Id; Val : Node_Id); -- Node1
8693 procedure Set_Triggering_Statement
8694 (N : Node_Id; Val : Node_Id); -- Node1
8696 procedure Set_TSS_Elist
8697 (N : Node_Id; Val : Elist_Id); -- Elist3
8699 procedure Set_Type_Definition
8700 (N : Node_Id; Val : Node_Id); -- Node3
8702 procedure Set_Unit
8703 (N : Node_Id; Val : Node_Id); -- Node2
8705 procedure Set_Unknown_Discriminants_Present
8706 (N : Node_Id; Val : Boolean := True); -- Flag13
8708 procedure Set_Unreferenced_In_Spec
8709 (N : Node_Id; Val : Boolean := True); -- Flag7
8711 procedure Set_Variant_Part
8712 (N : Node_Id; Val : Node_Id); -- Node4
8714 procedure Set_Variants
8715 (N : Node_Id; Val : List_Id); -- List1
8717 procedure Set_Visible_Declarations
8718 (N : Node_Id; Val : List_Id); -- List2
8720 procedure Set_Was_Originally_Stub
8721 (N : Node_Id; Val : Boolean := True); -- Flag13
8723 procedure Set_Zero_Cost_Handling
8724 (N : Node_Id; Val : Boolean := True); -- Flag5
8726 -------------------------
8727 -- Iterator Procedures --
8728 -------------------------
8730 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
8732 procedure Next_Entity (N : in out Node_Id);
8733 procedure Next_Named_Actual (N : in out Node_Id);
8734 procedure Next_Rep_Item (N : in out Node_Id);
8735 procedure Next_Use_Clause (N : in out Node_Id);
8737 --------------------------------------
8738 -- Logical Access to End_Span Field --
8739 --------------------------------------
8741 function End_Location (N : Node_Id) return Source_Ptr;
8742 -- N is an N_If_Statement or N_Case_Statement node, and this
8743 -- function returns the location of the IF token in the END IF
8744 -- sequence by translating the value of the End_Span field.
8746 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
8747 -- N is an N_If_Statement or N_Case_Statement node. This procedure
8748 -- sets the End_Span field to correspond to the given value S. In
8749 -- other words, End_Span is set to the difference between S and
8750 -- Sloc (N), the starting location.
8752 --------------------
8753 -- Inline Pragmas --
8754 --------------------
8756 pragma Inline (ABE_Is_Certain);
8757 pragma Inline (Abort_Present);
8758 pragma Inline (Abortable_Part);
8759 pragma Inline (Abstract_Present);
8760 pragma Inline (Accept_Handler_Records);
8761 pragma Inline (Accept_Statement);
8762 pragma Inline (Access_Definition);
8763 pragma Inline (Access_To_Subprogram_Definition);
8764 pragma Inline (Access_Types_To_Process);
8765 pragma Inline (Actions);
8766 pragma Inline (Activation_Chain_Entity);
8767 pragma Inline (Acts_As_Spec);
8768 pragma Inline (Actual_Designated_Subtype);
8769 pragma Inline (Aggregate_Bounds);
8770 pragma Inline (Aliased_Present);
8771 pragma Inline (All_Others);
8772 pragma Inline (All_Present);
8773 pragma Inline (Alternatives);
8774 pragma Inline (Ancestor_Part);
8775 pragma Inline (Array_Aggregate);
8776 pragma Inline (Assignment_OK);
8777 pragma Inline (Associated_Node);
8778 pragma Inline (At_End_Proc);
8779 pragma Inline (Attribute_Name);
8780 pragma Inline (Aux_Decls_Node);
8781 pragma Inline (Backwards_OK);
8782 pragma Inline (Bad_Is_Detected);
8783 pragma Inline (Body_To_Inline);
8784 pragma Inline (Body_Required);
8785 pragma Inline (By_Ref);
8786 pragma Inline (Box_Present);
8787 pragma Inline (Char_Literal_Value);
8788 pragma Inline (Chars);
8789 pragma Inline (Check_Address_Alignment);
8790 pragma Inline (Choice_Parameter);
8791 pragma Inline (Choices);
8792 pragma Inline (Compile_Time_Known_Aggregate);
8793 pragma Inline (Component_Associations);
8794 pragma Inline (Component_Clauses);
8795 pragma Inline (Component_Definition);
8796 pragma Inline (Component_Items);
8797 pragma Inline (Component_List);
8798 pragma Inline (Component_Name);
8799 pragma Inline (Condition);
8800 pragma Inline (Condition_Actions);
8801 pragma Inline (Config_Pragmas);
8802 pragma Inline (Constant_Present);
8803 pragma Inline (Constraint);
8804 pragma Inline (Constraints);
8805 pragma Inline (Context_Installed);
8806 pragma Inline (Context_Items);
8807 pragma Inline (Controlling_Argument);
8808 pragma Inline (Conversion_OK);
8809 pragma Inline (Corresponding_Body);
8810 pragma Inline (Corresponding_Formal_Spec);
8811 pragma Inline (Corresponding_Generic_Association);
8812 pragma Inline (Corresponding_Integer_Value);
8813 pragma Inline (Corresponding_Spec);
8814 pragma Inline (Corresponding_Stub);
8815 pragma Inline (Dcheck_Function);
8816 pragma Inline (Debug_Statement);
8817 pragma Inline (Declarations);
8818 pragma Inline (Default_Expression);
8819 pragma Inline (Default_Name);
8820 pragma Inline (Defining_Identifier);
8821 pragma Inline (Defining_Unit_Name);
8822 pragma Inline (Delay_Alternative);
8823 pragma Inline (Delay_Finalize_Attach);
8824 pragma Inline (Delay_Statement);
8825 pragma Inline (Delta_Expression);
8826 pragma Inline (Digits_Expression);
8827 pragma Inline (Discr_Check_Funcs_Built);
8828 pragma Inline (Discrete_Choices);
8829 pragma Inline (Discrete_Range);
8830 pragma Inline (Discrete_Subtype_Definition);
8831 pragma Inline (Discrete_Subtype_Definitions);
8832 pragma Inline (Discriminant_Specifications);
8833 pragma Inline (Discriminant_Type);
8834 pragma Inline (Do_Accessibility_Check);
8835 pragma Inline (Do_Discriminant_Check);
8836 pragma Inline (Do_Length_Check);
8837 pragma Inline (Do_Division_Check);
8838 pragma Inline (Do_Overflow_Check);
8839 pragma Inline (Do_Range_Check);
8840 pragma Inline (Do_Storage_Check);
8841 pragma Inline (Do_Tag_Check);
8842 pragma Inline (Elaborate_Present);
8843 pragma Inline (Elaborate_All_Desirable);
8844 pragma Inline (Elaborate_All_Present);
8845 pragma Inline (Elaborate_Desirable);
8846 pragma Inline (Elaboration_Boolean);
8847 pragma Inline (Else_Actions);
8848 pragma Inline (Else_Statements);
8849 pragma Inline (Elsif_Parts);
8850 pragma Inline (Enclosing_Variant);
8851 pragma Inline (End_Label);
8852 pragma Inline (End_Span);
8853 pragma Inline (Entity);
8854 pragma Inline (Entity_Or_Associated_Node);
8855 pragma Inline (Entry_Body_Formal_Part);
8856 pragma Inline (Entry_Call_Alternative);
8857 pragma Inline (Entry_Call_Statement);
8858 pragma Inline (Entry_Direct_Name);
8859 pragma Inline (Entry_Index);
8860 pragma Inline (Entry_Index_Specification);
8861 pragma Inline (Etype);
8862 pragma Inline (Exception_Choices);
8863 pragma Inline (Exception_Junk);
8864 pragma Inline (Exception_Handlers);
8865 pragma Inline (Expansion_Delayed);
8866 pragma Inline (Explicit_Actual_Parameter);
8867 pragma Inline (Explicit_Generic_Actual_Parameter);
8868 pragma Inline (Expression);
8869 pragma Inline (Expressions);
8870 pragma Inline (First_Bit);
8871 pragma Inline (First_Inlined_Subprogram);
8872 pragma Inline (First_Name);
8873 pragma Inline (First_Named_Actual);
8874 pragma Inline (First_Real_Statement);
8875 pragma Inline (First_Subtype_Link);
8876 pragma Inline (Float_Truncate);
8877 pragma Inline (Formal_Type_Definition);
8878 pragma Inline (Forwards_OK);
8879 pragma Inline (From_At_Mod);
8880 pragma Inline (From_Default);
8881 pragma Inline (Generic_Associations);
8882 pragma Inline (Generic_Formal_Declarations);
8883 pragma Inline (Generic_Parent);
8884 pragma Inline (Generic_Parent_Type);
8885 pragma Inline (Handled_Statement_Sequence);
8886 pragma Inline (Handler_List_Entry);
8887 pragma Inline (Has_Created_Identifier);
8888 pragma Inline (Has_Dynamic_Length_Check);
8889 pragma Inline (Has_Dynamic_Range_Check);
8890 pragma Inline (Has_No_Elaboration_Code);
8891 pragma Inline (Has_Priority_Pragma);
8892 pragma Inline (Has_Private_View);
8893 pragma Inline (Has_Storage_Size_Pragma);
8894 pragma Inline (Has_Task_Info_Pragma);
8895 pragma Inline (Has_Task_Name_Pragma);
8896 pragma Inline (Has_Wide_Character);
8897 pragma Inline (Hidden_By_Use_Clause);
8898 pragma Inline (High_Bound);
8899 pragma Inline (Identifier);
8900 pragma Inline (Implicit_With);
8901 pragma Inline (Interface_List);
8902 pragma Inline (Interface_Present);
8903 pragma Inline (Includes_Infinities);
8904 pragma Inline (In_Present);
8905 pragma Inline (Instance_Spec);
8906 pragma Inline (Intval);
8907 pragma Inline (Is_Asynchronous_Call_Block);
8908 pragma Inline (Is_Component_Left_Opnd);
8909 pragma Inline (Is_Component_Right_Opnd);
8910 pragma Inline (Is_Controlling_Actual);
8911 pragma Inline (Is_In_Discriminant_Check);
8912 pragma Inline (Is_Machine_Number);
8913 pragma Inline (Is_Null_Loop);
8914 pragma Inline (Is_Overloaded);
8915 pragma Inline (Is_Power_Of_2_For_Shift);
8916 pragma Inline (Is_Protected_Subprogram_Body);
8917 pragma Inline (Is_Static_Expression);
8918 pragma Inline (Is_Subprogram_Descriptor);
8919 pragma Inline (Is_Task_Allocation_Block);
8920 pragma Inline (Is_Task_Master);
8921 pragma Inline (Iteration_Scheme);
8922 pragma Inline (Itype);
8923 pragma Inline (Kill_Range_Check);
8924 pragma Inline (Last_Bit);
8925 pragma Inline (Last_Name);
8926 pragma Inline (Library_Unit);
8927 pragma Inline (Label_Construct);
8928 pragma Inline (Left_Opnd);
8929 pragma Inline (Limited_View_Installed);
8930 pragma Inline (Limited_Present);
8931 pragma Inline (Literals);
8932 pragma Inline (Loop_Actions);
8933 pragma Inline (Loop_Parameter_Specification);
8934 pragma Inline (Low_Bound);
8935 pragma Inline (Mod_Clause);
8936 pragma Inline (More_Ids);
8937 pragma Inline (Must_Be_Byte_Aligned);
8938 pragma Inline (Must_Not_Freeze);
8939 pragma Inline (Must_Not_Override);
8940 pragma Inline (Must_Override);
8941 pragma Inline (Name);
8942 pragma Inline (Names);
8943 pragma Inline (Next_Entity);
8944 pragma Inline (Next_Named_Actual);
8945 pragma Inline (Next_Rep_Item);
8946 pragma Inline (Next_Use_Clause);
8947 pragma Inline (No_Ctrl_Actions);
8948 pragma Inline (No_Elaboration_Check);
8949 pragma Inline (No_Entities_Ref_In_Spec);
8950 pragma Inline (No_Initialization);
8951 pragma Inline (No_Truncation);
8952 pragma Inline (Null_Present);
8953 pragma Inline (Null_Exclusion_Present);
8954 pragma Inline (Null_Record_Present);
8955 pragma Inline (Object_Definition);
8956 pragma Inline (Original_Discriminant);
8957 pragma Inline (Original_Entity);
8958 pragma Inline (Others_Discrete_Choices);
8959 pragma Inline (Out_Present);
8960 pragma Inline (Parameter_Associations);
8961 pragma Inline (Parameter_Specifications);
8962 pragma Inline (Parameter_List_Truncated);
8963 pragma Inline (Parameter_Type);
8964 pragma Inline (Parent_Spec);
8965 pragma Inline (Position);
8966 pragma Inline (Pragma_Argument_Associations);
8967 pragma Inline (Pragmas_After);
8968 pragma Inline (Pragmas_Before);
8969 pragma Inline (Prefix);
8970 pragma Inline (Present_Expr);
8971 pragma Inline (Prev_Ids);
8972 pragma Inline (Print_In_Hex);
8973 pragma Inline (Private_Declarations);
8974 pragma Inline (Private_Present);
8975 pragma Inline (Procedure_To_Call);
8976 pragma Inline (Proper_Body);
8977 pragma Inline (Protected_Definition);
8978 pragma Inline (Protected_Present);
8979 pragma Inline (Raises_Constraint_Error);
8980 pragma Inline (Range_Constraint);
8981 pragma Inline (Range_Expression);
8982 pragma Inline (Real_Range_Specification);
8983 pragma Inline (Realval);
8984 pragma Inline (Reason);
8985 pragma Inline (Record_Extension_Part);
8986 pragma Inline (Redundant_Use);
8987 pragma Inline (Result_Definition);
8988 pragma Inline (Return_Type);
8989 pragma Inline (Reverse_Present);
8990 pragma Inline (Right_Opnd);
8991 pragma Inline (Rounded_Result);
8992 pragma Inline (Scope);
8993 pragma Inline (Select_Alternatives);
8994 pragma Inline (Selector_Name);
8995 pragma Inline (Selector_Names);
8996 pragma Inline (Shift_Count_OK);
8997 pragma Inline (Source_Type);
8998 pragma Inline (Specification);
8999 pragma Inline (Statements);
9000 pragma Inline (Static_Processing_OK);
9001 pragma Inline (Storage_Pool);
9002 pragma Inline (Strval);
9003 pragma Inline (Subtype_Indication);
9004 pragma Inline (Subtype_Mark);
9005 pragma Inline (Subtype_Marks);
9006 pragma Inline (Synchronized_Present);
9007 pragma Inline (Tagged_Present);
9008 pragma Inline (Target_Type);
9009 pragma Inline (Task_Definition);
9010 pragma Inline (Task_Present);
9011 pragma Inline (Then_Actions);
9012 pragma Inline (Then_Statements);
9013 pragma Inline (Triggering_Alternative);
9014 pragma Inline (Triggering_Statement);
9015 pragma Inline (Treat_Fixed_As_Integer);
9016 pragma Inline (TSS_Elist);
9017 pragma Inline (Type_Definition);
9018 pragma Inline (Unit);
9019 pragma Inline (Unknown_Discriminants_Present);
9020 pragma Inline (Unreferenced_In_Spec);
9021 pragma Inline (Variant_Part);
9022 pragma Inline (Variants);
9023 pragma Inline (Visible_Declarations);
9024 pragma Inline (Was_Originally_Stub);
9025 pragma Inline (Zero_Cost_Handling);
9027 pragma Inline (Set_ABE_Is_Certain);
9028 pragma Inline (Set_Abort_Present);
9029 pragma Inline (Set_Abortable_Part);
9030 pragma Inline (Set_Abstract_Present);
9031 pragma Inline (Set_Accept_Handler_Records);
9032 pragma Inline (Set_Accept_Statement);
9033 pragma Inline (Set_Access_Definition);
9034 pragma Inline (Set_Access_To_Subprogram_Definition);
9035 pragma Inline (Set_Access_Types_To_Process);
9036 pragma Inline (Set_Actions);
9037 pragma Inline (Set_Activation_Chain_Entity);
9038 pragma Inline (Set_Acts_As_Spec);
9039 pragma Inline (Set_Actual_Designated_Subtype);
9040 pragma Inline (Set_Aggregate_Bounds);
9041 pragma Inline (Set_Aliased_Present);
9042 pragma Inline (Set_All_Others);
9043 pragma Inline (Set_All_Present);
9044 pragma Inline (Set_Alternatives);
9045 pragma Inline (Set_Ancestor_Part);
9046 pragma Inline (Set_Array_Aggregate);
9047 pragma Inline (Set_Assignment_OK);
9048 pragma Inline (Set_Associated_Node);
9049 pragma Inline (Set_At_End_Proc);
9050 pragma Inline (Set_Attribute_Name);
9051 pragma Inline (Set_Aux_Decls_Node);
9052 pragma Inline (Set_Backwards_OK);
9053 pragma Inline (Set_Bad_Is_Detected);
9054 pragma Inline (Set_Body_To_Inline);
9055 pragma Inline (Set_Body_Required);
9056 pragma Inline (Set_By_Ref);
9057 pragma Inline (Set_Box_Present);
9058 pragma Inline (Set_Char_Literal_Value);
9059 pragma Inline (Set_Chars);
9060 pragma Inline (Set_Check_Address_Alignment);
9061 pragma Inline (Set_Choice_Parameter);
9062 pragma Inline (Set_Choices);
9063 pragma Inline (Set_Compile_Time_Known_Aggregate);
9064 pragma Inline (Set_Component_Associations);
9065 pragma Inline (Set_Component_Clauses);
9066 pragma Inline (Set_Component_Definition);
9067 pragma Inline (Set_Component_Items);
9068 pragma Inline (Set_Component_List);
9069 pragma Inline (Set_Component_Name);
9070 pragma Inline (Set_Condition);
9071 pragma Inline (Set_Condition_Actions);
9072 pragma Inline (Set_Config_Pragmas);
9073 pragma Inline (Set_Constant_Present);
9074 pragma Inline (Set_Constraint);
9075 pragma Inline (Set_Constraints);
9076 pragma Inline (Set_Context_Installed);
9077 pragma Inline (Set_Context_Items);
9078 pragma Inline (Set_Controlling_Argument);
9079 pragma Inline (Set_Conversion_OK);
9080 pragma Inline (Set_Corresponding_Body);
9081 pragma Inline (Set_Corresponding_Formal_Spec);
9082 pragma Inline (Set_Corresponding_Generic_Association);
9083 pragma Inline (Set_Corresponding_Integer_Value);
9084 pragma Inline (Set_Corresponding_Spec);
9085 pragma Inline (Set_Corresponding_Stub);
9086 pragma Inline (Set_Dcheck_Function);
9087 pragma Inline (Set_Debug_Statement);
9088 pragma Inline (Set_Declarations);
9089 pragma Inline (Set_Default_Expression);
9090 pragma Inline (Set_Default_Name);
9091 pragma Inline (Set_Defining_Identifier);
9092 pragma Inline (Set_Defining_Unit_Name);
9093 pragma Inline (Set_Delay_Alternative);
9094 pragma Inline (Set_Delay_Finalize_Attach);
9095 pragma Inline (Set_Delay_Statement);
9096 pragma Inline (Set_Delta_Expression);
9097 pragma Inline (Set_Digits_Expression);
9098 pragma Inline (Set_Discr_Check_Funcs_Built);
9099 pragma Inline (Set_Discrete_Choices);
9100 pragma Inline (Set_Discrete_Range);
9101 pragma Inline (Set_Discrete_Subtype_Definition);
9102 pragma Inline (Set_Discrete_Subtype_Definitions);
9103 pragma Inline (Set_Discriminant_Specifications);
9104 pragma Inline (Set_Discriminant_Type);
9105 pragma Inline (Set_Do_Accessibility_Check);
9106 pragma Inline (Set_Do_Discriminant_Check);
9107 pragma Inline (Set_Do_Length_Check);
9108 pragma Inline (Set_Do_Division_Check);
9109 pragma Inline (Set_Do_Overflow_Check);
9110 pragma Inline (Set_Do_Range_Check);
9111 pragma Inline (Set_Do_Storage_Check);
9112 pragma Inline (Set_Do_Tag_Check);
9113 pragma Inline (Set_Elaborate_Present);
9114 pragma Inline (Set_Elaborate_All_Desirable);
9115 pragma Inline (Set_Elaborate_All_Present);
9116 pragma Inline (Set_Elaborate_Desirable);
9117 pragma Inline (Set_Elaboration_Boolean);
9118 pragma Inline (Set_Else_Actions);
9119 pragma Inline (Set_Else_Statements);
9120 pragma Inline (Set_Elsif_Parts);
9121 pragma Inline (Set_Enclosing_Variant);
9122 pragma Inline (Set_End_Label);
9123 pragma Inline (Set_End_Span);
9124 pragma Inline (Set_Entity);
9125 pragma Inline (Set_Entry_Body_Formal_Part);
9126 pragma Inline (Set_Entry_Call_Alternative);
9127 pragma Inline (Set_Entry_Call_Statement);
9128 pragma Inline (Set_Entry_Direct_Name);
9129 pragma Inline (Set_Entry_Index);
9130 pragma Inline (Set_Entry_Index_Specification);
9131 pragma Inline (Set_Etype);
9132 pragma Inline (Set_Exception_Choices);
9133 pragma Inline (Set_Exception_Junk);
9134 pragma Inline (Set_Exception_Handlers);
9135 pragma Inline (Set_Expansion_Delayed);
9136 pragma Inline (Set_Explicit_Actual_Parameter);
9137 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
9138 pragma Inline (Set_Expression);
9139 pragma Inline (Set_Expressions);
9140 pragma Inline (Set_First_Bit);
9141 pragma Inline (Set_First_Inlined_Subprogram);
9142 pragma Inline (Set_First_Name);
9143 pragma Inline (Set_First_Named_Actual);
9144 pragma Inline (Set_First_Real_Statement);
9145 pragma Inline (Set_First_Subtype_Link);
9146 pragma Inline (Set_Float_Truncate);
9147 pragma Inline (Set_Formal_Type_Definition);
9148 pragma Inline (Set_Forwards_OK);
9149 pragma Inline (Set_From_At_Mod);
9150 pragma Inline (Set_From_Default);
9151 pragma Inline (Set_Generic_Associations);
9152 pragma Inline (Set_Generic_Formal_Declarations);
9153 pragma Inline (Set_Generic_Parent);
9154 pragma Inline (Set_Generic_Parent_Type);
9155 pragma Inline (Set_Handled_Statement_Sequence);
9156 pragma Inline (Set_Handler_List_Entry);
9157 pragma Inline (Set_Has_Created_Identifier);
9158 pragma Inline (Set_Has_Dynamic_Length_Check);
9159 pragma Inline (Set_Has_Dynamic_Range_Check);
9160 pragma Inline (Set_Has_No_Elaboration_Code);
9161 pragma Inline (Set_Has_Priority_Pragma);
9162 pragma Inline (Set_Has_Private_View);
9163 pragma Inline (Set_Has_Storage_Size_Pragma);
9164 pragma Inline (Set_Has_Task_Info_Pragma);
9165 pragma Inline (Set_Has_Task_Name_Pragma);
9166 pragma Inline (Set_Has_Wide_Character);
9167 pragma Inline (Set_Hidden_By_Use_Clause);
9168 pragma Inline (Set_High_Bound);
9169 pragma Inline (Set_Identifier);
9170 pragma Inline (Set_Implicit_With);
9171 pragma Inline (Set_Includes_Infinities);
9172 pragma Inline (Set_Interface_List);
9173 pragma Inline (Set_Interface_Present);
9174 pragma Inline (Set_In_Present);
9175 pragma Inline (Set_Instance_Spec);
9176 pragma Inline (Set_Intval);
9177 pragma Inline (Set_Is_Asynchronous_Call_Block);
9178 pragma Inline (Set_Is_Component_Left_Opnd);
9179 pragma Inline (Set_Is_Component_Right_Opnd);
9180 pragma Inline (Set_Is_Controlling_Actual);
9181 pragma Inline (Set_Is_In_Discriminant_Check);
9182 pragma Inline (Set_Is_Machine_Number);
9183 pragma Inline (Set_Is_Null_Loop);
9184 pragma Inline (Set_Is_Overloaded);
9185 pragma Inline (Set_Is_Power_Of_2_For_Shift);
9186 pragma Inline (Set_Is_Protected_Subprogram_Body);
9187 pragma Inline (Set_Is_Static_Expression);
9188 pragma Inline (Set_Is_Subprogram_Descriptor);
9189 pragma Inline (Set_Is_Task_Allocation_Block);
9190 pragma Inline (Set_Is_Task_Master);
9191 pragma Inline (Set_Iteration_Scheme);
9192 pragma Inline (Set_Itype);
9193 pragma Inline (Set_Kill_Range_Check);
9194 pragma Inline (Set_Last_Bit);
9195 pragma Inline (Set_Last_Name);
9196 pragma Inline (Set_Library_Unit);
9197 pragma Inline (Set_Label_Construct);
9198 pragma Inline (Set_Left_Opnd);
9199 pragma Inline (Set_Limited_View_Installed);
9200 pragma Inline (Set_Limited_Present);
9201 pragma Inline (Set_Literals);
9202 pragma Inline (Set_Loop_Actions);
9203 pragma Inline (Set_Loop_Parameter_Specification);
9204 pragma Inline (Set_Low_Bound);
9205 pragma Inline (Set_Mod_Clause);
9206 pragma Inline (Set_More_Ids);
9207 pragma Inline (Set_Must_Be_Byte_Aligned);
9208 pragma Inline (Set_Must_Not_Freeze);
9209 pragma Inline (Set_Must_Not_Override);
9210 pragma Inline (Set_Must_Override);
9211 pragma Inline (Set_Name);
9212 pragma Inline (Set_Names);
9213 pragma Inline (Set_Next_Entity);
9214 pragma Inline (Set_Next_Named_Actual);
9215 pragma Inline (Set_Next_Use_Clause);
9216 pragma Inline (Set_No_Ctrl_Actions);
9217 pragma Inline (Set_No_Elaboration_Check);
9218 pragma Inline (Set_No_Entities_Ref_In_Spec);
9219 pragma Inline (Set_No_Initialization);
9220 pragma Inline (Set_No_Truncation);
9221 pragma Inline (Set_Null_Present);
9222 pragma Inline (Set_Null_Exclusion_Present);
9223 pragma Inline (Set_Null_Record_Present);
9224 pragma Inline (Set_Object_Definition);
9225 pragma Inline (Set_Original_Discriminant);
9226 pragma Inline (Set_Original_Entity);
9227 pragma Inline (Set_Others_Discrete_Choices);
9228 pragma Inline (Set_Out_Present);
9229 pragma Inline (Set_Parameter_Associations);
9230 pragma Inline (Set_Parameter_Specifications);
9231 pragma Inline (Set_Parameter_List_Truncated);
9232 pragma Inline (Set_Parameter_Type);
9233 pragma Inline (Set_Parent_Spec);
9234 pragma Inline (Set_Position);
9235 pragma Inline (Set_Pragma_Argument_Associations);
9236 pragma Inline (Set_Pragmas_After);
9237 pragma Inline (Set_Pragmas_Before);
9238 pragma Inline (Set_Prefix);
9239 pragma Inline (Set_Present_Expr);
9240 pragma Inline (Set_Prev_Ids);
9241 pragma Inline (Set_Print_In_Hex);
9242 pragma Inline (Set_Private_Declarations);
9243 pragma Inline (Set_Private_Present);
9244 pragma Inline (Set_Procedure_To_Call);
9245 pragma Inline (Set_Proper_Body);
9246 pragma Inline (Set_Protected_Definition);
9247 pragma Inline (Set_Protected_Present);
9248 pragma Inline (Set_Raises_Constraint_Error);
9249 pragma Inline (Set_Range_Constraint);
9250 pragma Inline (Set_Range_Expression);
9251 pragma Inline (Set_Real_Range_Specification);
9252 pragma Inline (Set_Realval);
9253 pragma Inline (Set_Reason);
9254 pragma Inline (Set_Record_Extension_Part);
9255 pragma Inline (Set_Redundant_Use);
9256 pragma Inline (Set_Result_Definition);
9257 pragma Inline (Set_Return_Type);
9258 pragma Inline (Set_Reverse_Present);
9259 pragma Inline (Set_Right_Opnd);
9260 pragma Inline (Set_Rounded_Result);
9261 pragma Inline (Set_Scope);
9262 pragma Inline (Set_Select_Alternatives);
9263 pragma Inline (Set_Selector_Name);
9264 pragma Inline (Set_Selector_Names);
9265 pragma Inline (Set_Shift_Count_OK);
9266 pragma Inline (Set_Source_Type);
9267 pragma Inline (Set_Specification);
9268 pragma Inline (Set_Statements);
9269 pragma Inline (Set_Static_Processing_OK);
9270 pragma Inline (Set_Storage_Pool);
9271 pragma Inline (Set_Strval);
9272 pragma Inline (Set_Subtype_Indication);
9273 pragma Inline (Set_Subtype_Mark);
9274 pragma Inline (Set_Subtype_Marks);
9275 pragma Inline (Set_Synchronized_Present);
9276 pragma Inline (Set_Tagged_Present);
9277 pragma Inline (Set_Target_Type);
9278 pragma Inline (Set_Task_Definition);
9279 pragma Inline (Set_Task_Present);
9280 pragma Inline (Set_Then_Actions);
9281 pragma Inline (Set_Then_Statements);
9282 pragma Inline (Set_Triggering_Alternative);
9283 pragma Inline (Set_Triggering_Statement);
9284 pragma Inline (Set_Treat_Fixed_As_Integer);
9285 pragma Inline (Set_TSS_Elist);
9286 pragma Inline (Set_Type_Definition);
9287 pragma Inline (Set_Unit);
9288 pragma Inline (Set_Unknown_Discriminants_Present);
9289 pragma Inline (Set_Unreferenced_In_Spec);
9290 pragma Inline (Set_Variant_Part);
9291 pragma Inline (Set_Variants);
9292 pragma Inline (Set_Visible_Declarations);
9293 pragma Inline (Set_Was_Originally_Stub);
9294 pragma Inline (Set_Zero_Cost_Handling);
9296 end Sinfo;