scng.adb: Minor reformattting
[gcc.git] / gcc / ada / sinfo.ads
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S I N F O --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
30 ------------------------------------------------------------------------------
31
32 -- This package defines the structure of the abstract syntax tree. The Tree
33 -- package provides a basic tree structure. Sinfo describes how this structure
34 -- is used to represent the syntax of an Ada program.
35
36 -- The grammar in the RM is followed very closely in the tree design, and is
37 -- repeated as part of this source file.
38
39 -- The tree contains not only the full syntactic representation of the
40 -- program, but also the results of semantic analysis. In particular, the
41 -- nodes for defining identifiers, defining character literals and defining
42 -- operator symbols, collectively referred to as entities, represent what
43 -- would normally be regarded as the symbol table information. In addition a
44 -- number of the tree nodes contain semantic information.
45
46 -- WARNING: Several files are automatically generated from this package.
47 -- See below for details.
48
49 with Namet; use Namet;
50 with Types; use Types;
51 with Uintp; use Uintp;
52 with Urealp; use Urealp;
53
54 package Sinfo is
55
56 ---------------------------------
57 -- Making Changes to This File --
58 ---------------------------------
59
60 -- If changes are made to this file, a number of related steps must be
61 -- carried out to ensure consistency. First, if a field access function is
62 -- added, it appears in seven places:
63
64 -- The documentation associated with the node
65 -- The spec of the access function in sinfo.ads
66 -- The body of the access function in sinfo.adb
67 -- The pragma Inline at the end of sinfo.ads for the access function
68 -- The spec of the set procedure in sinfo.ads
69 -- The body of the set procedure in sinfo.adb
70 -- The pragma Inline at the end of sinfo.ads for the set procedure
71
72 -- The field chosen must be consistent in all places, and, for a node that
73 -- is a subexpression, must not overlap any of the standard expression
74 -- fields.
75
76 -- In addition, if any of the standard expression fields is changed, then
77 -- the utility program which creates the Treeprs spec (in file treeprs.ads)
78 -- must be updated appropriately, since it special cases expression fields.
79
80 -- If a new tree node is added, then the following changes are made
81
82 -- Add it to the documentation in the appropriate place
83 -- Add its fields to this documentation section
84 -- Define it in the appropriate classification in Node_Kind
85 -- In the body (sinfo), add entries to the access functions for all
86 -- its fields (except standard expression fields) to include the new
87 -- node in the checks.
88 -- Add an appropriate section to the case statement in sprint.adb
89 -- Add an appropriate section to the case statement in sem.adb
90 -- Add an appropriate section to the case statement in exp_util.adb
91 -- (Insert_Actions procedure)
92 -- For a subexpression, add an appropriate section to the case
93 -- statement in sem_eval.adb
94 -- For a subexpression, add an appropriate section to the case
95 -- statement in sem_res.adb
96
97 -- Finally, four utility programs must be run:
98
99 -- Run CSinfo to check that you have made the changes consistently. It
100 -- checks most of the rules given above, with clear error messages. This
101 -- utility reads sinfo.ads and sinfo.adb and generates a report to
102 -- standard output.
103
104 -- Run XSinfo to create sinfo.h, the corresponding C header. This
105 -- utility reads sinfo.ads and generates sinfo.h. Note that it does
106 -- not need to read sinfo.adb, since the contents of the body are
107 -- algorithmically determinable from the spec.
108
109 -- Run XTreeprs to create treeprs.ads, an updated version of the module
110 -- that is used to drive the tree print routine. This utility reads (but
111 -- does not modify) treeprs.adt, the template that provides the basic
112 -- structure of the file, and then fills in the data from the comments
113 -- in sinfo.ads.
114
115 -- Run XNmake to create nmake.ads and nmake.adb, the package body and
116 -- spec of the Nmake package which contains functions for constructing
117 -- nodes.
118
119 -- All of the above steps except CSinfo are done automatically by the
120 -- build scripts when you do a full bootstrap.
121
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.
125
126 --------------------------------
127 -- Implicit Nodes in the Tree --
128 --------------------------------
129
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:
134
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.
142
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.
148
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.
152
153 -------------------------------------------
154 -- Handling of Defining Identifier Lists --
155 -------------------------------------------
156
157 -- In several declarative forms in the syntax, lists of defining
158 -- identifiers appear (object declarations, component declarations, number
159 -- declarations etc.)
160
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).
164
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.
174
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.
178
179 -----------------------
180 -- Use of Node Lists --
181 -----------------------
182
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.
190
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.
194
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:
198
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;
206
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.
210
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.
216
217 -------------
218 -- Pragmas --
219 -------------
220
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.
224
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.
230
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.
235
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.
240
241 -- In the case of the variants list, we can either write:
242
243 -- Variant := First (Variants (N));
244 -- while Present (Variant) loop
245 -- ...
246 -- Variant := Next (Variant);
247 -- end loop;
248
249 -- or
250
251 -- Variant := First_Non_Pragma (Variants (N));
252 -- while Present (Variant) loop
253 -- ...
254 -- Variant := Next_Non_Pragma (Variant);
255 -- end loop;
256
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.
260
261 ---------------------
262 -- Optional Fields --
263 ---------------------
264
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.
274
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.
281
282 -----------------------------------
283 -- Note on Body/Spec Terminology --
284 -----------------------------------
285
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.
295
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.
302
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.
306
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.
311
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.
316
317 -- So, to summarize:
318
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.
323
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.
329
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.
334
335 -- This convention is followed throughout the GNAT documentation
336 -- both internal and external, and in all error message text.
337
338 ------------------------
339 -- Internal Use Nodes --
340 ------------------------
341
342 -- These are Node_Kind settings used in the internal implementation which
343 -- are not logically part of the specification.
344
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).
349
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).
356
357 -----------------------------------------
358 -- Note on the settings of Sloc fields --
359 -----------------------------------------
360
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.
368
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.
372
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.
378
379 -----------------------
380 -- Field Definitions --
381 -----------------------
382
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 identifiers, 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.
388
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:
393
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.
397
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.
406
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.
414
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
425
426 -- Note: see under (EXPRESSION) for further details on the use of
427 -- the Paren_Count field to record the number of parentheses levels.
428
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.
437
438 -----------------------
439 -- Gigi Restrictions --
440 -----------------------
441
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.
447
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.
451
452 ------------------------
453 -- Common Flag Fields --
454 ------------------------
455
456 -- The following flag fields appear in all nodes
457
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.
463
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.
469
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.
475
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.
481
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.
487
488 -- Has_Local_Raise (Flag8-Sem)
489 -- Present in exception handler nodes. Set if the handler can be entered
490 -- via a local raise that gets transformed to a goto statement. This will
491 -- always be set if Local_Raise_Statements is non-empty, but can also be
492 -- set as a result of generation of N_Raise_xxx nodes, or flags set in
493 -- nodes requiring generation of back end checks.
494
495 ------------------------------------
496 -- Description of Semantic Fields --
497 ------------------------------------
498
499 -- The meaning of the syntactic fields is generally clear from their names
500 -- without any further description, since the names are chosen to
501 -- correspond very closely to the syntax in the reference manual. This
502 -- section describes the usage of the semantic fields, which are used to
503 -- contain additional information determined during semantic analysis.
504
505 -- ABE_Is_Certain (Flag18-Sem)
506 -- This flag is set in an instantiation node or a call node is determined
507 -- to be sure to raise an ABE. This is used to trigger special handling
508 -- of such cases, particularly in the instantiation case where we avoid
509 -- instantiating the body if this flag is set. This flag is also present
510 -- in an N_Formal_Package_Declaration_Node since formal package
511 -- declarations are treated like instantiations, but it is always set to
512 -- False in this context.
513
514 -- Accept_Handler_Records (List5-Sem)
515 -- This field is present only in an N_Accept_Alternative node. It is used
516 -- to temporarily hold the exception handler records from an accept
517 -- statement in a selective accept. These exception handlers will
518 -- eventually be placed in the Handler_Records list of the procedure
519 -- built for this accept (see Expand_N_Selective_Accept procedure in
520 -- Exp_Ch9 for further details).
521
522 -- Access_Types_To_Process (Elist2-Sem)
523 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
524 -- Contains the list of access types which may require specific treatment
525 -- when the nature of the type completion is completely known. An example
526 -- of such treatment is the generation of the associated_final_chain.
527
528 -- Actions (List1-Sem)
529 -- This field contains a sequence of actions that are associated with the
530 -- node holding the field. See the individual node types for details of
531 -- how this field is used, as well as the description of the specific use
532 -- for a particular node type.
533
534 -- Activation_Chain_Entity (Node3-Sem)
535 -- This is used in tree nodes representing task activators (blocks,
536 -- subprogram bodies, package declarations, and task bodies). It is
537 -- initially Empty, and then gets set to point to the entity for the
538 -- declared Activation_Chain variable when the first task is declared.
539 -- When tasks are declared in the corresponding declarative region this
540 -- entity is located by name (its name is always _Chain) and the declared
541 -- tasks are added to the chain. Note that N_Extended_Return_Statement
542 -- does not have this attribute, although it does have an activation
543 -- chain. This chain is used to store the tasks temporarily, and is not
544 -- used for activating them. On successful completion of the return
545 -- statement, the tasks are moved to the caller's chain, and the caller
546 -- activates them.
547
548 -- Acts_As_Spec (Flag4-Sem)
549 -- A flag set in the N_Subprogram_Body node for a subprogram body which
550 -- is acting as its own spec, except in the case of a library level
551 -- subprogram, in which case the flag is set on the parent compilation
552 -- unit node instead (see further description in spec of Lib package).
553 -- ??? Above note about Lib is dubious since lib.ads does not mention
554 -- Acts_As_Spec at all.
555
556 -- Actual_Designated_Subtype (Node4-Sem)
557 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
558 -- needs to known the dynamic constrained subtype of the designated
559 -- object, this attribute is set to that type. This is done for
560 -- N_Free_Statements for access-to-classwide types and access to
561 -- unconstrained packed array types, and for N_Explicit_Dereference when
562 -- the designated type is an unconstrained packed array and the
563 -- dereference is the prefix of a 'Size attribute reference.
564
565 -- Address_Warning_Posted (Flag18-Sem)
566 -- Present in N_Attribute_Definition nodes. Set to indicate that we have
567 -- posted a warning for the address clause regarding size or alignment
568 -- issues. Used to inhibit multiple redundant messages.
569
570 -- Aggregate_Bounds (Node3-Sem)
571 -- Present in array N_Aggregate nodes. If the aggregate contains
572 -- component associations this field points to an N_Range node whose
573 -- bounds give the lowest and highest discrete choice values. If the
574 -- named aggregate contains a dynamic or null choice this field is empty.
575 -- If the aggregate contains positional elements this field points to an
576 -- N_Integer_Literal node giving the number of positional elements. Note
577 -- that if the aggregate contains positional elements and an other choice
578 -- the N_Integer_Literal only accounts for the number of positional
579 -- elements.
580
581 -- All_Others (Flag11-Sem)
582 -- Present in an N_Others_Choice node. This flag is set for an others
583 -- exception where all exceptions are to be caught, even those that are
584 -- not normally handled (in particular the tasking abort signal). This
585 -- is used for translation of the at end handler into a normal exception
586 -- handler.
587
588 -- Assignment_OK (Flag15-Sem)
589 -- This flag is set in a subexpression node for an object, indicating
590 -- that the associated object can be modified, even if this would not
591 -- normally be permissible (either by direct assignment, or by being
592 -- passed as an out or in-out parameter). This is used by the expander
593 -- for a number of purposes, including initialization of constants and
594 -- limited type objects (such as tasks), setting discriminant fields,
595 -- setting tag values, etc. N_Object_Declaration nodes also have this
596 -- flag defined. Here it is used to indicate that an initialization
597 -- expression is valid, even where it would normally not be allowed
598 -- (e.g. where the type involved is limited).
599
600 -- Associated_Node (Node4-Sem)
601 -- Present in nodes that can denote an entity: identifiers, character
602 -- literals, operator symbols, expanded names, operator nodes, and
603 -- attribute reference nodes (all these nodes have an Entity field).
604 -- This field is also present in N_Aggregate, N_Selected_Component, and
605 -- N_Extension_Aggregate nodes. This field is used in generic processing
606 -- to create links between the generic template and the generic copy.
607 -- See Sem_Ch12.Get_Associated_Node for full details. Note that this
608 -- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
609 -- the normal function of Entity is not required at the point where the
610 -- Associated_Node is set. Note also, that in generic templates, this
611 -- means that the Entity field does not necessarily point to an Entity.
612 -- Since the back end is expected to ignore generic templates, this is
613 -- harmless.
614
615 -- At_End_Proc (Node1)
616 -- This field is present in an N_Handled_Sequence_Of_Statements node.
617 -- It contains an identifier reference for the cleanup procedure to be
618 -- called. See description of this node for further details.
619
620 -- Backwards_OK (Flag6-Sem)
621 -- A flag present in the N_Assignment_Statement node. It is used only
622 -- if the type being assigned is an array type, and is set if analysis
623 -- determines that it is definitely safe to do the copy backwards, i.e.
624 -- starting at the highest addressed element. This is the case if either
625 -- the operands do not overlap, or they may overlap, but if they do,
626 -- then the left operand is at a higher address than the right operand.
627 --
628 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
629 -- means that the front end could not determine that either direction is
630 -- definitely safe, and a runtime check may be required if the backend
631 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
632 -- set, it means that the front end can assure no overlap of operands.
633
634 -- Body_To_Inline (Node3-Sem)
635 -- present in subprogram declarations. Denotes analyzed but unexpanded
636 -- body of subprogram, to be used when inlining calls. Present when the
637 -- subprogram has an Inline pragma and inlining is enabled. If the
638 -- declaration is completed by a renaming_as_body, and the renamed en-
639 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
640 -- which is used directly in later calls to the original subprogram.
641
642 -- Body_Required (Flag13-Sem)
643 -- A flag that appears in the N_Compilation_Unit node indicating that
644 -- the corresponding unit requires a body. For the package case, this
645 -- indicates that a completion is required. In Ada 95, if the flag is not
646 -- set for the package case, then a body may not be present. In Ada 83,
647 -- if the flag is not set for the package case, then body is optional.
648 -- For a subprogram declaration, the flag is set except in the case where
649 -- a pragma Import or Interface applies, in which case no body is
650 -- permitted (in Ada 83 or Ada 95).
651
652 -- By_Ref (Flag5-Sem)
653 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
654 -- this flag is set when the returned expression is already allocated on
655 -- the secondary stack and thus the result is passed by reference rather
656 -- than copied another time.
657
658 -- Check_Address_Alignment (Flag11-Sem)
659 -- A flag present in N_Attribute_Definition clause for a 'Address
660 -- attribute definition. This flag is set if a dynamic check should be
661 -- generated at the freeze point for the entity to which this address
662 -- clause applies. The reason that we need this flag is that we want to
663 -- check for range checks being suppressed at the point where the
664 -- attribute definition clause is given, rather than testing this at the
665 -- freeze point.
666
667 -- Coextensions (Elist4-Sem)
668 -- Present in allocators nodes. Points to list of allocators for the
669 -- access discriminants of the allocated object.
670
671 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
672 -- Present in N_Simple_Return_Statement nodes. True if this node was
673 -- constructed as part of the N_Extended_Return_Statement expansion.
674 -- .
675
676 -- Compile_Time_Known_Aggregate (Flag18-Sem)
677 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
678 -- evaluated at compile time without raising constraint error. Such
679 -- aggregates can be passed as is to Gigi without any expansion. See
680 -- Sem_Aggr for the specific conditions under which an aggregate has this
681 -- flag set. See also the flag Static_Processing_OK.
682
683 -- Condition_Actions (List3-Sem)
684 -- This field appears in else-if nodes and in the iteration scheme node
685 -- for while loops. This field is only used during semantic processing to
686 -- temporarily hold actions inserted into the tree. In the tree passed
687 -- to gigi, the condition actions field is always set to No_List. For
688 -- details on how this field is used, see the routine Insert_Actions in
689 -- package Exp_Util, and also the expansion routines for the relevant
690 -- nodes.
691
692 -- Controlling_Argument (Node1-Sem)
693 -- This field is set in procedure and function call nodes if the call
694 -- is a dispatching call (it is Empty for a non-dispatching call). It
695 -- indicates the source of the call's controlling tag. For procedure
696 -- calls, the Controlling_Argument is one of the actuals. For function
697 -- that has a dispatching result, it is an entity in the context of the
698 -- call that can provide a tag, or else it is the tag of the root type
699 -- of the class. It can also specify a tag directly rather than being a
700 -- tagged object. The latter is needed by the implementations of AI-239
701 -- and AI-260.
702
703 -- Conversion_OK (Flag14-Sem)
704 -- A flag set on type conversion nodes to indicate that the conversion
705 -- is to be considered as being valid, even though it is the case that
706 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
707 -- Fixed_Value and Integer_Value, for internal conversions done for
708 -- fixed-point operations, and for certain conversions for calls to
709 -- initialization procedures. If Conversion_OK is set, then Etype must be
710 -- set (the analyzer assumes that Etype has been set). For the case of
711 -- fixed-point operands, it also indicates that the conversion is to be
712 -- direct conversion of the underlying integer result, with no regard to
713 -- the small operand.
714
715 -- Corresponding_Body (Node5-Sem)
716 -- This field is set in subprogram declarations, package declarations,
717 -- entry declarations of protected types, and in generic units. It
718 -- points to the defining entity for the corresponding body (NOT the
719 -- node for the body itself).
720
721 -- Corresponding_Formal_Spec (Node3-Sem)
722 -- This field is set in subprogram renaming declarations, where it points
723 -- to the defining entity for a formal subprogram in the case where the
724 -- renaming corresponds to a generic formal subprogram association in an
725 -- instantiation. The field is Empty if the renaming does not correspond
726 -- to such a formal association.
727
728 -- Corresponding_Generic_Association (Node5-Sem)
729 -- This field is defined for object declarations and object renaming
730 -- declarations. It is set for the declarations within an instance that
731 -- map generic formals to their actuals. If set, the field points to
732 -- a generic_association which is the original parent of the expression
733 -- or name appearing in the declaration. This simplifies ASIS queries.
734
735 -- Corresponding_Integer_Value (Uint4-Sem)
736 -- This field is set in real literals of fixed-point types (it is not
737 -- used for floating-point types). It contains the integer value used
738 -- to represent the fixed-point value. It is also set on the universal
739 -- real literals used to represent bounds of fixed-point base types
740 -- and their first named subtypes.
741
742 -- Corresponding_Spec (Node5-Sem)
743 -- This field is set in subprogram, package, task, and protected body
744 -- nodes, where it points to the defining entity in the corresponding
745 -- spec. The attribute is also set in N_With_Clause nodes where it points
746 -- to the defining entity for the with'ed spec, and in a subprogram
747 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
748 -- if there is no corresponding spec, as in the case of a subprogram body
749 -- that serves as its own spec.
750
751 -- Corresponding_Stub (Node3-Sem)
752 -- This field is present in an N_Subunit node. It holds the node in
753 -- the parent unit that is the stub declaration for the subunit. It is
754 -- set when analysis of the stub forces loading of the proper body. If
755 -- expansion of the proper body creates new declarative nodes, they are
756 -- inserted at the point of the corresponding_stub.
757
758 -- Dcheck_Function (Node5-Sem)
759 -- This field is present in an N_Variant node, It references the entity
760 -- for the discriminant checking function for the variant.
761
762 -- Debug_Statement (Node3)
763 -- This field is present in an N_Pragma node. It is used only for a Debug
764 -- pragma. The parameter is of the form of an expression, as required by
765 -- the pragma syntax, but is actually a procedure call. To simplify
766 -- semantic processing, the parser creates a copy of the argument
767 -- rearranged into a procedure call statement and places it in the
768 -- Debug_Statement field. Note that this field is considered syntactic
769 -- field, since it is created by the parser.
770
771 -- Default_Expression (Node5-Sem)
772 -- This field is Empty if there is no default expression. If there is a
773 -- simple default expression (one with no side effects), then this field
774 -- simply contains a copy of the Expression field (both point to the tree
775 -- for the default expression). Default_Expression is used for
776 -- conformance checking.
777
778 -- Discr_Check_Funcs_Built (Flag11-Sem)
779 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
780 -- discriminant checking functions are constructed. The purpose is to
781 -- avoid attempting to set these functions more than once.
782
783 -- Do_Accessibility_Check (Flag13-Sem)
784 -- This flag is set on N_Parameter_Specification nodes to indicate
785 -- that an accessibility check is required for the parameter. It is
786 -- not yet decided who takes care of this check (TBD ???).
787
788 -- Do_Discriminant_Check (Flag13-Sem)
789 -- This flag is set on N_Selected_Component nodes to indicate that a
790 -- discriminant check is required using the discriminant check routine
791 -- associated with the selector. The actual check is generated by the
792 -- expander when processing selected components.
793
794 -- Do_Division_Check (Flag13-Sem)
795 -- This flag is set on a division operator (/ mod rem) to indicate
796 -- that a zero divide check is required. The actual check is dealt
797 -- with by the backend (all the front end does is to set the flag).
798
799 -- Do_Length_Check (Flag4-Sem)
800 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
801 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
802 -- is required. It is not determined who deals with this flag (???).
803
804 -- Do_Overflow_Check (Flag17-Sem)
805 -- This flag is set on an operator where an overflow check is required on
806 -- the operation. The actual check is dealt with by the backend (all the
807 -- front end does is to set the flag). The other cases where this flag is
808 -- used is on a Type_Conversion node and for attribute reference nodes.
809 -- For a type conversion, it means that the conversion is from one base
810 -- type to another, and the value may not fit in the target base type.
811 -- See also the description of Do_Range_Check for this case. The only
812 -- attribute references which use this flag are Pred and Succ, where it
813 -- means that the result should be checked for going outside the base
814 -- range. Note that this flag is not set for modular types.
815
816 -- Do_Range_Check (Flag9-Sem)
817 -- This flag is set on an expression which appears in a context where a
818 -- range check is required. The target type is clear from the context.
819 -- The contexts in which this flag can appear are the following:
820
821 -- Right side of an assignment. In this case the target type is
822 -- taken from the left side of the assignment, which is referenced
823 -- by the Name of the N_Assignment_Statement node.
824
825 -- Subscript expressions in an indexed component. In this case the
826 -- target type is determined from the type of the array, which is
827 -- referenced by the Prefix of the N_Indexed_Component node.
828
829 -- Argument expression for a parameter, appearing either directly in
830 -- the Parameter_Associations list of a call or as the Expression of an
831 -- N_Parameter_Association node that appears in this list. In either
832 -- case, the check is against the type of the formal. Note that the
833 -- flag is relevant only in IN and IN OUT parameters, and will be
834 -- ignored for OUT parameters, where no check is required in the call,
835 -- and if a check is required on the return, it is generated explicitly
836 -- with a type conversion.
837
838 -- Initialization expression for the initial value in an object
839 -- declaration. In this case the Do_Range_Check flag is set on
840 -- the initialization expression, and the check is against the
841 -- range of the type of the object being declared.
842
843 -- The expression of a type conversion. In this case the range check is
844 -- against the target type of the conversion. See also the use of
845 -- Do_Overflow_Check on a type conversion. The distinction is that the
846 -- overflow check protects against a value that is outside the range of
847 -- the target base type, whereas a range check checks that the
848 -- resulting value (which is a value of the base type of the target
849 -- type), satisfies the range constraint of the target type.
850
851 -- Note: when a range check is required in contexts other than those
852 -- listed above (e.g. in a return statement), an additional type
853 -- conversion node is introduced to represent the required check.
854
855 -- Do_Storage_Check (Flag17-Sem)
856 -- This flag is set in an N_Allocator node to indicate that a storage
857 -- check is required for the allocation, or in an N_Subprogram_Body node
858 -- to indicate that a stack check is required in the subprogram prolog.
859 -- The N_Allocator case is handled by the routine that expands the call
860 -- to the runtime routine. The N_Subprogram_Body case is handled by the
861 -- backend, and all the semantics does is set the flag.
862
863 -- Do_Tag_Check (Flag13-Sem)
864 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
865 -- N_Procedure_Call_Statement, N_Type_Conversion,
866 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
867 -- node to indicate that the tag check can be suppressed. It is not
868 -- yet decided how this flag is used (TBD ???).
869
870 -- Elaborate_Present (Flag4-Sem)
871 -- This flag is set in the N_With_Clause node to indicate that pragma
872 -- Elaborate pragma appears for the with'ed units.
873
874 -- Elaborate_All_Desirable (Flag9-Sem)
875 -- This flag is set in the N_With_Clause mode to indicate that the static
876 -- elaboration processing has determined that an Elaborate_All pragma is
877 -- desirable for correct elaboration for this unit.
878
879 -- Elaborate_All_Present (Flag14-Sem)
880 -- This flag is set in the N_With_Clause node to indicate that a
881 -- pragma Elaborate_All pragma appears for the with'ed units.
882
883 -- Elaborate_Desirable (Flag11-Sem)
884 -- This flag is set in the N_With_Clause mode to indicate that the static
885 -- elaboration processing has determined that an Elaborate pragma is
886 -- desirable for correct elaboration for this unit.
887
888 -- Elaboration_Boolean (Node2-Sem)
889 -- This field is present in function and procedure specification nodes.
890 -- If set, it points to the entity for a Boolean flag that must be tested
891 -- for certain calls to check for access before elaboration. See body of
892 -- Sem_Elab for further details. This field is Empty if no elaboration
893 -- boolean is required.
894
895 -- Else_Actions (List3-Sem)
896 -- This field is present in conditional expression nodes. During code
897 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
898 -- actions at an appropriate place in the tree to get elaborated at the
899 -- right time. For conditional expressions, we have to be sure that the
900 -- actions for the Else branch are only elaborated if the condition is
901 -- False. The Else_Actions field is used as a temporary parking place for
902 -- these actions. The final tree is always rewritten to eliminate the
903 -- need for this field, so in the tree passed to Gigi, this field is
904 -- always set to No_List.
905
906 -- Enclosing_Variant (Node2-Sem)
907 -- This field is present in the N_Variant node and identifies the Node_Id
908 -- corresponding to the immediately enclosing variant when the variant is
909 -- nested, and N_Empty otherwise. Set during semantic processing of the
910 -- variant part of a record type.
911
912 -- Entity (Node4-Sem)
913 -- Appears in all direct names (identifiers, character literals, and
914 -- operator symbols), as well as expanded names, and attributes that
915 -- denote entities, such as 'Class. Points to entity for corresponding
916 -- defining occurrence. Set after name resolution. For identifiers in a
917 -- WITH list, the corresponding defining occurrence is in a separately
918 -- compiled file, and Entity must be set by the library Load procedure.
919 --
920 -- Note: During name resolution, the value in Entity may be temporarily
921 -- incorrect (e.g. during overload resolution, Entity is initially set to
922 -- the first possible correct interpretation, and then later modified if
923 -- necessary to contain the correct value after resolution).
924 --
925 -- Note: This field overlaps Associated_Node, which is used during
926 -- generic processing (see Sem_Ch12 for details). Note also that in
927 -- generic templates, this means that the Entity field does not always
928 -- point to an Entity. Since the back end is expected to ignore generic
929 -- templates, this is harmless.
930 --
931 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
932 -- It is used only for stream attributes definition clauses. In this
933 -- case, it denotes a (possibly dummy) subprogram entity that is declared
934 -- conceptually at the point of the clause. Thus the visibility of the
935 -- attribute definition clause (in the sense of 8.3(23) as amended by
936 -- AI-195) can be checked by testing the visibility of that subprogram.
937 --
938 -- Note: Normally the Entity field of an identifier points to the entity
939 -- for the corresponding defining identifier, and hence the Chars field
940 -- of an identifier will match the Chars field of the entity. However,
941 -- there is no requirement that these match, and there are obscure cases
942 -- of generated code where they do not match.
943
944 -- Entity_Or_Associated_Node (Node4-Sem)
945 -- A synonym for both Entity and Associated_Node. Used by convention in
946 -- the code when referencing this field in cases where it is not known
947 -- whether the field contains an Entity or an Associated_Node.
948
949 -- Etype (Node5-Sem)
950 -- Appears in all expression nodes, all direct names, and all entities.
951 -- Points to the entity for the related type. Set after type resolution.
952 -- Normally this is the actual subtype of the expression. However, in
953 -- certain contexts such as the right side of an assignment, subscripts,
954 -- arguments to calls, returned value in a function, initial value etc.
955 -- it is the desired target type. In the event that this is different
956 -- from the actual type, the Do_Range_Check flag will be set if a range
957 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
958 -- points to an essentially arbitrary choice from the possible set of
959 -- types.
960
961 -- Exception_Junk (Flag8-Sem)
962 -- This flag is set in a various nodes appearing in a statement sequence
963 -- to indicate that the corresponding node is an artifact of the
964 -- generated code for exception handling, and should be ignored when
965 -- analyzing the control flow of the relevant sequence of statements
966 -- (e.g. to check that it does not end with a bad return statement).
967
968 -- Exception_Label (Node5-Sem)
969 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
970 -- to be used for transforming the corresponding exception into a goto,
971 -- or contains Empty, if this exception is not to be transformed. Also
972 -- appears in N_Exception_Handler nodes, where, if set, it indicates
973 -- that there may be a local raise for the handler, so that expansion
974 -- to allow a goto is required (and this field contains the label for
975 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
976
977 -- Expansion_Delayed (Flag11-Sem)
978 -- Set on aggregates and extension aggregates that need a top-down rather
979 -- than bottom-up expansion. Typically aggregate expansion happens bottom
980 -- up. For nested aggregates the expansion is delayed until the enclosing
981 -- aggregate itself is expanded, e.g. in the context of a declaration. To
982 -- delay it we set this flag. This is done to avoid creating a temporary
983 -- for each level of a nested aggregates, and also to prevent the
984 -- premature generation of constraint checks. This is also a requirement
985 -- if we want to generate the proper attachment to the internal
986 -- finalization lists (for record with controlled components). Top down
987 -- expansion of aggregates is also used for in-place array aggregate
988 -- assignment or initialization. When the full context is known, the
989 -- target of the assignment or initialization is used to generate the
990 -- left-hand side of individual assignment to each sub-component.
991
992 -- First_Inlined_Subprogram (Node3-Sem)
993 -- Present in the N_Compilation_Unit node for the main program. Points
994 -- to a chain of entities for subprograms that are to be inlined. The
995 -- Next_Inlined_Subprogram field of these entities is used as a link
996 -- pointer with Empty marking the end of the list. This field is Empty
997 -- if there are no inlined subprograms or inlining is not active.
998
999 -- First_Named_Actual (Node4-Sem)
1000 -- Present in procedure call statement and function call nodes, and also
1001 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1002 -- named parameter where parameters are ordered by declaration order (as
1003 -- opposed to the actual order in the call which may be different due to
1004 -- named associations). Note: this field points to the explicit actual
1005 -- parameter itself, not the N_Parameter_Association node (its parent).
1006
1007 -- First_Real_Statement (Node2-Sem)
1008 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
1009 -- Empty. Used only when declarations are moved into the statement part
1010 -- of a construct as a result of wrapping an AT END handler that is
1011 -- required to cover the declarations. In this case, this field is used
1012 -- to remember the location in the statements list of the first real
1013 -- statement, i.e. the statement that used to be first in the statement
1014 -- list before the declarations were prepended.
1015
1016 -- First_Subtype_Link (Node5-Sem)
1017 -- Present in N_Freeze_Entity node for an anonymous base type that is
1018 -- implicitly created by the declaration of a first subtype. It points
1019 -- to the entity for the first subtype.
1020
1021 -- Float_Truncate (Flag11-Sem)
1022 -- A flag present in type conversion nodes. This is used for float to
1023 -- integer conversions where truncation is required rather than rounding.
1024 -- Note that Gigi does not handle type conversions from real to integer
1025 -- with rounding (see Expand_N_Type_Conversion).
1026
1027 -- Forwards_OK (Flag5-Sem)
1028 -- A flag present in the N_Assignment_Statement node. It is used only
1029 -- if the type being assigned is an array type, and is set if analysis
1030 -- determines that it is definitely safe to do the copy forwards, i.e.
1031 -- starting at the lowest addressed element. This is the case if either
1032 -- the operands do not overlap, or they may overlap, but if they do,
1033 -- then the left operand is at a lower address than the right operand.
1034 --
1035 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1036 -- means that the front end could not determine that either direction is
1037 -- definitely safe, and a runtime check may be required if the backend
1038 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1039 -- set, it means that the front end can assure no overlap of operands.
1040
1041 -- From_At_End (Flag4-Sem)
1042 -- This flag is set on an N_Raise_Statement node if it corresponds to
1043 -- the reraise statement generated as the last statement of an AT END
1044 -- handler when SJLJ exception handling is active. It is used to stop
1045 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1046 -- because if the restriction is set, the reraise is not generated.
1047
1048 -- From_At_Mod (Flag4-Sem)
1049 -- This flag is set on the attribute definition clause node that is
1050 -- generated by a transformation of an at mod phrase in a record
1051 -- representation clause. This is used to give slightly different (Ada 83
1052 -- compatible) semantics to such a clause, namely it is used to specify a
1053 -- minimum acceptable alignment for the base type and all subtypes. In
1054 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1055 -- must be a multiple of the given value, and the representation clause
1056 -- is considered to be type specific instead of subtype specific.
1057
1058 -- From_Default (Flag6-Sem)
1059 -- This flag is set on the subprogram renaming declaration created in an
1060 -- instance for a formal subprogram, when the formal is declared with a
1061 -- box, and there is no explicit actual. If the flag is present, the
1062 -- declaration is treated as an implicit reference to the formal in the
1063 -- ali file.
1064
1065 -- Generic_Parent (Node5-Sem)
1066 -- Generic_Parent is defined on declaration nodes that are instances. The
1067 -- value of Generic_Parent is the generic entity from which the instance
1068 -- is obtained. Generic_Parent is also defined for the renaming
1069 -- declarations and object declarations created for the actuals in an
1070 -- instantiation. The generic parent of such a declaration is the
1071 -- corresponding generic association in the Instantiation node.
1072
1073 -- Generic_Parent_Type (Node4-Sem)
1074 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1075 -- actuals of formal private and derived types. Within the instance, the
1076 -- operations on the actual are those inherited from the parent. For a
1077 -- formal private type, the parent type is the generic type itself. The
1078 -- Generic_Parent_Type is also used in an instance to determine whether a
1079 -- private operation overrides an inherited one.
1080
1081 -- Handler_List_Entry (Node2-Sem)
1082 -- This field is present in N_Object_Declaration nodes. It is set only
1083 -- for the Handler_Record entry generated for an exception in zero cost
1084 -- exception handling mode. It references the corresponding item in the
1085 -- handler list, and is used to delete this entry if the corresponding
1086 -- handler is deleted during optimization. For further details on why
1087 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1088
1089 -- Has_No_Elaboration_Code (Flag17-Sem)
1090 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1091 -- or not elaboration code is present for this unit. It is initially set
1092 -- true for subprogram specs and bodies and for all generic units and
1093 -- false for non-generic package specs and bodies. Gigi may set the flag
1094 -- in the non-generic package case if it determines that no elaboration
1095 -- code is generated. Note that this flag is not related to the
1096 -- Is_Preelaborated status, there can be preelaborated packages that
1097 -- generate elaboration code, and non-preelaborated packages which do
1098 -- not generate elaboration code.
1099
1100 -- Has_Priority_Pragma (Flag6-Sem)
1101 -- A flag present in N_Subprogram_Body, N_Task_Definition and
1102 -- N_Protected_Definition nodes to flag the presence of either a Priority
1103 -- or Interrupt_Priority pragma in the declaration sequence (public or
1104 -- private in the task and protected cases)
1105
1106 -- Has_Private_View (Flag11-Sem)
1107 -- A flag present in generic nodes that have an entity, to indicate that
1108 -- the node has a private type. Used to exchange private and full
1109 -- declarations if the visibility at instantiation is different from the
1110 -- visibility at generic definition.
1111
1112 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1113 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1114 -- flag the presence of a pragma Relative_Deadline.
1115
1116 -- Has_Self_Reference (Flag13-Sem)
1117 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1118 -- of the expressions contains an access attribute reference to the
1119 -- enclosing type. Such a self-reference can only appear in default-
1120 -- initialized aggregate for a record type.
1121
1122 -- Has_Storage_Size_Pragma (Flag5-Sem)
1123 -- A flag present in an N_Task_Definition node to flag the presence of a
1124 -- Storage_Size pragma.
1125
1126 -- Has_Task_Info_Pragma (Flag7-Sem)
1127 -- A flag present in an N_Task_Definition node to flag the presence of a
1128 -- Task_Info pragma. Used to detect duplicate pragmas.
1129
1130 -- Has_Task_Name_Pragma (Flag8-Sem)
1131 -- A flag present in N_Task_Definition nodes to flag the presence of a
1132 -- Task_Name pragma in the declaration sequence for the task.
1133
1134 -- Has_Wide_Character (Flag11-Sem)
1135 -- Present in string literals, set if any wide character (i.e. character
1136 -- code outside the Character range) appears in the string.
1137
1138 -- Hidden_By_Use_Clause (Elist4-Sem)
1139 -- An entity list present in use clauses that appear within
1140 -- instantiations. For the resolution of local entities, entities
1141 -- introduced by these use clauses have priority over global ones, and
1142 -- outer entities must be explicitly hidden/restored on exit.
1143
1144 -- Implicit_With (Flag16-Sem)
1145 -- This flag is set in the N_With_Clause node that is implicitly
1146 -- generated for runtime units that are loaded by the expander, and also
1147 -- for package System, if it is loaded implicitly by a use of the
1148 -- 'Address or 'Tag attribute. ???There are other implicit with clauses
1149 -- as well.
1150
1151 -- Includes_Infinities (Flag11-Sem)
1152 -- This flag is present in N_Range nodes. It is set for the range of
1153 -- unconstrained float types defined in Standard, which include not only
1154 -- the given range of values, but also legitimately can include infinite
1155 -- values. This flag is false for any float type for which an explicit
1156 -- range is given by the programmer, even if that range is identical to
1157 -- the range for Float.
1158
1159 -- Instance_Spec (Node5-Sem)
1160 -- This field is present in generic instantiation nodes, and also in
1161 -- formal package declaration nodes (formal package declarations are
1162 -- treated in a manner very similar to package instantiations). It points
1163 -- to the node for the spec of the instance, inserted as part of the
1164 -- semantic processing for instantiations in Sem_Ch12.
1165
1166 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1167 -- A flag set in a Block_Statement node to indicate that it is the
1168 -- expansion of an asynchronous entry call. Such a block needs cleanup
1169 -- handler to assure that the call is cancelled.
1170
1171 -- Is_Component_Left_Opnd (Flag13-Sem)
1172 -- Is_Component_Right_Opnd (Flag14-Sem)
1173 -- Present in concatenation nodes, to indicate that the corresponding
1174 -- operand is of the component type of the result. Used in resolving
1175 -- concatenation nodes in instances.
1176
1177 -- Is_Controlling_Actual (Flag16-Sem)
1178 -- This flag is set on in an expression that is a controlling argument in
1179 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1180 -- details of its use.
1181
1182 -- Is_Dynamic_Coextension (Flag18-Sem)
1183 -- Present in allocator nodes, to indicate that this is an allocator
1184 -- for an access discriminant of a dynamically allocated object. The
1185 -- coextension must be deallocated and finalized at the same time as
1186 -- the enclosing object.
1187
1188 -- Is_Entry_Barrier_Function (Flag8-Sem)
1189 -- This flag is set in an N_Subprogram_Body node which is the expansion
1190 -- of an entry barrier from a protected entry body. It is used for the
1191 -- circuitry checking for incorrect use of Current_Task.
1192
1193 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1194 -- This flag is set in an N_Function_Call node to indicate that the extra
1195 -- actuals to support a build-in-place style of call have been added to
1196 -- the call.
1197
1198 -- Is_In_Discriminant_Check (Flag11-Sem)
1199 -- This flag is present in a selected component, and is used to indicate
1200 -- that the reference occurs within a discriminant check. The
1201 -- significance is that optimizations based on assuming that the
1202 -- discriminant check has a correct value cannot be performed in this
1203 -- case (or the discriminant check may be optimized away!)
1204
1205 -- Is_Machine_Number (Flag11-Sem)
1206 -- This flag is set in an N_Real_Literal node to indicate that the value
1207 -- is a machine number. This avoids some unnecessary cases of converting
1208 -- real literals to machine numbers.
1209
1210 -- Is_Null_Loop (Flag16-Sem)
1211 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1212 -- can be determined to be null at compile time. This is used to remove
1213 -- the loop entirely at expansion time.
1214
1215 -- Is_Overloaded (Flag5-Sem)
1216 -- A flag present in all expression nodes. Used temporarily during
1217 -- overloading determination. The setting of this flag is not relevant
1218 -- once overloading analysis is complete.
1219
1220 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1221 -- A flag present only in N_Op_Expon nodes. It is set when the
1222 -- exponentiation is of the form 2 ** N, where the type of N is an
1223 -- unsigned integral subtype whose size does not exceed the size of
1224 -- Standard_Integer (i.e. a type that can be safely converted to
1225 -- Natural), and the exponentiation appears as the right operand of an
1226 -- integer multiplication or an integer division where the dividend is
1227 -- unsigned. It is also required that overflow checking is off for both
1228 -- the exponentiation and the multiply/divide node. If this set of
1229 -- conditions holds, and the flag is set, then the division or
1230 -- multiplication can be (and is) converted to a shift.
1231
1232 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1233 -- A flag set in a Subprogram_Body block to indicate that it is the
1234 -- implementation of a protected subprogram. Such a body needs cleanup
1235 -- handler to make sure that the associated protected object is unlocked
1236 -- when the subprogram completes.
1237
1238 -- Is_Static_Coextension (Flag14-Sem)
1239 -- Present in N_Allocator nodes. Set if the allocator is a coextension
1240 -- of an object allocated on the stack rather than the heap.
1241
1242 -- Is_Static_Expression (Flag6-Sem)
1243 -- Indicates that an expression is a static expression (RM 4.9). See spec
1244 -- of package Sem_Eval for full details on the use of this flag.
1245
1246 -- Is_Subprogram_Descriptor (Flag16-Sem)
1247 -- Present in N_Object_Declaration, and set only for the object
1248 -- declaration generated for a subprogram descriptor in fast exception
1249 -- mode. See Exp_Ch11 for details of use.
1250
1251 -- Is_Task_Allocation_Block (Flag6-Sem)
1252 -- A flag set in a Block_Statement node to indicate that it is the
1253 -- expansion of a task allocator, or the allocator of an object
1254 -- containing tasks. Such a block requires a cleanup handler to call
1255 -- Expunge_Unactivated_Tasks to complete any tasks that have been
1256 -- allocated but not activated when the allocator completes abnormally.
1257
1258 -- Is_Task_Master (Flag5-Sem)
1259 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1260 -- indicate that the construct is a task master (i.e. has declared tasks
1261 -- or declares an access to a task type).
1262
1263 -- Itype (Node1-Sem)
1264 -- Used in N_Itype_Reference node to reference an itype for which it is
1265 -- important to ensure that it is defined. See description of this node
1266 -- for further details.
1267
1268 -- Kill_Range_Check (Flag11-Sem)
1269 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1270 -- result should not be subjected to range checks. This is used for the
1271 -- implementation of Normalize_Scalars.
1272
1273 -- Label_Construct (Node2-Sem)
1274 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1275 -- N_Block_Statement or N_Loop_Statement node to which the label
1276 -- declaration applies. This is not currently used in the compiler
1277 -- itself, but it is useful in the implementation of ASIS queries.
1278 -- This field is left empty for the special labels generated as part
1279 -- of expanding raise statements with a local exception handler.
1280
1281 -- Library_Unit (Node4-Sem)
1282 -- In a stub node, Library_Unit points to the compilation unit node of
1283 -- the corresponding subunit.
1284 --
1285 -- In a with clause node, Library_Unit points to the spec of the with'ed
1286 -- unit.
1287 --
1288 -- In a compilation unit node, the usage depends on the unit type:
1289 --
1290 -- For a library unit body, Library_Unit points to the compilation unit
1291 -- node of the corresponding spec, unless it's a subprogram body with
1292 -- Acts_As_Spec set, in which case it points to itself.
1293 --
1294 -- For a spec, Library_Unit points to the compilation unit node of the
1295 -- corresponding body, if present. The body will be present if the spec
1296 -- is or contains generics that we needed to instantiate. Similarly, the
1297 -- body will be present if we needed it for inlining purposes. Thus, if
1298 -- we have a spec/body pair, both of which are present, they point to
1299 -- each other via Library_Unit.
1300 --
1301 -- For a subunit, Library_Unit points to the compilation unit node of
1302 -- the parent body.
1303 --
1304 -- Note that this field is not used to hold the parent pointer for child
1305 -- unit (which might in any case need to use it for some other purpose as
1306 -- described above). Instead for a child unit, implicit with's are
1307 -- generated for all parents.
1308
1309 -- Local_Raise_Statements (Elist1)
1310 -- This field is present in exception handler nodes. It is set to
1311 -- No_Elist in the normal case. If there is at least one raise statement
1312 -- which can potentially be handled as a local raise, then this field
1313 -- points to a list of raise nodes, which are calls to a routine to raise
1314 -- an exception. These are raise nodes which can be optimized into gotos
1315 -- if the handler turns out to meet the conditions which permit this
1316 -- transformation. Note that this does NOT include instances of the
1317 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
1318 -- handled by the back end (using the N_Push/N_Pop mechanism).
1319
1320 -- Loop_Actions (List2-Sem)
1321 -- A list present in Component_Association nodes in array aggregates.
1322 -- Used to collect actions that must be executed within the loop because
1323 -- they may need to be evaluated anew each time through.
1324
1325 -- Limited_View_Installed (Flag18-Sem)
1326 -- Present in With_Clauses and in package specifications. If set on
1327 -- with_clause, it indicates that this clause has created the current
1328 -- limited view of the designated package. On a package specification, it
1329 -- indicates that the limited view has already been created because the
1330 -- package is mentioned in a limited_with_clause in the closure of the
1331 -- unit being compiled.
1332
1333 -- Local_Raise_Not_OK (Flag7-Sem)
1334 -- Present in N_Exception_Handler nodes. Set if the handler contains
1335 -- a construct (reraise statement, or call to subprogram in package
1336 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
1337 -- for a local raise (one that could otherwise be converted to a goto).
1338
1339 -- Must_Be_Byte_Aligned (Flag14-Sem)
1340 -- This flag is present in N_Attribute_Reference nodes. It can be set
1341 -- only for the Address and Unrestricted_Access attributes. If set it
1342 -- means that the object for which the address/access is given must be on
1343 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
1344 -- of the object is to be made before taking the address (this copy is in
1345 -- the current scope on the stack frame). This is used for certain cases
1346 -- of code generated by the expander that passes parameters by address.
1347 --
1348 -- The reason the copy is not made by the front end is that the back end
1349 -- has more information about type layout and may be able to (but is not
1350 -- guaranteed to) prevent making unnecessary copies.
1351
1352 -- Must_Not_Freeze (Flag8-Sem)
1353 -- A flag present in all expression nodes. Normally expressions cause
1354 -- freezing as described in the RM. If this flag is set, then this is
1355 -- inhibited. This is used by the analyzer and expander to label nodes
1356 -- that are created by semantic analysis or expansion and which must not
1357 -- cause freezing even though they normally would. This flag is also
1358 -- present in an N_Subtype_Indication node, since we also use these in
1359 -- calls to Freeze_Expression.
1360
1361 -- Next_Entity (Node2-Sem)
1362 -- Present in defining identifiers, defining character literals and
1363 -- defining operator symbols (i.e. in all entities). The entities of a
1364 -- scope are chained, and this field is used as the forward pointer for
1365 -- this list. See Einfo for further details.
1366
1367 -- Next_Implicit_With (Node3-Sem)
1368 -- Present in N_With_Clause. Part of a chain of with_clauses generated
1369 -- in rtsfind to indicate implicit dependencies on predefined units. Used
1370 -- to prevent multiple with_clauses for the same unit in a given context.
1371 -- A postorder traversal of the tree whose nodes are units and whose
1372 -- links are with_clauses defines the order in which Inspector must
1373 -- examine a compiled unit and its full context. This ordering ensures
1374 -- that any subprogram call is examined after the subprogram declartion
1375 -- has been seen.
1376
1377 -- Next_Named_Actual (Node4-Sem)
1378 -- Present in parameter association node. Set during semantic analysis to
1379 -- point to the next named parameter, where parameters are ordered by
1380 -- declaration order (as opposed to the actual order in the call, which
1381 -- may be different due to named associations). Not that this field
1382 -- points to the explicit actual parameter itself, not to the
1383 -- N_Parameter_Association node (its parent).
1384
1385 -- Next_Pragma (Node1-Sem)
1386 -- Present in N_Pragma nodes. Used to create a linked list of pragma
1387 -- nodes. Currently used for two purposes:
1388 --
1389 -- Create a list of linked Check_Policy pragmas. The head of this list
1390 -- is stored in Opt.Check_Policy_List (which has further details).
1391 --
1392 -- Used by processing for Pre/Postcondition pragmas to store a list of
1393 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
1394 -- details).
1395
1396 -- Next_Rep_Item (Node5-Sem)
1397 -- Present in pragma nodes and attribute definition nodes. Used to link
1398 -- representation items that apply to an entity. See description of
1399 -- First_Rep_Item field in Einfo for full details.
1400
1401 -- Next_Use_Clause (Node3-Sem)
1402 -- While use clauses are active during semantic processing, they are
1403 -- chained from the scope stack entry, using Next_Use_Clause as a link
1404 -- pointer, with Empty marking the end of the list. The head pointer is
1405 -- in the scope stack entry (First_Use_Clause). At the end of semantic
1406 -- processing (i.e. when Gigi sees the tree, the contents of this field
1407 -- is undefined and should not be read).
1408
1409 -- No_Ctrl_Actions (Flag7-Sem)
1410 -- Present in N_Assignment_Statement to indicate that no finalize nor
1411 -- adjust should take place on this assignment even though the rhs is
1412 -- controlled. This is used in init procs and aggregate expansions where
1413 -- the generated assignments are more initialisations than real
1414 -- assignments.
1415
1416 -- No_Elaboration_Check (Flag14-Sem)
1417 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1418 -- that no elaboration check is needed on the call, because it appears in
1419 -- the context of a local Suppress pragma. This is used on calls within
1420 -- task bodies, where the actual elaboration checks are applied after
1421 -- analysis, when the local scope stack is not present.
1422
1423 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1424 -- Present in N_With_Clause nodes. Set if the with clause is on the
1425 -- package or subprogram spec where the main unit is the corresponding
1426 -- body, and no entities of the with'ed unit are referenced by the spec
1427 -- (an entity may still be referenced in the body, so this flag is used
1428 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1429 -- full details)
1430
1431 -- No_Initialization (Flag13-Sem)
1432 -- Present in N_Object_Declaration and N_Allocator to indicate that the
1433 -- object must not be initialized (by Initialize or call to an init
1434 -- proc). This is needed for controlled aggregates. When the Object
1435 -- declaration has an expression, this flag means that this expression
1436 -- should not be taken into account (needed for in place initialization
1437 -- with aggregates).
1438
1439 -- No_Truncation (Flag17-Sem)
1440 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
1441 -- only if the RM_Size of the source is greater than the RM_Size of the
1442 -- target for scalar operands. Normally in such a case we truncate some
1443 -- higher order bits of the source, and then sign/zero extend the result
1444 -- to form the output value. But if this flag is set, then we do not do
1445 -- any truncation, so for example, if an 8 bit input is converted to 5
1446 -- bit result which is in fact stored in 8 bits, then the high order
1447 -- three bits of the target result will be copied from the source. This
1448 -- is used for properly setting out of range values for use by pragmas
1449 -- Initialize_Scalars and Normalize_Scalars.
1450
1451 -- Original_Discriminant (Node2-Sem)
1452 -- Present in identifiers. Used in references to discriminants that
1453 -- appear in generic units. Because the names of the discriminants may be
1454 -- different in an instance, we use this field to recover the position of
1455 -- the discriminant in the original type, and replace it with the
1456 -- discriminant at the same position in the instantiated type.
1457
1458 -- Original_Entity (Node2-Sem)
1459 -- Present in numeric literals. Used to denote the named number that has
1460 -- been constant-folded into the given literal. If literal is from
1461 -- source, or the result of some other constant-folding operation, then
1462 -- Original_Entity is empty. This field is needed to handle properly
1463 -- named numbers in generic units, where the Associated_Node field
1464 -- interferes with the Entity field, making it impossible to preserve the
1465 -- original entity at the point of instantiation (ASIS problem).
1466
1467 -- Others_Discrete_Choices (List1-Sem)
1468 -- When a case statement or variant is analyzed, the semantic checks
1469 -- determine the actual list of choices that correspond to an others
1470 -- choice. This list is materialized for later use by the expander and
1471 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
1472 -- this materialized list of choices, which is in standard format for a
1473 -- list of discrete choices, except that of course it cannot contain an
1474 -- N_Others_Choice entry.
1475
1476 -- Parameter_List_Truncated (Flag17-Sem)
1477 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. Set
1478 -- (for OpenVMS ports of GNAT only) if the parameter list is truncated as
1479 -- a result of a First_Optional_Parameter specification in an
1480 -- Import_Function, Import_Procedure, or Import_Valued_Procedure pragma.
1481 -- The truncation is done by the expander by removing trailing parameters
1482 -- from the argument list, in accordance with the set of rules allowing
1483 -- such parameter removal. In particular, parameters can be removed
1484 -- working from the end of the parameter list backwards up to and
1485 -- including the entry designated by First_Optional_Parameter in the
1486 -- Import pragma. Parameters can be removed if they are implicit and the
1487 -- default value is a known-at-compile-time value, including the use of
1488 -- the Null_Parameter attribute, or if explicit parameter values are
1489 -- present that match the corresponding defaults.
1490
1491 -- Parent_Spec (Node4-Sem)
1492 -- For a library unit that is a child unit spec (package or subprogram
1493 -- declaration, generic declaration or instantiation, or library level
1494 -- rename, this field points to the compilation unit node for the parent
1495 -- package specification. This field is Empty for library bodies (the
1496 -- parent spec in this case can be found from the corresponding spec).
1497
1498 -- PPC_Enabled (Flag5-Sem)
1499 -- Present in N_Pragma nodes. This flag is relevant only for precondition
1500 -- and postcondition nodes. It is true if the check corresponding to the
1501 -- pragma type is enabled at the point where the pragma appears.
1502
1503 -- Present_Expr (Uint3-Sem)
1504 -- Present in an N_Variant node. This has a meaningful value only after
1505 -- Gigi has back annotated the tree with representation information. At
1506 -- this point, it contains a reference to a gcc expression that depends
1507 -- on the values of one or more discriminants. Give a set of discriminant
1508 -- values, this expression evaluates to False (zero) if variant is not
1509 -- present, and True (non-zero) if it is present. See unit Repinfo for
1510 -- further details on gigi back annotation. This field is used during
1511 -- ASIS processing (data decomposition annex) to determine if a field is
1512 -- present or not.
1513
1514 -- Print_In_Hex (Flag13-Sem)
1515 -- Set on an N_Integer_Literal node to indicate that the value should be
1516 -- printed in hexadecimal in the sprint listing. Has no effect on
1517 -- legality or semantics of program, only on the displayed output. This
1518 -- is used to clarify output from the packed array cases.
1519
1520 -- Procedure_To_Call (Node2-Sem)
1521 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1522 -- and N_Extended_Return_Statement nodes. References the entity for the
1523 -- declaration of the procedure to be called to accomplish the required
1524 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
1525 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
1526 -- allocating the return value), and for the Deallocate procedure in the
1527 -- case of N_Free_Statement.
1528
1529 -- Raises_Constraint_Error (Flag7-Sem)
1530 -- Set on an expression whose evaluation will definitely fail constraint
1531 -- error check. In the case of static expressions, this flag must be set
1532 -- accurately (and if it is set, the expression is typically illegal
1533 -- unless it appears as a non-elaborated branch of a short-circuit form).
1534 -- For a non-static expression, this flag may be set whenever an
1535 -- expression (e.g. an aggregate) is known to raise constraint error. If
1536 -- set, the expression definitely will raise CE if elaborated at runtime.
1537 -- If not set, the expression may or may not raise CE. In other words, on
1538 -- static expressions, the flag is set accurately, on non-static
1539 -- expressions it is set conservatively.
1540
1541 -- Redundant_Use (Flag13-Sem)
1542 -- Present in nodes that can appear as an operand in a use clause or use
1543 -- type clause (identifiers, expanded names, attribute references). Set
1544 -- to indicate that a use is redundant (and therefore need not be undone
1545 -- on scope exit).
1546
1547 -- Renaming_Exception (Node2-Sem)
1548 -- Present in N_Exception_Declaration node. Used to point back to the
1549 -- exception renaming for an exception declared within a subprogram.
1550 -- What happens is that an exception declared in a subprogram is moved
1551 -- to the library level with a unique name, and the original exception
1552 -- becomes a renaming. This link from the library level exception to the
1553 -- renaming declaration allows registering of the proper exception name.
1554
1555 -- Return_Statement_Entity (Node5-Sem)
1556 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
1557 -- Points to an E_Return_Statement representing the return statement.
1558
1559 -- Return_Object_Declarations (List3)
1560 -- Present in N_Extended_Return_Statement.
1561 -- Points to a list initially containing a single
1562 -- N_Object_Declaration representing the return object.
1563 -- We use a list (instead of just a pointer to the object decl)
1564 -- because Analyze wants to insert extra actions on this list.
1565
1566 -- Rounded_Result (Flag18-Sem)
1567 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1568 -- Used in the fixed-point cases to indicate that the result must be
1569 -- rounded as a result of the use of the 'Round attribute. Also used for
1570 -- integer N_Op_Divide nodes to indicate that the result should be
1571 -- rounded to the nearest integer (breaking ties away from zero), rather
1572 -- than truncated towards zero as usual. These rounded integer operations
1573 -- are the result of expansion of rounded fixed-point divide, conversion
1574 -- and multiplication operations.
1575
1576 -- Scope (Node3-Sem)
1577 -- Present in defining identifiers, defining character literals and
1578 -- defining operator symbols (i.e. in all entities). The entities of a
1579 -- scope all use this field to reference the corresponding scope entity.
1580 -- See Einfo for further details.
1581
1582 -- Shift_Count_OK (Flag4-Sem)
1583 -- A flag present in shift nodes to indicate that the shift count is
1584 -- known to be in range, i.e. is in the range from zero to word length
1585 -- minus one. If this flag is not set, then the shift count may be
1586 -- outside this range, i.e. larger than the word length, and the code
1587 -- must ensure that such shift counts give the appropriate result.
1588
1589 -- Source_Type (Node1-Sem)
1590 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1591 -- source type entity for the unchecked conversion instantiation
1592 -- which gigi must do size validation for.
1593
1594 -- Static_Processing_OK (Flag4-Sem)
1595 -- Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate
1596 -- flag is set, the full value of the aggregate can be determined at
1597 -- compile time and the aggregate can be passed as is to the back-end.
1598 -- In this event it is irrelevant whether this flag is set or not.
1599 -- However, if the flag Compile_Time_Known_Aggregate is not set but
1600 -- Static_Processing_OK is set, the aggregate can (but need not) be
1601 -- converted into a compile time known aggregate by the expander. See
1602 -- Sem_Aggr for the specific conditions under which an aggregate has its
1603 -- Static_Processing_OK flag set.
1604
1605 -- Storage_Pool (Node1-Sem)
1606 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1607 -- and N_Extended_Return_Statement nodes. References the entity for the
1608 -- storage pool to be used for the allocate or free call or for the
1609 -- allocation of the returned value from function. Empty indicates that
1610 -- the global default pool is to be used. Note that in the case
1611 -- of a return statement, this field is set only if the function returns
1612 -- value of a type whose size is not known at compile time on the
1613 -- secondary stack.
1614
1615 -- Suppress_Loop_Warnings (Flag17-Sem)
1616 -- Used in N_Loop_Statement node to indicate that warnings within the
1617 -- body of the loop should be suppressed. This is set when the range
1618 -- of a FOR loop is known to be null, or is probably null (loop would
1619 -- only execute if invalid values are present).
1620
1621 -- Target_Type (Node2-Sem)
1622 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
1623 -- type entity for the unchecked conversion instantiation which gigi must
1624 -- do size validation for.
1625
1626 -- Then_Actions (List3-Sem)
1627 -- This field is present in conditional expression nodes. During code
1628 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1629 -- actions at an appropriate place in the tree to get elaborated at the
1630 -- right time. For conditional expressions, we have to be sure that the
1631 -- actions for the Then branch are only elaborated if the condition is
1632 -- True. The Then_Actions field is used as a temporary parking place for
1633 -- these actions. The final tree is always rewritten to eliminate the
1634 -- need for this field, so in the tree passed to Gigi, this field is
1635 -- always set to No_List.
1636
1637 -- Treat_Fixed_As_Integer (Flag14-Sem)
1638 -- This flag appears in operator nodes for divide, multiply, mod and rem
1639 -- on fixed-point operands. It indicates that the operands are to be
1640 -- treated as integer values, ignoring small values. This flag is only
1641 -- set as a result of expansion of fixed-point operations. Typically a
1642 -- fixed-point multiplication in the source generates subsidiary
1643 -- multiplication and division operations that work with the underlying
1644 -- integer values and have this flag set. Note that this flag is not
1645 -- needed on other arithmetic operations (add, neg, subtract etc.) since
1646 -- in these cases it is always the case that fixed is treated as integer.
1647 -- The Etype field MUST be set if this flag is set. The analyzer knows to
1648 -- leave such nodes alone, and whoever makes them must set the correct
1649 -- Etype value.
1650
1651 -- TSS_Elist (Elist3-Sem)
1652 -- Present in N_Freeze_Entity nodes. Holds an element list containing
1653 -- entries for each TSS (type support subprogram) associated with the
1654 -- frozen type. The elements of the list are the entities for the
1655 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
1656 -- if there are no type support subprograms for the type or if the freeze
1657 -- node is not for a type.
1658
1659 -- Unreferenced_In_Spec (Flag7-Sem)
1660 -- Present in N_With_Clause nodes. Set if the with clause is on the
1661 -- package or subprogram spec where the main unit is the corresponding
1662 -- body, and is not referenced by the spec (it may still be referenced by
1663 -- the body, so this flag is used to generate the proper message (see
1664 -- Sem_Util.Check_Unused_Withs for details)
1665
1666 -- Was_Originally_Stub (Flag13-Sem)
1667 -- This flag is set in the node for a proper body that replaces stub.
1668 -- During the analysis procedure, stubs in some situations get rewritten
1669 -- by the corresponding bodies, and we set this flag to remember that
1670 -- this happened. Note that it is not good enough to rely on the use of
1671 -- Original_Node here because of the case of nested instantiations where
1672 -- the substituted node can be copied.
1673
1674 -- Zero_Cost_Handling (Flag5-Sem)
1675 -- This flag is set in all handled sequence of statement and exception
1676 -- handler nodes if exceptions are to be handled using the zero-cost
1677 -- mechanism (see Ada.Exceptions and System.Exceptions in files
1678 -- a-except.ads/adb and s-except.ads for full details). What gigi needs
1679 -- to do for such a handler is simply to put the code in the handler
1680 -- somewhere. The front end has generated all necessary labels.
1681
1682 --------------------------------------------------
1683 -- Note on Use of End_Label and End_Span Fields --
1684 --------------------------------------------------
1685
1686 -- Several constructs have end lines:
1687
1688 -- Loop Statement end loop [loop_IDENTIFIER];
1689 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
1690 -- Task Definition end [task_IDENTIFIER]
1691 -- Protected Definition end [protected_IDENTIFIER]
1692 -- Protected Body end [protected_IDENTIFIER]
1693
1694 -- Block Statement end [block_IDENTIFIER];
1695 -- Subprogram Body end [DESIGNATOR];
1696 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
1697 -- Task Body end [task_IDENTIFIER];
1698 -- Accept Statement end [entry_IDENTIFIER]];
1699 -- Entry Body end [entry_IDENTIFIER];
1700
1701 -- If Statement end if;
1702 -- Case Statement end case;
1703
1704 -- Record Definition end record;
1705 -- Enumeration Definition );
1706
1707 -- The End_Label and End_Span fields are used to mark the locations of
1708 -- these lines, and also keep track of the label in the case where a label
1709 -- is present.
1710
1711 -- For the first group above, the End_Label field of the corresponding node
1712 -- is used to point to the label identifier. In the case where there is no
1713 -- label in the source, the parser supplies a dummy identifier (with
1714 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
1715 -- marks the location of the token following the END token.
1716
1717 -- For the second group, the use of End_Label is similar, but the End_Label
1718 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
1719 -- simply because in some cases there is no room in the parent node.
1720
1721 -- For the third group, there is never any label, and instead of using
1722 -- End_Label, we use the End_Span field which gives the location of the
1723 -- token following END, relative to the starting Sloc of the construct,
1724 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
1725 -- following the End_Label.
1726
1727 -- The record definition case is handled specially, we treat it as though
1728 -- it required an optional label which is never present, and so the parser
1729 -- always builds a dummy identifier with Comes From Source set False. The
1730 -- reason we do this, rather than using End_Span in this case, is that we
1731 -- want to generate a cross-ref entry for the end of a record, since it
1732 -- represents a scope for name declaration purposes.
1733
1734 -- The enumeration definition case is handled in an exactly similar manner,
1735 -- building a dummy identifier to get a cross-reference.
1736
1737 -- Note: the reason we store the difference as a Uint, instead of storing
1738 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
1739 -- distinguished from other types of values, and we count on all general
1740 -- use fields being self describing. To make things easier for clients,
1741 -- note that we provide function End_Location, and procedure
1742 -- Set_End_Location to allow access to the logical value (which is the
1743 -- Source_Ptr value for the end token).
1744
1745 ---------------------
1746 -- Syntactic Nodes --
1747 ---------------------
1748
1749 ---------------------
1750 -- 2.3 Identifier --
1751 ---------------------
1752
1753 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
1754 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
1755
1756 -- An IDENTIFIER shall not be a reserved word
1757
1758 -- In the Ada grammar identifiers are the bottom level tokens which have
1759 -- very few semantics. Actual program identifiers are direct names. If
1760 -- we were being 100% honest with the grammar, then we would have a node
1761 -- called N_Direct_Name which would point to an identifier. However,
1762 -- that's too many extra nodes, so we just use the N_Identifier node
1763 -- directly as a direct name, and it contains the expression fields and
1764 -- Entity field that correspond to its use as a direct name. In those
1765 -- few cases where identifiers appear in contexts where they are not
1766 -- direct names (pragmas, pragma argument associations, attribute
1767 -- references and attribute definition clauses), the Chars field of the
1768 -- node contains the Name_Id for the identifier name.
1769
1770 -- Note: in GNAT, a reserved word can be treated as an identifier in two
1771 -- cases. First, an incorrect use of a reserved word as an identifier is
1772 -- diagnosed and then treated as a normal identifier. Second, an
1773 -- attribute designator of the form of a reserved word (access, delta,
1774 -- digits, range) is treated as an identifier.
1775
1776 -- Note: The set of letters that is permitted in an identifier depends
1777 -- on the character set in use. See package Csets for full details.
1778
1779 -- N_Identifier
1780 -- Sloc points to identifier
1781 -- Chars (Name1) contains the Name_Id for the identifier
1782 -- Entity (Node4-Sem)
1783 -- Associated_Node (Node4-Sem)
1784 -- Original_Discriminant (Node2-Sem)
1785 -- Redundant_Use (Flag13-Sem)
1786 -- Has_Private_View (Flag11-Sem) (set in generic units)
1787 -- plus fields for expression
1788
1789 --------------------------
1790 -- 2.4 Numeric Literal --
1791 --------------------------
1792
1793 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
1794
1795 ----------------------------
1796 -- 2.4.1 Decimal Literal --
1797 ----------------------------
1798
1799 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
1800
1801 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
1802
1803 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
1804
1805 -- Decimal literals appear in the tree as either integer literal nodes
1806 -- or real literal nodes, depending on whether a period is present.
1807
1808 -- Note: literal nodes appear as a result of direct use of literals
1809 -- in the source program, and also as the result of evaluating
1810 -- expressions at compile time. In the latter case, it is possible
1811 -- to construct real literals that have no syntactic representation
1812 -- using the standard literal format. Such literals are listed by
1813 -- Sprint using the notation [numerator / denominator].
1814
1815 -- Note: the value of an integer literal node created by the front end
1816 -- is never outside the range of values of the base type. However, it
1817 -- can be the case that the value is outside the range of the
1818 -- particular subtype. This happens in the case of integer overflows
1819 -- with checks suppressed.
1820
1821 -- N_Integer_Literal
1822 -- Sloc points to literal
1823 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1824 -- has been constant-folded into its literal value.
1825 -- Intval (Uint3) contains integer value of literal
1826 -- plus fields for expression
1827 -- Print_In_Hex (Flag13-Sem)
1828
1829 -- N_Real_Literal
1830 -- Sloc points to literal
1831 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1832 -- has been constant-folded into its literal value.
1833 -- Realval (Ureal3) contains real value of literal
1834 -- Corresponding_Integer_Value (Uint4-Sem)
1835 -- Is_Machine_Number (Flag11-Sem)
1836 -- plus fields for expression
1837
1838 --------------------------
1839 -- 2.4.2 Based Literal --
1840 --------------------------
1841
1842 -- BASED_LITERAL ::=
1843 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
1844
1845 -- BASE ::= NUMERAL
1846
1847 -- BASED_NUMERAL ::=
1848 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
1849
1850 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
1851
1852 -- Based literals appear in the tree as either integer literal nodes
1853 -- or real literal nodes, depending on whether a period is present.
1854
1855 ----------------------------
1856 -- 2.5 Character Literal --
1857 ----------------------------
1858
1859 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
1860
1861 -- N_Character_Literal
1862 -- Sloc points to literal
1863 -- Chars (Name1) contains the Name_Id for the identifier
1864 -- Char_Literal_Value (Uint2) contains the literal value
1865 -- Entity (Node4-Sem)
1866 -- Associated_Node (Node4-Sem)
1867 -- Has_Private_View (Flag11-Sem) set in generic units.
1868 -- plus fields for expression
1869
1870 -- Note: the Entity field will be missing (set to Empty) for character
1871 -- literals whose type is Standard.Wide_Character or Standard.Character
1872 -- or a type derived from one of these two. In this case the character
1873 -- literal stands for its own coding. The reason we take this irregular
1874 -- short cut is to avoid the need to build lots of junk defining
1875 -- character literal nodes.
1876
1877 -------------------------
1878 -- 2.6 String Literal --
1879 -------------------------
1880
1881 -- STRING LITERAL ::= "{STRING_ELEMENT}"
1882
1883 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
1884 -- single GRAPHIC_CHARACTER other than a quotation mark.
1885 --
1886 -- Is_Folded_In_Parser is True if the parser created this literal by
1887 -- folding a sequence of "&" operators. For example, if the source code
1888 -- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
1889 -- is set. This flag is needed because the parser doesn't know about
1890 -- visibility, so the folded result might be wrong, and semantic
1891 -- analysis needs to check for that.
1892
1893 -- N_String_Literal
1894 -- Sloc points to literal
1895 -- Strval (Str3) contains Id of string value
1896 -- Has_Wide_Character (Flag11-Sem)
1897 -- Is_Folded_In_Parser (Flag4)
1898 -- plus fields for expression
1899
1900 ------------------
1901 -- 2.7 Comment --
1902 ------------------
1903
1904 -- A COMMENT starts with two adjacent hyphens and extends up to the
1905 -- end of the line. A COMMENT may appear on any line of a program.
1906
1907 -- Comments are skipped by the scanner and do not appear in the tree.
1908 -- It is possible to reconstruct the position of comments with respect
1909 -- to the elements of the tree by using the source position (Sloc)
1910 -- pointers that appear in every tree node.
1911
1912 -----------------
1913 -- 2.8 Pragma --
1914 -----------------
1915
1916 -- PRAGMA ::= pragma IDENTIFIER
1917 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
1918
1919 -- Note that a pragma may appear in the tree anywhere a declaration
1920 -- or a statement may appear, as well as in some other situations
1921 -- which are explicitly documented.
1922
1923 -- N_Pragma
1924 -- Sloc points to pragma identifier
1925 -- Next_Pragma (Node1-Sem)
1926 -- Pragma_Argument_Associations (List2) (set to No_List if none)
1927 -- Debug_Statement (Node3) (set to Empty if not Debug, Assert)
1928 -- Pragma_Identifier (Node4)
1929 -- Next_Rep_Item (Node5-Sem)
1930 -- PPC_Enabled (Flag5-Sem)
1931
1932 -- Note: we should have a section on what pragmas are passed on to
1933 -- the back end to be processed. This section should note that pragma
1934 -- Psect_Object is always converted to Common_Object, but there are
1935 -- undoubtedly many other similar notes required ???
1936
1937 -- Note: a utility function Pragma_Name may be applied to pragma nodes
1938 -- to conveniently obtain the Chars field of the Pragma_Identifier.
1939
1940 --------------------------------------
1941 -- 2.8 Pragma Argument Association --
1942 --------------------------------------
1943
1944 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
1945 -- [pragma_argument_IDENTIFIER =>] NAME
1946 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
1947
1948 -- N_Pragma_Argument_Association
1949 -- Sloc points to first token in association
1950 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
1951 -- Expression (Node3)
1952
1953 ------------------------
1954 -- 2.9 Reserved Word --
1955 ------------------------
1956
1957 -- Reserved words are parsed by the scanner, and returned as the
1958 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
1959
1960 ----------------------------
1961 -- 3.1 Basic Declaration --
1962 ----------------------------
1963
1964 -- BASIC_DECLARATION ::=
1965 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
1966 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
1967 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
1968 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
1969 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
1970 -- | GENERIC_INSTANTIATION
1971
1972 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
1973 -- see further description in section on semantic nodes.
1974
1975 -- Also, in the tree that is constructed, a pragma may appear
1976 -- anywhere that a declaration may appear.
1977
1978 ------------------------------
1979 -- 3.1 Defining Identifier --
1980 ------------------------------
1981
1982 -- DEFINING_IDENTIFIER ::= IDENTIFIER
1983
1984 -- A defining identifier is an entity, which has additional fields
1985 -- depending on the setting of the Ekind field. These additional
1986 -- fields are defined (and access subprograms declared) in package
1987 -- Einfo.
1988
1989 -- Note: N_Defining_Identifier is an extended node whose fields are
1990 -- deliberate layed out to match the layout of fields in an ordinary
1991 -- N_Identifier node allowing for easy alteration of an identifier
1992 -- node into a defining identifier node. For details, see procedure
1993 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
1994
1995 -- N_Defining_Identifier
1996 -- Sloc points to identifier
1997 -- Chars (Name1) contains the Name_Id for the identifier
1998 -- Next_Entity (Node2-Sem)
1999 -- Scope (Node3-Sem)
2000 -- Etype (Node5-Sem)
2001
2002 -----------------------------
2003 -- 3.2.1 Type Declaration --
2004 -----------------------------
2005
2006 -- TYPE_DECLARATION ::=
2007 -- FULL_TYPE_DECLARATION
2008 -- | INCOMPLETE_TYPE_DECLARATION
2009 -- | PRIVATE_TYPE_DECLARATION
2010 -- | PRIVATE_EXTENSION_DECLARATION
2011
2012 ----------------------------------
2013 -- 3.2.1 Full Type Declaration --
2014 ----------------------------------
2015
2016 -- FULL_TYPE_DECLARATION ::=
2017 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2018 -- is TYPE_DEFINITION;
2019 -- | TASK_TYPE_DECLARATION
2020 -- | PROTECTED_TYPE_DECLARATION
2021
2022 -- The full type declaration node is used only for the first case. The
2023 -- second case (concurrent type declaration), is represented directly
2024 -- by a task type declaration or a protected type declaration.
2025
2026 -- N_Full_Type_Declaration
2027 -- Sloc points to TYPE
2028 -- Defining_Identifier (Node1)
2029 -- Discriminant_Specifications (List4) (set to No_List if none)
2030 -- Type_Definition (Node3)
2031 -- Discr_Check_Funcs_Built (Flag11-Sem)
2032
2033 ----------------------------
2034 -- 3.2.1 Type Definition --
2035 ----------------------------
2036
2037 -- TYPE_DEFINITION ::=
2038 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2039 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2040 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
2041 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
2042
2043 --------------------------------
2044 -- 3.2.2 Subtype Declaration --
2045 --------------------------------
2046
2047 -- SUBTYPE_DECLARATION ::=
2048 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION;
2049
2050 -- The subtype indication field is set to Empty for subtypes
2051 -- declared in package Standard (Positive, Natural).
2052
2053 -- N_Subtype_Declaration
2054 -- Sloc points to SUBTYPE
2055 -- Defining_Identifier (Node1)
2056 -- Null_Exclusion_Present (Flag11)
2057 -- Subtype_Indication (Node5)
2058 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2059 -- Exception_Junk (Flag8-Sem)
2060
2061 -------------------------------
2062 -- 3.2.2 Subtype Indication --
2063 -------------------------------
2064
2065 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2066
2067 -- Note: if no constraint is present, the subtype indication appears
2068 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2069 -- node is used only if a constraint is present.
2070
2071 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2072 -- with the null-exclusion part (see AI-231), we had to introduce a new
2073 -- attribute in all the parents of subtype_indication nodes to indicate
2074 -- if the null-exclusion is present.
2075
2076 -- Note: the reason that this node has expression fields is that a
2077 -- subtype indication can appear as an operand of a membership test.
2078
2079 -- N_Subtype_Indication
2080 -- Sloc points to first token of subtype mark
2081 -- Subtype_Mark (Node4)
2082 -- Constraint (Node3)
2083 -- Etype (Node5-Sem)
2084 -- Must_Not_Freeze (Flag8-Sem)
2085
2086 -- Note: Etype is a copy of the Etype field of the Subtype_Mark. The
2087 -- reason for this redundancy is so that in a list of array index types,
2088 -- the Etype can be uniformly accessed to determine the subscript type.
2089 -- This means that no Itype is constructed for the actual subtype that
2090 -- is created by the subtype indication. If such an Itype is required,
2091 -- it is constructed in the context in which the indication appears.
2092
2093 -------------------------
2094 -- 3.2.2 Subtype Mark --
2095 -------------------------
2096
2097 -- SUBTYPE_MARK ::= subtype_NAME
2098
2099 -----------------------
2100 -- 3.2.2 Constraint --
2101 -----------------------
2102
2103 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2104
2105 ------------------------------
2106 -- 3.2.2 Scalar Constraint --
2107 ------------------------------
2108
2109 -- SCALAR_CONSTRAINT ::=
2110 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2111
2112 ---------------------------------
2113 -- 3.2.2 Composite Constraint --
2114 ---------------------------------
2115
2116 -- COMPOSITE_CONSTRAINT ::=
2117 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2118
2119 -------------------------------
2120 -- 3.3.1 Object Declaration --
2121 -------------------------------
2122
2123 -- OBJECT_DECLARATION ::=
2124 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2125 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION];
2126 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2127 -- ACCESS_DEFINITION [:= EXPRESSION];
2128 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2129 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION];
2130 -- | SINGLE_TASK_DECLARATION
2131 -- | SINGLE_PROTECTED_DECLARATION
2132
2133 -- Note: aliased is not permitted in Ada 83 mode
2134
2135 -- The N_Object_Declaration node is only for the first two cases.
2136 -- Single task declaration is handled by P_Task (9.1)
2137 -- Single protected declaration is handled by P_protected (9.5)
2138
2139 -- Although the syntax allows multiple identifiers in the list, the
2140 -- semantics is as though successive declarations were given with
2141 -- identical type definition and expression components. To simplify
2142 -- semantic processing, the parser represents a multiple declaration
2143 -- case as a sequence of single declarations, using the More_Ids and
2144 -- Prev_Ids flags to preserve the original source form as described
2145 -- in the section on "Handling of Defining Identifier Lists".
2146
2147 -- The flag Has_Init_Expression is set if an initializing expression
2148 -- is present. Normally it is set if and only if Expression contains
2149 -- a non-empty value, but there is an exception to this. When the
2150 -- initializing expression is an aggregate which requires explicit
2151 -- assignments, the Expression field gets set to Empty, but this flag
2152 -- is still set, so we don't forget we had an initializing expression.
2153
2154 -- Note: if a range check is required for the initialization
2155 -- expression then the Do_Range_Check flag is set in the Expression,
2156 -- with the check being done against the type given by the object
2157 -- definition, which is also the Etype of the defining identifier.
2158
2159 -- Note: the contents of the Expression field must be ignored (i.e.
2160 -- treated as though it were Empty) if No_Initialization is set True.
2161
2162 -- Note: the back end places some restrictions on the form of the
2163 -- Expression field. If the object being declared is Atomic, then
2164 -- the Expression may not have the form of an aggregate (since this
2165 -- might cause the back end to generate separate assignments). In this
2166 -- case the front end must generate an extra temporary and initialize
2167 -- this temporary as required (the temporary itself is not atomic).
2168
2169 -- Note: there is not node kind for object definition. Instead, the
2170 -- corresponding field holds a subtype indication, an array type
2171 -- definition, or (Ada 2005, AI-406) an access definition.
2172
2173 -- N_Object_Declaration
2174 -- Sloc points to first identifier
2175 -- Defining_Identifier (Node1)
2176 -- Aliased_Present (Flag4) set if ALIASED appears
2177 -- Constant_Present (Flag17) set if CONSTANT appears
2178 -- Null_Exclusion_Present (Flag11)
2179 -- Object_Definition (Node4) subtype indic./array type def./ access def.
2180 -- Expression (Node3) (set to Empty if not present)
2181 -- Handler_List_Entry (Node2-Sem)
2182 -- Corresponding_Generic_Association (Node5-Sem)
2183 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2184 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2185 -- No_Initialization (Flag13-Sem)
2186 -- Assignment_OK (Flag15-Sem)
2187 -- Exception_Junk (Flag8-Sem)
2188 -- Is_Subprogram_Descriptor (Flag16-Sem)
2189 -- Has_Init_Expression (Flag14)
2190
2191 -------------------------------------
2192 -- 3.3.1 Defining Identifier List --
2193 -------------------------------------
2194
2195 -- DEFINING_IDENTIFIER_LIST ::=
2196 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2197
2198 -------------------------------
2199 -- 3.3.2 Number Declaration --
2200 -------------------------------
2201
2202 -- NUMBER_DECLARATION ::=
2203 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2204
2205 -- Although the syntax allows multiple identifiers in the list, the
2206 -- semantics is as though successive declarations were given with
2207 -- identical expressions. To simplify semantic processing, the parser
2208 -- represents a multiple declaration case as a sequence of single
2209 -- declarations, using the More_Ids and Prev_Ids flags to preserve
2210 -- the original source form as described in the section on "Handling
2211 -- of Defining Identifier Lists".
2212
2213 -- N_Number_Declaration
2214 -- Sloc points to first identifier
2215 -- Defining_Identifier (Node1)
2216 -- Expression (Node3)
2217 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2218 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2219
2220 ----------------------------------
2221 -- 3.4 Derived Type Definition --
2222 ----------------------------------
2223
2224 -- DERIVED_TYPE_DEFINITION ::=
2225 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2226 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2227
2228 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
2229 -- in Ada 83 mode
2230
2231 -- Note: a record extension part is required if ABSTRACT is present
2232
2233 -- N_Derived_Type_Definition
2234 -- Sloc points to NEW
2235 -- Abstract_Present (Flag4)
2236 -- Null_Exclusion_Present (Flag11) (set to False if not present)
2237 -- Subtype_Indication (Node5)
2238 -- Record_Extension_Part (Node3) (set to Empty if not present)
2239 -- Limited_Present (Flag17)
2240 -- Task_Present (Flag5) set in task interfaces
2241 -- Protected_Present (Flag6) set in protected interfaces
2242 -- Synchronized_Present (Flag7) set in interfaces
2243 -- Interface_List (List2) (set to No_List if none)
2244 -- Interface_Present (Flag16) set in abstract interfaces
2245
2246 -- Note: Task_Present, Protected_Present, Synchronized_Present,
2247 -- Interface_List, and Interface_Present are used for abstract
2248 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2249
2250 ---------------------------
2251 -- 3.5 Range Constraint --
2252 ---------------------------
2253
2254 -- RANGE_CONSTRAINT ::= range RANGE
2255
2256 -- N_Range_Constraint
2257 -- Sloc points to RANGE
2258 -- Range_Expression (Node4)
2259
2260 ----------------
2261 -- 3.5 Range --
2262 ----------------
2263
2264 -- RANGE ::=
2265 -- RANGE_ATTRIBUTE_REFERENCE
2266 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2267
2268 -- Note: the case of a range given as a range attribute reference
2269 -- appears directly in the tree as an attribute reference.
2270
2271 -- Note: the field name for a reference to a range is Range_Expression
2272 -- rather than Range, because range is a reserved keyword in Ada!
2273
2274 -- Note: the reason that this node has expression fields is that a
2275 -- range can appear as an operand of a membership test. The Etype
2276 -- field is the type of the range (we do NOT construct an implicit
2277 -- subtype to represent the range exactly).
2278
2279 -- N_Range
2280 -- Sloc points to ..
2281 -- Low_Bound (Node1)
2282 -- High_Bound (Node2)
2283 -- Includes_Infinities (Flag11)
2284 -- plus fields for expression
2285
2286 -- Note: if the range appears in a context, such as a subtype
2287 -- declaration, where range checks are required on one or both of
2288 -- the expression fields, then type conversion nodes are inserted
2289 -- to represent the required checks.
2290
2291 ----------------------------------------
2292 -- 3.5.1 Enumeration Type Definition --
2293 ----------------------------------------
2294
2295 -- ENUMERATION_TYPE_DEFINITION ::=
2296 -- (ENUMERATION_LITERAL_SPECIFICATION
2297 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2298
2299 -- Note: the Literals field in the node described below is null for
2300 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2301 -- which special processing handles these types as special cases.
2302
2303 -- N_Enumeration_Type_Definition
2304 -- Sloc points to left parenthesis
2305 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2306 -- End_Label (Node4) (set to Empty if internally generated record)
2307
2308 ----------------------------------------------
2309 -- 3.5.1 Enumeration Literal Specification --
2310 ----------------------------------------------
2311
2312 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2313 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2314
2315 ---------------------------------------
2316 -- 3.5.1 Defining Character Literal --
2317 ---------------------------------------
2318
2319 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2320
2321 -- A defining character literal is an entity, which has additional
2322 -- fields depending on the setting of the Ekind field. These
2323 -- additional fields are defined (and access subprograms declared)
2324 -- in package Einfo.
2325
2326 -- Note: N_Defining_Character_Literal is an extended node whose fields
2327 -- are deliberate layed out to match the layout of fields in an ordinary
2328 -- N_Character_Literal node allowing for easy alteration of a character
2329 -- literal node into a defining character literal node. For details, see
2330 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2331
2332 -- N_Defining_Character_Literal
2333 -- Sloc points to literal
2334 -- Chars (Name1) contains the Name_Id for the identifier
2335 -- Next_Entity (Node2-Sem)
2336 -- Scope (Node3-Sem)
2337 -- Etype (Node5-Sem)
2338
2339 ------------------------------------
2340 -- 3.5.4 Integer Type Definition --
2341 ------------------------------------
2342
2343 -- Note: there is an error in this rule in the latest version of the
2344 -- grammar, so we have retained the old rule pending clarification.
2345
2346 -- INTEGER_TYPE_DEFINITION ::=
2347 -- SIGNED_INTEGER_TYPE_DEFINITION
2348 -- | MODULAR_TYPE_DEFINITION
2349
2350 -------------------------------------------
2351 -- 3.5.4 Signed Integer Type Definition --
2352 -------------------------------------------
2353
2354 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2355 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2356
2357 -- Note: the Low_Bound and High_Bound fields are set to Empty
2358 -- for integer types defined in package Standard.
2359
2360 -- N_Signed_Integer_Type_Definition
2361 -- Sloc points to RANGE
2362 -- Low_Bound (Node1)
2363 -- High_Bound (Node2)
2364
2365 ------------------------------------
2366 -- 3.5.4 Modular Type Definition --
2367 ------------------------------------
2368
2369 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2370
2371 -- N_Modular_Type_Definition
2372 -- Sloc points to MOD
2373 -- Expression (Node3)
2374
2375 ---------------------------------
2376 -- 3.5.6 Real Type Definition --
2377 ---------------------------------
2378
2379 -- REAL_TYPE_DEFINITION ::=
2380 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2381
2382 --------------------------------------
2383 -- 3.5.7 Floating Point Definition --
2384 --------------------------------------
2385
2386 -- FLOATING_POINT_DEFINITION ::=
2387 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2388
2389 -- Note: The Digits_Expression and Real_Range_Specifications fields
2390 -- are set to Empty for floating-point types declared in Standard.
2391
2392 -- N_Floating_Point_Definition
2393 -- Sloc points to DIGITS
2394 -- Digits_Expression (Node2)
2395 -- Real_Range_Specification (Node4) (set to Empty if not present)
2396
2397 -------------------------------------
2398 -- 3.5.7 Real Range Specification --
2399 -------------------------------------
2400
2401 -- REAL_RANGE_SPECIFICATION ::=
2402 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2403
2404 -- N_Real_Range_Specification
2405 -- Sloc points to RANGE
2406 -- Low_Bound (Node1)
2407 -- High_Bound (Node2)
2408
2409 -----------------------------------
2410 -- 3.5.9 Fixed Point Definition --
2411 -----------------------------------
2412
2413 -- FIXED_POINT_DEFINITION ::=
2414 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2415
2416 --------------------------------------------
2417 -- 3.5.9 Ordinary Fixed Point Definition --
2418 --------------------------------------------
2419
2420 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2421 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2422
2423 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2424
2425 -- N_Ordinary_Fixed_Point_Definition
2426 -- Sloc points to DELTA
2427 -- Delta_Expression (Node3)
2428 -- Real_Range_Specification (Node4)
2429
2430 -------------------------------------------
2431 -- 3.5.9 Decimal Fixed Point Definition --
2432 -------------------------------------------
2433
2434 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2435 -- delta static_EXPRESSION
2436 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2437
2438 -- Note: decimal types are not permitted in Ada 83 mode
2439
2440 -- N_Decimal_Fixed_Point_Definition
2441 -- Sloc points to DELTA
2442 -- Delta_Expression (Node3)
2443 -- Digits_Expression (Node2)
2444 -- Real_Range_Specification (Node4) (set to Empty if not present)
2445
2446 ------------------------------
2447 -- 3.5.9 Digits Constraint --
2448 ------------------------------
2449
2450 -- DIGITS_CONSTRAINT ::=
2451 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2452
2453 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2454 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2455
2456 -- N_Digits_Constraint
2457 -- Sloc points to DIGITS
2458 -- Digits_Expression (Node2)
2459 -- Range_Constraint (Node4) (set to Empty if not present)
2460
2461 --------------------------------
2462 -- 3.6 Array Type Definition --
2463 --------------------------------
2464
2465 -- ARRAY_TYPE_DEFINITION ::=
2466 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2467
2468 -----------------------------------------
2469 -- 3.6 Unconstrained Array Definition --
2470 -----------------------------------------
2471
2472 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2473 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2474 -- COMPONENT_DEFINITION
2475
2476 -- Note: dimensionality of array is indicated by number of entries in
2477 -- the Subtype_Marks list, which has one entry for each dimension.
2478
2479 -- N_Unconstrained_Array_Definition
2480 -- Sloc points to ARRAY
2481 -- Subtype_Marks (List2)
2482 -- Component_Definition (Node4)
2483
2484 -----------------------------------
2485 -- 3.6 Index Subtype Definition --
2486 -----------------------------------
2487
2488 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2489
2490 -- There is no explicit node in the tree for an index subtype
2491 -- definition since the N_Unconstrained_Array_Definition node
2492 -- incorporates the type marks which appear in this context.
2493
2494 ---------------------------------------
2495 -- 3.6 Constrained Array Definition --
2496 ---------------------------------------
2497
2498 -- CONSTRAINED_ARRAY_DEFINITION ::=
2499 -- array (DISCRETE_SUBTYPE_DEFINITION
2500 -- {, DISCRETE_SUBTYPE_DEFINITION})
2501 -- of COMPONENT_DEFINITION
2502
2503 -- Note: dimensionality of array is indicated by number of entries
2504 -- in the Discrete_Subtype_Definitions list, which has one entry
2505 -- for each dimension.
2506
2507 -- N_Constrained_Array_Definition
2508 -- Sloc points to ARRAY
2509 -- Discrete_Subtype_Definitions (List2)
2510 -- Component_Definition (Node4)
2511
2512 --------------------------------------
2513 -- 3.6 Discrete Subtype Definition --
2514 --------------------------------------
2515
2516 -- DISCRETE_SUBTYPE_DEFINITION ::=
2517 -- discrete_SUBTYPE_INDICATION | RANGE
2518
2519 -------------------------------
2520 -- 3.6 Component Definition --
2521 -------------------------------
2522
2523 -- COMPONENT_DEFINITION ::=
2524 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
2525
2526 -- Note: although the syntax does not permit a component definition to
2527 -- be an anonymous array (and the parser will diagnose such an attempt
2528 -- with an appropriate message), it is possible for anonymous arrays
2529 -- to appear as component definitions. The semantics and back end handle
2530 -- this case properly, and the expander in fact generates such cases.
2531 -- Access_Definition is an optional field that gives support to
2532 -- Ada 2005 (AI-230). The parser generates nodes that have either the
2533 -- Subtype_Indication field or else the Access_Definition field.
2534
2535 -- N_Component_Definition
2536 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
2537 -- Aliased_Present (Flag4)
2538 -- Null_Exclusion_Present (Flag11)
2539 -- Subtype_Indication (Node5) (set to Empty if not present)
2540 -- Access_Definition (Node3) (set to Empty if not present)
2541
2542 -----------------------------
2543 -- 3.6.1 Index Constraint --
2544 -----------------------------
2545
2546 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
2547
2548 -- It is not in general possible to distinguish between discriminant
2549 -- constraints and index constraints at parse time, since a simple
2550 -- name could be either the subtype mark of a discrete range, or an
2551 -- expression in a discriminant association with no name. Either
2552 -- entry appears simply as the name, and the semantic parse must
2553 -- distinguish between the two cases. Thus we use a common tree
2554 -- node format for both of these constraint types.
2555
2556 -- See Discriminant_Constraint for format of node
2557
2558 ---------------------------
2559 -- 3.6.1 Discrete Range --
2560 ---------------------------
2561
2562 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
2563
2564 ----------------------------
2565 -- 3.7 Discriminant Part --
2566 ----------------------------
2567
2568 -- DISCRIMINANT_PART ::=
2569 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
2570
2571 ------------------------------------
2572 -- 3.7 Unknown Discriminant Part --
2573 ------------------------------------
2574
2575 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
2576
2577 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
2578
2579 -- There is no explicit node in the tree for an unknown discriminant
2580 -- part. Instead the Unknown_Discriminants_Present flag is set in the
2581 -- parent node.
2582
2583 ----------------------------------
2584 -- 3.7 Known Discriminant Part --
2585 ----------------------------------
2586
2587 -- KNOWN_DISCRIMINANT_PART ::=
2588 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
2589
2590 -------------------------------------
2591 -- 3.7 Discriminant Specification --
2592 -------------------------------------
2593
2594 -- DISCRIMINANT_SPECIFICATION ::=
2595 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
2596 -- [:= DEFAULT_EXPRESSION]
2597 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
2598 -- [:= DEFAULT_EXPRESSION]
2599
2600 -- Although the syntax allows multiple identifiers in the list, the
2601 -- semantics is as though successive specifications were given with
2602 -- identical type definition and expression components. To simplify
2603 -- semantic processing, the parser represents a multiple declaration
2604 -- case as a sequence of single specifications, using the More_Ids and
2605 -- Prev_Ids flags to preserve the original source form as described
2606 -- in the section on "Handling of Defining Identifier Lists".
2607
2608 -- N_Discriminant_Specification
2609 -- Sloc points to first identifier
2610 -- Defining_Identifier (Node1)
2611 -- Null_Exclusion_Present (Flag11)
2612 -- Discriminant_Type (Node5) subtype mark or access parameter definition
2613 -- Expression (Node3) (set to Empty if no default expression)
2614 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2615 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2616
2617 -----------------------------
2618 -- 3.7 Default Expression --
2619 -----------------------------
2620
2621 -- DEFAULT_EXPRESSION ::= EXPRESSION
2622
2623 ------------------------------------
2624 -- 3.7.1 Discriminant Constraint --
2625 ------------------------------------
2626
2627 -- DISCRIMINANT_CONSTRAINT ::=
2628 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
2629
2630 -- It is not in general possible to distinguish between discriminant
2631 -- constraints and index constraints at parse time, since a simple
2632 -- name could be either the subtype mark of a discrete range, or an
2633 -- expression in a discriminant association with no name. Either
2634 -- entry appears simply as the name, and the semantic parse must
2635 -- distinguish between the two cases. Thus we use a common tree
2636 -- node format for both of these constraint types.
2637
2638 -- N_Index_Or_Discriminant_Constraint
2639 -- Sloc points to left paren
2640 -- Constraints (List1) points to list of discrete ranges or
2641 -- discriminant associations
2642
2643 -------------------------------------
2644 -- 3.7.1 Discriminant Association --
2645 -------------------------------------
2646
2647 -- DISCRIMINANT_ASSOCIATION ::=
2648 -- [discriminant_SELECTOR_NAME
2649 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
2650
2651 -- Note: a discriminant association that has no selector name list
2652 -- appears directly as an expression in the tree.
2653
2654 -- N_Discriminant_Association
2655 -- Sloc points to first token of discriminant association
2656 -- Selector_Names (List1) (always non-empty, since if no selector
2657 -- names are present, this node is not used, see comment above)
2658 -- Expression (Node3)
2659
2660 ---------------------------------
2661 -- 3.8 Record Type Definition --
2662 ---------------------------------
2663
2664 -- RECORD_TYPE_DEFINITION ::=
2665 -- [[abstract] tagged] [limited] RECORD_DEFINITION
2666
2667 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
2668
2669 -- There is no explicit node in the tree for a record type definition.
2670 -- Instead the flags for Tagged_Present and Limited_Present appear in
2671 -- the N_Record_Definition node for a record definition appearing in
2672 -- the context of a record type definition.
2673
2674 ----------------------------
2675 -- 3.8 Record Definition --
2676 ----------------------------
2677
2678 -- RECORD_DEFINITION ::=
2679 -- record
2680 -- COMPONENT_LIST
2681 -- end record
2682 -- | null record
2683
2684 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
2685 -- flags appear only for a record definition appearing in a record
2686 -- type definition.
2687
2688 -- Note: the NULL RECORD case is not permitted in Ada 83
2689
2690 -- N_Record_Definition
2691 -- Sloc points to RECORD or NULL
2692 -- End_Label (Node4) (set to Empty if internally generated record)
2693 -- Abstract_Present (Flag4)
2694 -- Tagged_Present (Flag15)
2695 -- Limited_Present (Flag17)
2696 -- Component_List (Node1) empty in null record case
2697 -- Null_Present (Flag13) set in null record case
2698 -- Task_Present (Flag5) set in task interfaces
2699 -- Protected_Present (Flag6) set in protected interfaces
2700 -- Synchronized_Present (Flag7) set in interfaces
2701 -- Interface_Present (Flag16) set in abstract interfaces
2702 -- Interface_List (List2) (set to No_List if none)
2703
2704 -- Note: Task_Present, Protected_Present, Synchronized _Present,
2705 -- Interface_List and Interface_Present are used for abstract
2706 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2707
2708 -------------------------
2709 -- 3.8 Component List --
2710 -------------------------
2711
2712 -- COMPONENT_LIST ::=
2713 -- COMPONENT_ITEM {COMPONENT_ITEM}
2714 -- | {COMPONENT_ITEM} VARIANT_PART
2715 -- | null;
2716
2717 -- N_Component_List
2718 -- Sloc points to first token of component list
2719 -- Component_Items (List3)
2720 -- Variant_Part (Node4) (set to Empty if no variant part)
2721 -- Null_Present (Flag13)
2722
2723 -------------------------
2724 -- 3.8 Component Item --
2725 -------------------------
2726
2727 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
2728
2729 -- Note: A component item can also be a pragma, and in the tree
2730 -- that is obtained after semantic processing, a component item
2731 -- can be an N_Null node resulting from a non-recognized pragma.
2732
2733 --------------------------------
2734 -- 3.8 Component Declaration --
2735 --------------------------------
2736
2737 -- COMPONENT_DECLARATION ::=
2738 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
2739 -- [:= DEFAULT_EXPRESSION]
2740
2741 -- Note: although the syntax does not permit a component definition to
2742 -- be an anonymous array (and the parser will diagnose such an attempt
2743 -- with an appropriate message), it is possible for anonymous arrays
2744 -- to appear as component definitions. The semantics and back end handle
2745 -- this case properly, and the expander in fact generates such cases.
2746
2747 -- Although the syntax allows multiple identifiers in the list, the
2748 -- semantics is as though successive declarations were given with the
2749 -- same component definition and expression components. To simplify
2750 -- semantic processing, the parser represents a multiple declaration
2751 -- case as a sequence of single declarations, using the More_Ids and
2752 -- Prev_Ids flags to preserve the original source form as described
2753 -- in the section on "Handling of Defining Identifier Lists".
2754
2755 -- N_Component_Declaration
2756 -- Sloc points to first identifier
2757 -- Defining_Identifier (Node1)
2758 -- Component_Definition (Node4)
2759 -- Expression (Node3) (set to Empty if no default expression)
2760 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2761 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2762
2763 -------------------------
2764 -- 3.8.1 Variant Part --
2765 -------------------------
2766
2767 -- VARIANT_PART ::=
2768 -- case discriminant_DIRECT_NAME is
2769 -- VARIANT
2770 -- {VARIANT}
2771 -- end case;
2772
2773 -- Note: the variants list can contain pragmas as well as variants.
2774 -- In a properly formed program there is at least one variant.
2775
2776 -- N_Variant_Part
2777 -- Sloc points to CASE
2778 -- Name (Node2)
2779 -- Variants (List1)
2780
2781 --------------------
2782 -- 3.8.1 Variant --
2783 --------------------
2784
2785 -- VARIANT ::=
2786 -- when DISCRETE_CHOICE_LIST =>
2787 -- COMPONENT_LIST
2788
2789 -- N_Variant
2790 -- Sloc points to WHEN
2791 -- Discrete_Choices (List4)
2792 -- Component_List (Node1)
2793 -- Enclosing_Variant (Node2-Sem)
2794 -- Present_Expr (Uint3-Sem)
2795 -- Dcheck_Function (Node5-Sem)
2796
2797 ---------------------------------
2798 -- 3.8.1 Discrete Choice List --
2799 ---------------------------------
2800
2801 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
2802
2803 ----------------------------
2804 -- 3.8.1 Discrete Choice --
2805 ----------------------------
2806
2807 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
2808
2809 -- Note: in Ada 83 mode, the expression must be a simple expression
2810
2811 -- The only choice that appears explicitly is the OTHERS choice, as
2812 -- defined here. Other cases of discrete choice (expression and
2813 -- discrete range) appear directly. This production is also used
2814 -- for the OTHERS possibility of an exception choice.
2815
2816 -- Note: in accordance with the syntax, the parser does not check that
2817 -- OTHERS appears at the end on its own in a choice list context. This
2818 -- is a semantic check.
2819
2820 -- N_Others_Choice
2821 -- Sloc points to OTHERS
2822 -- Others_Discrete_Choices (List1-Sem)
2823 -- All_Others (Flag11-Sem)
2824
2825 ----------------------------------
2826 -- 3.9.1 Record Extension Part --
2827 ----------------------------------
2828
2829 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
2830
2831 -- Note: record extension parts are not permitted in Ada 83 mode
2832
2833 --------------------------------------
2834 -- 3.9.4 Interface Type Definition --
2835 --------------------------------------
2836
2837 -- INTERFACE_TYPE_DEFINITION ::=
2838 -- [limited | task | protected | synchronized]
2839 -- interface [interface_list]
2840
2841 -- Note: Interfaces are implemented with N_Record_Definition and
2842 -- N_Derived_Type_Definition nodes because most of the support
2843 -- for the analysis of abstract types has been reused to
2844 -- analyze abstract interfaces.
2845
2846 ----------------------------------
2847 -- 3.10 Access Type Definition --
2848 ----------------------------------
2849
2850 -- ACCESS_TYPE_DEFINITION ::=
2851 -- ACCESS_TO_OBJECT_DEFINITION
2852 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2853
2854 --------------------------
2855 -- 3.10 Null Exclusion --
2856 --------------------------
2857
2858 -- NULL_EXCLUSION ::= not null
2859
2860 ---------------------------------------
2861 -- 3.10 Access To Object Definition --
2862 ---------------------------------------
2863
2864 -- ACCESS_TO_OBJECT_DEFINITION ::=
2865 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
2866 -- SUBTYPE_INDICATION
2867
2868 -- N_Access_To_Object_Definition
2869 -- Sloc points to ACCESS
2870 -- All_Present (Flag15)
2871 -- Null_Exclusion_Present (Flag11)
2872 -- Subtype_Indication (Node5)
2873 -- Constant_Present (Flag17)
2874
2875 -----------------------------------
2876 -- 3.10 General Access Modifier --
2877 -----------------------------------
2878
2879 -- GENERAL_ACCESS_MODIFIER ::= all | constant
2880
2881 -- Note: general access modifiers are not permitted in Ada 83 mode
2882
2883 -- There is no explicit node in the tree for general access modifier.
2884 -- Instead the All_Present or Constant_Present flags are set in the
2885 -- parent node.
2886
2887 -------------------------------------------
2888 -- 3.10 Access To Subprogram Definition --
2889 -------------------------------------------
2890
2891 -- ACCESS_TO_SUBPROGRAM_DEFINITION
2892 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
2893 -- | [NULL_EXCLUSION] access [protected] function
2894 -- PARAMETER_AND_RESULT_PROFILE
2895
2896 -- Note: access to subprograms are not permitted in Ada 83 mode
2897
2898 -- N_Access_Function_Definition
2899 -- Sloc points to ACCESS
2900 -- Null_Exclusion_Present (Flag11)
2901 -- Null_Exclusion_In_Return_Present (Flag14)
2902 -- Protected_Present (Flag6)
2903 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2904 -- Result_Definition (Node4) result subtype (subtype mark or access def)
2905
2906 -- N_Access_Procedure_Definition
2907 -- Sloc points to ACCESS
2908 -- Null_Exclusion_Present (Flag11)
2909 -- Protected_Present (Flag6)
2910 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2911
2912 -----------------------------
2913 -- 3.10 Access Definition --
2914 -----------------------------
2915
2916 -- ACCESS_DEFINITION ::=
2917 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
2918 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2919
2920 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
2921
2922 -- N_Access_Definition
2923 -- Sloc points to ACCESS
2924 -- Null_Exclusion_Present (Flag11)
2925 -- All_Present (Flag15)
2926 -- Constant_Present (Flag17)
2927 -- Subtype_Mark (Node4)
2928 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
2929
2930 -----------------------------------------
2931 -- 3.10.1 Incomplete Type Declaration --
2932 -----------------------------------------
2933
2934 -- INCOMPLETE_TYPE_DECLARATION ::=
2935 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
2936
2937 -- N_Incomplete_Type_Declaration
2938 -- Sloc points to TYPE
2939 -- Defining_Identifier (Node1)
2940 -- Discriminant_Specifications (List4) (set to No_List if no
2941 -- discriminant part, or if the discriminant part is an
2942 -- unknown discriminant part)
2943 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
2944 -- Tagged_Present (Flag15)
2945
2946 ----------------------------
2947 -- 3.11 Declarative Part --
2948 ----------------------------
2949
2950 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
2951
2952 -- Note: although the parser enforces the syntactic requirement that
2953 -- a declarative part can contain only declarations, the semantic
2954 -- processing may add statements to the list of actions in a
2955 -- declarative part, so the code generator should be prepared
2956 -- to accept a statement in this position.
2957
2958 ----------------------------
2959 -- 3.11 Declarative Item --
2960 ----------------------------
2961
2962 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
2963
2964 ----------------------------------
2965 -- 3.11 Basic Declarative Item --
2966 ----------------------------------
2967
2968 -- BASIC_DECLARATIVE_ITEM ::=
2969 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
2970
2971 ----------------
2972 -- 3.11 Body --
2973 ----------------
2974
2975 -- BODY ::= PROPER_BODY | BODY_STUB
2976
2977 -----------------------
2978 -- 3.11 Proper Body --
2979 -----------------------
2980
2981 -- PROPER_BODY ::=
2982 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
2983
2984 ---------------
2985 -- 4.1 Name --
2986 ---------------
2987
2988 -- NAME ::=
2989 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
2990 -- | INDEXED_COMPONENT | SLICE
2991 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
2992 -- | TYPE_CONVERSION | FUNCTION_CALL
2993 -- | CHARACTER_LITERAL
2994
2995 ----------------------
2996 -- 4.1 Direct Name --
2997 ----------------------
2998
2999 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3000
3001 -----------------
3002 -- 4.1 Prefix --
3003 -----------------
3004
3005 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3006
3007 -------------------------------
3008 -- 4.1 Explicit Dereference --
3009 -------------------------------
3010
3011 -- EXPLICIT_DEREFERENCE ::= NAME . all
3012
3013 -- N_Explicit_Dereference
3014 -- Sloc points to ALL
3015 -- Prefix (Node3)
3016 -- Actual_Designated_Subtype (Node4-Sem)
3017 -- plus fields for expression
3018
3019 -------------------------------
3020 -- 4.1 Implicit Dereference --
3021 -------------------------------
3022
3023 -- IMPLICIT_DEREFERENCE ::= NAME
3024
3025 ------------------------------
3026 -- 4.1.1 Indexed Component --
3027 ------------------------------
3028
3029 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3030
3031 -- Note: the parser may generate this node in some situations where it
3032 -- should be a function call. The semantic pass must correct this
3033 -- misidentification (which is inevitable at the parser level).
3034
3035 -- N_Indexed_Component
3036 -- Sloc contains a copy of the Sloc value of the Prefix
3037 -- Prefix (Node3)
3038 -- Expressions (List1)
3039 -- plus fields for expression
3040
3041 -- Note: if any of the subscripts requires a range check, then the
3042 -- Do_Range_Check flag is set on the corresponding expression, with
3043 -- the index type being determined from the type of the Prefix, which
3044 -- references the array being indexed.
3045
3046 -- Note: in a fully analyzed and expanded indexed component node, and
3047 -- hence in any such node that gigi sees, if the prefix is an access
3048 -- type, then an explicit dereference operation has been inserted.
3049
3050 ------------------
3051 -- 4.1.2 Slice --
3052 ------------------
3053
3054 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3055
3056 -- Note: an implicit subtype is created to describe the resulting
3057 -- type, so that the bounds of this type are the bounds of the slice.
3058
3059 -- N_Slice
3060 -- Sloc points to first token of prefix
3061 -- Prefix (Node3)
3062 -- Discrete_Range (Node4)
3063 -- plus fields for expression
3064
3065 -------------------------------
3066 -- 4.1.3 Selected Component --
3067 -------------------------------
3068
3069 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3070
3071 -- Note: selected components that are semantically expanded names get
3072 -- changed during semantic processing into the separate N_Expanded_Name
3073 -- node. See description of this node in the section on semantic nodes.
3074
3075 -- N_Selected_Component
3076 -- Sloc points to period
3077 -- Prefix (Node3)
3078 -- Selector_Name (Node2)
3079 -- Associated_Node (Node4-Sem)
3080 -- Do_Discriminant_Check (Flag13-Sem)
3081 -- Is_In_Discriminant_Check (Flag11-Sem)
3082 -- plus fields for expression
3083
3084 --------------------------
3085 -- 4.1.3 Selector Name --
3086 --------------------------
3087
3088 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3089
3090 --------------------------------
3091 -- 4.1.4 Attribute Reference --
3092 --------------------------------
3093
3094 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3095
3096 -- Note: the syntax is quite ambiguous at this point. Consider:
3097
3098 -- A'Length (X) X is part of the attribute designator
3099 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
3100 -- A'Class (X) X is the expression of a type conversion
3101
3102 -- It would be possible for the parser to distinguish these cases
3103 -- by looking at the attribute identifier. However, that would mean
3104 -- more work in introducing new implementation defined attributes,
3105 -- and also it would mean that special processing for attributes
3106 -- would be scattered around, instead of being centralized in the
3107 -- semantic routine that handles an N_Attribute_Reference node.
3108 -- Consequently, the parser in all the above cases stores the
3109 -- expression (X in these examples) as a single element list in
3110 -- in the Expressions field of the N_Attribute_Reference node.
3111
3112 -- Similarly, for attributes like Max which take two arguments,
3113 -- we store the two arguments as a two element list in the
3114 -- Expressions field. Of course it is clear at parse time that
3115 -- this case is really a function call with an attribute as the
3116 -- prefix, but it turns out to be convenient to handle the two
3117 -- argument case in a similar manner to the one argument case,
3118 -- and indeed in general the parser will accept any number of
3119 -- expressions in this position and store them as a list in the
3120 -- attribute reference node. This allows for future addition of
3121 -- attributes that take more than two arguments.
3122
3123 -- Note: named associates are not permitted in function calls where
3124 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
3125 -- to skip the normal subprogram argument processing.
3126
3127 -- Note: for the attributes whose designators are technically keywords,
3128 -- i.e. digits, access, delta, range, the Attribute_Name field contains
3129 -- the corresponding name, even though no identifier is involved.
3130
3131 -- Note: the generated code may contain stream attributes applied to
3132 -- limited types for which no stream routines exist officially. In such
3133 -- case, the result is to use the stream attribute for the underlying
3134 -- full type, or in the case of a protected type, the components
3135 -- (including any discriminants) are merely streamed in order.
3136
3137 -- See Exp_Attr for a complete description of which attributes are
3138 -- passed onto Gigi, and which are handled entirely by the front end.
3139
3140 -- Gigi restriction: For the Pos attribute, the prefix cannot be
3141 -- a non-standard enumeration type or a nonzero/zero semantics
3142 -- boolean type, so the value is simply the stored representation.
3143
3144 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
3145 -- references a subprogram that is a renaming, then the front end must
3146 -- rewrite the attribute to refer directly to the renamed entity.
3147
3148 -- Note: In generated code, the Address and Unrestricted_Access
3149 -- attributes can be applied to any expression, and the meaning is
3150 -- to create an object containing the value (the object is in the
3151 -- current stack frame), and pass the address of this value. If the
3152 -- Must_Be_Byte_Aligned flag is set, then the object whose address
3153 -- is taken must be on a byte (storage unit) boundary, and if it is
3154 -- not (or may not be), then the generated code must create a copy
3155 -- that is byte aligned, and pass the address of this copy.
3156
3157 -- N_Attribute_Reference
3158 -- Sloc points to apostrophe
3159 -- Prefix (Node3)
3160 -- Attribute_Name (Name2) identifier name from attribute designator
3161 -- Expressions (List1) (set to No_List if no associated expressions)
3162 -- Entity (Node4-Sem) used if the attribute yields a type
3163 -- Associated_Node (Node4-Sem)
3164 -- Do_Overflow_Check (Flag17-Sem)
3165 -- Redundant_Use (Flag13-Sem)
3166 -- Must_Be_Byte_Aligned (Flag14)
3167 -- plus fields for expression
3168
3169 ---------------------------------
3170 -- 4.1.4 Attribute Designator --
3171 ---------------------------------
3172
3173 -- ATTRIBUTE_DESIGNATOR ::=
3174 -- IDENTIFIER [(static_EXPRESSION)]
3175 -- | access | delta | digits
3176
3177 -- There is no explicit node in the tree for an attribute designator.
3178 -- Instead the Attribute_Name and Expressions fields of the parent
3179 -- node (N_Attribute_Reference node) hold the information.
3180
3181 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
3182 -- designator, then they are treated as identifiers internally
3183 -- rather than the keywords of the same name.
3184
3185 --------------------------------------
3186 -- 4.1.4 Range Attribute Reference --
3187 --------------------------------------
3188
3189 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3190
3191 -- A range attribute reference is represented in the tree using the
3192 -- normal N_Attribute_Reference node.
3193
3194 ---------------------------------------
3195 -- 4.1.4 Range Attribute Designator --
3196 ---------------------------------------
3197
3198 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3199
3200 -- A range attribute designator is represented in the tree using the
3201 -- normal N_Attribute_Reference node.
3202
3203 --------------------
3204 -- 4.3 Aggregate --
3205 --------------------
3206
3207 -- AGGREGATE ::=
3208 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3209
3210 -----------------------------
3211 -- 4.3.1 Record Aggregate --
3212 -----------------------------
3213
3214 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3215
3216 -- N_Aggregate
3217 -- Sloc points to left parenthesis
3218 -- Expressions (List1) (set to No_List if none or null record case)
3219 -- Component_Associations (List2) (set to No_List if none)
3220 -- Null_Record_Present (Flag17)
3221 -- Aggregate_Bounds (Node3-Sem)
3222 -- Associated_Node (Node4-Sem)
3223 -- Static_Processing_OK (Flag4-Sem)
3224 -- Compile_Time_Known_Aggregate (Flag18-Sem)
3225 -- Expansion_Delayed (Flag11-Sem)
3226 -- Has_Self_Reference (Flag13-Sem)
3227 -- plus fields for expression
3228
3229 -- Note: this structure is used for both record and array aggregates
3230 -- since the two cases are not separable by the parser. The parser
3231 -- makes no attempt to enforce consistency here, so it is up to the
3232 -- semantic phase to make sure that the aggregate is consistent (i.e.
3233 -- that it is not a "half-and-half" case that mixes record and array
3234 -- syntax. In particular, for a record aggregate, the expressions
3235 -- field will be set if there are positional associations.
3236
3237 -- Note: N_Aggregate is not used for all aggregates; in particular,
3238 -- there is a separate node kind for extension aggregates.
3239
3240 -- Note: gigi/gcc can handle array aggregates correctly providing that
3241 -- they are entirely positional, and the array subtype involved has a
3242 -- known at compile time length and is not bit packed, or a convention
3243 -- Fortran array with more than one dimension. If these conditions
3244 -- are not met, then the front end must translate the aggregate into
3245 -- an appropriate set of assignments into a temporary.
3246
3247 -- Note: for the record aggregate case, gigi/gcc can handle all cases
3248 -- of record aggregates, including those for packed, and rep-claused
3249 -- records, and also variant records, providing that there are no
3250 -- variable length fields whose size is not known at runtime, and
3251 -- providing that the aggregate is presented in fully named form.
3252
3253 ----------------------------------------------
3254 -- 4.3.1 Record Component Association List --
3255 ----------------------------------------------
3256
3257 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
3258 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3259 -- | null record
3260
3261 -- There is no explicit node in the tree for a record component
3262 -- association list. Instead the Null_Record_Present flag is set in
3263 -- the parent node for the NULL RECORD case.
3264
3265 ------------------------------------------------------
3266 -- 4.3.1 Record Component Association (also 4.3.3) --
3267 ------------------------------------------------------
3268
3269 -- RECORD_COMPONENT_ASSOCIATION ::=
3270 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
3271
3272 -- N_Component_Association
3273 -- Sloc points to first selector name
3274 -- Choices (List1)
3275 -- Loop_Actions (List2-Sem)
3276 -- Expression (Node3)
3277 -- Box_Present (Flag15)
3278
3279 -- Note: this structure is used for both record component associations
3280 -- and array component associations, since the two cases aren't always
3281 -- separable by the parser. The choices list may represent either a
3282 -- list of selector names in the record aggregate case, or a list of
3283 -- discrete choices in the array aggregate case or an N_Others_Choice
3284 -- node (which appears as a singleton list). Box_Present gives support
3285 -- to Ada 2005 (AI-287).
3286
3287 ----------------------------------
3288 -- 4.3.1 Component Choice List --
3289 ----------------------------------
3290
3291 -- COMPONENT_CHOICE_LIST ::=
3292 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
3293 -- | others
3294
3295 -- The entries of a component choice list appear in the Choices list of
3296 -- the associated N_Component_Association, as either selector names, or
3297 -- as an N_Others_Choice node.
3298
3299 --------------------------------
3300 -- 4.3.2 Extension Aggregate --
3301 --------------------------------
3302
3303 -- EXTENSION_AGGREGATE ::=
3304 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3305
3306 -- Note: extension aggregates are not permitted in Ada 83 mode
3307
3308 -- N_Extension_Aggregate
3309 -- Sloc points to left parenthesis
3310 -- Ancestor_Part (Node3)
3311 -- Associated_Node (Node4-Sem)
3312 -- Expressions (List1) (set to No_List if none or null record case)
3313 -- Component_Associations (List2) (set to No_List if none)
3314 -- Null_Record_Present (Flag17)
3315 -- Expansion_Delayed (Flag11-Sem)
3316 -- Has_Self_Reference (Flag13-Sem)
3317 -- plus fields for expression
3318
3319 --------------------------
3320 -- 4.3.2 Ancestor Part --
3321 --------------------------
3322
3323 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3324
3325 ----------------------------
3326 -- 4.3.3 Array Aggregate --
3327 ----------------------------
3328
3329 -- ARRAY_AGGREGATE ::=
3330 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3331
3332 ---------------------------------------
3333 -- 4.3.3 Positional Array Aggregate --
3334 ---------------------------------------
3335
3336 -- POSITIONAL_ARRAY_AGGREGATE ::=
3337 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3338 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3339
3340 -- See Record_Aggregate (4.3.1) for node structure
3341
3342 ----------------------------------
3343 -- 4.3.3 Named Array Aggregate --
3344 ----------------------------------
3345
3346 -- NAMED_ARRAY_AGGREGATE ::=
3347 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3348
3349 -- See Record_Aggregate (4.3.1) for node structure
3350
3351 ----------------------------------------
3352 -- 4.3.3 Array Component Association --
3353 ----------------------------------------
3354
3355 -- ARRAY_COMPONENT_ASSOCIATION ::=
3356 -- DISCRETE_CHOICE_LIST => EXPRESSION
3357
3358 -- See Record_Component_Association (4.3.1) for node structure
3359
3360 --------------------------------------------------
3361 -- 4.4 Expression/Relation/Term/Factor/Primary --
3362 --------------------------------------------------
3363
3364 -- EXPRESSION ::=
3365 -- RELATION {and RELATION} | RELATION {and then RELATION}
3366 -- | RELATION {or RELATION} | RELATION {or else RELATION}
3367 -- | RELATION {xor RELATION}
3368
3369 -- RELATION ::=
3370 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3371 -- | SIMPLE_EXPRESSION [not] in RANGE
3372 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3373
3374 -- SIMPLE_EXPRESSION ::=
3375 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3376
3377 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3378
3379 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3380
3381 -- No nodes are generated for any of these constructs. Instead, the
3382 -- node for the operator appears directly. When we refer to an
3383 -- expression in this description, we mean any of the possible
3384 -- constituent components of an expression (e.g. identifier is
3385 -- an example of an expression).
3386
3387 ------------------
3388 -- 4.4 Primary --
3389 ------------------
3390
3391 -- PRIMARY ::=
3392 -- NUMERIC_LITERAL | null
3393 -- | STRING_LITERAL | AGGREGATE
3394 -- | NAME | QUALIFIED_EXPRESSION
3395 -- | ALLOCATOR | (EXPRESSION)
3396
3397 -- Usually there is no explicit node in the tree for primary. Instead
3398 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3399 -- exceptions. First, there is an explicit node for a null primary.
3400
3401 -- N_Null
3402 -- Sloc points to NULL
3403 -- plus fields for expression
3404
3405 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3406 -- that the parser keep track of which subexpressions are enclosed
3407 -- in parentheses, and how many levels of parentheses are used. This
3408 -- information is required for optimization purposes, and also for
3409 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3410 -- conform with ((((1)))) in the body).
3411
3412 -- The parentheses are recorded by keeping a Paren_Count field in every
3413 -- subexpression node (it is actually present in all nodes, but only
3414 -- used in subexpression nodes). This count records the number of
3415 -- levels of parentheses. If the number of levels in the source exceeds
3416 -- the maximum accommodated by this count, then the count is simply left
3417 -- at the maximum value. This means that there are some pathological
3418 -- cases of failure to detect conformance failures (e.g. an expression
3419 -- with 500 levels of parens will conform with one with 501 levels),
3420 -- but we do not need to lose sleep over this.
3421
3422 -- Historical note: in versions of GNAT prior to 1.75, there was a node
3423 -- type N_Parenthesized_Expression used to accurately record unlimited
3424 -- numbers of levels of parentheses. However, it turned out to be a
3425 -- real nuisance to have to take into account the possible presence of
3426 -- this node during semantic analysis, since basically parentheses have
3427 -- zero relevance to semantic analysis.
3428
3429 -- Note: the level of parentheses always present in things like
3430 -- aggregates does not count, only the parentheses in the primary
3431 -- (EXPRESSION) affect the setting of the Paren_Count field.
3432
3433 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
3434 -- treated as though it were Empty) if No_Initialization is set True.
3435
3436 --------------------------------------
3437 -- 4.5 Short Circuit Control Forms --
3438 --------------------------------------
3439
3440 -- EXPRESSION ::=
3441 -- RELATION {and then RELATION} | RELATION {or else RELATION}
3442
3443 -- Gigi restriction: For both these control forms, the operand and
3444 -- result types are always Standard.Boolean. The expander inserts the
3445 -- required conversion operations where needed to ensure this is the
3446 -- case.
3447
3448 -- N_And_Then
3449 -- Sloc points to AND of AND THEN
3450 -- Left_Opnd (Node2)
3451 -- Right_Opnd (Node3)
3452 -- Actions (List1-Sem)
3453 -- plus fields for expression
3454
3455 -- N_Or_Else
3456 -- Sloc points to OR of OR ELSE
3457 -- Left_Opnd (Node2)
3458 -- Right_Opnd (Node3)
3459 -- Actions (List1-Sem)
3460 -- plus fields for expression
3461
3462 -- Note: The Actions field is used to hold actions associated with
3463 -- the right hand operand. These have to be treated specially since
3464 -- they are not unconditionally executed. See Insert_Actions for a
3465 -- more detailed description of how these actions are handled.
3466
3467 ---------------------------
3468 -- 4.5 Membership Tests --
3469 ---------------------------
3470
3471 -- RELATION ::=
3472 -- SIMPLE_EXPRESSION [not] in RANGE
3473 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3474
3475 -- Note: although the grammar above allows only a range or a
3476 -- subtype mark, the parser in fact will accept any simple
3477 -- expression in place of a subtype mark. This means that the
3478 -- semantic analyzer must be prepared to deal with, and diagnose
3479 -- a simple expression other than a name for the right operand.
3480 -- This simplifies error recovery in the parser.
3481
3482 -- N_In
3483 -- Sloc points to IN
3484 -- Left_Opnd (Node2)
3485 -- Right_Opnd (Node3)
3486 -- plus fields for expression
3487
3488 -- N_Not_In
3489 -- Sloc points to NOT of NOT IN
3490 -- Left_Opnd (Node2)
3491 -- Right_Opnd (Node3)
3492 -- plus fields for expression
3493
3494 --------------------
3495 -- 4.5 Operators --
3496 --------------------
3497
3498 -- LOGICAL_OPERATOR ::= and | or | xor
3499
3500 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
3501
3502 -- BINARY_ADDING_OPERATOR ::= + | - | &
3503
3504 -- UNARY_ADDING_OPERATOR ::= + | -
3505
3506 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
3507
3508 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
3509
3510 -- Sprint syntax if Treat_Fixed_As_Integer is set:
3511
3512 -- x #* y
3513 -- x #/ y
3514 -- x #mod y
3515 -- x #rem y
3516
3517 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
3518 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
3519 -- All handling of smalls for multiplication and division is handled
3520 -- by the front end (mod and rem result only from expansion). Gigi
3521 -- thus never needs to worry about small values (for other operators
3522 -- operating on fixed-point, e.g. addition, the small value does not
3523 -- have any semantic effect anyway, these are always integer operations.
3524
3525 -- Gigi restriction: For all operators taking Boolean operands, the
3526 -- type is always Standard.Boolean. The expander inserts the required
3527 -- conversion operations where needed to ensure this is the case.
3528
3529 -- N_Op_And
3530 -- Sloc points to AND
3531 -- Do_Length_Check (Flag4-Sem)
3532 -- plus fields for binary operator
3533 -- plus fields for expression
3534
3535 -- N_Op_Or
3536 -- Sloc points to OR
3537 -- Do_Length_Check (Flag4-Sem)
3538 -- plus fields for binary operator
3539 -- plus fields for expression
3540
3541 -- N_Op_Xor
3542 -- Sloc points to XOR
3543 -- Do_Length_Check (Flag4-Sem)
3544 -- plus fields for binary operator
3545 -- plus fields for expression
3546
3547 -- N_Op_Eq
3548 -- Sloc points to =
3549 -- plus fields for binary operator
3550 -- plus fields for expression
3551
3552 -- N_Op_Ne
3553 -- Sloc points to /=
3554 -- plus fields for binary operator
3555 -- plus fields for expression
3556
3557 -- N_Op_Lt
3558 -- Sloc points to <
3559 -- plus fields for binary operator
3560 -- plus fields for expression
3561
3562 -- N_Op_Le
3563 -- Sloc points to <=
3564 -- plus fields for binary operator
3565 -- plus fields for expression
3566
3567 -- N_Op_Gt
3568 -- Sloc points to >
3569 -- plus fields for binary operator
3570 -- plus fields for expression
3571
3572 -- N_Op_Ge
3573 -- Sloc points to >=
3574 -- plus fields for binary operator
3575 -- plus fields for expression
3576
3577 -- N_Op_Add
3578 -- Sloc points to + (binary)
3579 -- plus fields for binary operator
3580 -- plus fields for expression
3581
3582 -- N_Op_Subtract
3583 -- Sloc points to - (binary)
3584 -- plus fields for binary operator
3585 -- plus fields for expression
3586
3587 -- N_Op_Concat
3588 -- Sloc points to &
3589 -- Is_Component_Left_Opnd (Flag13-Sem)
3590 -- Is_Component_Right_Opnd (Flag14-Sem)
3591 -- plus fields for binary operator
3592 -- plus fields for expression
3593
3594 -- N_Op_Multiply
3595 -- Sloc points to *
3596 -- Treat_Fixed_As_Integer (Flag14-Sem)
3597 -- Rounded_Result (Flag18-Sem)
3598 -- plus fields for binary operator
3599 -- plus fields for expression
3600
3601 -- N_Op_Divide
3602 -- Sloc points to /
3603 -- Treat_Fixed_As_Integer (Flag14-Sem)
3604 -- Do_Division_Check (Flag13-Sem)
3605 -- Rounded_Result (Flag18-Sem)
3606 -- plus fields for binary operator
3607 -- plus fields for expression
3608
3609 -- N_Op_Mod
3610 -- Sloc points to MOD
3611 -- Treat_Fixed_As_Integer (Flag14-Sem)
3612 -- Do_Division_Check (Flag13-Sem)
3613 -- plus fields for binary operator
3614 -- plus fields for expression
3615
3616 -- N_Op_Rem
3617 -- Sloc points to REM
3618 -- Treat_Fixed_As_Integer (Flag14-Sem)
3619 -- Do_Division_Check (Flag13-Sem)
3620 -- plus fields for binary operator
3621 -- plus fields for expression
3622
3623 -- N_Op_Expon
3624 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
3625 -- Sloc points to **
3626 -- plus fields for binary operator
3627 -- plus fields for expression
3628
3629 -- N_Op_Plus
3630 -- Sloc points to + (unary)
3631 -- plus fields for unary operator
3632 -- plus fields for expression
3633
3634 -- N_Op_Minus
3635 -- Sloc points to - (unary)
3636 -- plus fields for unary operator
3637 -- plus fields for expression
3638
3639 -- N_Op_Abs
3640 -- Sloc points to ABS
3641 -- plus fields for unary operator
3642 -- plus fields for expression
3643
3644 -- N_Op_Not
3645 -- Sloc points to NOT
3646 -- plus fields for unary operator
3647 -- plus fields for expression
3648
3649 -- See also shift operators in section B.2
3650
3651 -- Note on fixed-point operations passed to Gigi: For adding operators,
3652 -- the semantics is to treat these simply as integer operations, with
3653 -- the small values being ignored (the bounds are already stored in
3654 -- units of small, so that constraint checking works as usual). For the
3655 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
3656 -- point operands if the Treat_Fixed_As_Integer flag is set and will
3657 -- thus treat these nodes in identical manner, ignoring small values.
3658
3659 --------------------------
3660 -- 4.6 Type Conversion --
3661 --------------------------
3662
3663 -- TYPE_CONVERSION ::=
3664 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
3665
3666 -- In the (NAME) case, the name is stored as the expression
3667
3668 -- Note: the parser never generates a type conversion node, since it
3669 -- looks like an indexed component which is generated by preference.
3670 -- The semantic pass must correct this misidentification.
3671
3672 -- Gigi handles conversions that involve no change in the root type,
3673 -- and also all conversions from integer to floating-point types.
3674 -- Conversions from floating-point to integer are only handled in
3675 -- the case where Float_Truncate flag set. Other conversions from
3676 -- floating-point to integer (involving rounding) and all conversions
3677 -- involving fixed-point types are handled by the expander.
3678
3679 -- Sprint syntax if Float_Truncate set: X^(Y)
3680 -- Sprint syntax if Conversion_OK set X?(Y)
3681 -- Sprint syntax if both flags set X?^(Y)
3682
3683 -- Note: If either the operand or result type is fixed-point, Gigi will
3684 -- only see a type conversion node with Conversion_OK set. The front end
3685 -- takes care of all handling of small's for fixed-point conversions.
3686
3687 -- N_Type_Conversion
3688 -- Sloc points to first token of subtype mark
3689 -- Subtype_Mark (Node4)
3690 -- Expression (Node3)
3691 -- Do_Tag_Check (Flag13-Sem)
3692 -- Do_Length_Check (Flag4-Sem)
3693 -- Do_Overflow_Check (Flag17-Sem)
3694 -- Float_Truncate (Flag11-Sem)
3695 -- Rounded_Result (Flag18-Sem)
3696 -- Conversion_OK (Flag14-Sem)
3697 -- plus fields for expression
3698
3699 -- Note: if a range check is required, then the Do_Range_Check flag
3700 -- is set in the Expression with the check being done against the
3701 -- target type range (after the base type conversion, if any).
3702
3703 -------------------------------
3704 -- 4.7 Qualified Expression --
3705 -------------------------------
3706
3707 -- QUALIFIED_EXPRESSION ::=
3708 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
3709
3710 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
3711 -- the expression, so the Expression field of this node always points
3712 -- to a parenthesized expression in this case (i.e. Paren_Count will
3713 -- always be non-zero for the referenced expression if it is not an
3714 -- aggregate).
3715
3716 -- N_Qualified_Expression
3717 -- Sloc points to apostrophe
3718 -- Subtype_Mark (Node4)
3719 -- Expression (Node3) expression or aggregate
3720 -- plus fields for expression
3721
3722 --------------------
3723 -- 4.8 Allocator --
3724 --------------------
3725
3726 -- ALLOCATOR ::=
3727 -- new [NULL_EXCLUSION] SUBTYPE_INDICATION | new QUALIFIED_EXPRESSION
3728
3729 -- Sprint syntax (when storage pool present)
3730 -- new xxx (storage_pool = pool)
3731
3732 -- N_Allocator
3733 -- Sloc points to NEW
3734 -- Expression (Node3) subtype indication or qualified expression
3735 -- Storage_Pool (Node1-Sem)
3736 -- Procedure_To_Call (Node2-Sem)
3737 -- Coextensions (Elist4-Sem)
3738 -- Null_Exclusion_Present (Flag11)
3739 -- No_Initialization (Flag13-Sem)
3740 -- Is_Static_Coextension (Flag14-Sem)
3741 -- Do_Storage_Check (Flag17-Sem)
3742 -- Is_Dynamic_Coextension (Flag18-Sem)
3743 -- plus fields for expression
3744
3745 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
3746 -- This flag has a special function in conjunction with the restriction
3747 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
3748 -- is not set. This means that if a source allocator is replaced with
3749 -- a constructed allocator, the Comes_From_Source flag should be copied
3750 -- to the newly created allocator.
3751
3752 ---------------------------------
3753 -- 5.1 Sequence Of Statements --
3754 ---------------------------------
3755
3756 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
3757
3758 -- Note: Although the parser will not accept a declaration as a
3759 -- statement, the semantic analyzer may insert declarations (e.g.
3760 -- declarations of implicit types needed for execution of other
3761 -- statements) into a sequence of statements, so the code generator
3762 -- should be prepared to accept a declaration where a statement is
3763 -- expected. Note also that pragmas can appear as statements.
3764
3765 --------------------
3766 -- 5.1 Statement --
3767 --------------------
3768
3769 -- STATEMENT ::=
3770 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
3771
3772 -- There is no explicit node in the tree for a statement. Instead, the
3773 -- individual statement appears directly. Labels are treated as a
3774 -- kind of statement, i.e. they are linked into a statement list at
3775 -- the point they appear, so the labeled statement appears following
3776 -- the label or labels in the statement list.
3777
3778 ---------------------------
3779 -- 5.1 Simple Statement --
3780 ---------------------------
3781
3782 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
3783 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
3784 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
3785 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
3786 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
3787 -- | ABORT_STATEMENT | RAISE_STATEMENT
3788 -- | CODE_STATEMENT
3789
3790 -----------------------------
3791 -- 5.1 Compound Statement --
3792 -----------------------------
3793
3794 -- COMPOUND_STATEMENT ::=
3795 -- IF_STATEMENT | CASE_STATEMENT
3796 -- | LOOP_STATEMENT | BLOCK_STATEMENT
3797 -- | EXTENDED_RETURN_STATEMENT
3798 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
3799
3800 -------------------------
3801 -- 5.1 Null Statement --
3802 -------------------------
3803
3804 -- NULL_STATEMENT ::= null;
3805
3806 -- N_Null_Statement
3807 -- Sloc points to NULL
3808
3809 ----------------
3810 -- 5.1 Label --
3811 ----------------
3812
3813 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
3814
3815 -- Note that the occurrence of a label is not a defining identifier,
3816 -- but rather a referencing occurrence. The defining occurrence is
3817 -- in the implicit label declaration which occurs in the innermost
3818 -- enclosing block.
3819
3820 -- N_Label
3821 -- Sloc points to <<
3822 -- Identifier (Node1) direct name of statement identifier
3823 -- Exception_Junk (Flag8-Sem)
3824
3825 -------------------------------
3826 -- 5.1 Statement Identifier --
3827 -------------------------------
3828
3829 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
3830
3831 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
3832 -- (not an OPERATOR_SYMBOL)
3833
3834 -------------------------------
3835 -- 5.2 Assignment Statement --
3836 -------------------------------
3837
3838 -- ASSIGNMENT_STATEMENT ::=
3839 -- variable_NAME := EXPRESSION;
3840
3841 -- N_Assignment_Statement
3842 -- Sloc points to :=
3843 -- Name (Node2)
3844 -- Expression (Node3)
3845 -- Do_Tag_Check (Flag13-Sem)
3846 -- Do_Length_Check (Flag4-Sem)
3847 -- Forwards_OK (Flag5-Sem)
3848 -- Backwards_OK (Flag6-Sem)
3849 -- No_Ctrl_Actions (Flag7-Sem)
3850
3851 -- Note: if a range check is required, then the Do_Range_Check flag
3852 -- is set in the Expression (right hand side), with the check being
3853 -- done against the type of the Name (left hand side).
3854
3855 -- Note: the back end places some restrictions on the form of the
3856 -- Expression field. If the object being assigned to is Atomic, then
3857 -- the Expression may not have the form of an aggregate (since this
3858 -- might cause the back end to generate separate assignments). In this
3859 -- case the front end must generate an extra temporary and initialize
3860 -- this temporary as required (the temporary itself is not atomic).
3861
3862 -----------------------
3863 -- 5.3 If Statement --
3864 -----------------------
3865
3866 -- IF_STATEMENT ::=
3867 -- if CONDITION then
3868 -- SEQUENCE_OF_STATEMENTS
3869 -- {elsif CONDITION then
3870 -- SEQUENCE_OF_STATEMENTS}
3871 -- [else
3872 -- SEQUENCE_OF_STATEMENTS]
3873 -- end if;
3874
3875 -- Gigi restriction: This expander ensures that the type of the
3876 -- Condition fields is always Standard.Boolean, even if the type
3877 -- in the source is some non-standard boolean type.
3878
3879 -- N_If_Statement
3880 -- Sloc points to IF
3881 -- Condition (Node1)
3882 -- Then_Statements (List2)
3883 -- Elsif_Parts (List3) (set to No_List if none present)
3884 -- Else_Statements (List4) (set to No_List if no else part present)
3885 -- End_Span (Uint5) (set to No_Uint if expander generated)
3886
3887 -- N_Elsif_Part
3888 -- Sloc points to ELSIF
3889 -- Condition (Node1)
3890 -- Then_Statements (List2)
3891 -- Condition_Actions (List3-Sem)
3892
3893 --------------------
3894 -- 5.3 Condition --
3895 --------------------
3896
3897 -- CONDITION ::= boolean_EXPRESSION
3898
3899 -------------------------
3900 -- 5.4 Case Statement --
3901 -------------------------
3902
3903 -- CASE_STATEMENT ::=
3904 -- case EXPRESSION is
3905 -- CASE_STATEMENT_ALTERNATIVE
3906 -- {CASE_STATEMENT_ALTERNATIVE}
3907 -- end case;
3908
3909 -- Note: the Alternatives can contain pragmas. These only occur at
3910 -- the start of the list, since any pragmas occurring after the first
3911 -- alternative are absorbed into the corresponding statement sequence.
3912
3913 -- N_Case_Statement
3914 -- Sloc points to CASE
3915 -- Expression (Node3)
3916 -- Alternatives (List4)
3917 -- End_Span (Uint5) (set to No_Uint if expander generated)
3918
3919 -------------------------------------
3920 -- 5.4 Case Statement Alternative --
3921 -------------------------------------
3922
3923 -- CASE_STATEMENT_ALTERNATIVE ::=
3924 -- when DISCRETE_CHOICE_LIST =>
3925 -- SEQUENCE_OF_STATEMENTS
3926
3927 -- N_Case_Statement_Alternative
3928 -- Sloc points to WHEN
3929 -- Discrete_Choices (List4)
3930 -- Statements (List3)
3931
3932 -------------------------
3933 -- 5.5 Loop Statement --
3934 -------------------------
3935
3936 -- LOOP_STATEMENT ::=
3937 -- [loop_STATEMENT_IDENTIFIER :]
3938 -- [ITERATION_SCHEME] loop
3939 -- SEQUENCE_OF_STATEMENTS
3940 -- end loop [loop_IDENTIFIER];
3941
3942 -- Note: The occurrence of a loop label is not a defining identifier
3943 -- but rather a referencing occurrence. The defining occurrence is in
3944 -- the implicit label declaration which occurs in the innermost
3945 -- enclosing block.
3946
3947 -- Note: there is always a loop statement identifier present in
3948 -- the tree, even if none was given in the source. In the case where
3949 -- no loop identifier is given in the source, the parser creates
3950 -- a name of the form _Loop_n, where n is a decimal integer (the
3951 -- two underlines ensure that the loop names created in this manner
3952 -- do not conflict with any user defined identifiers), and the flag
3953 -- Has_Created_Identifier is set to True. The only exception to the
3954 -- rule that all loop statement nodes have identifiers occurs for
3955 -- loops constructed by the expander, and the semantic analyzer will
3956 -- create and supply dummy loop identifiers in these cases.
3957
3958 -- N_Loop_Statement
3959 -- Sloc points to LOOP
3960 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
3961 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
3962 -- Statements (List3)
3963 -- End_Label (Node4)
3964 -- Has_Created_Identifier (Flag15)
3965 -- Is_Null_Loop (Flag16)
3966 -- Suppress_Loop_Warnings (Flag17)
3967
3968 --------------------------
3969 -- 5.5 Iteration Scheme --
3970 --------------------------
3971
3972 -- ITERATION_SCHEME ::=
3973 -- while CONDITION | for LOOP_PARAMETER_SPECIFICATION
3974
3975 -- Gigi restriction: This expander ensures that the type of the
3976 -- Condition field is always Standard.Boolean, even if the type
3977 -- in the source is some non-standard boolean type.
3978
3979 -- N_Iteration_Scheme
3980 -- Sloc points to WHILE or FOR
3981 -- Condition (Node1) (set to Empty if FOR case)
3982 -- Condition_Actions (List3-Sem)
3983 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
3984
3985 ---------------------------------------
3986 -- 5.5 Loop parameter specification --
3987 ---------------------------------------
3988
3989 -- LOOP_PARAMETER_SPECIFICATION ::=
3990 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
3991
3992 -- N_Loop_Parameter_Specification
3993 -- Sloc points to first identifier
3994 -- Defining_Identifier (Node1)
3995 -- Reverse_Present (Flag15)
3996 -- Discrete_Subtype_Definition (Node4)
3997
3998 --------------------------
3999 -- 5.6 Block Statement --
4000 --------------------------
4001
4002 -- BLOCK_STATEMENT ::=
4003 -- [block_STATEMENT_IDENTIFIER:]
4004 -- [declare
4005 -- DECLARATIVE_PART]
4006 -- begin
4007 -- HANDLED_SEQUENCE_OF_STATEMENTS
4008 -- end [block_IDENTIFIER];
4009
4010 -- Note that the occurrence of a block identifier is not a defining
4011 -- identifier, but rather a referencing occurrence. The defining
4012 -- occurrence is an E_Block entity declared by the implicit label
4013 -- declaration which occurs in the innermost enclosing block statement
4014 -- or body; the block identifier denotes that E_Block.
4015
4016 -- For block statements that come from source code, there is always a
4017 -- block statement identifier present in the tree, denoting an
4018 -- E_Block. In the case where no block identifier is given in the
4019 -- source, the parser creates a name of the form B_n, where n is a
4020 -- decimal integer, and the flag Has_Created_Identifier is set to
4021 -- True. Blocks constructed by the expander usually have no identifier,
4022 -- and no corresponding entity.
4023
4024 -- Note: the block statement created for an extended return statement
4025 -- has an entity, and this entity is an E_Return_Statement, rather than
4026 -- the usual E_Block.
4027
4028 -- Note: Exception_Junk is set for the wrapping blocks created during
4029 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
4030
4031 -- N_Block_Statement
4032 -- Sloc points to DECLARE or BEGIN
4033 -- Identifier (Node1) block direct name (set to Empty if not present)
4034 -- Declarations (List2) (set to No_List if no DECLARE part)
4035 -- Handled_Statement_Sequence (Node4)
4036 -- Is_Task_Master (Flag5-Sem)
4037 -- Activation_Chain_Entity (Node3-Sem)
4038 -- Has_Created_Identifier (Flag15)
4039 -- Is_Task_Allocation_Block (Flag6)
4040 -- Is_Asynchronous_Call_Block (Flag7)
4041 -- Exception_Junk (Flag8-Sem)
4042
4043 -------------------------
4044 -- 5.7 Exit Statement --
4045 -------------------------
4046
4047 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
4048
4049 -- Gigi restriction: This expander ensures that the type of the
4050 -- Condition field is always Standard.Boolean, even if the type
4051 -- in the source is some non-standard boolean type.
4052
4053 -- N_Exit_Statement
4054 -- Sloc points to EXIT
4055 -- Name (Node2) (set to Empty if no loop name present)
4056 -- Condition (Node1) (set to Empty if no when part present)
4057
4058 -------------------------
4059 -- 5.9 Goto Statement --
4060 -------------------------
4061
4062 -- GOTO_STATEMENT ::= goto label_NAME;
4063
4064 -- N_Goto_Statement
4065 -- Sloc points to GOTO
4066 -- Name (Node2)
4067 -- Exception_Junk (Flag8-Sem)
4068
4069 ---------------------------------
4070 -- 6.1 Subprogram Declaration --
4071 ---------------------------------
4072
4073 -- SUBPROGRAM_DECLARATION ::= SUBPROGRAM_SPECIFICATION;
4074
4075 -- N_Subprogram_Declaration
4076 -- Sloc points to FUNCTION or PROCEDURE
4077 -- Specification (Node1)
4078 -- Body_To_Inline (Node3-Sem)
4079 -- Corresponding_Body (Node5-Sem)
4080 -- Parent_Spec (Node4-Sem)
4081
4082 ------------------------------------------
4083 -- 6.1 Abstract Subprogram Declaration --
4084 ------------------------------------------
4085
4086 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
4087 -- SUBPROGRAM_SPECIFICATION is abstract;
4088
4089 -- N_Abstract_Subprogram_Declaration
4090 -- Sloc points to ABSTRACT
4091 -- Specification (Node1)
4092
4093 -----------------------------------
4094 -- 6.1 Subprogram Specification --
4095 -----------------------------------
4096
4097 -- SUBPROGRAM_SPECIFICATION ::=
4098 -- [[not] overriding]
4099 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
4100 -- | [[not] overriding]
4101 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
4102
4103 -- Note: there are no separate nodes for the profiles, instead the
4104 -- information appears directly in the following nodes.
4105
4106 -- N_Function_Specification
4107 -- Sloc points to FUNCTION
4108 -- Defining_Unit_Name (Node1) (the designator)
4109 -- Elaboration_Boolean (Node2-Sem)
4110 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4111 -- Null_Exclusion_Present (Flag11)
4112 -- Result_Definition (Node4) for result subtype
4113 -- Generic_Parent (Node5-Sem)
4114 -- Must_Override (Flag14) set if overriding indicator present
4115 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4116
4117 -- N_Procedure_Specification
4118 -- Sloc points to PROCEDURE
4119 -- Defining_Unit_Name (Node1)
4120 -- Elaboration_Boolean (Node2-Sem)
4121 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4122 -- Generic_Parent (Node5-Sem)
4123 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
4124 -- Must_Override (Flag14) set if overriding indicator present
4125 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4126
4127 -- Note: overriding indicator is an Ada 2005 feature
4128
4129 ---------------------
4130 -- 6.1 Designator --
4131 ---------------------
4132
4133 -- DESIGNATOR ::=
4134 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
4135
4136 -- Designators that are simply identifiers or operator symbols appear
4137 -- directly in the tree in this form. The following node is used only
4138 -- in the case where the designator has a parent unit name component.
4139
4140 -- N_Designator
4141 -- Sloc points to period
4142 -- Name (Node2) holds the parent unit name. Note that this is always
4143 -- non-Empty, since this node is only used for the case where a
4144 -- parent library unit package name is present.
4145 -- Identifier (Node1)
4146
4147 -- Note that the identifier can also be an operator symbol here
4148
4149 ------------------------------
4150 -- 6.1 Defining Designator --
4151 ------------------------------
4152
4153 -- DEFINING_DESIGNATOR ::=
4154 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
4155
4156 -------------------------------------
4157 -- 6.1 Defining Program Unit Name --
4158 -------------------------------------
4159
4160 -- DEFINING_PROGRAM_UNIT_NAME ::=
4161 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
4162
4163 -- The parent unit name is present only in the case of a child unit
4164 -- name (permissible only for Ada 95 for a library level unit, i.e.
4165 -- a unit at scope level one). If no such name is present, the defining
4166 -- program unit name is represented simply as the defining identifier.
4167 -- In the child unit case, the following node is used to represent the
4168 -- child unit name.
4169
4170 -- N_Defining_Program_Unit_Name
4171 -- Sloc points to period
4172 -- Name (Node2) holds the parent unit name. Note that this is always
4173 -- non-Empty, since this node is only used for the case where a
4174 -- parent unit name is present.
4175 -- Defining_Identifier (Node1)
4176
4177 --------------------------
4178 -- 6.1 Operator Symbol --
4179 --------------------------
4180
4181 -- OPERATOR_SYMBOL ::= STRING_LITERAL
4182
4183 -- Note: the fields of the N_Operator_Symbol node are laid out to
4184 -- match the corresponding fields of an N_Character_Literal node. This
4185 -- allows easy conversion of the operator symbol node into a character
4186 -- literal node in the case where a string constant of the form of an
4187 -- operator symbol is scanned out as such, but turns out semantically
4188 -- to be a string literal that is not an operator. For details see
4189 -- Sinfo.CN.Change_Operator_Symbol_To_String_Literal.
4190
4191 -- N_Operator_Symbol
4192 -- Sloc points to literal
4193 -- Chars (Name1) contains the Name_Id for the operator symbol
4194 -- Strval (Str3) Id of string value. This is used if the operator
4195 -- symbol turns out to be a normal string after all.
4196 -- Entity (Node4-Sem)
4197 -- Associated_Node (Node4-Sem)
4198 -- Has_Private_View (Flag11-Sem) set in generic units.
4199 -- Etype (Node5-Sem)
4200
4201 -- Note: the Strval field may be set to No_String for generated
4202 -- operator symbols that are known not to be string literals
4203 -- semantically.
4204
4205 -----------------------------------
4206 -- 6.1 Defining Operator Symbol --
4207 -----------------------------------
4208
4209 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
4210
4211 -- A defining operator symbol is an entity, which has additional
4212 -- fields depending on the setting of the Ekind field. These
4213 -- additional fields are defined (and access subprograms declared)
4214 -- in package Einfo.
4215
4216 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
4217 -- are deliberately layed out to match the layout of fields in an
4218 -- ordinary N_Operator_Symbol node allowing for easy alteration of
4219 -- an operator symbol node into a defining operator symbol node.
4220 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
4221 -- for further details.
4222
4223 -- N_Defining_Operator_Symbol
4224 -- Sloc points to literal
4225 -- Chars (Name1) contains the Name_Id for the operator symbol
4226 -- Next_Entity (Node2-Sem)
4227 -- Scope (Node3-Sem)
4228 -- Etype (Node5-Sem)
4229
4230 ----------------------------
4231 -- 6.1 Parameter Profile --
4232 ----------------------------
4233
4234 -- PARAMETER_PROFILE ::= [FORMAL_PART]
4235
4236 ---------------------------------------
4237 -- 6.1 Parameter and Result Profile --
4238 ---------------------------------------
4239
4240 -- PARAMETER_AND_RESULT_PROFILE ::=
4241 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
4242 -- | [FORMAL_PART] return ACCESS_DEFINITION
4243
4244 -- There is no explicit node in the tree for a parameter and result
4245 -- profile. Instead the information appears directly in the parent.
4246
4247 ----------------------
4248 -- 6.1 Formal part --
4249 ----------------------
4250
4251 -- FORMAL_PART ::=
4252 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
4253
4254 ----------------------------------
4255 -- 6.1 Parameter specification --
4256 ----------------------------------
4257
4258 -- PARAMETER_SPECIFICATION ::=
4259 -- DEFINING_IDENTIFIER_LIST : MODE [NULL_EXCLUSION] SUBTYPE_MARK
4260 -- [:= DEFAULT_EXPRESSION]
4261 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
4262 -- [:= DEFAULT_EXPRESSION]
4263
4264 -- Although the syntax allows multiple identifiers in the list, the
4265 -- semantics is as though successive specifications were given with
4266 -- identical type definition and expression components. To simplify
4267 -- semantic processing, the parser represents a multiple declaration
4268 -- case as a sequence of single Specifications, using the More_Ids and
4269 -- Prev_Ids flags to preserve the original source form as described
4270 -- in the section on "Handling of Defining Identifier Lists".
4271
4272 -- N_Parameter_Specification
4273 -- Sloc points to first identifier
4274 -- Defining_Identifier (Node1)
4275 -- In_Present (Flag15)
4276 -- Out_Present (Flag17)
4277 -- Null_Exclusion_Present (Flag11)
4278 -- Parameter_Type (Node2) subtype mark or access definition
4279 -- Expression (Node3) (set to Empty if no default expression present)
4280 -- Do_Accessibility_Check (Flag13-Sem)
4281 -- More_Ids (Flag5) (set to False if no more identifiers in list)
4282 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
4283 -- Default_Expression (Node5-Sem)
4284
4285 ---------------
4286 -- 6.1 Mode --
4287 ---------------
4288
4289 -- MODE ::= [in] | in out | out
4290
4291 -- There is no explicit node in the tree for the Mode. Instead the
4292 -- In_Present and Out_Present flags are set in the parent node to
4293 -- record the presence of keywords specifying the mode.
4294
4295 --------------------------
4296 -- 6.3 Subprogram Body --
4297 --------------------------
4298
4299 -- SUBPROGRAM_BODY ::=
4300 -- SUBPROGRAM_SPECIFICATION is
4301 -- DECLARATIVE_PART
4302 -- begin
4303 -- HANDLED_SEQUENCE_OF_STATEMENTS
4304 -- end [DESIGNATOR];
4305
4306 -- N_Subprogram_Body
4307 -- Sloc points to FUNCTION or PROCEDURE
4308 -- Specification (Node1)
4309 -- Declarations (List2)
4310 -- Handled_Statement_Sequence (Node4)
4311 -- Activation_Chain_Entity (Node3-Sem)
4312 -- Corresponding_Spec (Node5-Sem)
4313 -- Acts_As_Spec (Flag4-Sem)
4314 -- Bad_Is_Detected (Flag15) used only by parser
4315 -- Do_Storage_Check (Flag17-Sem)
4316 -- Has_Priority_Pragma (Flag6-Sem)
4317 -- Is_Protected_Subprogram_Body (Flag7-Sem)
4318 -- Is_Entry_Barrier_Function (Flag8-Sem)
4319 -- Is_Task_Master (Flag5-Sem)
4320 -- Was_Originally_Stub (Flag13-Sem)
4321 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
4322
4323 -----------------------------------
4324 -- 6.4 Procedure Call Statement --
4325 -----------------------------------
4326
4327 -- PROCEDURE_CALL_STATEMENT ::=
4328 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
4329
4330 -- Note: the reason that a procedure call has expression fields is
4331 -- that it semantically resembles an expression, e.g. overloading is
4332 -- allowed and a type is concocted for semantic processing purposes.
4333 -- Certain of these fields, such as Parens are not relevant, but it
4334 -- is easier to just supply all of them together!
4335
4336 -- N_Procedure_Call_Statement
4337 -- Sloc points to first token of name or prefix
4338 -- Name (Node2) stores name or prefix
4339 -- Parameter_Associations (List3) (set to No_List if no
4340 -- actual parameter part)
4341 -- First_Named_Actual (Node4-Sem)
4342 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4343 -- Do_Tag_Check (Flag13-Sem)
4344 -- No_Elaboration_Check (Flag14-Sem)
4345 -- Parameter_List_Truncated (Flag17-Sem)
4346 -- ABE_Is_Certain (Flag18-Sem)
4347 -- plus fields for expression
4348
4349 -- If any IN parameter requires a range check, then the corresponding
4350 -- argument expression has the Do_Range_Check flag set, and the range
4351 -- check is done against the formal type. Note that this argument
4352 -- expression may appear directly in the Parameter_Associations list,
4353 -- or may be a descendent of an N_Parameter_Association node that
4354 -- appears in this list.
4355
4356 ------------------------
4357 -- 6.4 Function Call --
4358 ------------------------
4359
4360 -- FUNCTION_CALL ::=
4361 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
4362
4363 -- Note: the parser may generate an indexed component node or simply
4364 -- a name node instead of a function call node. The semantic pass must
4365 -- correct this misidentification.
4366
4367 -- N_Function_Call
4368 -- Sloc points to first token of name or prefix
4369 -- Name (Node2) stores name or prefix
4370 -- Parameter_Associations (List3) (set to No_List if no
4371 -- actual parameter part)
4372 -- First_Named_Actual (Node4-Sem)
4373 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4374 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
4375 -- Do_Tag_Check (Flag13-Sem)
4376 -- No_Elaboration_Check (Flag14-Sem)
4377 -- Parameter_List_Truncated (Flag17-Sem)
4378 -- ABE_Is_Certain (Flag18-Sem)
4379 -- plus fields for expression
4380
4381 --------------------------------
4382 -- 6.4 Actual Parameter Part --
4383 --------------------------------
4384
4385 -- ACTUAL_PARAMETER_PART ::=
4386 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
4387
4388 --------------------------------
4389 -- 6.4 Parameter Association --
4390 --------------------------------
4391
4392 -- PARAMETER_ASSOCIATION ::=
4393 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
4394
4395 -- Note: the N_Parameter_Association node is built only if a formal
4396 -- parameter selector name is present, otherwise the parameter
4397 -- association appears in the tree simply as the node for the
4398 -- explicit actual parameter.
4399
4400 -- N_Parameter_Association
4401 -- Sloc points to formal parameter
4402 -- Selector_Name (Node2) (always non-Empty)
4403 -- Explicit_Actual_Parameter (Node3)
4404 -- Next_Named_Actual (Node4-Sem)
4405
4406 ---------------------------
4407 -- 6.4 Actual Parameter --
4408 ---------------------------
4409
4410 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
4411
4412 ---------------------------
4413 -- 6.5 Return Statement --
4414 ---------------------------
4415
4416 -- RETURN_STATEMENT ::= return [EXPRESSION]; -- Ada 95
4417
4418 -- In Ada 2005, we have:
4419
4420 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
4421
4422 -- EXTENDED_RETURN_STATEMENT ::=
4423 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4424 -- [:= EXPRESSION] [do
4425 -- HANDLED_SEQUENCE_OF_STATEMENTS
4426 -- end return];
4427
4428 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
4429
4430 -- So in Ada 2005, RETURN_STATEMENT is no longer a nonterminal, but
4431 -- "return statement" is defined in 6.5 to mean a
4432 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT.
4433
4434 -- N_Return_Statement
4435 -- Sloc points to RETURN
4436 -- Return_Statement_Entity (Node5-Sem)
4437 -- Expression (Node3) (set to Empty if no expression present)
4438 -- Storage_Pool (Node1-Sem)
4439 -- Procedure_To_Call (Node2-Sem)
4440 -- Do_Tag_Check (Flag13-Sem)
4441 -- By_Ref (Flag5-Sem)
4442 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
4443
4444 -- N_Return_Statement represents a simple_return_statement, and is
4445 -- renamed to be N_Simple_Return_Statement below. Clients should refer
4446 -- to N_Simple_Return_Statement. We retain N_Return_Statement because
4447 -- that's how gigi knows it. See also renaming of Make_Return_Statement
4448 -- as Make_Simple_Return_Statement in Sem_Util.
4449
4450 -- Note: Return_Statement_Entity points to an E_Return_Statement
4451
4452 -- If a range check is required, then Do_Range_Check is set on the
4453 -- Expression. The check is against the return subtype of the function.
4454
4455 -- N_Extended_Return_Statement
4456 -- Sloc points to RETURN
4457 -- Return_Statement_Entity (Node5-Sem)
4458 -- Return_Object_Declarations (List3)
4459 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
4460 -- Storage_Pool (Node1-Sem)
4461 -- Procedure_To_Call (Node2-Sem)
4462 -- Do_Tag_Check (Flag13-Sem)
4463 -- By_Ref (Flag5-Sem)
4464
4465 -- Note: Return_Statement_Entity points to an E_Return_Statement.
4466 -- Note that Return_Object_Declarations is a list containing the
4467 -- N_Object_Declaration -- see comment on this field above.
4468 -- The declared object will have Is_Return_Object = True.
4469 -- There is no such syntactic category as return_object_declaration
4470 -- in the RM. Return_Object_Declarations represents this portion of
4471 -- the syntax for EXTENDED_RETURN_STATEMENT:
4472 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4473 -- [:= EXPRESSION]
4474
4475 -- There are two entities associated with an extended_return_statement:
4476 -- the Return_Statement_Entity represents the statement itself, and the
4477 -- Defining_Identifier of the Object_Declaration in
4478 -- Return_Object_Declarations represents the object being
4479 -- returned. N_Simple_Return_Statement has only the former.
4480
4481 ------------------------------
4482 -- 7.1 Package Declaration --
4483 ------------------------------
4484
4485 -- PACKAGE_DECLARATION ::= PACKAGE_SPECIFICATION;
4486
4487 -- Note: the activation chain entity for a package spec is used for
4488 -- all tasks declared in the package spec, or in the package body.
4489
4490 -- N_Package_Declaration
4491 -- Sloc points to PACKAGE
4492 -- Specification (Node1)
4493 -- Corresponding_Body (Node5-Sem)
4494 -- Parent_Spec (Node4-Sem)
4495 -- Activation_Chain_Entity (Node3-Sem)
4496
4497 --------------------------------
4498 -- 7.1 Package Specification --
4499 --------------------------------
4500
4501 -- PACKAGE_SPECIFICATION ::=
4502 -- package DEFINING_PROGRAM_UNIT_NAME is
4503 -- {BASIC_DECLARATIVE_ITEM}
4504 -- [private
4505 -- {BASIC_DECLARATIVE_ITEM}]
4506 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
4507
4508 -- N_Package_Specification
4509 -- Sloc points to PACKAGE
4510 -- Defining_Unit_Name (Node1)
4511 -- Visible_Declarations (List2)
4512 -- Private_Declarations (List3) (set to No_List if no private
4513 -- part present)
4514 -- End_Label (Node4)
4515 -- Generic_Parent (Node5-Sem)
4516 -- Limited_View_Installed (Flag18-Sem)
4517
4518 -----------------------
4519 -- 7.1 Package Body --
4520 -----------------------
4521
4522 -- PACKAGE_BODY ::=
4523 -- package body DEFINING_PROGRAM_UNIT_NAME is
4524 -- DECLARATIVE_PART
4525 -- [begin
4526 -- HANDLED_SEQUENCE_OF_STATEMENTS]
4527 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
4528
4529 -- N_Package_Body
4530 -- Sloc points to PACKAGE
4531 -- Defining_Unit_Name (Node1)
4532 -- Declarations (List2)
4533 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
4534 -- Corresponding_Spec (Node5-Sem)
4535 -- Was_Originally_Stub (Flag13-Sem)
4536
4537 -- Note: if a source level package does not contain a handled sequence
4538 -- of statements, then the parser supplies a dummy one with a null
4539 -- sequence of statements. Comes_From_Source will be False in this
4540 -- constructed sequence. The reason we need this is for the End_Label
4541 -- field in the HSS.
4542
4543 -----------------------------------
4544 -- 7.4 Private Type Declaration --
4545 -----------------------------------
4546
4547 -- PRIVATE_TYPE_DECLARATION ::=
4548 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
4549 -- is [[abstract] tagged] [limited] private;
4550
4551 -- Note: TAGGED is not permitted in Ada 83 mode
4552
4553 -- N_Private_Type_Declaration
4554 -- Sloc points to TYPE
4555 -- Defining_Identifier (Node1)
4556 -- Discriminant_Specifications (List4) (set to No_List if no
4557 -- discriminant part)
4558 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4559 -- Abstract_Present (Flag4)
4560 -- Tagged_Present (Flag15)
4561 -- Limited_Present (Flag17)
4562
4563 ----------------------------------------
4564 -- 7.4 Private Extension Declaration --
4565 ----------------------------------------
4566
4567 -- PRIVATE_EXTENSION_DECLARATION ::=
4568 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
4569 -- [abstract] [limited | synchronized]
4570 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
4571 -- with private;
4572
4573 -- Note: LIMITED, and private extension declarations are not allowed
4574 -- in Ada 83 mode.
4575
4576 -- N_Private_Extension_Declaration
4577 -- Sloc points to TYPE
4578 -- Defining_Identifier (Node1)
4579 -- Discriminant_Specifications (List4) (set to No_List if no
4580 -- discriminant part)
4581 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4582 -- Abstract_Present (Flag4)
4583 -- Limited_Present (Flag17)
4584 -- Synchronized_Present (Flag7)
4585 -- Subtype_Indication (Node5)
4586 -- Interface_List (List2) (set to No_List if none)
4587
4588 ---------------------
4589 -- 8.4 Use Clause --
4590 ---------------------
4591
4592 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
4593
4594 -----------------------------
4595 -- 8.4 Use Package Clause --
4596 -----------------------------
4597
4598 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
4599
4600 -- N_Use_Package_Clause
4601 -- Sloc points to USE
4602 -- Names (List2)
4603 -- Next_Use_Clause (Node3-Sem)
4604 -- Hidden_By_Use_Clause (Elist4-Sem)
4605
4606 --------------------------
4607 -- 8.4 Use Type Clause --
4608 --------------------------
4609
4610 -- USE_TYPE_CLAUSE ::= use type SUBTYPE_MARK {, SUBTYPE_MARK};
4611
4612 -- Note: use type clause is not permitted in Ada 83 mode
4613
4614 -- N_Use_Type_Clause
4615 -- Sloc points to USE
4616 -- Subtype_Marks (List2)
4617 -- Next_Use_Clause (Node3-Sem)
4618 -- Hidden_By_Use_Clause (Elist4-Sem)
4619
4620 -------------------------------
4621 -- 8.5 Renaming Declaration --
4622 -------------------------------
4623
4624 -- RENAMING_DECLARATION ::=
4625 -- OBJECT_RENAMING_DECLARATION
4626 -- | EXCEPTION_RENAMING_DECLARATION
4627 -- | PACKAGE_RENAMING_DECLARATION
4628 -- | SUBPROGRAM_RENAMING_DECLARATION
4629 -- | GENERIC_RENAMING_DECLARATION
4630
4631 --------------------------------------
4632 -- 8.5 Object Renaming Declaration --
4633 --------------------------------------
4634
4635 -- OBJECT_RENAMING_DECLARATION ::=
4636 -- DEFINING_IDENTIFIER :
4637 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME;
4638 -- | DEFINING_IDENTIFIER :
4639 -- ACCESS_DEFINITION renames object_NAME;
4640
4641 -- Note: Access_Definition is an optional field that gives support to
4642 -- Ada 2005 (AI-230). The parser generates nodes that have either the
4643 -- Subtype_Indication field or else the Access_Definition field.
4644
4645 -- N_Object_Renaming_Declaration
4646 -- Sloc points to first identifier
4647 -- Defining_Identifier (Node1)
4648 -- Null_Exclusion_Present (Flag11) (set to False if not present)
4649 -- Subtype_Mark (Node4) (set to Empty if not present)
4650 -- Access_Definition (Node3) (set to Empty if not present)
4651 -- Name (Node2)
4652 -- Corresponding_Generic_Association (Node5-Sem)
4653
4654 -----------------------------------------
4655 -- 8.5 Exception Renaming Declaration --
4656 -----------------------------------------
4657
4658 -- EXCEPTION_RENAMING_DECLARATION ::=
4659 -- DEFINING_IDENTIFIER : exception renames exception_NAME;
4660
4661 -- N_Exception_Renaming_Declaration
4662 -- Sloc points to first identifier
4663 -- Defining_Identifier (Node1)
4664 -- Name (Node2)
4665
4666 ---------------------------------------
4667 -- 8.5 Package Renaming Declaration --
4668 ---------------------------------------
4669
4670 -- PACKAGE_RENAMING_DECLARATION ::=
4671 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME;
4672
4673 -- N_Package_Renaming_Declaration
4674 -- Sloc points to PACKAGE
4675 -- Defining_Unit_Name (Node1)
4676 -- Name (Node2)
4677 -- Parent_Spec (Node4-Sem)
4678
4679 ------------------------------------------
4680 -- 8.5 Subprogram Renaming Declaration --
4681 ------------------------------------------
4682
4683 -- SUBPROGRAM_RENAMING_DECLARATION ::=
4684 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
4685
4686 -- N_Subprogram_Renaming_Declaration
4687 -- Sloc points to RENAMES
4688 -- Specification (Node1)
4689 -- Name (Node2)
4690 -- Parent_Spec (Node4-Sem)
4691 -- Corresponding_Spec (Node5-Sem)
4692 -- Corresponding_Formal_Spec (Node3-Sem)
4693 -- From_Default (Flag6-Sem)
4694
4695 -----------------------------------------
4696 -- 8.5.5 Generic Renaming Declaration --
4697 -----------------------------------------
4698
4699 -- GENERIC_RENAMING_DECLARATION ::=
4700 -- generic package DEFINING_PROGRAM_UNIT_NAME
4701 -- renames generic_package_NAME
4702 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
4703 -- renames generic_procedure_NAME
4704 -- | generic function DEFINING_PROGRAM_UNIT_NAME
4705 -- renames generic_function_NAME
4706
4707 -- N_Generic_Package_Renaming_Declaration
4708 -- Sloc points to GENERIC
4709 -- Defining_Unit_Name (Node1)
4710 -- Name (Node2)
4711 -- Parent_Spec (Node4-Sem)
4712
4713 -- N_Generic_Procedure_Renaming_Declaration
4714 -- Sloc points to GENERIC
4715 -- Defining_Unit_Name (Node1)
4716 -- Name (Node2)
4717 -- Parent_Spec (Node4-Sem)
4718
4719 -- N_Generic_Function_Renaming_Declaration
4720 -- Sloc points to GENERIC
4721 -- Defining_Unit_Name (Node1)
4722 -- Name (Node2)
4723 -- Parent_Spec (Node4-Sem)
4724
4725 --------------------------------
4726 -- 9.1 Task Type Declaration --
4727 --------------------------------
4728
4729 -- TASK_TYPE_DECLARATION ::=
4730 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4731 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
4732
4733 -- N_Task_Type_Declaration
4734 -- Sloc points to TASK
4735 -- Defining_Identifier (Node1)
4736 -- Discriminant_Specifications (List4) (set to No_List if no
4737 -- discriminant part)
4738 -- Interface_List (List2) (set to No_List if none)
4739 -- Task_Definition (Node3) (set to Empty if not present)
4740 -- Corresponding_Body (Node5-Sem)
4741
4742 ----------------------------------
4743 -- 9.1 Single Task Declaration --
4744 ----------------------------------
4745
4746 -- SINGLE_TASK_DECLARATION ::=
4747 -- task DEFINING_IDENTIFIER
4748 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
4749
4750 -- N_Single_Task_Declaration
4751 -- Sloc points to TASK
4752 -- Defining_Identifier (Node1)
4753 -- Interface_List (List2) (set to No_List if none)
4754 -- Task_Definition (Node3) (set to Empty if not present)
4755
4756 --------------------------
4757 -- 9.1 Task Definition --
4758 --------------------------
4759
4760 -- TASK_DEFINITION ::=
4761 -- {TASK_ITEM}
4762 -- [private
4763 -- {TASK_ITEM}]
4764 -- end [task_IDENTIFIER]
4765
4766 -- Note: as a result of semantic analysis, the list of task items can
4767 -- include implicit type declarations resulting from entry families.
4768
4769 -- N_Task_Definition
4770 -- Sloc points to first token of task definition
4771 -- Visible_Declarations (List2)
4772 -- Private_Declarations (List3) (set to No_List if no private part)
4773 -- End_Label (Node4)
4774 -- Has_Priority_Pragma (Flag6-Sem)
4775 -- Has_Storage_Size_Pragma (Flag5-Sem)
4776 -- Has_Task_Info_Pragma (Flag7-Sem)
4777 -- Has_Task_Name_Pragma (Flag8-Sem)
4778 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
4779
4780 --------------------
4781 -- 9.1 Task Item --
4782 --------------------
4783
4784 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
4785
4786 --------------------
4787 -- 9.1 Task Body --
4788 --------------------
4789
4790 -- TASK_BODY ::=
4791 -- task body task_DEFINING_IDENTIFIER is
4792 -- DECLARATIVE_PART
4793 -- begin
4794 -- HANDLED_SEQUENCE_OF_STATEMENTS
4795 -- end [task_IDENTIFIER];
4796
4797 -- Gigi restriction: This node never appears
4798
4799 -- N_Task_Body
4800 -- Sloc points to TASK
4801 -- Defining_Identifier (Node1)
4802 -- Declarations (List2)
4803 -- Handled_Statement_Sequence (Node4)
4804 -- Is_Task_Master (Flag5-Sem)
4805 -- Activation_Chain_Entity (Node3-Sem)
4806 -- Corresponding_Spec (Node5-Sem)
4807 -- Was_Originally_Stub (Flag13-Sem)
4808
4809 -------------------------------------
4810 -- 9.4 Protected Type Declaration --
4811 -------------------------------------
4812
4813 -- PROTECTED_TYPE_DECLARATION ::=
4814 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4815 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4816
4817 -- Note: protected type declarations are not permitted in Ada 83 mode
4818
4819 -- N_Protected_Type_Declaration
4820 -- Sloc points to PROTECTED
4821 -- Defining_Identifier (Node1)
4822 -- Discriminant_Specifications (List4) (set to No_List if no
4823 -- discriminant part)
4824 -- Interface_List (List2) (set to No_List if none)
4825 -- Protected_Definition (Node3)
4826 -- Corresponding_Body (Node5-Sem)
4827
4828 ---------------------------------------
4829 -- 9.4 Single Protected Declaration --
4830 ---------------------------------------
4831
4832 -- SINGLE_PROTECTED_DECLARATION ::=
4833 -- protected DEFINING_IDENTIFIER
4834 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4835
4836 -- Note: single protected declarations are not allowed in Ada 83 mode
4837
4838 -- N_Single_Protected_Declaration
4839 -- Sloc points to PROTECTED
4840 -- Defining_Identifier (Node1)
4841 -- Interface_List (List2) (set to No_List if none)
4842 -- Protected_Definition (Node3)
4843
4844 -------------------------------
4845 -- 9.4 Protected Definition --
4846 -------------------------------
4847
4848 -- PROTECTED_DEFINITION ::=
4849 -- {PROTECTED_OPERATION_DECLARATION}
4850 -- [private
4851 -- {PROTECTED_ELEMENT_DECLARATION}]
4852 -- end [protected_IDENTIFIER]
4853
4854 -- N_Protected_Definition
4855 -- Sloc points to first token of protected definition
4856 -- Visible_Declarations (List2)
4857 -- Private_Declarations (List3) (set to No_List if no private part)
4858 -- End_Label (Node4)
4859 -- Has_Priority_Pragma (Flag6-Sem)
4860
4861 ------------------------------------------
4862 -- 9.4 Protected Operation Declaration --
4863 ------------------------------------------
4864
4865 -- PROTECTED_OPERATION_DECLARATION ::=
4866 -- SUBPROGRAM_DECLARATION
4867 -- | ENTRY_DECLARATION
4868 -- | REPRESENTATION_CLAUSE
4869
4870 ----------------------------------------
4871 -- 9.4 Protected Element Declaration --
4872 ----------------------------------------
4873
4874 -- PROTECTED_ELEMENT_DECLARATION ::=
4875 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
4876
4877 -------------------------
4878 -- 9.4 Protected Body --
4879 -------------------------
4880
4881 -- PROTECTED_BODY ::=
4882 -- protected body DEFINING_IDENTIFIER is
4883 -- {PROTECTED_OPERATION_ITEM}
4884 -- end [protected_IDENTIFIER];
4885
4886 -- Note: protected bodies are not allowed in Ada 83 mode
4887
4888 -- Gigi restriction: This node never appears
4889
4890 -- N_Protected_Body
4891 -- Sloc points to PROTECTED
4892 -- Defining_Identifier (Node1)
4893 -- Declarations (List2) protected operation items (and pragmas)
4894 -- End_Label (Node4)
4895 -- Corresponding_Spec (Node5-Sem)
4896 -- Was_Originally_Stub (Flag13-Sem)
4897
4898 -----------------------------------
4899 -- 9.4 Protected Operation Item --
4900 -----------------------------------
4901
4902 -- PROTECTED_OPERATION_ITEM ::=
4903 -- SUBPROGRAM_DECLARATION
4904 -- | SUBPROGRAM_BODY
4905 -- | ENTRY_BODY
4906 -- | REPRESENTATION_CLAUSE
4907
4908 ------------------------------
4909 -- 9.5.2 Entry Declaration --
4910 ------------------------------
4911
4912 -- ENTRY_DECLARATION ::=
4913 -- [[not] overriding]
4914 -- entry DEFINING_IDENTIFIER
4915 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE;
4916
4917 -- N_Entry_Declaration
4918 -- Sloc points to ENTRY
4919 -- Defining_Identifier (Node1)
4920 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
4921 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4922 -- Corresponding_Body (Node5-Sem)
4923 -- Must_Override (Flag14) set if overriding indicator present
4924 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4925
4926 -- Note: overriding indicator is an Ada 2005 feature
4927
4928 -----------------------------
4929 -- 9.5.2 Accept statement --
4930 -----------------------------
4931
4932 -- ACCEPT_STATEMENT ::=
4933 -- accept entry_DIRECT_NAME
4934 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
4935 -- HANDLED_SEQUENCE_OF_STATEMENTS
4936 -- end [entry_IDENTIFIER]];
4937
4938 -- Gigi restriction: This node never appears
4939
4940 -- Note: there are no explicit declarations allowed in an accept
4941 -- statement. However, the implicit declarations for any statement
4942 -- identifiers (labels and block/loop identifiers) are declarations
4943 -- that belong logically to the accept statement, and that is why
4944 -- there is a Declarations field in this node.
4945
4946 -- N_Accept_Statement
4947 -- Sloc points to ACCEPT
4948 -- Entry_Direct_Name (Node1)
4949 -- Entry_Index (Node5) (set to Empty if not present)
4950 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4951 -- Handled_Statement_Sequence (Node4)
4952 -- Declarations (List2) (set to No_List if no declarations)
4953
4954 ------------------------
4955 -- 9.5.2 Entry Index --
4956 ------------------------
4957
4958 -- ENTRY_INDEX ::= EXPRESSION
4959
4960 -----------------------
4961 -- 9.5.2 Entry Body --
4962 -----------------------
4963
4964 -- ENTRY_BODY ::=
4965 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
4966 -- DECLARATIVE_PART
4967 -- begin
4968 -- HANDLED_SEQUENCE_OF_STATEMENTS
4969 -- end [entry_IDENTIFIER];
4970
4971 -- ENTRY_BARRIER ::= when CONDITION
4972
4973 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
4974 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
4975 -- too full (it would otherwise have too many fields)
4976
4977 -- Gigi restriction: This node never appears
4978
4979 -- N_Entry_Body
4980 -- Sloc points to ENTRY
4981 -- Defining_Identifier (Node1)
4982 -- Entry_Body_Formal_Part (Node5)
4983 -- Declarations (List2)
4984 -- Handled_Statement_Sequence (Node4)
4985 -- Activation_Chain_Entity (Node3-Sem)
4986
4987 -----------------------------------
4988 -- 9.5.2 Entry Body Formal Part --
4989 -----------------------------------
4990
4991 -- ENTRY_BODY_FORMAL_PART ::=
4992 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
4993
4994 -- Note that an entry body formal part node is present even if it is
4995 -- empty. This reflects the grammar, in which it is the components of
4996 -- the entry body formal part that are optional, not the entry body
4997 -- formal part itself. Also this means that the barrier condition
4998 -- always has somewhere to be stored.
4999
5000 -- Gigi restriction: This node never appears
5001
5002 -- N_Entry_Body_Formal_Part
5003 -- Sloc points to first token
5004 -- Entry_Index_Specification (Node4) (set to Empty if not present)
5005 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5006 -- Condition (Node1) from entry barrier of entry body
5007
5008 --------------------------
5009 -- 9.5.2 Entry Barrier --
5010 --------------------------
5011
5012 -- ENTRY_BARRIER ::= when CONDITION
5013
5014 --------------------------------------
5015 -- 9.5.2 Entry Index Specification --
5016 --------------------------------------
5017
5018 -- ENTRY_INDEX_SPECIFICATION ::=
5019 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
5020
5021 -- Gigi restriction: This node never appears
5022
5023 -- N_Entry_Index_Specification
5024 -- Sloc points to FOR
5025 -- Defining_Identifier (Node1)
5026 -- Discrete_Subtype_Definition (Node4)
5027
5028 ---------------------------------
5029 -- 9.5.3 Entry Call Statement --
5030 ---------------------------------
5031
5032 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
5033
5034 -- The parser may generate a procedure call for this construct. The
5035 -- semantic pass must correct this misidentification where needed.
5036
5037 -- Gigi restriction: This node never appears
5038
5039 -- N_Entry_Call_Statement
5040 -- Sloc points to first token of name
5041 -- Name (Node2)
5042 -- Parameter_Associations (List3) (set to No_List if no
5043 -- actual parameter part)
5044 -- First_Named_Actual (Node4-Sem)
5045
5046 ------------------------------
5047 -- 9.5.4 Requeue Statement --
5048 ------------------------------
5049
5050 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
5051
5052 -- Note: requeue statements are not permitted in Ada 83 mode
5053
5054 -- Gigi restriction: This node never appears
5055
5056 -- N_Requeue_Statement
5057 -- Sloc points to REQUEUE
5058 -- Name (Node2)
5059 -- Abort_Present (Flag15)
5060
5061 --------------------------
5062 -- 9.6 Delay Statement --
5063 --------------------------
5064
5065 -- DELAY_STATEMENT ::=
5066 -- DELAY_UNTIL_STATEMENT
5067 -- | DELAY_RELATIVE_STATEMENT
5068
5069 --------------------------------
5070 -- 9.6 Delay Until Statement --
5071 --------------------------------
5072
5073 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
5074
5075 -- Note: delay until statements are not permitted in Ada 83 mode
5076
5077 -- Gigi restriction: This node never appears
5078
5079 -- N_Delay_Until_Statement
5080 -- Sloc points to DELAY
5081 -- Expression (Node3)
5082
5083 -----------------------------------
5084 -- 9.6 Delay Relative Statement --
5085 -----------------------------------
5086
5087 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
5088
5089 -- Gigi restriction: This node never appears
5090
5091 -- N_Delay_Relative_Statement
5092 -- Sloc points to DELAY
5093 -- Expression (Node3)
5094
5095 ---------------------------
5096 -- 9.7 Select Statement --
5097 ---------------------------
5098
5099 -- SELECT_STATEMENT ::=
5100 -- SELECTIVE_ACCEPT
5101 -- | TIMED_ENTRY_CALL
5102 -- | CONDITIONAL_ENTRY_CALL
5103 -- | ASYNCHRONOUS_SELECT
5104
5105 -----------------------------
5106 -- 9.7.1 Selective Accept --
5107 -----------------------------
5108
5109 -- SELECTIVE_ACCEPT ::=
5110 -- select
5111 -- [GUARD]
5112 -- SELECT_ALTERNATIVE
5113 -- {or
5114 -- [GUARD]
5115 -- SELECT_ALTERNATIVE}
5116 -- [else
5117 -- SEQUENCE_OF_STATEMENTS]
5118 -- end select;
5119
5120 -- Gigi restriction: This node never appears
5121
5122 -- Note: the guard expression, if present, appears in the node for
5123 -- the select alternative.
5124
5125 -- N_Selective_Accept
5126 -- Sloc points to SELECT
5127 -- Select_Alternatives (List1)
5128 -- Else_Statements (List4) (set to No_List if no else part)
5129
5130 ------------------
5131 -- 9.7.1 Guard --
5132 ------------------
5133
5134 -- GUARD ::= when CONDITION =>
5135
5136 -- As noted above, the CONDITION that is part of a GUARD is included
5137 -- in the node for the select alternative for convenience.
5138
5139 -------------------------------
5140 -- 9.7.1 Select Alternative --
5141 -------------------------------
5142
5143 -- SELECT_ALTERNATIVE ::=
5144 -- ACCEPT_ALTERNATIVE
5145 -- | DELAY_ALTERNATIVE
5146 -- | TERMINATE_ALTERNATIVE
5147
5148 -------------------------------
5149 -- 9.7.1 Accept Alternative --
5150 -------------------------------
5151
5152 -- ACCEPT_ALTERNATIVE ::=
5153 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
5154
5155 -- Gigi restriction: This node never appears
5156
5157 -- N_Accept_Alternative
5158 -- Sloc points to ACCEPT
5159 -- Accept_Statement (Node2)
5160 -- Condition (Node1) from the guard (set to Empty if no guard present)
5161 -- Statements (List3) (set to Empty_List if no statements)
5162 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5163 -- Accept_Handler_Records (List5-Sem)
5164
5165 ------------------------------
5166 -- 9.7.1 Delay Alternative --
5167 ------------------------------
5168
5169 -- DELAY_ALTERNATIVE ::=
5170 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
5171
5172 -- Gigi restriction: This node never appears
5173
5174 -- N_Delay_Alternative
5175 -- Sloc points to DELAY
5176 -- Delay_Statement (Node2)
5177 -- Condition (Node1) from the guard (set to Empty if no guard present)
5178 -- Statements (List3) (set to Empty_List if no statements)
5179 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5180
5181 ----------------------------------
5182 -- 9.7.1 Terminate Alternative --
5183 ----------------------------------
5184
5185 -- TERMINATE_ALTERNATIVE ::= terminate;
5186
5187 -- Gigi restriction: This node never appears
5188
5189 -- N_Terminate_Alternative
5190 -- Sloc points to TERMINATE
5191 -- Condition (Node1) from the guard (set to Empty if no guard present)
5192 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5193 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
5194
5195 -----------------------------
5196 -- 9.7.2 Timed Entry Call --
5197 -----------------------------
5198
5199 -- TIMED_ENTRY_CALL ::=
5200 -- select
5201 -- ENTRY_CALL_ALTERNATIVE
5202 -- or
5203 -- DELAY_ALTERNATIVE
5204 -- end select;
5205
5206 -- Gigi restriction: This node never appears
5207
5208 -- N_Timed_Entry_Call
5209 -- Sloc points to SELECT
5210 -- Entry_Call_Alternative (Node1)
5211 -- Delay_Alternative (Node4)
5212
5213 -----------------------------------
5214 -- 9.7.2 Entry Call Alternative --
5215 -----------------------------------
5216
5217 -- ENTRY_CALL_ALTERNATIVE ::=
5218 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
5219
5220 -- PROCEDURE_OR_ENTRY_CALL ::=
5221 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
5222
5223 -- Gigi restriction: This node never appears
5224
5225 -- N_Entry_Call_Alternative
5226 -- Sloc points to first token of entry call statement
5227 -- Entry_Call_Statement (Node1)
5228 -- Statements (List3) (set to Empty_List if no statements)
5229 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5230
5231 -----------------------------------
5232 -- 9.7.3 Conditional Entry Call --
5233 -----------------------------------
5234
5235 -- CONDITIONAL_ENTRY_CALL ::=
5236 -- select
5237 -- ENTRY_CALL_ALTERNATIVE
5238 -- else
5239 -- SEQUENCE_OF_STATEMENTS
5240 -- end select;
5241
5242 -- Gigi restriction: This node never appears
5243
5244 -- N_Conditional_Entry_Call
5245 -- Sloc points to SELECT
5246 -- Entry_Call_Alternative (Node1)
5247 -- Else_Statements (List4)
5248
5249 --------------------------------
5250 -- 9.7.4 Asynchronous Select --
5251 --------------------------------
5252
5253 -- ASYNCHRONOUS_SELECT ::=
5254 -- select
5255 -- TRIGGERING_ALTERNATIVE
5256 -- then abort
5257 -- ABORTABLE_PART
5258 -- end select;
5259
5260 -- Note: asynchronous select is not permitted in Ada 83 mode
5261
5262 -- Gigi restriction: This node never appears
5263
5264 -- N_Asynchronous_Select
5265 -- Sloc points to SELECT
5266 -- Triggering_Alternative (Node1)
5267 -- Abortable_Part (Node2)
5268
5269 -----------------------------------
5270 -- 9.7.4 Triggering Alternative --
5271 -----------------------------------
5272
5273 -- TRIGGERING_ALTERNATIVE ::=
5274 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
5275
5276 -- Gigi restriction: This node never appears
5277
5278 -- N_Triggering_Alternative
5279 -- Sloc points to first token of triggering statement
5280 -- Triggering_Statement (Node1)
5281 -- Statements (List3) (set to Empty_List if no statements)
5282 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5283
5284 ---------------------------------
5285 -- 9.7.4 Triggering Statement --
5286 ---------------------------------
5287
5288 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
5289
5290 ---------------------------
5291 -- 9.7.4 Abortable Part --
5292 ---------------------------
5293
5294 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
5295
5296 -- Gigi restriction: This node never appears
5297
5298 -- N_Abortable_Part
5299 -- Sloc points to ABORT
5300 -- Statements (List3)
5301
5302 --------------------------
5303 -- 9.8 Abort Statement --
5304 --------------------------
5305
5306 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
5307
5308 -- Gigi restriction: This node never appears
5309
5310 -- N_Abort_Statement
5311 -- Sloc points to ABORT
5312 -- Names (List2)
5313
5314 -------------------------
5315 -- 10.1.1 Compilation --
5316 -------------------------
5317
5318 -- COMPILATION ::= {COMPILATION_UNIT}
5319
5320 -- There is no explicit node in the tree for a compilation, since in
5321 -- general the compiler is processing only a single compilation unit
5322 -- at a time. It is possible to parse multiple units in syntax check
5323 -- only mode, but the trees are discarded in that case.
5324
5325 ------------------------------
5326 -- 10.1.1 Compilation Unit --
5327 ------------------------------
5328
5329 -- COMPILATION_UNIT ::=
5330 -- CONTEXT_CLAUSE LIBRARY_ITEM
5331 -- | CONTEXT_CLAUSE SUBUNIT
5332
5333 -- The N_Compilation_Unit node itself represents the above syntax.
5334 -- However, there are two additional items not reflected in the above
5335 -- syntax. First we have the global declarations that are added by the
5336 -- code generator. These are outer level declarations (so they cannot
5337 -- be represented as being inside the units). An example is the wrapper
5338 -- subprograms that are created to do ABE checking. As always a list of
5339 -- declarations can contain actions as well (i.e. statements), and such
5340 -- statements are executed as part of the elaboration of the unit. Note
5341 -- that all such declarations are elaborated before the library unit.
5342
5343 -- Similarly, certain actions need to be elaborated at the completion
5344 -- of elaboration of the library unit (notably the statement that sets
5345 -- the Boolean flag indicating that elaboration is complete).
5346
5347 -- The third item not reflected in the syntax is pragmas that appear
5348 -- after the compilation unit. As always pragmas are a problem since
5349 -- they are not part of the formal syntax, but can be stuck into the
5350 -- source following a set of ad hoc rules, and we have to find an ad
5351 -- hoc way of sticking them into the tree. For pragmas that appear
5352 -- before the library unit, we just consider them to be part of the
5353 -- context clause, and pragmas can appear in the Context_Items list
5354 -- of the compilation unit. However, pragmas can also appear after
5355 -- the library item.
5356
5357 -- To deal with all these problems, we create an auxiliary node for
5358 -- a compilation unit, referenced from the N_Compilation_Unit node
5359 -- that contains these three items.
5360
5361 -- N_Compilation_Unit
5362 -- Sloc points to first token of defining unit name
5363 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
5364 -- Context_Items (List1) context items and pragmas preceding unit
5365 -- Private_Present (Flag15) set if library unit has private keyword
5366 -- Unit (Node2) library item or subunit
5367 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
5368 -- Has_No_Elaboration_Code (Flag17-Sem)
5369 -- Body_Required (Flag13-Sem) set for spec if body is required
5370 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
5371 -- First_Inlined_Subprogram (Node3-Sem)
5372
5373 -- N_Compilation_Unit_Aux
5374 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
5375 -- Declarations (List2) (set to No_List if no global declarations)
5376 -- Actions (List1) (set to No_List if no actions)
5377 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
5378 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
5379
5380 --------------------------
5381 -- 10.1.1 Library Item --
5382 --------------------------
5383
5384 -- LIBRARY_ITEM ::=
5385 -- [private] LIBRARY_UNIT_DECLARATION
5386 -- | LIBRARY_UNIT_BODY
5387 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
5388
5389 -- Note: PRIVATE is not allowed in Ada 83 mode
5390
5391 -- There is no explicit node in the tree for library item, instead
5392 -- the declaration or body, and the flag for private if present,
5393 -- appear in the N_Compilation_Unit node.
5394
5395 --------------------------------------
5396 -- 10.1.1 Library Unit Declaration --
5397 --------------------------------------
5398
5399 -- LIBRARY_UNIT_DECLARATION ::=
5400 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
5401 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
5402
5403 -----------------------------------------------
5404 -- 10.1.1 Library Unit Renaming Declaration --
5405 -----------------------------------------------
5406
5407 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
5408 -- PACKAGE_RENAMING_DECLARATION
5409 -- | GENERIC_RENAMING_DECLARATION
5410 -- | SUBPROGRAM_RENAMING_DECLARATION
5411
5412 -------------------------------
5413 -- 10.1.1 Library unit body --
5414 -------------------------------
5415
5416 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
5417
5418 ------------------------------
5419 -- 10.1.1 Parent Unit Name --
5420 ------------------------------
5421
5422 -- PARENT_UNIT_NAME ::= NAME
5423
5424 ----------------------------
5425 -- 10.1.2 Context clause --
5426 ----------------------------
5427
5428 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
5429
5430 -- The context clause can include pragmas, and any pragmas that appear
5431 -- before the context clause proper (i.e. all configuration pragmas,
5432 -- also appear at the front of this list).
5433
5434 --------------------------
5435 -- 10.1.2 Context_Item --
5436 --------------------------
5437
5438 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
5439
5440 -------------------------
5441 -- 10.1.2 With clause --
5442 -------------------------
5443
5444 -- WITH_CLAUSE ::=
5445 -- with library_unit_NAME {,library_unit_NAME};
5446
5447 -- A separate With clause is built for each name, so that we have
5448 -- a Corresponding_Spec field for each with'ed spec. The flags
5449 -- First_Name and Last_Name are used to reconstruct the exact
5450 -- source form. When a list of names appears in one with clause,
5451 -- the first name in the list has First_Name set, and the last
5452 -- has Last_Name set. If the with clause has only one name, then
5453 -- both of the flags First_Name and Last_Name are set in this name.
5454
5455 -- Note: in the case of implicit with's that are installed by the
5456 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
5457 -- set to Standard_Location, but it is incorrect to test the Sloc
5458 -- to find out if a with clause is implicit, test the flag instead.
5459
5460 -- N_With_Clause
5461 -- Sloc points to first token of library unit name
5462 -- Name (Node2)
5463 -- Next_Implicit_With (Node3-Sem)
5464 -- Library_Unit (Node4-Sem)
5465 -- Corresponding_Spec (Node5-Sem)
5466 -- First_Name (Flag5) (set to True if first name or only one name)
5467 -- Last_Name (Flag6) (set to True if last name or only one name)
5468 -- Context_Installed (Flag13-Sem)
5469 -- Elaborate_Present (Flag4-Sem)
5470 -- Elaborate_All_Present (Flag14-Sem)
5471 -- Elaborate_All_Desirable (Flag9-Sem)
5472 -- Elaborate_Desirable (Flag11-Sem)
5473 -- Private_Present (Flag15) set if with_clause has private keyword
5474 -- Implicit_With (Flag16-Sem)
5475 -- Limited_Present (Flag17) set if LIMITED is present
5476 -- Limited_View_Installed (Flag18-Sem)
5477 -- Unreferenced_In_Spec (Flag7-Sem)
5478 -- No_Entities_Ref_In_Spec (Flag8-Sem)
5479
5480 -- Note: Limited_Present and Limited_View_Installed give support to
5481 -- Ada 2005 (AI-50217).
5482 -- Similarly, Private_Present gives support to AI-50262.
5483
5484 ----------------------
5485 -- With_Type clause --
5486 ----------------------
5487
5488 -- This is a GNAT extension, used to implement mutually recursive
5489 -- types declared in different packages.
5490 -- Note: this is now obsolete. The functionality of this construct
5491 -- is now implemented by the Ada 2005 Limited_with_Clause.
5492
5493 ---------------------
5494 -- 10.2 Body stub --
5495 ---------------------
5496
5497 -- BODY_STUB ::=
5498 -- SUBPROGRAM_BODY_STUB
5499 -- | PACKAGE_BODY_STUB
5500 -- | TASK_BODY_STUB
5501 -- | PROTECTED_BODY_STUB
5502
5503 ----------------------------------
5504 -- 10.1.3 Subprogram Body Stub --
5505 ----------------------------------
5506
5507 -- SUBPROGRAM_BODY_STUB ::=
5508 -- SUBPROGRAM_SPECIFICATION is separate;
5509
5510 -- N_Subprogram_Body_Stub
5511 -- Sloc points to FUNCTION or PROCEDURE
5512 -- Specification (Node1)
5513 -- Library_Unit (Node4-Sem) points to the subunit
5514 -- Corresponding_Body (Node5-Sem)
5515
5516 -------------------------------
5517 -- 10.1.3 Package Body Stub --
5518 -------------------------------
5519
5520 -- PACKAGE_BODY_STUB ::=
5521 -- package body DEFINING_IDENTIFIER is separate;
5522
5523 -- N_Package_Body_Stub
5524 -- Sloc points to PACKAGE
5525 -- Defining_Identifier (Node1)
5526 -- Library_Unit (Node4-Sem) points to the subunit
5527 -- Corresponding_Body (Node5-Sem)
5528
5529 ----------------------------
5530 -- 10.1.3 Task Body Stub --
5531 ----------------------------
5532
5533 -- TASK_BODY_STUB ::=
5534 -- task body DEFINING_IDENTIFIER is separate;
5535
5536 -- N_Task_Body_Stub
5537 -- Sloc points to TASK
5538 -- Defining_Identifier (Node1)
5539 -- Library_Unit (Node4-Sem) points to the subunit
5540 -- Corresponding_Body (Node5-Sem)
5541
5542 ---------------------------------
5543 -- 10.1.3 Protected Body Stub --
5544 ---------------------------------
5545
5546 -- PROTECTED_BODY_STUB ::=
5547 -- protected body DEFINING_IDENTIFIER is separate;
5548
5549 -- Note: protected body stubs are not allowed in Ada 83 mode
5550
5551 -- N_Protected_Body_Stub
5552 -- Sloc points to PROTECTED
5553 -- Defining_Identifier (Node1)
5554 -- Library_Unit (Node4-Sem) points to the subunit
5555 -- Corresponding_Body (Node5-Sem)
5556
5557 ---------------------
5558 -- 10.1.3 Subunit --
5559 ---------------------
5560
5561 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
5562
5563 -- N_Subunit
5564 -- Sloc points to SEPARATE
5565 -- Name (Node2) is the name of the parent unit
5566 -- Proper_Body (Node1) is the subunit body
5567 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
5568
5569 ---------------------------------
5570 -- 11.1 Exception Declaration --
5571 ---------------------------------
5572
5573 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception;
5574
5575 -- For consistency with object declarations etc., the parser converts
5576 -- the case of multiple identifiers being declared to a series of
5577 -- declarations in which the expression is copied, using the More_Ids
5578 -- and Prev_Ids flags to remember the source form as described in the
5579 -- section on "Handling of Defining Identifier Lists".
5580
5581 -- N_Exception_Declaration
5582 -- Sloc points to EXCEPTION
5583 -- Defining_Identifier (Node1)
5584 -- Expression (Node3-Sem)
5585 -- Renaming_Exception (Node2-Sem)
5586 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5587 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5588
5589 ------------------------------------------
5590 -- 11.2 Handled Sequence Of Statements --
5591 ------------------------------------------
5592
5593 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
5594 -- SEQUENCE_OF_STATEMENTS
5595 -- [exception
5596 -- EXCEPTION_HANDLER
5597 -- {EXCEPTION_HANDLER}]
5598 -- [at end
5599 -- cleanup_procedure_call (param, param, param, ...);]
5600
5601 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
5602 -- used only internally currently, but is considered to be syntactic.
5603 -- At the moment, the only cleanup action allowed is a single call to
5604 -- a parameterless procedure, and the Identifier field of the node is
5605 -- the procedure to be called. Also there is a current restriction
5606 -- that exception handles and a cleanup cannot be present in the same
5607 -- frame, so at least one of Exception_Handlers or the Identifier must
5608 -- be missing.
5609
5610 -- Actually, more accurately, this restriction applies to the original
5611 -- source program. In the expanded tree, if the At_End_Proc field is
5612 -- present, then there will also be an exception handler of the form:
5613
5614 -- when all others =>
5615 -- cleanup;
5616 -- raise;
5617
5618 -- where cleanup is the procedure to be generated. The reason we do
5619 -- this is so that the front end can handle the necessary entries in
5620 -- the exception tables, and other exception handler actions required
5621 -- as part of the normal handling for exception handlers.
5622
5623 -- The AT END cleanup handler protects only the sequence of statements
5624 -- (not the associated declarations of the parent), just like exception
5625 -- handlers. The big difference is that the cleanup procedure is called
5626 -- on either a normal or an abnormal exit from the statement sequence.
5627
5628 -- Note: the list of Exception_Handlers can contain pragmas as well
5629 -- as actual handlers. In practice these pragmas can only occur at
5630 -- the start of the list, since any pragmas occurring later on will
5631 -- be included in the statement list of the corresponding handler.
5632
5633 -- Note: although in the Ada syntax, the sequence of statements in
5634 -- a handled sequence of statements can only contain statements, we
5635 -- allow free mixing of declarations and statements in the resulting
5636 -- expanded tree. This is for example used to deal with the case of
5637 -- a cleanup procedure that must handle declarations as well as the
5638 -- statements of a block.
5639
5640 -- N_Handled_Sequence_Of_Statements
5641 -- Sloc points to first token of first statement
5642 -- Statements (List3)
5643 -- End_Label (Node4) (set to Empty if expander generated)
5644 -- Exception_Handlers (List5) (set to No_List if none present)
5645 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
5646 -- First_Real_Statement (Node2-Sem)
5647 -- Zero_Cost_Handling (Flag5-Sem)
5648
5649 -- Note: the parent always contains a Declarations field which contains
5650 -- declarations associated with the handled sequence of statements. This
5651 -- is true even in the case of an accept statement (see description of
5652 -- the N_Accept_Statement node).
5653
5654 -- End_Label refers to the containing construct
5655
5656 -----------------------------
5657 -- 11.2 Exception Handler --
5658 -----------------------------
5659
5660 -- EXCEPTION_HANDLER ::=
5661 -- when [CHOICE_PARAMETER_SPECIFICATION :]
5662 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
5663 -- SEQUENCE_OF_STATEMENTS
5664
5665 -- Note: choice parameter specification is not allowed in Ada 83 mode
5666
5667 -- N_Exception_Handler
5668 -- Sloc points to WHEN
5669 -- Choice_Parameter (Node2) (set to Empty if not present)
5670 -- Exception_Choices (List4)
5671 -- Statements (List3)
5672 -- Exception_Label (Node5-Sem) (set to Empty of not present)
5673 -- Zero_Cost_Handling (Flag5-Sem)
5674 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
5675 -- Local_Raise_Not_OK (Flag7-Sem)
5676 -- Has_Local_Raise (Flag8-Sem)
5677
5678 ------------------------------------------
5679 -- 11.2 Choice parameter specification --
5680 ------------------------------------------
5681
5682 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
5683
5684 ----------------------------
5685 -- 11.2 Exception Choice --
5686 ----------------------------
5687
5688 -- EXCEPTION_CHOICE ::= exception_NAME | others
5689
5690 -- Except in the case of OTHERS, no explicit node appears in the tree
5691 -- for exception choice. Instead the exception name appears directly.
5692 -- An OTHERS choice is represented by a N_Others_Choice node (see
5693 -- section 3.8.1.
5694
5695 -- Note: for the exception choice created for an at end handler, the
5696 -- exception choice is an N_Others_Choice node with All_Others set.
5697
5698 ---------------------------
5699 -- 11.3 Raise Statement --
5700 ---------------------------
5701
5702 -- RAISE_STATEMENT ::= raise [exception_NAME];
5703
5704 -- In Ada 2005, we have
5705
5706 -- RAISE_STATEMENT ::= raise; | raise exception_NAME [with EXPRESSION];
5707
5708 -- N_Raise_Statement
5709 -- Sloc points to RAISE
5710 -- Name (Node2) (set to Empty if no exception name present)
5711 -- Expression (Node3) (set to Empty if no expression present)
5712 -- From_At_End (Flag4-Sem)
5713
5714 -------------------------------
5715 -- 12.1 Generic Declaration --
5716 -------------------------------
5717
5718 -- GENERIC_DECLARATION ::=
5719 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
5720
5721 ------------------------------------------
5722 -- 12.1 Generic Subprogram Declaration --
5723 ------------------------------------------
5724
5725 -- GENERIC_SUBPROGRAM_DECLARATION ::=
5726 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION;
5727
5728 -- Note: Generic_Formal_Declarations can include pragmas
5729
5730 -- N_Generic_Subprogram_Declaration
5731 -- Sloc points to GENERIC
5732 -- Specification (Node1) subprogram specification
5733 -- Corresponding_Body (Node5-Sem)
5734 -- Generic_Formal_Declarations (List2) from generic formal part
5735 -- Parent_Spec (Node4-Sem)
5736
5737 ---------------------------------------
5738 -- 12.1 Generic Package Declaration --
5739 ---------------------------------------
5740
5741 -- GENERIC_PACKAGE_DECLARATION ::=
5742 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION;
5743
5744 -- Note: when we do generics right, the Activation_Chain_Entity entry
5745 -- for this node can be removed (since the expander won't see generic
5746 -- units any more)???.
5747
5748 -- Note: Generic_Formal_Declarations can include pragmas
5749
5750 -- N_Generic_Package_Declaration
5751 -- Sloc points to GENERIC
5752 -- Specification (Node1) package specification
5753 -- Corresponding_Body (Node5-Sem)
5754 -- Generic_Formal_Declarations (List2) from generic formal part
5755 -- Parent_Spec (Node4-Sem)
5756 -- Activation_Chain_Entity (Node3-Sem)
5757
5758 -------------------------------
5759 -- 12.1 Generic Formal Part --
5760 -------------------------------
5761
5762 -- GENERIC_FORMAL_PART ::=
5763 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
5764
5765 ------------------------------------------------
5766 -- 12.1 Generic Formal Parameter Declaration --
5767 ------------------------------------------------
5768
5769 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
5770 -- FORMAL_OBJECT_DECLARATION
5771 -- | FORMAL_TYPE_DECLARATION
5772 -- | FORMAL_SUBPROGRAM_DECLARATION
5773 -- | FORMAL_PACKAGE_DECLARATION
5774
5775 ---------------------------------
5776 -- 12.3 Generic Instantiation --
5777 ---------------------------------
5778
5779 -- GENERIC_INSTANTIATION ::=
5780 -- package DEFINING_PROGRAM_UNIT_NAME is
5781 -- new generic_package_NAME [GENERIC_ACTUAL_PART];
5782 -- | [[not] overriding]
5783 -- procedure DEFINING_PROGRAM_UNIT_NAME is
5784 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART];
5785 -- | [[not] overriding]
5786 -- function DEFINING_DESIGNATOR is
5787 -- new generic_function_NAME [GENERIC_ACTUAL_PART];
5788
5789 -- N_Package_Instantiation
5790 -- Sloc points to PACKAGE
5791 -- Defining_Unit_Name (Node1)
5792 -- Name (Node2)
5793 -- Generic_Associations (List3) (set to No_List if no
5794 -- generic actual part)
5795 -- Parent_Spec (Node4-Sem)
5796 -- Instance_Spec (Node5-Sem)
5797 -- ABE_Is_Certain (Flag18-Sem)
5798
5799 -- N_Procedure_Instantiation
5800 -- Sloc points to PROCEDURE
5801 -- Defining_Unit_Name (Node1)
5802 -- Name (Node2)
5803 -- Parent_Spec (Node4-Sem)
5804 -- Generic_Associations (List3) (set to No_List if no
5805 -- generic actual part)
5806 -- Instance_Spec (Node5-Sem)
5807 -- Must_Override (Flag14) set if overriding indicator present
5808 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5809 -- ABE_Is_Certain (Flag18-Sem)
5810
5811 -- N_Function_Instantiation
5812 -- Sloc points to FUNCTION
5813 -- Defining_Unit_Name (Node1)
5814 -- Name (Node2)
5815 -- Generic_Associations (List3) (set to No_List if no
5816 -- generic actual part)
5817 -- Parent_Spec (Node4-Sem)
5818 -- Instance_Spec (Node5-Sem)
5819 -- Must_Override (Flag14) set if overriding indicator present
5820 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5821 -- ABE_Is_Certain (Flag18-Sem)
5822
5823 -- Note: overriding indicator is an Ada 2005 feature
5824
5825 -------------------------------
5826 -- 12.3 Generic Actual Part --
5827 -------------------------------
5828
5829 -- GENERIC_ACTUAL_PART ::=
5830 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
5831
5832 -------------------------------
5833 -- 12.3 Generic Association --
5834 -------------------------------
5835
5836 -- GENERIC_ASSOCIATION ::=
5837 -- [generic_formal_parameter_SELECTOR_NAME =>]
5838
5839 -- Note: unlike the procedure call case, a generic association node
5840 -- is generated for every association, even if no formal parameter
5841 -- selector name is present. In this case the parser will leave the
5842 -- Selector_Name field set to Empty, to be filled in later by the
5843 -- semantic pass.
5844
5845 -- In Ada 2005, a formal may be associated with a box, if the
5846 -- association is part of the list of actuals for a formal package.
5847 -- If the association is given by OTHERS => <>, the association is
5848 -- an N_Others_Choice.
5849
5850 -- N_Generic_Association
5851 -- Sloc points to first token of generic association
5852 -- Selector_Name (Node2) (set to Empty if no formal
5853 -- parameter selector name)
5854 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
5855 -- Box_Present (Flag15) (for formal_package associations with a box)
5856
5857 ---------------------------------------------
5858 -- 12.3 Explicit Generic Actual Parameter --
5859 ---------------------------------------------
5860
5861 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
5862 -- EXPRESSION | variable_NAME | subprogram_NAME
5863 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
5864
5865 -------------------------------------
5866 -- 12.4 Formal Object Declaration --
5867 -------------------------------------
5868
5869 -- FORMAL_OBJECT_DECLARATION ::=
5870 -- DEFINING_IDENTIFIER_LIST :
5871 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION];
5872 -- | DEFINING_IDENTIFIER_LIST :
5873 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION];
5874
5875 -- Although the syntax allows multiple identifiers in the list, the
5876 -- semantics is as though successive declarations were given with
5877 -- identical type definition and expression components. To simplify
5878 -- semantic processing, the parser represents a multiple declaration
5879 -- case as a sequence of single declarations, using the More_Ids and
5880 -- Prev_Ids flags to preserve the original source form as described
5881 -- in the section on "Handling of Defining Identifier Lists".
5882
5883 -- N_Formal_Object_Declaration
5884 -- Sloc points to first identifier
5885 -- Defining_Identifier (Node1)
5886 -- In_Present (Flag15)
5887 -- Out_Present (Flag17)
5888 -- Null_Exclusion_Present (Flag11) (set to False if not present)
5889 -- Subtype_Mark (Node4) (set to Empty if not present)
5890 -- Access_Definition (Node3) (set to Empty if not present)
5891 -- Default_Expression (Node5) (set to Empty if no default expression)
5892 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5893 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5894
5895 -----------------------------------
5896 -- 12.5 Formal Type Declaration --
5897 -----------------------------------
5898
5899 -- FORMAL_TYPE_DECLARATION ::=
5900 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5901 -- is FORMAL_TYPE_DEFINITION;
5902
5903 -- N_Formal_Type_Declaration
5904 -- Sloc points to TYPE
5905 -- Defining_Identifier (Node1)
5906 -- Formal_Type_Definition (Node3)
5907 -- Discriminant_Specifications (List4) (set to No_List if no
5908 -- discriminant part)
5909 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5910
5911 ----------------------------------
5912 -- 12.5 Formal type definition --
5913 ----------------------------------
5914
5915 -- FORMAL_TYPE_DEFINITION ::=
5916 -- FORMAL_PRIVATE_TYPE_DEFINITION
5917 -- | FORMAL_DERIVED_TYPE_DEFINITION
5918 -- | FORMAL_DISCRETE_TYPE_DEFINITION
5919 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
5920 -- | FORMAL_MODULAR_TYPE_DEFINITION
5921 -- | FORMAL_FLOATING_POINT_DEFINITION
5922 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
5923 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
5924 -- | FORMAL_ARRAY_TYPE_DEFINITION
5925 -- | FORMAL_ACCESS_TYPE_DEFINITION
5926 -- | FORMAL_INTERFACE_TYPE_DEFINITION
5927
5928 ---------------------------------------------
5929 -- 12.5.1 Formal Private Type Definition --
5930 ---------------------------------------------
5931
5932 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
5933 -- [[abstract] tagged] [limited] private
5934
5935 -- Note: TAGGED is not allowed in Ada 83 mode
5936
5937 -- N_Formal_Private_Type_Definition
5938 -- Sloc points to PRIVATE
5939 -- Abstract_Present (Flag4)
5940 -- Tagged_Present (Flag15)
5941 -- Limited_Present (Flag17)
5942
5943 --------------------------------------------
5944 -- 12.5.1 Formal Derived Type Definition --
5945 --------------------------------------------
5946
5947 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
5948 -- [abstract] [limited | synchronized]
5949 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
5950 -- Note: this construct is not allowed in Ada 83 mode
5951
5952 -- N_Formal_Derived_Type_Definition
5953 -- Sloc points to NEW
5954 -- Subtype_Mark (Node4)
5955 -- Private_Present (Flag15)
5956 -- Abstract_Present (Flag4)
5957 -- Limited_Present (Flag17)
5958 -- Synchronized_Present (Flag7)
5959 -- Interface_List (List2) (set to No_List if none)
5960
5961 ---------------------------------------------
5962 -- 12.5.2 Formal Discrete Type Definition --
5963 ---------------------------------------------
5964
5965 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
5966
5967 -- N_Formal_Discrete_Type_Definition
5968 -- Sloc points to (
5969
5970 ---------------------------------------------------
5971 -- 12.5.2 Formal Signed Integer Type Definition --
5972 ---------------------------------------------------
5973
5974 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
5975
5976 -- N_Formal_Signed_Integer_Type_Definition
5977 -- Sloc points to RANGE
5978
5979 --------------------------------------------
5980 -- 12.5.2 Formal Modular Type Definition --
5981 --------------------------------------------
5982
5983 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
5984
5985 -- N_Formal_Modular_Type_Definition
5986 -- Sloc points to MOD
5987
5988 ----------------------------------------------
5989 -- 12.5.2 Formal Floating Point Definition --
5990 ----------------------------------------------
5991
5992 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
5993
5994 -- N_Formal_Floating_Point_Definition
5995 -- Sloc points to DIGITS
5996
5997 ----------------------------------------------------
5998 -- 12.5.2 Formal Ordinary Fixed Point Definition --
5999 ----------------------------------------------------
6000
6001 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
6002
6003 -- N_Formal_Ordinary_Fixed_Point_Definition
6004 -- Sloc points to DELTA
6005
6006 ---------------------------------------------------
6007 -- 12.5.2 Formal Decimal Fixed Point Definition --
6008 ---------------------------------------------------
6009
6010 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
6011
6012 -- Note: formal decimal fixed point definition not allowed in Ada 83
6013
6014 -- N_Formal_Decimal_Fixed_Point_Definition
6015 -- Sloc points to DELTA
6016
6017 ------------------------------------------
6018 -- 12.5.3 Formal Array Type Definition --
6019 ------------------------------------------
6020
6021 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
6022
6023 -------------------------------------------
6024 -- 12.5.4 Formal Access Type Definition --
6025 -------------------------------------------
6026
6027 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
6028
6029 ----------------------------------------------
6030 -- 12.5.5 Formal Interface Type Definition --
6031 ----------------------------------------------
6032
6033 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
6034
6035 -----------------------------------------
6036 -- 12.6 Formal Subprogram Declaration --
6037 -----------------------------------------
6038
6039 -- FORMAL_SUBPROGRAM_DECLARATION ::=
6040 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
6041 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
6042
6043 --------------------------------------------------
6044 -- 12.6 Formal Concrete Subprogram Declaration --
6045 --------------------------------------------------
6046
6047 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
6048 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT];
6049
6050 -- N_Formal_Concrete_Subprogram_Declaration
6051 -- Sloc points to WITH
6052 -- Specification (Node1)
6053 -- Default_Name (Node2) (set to Empty if no subprogram default)
6054 -- Box_Present (Flag15)
6055
6056 -- Note: if no subprogram default is present, then Name is set
6057 -- to Empty, and Box_Present is False.
6058
6059 --------------------------------------------------
6060 -- 12.6 Formal Abstract Subprogram Declaration --
6061 --------------------------------------------------
6062
6063 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
6064 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT];
6065
6066 -- N_Formal_Abstract_Subprogram_Declaration
6067 -- Sloc points to WITH
6068 -- Specification (Node1)
6069 -- Default_Name (Node2) (set to Empty if no subprogram default)
6070 -- Box_Present (Flag15)
6071
6072 -- Note: if no subprogram default is present, then Name is set
6073 -- to Empty, and Box_Present is False.
6074
6075 ------------------------------
6076 -- 12.6 Subprogram Default --
6077 ------------------------------
6078
6079 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
6080
6081 -- There is no separate node in the tree for a subprogram default.
6082 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
6083 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
6084 -- default name or box indication, as needed.
6085
6086 ------------------------
6087 -- 12.6 Default Name --
6088 ------------------------
6089
6090 -- DEFAULT_NAME ::= NAME
6091
6092 --------------------------------------
6093 -- 12.7 Formal Package Declaration --
6094 --------------------------------------
6095
6096 -- FORMAL_PACKAGE_DECLARATION ::=
6097 -- with package DEFINING_IDENTIFIER
6098 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART;
6099
6100 -- Note: formal package declarations not allowed in Ada 83 mode
6101
6102 -- N_Formal_Package_Declaration
6103 -- Sloc points to WITH
6104 -- Defining_Identifier (Node1)
6105 -- Name (Node2)
6106 -- Generic_Associations (List3) (set to No_List if (<>) case or
6107 -- empty generic actual part)
6108 -- Box_Present (Flag15)
6109 -- Instance_Spec (Node5-Sem)
6110 -- ABE_Is_Certain (Flag18-Sem)
6111
6112 --------------------------------------
6113 -- 12.7 Formal Package Actual Part --
6114 --------------------------------------
6115
6116 -- FORMAL_PACKAGE_ACTUAL_PART ::=
6117 -- ([OTHERS] => <>)
6118 -- | [GENERIC_ACTUAL_PART]
6119 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
6120
6121 -- FORMAL_PACKAGE_ASSOCIATION ::=
6122 -- GENERIC_ASSOCIATION
6123 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
6124
6125 -- There is no explicit node in the tree for a formal package actual
6126 -- part. Instead the information appears in the parent node (i.e. the
6127 -- formal package declaration node itself).
6128
6129 -- There is no explicit node for a formal package association. All of
6130 -- them are represented either by a generic association, possibly with
6131 -- Box_Present, or by an N_Others_Choice.
6132
6133 ---------------------------------
6134 -- 13.1 Representation clause --
6135 ---------------------------------
6136
6137 -- REPRESENTATION_CLAUSE ::=
6138 -- ATTRIBUTE_DEFINITION_CLAUSE
6139 -- | ENUMERATION_REPRESENTATION_CLAUSE
6140 -- | RECORD_REPRESENTATION_CLAUSE
6141 -- | AT_CLAUSE
6142
6143 ----------------------
6144 -- 13.1 Local Name --
6145 ----------------------
6146
6147 -- LOCAL_NAME :=
6148 -- DIRECT_NAME
6149 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
6150 -- | library_unit_NAME
6151
6152 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
6153 -- as an attribute reference, which has essentially the same form.
6154
6155 ---------------------------------------
6156 -- 13.3 Attribute definition clause --
6157 ---------------------------------------
6158
6159 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
6160 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
6161 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
6162
6163 -- In Ada 83, the expression must be a simple expression and the
6164 -- local name must be a direct name.
6165
6166 -- Note: the only attribute definition clause that is processed by
6167 -- gigi is an address clause. For all other cases, the information
6168 -- is extracted by the front end and either results in setting entity
6169 -- information, e.g. Esize for the Size clause, or in appropriate
6170 -- expansion actions (e.g. in the case of Storage_Size).
6171
6172 -- For an address clause, Gigi constructs the appropriate addressing
6173 -- code. It also ensures that no aliasing optimizations are made
6174 -- for the object for which the address clause appears.
6175
6176 -- Note: for an address clause used to achieve an overlay:
6177
6178 -- A : Integer;
6179 -- B : Integer;
6180 -- for B'Address use A'Address;
6181
6182 -- the above rule means that Gigi will ensure that no optimizations
6183 -- will be made for B that would violate the implementation advice
6184 -- of RM 13.3(19). However, this advice applies only to B and not
6185 -- to A, which seems unfortunate. The GNAT front end will mark the
6186 -- object A as volatile to also prevent unwanted optimization
6187 -- assumptions based on no aliasing being made for B.
6188
6189 -- N_Attribute_Definition_Clause
6190 -- Sloc points to FOR
6191 -- Name (Node2) the local name
6192 -- Chars (Name1) the identifier name from the attribute designator
6193 -- Expression (Node3) the expression or name
6194 -- Entity (Node4-Sem)
6195 -- Next_Rep_Item (Node5-Sem)
6196 -- From_At_Mod (Flag4-Sem)
6197 -- Check_Address_Alignment (Flag11-Sem)
6198 -- Address_Warning_Posted (Flag18-Sem)
6199
6200 ---------------------------------------------
6201 -- 13.4 Enumeration representation clause --
6202 ---------------------------------------------
6203
6204 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
6205 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
6206
6207 -- In Ada 83, the name must be a direct name
6208
6209 -- N_Enumeration_Representation_Clause
6210 -- Sloc points to FOR
6211 -- Identifier (Node1) direct name
6212 -- Array_Aggregate (Node3)
6213 -- Next_Rep_Item (Node5-Sem)
6214
6215 ---------------------------------
6216 -- 13.4 Enumeration aggregate --
6217 ---------------------------------
6218
6219 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
6220
6221 ------------------------------------------
6222 -- 13.5.1 Record representation clause --
6223 ------------------------------------------
6224
6225 -- RECORD_REPRESENTATION_CLAUSE ::=
6226 -- for first_subtype_LOCAL_NAME use
6227 -- record [MOD_CLAUSE]
6228 -- {COMPONENT_CLAUSE}
6229 -- end record;
6230
6231 -- Gigi restriction: Mod_Clause is always Empty (if present it is
6232 -- replaced by a corresponding Alignment attribute definition clause).
6233
6234 -- Note: Component_Clauses can include pragmas
6235
6236 -- N_Record_Representation_Clause
6237 -- Sloc points to FOR
6238 -- Identifier (Node1) direct name
6239 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
6240 -- Component_Clauses (List3)
6241 -- Next_Rep_Item (Node5-Sem)
6242
6243 ------------------------------
6244 -- 13.5.1 Component clause --
6245 ------------------------------
6246
6247 -- COMPONENT_CLAUSE ::=
6248 -- component_LOCAL_NAME at POSITION
6249 -- range FIRST_BIT .. LAST_BIT;
6250
6251 -- N_Component_Clause
6252 -- Sloc points to AT
6253 -- Component_Name (Node1) points to Name or Attribute_Reference
6254 -- Position (Node2)
6255 -- First_Bit (Node3)
6256 -- Last_Bit (Node4)
6257
6258 ----------------------
6259 -- 13.5.1 Position --
6260 ----------------------
6261
6262 -- POSITION ::= static_EXPRESSION
6263
6264 -----------------------
6265 -- 13.5.1 First_Bit --
6266 -----------------------
6267
6268 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
6269
6270 ----------------------
6271 -- 13.5.1 Last_Bit --
6272 ----------------------
6273
6274 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
6275
6276 --------------------------
6277 -- 13.8 Code statement --
6278 --------------------------
6279
6280 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
6281
6282 -- Note: in GNAT, the qualified expression has the form
6283
6284 -- Asm_Insn'(Asm (...));
6285
6286 -- See package System.Machine_Code in file s-maccod.ads for details on
6287 -- the allowed parameters to Asm. There are two ways this node can
6288 -- arise, as a code statement, in which case the expression is the
6289 -- qualified expression, or as a result of the expansion of an intrinsic
6290 -- call to the Asm or Asm_Input procedure.
6291
6292 -- N_Code_Statement
6293 -- Sloc points to first token of the expression
6294 -- Expression (Node3)
6295
6296 -- Note: package Exp_Code contains an abstract functional interface
6297 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
6298
6299 ------------------------
6300 -- 13.12 Restriction --
6301 ------------------------
6302
6303 -- RESTRICTION ::=
6304 -- restriction_IDENTIFIER
6305 -- | restriction_parameter_IDENTIFIER => EXPRESSION
6306
6307 -- There is no explicit node for restrictions. Instead the restriction
6308 -- appears in normal pragma syntax as a pragma argument association,
6309 -- which has the same syntactic form.
6310
6311 --------------------------
6312 -- B.2 Shift Operators --
6313 --------------------------
6314
6315 -- Calls to the intrinsic shift functions are converted to one of
6316 -- the following shift nodes, which have the form of normal binary
6317 -- operator names. Note that for a given shift operation, one node
6318 -- covers all possible types, as for normal operators.
6319
6320 -- Note: it is perfectly permissible for the expander to generate
6321 -- shift operation nodes directly, in which case they will be analyzed
6322 -- and parsed in the usual manner.
6323
6324 -- Sprint syntax: shift-function-name!(expr, count)
6325
6326 -- Note: the Left_Opnd field holds the first argument (the value to
6327 -- be shifted). The Right_Opnd field holds the second argument (the
6328 -- shift count). The Chars field is the name of the intrinsic function.
6329
6330 -- N_Op_Rotate_Left
6331 -- Sloc points to the function name
6332 -- plus fields for binary operator
6333 -- plus fields for expression
6334 -- Shift_Count_OK (Flag4-Sem)
6335
6336 -- N_Op_Rotate_Right
6337 -- Sloc points to the function name
6338 -- plus fields for binary operator
6339 -- plus fields for expression
6340 -- Shift_Count_OK (Flag4-Sem)
6341
6342 -- N_Op_Shift_Left
6343 -- Sloc points to the function name
6344 -- plus fields for binary operator
6345 -- plus fields for expression
6346 -- Shift_Count_OK (Flag4-Sem)
6347
6348 -- N_Op_Shift_Right_Arithmetic
6349 -- Sloc points to the function name
6350 -- plus fields for binary operator
6351 -- plus fields for expression
6352 -- Shift_Count_OK (Flag4-Sem)
6353
6354 -- N_Op_Shift_Right
6355 -- Sloc points to the function name
6356 -- plus fields for binary operator
6357 -- plus fields for expression
6358 -- Shift_Count_OK (Flag4-Sem)
6359
6360 --------------------------
6361 -- Obsolescent Features --
6362 --------------------------
6363
6364 -- The syntax descriptions and tree nodes for obsolescent features are
6365 -- grouped together, corresponding to their location in appendix I in
6366 -- the RM. However, parsing and semantic analysis for these constructs
6367 -- is located in an appropriate chapter (see individual notes).
6368
6369 ---------------------------
6370 -- J.3 Delta Constraint --
6371 ---------------------------
6372
6373 -- Note: the parse routine for this construct is located in section
6374 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
6375 -- where delta constraint logically belongs.
6376
6377 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
6378
6379 -- N_Delta_Constraint
6380 -- Sloc points to DELTA
6381 -- Delta_Expression (Node3)
6382 -- Range_Constraint (Node4) (set to Empty if not present)
6383
6384 --------------------
6385 -- J.7 At Clause --
6386 --------------------
6387
6388 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
6389
6390 -- Note: the parse routine for this construct is located in Par-Ch13,
6391 -- and the semantic analysis is in Sem_Ch13, where at clause logically
6392 -- belongs if it were not obsolescent.
6393
6394 -- Note: in Ada 83 the expression must be a simple expression
6395
6396 -- Gigi restriction: This node never appears, it is rewritten as an
6397 -- address attribute definition clause.
6398
6399 -- N_At_Clause
6400 -- Sloc points to FOR
6401 -- Identifier (Node1)
6402 -- Expression (Node3)
6403
6404 ---------------------
6405 -- J.8 Mod clause --
6406 ---------------------
6407
6408 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
6409
6410 -- Note: the parse routine for this construct is located in Par-Ch13,
6411 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
6412 -- belongs if it were not obsolescent.
6413
6414 -- Note: in Ada 83, the expression must be a simple expression
6415
6416 -- Gigi restriction: this node never appears. It is replaced
6417 -- by a corresponding Alignment attribute definition clause.
6418
6419 -- Note: pragmas can appear before and after the MOD_CLAUSE since
6420 -- its name has "clause" in it. This is rather strange, but is quite
6421 -- definitely specified. The pragmas before are collected in the
6422 -- Pragmas_Before field of the mod clause node itself, and pragmas
6423 -- after are simply swallowed up in the list of component clauses.
6424
6425 -- N_Mod_Clause
6426 -- Sloc points to AT
6427 -- Expression (Node3)
6428 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
6429
6430 --------------------
6431 -- Semantic Nodes --
6432 --------------------
6433
6434 -- These semantic nodes are used to hold additional semantic information.
6435 -- They are inserted into the tree as a result of semantic processing.
6436 -- Although there are no legitimate source syntax constructions that
6437 -- correspond directly to these nodes, we need a source syntax for the
6438 -- reconstructed tree printed by Sprint, and the node descriptions here
6439 -- show this syntax.
6440
6441 -- Note: Conditional_Expression is in this section for historical reasons.
6442 -- We will move it to its appropriate place when it is officially approved
6443 -- as an extension (and then we will know what the exact grammar and place
6444 -- in the Reference Manual is!)
6445
6446 ----------------------------
6447 -- Conditional Expression --
6448 ----------------------------
6449
6450 -- This node is used to represent an expression corresponding to the
6451 -- C construct (condition ? then-expression : else_expression), where
6452 -- Expressions is a three element list, whose first expression is the
6453 -- condition, and whose second and third expressions are the then and
6454 -- else expressions respectively.
6455
6456 -- Note: the Then_Actions and Else_Actions fields are always set to
6457 -- No_List in the tree passed to Gigi. These fields are used only
6458 -- for temporary processing purposes in the expander.
6459
6460 -- The Ada language does not permit conditional expressions, however
6461 -- this is under discussion as a possible extension by the ARG, and we
6462 -- have implemented a form of this capability in GNAT under control of
6463 -- the -X switch. The syntax is:
6464
6465 -- CONDITIONAL_EXPRESSION ::=
6466 -- if EXPRESSION then EXPRESSION
6467 -- {elsif EXPRESSION then EXPRESSION}
6468 -- [else EXPRESSION]
6469
6470 -- And we add the additional constructs
6471
6472 -- PRIMARY ::= ( CONDITIONAL_EXPRESION )
6473 -- PRAGMA_ARGUMENT_ASSOCIATION ::= CONDITIONAL_EXPRESSION
6474
6475 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
6476 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
6477 -- the Is_Elsif flag is set on the inner conditional expression.
6478
6479 -- N_Conditional_Expression
6480 -- Sloc points to IF or ELSIF keyword
6481 -- Expressions (List1)
6482 -- Then_Actions (List2-Sem)
6483 -- Else_Actions (List3-Sem)
6484 -- Is_Elsif (Flag13) (set if comes from ELSIF)
6485 -- plus fields for expression
6486
6487 -------------------
6488 -- Expanded_Name --
6489 -------------------
6490
6491 -- The N_Expanded_Name node is used to represent a selected component
6492 -- name that has been resolved to an expanded name. The semantic phase
6493 -- replaces N_Selected_Component nodes that represent names by the use
6494 -- of this node, leaving the N_Selected_Component node used only when
6495 -- the prefix is a record or protected type.
6496
6497 -- The fields of the N_Expanded_Name node are layed out identically
6498 -- to those of the N_Selected_Component node, allowing conversion of
6499 -- an expanded name node to a selected component node to be done
6500 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
6501
6502 -- There is no special sprint syntax for an expanded name
6503
6504 -- N_Expanded_Name
6505 -- Sloc points to the period
6506 -- Chars (Name1) copy of Chars field of selector name
6507 -- Prefix (Node3)
6508 -- Selector_Name (Node2)
6509 -- Entity (Node4-Sem)
6510 -- Associated_Node (Node4-Sem)
6511 -- Redundant_Use (Flag13-Sem)
6512 -- Has_Private_View (Flag11-Sem) set in generic units.
6513 -- plus fields for expression
6514
6515 --------------------
6516 -- Free Statement --
6517 --------------------
6518
6519 -- The N_Free_Statement node is generated as a result of a call to an
6520 -- instantiation of Unchecked_Deallocation. The instantiation of this
6521 -- generic is handled specially and generates this node directly.
6522
6523 -- Sprint syntax: free expression
6524
6525 -- N_Free_Statement
6526 -- Sloc is copied from the unchecked deallocation call
6527 -- Expression (Node3) argument to unchecked deallocation call
6528 -- Storage_Pool (Node1-Sem)
6529 -- Procedure_To_Call (Node2-Sem)
6530 -- Actual_Designated_Subtype (Node4-Sem)
6531
6532 -- Note: in the case where a debug source file is generated, the Sloc
6533 -- for this node points to the FREE keyword in the Sprint file output.
6534
6535 -------------------
6536 -- Freeze Entity --
6537 -------------------
6538
6539 -- This node marks the point in a declarative part at which an entity
6540 -- declared therein becomes frozen. The expander places initialization
6541 -- procedures for types at those points. Gigi uses the freezing point
6542 -- to elaborate entities that may depend on previous private types.
6543
6544 -- See the section in Einfo "Delayed Freezing and Elaboration" for
6545 -- a full description of the use of this node.
6546
6547 -- The Entity field points back to the entity for the type (whose
6548 -- Freeze_Node field points back to this freeze node).
6549
6550 -- The Actions field contains a list of declarations and statements
6551 -- generated by the expander which are associated with the freeze
6552 -- node, and are elaborated as though the freeze node were replaced
6553 -- by this sequence of actions.
6554
6555 -- Note: the Sloc field in the freeze node references a construct
6556 -- associated with the freezing point. This is used for posting
6557 -- messages in some error/warning situations, e.g. the case where
6558 -- a primitive operation of a tagged type is declared too late.
6559
6560 -- Sprint syntax: freeze entity-name [
6561 -- freeze actions
6562 -- ]
6563
6564 -- N_Freeze_Entity
6565 -- Sloc points near freeze point (see above special note)
6566 -- Entity (Node4-Sem)
6567 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
6568 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
6569 -- Actions (List1) (set to No_List if no freeze actions)
6570 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
6571
6572 -- The Actions field holds actions associated with the freeze. These
6573 -- actions are elaborated at the point where the type is frozen.
6574
6575 -- Note: in the case where a debug source file is generated, the Sloc
6576 -- for this node points to the FREEZE keyword in the Sprint file output.
6577
6578 --------------------------------
6579 -- Implicit Label Declaration --
6580 --------------------------------
6581
6582 -- An implicit label declaration is created for every occurrence of a
6583 -- label on a statement or a label on a block or loop. It is chained
6584 -- in the declarations of the innermost enclosing block as specified
6585 -- in RM section 5.1 (3).
6586
6587 -- The Defining_Identifier is the actual identifier for the statement
6588 -- identifier. Note that the occurrence of the label is a reference, NOT
6589 -- the defining occurrence. The defining occurrence occurs at the head
6590 -- of the innermost enclosing block, and is represented by this node.
6591
6592 -- Note: from the grammar, this might better be called an implicit
6593 -- statement identifier declaration, but the term we choose seems
6594 -- friendlier, since at least informally statement identifiers are
6595 -- called labels in both cases (i.e. when used in labels, and when
6596 -- used as the identifiers of blocks and loops).
6597
6598 -- Note: although this is logically a semantic node, since it does not
6599 -- correspond directly to a source syntax construction, these nodes are
6600 -- actually created by the parser in a post pass done just after parsing
6601 -- is complete, before semantic analysis is started (see Par.Labl).
6602
6603 -- Sprint syntax: labelname : label;
6604
6605 -- N_Implicit_Label_Declaration
6606 -- Sloc points to the << of the label
6607 -- Defining_Identifier (Node1)
6608 -- Label_Construct (Node2-Sem)
6609
6610 -- Note: in the case where a debug source file is generated, the Sloc
6611 -- for this node points to the label name in the generated declaration.
6612
6613 ---------------------
6614 -- Itype_Reference --
6615 ---------------------
6616
6617 -- This node is used to create a reference to an Itype. The only purpose
6618 -- is to make sure the Itype is defined if this is the first reference.
6619
6620 -- A typical use of this node is when an Itype is to be referenced in
6621 -- two branches of an IF statement. In this case it is important that
6622 -- the first use of the Itype not be inside the conditional, since then
6623 -- it might not be defined if the other branch of the IF is taken, in
6624 -- the case where the definition generates elaboration code.
6625
6626 -- The Itype field points to the referenced Itype
6627
6628 -- Sprint syntax: reference itype-name
6629
6630 -- N_Itype_Reference
6631 -- Sloc points to the node generating the reference
6632 -- Itype (Node1-Sem)
6633
6634 -- Note: in the case where a debug source file is generated, the Sloc
6635 -- for this node points to the REFERENCE keyword in the file output.
6636
6637 ---------------------
6638 -- Raise_xxx_Error --
6639 ---------------------
6640
6641 -- One of these nodes is created during semantic analysis to replace
6642 -- a node for an expression that is determined to definitely raise
6643 -- the corresponding exception.
6644
6645 -- The N_Raise_xxx_Error node may also stand alone in place
6646 -- of a declaration or statement, in which case it simply causes
6647 -- the exception to be raised (i.e. it is equivalent to a raise
6648 -- statement that raises the corresponding exception). This use
6649 -- is distinguished by the fact that the Etype in this case is
6650 -- Standard_Void_Type, In the subexpression case, the Etype is the
6651 -- same as the type of the subexpression which it replaces.
6652
6653 -- If Condition is empty, then the raise is unconditional. If the
6654 -- Condition field is non-empty, it is a boolean expression which
6655 -- is first evaluated, and the exception is raised only if the
6656 -- value of the expression is True. In the unconditional case, the
6657 -- creation of this node is usually accompanied by a warning message
6658 -- error. The creation of this node will usually be accompanied by a
6659 -- message (unless it appears within the right operand of a short
6660 -- circuit form whose left argument is static and decisively
6661 -- eliminates elaboration of the raise operation. The condition field
6662 -- can ONLY be present when the node is used as a statement form, it
6663 -- may NOT be present in the case where the node appears within an
6664 -- expression.
6665
6666 -- The exception is generated with a message that contains the
6667 -- file name and line number, and then appended text. The Reason
6668 -- code shows the text to be added. The Reason code is an element
6669 -- of the type Types.RT_Exception_Code, and indicates both the
6670 -- message to be added, and the exception to be raised (which must
6671 -- match the node type). The value is stored by storing a Uint which
6672 -- is the Pos value of the enumeration element in this type.
6673
6674 -- Gigi restriction: This expander ensures that the type of the
6675 -- Condition field is always Standard.Boolean, even if the type
6676 -- in the source is some non-standard boolean type.
6677
6678 -- Sprint syntax: [xxx_error "msg"]
6679 -- or: [xxx_error when condition "msg"]
6680
6681 -- N_Raise_Constraint_Error
6682 -- Sloc references related construct
6683 -- Condition (Node1) (set to Empty if no condition)
6684 -- Reason (Uint3)
6685 -- plus fields for expression
6686
6687 -- N_Raise_Program_Error
6688 -- Sloc references related construct
6689 -- Condition (Node1) (set to Empty if no condition)
6690 -- Reason (Uint3)
6691 -- plus fields for expression
6692
6693 -- N_Raise_Storage_Error
6694 -- Sloc references related construct
6695 -- Condition (Node1) (set to Empty if no condition)
6696 -- Reason (Uint3)
6697 -- plus fields for expression
6698
6699 -- Note: Sloc is copied from the expression generating the exception.
6700 -- In the case where a debug source file is generated, the Sloc for
6701 -- this node points to the left bracket in the Sprint file output.
6702
6703 -- Note: the back end may be required to translate these nodes into
6704 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
6705
6706 ---------------------------------------------
6707 -- Optimization of Exception Raise to Goto --
6708 ---------------------------------------------
6709
6710 -- In some cases, the front end will determine that any exception raised
6711 -- by the back end for a certain exception should be transformed into a
6712 -- goto statement.
6713
6714 -- There are three kinds of exceptions raised by the back end (note that
6715 -- for this purpose we consider gigi to be part of the back end in the
6716 -- gcc case):
6717
6718 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
6719 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
6720 -- 3. Other cases not specifically marked by the front end
6721
6722 -- Normally all such exceptions are translated into calls to the proper
6723 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
6724 -- and the exception message.
6725
6726 -- The front end may determine that for a particular sequence of code,
6727 -- exceptions in any of these three categories for a particular builtin
6728 -- exception should result in a goto, rather than a call to Rcheck_xx.
6729 -- The exact sequence to be generated is:
6730
6731 -- Local_Raise (exception'Identity);
6732 -- goto Label
6733
6734 -- The front end marks such a sequence of code by bracketing it with
6735 -- push and pop nodes:
6736
6737 -- N_Push_xxx_Label (referencing the label)
6738 -- ...
6739 -- (code where transformation is expected for exception xxx)
6740 -- ...
6741 -- N_Pop_xxx_Label
6742
6743 -- The use of push/pop reflects the fact that such regions can properly
6744 -- nest, and one special case is a subregion in which no transformation
6745 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
6746 -- Exception_Label field is Empty.
6747
6748 -- N_Push_Constraint_Error_Label
6749 -- Sloc references first statement in region covered
6750 -- Exception_Label (Node5-Sem)
6751
6752 -- N_Push_Program_Error_Label
6753 -- Sloc references first statement in region covered
6754 -- Exception_Label (Node5-Sem)
6755
6756 -- N_Push_Storage_Error_Label
6757 -- Sloc references first statement in region covered
6758 -- Exception_Label (Node5-Sem)
6759
6760 -- N_Pop_Constraint_Error_Label
6761 -- Sloc references last statement in region covered
6762
6763 -- N_Pop_Program_Error_Label
6764 -- Sloc references last statement in region covered
6765
6766 -- N_Pop_Storage_Error_Label
6767 -- Sloc references last statement in region covered
6768
6769 ---------------
6770 -- Reference --
6771 ---------------
6772
6773 -- For a number of purposes, we need to construct references to objects.
6774 -- These references are subsequently treated as normal access values.
6775 -- An example is the construction of the parameter block passed to a
6776 -- task entry. The N_Reference node is provided for this purpose. It is
6777 -- similar in effect to the use of the Unrestricted_Access attribute,
6778 -- and like Unrestricted_Access can be applied to objects which would
6779 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
6780 -- objects which are not aliased, and slices). In addition it can be
6781 -- applied to composite type values as well as objects, including string
6782 -- values and aggregates.
6783
6784 -- Note: we use the Prefix field for this expression so that the
6785 -- resulting node can be treated using common code with the attribute
6786 -- nodes for the 'Access and related attributes. Logically it would make
6787 -- more sense to call it an Expression field, but then we would have to
6788 -- special case the treatment of the N_Reference node.
6789
6790 -- Sprint syntax: prefix'reference
6791
6792 -- N_Reference
6793 -- Sloc is copied from the expression
6794 -- Prefix (Node3)
6795 -- plus fields for expression
6796
6797 -- Note: in the case where a debug source file is generated, the Sloc
6798 -- for this node points to the quote in the Sprint file output.
6799
6800 ---------------------
6801 -- Subprogram_Info --
6802 ---------------------
6803
6804 -- This node generates the appropriate Subprogram_Info value for a
6805 -- given procedure. See Ada.Exceptions for further details
6806
6807 -- Sprint syntax: subprog'subprogram_info
6808
6809 -- N_Subprogram_Info
6810 -- Sloc points to the entity for the procedure
6811 -- Identifier (Node1) identifier referencing the procedure
6812 -- Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc
6813
6814 -- Note: in the case where a debug source file is generated, the Sloc
6815 -- for this node points to the quote in the Sprint file output.
6816
6817 --------------------------
6818 -- Unchecked Expression --
6819 --------------------------
6820
6821 -- An unchecked expression is one that must be analyzed and resolved
6822 -- with all checks off, regardless of the current setting of scope
6823 -- suppress flags.
6824
6825 -- Sprint syntax: `(expression)
6826
6827 -- Note: this node is always removed from the tree (and replaced by
6828 -- its constituent expression) on completion of analysis, so it only
6829 -- appears in intermediate trees, and will never be seen by Gigi.
6830
6831 -- N_Unchecked_Expression
6832 -- Sloc is a copy of the Sloc of the expression
6833 -- Expression (Node3)
6834 -- plus fields for expression
6835
6836 -- Note: in the case where a debug source file is generated, the Sloc
6837 -- for this node points to the back quote in the Sprint file output.
6838
6839 -------------------------------
6840 -- Unchecked Type Conversion --
6841 -------------------------------
6842
6843 -- An unchecked type conversion node represents the semantic action
6844 -- corresponding to a call to an instantiation of Unchecked_Conversion.
6845 -- It is generated as a result of actual use of Unchecked_Conversion
6846 -- and also the expander generates unchecked type conversion nodes
6847 -- directly for expansion of complex semantic actions.
6848
6849 -- Note: an unchecked type conversion is a variable as far as the
6850 -- semantics are concerned, which is convenient for the expander.
6851 -- This does not change what Ada source programs are legal, since
6852 -- clearly a function call to an instantiation of Unchecked_Conversion
6853 -- is not a variable in any case.
6854
6855 -- Sprint syntax: subtype-mark!(expression)
6856
6857 -- N_Unchecked_Type_Conversion
6858 -- Sloc points to related node in source
6859 -- Subtype_Mark (Node4)
6860 -- Expression (Node3)
6861 -- Kill_Range_Check (Flag11-Sem)
6862 -- No_Truncation (Flag17-Sem)
6863 -- plus fields for expression
6864
6865 -- Note: in the case where a debug source file is generated, the Sloc
6866 -- for this node points to the exclamation in the Sprint file output.
6867
6868 -----------------------------------
6869 -- Validate_Unchecked_Conversion --
6870 -----------------------------------
6871
6872 -- The front end does most of the validation of unchecked conversion,
6873 -- including checking sizes (this is done after the back end is called
6874 -- to take advantage of back-annotation of calculated sizes).
6875
6876 -- The front end also deals with specific cases that are not allowed
6877 -- e.g. involving unconstrained array types.
6878
6879 -- For the case of the standard gigi backend, this means that all
6880 -- checks are done in the front-end.
6881
6882 -- However, in the case of specialized back-ends, notably the JVM
6883 -- backend for JGNAT, additional requirements and restrictions apply
6884 -- to unchecked conversion, and these are most conveniently performed
6885 -- in the specialized back-end.
6886
6887 -- To accommodate this requirement, for such back ends, the following
6888 -- special node is generated recording an unchecked conversion that
6889 -- needs to be validated. The back end should post an appropriate
6890 -- error message if the unchecked conversion is invalid or warrants
6891 -- a special warning message.
6892
6893 -- Source_Type and Target_Type point to the entities for the two
6894 -- types involved in the unchecked conversion instantiation that
6895 -- is to be validated.
6896
6897 -- Sprint syntax: validate Unchecked_Conversion (source, target);
6898
6899 -- N_Validate_Unchecked_Conversion
6900 -- Sloc points to instantiation (location for warning message)
6901 -- Source_Type (Node1-Sem)
6902 -- Target_Type (Node2-Sem)
6903
6904 -- Note: in the case where a debug source file is generated, the Sloc
6905 -- for this node points to the VALIDATE keyword in the file output.
6906
6907 -----------
6908 -- Empty --
6909 -----------
6910
6911 -- Used as the contents of the Nkind field of the dummy Empty node
6912 -- and in some other situations to indicate an uninitialized value.
6913
6914 -- N_Empty
6915 -- Chars (Name1) is set to No_Name
6916
6917 -----------
6918 -- Error --
6919 -----------
6920
6921 -- Used as the contents of the Nkind field of the dummy Error node.
6922 -- Has an Etype field, which gets set to Any_Type later on, to help
6923 -- error recovery (Error_Posted is also set in the Error node).
6924
6925 -- N_Error
6926 -- Chars (Name1) is set to Error_Name
6927 -- Etype (Node5-Sem)
6928
6929 --------------------------
6930 -- Node Type Definition --
6931 --------------------------
6932
6933 -- The following is the definition of the Node_Kind type. As previously
6934 -- discussed, this is separated off to allow rearrangement of the order
6935 -- to facilitate definition of subtype ranges. The comments show the
6936 -- subtype classes which apply to each set of node kinds. The first
6937 -- entry in the comment characterizes the following list of nodes.
6938
6939 type Node_Kind is (
6940 N_Unused_At_Start,
6941
6942 -- N_Representation_Clause
6943
6944 N_At_Clause,
6945 N_Component_Clause,
6946 N_Enumeration_Representation_Clause,
6947 N_Mod_Clause,
6948 N_Record_Representation_Clause,
6949
6950 -- N_Representation_Clause, N_Has_Chars
6951
6952 N_Attribute_Definition_Clause,
6953
6954 -- N_Has_Chars
6955
6956 N_Empty,
6957 N_Pragma_Argument_Association,
6958
6959 -- N_Has_Etype
6960
6961 N_Error,
6962
6963 -- N_Entity, N_Has_Etype, N_Has_Chars
6964
6965 N_Defining_Character_Literal,
6966 N_Defining_Identifier,
6967 N_Defining_Operator_Symbol,
6968
6969 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
6970
6971 N_Expanded_Name,
6972
6973 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
6974 -- N_Has_Chars, N_Has_Entity
6975
6976 N_Identifier,
6977 N_Operator_Symbol,
6978
6979 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
6980 -- N_Has_Chars, N_Has_Entity
6981
6982 N_Character_Literal,
6983
6984 -- N_Binary_Op, N_Op, N_Subexpr,
6985 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
6986
6987 N_Op_Add,
6988 N_Op_Concat,
6989 N_Op_Expon,
6990 N_Op_Subtract,
6991
6992 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
6993 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
6994
6995 N_Op_Divide,
6996 N_Op_Mod,
6997 N_Op_Multiply,
6998 N_Op_Rem,
6999
7000 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7001 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7002
7003 N_Op_And,
7004
7005 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7006 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
7007
7008 N_Op_Eq,
7009 N_Op_Ge,
7010 N_Op_Gt,
7011 N_Op_Le,
7012 N_Op_Lt,
7013 N_Op_Ne,
7014
7015 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7016 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7017
7018 N_Op_Or,
7019 N_Op_Xor,
7020
7021 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
7022 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
7023
7024 N_Op_Rotate_Left,
7025 N_Op_Rotate_Right,
7026 N_Op_Shift_Left,
7027 N_Op_Shift_Right,
7028 N_Op_Shift_Right_Arithmetic,
7029
7030 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
7031 -- N_Has_Chars, N_Has_Entity
7032
7033 N_Op_Abs,
7034 N_Op_Minus,
7035 N_Op_Not,
7036 N_Op_Plus,
7037
7038 -- N_Subexpr, N_Has_Etype, N_Has_Entity
7039
7040 N_Attribute_Reference,
7041
7042 -- N_Subexpr, N_Has_Etype, N_Membership_Test
7043
7044 N_In,
7045 N_Not_In,
7046
7047 -- N_Subexpr, N_Has_Etype
7048
7049 N_And_Then,
7050 N_Conditional_Expression,
7051 N_Explicit_Dereference,
7052 N_Function_Call,
7053 N_Indexed_Component,
7054 N_Integer_Literal,
7055 N_Null,
7056 N_Or_Else,
7057 N_Procedure_Call_Statement,
7058 N_Qualified_Expression,
7059
7060 -- N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
7061
7062 N_Raise_Constraint_Error,
7063 N_Raise_Program_Error,
7064 N_Raise_Storage_Error,
7065
7066 -- N_Subexpr, N_Has_Etype
7067
7068 N_Aggregate,
7069 N_Allocator,
7070 N_Extension_Aggregate,
7071 N_Range,
7072 N_Real_Literal,
7073 N_Reference,
7074 N_Selected_Component,
7075 N_Slice,
7076 N_String_Literal,
7077 N_Subprogram_Info,
7078 N_Type_Conversion,
7079 N_Unchecked_Expression,
7080 N_Unchecked_Type_Conversion,
7081
7082 -- N_Has_Etype
7083
7084 N_Subtype_Indication,
7085
7086 -- N_Declaration
7087
7088 N_Component_Declaration,
7089 N_Entry_Declaration,
7090 N_Formal_Object_Declaration,
7091 N_Formal_Type_Declaration,
7092 N_Full_Type_Declaration,
7093 N_Incomplete_Type_Declaration,
7094 N_Loop_Parameter_Specification,
7095 N_Object_Declaration,
7096 N_Protected_Type_Declaration,
7097 N_Private_Extension_Declaration,
7098 N_Private_Type_Declaration,
7099 N_Subtype_Declaration,
7100
7101 -- N_Subprogram_Specification, N_Declaration
7102
7103 N_Function_Specification,
7104 N_Procedure_Specification,
7105
7106 -- N_Access_To_Subprogram_Definition
7107
7108 N_Access_Function_Definition,
7109 N_Access_Procedure_Definition,
7110
7111 -- N_Later_Decl_Item
7112
7113 N_Task_Type_Declaration,
7114
7115 -- N_Body_Stub, N_Later_Decl_Item
7116
7117 N_Package_Body_Stub,
7118 N_Protected_Body_Stub,
7119 N_Subprogram_Body_Stub,
7120 N_Task_Body_Stub,
7121
7122 -- N_Generic_Instantiation, N_Later_Decl_Item
7123 -- N_Subprogram_Instantiation
7124
7125 N_Function_Instantiation,
7126 N_Procedure_Instantiation,
7127
7128 -- N_Generic_Instantiation, N_Later_Decl_Item
7129
7130 N_Package_Instantiation,
7131
7132 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
7133
7134 N_Package_Body,
7135 N_Subprogram_Body,
7136
7137 -- N_Later_Decl_Item, N_Proper_Body
7138
7139 N_Protected_Body,
7140 N_Task_Body,
7141
7142 -- N_Later_Decl_Item
7143
7144 N_Implicit_Label_Declaration,
7145 N_Package_Declaration,
7146 N_Single_Task_Declaration,
7147 N_Subprogram_Declaration,
7148 N_Use_Package_Clause,
7149
7150 -- N_Generic_Declaration, N_Later_Decl_Item
7151
7152 N_Generic_Package_Declaration,
7153 N_Generic_Subprogram_Declaration,
7154
7155 -- N_Array_Type_Definition
7156
7157 N_Constrained_Array_Definition,
7158 N_Unconstrained_Array_Definition,
7159
7160 -- N_Renaming_Declaration
7161
7162 N_Exception_Renaming_Declaration,
7163 N_Object_Renaming_Declaration,
7164 N_Package_Renaming_Declaration,
7165 N_Subprogram_Renaming_Declaration,
7166
7167 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
7168
7169 N_Generic_Function_Renaming_Declaration,
7170 N_Generic_Package_Renaming_Declaration,
7171 N_Generic_Procedure_Renaming_Declaration,
7172
7173 -- N_Statement_Other_Than_Procedure_Call
7174
7175 N_Abort_Statement,
7176 N_Accept_Statement,
7177 N_Assignment_Statement,
7178 N_Asynchronous_Select,
7179 N_Block_Statement,
7180 N_Case_Statement,
7181 N_Code_Statement,
7182 N_Conditional_Entry_Call,
7183
7184 -- N_Statement_Other_Than_Procedure_Call. N_Delay_Statement
7185
7186 N_Delay_Relative_Statement,
7187 N_Delay_Until_Statement,
7188
7189 -- N_Statement_Other_Than_Procedure_Call
7190
7191 N_Entry_Call_Statement,
7192 N_Free_Statement,
7193 N_Goto_Statement,
7194 N_Loop_Statement,
7195 N_Null_Statement,
7196 N_Raise_Statement,
7197 N_Requeue_Statement,
7198 N_Return_Statement, -- renamed as N_Simple_Return_Statement below
7199 N_Extended_Return_Statement,
7200 N_Selective_Accept,
7201 N_Timed_Entry_Call,
7202
7203 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
7204
7205 N_Exit_Statement,
7206 N_If_Statement,
7207
7208 -- N_Has_Condition
7209
7210 N_Accept_Alternative,
7211 N_Delay_Alternative,
7212 N_Elsif_Part,
7213 N_Entry_Body_Formal_Part,
7214 N_Iteration_Scheme,
7215 N_Terminate_Alternative,
7216
7217 -- N_Formal_Subprogram_Declaration
7218
7219 N_Formal_Abstract_Subprogram_Declaration,
7220 N_Formal_Concrete_Subprogram_Declaration,
7221
7222 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
7223
7224 N_Push_Constraint_Error_Label,
7225 N_Push_Program_Error_Label,
7226 N_Push_Storage_Error_Label,
7227
7228 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
7229
7230 N_Pop_Constraint_Error_Label,
7231 N_Pop_Program_Error_Label,
7232 N_Pop_Storage_Error_Label,
7233
7234 -- Other nodes (not part of any subtype class)
7235
7236 N_Abortable_Part,
7237 N_Abstract_Subprogram_Declaration,
7238 N_Access_Definition,
7239 N_Access_To_Object_Definition,
7240 N_Case_Statement_Alternative,
7241 N_Compilation_Unit,
7242 N_Compilation_Unit_Aux,
7243 N_Component_Association,
7244 N_Component_Definition,
7245 N_Component_List,
7246 N_Derived_Type_Definition,
7247 N_Decimal_Fixed_Point_Definition,
7248 N_Defining_Program_Unit_Name,
7249 N_Delta_Constraint,
7250 N_Designator,
7251 N_Digits_Constraint,
7252 N_Discriminant_Association,
7253 N_Discriminant_Specification,
7254 N_Enumeration_Type_Definition,
7255 N_Entry_Body,
7256 N_Entry_Call_Alternative,
7257 N_Entry_Index_Specification,
7258 N_Exception_Declaration,
7259 N_Exception_Handler,
7260 N_Floating_Point_Definition,
7261 N_Formal_Decimal_Fixed_Point_Definition,
7262 N_Formal_Derived_Type_Definition,
7263 N_Formal_Discrete_Type_Definition,
7264 N_Formal_Floating_Point_Definition,
7265 N_Formal_Modular_Type_Definition,
7266 N_Formal_Ordinary_Fixed_Point_Definition,
7267 N_Formal_Package_Declaration,
7268 N_Formal_Private_Type_Definition,
7269 N_Formal_Signed_Integer_Type_Definition,
7270 N_Freeze_Entity,
7271 N_Generic_Association,
7272 N_Handled_Sequence_Of_Statements,
7273 N_Index_Or_Discriminant_Constraint,
7274 N_Itype_Reference,
7275 N_Label,
7276 N_Modular_Type_Definition,
7277 N_Number_Declaration,
7278 N_Ordinary_Fixed_Point_Definition,
7279 N_Others_Choice,
7280 N_Package_Specification,
7281 N_Parameter_Association,
7282 N_Parameter_Specification,
7283 N_Pragma,
7284 N_Protected_Definition,
7285 N_Range_Constraint,
7286 N_Real_Range_Specification,
7287 N_Record_Definition,
7288 N_Signed_Integer_Type_Definition,
7289 N_Single_Protected_Declaration,
7290 N_Subunit,
7291 N_Task_Definition,
7292 N_Triggering_Alternative,
7293 N_Use_Type_Clause,
7294 N_Validate_Unchecked_Conversion,
7295 N_Variant,
7296 N_Variant_Part,
7297 N_With_Clause,
7298 N_Unused_At_End);
7299
7300 for Node_Kind'Size use 8;
7301 -- The data structures in Atree assume this!
7302
7303 ----------------------------
7304 -- Node Class Definitions --
7305 ----------------------------
7306
7307 subtype N_Access_To_Subprogram_Definition is Node_Kind range
7308 N_Access_Function_Definition ..
7309 N_Access_Procedure_Definition;
7310
7311 subtype N_Array_Type_Definition is Node_Kind range
7312 N_Constrained_Array_Definition ..
7313 N_Unconstrained_Array_Definition;
7314
7315 subtype N_Binary_Op is Node_Kind range
7316 N_Op_Add ..
7317 N_Op_Shift_Right_Arithmetic;
7318
7319 subtype N_Body_Stub is Node_Kind range
7320 N_Package_Body_Stub ..
7321 N_Task_Body_Stub;
7322
7323 subtype N_Declaration is Node_Kind range
7324 N_Component_Declaration ..
7325 N_Procedure_Specification;
7326 -- Note: this includes all constructs normally thought of as declarations
7327 -- except those which are separately grouped as later declarations.
7328
7329 subtype N_Delay_Statement is Node_Kind range
7330 N_Delay_Relative_Statement ..
7331 N_Delay_Until_Statement;
7332
7333 subtype N_Direct_Name is Node_Kind range
7334 N_Identifier ..
7335 N_Character_Literal;
7336
7337 subtype N_Entity is Node_Kind range
7338 N_Defining_Character_Literal ..
7339 N_Defining_Operator_Symbol;
7340
7341 subtype N_Formal_Subprogram_Declaration is Node_Kind range
7342 N_Formal_Abstract_Subprogram_Declaration ..
7343 N_Formal_Concrete_Subprogram_Declaration;
7344
7345 subtype N_Generic_Declaration is Node_Kind range
7346 N_Generic_Package_Declaration ..
7347 N_Generic_Subprogram_Declaration;
7348
7349 subtype N_Generic_Instantiation is Node_Kind range
7350 N_Function_Instantiation ..
7351 N_Package_Instantiation;
7352
7353 subtype N_Generic_Renaming_Declaration is Node_Kind range
7354 N_Generic_Function_Renaming_Declaration ..
7355 N_Generic_Procedure_Renaming_Declaration;
7356
7357 subtype N_Has_Chars is Node_Kind range
7358 N_Attribute_Definition_Clause ..
7359 N_Op_Plus;
7360
7361 subtype N_Has_Entity is Node_Kind range
7362 N_Expanded_Name ..
7363 N_Attribute_Reference;
7364 -- Nodes that have Entity fields
7365 -- Warning: DOES NOT INCLUDE N_Freeze_Entity!
7366
7367 subtype N_Has_Etype is Node_Kind range
7368 N_Error ..
7369 N_Subtype_Indication;
7370
7371 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
7372 N_Op_Divide ..
7373 N_Op_Rem;
7374
7375 subtype N_Multiplying_Operator is Node_Kind range
7376 N_Op_Divide ..
7377 N_Op_Rem;
7378
7379 subtype N_Later_Decl_Item is Node_Kind range
7380 N_Task_Type_Declaration ..
7381 N_Generic_Subprogram_Declaration;
7382 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and
7383 -- includes only those items which can appear as later declarative
7384 -- items. This also includes N_Implicit_Label_Declaration which is
7385 -- not specifically in the grammar but may appear as a valid later
7386 -- declarative items. It does NOT include N_Pragma which can also
7387 -- appear among later declarative items. It does however include
7388 -- N_Protected_Body, which is a bit peculiar, but harmless since
7389 -- this cannot appear in Ada 83 mode anyway.
7390
7391 subtype N_Membership_Test is Node_Kind range
7392 N_In ..
7393 N_Not_In;
7394
7395 subtype N_Op is Node_Kind range
7396 N_Op_Add ..
7397 N_Op_Plus;
7398
7399 subtype N_Op_Boolean is Node_Kind range
7400 N_Op_And ..
7401 N_Op_Xor;
7402 -- Binary operators which take operands of a boolean type, and yield
7403 -- a result of a boolean type.
7404
7405 subtype N_Op_Compare is Node_Kind range
7406 N_Op_Eq ..
7407 N_Op_Ne;
7408
7409 subtype N_Op_Shift is Node_Kind range
7410 N_Op_Rotate_Left ..
7411 N_Op_Shift_Right_Arithmetic;
7412
7413 subtype N_Proper_Body is Node_Kind range
7414 N_Package_Body ..
7415 N_Task_Body;
7416
7417 subtype N_Push_xxx_Label is Node_Kind range
7418 N_Push_Constraint_Error_Label ..
7419 N_Push_Storage_Error_Label;
7420
7421 subtype N_Pop_xxx_Label is Node_Kind range
7422 N_Pop_Constraint_Error_Label ..
7423 N_Pop_Storage_Error_Label;
7424
7425 subtype N_Push_Pop_xxx_Label is Node_Kind range
7426 N_Push_Constraint_Error_Label ..
7427 N_Pop_Storage_Error_Label;
7428
7429 subtype N_Raise_xxx_Error is Node_Kind range
7430 N_Raise_Constraint_Error ..
7431 N_Raise_Storage_Error;
7432
7433 subtype N_Renaming_Declaration is Node_Kind range
7434 N_Exception_Renaming_Declaration ..
7435 N_Generic_Procedure_Renaming_Declaration;
7436
7437 subtype N_Representation_Clause is Node_Kind range
7438 N_At_Clause ..
7439 N_Attribute_Definition_Clause;
7440
7441 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
7442 N_Abort_Statement ..
7443 N_If_Statement;
7444 -- Note that this includes all statement types except for the cases of the
7445 -- N_Procedure_Call_Statement which is considered to be a subexpression
7446 -- (since overloading is possible, so it needs to go through the normal
7447 -- overloading resolution for expressions).
7448
7449 subtype N_Subprogram_Instantiation is Node_Kind range
7450 N_Function_Instantiation ..
7451 N_Procedure_Instantiation;
7452
7453 subtype N_Has_Condition is Node_Kind range
7454 N_Exit_Statement ..
7455 N_Terminate_Alternative;
7456 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
7457
7458 subtype N_Subexpr is Node_Kind range
7459 N_Expanded_Name ..
7460 N_Unchecked_Type_Conversion;
7461 -- Nodes with expression fields
7462
7463 subtype N_Subprogram_Specification is Node_Kind range
7464 N_Function_Specification ..
7465 N_Procedure_Specification;
7466
7467 subtype N_Unary_Op is Node_Kind range
7468 N_Op_Abs ..
7469 N_Op_Plus;
7470
7471 subtype N_Unit_Body is Node_Kind range
7472 N_Package_Body ..
7473 N_Subprogram_Body;
7474
7475 ---------------------------
7476 -- Node Access Functions --
7477 ---------------------------
7478
7479 -- The following functions return the contents of the indicated field of
7480 -- the node referenced by the argument, which is a Node_Id. They provide
7481 -- logical access to fields in the node which could be accessed using the
7482 -- Atree.Unchecked_Access package, but the idea is always to use these
7483 -- higher level routines which preserve strong typing. In debug mode,
7484 -- these routines check that they are being applied to an appropriate
7485 -- node, as well as checking that the node is in range.
7486
7487 function ABE_Is_Certain
7488 (N : Node_Id) return Boolean; -- Flag18
7489
7490 function Abort_Present
7491 (N : Node_Id) return Boolean; -- Flag15
7492
7493 function Abortable_Part
7494 (N : Node_Id) return Node_Id; -- Node2
7495
7496 function Abstract_Present
7497 (N : Node_Id) return Boolean; -- Flag4
7498
7499 function Accept_Handler_Records
7500 (N : Node_Id) return List_Id; -- List5
7501
7502 function Accept_Statement
7503 (N : Node_Id) return Node_Id; -- Node2
7504
7505 function Access_Definition
7506 (N : Node_Id) return Node_Id; -- Node3
7507
7508 function Access_To_Subprogram_Definition
7509 (N : Node_Id) return Node_Id; -- Node3
7510
7511 function Access_Types_To_Process
7512 (N : Node_Id) return Elist_Id; -- Elist2
7513
7514 function Actions
7515 (N : Node_Id) return List_Id; -- List1
7516
7517 function Activation_Chain_Entity
7518 (N : Node_Id) return Node_Id; -- Node3
7519
7520 function Acts_As_Spec
7521 (N : Node_Id) return Boolean; -- Flag4
7522
7523 function Actual_Designated_Subtype
7524 (N : Node_Id) return Node_Id; -- Node4
7525
7526 function Address_Warning_Posted
7527 (N : Node_Id) return Boolean; -- Flag18
7528
7529 function Aggregate_Bounds
7530 (N : Node_Id) return Node_Id; -- Node3
7531
7532 function Aliased_Present
7533 (N : Node_Id) return Boolean; -- Flag4
7534
7535 function All_Others
7536 (N : Node_Id) return Boolean; -- Flag11
7537
7538 function All_Present
7539 (N : Node_Id) return Boolean; -- Flag15
7540
7541 function Alternatives
7542 (N : Node_Id) return List_Id; -- List4
7543
7544 function Ancestor_Part
7545 (N : Node_Id) return Node_Id; -- Node3
7546
7547 function Array_Aggregate
7548 (N : Node_Id) return Node_Id; -- Node3
7549
7550 function Assignment_OK
7551 (N : Node_Id) return Boolean; -- Flag15
7552
7553 function Associated_Node
7554 (N : Node_Id) return Node_Id; -- Node4
7555
7556 function At_End_Proc
7557 (N : Node_Id) return Node_Id; -- Node1
7558
7559 function Attribute_Name
7560 (N : Node_Id) return Name_Id; -- Name2
7561
7562 function Aux_Decls_Node
7563 (N : Node_Id) return Node_Id; -- Node5
7564
7565 function Backwards_OK
7566 (N : Node_Id) return Boolean; -- Flag6
7567
7568 function Bad_Is_Detected
7569 (N : Node_Id) return Boolean; -- Flag15
7570
7571 function By_Ref
7572 (N : Node_Id) return Boolean; -- Flag5
7573
7574 function Body_Required
7575 (N : Node_Id) return Boolean; -- Flag13
7576
7577 function Body_To_Inline
7578 (N : Node_Id) return Node_Id; -- Node3
7579
7580 function Box_Present
7581 (N : Node_Id) return Boolean; -- Flag15
7582
7583 function Char_Literal_Value
7584 (N : Node_Id) return Uint; -- Uint2
7585
7586 function Chars
7587 (N : Node_Id) return Name_Id; -- Name1
7588
7589 function Check_Address_Alignment
7590 (N : Node_Id) return Boolean; -- Flag11
7591
7592 function Choice_Parameter
7593 (N : Node_Id) return Node_Id; -- Node2
7594
7595 function Choices
7596 (N : Node_Id) return List_Id; -- List1
7597
7598 function Coextensions
7599 (N : Node_Id) return Elist_Id; -- Elist4
7600
7601 function Comes_From_Extended_Return_Statement
7602 (N : Node_Id) return Boolean; -- Flag18
7603
7604 function Compile_Time_Known_Aggregate
7605 (N : Node_Id) return Boolean; -- Flag18
7606
7607 function Component_Associations
7608 (N : Node_Id) return List_Id; -- List2
7609
7610 function Component_Clauses
7611 (N : Node_Id) return List_Id; -- List3
7612
7613 function Component_Definition
7614 (N : Node_Id) return Node_Id; -- Node4
7615
7616 function Component_Items
7617 (N : Node_Id) return List_Id; -- List3
7618
7619 function Component_List
7620 (N : Node_Id) return Node_Id; -- Node1
7621
7622 function Component_Name
7623 (N : Node_Id) return Node_Id; -- Node1
7624
7625 function Condition
7626 (N : Node_Id) return Node_Id; -- Node1
7627
7628 function Condition_Actions
7629 (N : Node_Id) return List_Id; -- List3
7630
7631 function Config_Pragmas
7632 (N : Node_Id) return List_Id; -- List4
7633
7634 function Constant_Present
7635 (N : Node_Id) return Boolean; -- Flag17
7636
7637 function Constraint
7638 (N : Node_Id) return Node_Id; -- Node3
7639
7640 function Constraints
7641 (N : Node_Id) return List_Id; -- List1
7642
7643 function Context_Installed
7644 (N : Node_Id) return Boolean; -- Flag13
7645
7646 function Context_Items
7647 (N : Node_Id) return List_Id; -- List1
7648
7649 function Controlling_Argument
7650 (N : Node_Id) return Node_Id; -- Node1
7651
7652 function Conversion_OK
7653 (N : Node_Id) return Boolean; -- Flag14
7654
7655 function Corresponding_Body
7656 (N : Node_Id) return Node_Id; -- Node5
7657
7658 function Corresponding_Formal_Spec
7659 (N : Node_Id) return Node_Id; -- Node3
7660
7661 function Corresponding_Generic_Association
7662 (N : Node_Id) return Node_Id; -- Node5
7663
7664 function Corresponding_Integer_Value
7665 (N : Node_Id) return Uint; -- Uint4
7666
7667 function Corresponding_Spec
7668 (N : Node_Id) return Node_Id; -- Node5
7669
7670 function Corresponding_Stub
7671 (N : Node_Id) return Node_Id; -- Node3
7672
7673 function Dcheck_Function
7674 (N : Node_Id) return Entity_Id; -- Node5
7675
7676 function Debug_Statement
7677 (N : Node_Id) return Node_Id; -- Node3
7678
7679 function Declarations
7680 (N : Node_Id) return List_Id; -- List2
7681
7682 function Default_Expression
7683 (N : Node_Id) return Node_Id; -- Node5
7684
7685 function Default_Name
7686 (N : Node_Id) return Node_Id; -- Node2
7687
7688 function Defining_Identifier
7689 (N : Node_Id) return Entity_Id; -- Node1
7690
7691 function Defining_Unit_Name
7692 (N : Node_Id) return Node_Id; -- Node1
7693
7694 function Delay_Alternative
7695 (N : Node_Id) return Node_Id; -- Node4
7696
7697 function Delay_Statement
7698 (N : Node_Id) return Node_Id; -- Node2
7699
7700 function Delta_Expression
7701 (N : Node_Id) return Node_Id; -- Node3
7702
7703 function Digits_Expression
7704 (N : Node_Id) return Node_Id; -- Node2
7705
7706 function Discr_Check_Funcs_Built
7707 (N : Node_Id) return Boolean; -- Flag11
7708
7709 function Discrete_Choices
7710 (N : Node_Id) return List_Id; -- List4
7711
7712 function Discrete_Range
7713 (N : Node_Id) return Node_Id; -- Node4
7714
7715 function Discrete_Subtype_Definition
7716 (N : Node_Id) return Node_Id; -- Node4
7717
7718 function Discrete_Subtype_Definitions
7719 (N : Node_Id) return List_Id; -- List2
7720
7721 function Discriminant_Specifications
7722 (N : Node_Id) return List_Id; -- List4
7723
7724 function Discriminant_Type
7725 (N : Node_Id) return Node_Id; -- Node5
7726
7727 function Do_Accessibility_Check
7728 (N : Node_Id) return Boolean; -- Flag13
7729
7730 function Do_Discriminant_Check
7731 (N : Node_Id) return Boolean; -- Flag13
7732
7733 function Do_Division_Check
7734 (N : Node_Id) return Boolean; -- Flag13
7735
7736 function Do_Length_Check
7737 (N : Node_Id) return Boolean; -- Flag4
7738
7739 function Do_Overflow_Check
7740 (N : Node_Id) return Boolean; -- Flag17
7741
7742 function Do_Range_Check
7743 (N : Node_Id) return Boolean; -- Flag9
7744
7745 function Do_Storage_Check
7746 (N : Node_Id) return Boolean; -- Flag17
7747
7748 function Do_Tag_Check
7749 (N : Node_Id) return Boolean; -- Flag13
7750
7751 function Elaborate_All_Desirable
7752 (N : Node_Id) return Boolean; -- Flag9
7753
7754 function Elaborate_All_Present
7755 (N : Node_Id) return Boolean; -- Flag14
7756
7757 function Elaborate_Desirable
7758 (N : Node_Id) return Boolean; -- Flag11
7759
7760 function Elaborate_Present
7761 (N : Node_Id) return Boolean; -- Flag4
7762
7763 function Elaboration_Boolean
7764 (N : Node_Id) return Node_Id; -- Node2
7765
7766 function Else_Actions
7767 (N : Node_Id) return List_Id; -- List3
7768
7769 function Else_Statements
7770 (N : Node_Id) return List_Id; -- List4
7771
7772 function Elsif_Parts
7773 (N : Node_Id) return List_Id; -- List3
7774
7775 function Enclosing_Variant
7776 (N : Node_Id) return Node_Id; -- Node2
7777
7778 function End_Label
7779 (N : Node_Id) return Node_Id; -- Node4
7780
7781 function End_Span
7782 (N : Node_Id) return Uint; -- Uint5
7783
7784 function Entity
7785 (N : Node_Id) return Node_Id; -- Node4
7786
7787 function Entity_Or_Associated_Node
7788 (N : Node_Id) return Node_Id; -- Node4
7789
7790 function Entry_Body_Formal_Part
7791 (N : Node_Id) return Node_Id; -- Node5
7792
7793 function Entry_Call_Alternative
7794 (N : Node_Id) return Node_Id; -- Node1
7795
7796 function Entry_Call_Statement
7797 (N : Node_Id) return Node_Id; -- Node1
7798
7799 function Entry_Direct_Name
7800 (N : Node_Id) return Node_Id; -- Node1
7801
7802 function Entry_Index
7803 (N : Node_Id) return Node_Id; -- Node5
7804
7805 function Entry_Index_Specification
7806 (N : Node_Id) return Node_Id; -- Node4
7807
7808 function Etype
7809 (N : Node_Id) return Node_Id; -- Node5
7810
7811 function Exception_Choices
7812 (N : Node_Id) return List_Id; -- List4
7813
7814 function Exception_Handlers
7815 (N : Node_Id) return List_Id; -- List5
7816
7817 function Exception_Junk
7818 (N : Node_Id) return Boolean; -- Flag8
7819
7820 function Exception_Label
7821 (N : Node_Id) return Node_Id; -- Node5
7822
7823 function Explicit_Actual_Parameter
7824 (N : Node_Id) return Node_Id; -- Node3
7825
7826 function Expansion_Delayed
7827 (N : Node_Id) return Boolean; -- Flag11
7828
7829 function Explicit_Generic_Actual_Parameter
7830 (N : Node_Id) return Node_Id; -- Node1
7831
7832 function Expression
7833 (N : Node_Id) return Node_Id; -- Node3
7834
7835 function Expressions
7836 (N : Node_Id) return List_Id; -- List1
7837
7838 function First_Bit
7839 (N : Node_Id) return Node_Id; -- Node3
7840
7841 function First_Inlined_Subprogram
7842 (N : Node_Id) return Entity_Id; -- Node3
7843
7844 function First_Name
7845 (N : Node_Id) return Boolean; -- Flag5
7846
7847 function First_Named_Actual
7848 (N : Node_Id) return Node_Id; -- Node4
7849
7850 function First_Real_Statement
7851 (N : Node_Id) return Node_Id; -- Node2
7852
7853 function First_Subtype_Link
7854 (N : Node_Id) return Entity_Id; -- Node5
7855
7856 function Float_Truncate
7857 (N : Node_Id) return Boolean; -- Flag11
7858
7859 function Formal_Type_Definition
7860 (N : Node_Id) return Node_Id; -- Node3
7861
7862 function Forwards_OK
7863 (N : Node_Id) return Boolean; -- Flag5
7864
7865 function From_At_End
7866 (N : Node_Id) return Boolean; -- Flag4
7867
7868 function From_At_Mod
7869 (N : Node_Id) return Boolean; -- Flag4
7870
7871 function From_Default
7872 (N : Node_Id) return Boolean; -- Flag6
7873
7874 function Generic_Associations
7875 (N : Node_Id) return List_Id; -- List3
7876
7877 function Generic_Formal_Declarations
7878 (N : Node_Id) return List_Id; -- List2
7879
7880 function Generic_Parent
7881 (N : Node_Id) return Node_Id; -- Node5
7882
7883 function Generic_Parent_Type
7884 (N : Node_Id) return Node_Id; -- Node4
7885
7886 function Handled_Statement_Sequence
7887 (N : Node_Id) return Node_Id; -- Node4
7888
7889 function Handler_List_Entry
7890 (N : Node_Id) return Node_Id; -- Node2
7891
7892 function Has_Created_Identifier
7893 (N : Node_Id) return Boolean; -- Flag15
7894
7895 function Has_Dynamic_Length_Check
7896 (N : Node_Id) return Boolean; -- Flag10
7897
7898 function Has_Dynamic_Range_Check
7899 (N : Node_Id) return Boolean; -- Flag12
7900
7901 function Has_Init_Expression
7902 (N : Node_Id) return Boolean; -- Flag14
7903
7904 function Has_Local_Raise
7905 (N : Node_Id) return Boolean; -- Flag8
7906
7907 function Has_No_Elaboration_Code
7908 (N : Node_Id) return Boolean; -- Flag17
7909
7910 function Has_Priority_Pragma
7911 (N : Node_Id) return Boolean; -- Flag6
7912
7913 function Has_Private_View
7914 (N : Node_Id) return Boolean; -- Flag11
7915
7916 function Has_Relative_Deadline_Pragma
7917 (N : Node_Id) return Boolean; -- Flag9
7918
7919 function Has_Self_Reference
7920 (N : Node_Id) return Boolean; -- Flag13
7921
7922 function Has_Storage_Size_Pragma
7923 (N : Node_Id) return Boolean; -- Flag5
7924
7925 function Has_Task_Info_Pragma
7926 (N : Node_Id) return Boolean; -- Flag7
7927
7928 function Has_Task_Name_Pragma
7929 (N : Node_Id) return Boolean; -- Flag8
7930
7931 function Has_Wide_Character
7932 (N : Node_Id) return Boolean; -- Flag11
7933
7934 function Hidden_By_Use_Clause
7935 (N : Node_Id) return Elist_Id; -- Elist4
7936
7937 function High_Bound
7938 (N : Node_Id) return Node_Id; -- Node2
7939
7940 function Identifier
7941 (N : Node_Id) return Node_Id; -- Node1
7942
7943 function Interface_List
7944 (N : Node_Id) return List_Id; -- List2
7945
7946 function Interface_Present
7947 (N : Node_Id) return Boolean; -- Flag16
7948
7949 function Implicit_With
7950 (N : Node_Id) return Boolean; -- Flag16
7951
7952 function In_Present
7953 (N : Node_Id) return Boolean; -- Flag15
7954
7955 function Includes_Infinities
7956 (N : Node_Id) return Boolean; -- Flag11
7957
7958 function Instance_Spec
7959 (N : Node_Id) return Node_Id; -- Node5
7960
7961 function Intval
7962 (N : Node_Id) return Uint; -- Uint3
7963
7964 function Is_Asynchronous_Call_Block
7965 (N : Node_Id) return Boolean; -- Flag7
7966
7967 function Is_Component_Left_Opnd
7968 (N : Node_Id) return Boolean; -- Flag13
7969
7970 function Is_Component_Right_Opnd
7971 (N : Node_Id) return Boolean; -- Flag14
7972
7973 function Is_Controlling_Actual
7974 (N : Node_Id) return Boolean; -- Flag16
7975
7976 function Is_Dynamic_Coextension
7977 (N : Node_Id) return Boolean; -- Flag18
7978
7979 function Is_Elsif
7980 (N : Node_Id) return Boolean; -- Flag13
7981
7982 function Is_Entry_Barrier_Function
7983 (N : Node_Id) return Boolean; -- Flag8
7984
7985 function Is_Expanded_Build_In_Place_Call
7986 (N : Node_Id) return Boolean; -- Flag11
7987
7988 function Is_Folded_In_Parser
7989 (N : Node_Id) return Boolean; -- Flag4
7990
7991 function Is_In_Discriminant_Check
7992 (N : Node_Id) return Boolean; -- Flag11
7993
7994 function Is_Machine_Number
7995 (N : Node_Id) return Boolean; -- Flag11
7996
7997 function Is_Null_Loop
7998 (N : Node_Id) return Boolean; -- Flag16
7999
8000 function Is_Overloaded
8001 (N : Node_Id) return Boolean; -- Flag5
8002
8003 function Is_Power_Of_2_For_Shift
8004 (N : Node_Id) return Boolean; -- Flag13
8005
8006 function Is_Protected_Subprogram_Body
8007 (N : Node_Id) return Boolean; -- Flag7
8008
8009 function Is_Static_Coextension
8010 (N : Node_Id) return Boolean; -- Flag14
8011
8012 function Is_Static_Expression
8013 (N : Node_Id) return Boolean; -- Flag6
8014
8015 function Is_Subprogram_Descriptor
8016 (N : Node_Id) return Boolean; -- Flag16
8017
8018 function Is_Task_Allocation_Block
8019 (N : Node_Id) return Boolean; -- Flag6
8020
8021 function Is_Task_Master
8022 (N : Node_Id) return Boolean; -- Flag5
8023
8024 function Iteration_Scheme
8025 (N : Node_Id) return Node_Id; -- Node2
8026
8027 function Itype
8028 (N : Node_Id) return Entity_Id; -- Node1
8029
8030 function Kill_Range_Check
8031 (N : Node_Id) return Boolean; -- Flag11
8032
8033 function Label_Construct
8034 (N : Node_Id) return Node_Id; -- Node2
8035
8036 function Left_Opnd
8037 (N : Node_Id) return Node_Id; -- Node2
8038
8039 function Last_Bit
8040 (N : Node_Id) return Node_Id; -- Node4
8041
8042 function Last_Name
8043 (N : Node_Id) return Boolean; -- Flag6
8044
8045 function Library_Unit
8046 (N : Node_Id) return Node_Id; -- Node4
8047
8048 function Limited_View_Installed
8049 (N : Node_Id) return Boolean; -- Flag18
8050
8051 function Limited_Present
8052 (N : Node_Id) return Boolean; -- Flag17
8053
8054 function Literals
8055 (N : Node_Id) return List_Id; -- List1
8056
8057 function Local_Raise_Not_OK
8058 (N : Node_Id) return Boolean; -- Flag7
8059
8060 function Local_Raise_Statements
8061 (N : Node_Id) return Elist_Id; -- Elist1
8062
8063 function Loop_Actions
8064 (N : Node_Id) return List_Id; -- List2
8065
8066 function Loop_Parameter_Specification
8067 (N : Node_Id) return Node_Id; -- Node4
8068
8069 function Low_Bound
8070 (N : Node_Id) return Node_Id; -- Node1
8071
8072 function Mod_Clause
8073 (N : Node_Id) return Node_Id; -- Node2
8074
8075 function More_Ids
8076 (N : Node_Id) return Boolean; -- Flag5
8077
8078 function Must_Be_Byte_Aligned
8079 (N : Node_Id) return Boolean; -- Flag14
8080
8081 function Must_Not_Freeze
8082 (N : Node_Id) return Boolean; -- Flag8
8083
8084 function Must_Not_Override
8085 (N : Node_Id) return Boolean; -- Flag15
8086
8087 function Must_Override
8088 (N : Node_Id) return Boolean; -- Flag14
8089
8090 function Name
8091 (N : Node_Id) return Node_Id; -- Node2
8092
8093 function Names
8094 (N : Node_Id) return List_Id; -- List2
8095
8096 function Next_Entity
8097 (N : Node_Id) return Node_Id; -- Node2
8098
8099 function Next_Implicit_With
8100 (N : Node_Id) return Node_Id; -- Node3
8101
8102 function Next_Named_Actual
8103 (N : Node_Id) return Node_Id; -- Node4
8104
8105 function Next_Pragma
8106 (N : Node_Id) return Node_Id; -- Node1
8107
8108 function Next_Rep_Item
8109 (N : Node_Id) return Node_Id; -- Node5
8110
8111 function Next_Use_Clause
8112 (N : Node_Id) return Node_Id; -- Node3
8113
8114 function No_Ctrl_Actions
8115 (N : Node_Id) return Boolean; -- Flag7
8116
8117 function No_Elaboration_Check
8118 (N : Node_Id) return Boolean; -- Flag14
8119
8120 function No_Entities_Ref_In_Spec
8121 (N : Node_Id) return Boolean; -- Flag8
8122
8123 function No_Initialization
8124 (N : Node_Id) return Boolean; -- Flag13
8125
8126 function No_Truncation
8127 (N : Node_Id) return Boolean; -- Flag17
8128
8129 function Null_Present
8130 (N : Node_Id) return Boolean; -- Flag13
8131
8132 function Null_Exclusion_Present
8133 (N : Node_Id) return Boolean; -- Flag11
8134
8135 function Null_Exclusion_In_Return_Present
8136 (N : Node_Id) return Boolean; -- Flag14
8137
8138 function Null_Record_Present
8139 (N : Node_Id) return Boolean; -- Flag17
8140
8141 function Object_Definition
8142 (N : Node_Id) return Node_Id; -- Node4
8143
8144 function Original_Discriminant
8145 (N : Node_Id) return Node_Id; -- Node2
8146
8147 function Original_Entity
8148 (N : Node_Id) return Entity_Id; -- Node2
8149
8150 function Others_Discrete_Choices
8151 (N : Node_Id) return List_Id; -- List1
8152
8153 function Out_Present
8154 (N : Node_Id) return Boolean; -- Flag17
8155
8156 function Parameter_Associations
8157 (N : Node_Id) return List_Id; -- List3
8158
8159 function Parameter_List_Truncated
8160 (N : Node_Id) return Boolean; -- Flag17
8161
8162 function Parameter_Specifications
8163 (N : Node_Id) return List_Id; -- List3
8164
8165 function Parameter_Type
8166 (N : Node_Id) return Node_Id; -- Node2
8167
8168 function Parent_Spec
8169 (N : Node_Id) return Node_Id; -- Node4
8170
8171 function PPC_Enabled
8172 (N : Node_Id) return Boolean; -- Flag5
8173
8174 function Position
8175 (N : Node_Id) return Node_Id; -- Node2
8176
8177 function Pragma_Argument_Associations
8178 (N : Node_Id) return List_Id; -- List2
8179
8180 function Pragma_Identifier
8181 (N : Node_Id) return Node_Id; -- Node4
8182
8183 function Pragmas_After
8184 (N : Node_Id) return List_Id; -- List5
8185
8186 function Pragmas_Before
8187 (N : Node_Id) return List_Id; -- List4
8188
8189 function Prefix
8190 (N : Node_Id) return Node_Id; -- Node3
8191
8192 function Present_Expr
8193 (N : Node_Id) return Uint; -- Uint3
8194
8195 function Prev_Ids
8196 (N : Node_Id) return Boolean; -- Flag6
8197
8198 function Print_In_Hex
8199 (N : Node_Id) return Boolean; -- Flag13
8200
8201 function Private_Declarations
8202 (N : Node_Id) return List_Id; -- List3
8203
8204 function Private_Present
8205 (N : Node_Id) return Boolean; -- Flag15
8206
8207 function Procedure_To_Call
8208 (N : Node_Id) return Node_Id; -- Node2
8209
8210 function Proper_Body
8211 (N : Node_Id) return Node_Id; -- Node1
8212
8213 function Protected_Definition
8214 (N : Node_Id) return Node_Id; -- Node3
8215
8216 function Protected_Present
8217 (N : Node_Id) return Boolean; -- Flag6
8218
8219 function Raises_Constraint_Error
8220 (N : Node_Id) return Boolean; -- Flag7
8221
8222 function Range_Constraint
8223 (N : Node_Id) return Node_Id; -- Node4
8224
8225 function Range_Expression
8226 (N : Node_Id) return Node_Id; -- Node4
8227
8228 function Real_Range_Specification
8229 (N : Node_Id) return Node_Id; -- Node4
8230
8231 function Realval
8232 (N : Node_Id) return Ureal; -- Ureal3
8233
8234 function Reason
8235 (N : Node_Id) return Uint; -- Uint3
8236
8237 function Record_Extension_Part
8238 (N : Node_Id) return Node_Id; -- Node3
8239
8240 function Redundant_Use
8241 (N : Node_Id) return Boolean; -- Flag13
8242
8243 function Renaming_Exception
8244 (N : Node_Id) return Node_Id; -- Node2
8245
8246 function Result_Definition
8247 (N : Node_Id) return Node_Id; -- Node4
8248
8249 function Return_Object_Declarations
8250 (N : Node_Id) return List_Id; -- List3
8251
8252 function Return_Statement_Entity
8253 (N : Node_Id) return Node_Id; -- Node5
8254
8255 function Reverse_Present
8256 (N : Node_Id) return Boolean; -- Flag15
8257
8258 function Right_Opnd
8259 (N : Node_Id) return Node_Id; -- Node3
8260
8261 function Rounded_Result
8262 (N : Node_Id) return Boolean; -- Flag18
8263
8264 function Scope
8265 (N : Node_Id) return Node_Id; -- Node3
8266
8267 function Select_Alternatives
8268 (N : Node_Id) return List_Id; -- List1
8269
8270 function Selector_Name
8271 (N : Node_Id) return Node_Id; -- Node2
8272
8273 function Selector_Names
8274 (N : Node_Id) return List_Id; -- List1
8275
8276 function Shift_Count_OK
8277 (N : Node_Id) return Boolean; -- Flag4
8278
8279 function Source_Type
8280 (N : Node_Id) return Entity_Id; -- Node1
8281
8282 function Specification
8283 (N : Node_Id) return Node_Id; -- Node1
8284
8285 function Statements
8286 (N : Node_Id) return List_Id; -- List3
8287
8288 function Static_Processing_OK
8289 (N : Node_Id) return Boolean; -- Flag4
8290
8291 function Storage_Pool
8292 (N : Node_Id) return Node_Id; -- Node1
8293
8294 function Strval
8295 (N : Node_Id) return String_Id; -- Str3
8296
8297 function Subtype_Indication
8298 (N : Node_Id) return Node_Id; -- Node5
8299
8300 function Subtype_Mark
8301 (N : Node_Id) return Node_Id; -- Node4
8302
8303 function Subtype_Marks
8304 (N : Node_Id) return List_Id; -- List2
8305
8306 function Suppress_Loop_Warnings
8307 (N : Node_Id) return Boolean; -- Flag17
8308
8309 function Synchronized_Present
8310 (N : Node_Id) return Boolean; -- Flag7
8311
8312 function Tagged_Present
8313 (N : Node_Id) return Boolean; -- Flag15
8314
8315 function Target_Type
8316 (N : Node_Id) return Entity_Id; -- Node2
8317
8318 function Task_Definition
8319 (N : Node_Id) return Node_Id; -- Node3
8320
8321 function Task_Present
8322 (N : Node_Id) return Boolean; -- Flag5
8323
8324 function Then_Actions
8325 (N : Node_Id) return List_Id; -- List2
8326
8327 function Then_Statements
8328 (N : Node_Id) return List_Id; -- List2
8329
8330 function Treat_Fixed_As_Integer
8331 (N : Node_Id) return Boolean; -- Flag14
8332
8333 function Triggering_Alternative
8334 (N : Node_Id) return Node_Id; -- Node1
8335
8336 function Triggering_Statement
8337 (N : Node_Id) return Node_Id; -- Node1
8338
8339 function TSS_Elist
8340 (N : Node_Id) return Elist_Id; -- Elist3
8341
8342 function Type_Definition
8343 (N : Node_Id) return Node_Id; -- Node3
8344
8345 function Unit
8346 (N : Node_Id) return Node_Id; -- Node2
8347
8348 function Unknown_Discriminants_Present
8349 (N : Node_Id) return Boolean; -- Flag13
8350
8351 function Unreferenced_In_Spec
8352 (N : Node_Id) return Boolean; -- Flag7
8353
8354 function Variant_Part
8355 (N : Node_Id) return Node_Id; -- Node4
8356
8357 function Variants
8358 (N : Node_Id) return List_Id; -- List1
8359
8360 function Visible_Declarations
8361 (N : Node_Id) return List_Id; -- List2
8362
8363 function Was_Originally_Stub
8364 (N : Node_Id) return Boolean; -- Flag13
8365
8366 function Zero_Cost_Handling
8367 (N : Node_Id) return Boolean; -- Flag5
8368
8369 -- End functions (note used by xsinfo utility program to end processing)
8370
8371 ----------------------------
8372 -- Node Update Procedures --
8373 ----------------------------
8374
8375 -- These are the corresponding node update routines, which again provide
8376 -- a high level logical access with type checking. In addition to setting
8377 -- the indicated field of the node N to the given Val, in the case of
8378 -- tree pointers (List1-4), the parent pointer of the Val node is set to
8379 -- point back to node N. This automates the setting of the parent pointer.
8380
8381 procedure Set_ABE_Is_Certain
8382 (N : Node_Id; Val : Boolean := True); -- Flag18
8383
8384 procedure Set_Abort_Present
8385 (N : Node_Id; Val : Boolean := True); -- Flag15
8386
8387 procedure Set_Abortable_Part
8388 (N : Node_Id; Val : Node_Id); -- Node2
8389
8390 procedure Set_Abstract_Present
8391 (N : Node_Id; Val : Boolean := True); -- Flag4
8392
8393 procedure Set_Accept_Handler_Records
8394 (N : Node_Id; Val : List_Id); -- List5
8395
8396 procedure Set_Accept_Statement
8397 (N : Node_Id; Val : Node_Id); -- Node2
8398
8399 procedure Set_Access_Definition
8400 (N : Node_Id; Val : Node_Id); -- Node3
8401
8402 procedure Set_Access_To_Subprogram_Definition
8403 (N : Node_Id; Val : Node_Id); -- Node3
8404
8405 procedure Set_Access_Types_To_Process
8406 (N : Node_Id; Val : Elist_Id); -- Elist2
8407
8408 procedure Set_Actions
8409 (N : Node_Id; Val : List_Id); -- List1
8410
8411 procedure Set_Activation_Chain_Entity
8412 (N : Node_Id; Val : Node_Id); -- Node3
8413
8414 procedure Set_Acts_As_Spec
8415 (N : Node_Id; Val : Boolean := True); -- Flag4
8416
8417 procedure Set_Actual_Designated_Subtype
8418 (N : Node_Id; Val : Node_Id); -- Node4
8419
8420 procedure Set_Address_Warning_Posted
8421 (N : Node_Id; Val : Boolean := True); -- Flag18
8422
8423 procedure Set_Aggregate_Bounds
8424 (N : Node_Id; Val : Node_Id); -- Node3
8425
8426 procedure Set_Aliased_Present
8427 (N : Node_Id; Val : Boolean := True); -- Flag4
8428
8429 procedure Set_All_Others
8430 (N : Node_Id; Val : Boolean := True); -- Flag11
8431
8432 procedure Set_All_Present
8433 (N : Node_Id; Val : Boolean := True); -- Flag15
8434
8435 procedure Set_Alternatives
8436 (N : Node_Id; Val : List_Id); -- List4
8437
8438 procedure Set_Ancestor_Part
8439 (N : Node_Id; Val : Node_Id); -- Node3
8440
8441 procedure Set_Array_Aggregate
8442 (N : Node_Id; Val : Node_Id); -- Node3
8443
8444 procedure Set_Assignment_OK
8445 (N : Node_Id; Val : Boolean := True); -- Flag15
8446
8447 procedure Set_Associated_Node
8448 (N : Node_Id; Val : Node_Id); -- Node4
8449
8450 procedure Set_Attribute_Name
8451 (N : Node_Id; Val : Name_Id); -- Name2
8452
8453 procedure Set_At_End_Proc
8454 (N : Node_Id; Val : Node_Id); -- Node1
8455
8456 procedure Set_Aux_Decls_Node
8457 (N : Node_Id; Val : Node_Id); -- Node5
8458
8459 procedure Set_Backwards_OK
8460 (N : Node_Id; Val : Boolean := True); -- Flag6
8461
8462 procedure Set_Bad_Is_Detected
8463 (N : Node_Id; Val : Boolean := True); -- Flag15
8464
8465 procedure Set_Body_Required
8466 (N : Node_Id; Val : Boolean := True); -- Flag13
8467
8468 procedure Set_Body_To_Inline
8469 (N : Node_Id; Val : Node_Id); -- Node3
8470
8471 procedure Set_Box_Present
8472 (N : Node_Id; Val : Boolean := True); -- Flag15
8473
8474 procedure Set_By_Ref
8475 (N : Node_Id; Val : Boolean := True); -- Flag5
8476
8477 procedure Set_Char_Literal_Value
8478 (N : Node_Id; Val : Uint); -- Uint2
8479
8480 procedure Set_Chars
8481 (N : Node_Id; Val : Name_Id); -- Name1
8482
8483 procedure Set_Check_Address_Alignment
8484 (N : Node_Id; Val : Boolean := True); -- Flag11
8485
8486 procedure Set_Choice_Parameter
8487 (N : Node_Id; Val : Node_Id); -- Node2
8488
8489 procedure Set_Coextensions
8490 (N : Node_Id; Val : Elist_Id); -- Elist4
8491
8492 procedure Set_Choices
8493 (N : Node_Id; Val : List_Id); -- List1
8494
8495 procedure Set_Comes_From_Extended_Return_Statement
8496 (N : Node_Id; Val : Boolean := True); -- Flag18
8497
8498 procedure Set_Compile_Time_Known_Aggregate
8499 (N : Node_Id; Val : Boolean := True); -- Flag18
8500
8501 procedure Set_Component_Associations
8502 (N : Node_Id; Val : List_Id); -- List2
8503
8504 procedure Set_Component_Clauses
8505 (N : Node_Id; Val : List_Id); -- List3
8506
8507 procedure Set_Component_Definition
8508 (N : Node_Id; Val : Node_Id); -- Node4
8509
8510 procedure Set_Component_Items
8511 (N : Node_Id; Val : List_Id); -- List3
8512
8513 procedure Set_Component_List
8514 (N : Node_Id; Val : Node_Id); -- Node1
8515
8516 procedure Set_Component_Name
8517 (N : Node_Id; Val : Node_Id); -- Node1
8518
8519 procedure Set_Condition
8520 (N : Node_Id; Val : Node_Id); -- Node1
8521
8522 procedure Set_Condition_Actions
8523 (N : Node_Id; Val : List_Id); -- List3
8524
8525 procedure Set_Config_Pragmas
8526 (N : Node_Id; Val : List_Id); -- List4
8527
8528 procedure Set_Constant_Present
8529 (N : Node_Id; Val : Boolean := True); -- Flag17
8530
8531 procedure Set_Constraint
8532 (N : Node_Id; Val : Node_Id); -- Node3
8533
8534 procedure Set_Constraints
8535 (N : Node_Id; Val : List_Id); -- List1
8536
8537 procedure Set_Context_Installed
8538 (N : Node_Id; Val : Boolean := True); -- Flag13
8539
8540 procedure Set_Context_Items
8541 (N : Node_Id; Val : List_Id); -- List1
8542
8543 procedure Set_Controlling_Argument
8544 (N : Node_Id; Val : Node_Id); -- Node1
8545
8546 procedure Set_Conversion_OK
8547 (N : Node_Id; Val : Boolean := True); -- Flag14
8548
8549 procedure Set_Corresponding_Body
8550 (N : Node_Id; Val : Node_Id); -- Node5
8551
8552 procedure Set_Corresponding_Formal_Spec
8553 (N : Node_Id; Val : Node_Id); -- Node3
8554
8555 procedure Set_Corresponding_Generic_Association
8556 (N : Node_Id; Val : Node_Id); -- Node5
8557
8558 procedure Set_Corresponding_Integer_Value
8559 (N : Node_Id; Val : Uint); -- Uint4
8560
8561 procedure Set_Corresponding_Spec
8562 (N : Node_Id; Val : Node_Id); -- Node5
8563
8564 procedure Set_Corresponding_Stub
8565 (N : Node_Id; Val : Node_Id); -- Node3
8566
8567 procedure Set_Dcheck_Function
8568 (N : Node_Id; Val : Entity_Id); -- Node5
8569
8570 procedure Set_Debug_Statement
8571 (N : Node_Id; Val : Node_Id); -- Node3
8572
8573 procedure Set_Declarations
8574 (N : Node_Id; Val : List_Id); -- List2
8575
8576 procedure Set_Default_Expression
8577 (N : Node_Id; Val : Node_Id); -- Node5
8578
8579 procedure Set_Default_Name
8580 (N : Node_Id; Val : Node_Id); -- Node2
8581
8582 procedure Set_Defining_Identifier
8583 (N : Node_Id; Val : Entity_Id); -- Node1
8584
8585 procedure Set_Defining_Unit_Name
8586 (N : Node_Id; Val : Node_Id); -- Node1
8587
8588 procedure Set_Delay_Alternative
8589 (N : Node_Id; Val : Node_Id); -- Node4
8590
8591 procedure Set_Delay_Statement
8592 (N : Node_Id; Val : Node_Id); -- Node2
8593
8594 procedure Set_Delta_Expression
8595 (N : Node_Id; Val : Node_Id); -- Node3
8596
8597 procedure Set_Digits_Expression
8598 (N : Node_Id; Val : Node_Id); -- Node2
8599
8600 procedure Set_Discr_Check_Funcs_Built
8601 (N : Node_Id; Val : Boolean := True); -- Flag11
8602
8603 procedure Set_Discrete_Choices
8604 (N : Node_Id; Val : List_Id); -- List4
8605
8606 procedure Set_Discrete_Range
8607 (N : Node_Id; Val : Node_Id); -- Node4
8608
8609 procedure Set_Discrete_Subtype_Definition
8610 (N : Node_Id; Val : Node_Id); -- Node4
8611
8612 procedure Set_Discrete_Subtype_Definitions
8613 (N : Node_Id; Val : List_Id); -- List2
8614
8615 procedure Set_Discriminant_Specifications
8616 (N : Node_Id; Val : List_Id); -- List4
8617
8618 procedure Set_Discriminant_Type
8619 (N : Node_Id; Val : Node_Id); -- Node5
8620
8621 procedure Set_Do_Accessibility_Check
8622 (N : Node_Id; Val : Boolean := True); -- Flag13
8623
8624 procedure Set_Do_Discriminant_Check
8625 (N : Node_Id; Val : Boolean := True); -- Flag13
8626
8627 procedure Set_Do_Division_Check
8628 (N : Node_Id; Val : Boolean := True); -- Flag13
8629
8630 procedure Set_Do_Length_Check
8631 (N : Node_Id; Val : Boolean := True); -- Flag4
8632
8633 procedure Set_Do_Overflow_Check
8634 (N : Node_Id; Val : Boolean := True); -- Flag17
8635
8636 procedure Set_Do_Range_Check
8637 (N : Node_Id; Val : Boolean := True); -- Flag9
8638
8639 procedure Set_Do_Storage_Check
8640 (N : Node_Id; Val : Boolean := True); -- Flag17
8641
8642 procedure Set_Do_Tag_Check
8643 (N : Node_Id; Val : Boolean := True); -- Flag13
8644
8645 procedure Set_Elaborate_All_Desirable
8646 (N : Node_Id; Val : Boolean := True); -- Flag9
8647
8648 procedure Set_Elaborate_All_Present
8649 (N : Node_Id; Val : Boolean := True); -- Flag14
8650
8651 procedure Set_Elaborate_Desirable
8652 (N : Node_Id; Val : Boolean := True); -- Flag11
8653
8654 procedure Set_Elaborate_Present
8655 (N : Node_Id; Val : Boolean := True); -- Flag4
8656
8657 procedure Set_Elaboration_Boolean
8658 (N : Node_Id; Val : Node_Id); -- Node2
8659
8660 procedure Set_Else_Actions
8661 (N : Node_Id; Val : List_Id); -- List3
8662
8663 procedure Set_Else_Statements
8664 (N : Node_Id; Val : List_Id); -- List4
8665
8666 procedure Set_Elsif_Parts
8667 (N : Node_Id; Val : List_Id); -- List3
8668
8669 procedure Set_Enclosing_Variant
8670 (N : Node_Id; Val : Node_Id); -- Node2
8671
8672 procedure Set_End_Label
8673 (N : Node_Id; Val : Node_Id); -- Node4
8674
8675 procedure Set_End_Span
8676 (N : Node_Id; Val : Uint); -- Uint5
8677
8678 procedure Set_Entity
8679 (N : Node_Id; Val : Node_Id); -- Node4
8680
8681 procedure Set_Entry_Body_Formal_Part
8682 (N : Node_Id; Val : Node_Id); -- Node5
8683
8684 procedure Set_Entry_Call_Alternative
8685 (N : Node_Id; Val : Node_Id); -- Node1
8686
8687 procedure Set_Entry_Call_Statement
8688 (N : Node_Id; Val : Node_Id); -- Node1
8689
8690 procedure Set_Entry_Direct_Name
8691 (N : Node_Id; Val : Node_Id); -- Node1
8692
8693 procedure Set_Entry_Index
8694 (N : Node_Id; Val : Node_Id); -- Node5
8695
8696 procedure Set_Entry_Index_Specification
8697 (N : Node_Id; Val : Node_Id); -- Node4
8698
8699 procedure Set_Etype
8700 (N : Node_Id; Val : Node_Id); -- Node5
8701
8702 procedure Set_Exception_Choices
8703 (N : Node_Id; Val : List_Id); -- List4
8704
8705 procedure Set_Exception_Handlers
8706 (N : Node_Id; Val : List_Id); -- List5
8707
8708 procedure Set_Exception_Junk
8709 (N : Node_Id; Val : Boolean := True); -- Flag8
8710
8711 procedure Set_Exception_Label
8712 (N : Node_Id; Val : Node_Id); -- Node5
8713
8714 procedure Set_Expansion_Delayed
8715 (N : Node_Id; Val : Boolean := True); -- Flag11
8716
8717 procedure Set_Explicit_Actual_Parameter
8718 (N : Node_Id; Val : Node_Id); -- Node3
8719
8720 procedure Set_Explicit_Generic_Actual_Parameter
8721 (N : Node_Id; Val : Node_Id); -- Node1
8722
8723 procedure Set_Expression
8724 (N : Node_Id; Val : Node_Id); -- Node3
8725
8726 procedure Set_Expressions
8727 (N : Node_Id; Val : List_Id); -- List1
8728
8729 procedure Set_First_Bit
8730 (N : Node_Id; Val : Node_Id); -- Node3
8731
8732 procedure Set_First_Inlined_Subprogram
8733 (N : Node_Id; Val : Entity_Id); -- Node3
8734
8735 procedure Set_First_Name
8736 (N : Node_Id; Val : Boolean := True); -- Flag5
8737
8738 procedure Set_First_Named_Actual
8739 (N : Node_Id; Val : Node_Id); -- Node4
8740
8741 procedure Set_First_Real_Statement
8742 (N : Node_Id; Val : Node_Id); -- Node2
8743
8744 procedure Set_First_Subtype_Link
8745 (N : Node_Id; Val : Entity_Id); -- Node5
8746
8747 procedure Set_Float_Truncate
8748 (N : Node_Id; Val : Boolean := True); -- Flag11
8749
8750 procedure Set_Formal_Type_Definition
8751 (N : Node_Id; Val : Node_Id); -- Node3
8752
8753 procedure Set_Forwards_OK
8754 (N : Node_Id; Val : Boolean := True); -- Flag5
8755
8756 procedure Set_From_At_Mod
8757 (N : Node_Id; Val : Boolean := True); -- Flag4
8758
8759 procedure Set_From_At_End
8760 (N : Node_Id; Val : Boolean := True); -- Flag4
8761
8762 procedure Set_From_Default
8763 (N : Node_Id; Val : Boolean := True); -- Flag6
8764
8765 procedure Set_Generic_Associations
8766 (N : Node_Id; Val : List_Id); -- List3
8767
8768 procedure Set_Generic_Formal_Declarations
8769 (N : Node_Id; Val : List_Id); -- List2
8770
8771 procedure Set_Generic_Parent
8772 (N : Node_Id; Val : Node_Id); -- Node5
8773
8774 procedure Set_Generic_Parent_Type
8775 (N : Node_Id; Val : Node_Id); -- Node4
8776
8777 procedure Set_Handled_Statement_Sequence
8778 (N : Node_Id; Val : Node_Id); -- Node4
8779
8780 procedure Set_Handler_List_Entry
8781 (N : Node_Id; Val : Node_Id); -- Node2
8782
8783 procedure Set_Has_Created_Identifier
8784 (N : Node_Id; Val : Boolean := True); -- Flag15
8785
8786 procedure Set_Has_Dynamic_Length_Check
8787 (N : Node_Id; Val : Boolean := True); -- Flag10
8788
8789 procedure Set_Has_Dynamic_Range_Check
8790 (N : Node_Id; Val : Boolean := True); -- Flag12
8791
8792 procedure Set_Has_Init_Expression
8793 (N : Node_Id; Val : Boolean := True); -- Flag14
8794
8795 procedure Set_Has_Local_Raise
8796 (N : Node_Id; Val : Boolean := True); -- Flag8
8797
8798 procedure Set_Has_No_Elaboration_Code
8799 (N : Node_Id; Val : Boolean := True); -- Flag17
8800
8801 procedure Set_Has_Priority_Pragma
8802 (N : Node_Id; Val : Boolean := True); -- Flag6
8803
8804 procedure Set_Has_Private_View
8805 (N : Node_Id; Val : Boolean := True); -- Flag11
8806
8807 procedure Set_Has_Relative_Deadline_Pragma
8808 (N : Node_Id; Val : Boolean := True); -- Flag9
8809
8810 procedure Set_Has_Self_Reference
8811 (N : Node_Id; Val : Boolean := True); -- Flag13
8812
8813 procedure Set_Has_Storage_Size_Pragma
8814 (N : Node_Id; Val : Boolean := True); -- Flag5
8815
8816 procedure Set_Has_Task_Info_Pragma
8817 (N : Node_Id; Val : Boolean := True); -- Flag7
8818
8819 procedure Set_Has_Task_Name_Pragma
8820 (N : Node_Id; Val : Boolean := True); -- Flag8
8821
8822 procedure Set_Has_Wide_Character
8823 (N : Node_Id; Val : Boolean := True); -- Flag11
8824
8825 procedure Set_Hidden_By_Use_Clause
8826 (N : Node_Id; Val : Elist_Id); -- Elist4
8827
8828 procedure Set_High_Bound
8829 (N : Node_Id; Val : Node_Id); -- Node2
8830
8831 procedure Set_Identifier
8832 (N : Node_Id; Val : Node_Id); -- Node1
8833
8834 procedure Set_Interface_List
8835 (N : Node_Id; Val : List_Id); -- List2
8836
8837 procedure Set_Interface_Present
8838 (N : Node_Id; Val : Boolean := True); -- Flag16
8839
8840 procedure Set_Implicit_With
8841 (N : Node_Id; Val : Boolean := True); -- Flag16
8842
8843 procedure Set_In_Present
8844 (N : Node_Id; Val : Boolean := True); -- Flag15
8845
8846 procedure Set_Includes_Infinities
8847 (N : Node_Id; Val : Boolean := True); -- Flag11
8848
8849 procedure Set_Instance_Spec
8850 (N : Node_Id; Val : Node_Id); -- Node5
8851
8852 procedure Set_Intval
8853 (N : Node_Id; Val : Uint); -- Uint3
8854
8855 procedure Set_Is_Asynchronous_Call_Block
8856 (N : Node_Id; Val : Boolean := True); -- Flag7
8857
8858 procedure Set_Is_Component_Left_Opnd
8859 (N : Node_Id; Val : Boolean := True); -- Flag13
8860
8861 procedure Set_Is_Component_Right_Opnd
8862 (N : Node_Id; Val : Boolean := True); -- Flag14
8863
8864 procedure Set_Is_Controlling_Actual
8865 (N : Node_Id; Val : Boolean := True); -- Flag16
8866
8867 procedure Set_Is_Dynamic_Coextension
8868 (N : Node_Id; Val : Boolean := True); -- Flag18
8869
8870 procedure Set_Is_Elsif
8871 (N : Node_Id; Val : Boolean := True); -- Flag13
8872
8873 procedure Set_Is_Entry_Barrier_Function
8874 (N : Node_Id; Val : Boolean := True); -- Flag8
8875
8876 procedure Set_Is_Expanded_Build_In_Place_Call
8877 (N : Node_Id; Val : Boolean := True); -- Flag11
8878
8879 procedure Set_Is_Folded_In_Parser
8880 (N : Node_Id; Val : Boolean := True); -- Flag4
8881
8882 procedure Set_Is_In_Discriminant_Check
8883 (N : Node_Id; Val : Boolean := True); -- Flag11
8884
8885 procedure Set_Is_Machine_Number
8886 (N : Node_Id; Val : Boolean := True); -- Flag11
8887
8888 procedure Set_Is_Null_Loop
8889 (N : Node_Id; Val : Boolean := True); -- Flag16
8890
8891 procedure Set_Is_Overloaded
8892 (N : Node_Id; Val : Boolean := True); -- Flag5
8893
8894 procedure Set_Is_Power_Of_2_For_Shift
8895 (N : Node_Id; Val : Boolean := True); -- Flag13
8896
8897 procedure Set_Is_Protected_Subprogram_Body
8898 (N : Node_Id; Val : Boolean := True); -- Flag7
8899
8900 procedure Set_Is_Static_Coextension
8901 (N : Node_Id; Val : Boolean := True); -- Flag14
8902
8903 procedure Set_Is_Static_Expression
8904 (N : Node_Id; Val : Boolean := True); -- Flag6
8905
8906 procedure Set_Is_Subprogram_Descriptor
8907 (N : Node_Id; Val : Boolean := True); -- Flag16
8908
8909 procedure Set_Is_Task_Allocation_Block
8910 (N : Node_Id; Val : Boolean := True); -- Flag6
8911
8912 procedure Set_Is_Task_Master
8913 (N : Node_Id; Val : Boolean := True); -- Flag5
8914
8915 procedure Set_Iteration_Scheme
8916 (N : Node_Id; Val : Node_Id); -- Node2
8917
8918 procedure Set_Itype
8919 (N : Node_Id; Val : Entity_Id); -- Node1
8920
8921 procedure Set_Kill_Range_Check
8922 (N : Node_Id; Val : Boolean := True); -- Flag11
8923
8924 procedure Set_Last_Bit
8925 (N : Node_Id; Val : Node_Id); -- Node4
8926
8927 procedure Set_Last_Name
8928 (N : Node_Id; Val : Boolean := True); -- Flag6
8929
8930 procedure Set_Library_Unit
8931 (N : Node_Id; Val : Node_Id); -- Node4
8932
8933 procedure Set_Label_Construct
8934 (N : Node_Id; Val : Node_Id); -- Node2
8935
8936 procedure Set_Left_Opnd
8937 (N : Node_Id; Val : Node_Id); -- Node2
8938
8939 procedure Set_Limited_View_Installed
8940 (N : Node_Id; Val : Boolean := True); -- Flag18
8941
8942 procedure Set_Limited_Present
8943 (N : Node_Id; Val : Boolean := True); -- Flag17
8944
8945 procedure Set_Literals
8946 (N : Node_Id; Val : List_Id); -- List1
8947
8948 procedure Set_Local_Raise_Not_OK
8949 (N : Node_Id; Val : Boolean := True); -- Flag7
8950
8951 procedure Set_Local_Raise_Statements
8952 (N : Node_Id; Val : Elist_Id); -- Elist1
8953
8954 procedure Set_Loop_Actions
8955 (N : Node_Id; Val : List_Id); -- List2
8956
8957 procedure Set_Loop_Parameter_Specification
8958 (N : Node_Id; Val : Node_Id); -- Node4
8959
8960 procedure Set_Low_Bound
8961 (N : Node_Id; Val : Node_Id); -- Node1
8962
8963 procedure Set_Mod_Clause
8964 (N : Node_Id; Val : Node_Id); -- Node2
8965
8966 procedure Set_More_Ids
8967 (N : Node_Id; Val : Boolean := True); -- Flag5
8968
8969 procedure Set_Must_Be_Byte_Aligned
8970 (N : Node_Id; Val : Boolean := True); -- Flag14
8971
8972 procedure Set_Must_Not_Freeze
8973 (N : Node_Id; Val : Boolean := True); -- Flag8
8974
8975 procedure Set_Must_Not_Override
8976 (N : Node_Id; Val : Boolean := True); -- Flag15
8977
8978 procedure Set_Must_Override
8979 (N : Node_Id; Val : Boolean := True); -- Flag14
8980
8981 procedure Set_Name
8982 (N : Node_Id; Val : Node_Id); -- Node2
8983
8984 procedure Set_Names
8985 (N : Node_Id; Val : List_Id); -- List2
8986
8987 procedure Set_Next_Entity
8988 (N : Node_Id; Val : Node_Id); -- Node2
8989
8990 procedure Set_Next_Implicit_With
8991 (N : Node_Id; Val : Node_Id); -- Node3
8992
8993 procedure Set_Next_Named_Actual
8994 (N : Node_Id; Val : Node_Id); -- Node4
8995
8996 procedure Set_Next_Pragma
8997 (N : Node_Id; Val : Node_Id); -- Node1
8998
8999 procedure Set_Next_Rep_Item
9000 (N : Node_Id; Val : Node_Id); -- Node5
9001
9002 procedure Set_Next_Use_Clause
9003 (N : Node_Id; Val : Node_Id); -- Node3
9004
9005 procedure Set_No_Ctrl_Actions
9006 (N : Node_Id; Val : Boolean := True); -- Flag7
9007
9008 procedure Set_No_Elaboration_Check
9009 (N : Node_Id; Val : Boolean := True); -- Flag14
9010
9011 procedure Set_No_Entities_Ref_In_Spec
9012 (N : Node_Id; Val : Boolean := True); -- Flag8
9013
9014 procedure Set_No_Initialization
9015 (N : Node_Id; Val : Boolean := True); -- Flag13
9016
9017 procedure Set_No_Truncation
9018 (N : Node_Id; Val : Boolean := True); -- Flag17
9019
9020 procedure Set_Null_Present
9021 (N : Node_Id; Val : Boolean := True); -- Flag13
9022
9023 procedure Set_Null_Exclusion_Present
9024 (N : Node_Id; Val : Boolean := True); -- Flag11
9025
9026 procedure Set_Null_Exclusion_In_Return_Present
9027 (N : Node_Id; Val : Boolean := True); -- Flag14
9028
9029 procedure Set_Null_Record_Present
9030 (N : Node_Id; Val : Boolean := True); -- Flag17
9031
9032 procedure Set_Object_Definition
9033 (N : Node_Id; Val : Node_Id); -- Node4
9034
9035 procedure Set_Original_Discriminant
9036 (N : Node_Id; Val : Node_Id); -- Node2
9037
9038 procedure Set_Original_Entity
9039 (N : Node_Id; Val : Entity_Id); -- Node2
9040
9041 procedure Set_Others_Discrete_Choices
9042 (N : Node_Id; Val : List_Id); -- List1
9043
9044 procedure Set_Out_Present
9045 (N : Node_Id; Val : Boolean := True); -- Flag17
9046
9047 procedure Set_Parameter_Associations
9048 (N : Node_Id; Val : List_Id); -- List3
9049
9050 procedure Set_Parameter_List_Truncated
9051 (N : Node_Id; Val : Boolean := True); -- Flag17
9052
9053 procedure Set_Parameter_Specifications
9054 (N : Node_Id; Val : List_Id); -- List3
9055
9056 procedure Set_Parameter_Type
9057 (N : Node_Id; Val : Node_Id); -- Node2
9058
9059 procedure Set_Parent_Spec
9060 (N : Node_Id; Val : Node_Id); -- Node4
9061
9062 procedure Set_PPC_Enabled
9063 (N : Node_Id; Val : Boolean := True); -- Flag5
9064
9065 procedure Set_Position
9066 (N : Node_Id; Val : Node_Id); -- Node2
9067
9068 procedure Set_Pragma_Argument_Associations
9069 (N : Node_Id; Val : List_Id); -- List2
9070
9071 procedure Set_Pragma_Identifier
9072 (N : Node_Id; Val : Node_Id); -- Node4
9073
9074 procedure Set_Pragmas_After
9075 (N : Node_Id; Val : List_Id); -- List5
9076
9077 procedure Set_Pragmas_Before
9078 (N : Node_Id; Val : List_Id); -- List4
9079
9080 procedure Set_Prefix
9081 (N : Node_Id; Val : Node_Id); -- Node3
9082
9083 procedure Set_Present_Expr
9084 (N : Node_Id; Val : Uint); -- Uint3
9085
9086 procedure Set_Prev_Ids
9087 (N : Node_Id; Val : Boolean := True); -- Flag6
9088
9089 procedure Set_Print_In_Hex
9090 (N : Node_Id; Val : Boolean := True); -- Flag13
9091
9092 procedure Set_Private_Declarations
9093 (N : Node_Id; Val : List_Id); -- List3
9094
9095 procedure Set_Private_Present
9096 (N : Node_Id; Val : Boolean := True); -- Flag15
9097
9098 procedure Set_Procedure_To_Call
9099 (N : Node_Id; Val : Node_Id); -- Node2
9100
9101 procedure Set_Proper_Body
9102 (N : Node_Id; Val : Node_Id); -- Node1
9103
9104 procedure Set_Protected_Definition
9105 (N : Node_Id; Val : Node_Id); -- Node3
9106
9107 procedure Set_Protected_Present
9108 (N : Node_Id; Val : Boolean := True); -- Flag6
9109
9110 procedure Set_Raises_Constraint_Error
9111 (N : Node_Id; Val : Boolean := True); -- Flag7
9112
9113 procedure Set_Range_Constraint
9114 (N : Node_Id; Val : Node_Id); -- Node4
9115
9116 procedure Set_Range_Expression
9117 (N : Node_Id; Val : Node_Id); -- Node4
9118
9119 procedure Set_Real_Range_Specification
9120 (N : Node_Id; Val : Node_Id); -- Node4
9121
9122 procedure Set_Realval
9123 (N : Node_Id; Val : Ureal); -- Ureal3
9124
9125 procedure Set_Reason
9126 (N : Node_Id; Val : Uint); -- Uint3
9127
9128 procedure Set_Record_Extension_Part
9129 (N : Node_Id; Val : Node_Id); -- Node3
9130
9131 procedure Set_Redundant_Use
9132 (N : Node_Id; Val : Boolean := True); -- Flag13
9133
9134 procedure Set_Renaming_Exception
9135 (N : Node_Id; Val : Node_Id); -- Node2
9136
9137 procedure Set_Result_Definition
9138 (N : Node_Id; Val : Node_Id); -- Node4
9139
9140 procedure Set_Return_Object_Declarations
9141 (N : Node_Id; Val : List_Id); -- List3
9142
9143 procedure Set_Return_Statement_Entity
9144 (N : Node_Id; Val : Node_Id); -- Node5
9145
9146 procedure Set_Reverse_Present
9147 (N : Node_Id; Val : Boolean := True); -- Flag15
9148
9149 procedure Set_Right_Opnd
9150 (N : Node_Id; Val : Node_Id); -- Node3
9151
9152 procedure Set_Rounded_Result
9153 (N : Node_Id; Val : Boolean := True); -- Flag18
9154
9155 procedure Set_Scope
9156 (N : Node_Id; Val : Node_Id); -- Node3
9157
9158 procedure Set_Select_Alternatives
9159 (N : Node_Id; Val : List_Id); -- List1
9160
9161 procedure Set_Selector_Name
9162 (N : Node_Id; Val : Node_Id); -- Node2
9163
9164 procedure Set_Selector_Names
9165 (N : Node_Id; Val : List_Id); -- List1
9166
9167 procedure Set_Shift_Count_OK
9168 (N : Node_Id; Val : Boolean := True); -- Flag4
9169
9170 procedure Set_Source_Type
9171 (N : Node_Id; Val : Entity_Id); -- Node1
9172
9173 procedure Set_Specification
9174 (N : Node_Id; Val : Node_Id); -- Node1
9175
9176 procedure Set_Statements
9177 (N : Node_Id; Val : List_Id); -- List3
9178
9179 procedure Set_Static_Processing_OK
9180 (N : Node_Id; Val : Boolean); -- Flag4
9181
9182 procedure Set_Storage_Pool
9183 (N : Node_Id; Val : Node_Id); -- Node1
9184
9185 procedure Set_Strval
9186 (N : Node_Id; Val : String_Id); -- Str3
9187
9188 procedure Set_Subtype_Indication
9189 (N : Node_Id; Val : Node_Id); -- Node5
9190
9191 procedure Set_Subtype_Mark
9192 (N : Node_Id; Val : Node_Id); -- Node4
9193
9194 procedure Set_Subtype_Marks
9195 (N : Node_Id; Val : List_Id); -- List2
9196
9197 procedure Set_Suppress_Loop_Warnings
9198 (N : Node_Id; Val : Boolean := True); -- Flag17
9199
9200 procedure Set_Synchronized_Present
9201 (N : Node_Id; Val : Boolean := True); -- Flag7
9202
9203 procedure Set_Tagged_Present
9204 (N : Node_Id; Val : Boolean := True); -- Flag15
9205
9206 procedure Set_Target_Type
9207 (N : Node_Id; Val : Entity_Id); -- Node2
9208
9209 procedure Set_Task_Definition
9210 (N : Node_Id; Val : Node_Id); -- Node3
9211
9212 procedure Set_Task_Present
9213 (N : Node_Id; Val : Boolean := True); -- Flag5
9214
9215 procedure Set_Then_Actions
9216 (N : Node_Id; Val : List_Id); -- List2
9217
9218 procedure Set_Then_Statements
9219 (N : Node_Id; Val : List_Id); -- List2
9220
9221 procedure Set_Treat_Fixed_As_Integer
9222 (N : Node_Id; Val : Boolean := True); -- Flag14
9223
9224 procedure Set_Triggering_Alternative
9225 (N : Node_Id; Val : Node_Id); -- Node1
9226
9227 procedure Set_Triggering_Statement
9228 (N : Node_Id; Val : Node_Id); -- Node1
9229
9230 procedure Set_TSS_Elist
9231 (N : Node_Id; Val : Elist_Id); -- Elist3
9232
9233 procedure Set_Type_Definition
9234 (N : Node_Id; Val : Node_Id); -- Node3
9235
9236 procedure Set_Unit
9237 (N : Node_Id; Val : Node_Id); -- Node2
9238
9239 procedure Set_Unknown_Discriminants_Present
9240 (N : Node_Id; Val : Boolean := True); -- Flag13
9241
9242 procedure Set_Unreferenced_In_Spec
9243 (N : Node_Id; Val : Boolean := True); -- Flag7
9244
9245 procedure Set_Variant_Part
9246 (N : Node_Id; Val : Node_Id); -- Node4
9247
9248 procedure Set_Variants
9249 (N : Node_Id; Val : List_Id); -- List1
9250
9251 procedure Set_Visible_Declarations
9252 (N : Node_Id; Val : List_Id); -- List2
9253
9254 procedure Set_Was_Originally_Stub
9255 (N : Node_Id; Val : Boolean := True); -- Flag13
9256
9257 procedure Set_Zero_Cost_Handling
9258 (N : Node_Id; Val : Boolean := True); -- Flag5
9259
9260 -------------------------
9261 -- Iterator Procedures --
9262 -------------------------
9263
9264 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
9265
9266 procedure Next_Entity (N : in out Node_Id);
9267 procedure Next_Named_Actual (N : in out Node_Id);
9268 procedure Next_Rep_Item (N : in out Node_Id);
9269 procedure Next_Use_Clause (N : in out Node_Id);
9270
9271 --------------------------------------
9272 -- Logical Access to End_Span Field --
9273 --------------------------------------
9274
9275 function End_Location (N : Node_Id) return Source_Ptr;
9276 -- N is an N_If_Statement or N_Case_Statement node, and this
9277 -- function returns the location of the IF token in the END IF
9278 -- sequence by translating the value of the End_Span field.
9279
9280 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
9281 -- N is an N_If_Statement or N_Case_Statement node. This procedure
9282 -- sets the End_Span field to correspond to the given value S. In
9283 -- other words, End_Span is set to the difference between S and
9284 -- Sloc (N), the starting location.
9285
9286 --------------------------------
9287 -- Node_Kind Membership Tests --
9288 --------------------------------
9289
9290 -- The following functions allow a convenient notation for testing whether
9291 -- a Node_Kind value matches any one of a list of possible values. In each
9292 -- case True is returned if the given T argument is equal to any of the V
9293 -- arguments. Note that there is a similar set of functions defined in
9294 -- Atree where the first argument is a Node_Id whose Nkind field is tested.
9295
9296 function Nkind_In
9297 (T : Node_Kind;
9298 V1 : Node_Kind;
9299 V2 : Node_Kind) return Boolean;
9300
9301 function Nkind_In
9302 (T : Node_Kind;
9303 V1 : Node_Kind;
9304 V2 : Node_Kind;
9305 V3 : Node_Kind) return Boolean;
9306
9307 function Nkind_In
9308 (T : Node_Kind;
9309 V1 : Node_Kind;
9310 V2 : Node_Kind;
9311 V3 : Node_Kind;
9312 V4 : Node_Kind) return Boolean;
9313
9314 function Nkind_In
9315 (T : Node_Kind;
9316 V1 : Node_Kind;
9317 V2 : Node_Kind;
9318 V3 : Node_Kind;
9319 V4 : Node_Kind;
9320 V5 : Node_Kind) return Boolean;
9321
9322 function Nkind_In
9323 (T : Node_Kind;
9324 V1 : Node_Kind;
9325 V2 : Node_Kind;
9326 V3 : Node_Kind;
9327 V4 : Node_Kind;
9328 V5 : Node_Kind;
9329 V6 : Node_Kind) return Boolean;
9330
9331 function Nkind_In
9332 (T : Node_Kind;
9333 V1 : Node_Kind;
9334 V2 : Node_Kind;
9335 V3 : Node_Kind;
9336 V4 : Node_Kind;
9337 V5 : Node_Kind;
9338 V6 : Node_Kind;
9339 V7 : Node_Kind) return Boolean;
9340
9341 function Nkind_In
9342 (T : Node_Kind;
9343 V1 : Node_Kind;
9344 V2 : Node_Kind;
9345 V3 : Node_Kind;
9346 V4 : Node_Kind;
9347 V5 : Node_Kind;
9348 V6 : Node_Kind;
9349 V7 : Node_Kind;
9350 V8 : Node_Kind) return Boolean;
9351
9352 pragma Inline (Nkind_In);
9353 -- Inline all above functions
9354
9355 -----------------------
9356 -- Utility Functions --
9357 -----------------------
9358
9359 function Pragma_Name (N : Node_Id) return Name_Id;
9360 pragma Inline (Pragma_Name);
9361 -- Convenient function to obtain Chars field of Pragma_Identifier
9362
9363 -----------------------------
9364 -- Syntactic Parent Tables --
9365 -----------------------------
9366
9367 -- These tables show for each node, and for each of the five fields,
9368 -- whether the corresponding field is syntactic (True) or semantic (False).
9369 -- Unused entries are also set to False.
9370
9371 subtype Field_Num is Natural range 1 .. 5;
9372
9373 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
9374
9375 -- Following entries can be built automatically from the sinfo sources
9376 -- using the makeisf utility (currently this program is in spitbol).
9377
9378 N_Identifier =>
9379 (1 => True, -- Chars (Name1)
9380 2 => False, -- Original_Discriminant (Node2-Sem)
9381 3 => False, -- unused
9382 4 => False, -- Entity (Node4-Sem)
9383 5 => False), -- Etype (Node5-Sem)
9384
9385 N_Integer_Literal =>
9386 (1 => False, -- unused
9387 2 => False, -- Original_Entity (Node2-Sem)
9388 3 => True, -- Intval (Uint3)
9389 4 => False, -- unused
9390 5 => False), -- Etype (Node5-Sem)
9391
9392 N_Real_Literal =>
9393 (1 => False, -- unused
9394 2 => False, -- Original_Entity (Node2-Sem)
9395 3 => True, -- Realval (Ureal3)
9396 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
9397 5 => False), -- Etype (Node5-Sem)
9398
9399 N_Character_Literal =>
9400 (1 => True, -- Chars (Name1)
9401 2 => True, -- Char_Literal_Value (Uint2)
9402 3 => False, -- unused
9403 4 => False, -- Entity (Node4-Sem)
9404 5 => False), -- Etype (Node5-Sem)
9405
9406 N_String_Literal =>
9407 (1 => False, -- unused
9408 2 => False, -- unused
9409 3 => True, -- Strval (Str3)
9410 4 => False, -- unused
9411 5 => False), -- Etype (Node5-Sem)
9412
9413 N_Pragma =>
9414 (1 => False, -- Next_Pragma (Node1-Sem)
9415 2 => True, -- Pragma_Argument_Associations (List2)
9416 3 => True, -- Debug_Statement (Node3)
9417 4 => True, -- Pragma_Identifier (Node4)
9418 5 => False), -- Next_Rep_Item (Node5-Sem)
9419
9420 N_Pragma_Argument_Association =>
9421 (1 => True, -- Chars (Name1)
9422 2 => False, -- unused
9423 3 => True, -- Expression (Node3)
9424 4 => False, -- unused
9425 5 => False), -- unused
9426
9427 N_Defining_Identifier =>
9428 (1 => True, -- Chars (Name1)
9429 2 => False, -- Next_Entity (Node2-Sem)
9430 3 => False, -- Scope (Node3-Sem)
9431 4 => False, -- unused
9432 5 => False), -- Etype (Node5-Sem)
9433
9434 N_Full_Type_Declaration =>
9435 (1 => True, -- Defining_Identifier (Node1)
9436 2 => False, -- unused
9437 3 => True, -- Type_Definition (Node3)
9438 4 => True, -- Discriminant_Specifications (List4)
9439 5 => False), -- unused
9440
9441 N_Subtype_Declaration =>
9442 (1 => True, -- Defining_Identifier (Node1)
9443 2 => False, -- unused
9444 3 => False, -- unused
9445 4 => False, -- Generic_Parent_Type (Node4-Sem)
9446 5 => True), -- Subtype_Indication (Node5)
9447
9448 N_Subtype_Indication =>
9449 (1 => False, -- unused
9450 2 => False, -- unused
9451 3 => True, -- Constraint (Node3)
9452 4 => True, -- Subtype_Mark (Node4)
9453 5 => False), -- Etype (Node5-Sem)
9454
9455 N_Object_Declaration =>
9456 (1 => True, -- Defining_Identifier (Node1)
9457 2 => False, -- Handler_List_Entry (Node2-Sem)
9458 3 => True, -- Expression (Node3)
9459 4 => True, -- Object_Definition (Node4)
9460 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
9461
9462 N_Number_Declaration =>
9463 (1 => True, -- Defining_Identifier (Node1)
9464 2 => False, -- unused
9465 3 => True, -- Expression (Node3)
9466 4 => False, -- unused
9467 5 => False), -- unused
9468
9469 N_Derived_Type_Definition =>
9470 (1 => False, -- unused
9471 2 => True, -- Interface_List (List2)
9472 3 => True, -- Record_Extension_Part (Node3)
9473 4 => False, -- unused
9474 5 => True), -- Subtype_Indication (Node5)
9475
9476 N_Range_Constraint =>
9477 (1 => False, -- unused
9478 2 => False, -- unused
9479 3 => False, -- unused
9480 4 => True, -- Range_Expression (Node4)
9481 5 => False), -- unused
9482
9483 N_Range =>
9484 (1 => True, -- Low_Bound (Node1)
9485 2 => True, -- High_Bound (Node2)
9486 3 => False, -- unused
9487 4 => False, -- unused
9488 5 => False), -- Etype (Node5-Sem)
9489
9490 N_Enumeration_Type_Definition =>
9491 (1 => True, -- Literals (List1)
9492 2 => False, -- unused
9493 3 => False, -- unused
9494 4 => True, -- End_Label (Node4)
9495 5 => False), -- unused
9496
9497 N_Defining_Character_Literal =>
9498 (1 => True, -- Chars (Name1)
9499 2 => False, -- Next_Entity (Node2-Sem)
9500 3 => False, -- Scope (Node3-Sem)
9501 4 => False, -- unused
9502 5 => False), -- Etype (Node5-Sem)
9503
9504 N_Signed_Integer_Type_Definition =>
9505 (1 => True, -- Low_Bound (Node1)
9506 2 => True, -- High_Bound (Node2)
9507 3 => False, -- unused
9508 4 => False, -- unused
9509 5 => False), -- unused
9510
9511 N_Modular_Type_Definition =>
9512 (1 => False, -- unused
9513 2 => False, -- unused
9514 3 => True, -- Expression (Node3)
9515 4 => False, -- unused
9516 5 => False), -- unused
9517
9518 N_Floating_Point_Definition =>
9519 (1 => False, -- unused
9520 2 => True, -- Digits_Expression (Node2)
9521 3 => False, -- unused
9522 4 => True, -- Real_Range_Specification (Node4)
9523 5 => False), -- unused
9524
9525 N_Real_Range_Specification =>
9526 (1 => True, -- Low_Bound (Node1)
9527 2 => True, -- High_Bound (Node2)
9528 3 => False, -- unused
9529 4 => False, -- unused
9530 5 => False), -- unused
9531
9532 N_Ordinary_Fixed_Point_Definition =>
9533 (1 => False, -- unused
9534 2 => False, -- unused
9535 3 => True, -- Delta_Expression (Node3)
9536 4 => True, -- Real_Range_Specification (Node4)
9537 5 => False), -- unused
9538
9539 N_Decimal_Fixed_Point_Definition =>
9540 (1 => False, -- unused
9541 2 => True, -- Digits_Expression (Node2)
9542 3 => True, -- Delta_Expression (Node3)
9543 4 => True, -- Real_Range_Specification (Node4)
9544 5 => False), -- unused
9545
9546 N_Digits_Constraint =>
9547 (1 => False, -- unused
9548 2 => True, -- Digits_Expression (Node2)
9549 3 => False, -- unused
9550 4 => True, -- Range_Constraint (Node4)
9551 5 => False), -- unused
9552
9553 N_Unconstrained_Array_Definition =>
9554 (1 => False, -- unused
9555 2 => True, -- Subtype_Marks (List2)
9556 3 => False, -- unused
9557 4 => True, -- Component_Definition (Node4)
9558 5 => False), -- unused
9559
9560 N_Constrained_Array_Definition =>
9561 (1 => False, -- unused
9562 2 => True, -- Discrete_Subtype_Definitions (List2)
9563 3 => False, -- unused
9564 4 => True, -- Component_Definition (Node4)
9565 5 => False), -- unused
9566
9567 N_Component_Definition =>
9568 (1 => False, -- unused
9569 2 => False, -- unused
9570 3 => True, -- Access_Definition (Node3)
9571 4 => False, -- unused
9572 5 => True), -- Subtype_Indication (Node5)
9573
9574 N_Discriminant_Specification =>
9575 (1 => True, -- Defining_Identifier (Node1)
9576 2 => False, -- unused
9577 3 => True, -- Expression (Node3)
9578 4 => False, -- unused
9579 5 => True), -- Discriminant_Type (Node5)
9580
9581 N_Index_Or_Discriminant_Constraint =>
9582 (1 => True, -- Constraints (List1)
9583 2 => False, -- unused
9584 3 => False, -- unused
9585 4 => False, -- unused
9586 5 => False), -- unused
9587
9588 N_Discriminant_Association =>
9589 (1 => True, -- Selector_Names (List1)
9590 2 => False, -- unused
9591 3 => True, -- Expression (Node3)
9592 4 => False, -- unused
9593 5 => False), -- unused
9594
9595 N_Record_Definition =>
9596 (1 => True, -- Component_List (Node1)
9597 2 => True, -- Interface_List (List2)
9598 3 => False, -- unused
9599 4 => True, -- End_Label (Node4)
9600 5 => False), -- unused
9601
9602 N_Component_List =>
9603 (1 => False, -- unused
9604 2 => False, -- unused
9605 3 => True, -- Component_Items (List3)
9606 4 => True, -- Variant_Part (Node4)
9607 5 => False), -- unused
9608
9609 N_Component_Declaration =>
9610 (1 => True, -- Defining_Identifier (Node1)
9611 2 => False, -- unused
9612 3 => True, -- Expression (Node3)
9613 4 => True, -- Component_Definition (Node4)
9614 5 => False), -- unused
9615
9616 N_Variant_Part =>
9617 (1 => True, -- Variants (List1)
9618 2 => True, -- Name (Node2)
9619 3 => False, -- unused
9620 4 => False, -- unused
9621 5 => False), -- unused
9622
9623 N_Variant =>
9624 (1 => True, -- Component_List (Node1)
9625 2 => False, -- Enclosing_Variant (Node2-Sem)
9626 3 => False, -- Present_Expr (Uint3-Sem)
9627 4 => True, -- Discrete_Choices (List4)
9628 5 => False), -- Dcheck_Function (Node5-Sem)
9629
9630 N_Others_Choice =>
9631 (1 => False, -- Others_Discrete_Choices (List1-Sem)
9632 2 => False, -- unused
9633 3 => False, -- unused
9634 4 => False, -- unused
9635 5 => False), -- unused
9636
9637 N_Access_To_Object_Definition =>
9638 (1 => False, -- unused
9639 2 => False, -- unused
9640 3 => False, -- unused
9641 4 => False, -- unused
9642 5 => True), -- Subtype_Indication (Node5)
9643
9644 N_Access_Function_Definition =>
9645 (1 => False, -- unused
9646 2 => False, -- unused
9647 3 => True, -- Parameter_Specifications (List3)
9648 4 => True, -- Result_Definition (Node4)
9649 5 => False), -- unused
9650
9651 N_Access_Procedure_Definition =>
9652 (1 => False, -- unused
9653 2 => False, -- unused
9654 3 => True, -- Parameter_Specifications (List3)
9655 4 => False, -- unused
9656 5 => False), -- unused
9657
9658 N_Access_Definition =>
9659 (1 => False, -- unused
9660 2 => False, -- unused
9661 3 => True, -- Access_To_Subprogram_Definition (Node3)
9662 4 => True, -- Subtype_Mark (Node4)
9663 5 => False), -- unused
9664
9665 N_Incomplete_Type_Declaration =>
9666 (1 => True, -- Defining_Identifier (Node1)
9667 2 => False, -- unused
9668 3 => False, -- unused
9669 4 => True, -- Discriminant_Specifications (List4)
9670 5 => False), -- unused
9671
9672 N_Explicit_Dereference =>
9673 (1 => False, -- unused
9674 2 => False, -- unused
9675 3 => True, -- Prefix (Node3)
9676 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
9677 5 => False), -- Etype (Node5-Sem)
9678
9679 N_Indexed_Component =>
9680 (1 => True, -- Expressions (List1)
9681 2 => False, -- unused
9682 3 => True, -- Prefix (Node3)
9683 4 => False, -- unused
9684 5 => False), -- Etype (Node5-Sem)
9685
9686 N_Slice =>
9687 (1 => False, -- unused
9688 2 => False, -- unused
9689 3 => True, -- Prefix (Node3)
9690 4 => True, -- Discrete_Range (Node4)
9691 5 => False), -- Etype (Node5-Sem)
9692
9693 N_Selected_Component =>
9694 (1 => False, -- unused
9695 2 => True, -- Selector_Name (Node2)
9696 3 => True, -- Prefix (Node3)
9697 4 => False, -- unused
9698 5 => False), -- Etype (Node5-Sem)
9699
9700 N_Attribute_Reference =>
9701 (1 => True, -- Expressions (List1)
9702 2 => True, -- Attribute_Name (Name2)
9703 3 => True, -- Prefix (Node3)
9704 4 => False, -- Entity (Node4-Sem)
9705 5 => False), -- Etype (Node5-Sem)
9706
9707 N_Aggregate =>
9708 (1 => True, -- Expressions (List1)
9709 2 => True, -- Component_Associations (List2)
9710 3 => False, -- Aggregate_Bounds (Node3-Sem)
9711 4 => False, -- unused
9712 5 => False), -- Etype (Node5-Sem)
9713
9714 N_Component_Association =>
9715 (1 => True, -- Choices (List1)
9716 2 => False, -- Loop_Actions (List2-Sem)
9717 3 => True, -- Expression (Node3)
9718 4 => False, -- unused
9719 5 => False), -- unused
9720
9721 N_Extension_Aggregate =>
9722 (1 => True, -- Expressions (List1)
9723 2 => True, -- Component_Associations (List2)
9724 3 => True, -- Ancestor_Part (Node3)
9725 4 => False, -- unused
9726 5 => False), -- Etype (Node5-Sem)
9727
9728 N_Null =>
9729 (1 => False, -- unused
9730 2 => False, -- unused
9731 3 => False, -- unused
9732 4 => False, -- unused
9733 5 => False), -- Etype (Node5-Sem)
9734
9735 N_And_Then =>
9736 (1 => False, -- Actions (List1-Sem)
9737 2 => True, -- Left_Opnd (Node2)
9738 3 => True, -- Right_Opnd (Node3)
9739 4 => False, -- unused
9740 5 => False), -- Etype (Node5-Sem)
9741
9742 N_Or_Else =>
9743 (1 => False, -- Actions (List1-Sem)
9744 2 => True, -- Left_Opnd (Node2)
9745 3 => True, -- Right_Opnd (Node3)
9746 4 => False, -- unused
9747 5 => False), -- Etype (Node5-Sem)
9748
9749 N_In =>
9750 (1 => False, -- unused
9751 2 => True, -- Left_Opnd (Node2)
9752 3 => True, -- Right_Opnd (Node3)
9753 4 => False, -- unused
9754 5 => False), -- Etype (Node5-Sem)
9755
9756 N_Not_In =>
9757 (1 => False, -- unused
9758 2 => True, -- Left_Opnd (Node2)
9759 3 => True, -- Right_Opnd (Node3)
9760 4 => False, -- unused
9761 5 => False), -- Etype (Node5-Sem)
9762
9763 N_Op_And =>
9764 (1 => True, -- Chars (Name1)
9765 2 => True, -- Left_Opnd (Node2)
9766 3 => True, -- Right_Opnd (Node3)
9767 4 => False, -- Entity (Node4-Sem)
9768 5 => False), -- Etype (Node5-Sem)
9769
9770 N_Op_Or =>
9771 (1 => True, -- Chars (Name1)
9772 2 => True, -- Left_Opnd (Node2)
9773 3 => True, -- Right_Opnd (Node3)
9774 4 => False, -- Entity (Node4-Sem)
9775 5 => False), -- Etype (Node5-Sem)
9776
9777 N_Op_Xor =>
9778 (1 => True, -- Chars (Name1)
9779 2 => True, -- Left_Opnd (Node2)
9780 3 => True, -- Right_Opnd (Node3)
9781 4 => False, -- Entity (Node4-Sem)
9782 5 => False), -- Etype (Node5-Sem)
9783
9784 N_Op_Eq =>
9785 (1 => True, -- Chars (Name1)
9786 2 => True, -- Left_Opnd (Node2)
9787 3 => True, -- Right_Opnd (Node3)
9788 4 => False, -- Entity (Node4-Sem)
9789 5 => False), -- Etype (Node5-Sem)
9790
9791 N_Op_Ne =>
9792 (1 => True, -- Chars (Name1)
9793 2 => True, -- Left_Opnd (Node2)
9794 3 => True, -- Right_Opnd (Node3)
9795 4 => False, -- Entity (Node4-Sem)
9796 5 => False), -- Etype (Node5-Sem)
9797
9798 N_Op_Lt =>
9799 (1 => True, -- Chars (Name1)
9800 2 => True, -- Left_Opnd (Node2)
9801 3 => True, -- Right_Opnd (Node3)
9802 4 => False, -- Entity (Node4-Sem)
9803 5 => False), -- Etype (Node5-Sem)
9804
9805 N_Op_Le =>
9806 (1 => True, -- Chars (Name1)
9807 2 => True, -- Left_Opnd (Node2)
9808 3 => True, -- Right_Opnd (Node3)
9809 4 => False, -- Entity (Node4-Sem)
9810 5 => False), -- Etype (Node5-Sem)
9811
9812 N_Op_Gt =>
9813 (1 => True, -- Chars (Name1)
9814 2 => True, -- Left_Opnd (Node2)
9815 3 => True, -- Right_Opnd (Node3)
9816 4 => False, -- Entity (Node4-Sem)
9817 5 => False), -- Etype (Node5-Sem)
9818
9819 N_Op_Ge =>
9820 (1 => True, -- Chars (Name1)
9821 2 => True, -- Left_Opnd (Node2)
9822 3 => True, -- Right_Opnd (Node3)
9823 4 => False, -- Entity (Node4-Sem)
9824 5 => False), -- Etype (Node5-Sem)
9825
9826 N_Op_Add =>
9827 (1 => True, -- Chars (Name1)
9828 2 => True, -- Left_Opnd (Node2)
9829 3 => True, -- Right_Opnd (Node3)
9830 4 => False, -- Entity (Node4-Sem)
9831 5 => False), -- Etype (Node5-Sem)
9832
9833 N_Op_Subtract =>
9834 (1 => True, -- Chars (Name1)
9835 2 => True, -- Left_Opnd (Node2)
9836 3 => True, -- Right_Opnd (Node3)
9837 4 => False, -- Entity (Node4-Sem)
9838 5 => False), -- Etype (Node5-Sem)
9839
9840 N_Op_Concat =>
9841 (1 => True, -- Chars (Name1)
9842 2 => True, -- Left_Opnd (Node2)
9843 3 => True, -- Right_Opnd (Node3)
9844 4 => False, -- Entity (Node4-Sem)
9845 5 => False), -- Etype (Node5-Sem)
9846
9847 N_Op_Multiply =>
9848 (1 => True, -- Chars (Name1)
9849 2 => True, -- Left_Opnd (Node2)
9850 3 => True, -- Right_Opnd (Node3)
9851 4 => False, -- Entity (Node4-Sem)
9852 5 => False), -- Etype (Node5-Sem)
9853
9854 N_Op_Divide =>
9855 (1 => True, -- Chars (Name1)
9856 2 => True, -- Left_Opnd (Node2)
9857 3 => True, -- Right_Opnd (Node3)
9858 4 => False, -- Entity (Node4-Sem)
9859 5 => False), -- Etype (Node5-Sem)
9860
9861 N_Op_Mod =>
9862 (1 => True, -- Chars (Name1)
9863 2 => True, -- Left_Opnd (Node2)
9864 3 => True, -- Right_Opnd (Node3)
9865 4 => False, -- Entity (Node4-Sem)
9866 5 => False), -- Etype (Node5-Sem)
9867
9868 N_Op_Rem =>
9869 (1 => True, -- Chars (Name1)
9870 2 => True, -- Left_Opnd (Node2)
9871 3 => True, -- Right_Opnd (Node3)
9872 4 => False, -- Entity (Node4-Sem)
9873 5 => False), -- Etype (Node5-Sem)
9874
9875 N_Op_Expon =>
9876 (1 => True, -- Chars (Name1)
9877 2 => True, -- Left_Opnd (Node2)
9878 3 => True, -- Right_Opnd (Node3)
9879 4 => False, -- Entity (Node4-Sem)
9880 5 => False), -- Etype (Node5-Sem)
9881
9882 N_Op_Plus =>
9883 (1 => True, -- Chars (Name1)
9884 2 => False, -- unused
9885 3 => True, -- Right_Opnd (Node3)
9886 4 => False, -- Entity (Node4-Sem)
9887 5 => False), -- Etype (Node5-Sem)
9888
9889 N_Op_Minus =>
9890 (1 => True, -- Chars (Name1)
9891 2 => False, -- unused
9892 3 => True, -- Right_Opnd (Node3)
9893 4 => False, -- Entity (Node4-Sem)
9894 5 => False), -- Etype (Node5-Sem)
9895
9896 N_Op_Abs =>
9897 (1 => True, -- Chars (Name1)
9898 2 => False, -- unused
9899 3 => True, -- Right_Opnd (Node3)
9900 4 => False, -- Entity (Node4-Sem)
9901 5 => False), -- Etype (Node5-Sem)
9902
9903 N_Op_Not =>
9904 (1 => True, -- Chars (Name1)
9905 2 => False, -- unused
9906 3 => True, -- Right_Opnd (Node3)
9907 4 => False, -- Entity (Node4-Sem)
9908 5 => False), -- Etype (Node5-Sem)
9909
9910 N_Type_Conversion =>
9911 (1 => False, -- unused
9912 2 => False, -- unused
9913 3 => True, -- Expression (Node3)
9914 4 => True, -- Subtype_Mark (Node4)
9915 5 => False), -- Etype (Node5-Sem)
9916
9917 N_Qualified_Expression =>
9918 (1 => False, -- unused
9919 2 => False, -- unused
9920 3 => True, -- Expression (Node3)
9921 4 => True, -- Subtype_Mark (Node4)
9922 5 => False), -- Etype (Node5-Sem)
9923
9924 N_Allocator =>
9925 (1 => False, -- Storage_Pool (Node1-Sem)
9926 2 => False, -- Procedure_To_Call (Node2-Sem)
9927 3 => True, -- Expression (Node3)
9928 4 => False, -- Coextensions (Elist4-Sem)
9929 5 => False), -- Etype (Node5-Sem)
9930
9931 N_Null_Statement =>
9932 (1 => False, -- unused
9933 2 => False, -- unused
9934 3 => False, -- unused
9935 4 => False, -- unused
9936 5 => False), -- unused
9937
9938 N_Label =>
9939 (1 => True, -- Identifier (Node1)
9940 2 => False, -- unused
9941 3 => False, -- unused
9942 4 => False, -- unused
9943 5 => False), -- unused
9944
9945 N_Assignment_Statement =>
9946 (1 => False, -- unused
9947 2 => True, -- Name (Node2)
9948 3 => True, -- Expression (Node3)
9949 4 => False, -- unused
9950 5 => False), -- unused
9951
9952 N_If_Statement =>
9953 (1 => True, -- Condition (Node1)
9954 2 => True, -- Then_Statements (List2)
9955 3 => True, -- Elsif_Parts (List3)
9956 4 => True, -- Else_Statements (List4)
9957 5 => True), -- End_Span (Uint5)
9958
9959 N_Elsif_Part =>
9960 (1 => True, -- Condition (Node1)
9961 2 => True, -- Then_Statements (List2)
9962 3 => False, -- Condition_Actions (List3-Sem)
9963 4 => False, -- unused
9964 5 => False), -- unused
9965
9966 N_Case_Statement =>
9967 (1 => False, -- unused
9968 2 => False, -- unused
9969 3 => True, -- Expression (Node3)
9970 4 => True, -- Alternatives (List4)
9971 5 => True), -- End_Span (Uint5)
9972
9973 N_Case_Statement_Alternative =>
9974 (1 => False, -- unused
9975 2 => False, -- unused
9976 3 => True, -- Statements (List3)
9977 4 => True, -- Discrete_Choices (List4)
9978 5 => False), -- unused
9979
9980 N_Loop_Statement =>
9981 (1 => True, -- Identifier (Node1)
9982 2 => True, -- Iteration_Scheme (Node2)
9983 3 => True, -- Statements (List3)
9984 4 => True, -- End_Label (Node4)
9985 5 => False), -- unused
9986
9987 N_Iteration_Scheme =>
9988 (1 => True, -- Condition (Node1)
9989 2 => False, -- unused
9990 3 => False, -- Condition_Actions (List3-Sem)
9991 4 => True, -- Loop_Parameter_Specification (Node4)
9992 5 => False), -- unused
9993
9994 N_Loop_Parameter_Specification =>
9995 (1 => True, -- Defining_Identifier (Node1)
9996 2 => False, -- unused
9997 3 => False, -- unused
9998 4 => True, -- Discrete_Subtype_Definition (Node4)
9999 5 => False), -- unused
10000
10001 N_Block_Statement =>
10002 (1 => True, -- Identifier (Node1)
10003 2 => True, -- Declarations (List2)
10004 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10005 4 => True, -- Handled_Statement_Sequence (Node4)
10006 5 => False), -- unused
10007
10008 N_Exit_Statement =>
10009 (1 => True, -- Condition (Node1)
10010 2 => True, -- Name (Node2)
10011 3 => False, -- unused
10012 4 => False, -- unused
10013 5 => False), -- unused
10014
10015 N_Goto_Statement =>
10016 (1 => False, -- unused
10017 2 => True, -- Name (Node2)
10018 3 => False, -- unused
10019 4 => False, -- unused
10020 5 => False), -- unused
10021
10022 N_Subprogram_Declaration =>
10023 (1 => True, -- Specification (Node1)
10024 2 => False, -- unused
10025 3 => False, -- Body_To_Inline (Node3-Sem)
10026 4 => False, -- Parent_Spec (Node4-Sem)
10027 5 => False), -- Corresponding_Body (Node5-Sem)
10028
10029 N_Abstract_Subprogram_Declaration =>
10030 (1 => True, -- Specification (Node1)
10031 2 => False, -- unused
10032 3 => False, -- unused
10033 4 => False, -- unused
10034 5 => False), -- unused
10035
10036 N_Function_Specification =>
10037 (1 => True, -- Defining_Unit_Name (Node1)
10038 2 => False, -- Elaboration_Boolean (Node2-Sem)
10039 3 => True, -- Parameter_Specifications (List3)
10040 4 => True, -- Result_Definition (Node4)
10041 5 => False), -- Generic_Parent (Node5-Sem)
10042
10043 N_Procedure_Specification =>
10044 (1 => True, -- Defining_Unit_Name (Node1)
10045 2 => False, -- Elaboration_Boolean (Node2-Sem)
10046 3 => True, -- Parameter_Specifications (List3)
10047 4 => False, -- unused
10048 5 => False), -- Generic_Parent (Node5-Sem)
10049
10050 N_Designator =>
10051 (1 => True, -- Identifier (Node1)
10052 2 => True, -- Name (Node2)
10053 3 => False, -- unused
10054 4 => False, -- unused
10055 5 => False), -- unused
10056
10057 N_Defining_Program_Unit_Name =>
10058 (1 => True, -- Defining_Identifier (Node1)
10059 2 => True, -- Name (Node2)
10060 3 => False, -- unused
10061 4 => False, -- unused
10062 5 => False), -- unused
10063
10064 N_Operator_Symbol =>
10065 (1 => True, -- Chars (Name1)
10066 2 => False, -- unused
10067 3 => True, -- Strval (Str3)
10068 4 => False, -- Entity (Node4-Sem)
10069 5 => False), -- Etype (Node5-Sem)
10070
10071 N_Defining_Operator_Symbol =>
10072 (1 => True, -- Chars (Name1)
10073 2 => False, -- Next_Entity (Node2-Sem)
10074 3 => False, -- Scope (Node3-Sem)
10075 4 => False, -- unused
10076 5 => False), -- Etype (Node5-Sem)
10077
10078 N_Parameter_Specification =>
10079 (1 => True, -- Defining_Identifier (Node1)
10080 2 => True, -- Parameter_Type (Node2)
10081 3 => True, -- Expression (Node3)
10082 4 => False, -- unused
10083 5 => False), -- Default_Expression (Node5-Sem)
10084
10085 N_Subprogram_Body =>
10086 (1 => True, -- Specification (Node1)
10087 2 => True, -- Declarations (List2)
10088 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10089 4 => True, -- Handled_Statement_Sequence (Node4)
10090 5 => False), -- Corresponding_Spec (Node5-Sem)
10091
10092 N_Procedure_Call_Statement =>
10093 (1 => False, -- Controlling_Argument (Node1-Sem)
10094 2 => True, -- Name (Node2)
10095 3 => True, -- Parameter_Associations (List3)
10096 4 => False, -- First_Named_Actual (Node4-Sem)
10097 5 => False), -- Etype (Node5-Sem)
10098
10099 N_Function_Call =>
10100 (1 => False, -- Controlling_Argument (Node1-Sem)
10101 2 => True, -- Name (Node2)
10102 3 => True, -- Parameter_Associations (List3)
10103 4 => False, -- First_Named_Actual (Node4-Sem)
10104 5 => False), -- Etype (Node5-Sem)
10105
10106 N_Parameter_Association =>
10107 (1 => False, -- unused
10108 2 => True, -- Selector_Name (Node2)
10109 3 => True, -- Explicit_Actual_Parameter (Node3)
10110 4 => False, -- Next_Named_Actual (Node4-Sem)
10111 5 => False), -- unused
10112
10113 N_Return_Statement =>
10114 (1 => False, -- Storage_Pool (Node1-Sem)
10115 2 => False, -- Procedure_To_Call (Node2-Sem)
10116 3 => True, -- Expression (Node3)
10117 4 => False, -- unused
10118 5 => False), -- Return_Statement_Entity (Node5-Sem)
10119
10120 N_Extended_Return_Statement =>
10121 (1 => False, -- Storage_Pool (Node1-Sem)
10122 2 => False, -- Procedure_To_Call (Node2-Sem)
10123 3 => True, -- Return_Object_Declarations (List3)
10124 4 => True, -- Handled_Statement_Sequence (Node4)
10125 5 => False), -- Return_Statement_Entity (Node5-Sem)
10126
10127 N_Package_Declaration =>
10128 (1 => True, -- Specification (Node1)
10129 2 => False, -- unused
10130 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10131 4 => False, -- Parent_Spec (Node4-Sem)
10132 5 => False), -- Corresponding_Body (Node5-Sem)
10133
10134 N_Package_Specification =>
10135 (1 => True, -- Defining_Unit_Name (Node1)
10136 2 => True, -- Visible_Declarations (List2)
10137 3 => True, -- Private_Declarations (List3)
10138 4 => True, -- End_Label (Node4)
10139 5 => False), -- Generic_Parent (Node5-Sem)
10140
10141 N_Package_Body =>
10142 (1 => True, -- Defining_Unit_Name (Node1)
10143 2 => True, -- Declarations (List2)
10144 3 => False, -- unused
10145 4 => True, -- Handled_Statement_Sequence (Node4)
10146 5 => False), -- Corresponding_Spec (Node5-Sem)
10147
10148 N_Private_Type_Declaration =>
10149 (1 => True, -- Defining_Identifier (Node1)
10150 2 => False, -- unused
10151 3 => False, -- unused
10152 4 => True, -- Discriminant_Specifications (List4)
10153 5 => False), -- unused
10154
10155 N_Private_Extension_Declaration =>
10156 (1 => True, -- Defining_Identifier (Node1)
10157 2 => True, -- Interface_List (List2)
10158 3 => False, -- unused
10159 4 => True, -- Discriminant_Specifications (List4)
10160 5 => True), -- Subtype_Indication (Node5)
10161
10162 N_Use_Package_Clause =>
10163 (1 => False, -- unused
10164 2 => True, -- Names (List2)
10165 3 => False, -- Next_Use_Clause (Node3-Sem)
10166 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10167 5 => False), -- unused
10168
10169 N_Use_Type_Clause =>
10170 (1 => False, -- unused
10171 2 => True, -- Subtype_Marks (List2)
10172 3 => False, -- Next_Use_Clause (Node3-Sem)
10173 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10174 5 => False), -- unused
10175
10176 N_Object_Renaming_Declaration =>
10177 (1 => True, -- Defining_Identifier (Node1)
10178 2 => True, -- Name (Node2)
10179 3 => True, -- Access_Definition (Node3)
10180 4 => True, -- Subtype_Mark (Node4)
10181 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
10182
10183 N_Exception_Renaming_Declaration =>
10184 (1 => True, -- Defining_Identifier (Node1)
10185 2 => True, -- Name (Node2)
10186 3 => False, -- unused
10187 4 => False, -- unused
10188 5 => False), -- unused
10189
10190 N_Package_Renaming_Declaration =>
10191 (1 => True, -- Defining_Unit_Name (Node1)
10192 2 => True, -- Name (Node2)
10193 3 => False, -- unused
10194 4 => False, -- Parent_Spec (Node4-Sem)
10195 5 => False), -- unused
10196
10197 N_Subprogram_Renaming_Declaration =>
10198 (1 => True, -- Specification (Node1)
10199 2 => True, -- Name (Node2)
10200 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
10201 4 => False, -- Parent_Spec (Node4-Sem)
10202 5 => False), -- Corresponding_Spec (Node5-Sem)
10203
10204 N_Generic_Package_Renaming_Declaration =>
10205 (1 => True, -- Defining_Unit_Name (Node1)
10206 2 => True, -- Name (Node2)
10207 3 => False, -- unused
10208 4 => False, -- Parent_Spec (Node4-Sem)
10209 5 => False), -- unused
10210
10211 N_Generic_Procedure_Renaming_Declaration =>
10212 (1 => True, -- Defining_Unit_Name (Node1)
10213 2 => True, -- Name (Node2)
10214 3 => False, -- unused
10215 4 => False, -- Parent_Spec (Node4-Sem)
10216 5 => False), -- unused
10217
10218 N_Generic_Function_Renaming_Declaration =>
10219 (1 => True, -- Defining_Unit_Name (Node1)
10220 2 => True, -- Name (Node2)
10221 3 => False, -- unused
10222 4 => False, -- Parent_Spec (Node4-Sem)
10223 5 => False), -- unused
10224
10225 N_Task_Type_Declaration =>
10226 (1 => True, -- Defining_Identifier (Node1)
10227 2 => True, -- Interface_List (List2)
10228 3 => True, -- Task_Definition (Node3)
10229 4 => True, -- Discriminant_Specifications (List4)
10230 5 => False), -- Corresponding_Body (Node5-Sem)
10231
10232 N_Single_Task_Declaration =>
10233 (1 => True, -- Defining_Identifier (Node1)
10234 2 => True, -- Interface_List (List2)
10235 3 => True, -- Task_Definition (Node3)
10236 4 => False, -- unused
10237 5 => False), -- unused
10238
10239 N_Task_Definition =>
10240 (1 => False, -- unused
10241 2 => True, -- Visible_Declarations (List2)
10242 3 => True, -- Private_Declarations (List3)
10243 4 => True, -- End_Label (Node4)
10244 5 => False), -- unused
10245
10246 N_Task_Body =>
10247 (1 => True, -- Defining_Identifier (Node1)
10248 2 => True, -- Declarations (List2)
10249 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10250 4 => True, -- Handled_Statement_Sequence (Node4)
10251 5 => False), -- Corresponding_Spec (Node5-Sem)
10252
10253 N_Protected_Type_Declaration =>
10254 (1 => True, -- Defining_Identifier (Node1)
10255 2 => True, -- Interface_List (List2)
10256 3 => True, -- Protected_Definition (Node3)
10257 4 => True, -- Discriminant_Specifications (List4)
10258 5 => False), -- Corresponding_Body (Node5-Sem)
10259
10260 N_Single_Protected_Declaration =>
10261 (1 => True, -- Defining_Identifier (Node1)
10262 2 => True, -- Interface_List (List2)
10263 3 => True, -- Protected_Definition (Node3)
10264 4 => False, -- unused
10265 5 => False), -- unused
10266
10267 N_Protected_Definition =>
10268 (1 => False, -- unused
10269 2 => True, -- Visible_Declarations (List2)
10270 3 => True, -- Private_Declarations (List3)
10271 4 => True, -- End_Label (Node4)
10272 5 => False), -- unused
10273
10274 N_Protected_Body =>
10275 (1 => True, -- Defining_Identifier (Node1)
10276 2 => True, -- Declarations (List2)
10277 3 => False, -- unused
10278 4 => True, -- End_Label (Node4)
10279 5 => False), -- Corresponding_Spec (Node5-Sem)
10280
10281 N_Entry_Declaration =>
10282 (1 => True, -- Defining_Identifier (Node1)
10283 2 => False, -- unused
10284 3 => True, -- Parameter_Specifications (List3)
10285 4 => True, -- Discrete_Subtype_Definition (Node4)
10286 5 => False), -- Corresponding_Body (Node5-Sem)
10287
10288 N_Accept_Statement =>
10289 (1 => True, -- Entry_Direct_Name (Node1)
10290 2 => True, -- Declarations (List2)
10291 3 => True, -- Parameter_Specifications (List3)
10292 4 => True, -- Handled_Statement_Sequence (Node4)
10293 5 => True), -- Entry_Index (Node5)
10294
10295 N_Entry_Body =>
10296 (1 => True, -- Defining_Identifier (Node1)
10297 2 => True, -- Declarations (List2)
10298 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10299 4 => True, -- Handled_Statement_Sequence (Node4)
10300 5 => True), -- Entry_Body_Formal_Part (Node5)
10301
10302 N_Entry_Body_Formal_Part =>
10303 (1 => True, -- Condition (Node1)
10304 2 => False, -- unused
10305 3 => True, -- Parameter_Specifications (List3)
10306 4 => True, -- Entry_Index_Specification (Node4)
10307 5 => False), -- unused
10308
10309 N_Entry_Index_Specification =>
10310 (1 => True, -- Defining_Identifier (Node1)
10311 2 => False, -- unused
10312 3 => False, -- unused
10313 4 => True, -- Discrete_Subtype_Definition (Node4)
10314 5 => False), -- unused
10315
10316 N_Entry_Call_Statement =>
10317 (1 => False, -- unused
10318 2 => True, -- Name (Node2)
10319 3 => True, -- Parameter_Associations (List3)
10320 4 => False, -- First_Named_Actual (Node4-Sem)
10321 5 => False), -- unused
10322
10323 N_Requeue_Statement =>
10324 (1 => False, -- unused
10325 2 => True, -- Name (Node2)
10326 3 => False, -- unused
10327 4 => False, -- unused
10328 5 => False), -- unused
10329
10330 N_Delay_Until_Statement =>
10331 (1 => False, -- unused
10332 2 => False, -- unused
10333 3 => True, -- Expression (Node3)
10334 4 => False, -- unused
10335 5 => False), -- unused
10336
10337 N_Delay_Relative_Statement =>
10338 (1 => False, -- unused
10339 2 => False, -- unused
10340 3 => True, -- Expression (Node3)
10341 4 => False, -- unused
10342 5 => False), -- unused
10343
10344 N_Selective_Accept =>
10345 (1 => True, -- Select_Alternatives (List1)
10346 2 => False, -- unused
10347 3 => False, -- unused
10348 4 => True, -- Else_Statements (List4)
10349 5 => False), -- unused
10350
10351 N_Accept_Alternative =>
10352 (1 => True, -- Condition (Node1)
10353 2 => True, -- Accept_Statement (Node2)
10354 3 => True, -- Statements (List3)
10355 4 => True, -- Pragmas_Before (List4)
10356 5 => False), -- Accept_Handler_Records (List5-Sem)
10357
10358 N_Delay_Alternative =>
10359 (1 => True, -- Condition (Node1)
10360 2 => True, -- Delay_Statement (Node2)
10361 3 => True, -- Statements (List3)
10362 4 => True, -- Pragmas_Before (List4)
10363 5 => False), -- unused
10364
10365 N_Terminate_Alternative =>
10366 (1 => True, -- Condition (Node1)
10367 2 => False, -- unused
10368 3 => False, -- unused
10369 4 => True, -- Pragmas_Before (List4)
10370 5 => True), -- Pragmas_After (List5)
10371
10372 N_Timed_Entry_Call =>
10373 (1 => True, -- Entry_Call_Alternative (Node1)
10374 2 => False, -- unused
10375 3 => False, -- unused
10376 4 => True, -- Delay_Alternative (Node4)
10377 5 => False), -- unused
10378
10379 N_Entry_Call_Alternative =>
10380 (1 => True, -- Entry_Call_Statement (Node1)
10381 2 => False, -- unused
10382 3 => True, -- Statements (List3)
10383 4 => True, -- Pragmas_Before (List4)
10384 5 => False), -- unused
10385
10386 N_Conditional_Entry_Call =>
10387 (1 => True, -- Entry_Call_Alternative (Node1)
10388 2 => False, -- unused
10389 3 => False, -- unused
10390 4 => True, -- Else_Statements (List4)
10391 5 => False), -- unused
10392
10393 N_Asynchronous_Select =>
10394 (1 => True, -- Triggering_Alternative (Node1)
10395 2 => True, -- Abortable_Part (Node2)
10396 3 => False, -- unused
10397 4 => False, -- unused
10398 5 => False), -- unused
10399
10400 N_Triggering_Alternative =>
10401 (1 => True, -- Triggering_Statement (Node1)
10402 2 => False, -- unused
10403 3 => True, -- Statements (List3)
10404 4 => True, -- Pragmas_Before (List4)
10405 5 => False), -- unused
10406
10407 N_Abortable_Part =>
10408 (1 => False, -- unused
10409 2 => False, -- unused
10410 3 => True, -- Statements (List3)
10411 4 => False, -- unused
10412 5 => False), -- unused
10413
10414 N_Abort_Statement =>
10415 (1 => False, -- unused
10416 2 => True, -- Names (List2)
10417 3 => False, -- unused
10418 4 => False, -- unused
10419 5 => False), -- unused
10420
10421 N_Compilation_Unit =>
10422 (1 => True, -- Context_Items (List1)
10423 2 => True, -- Unit (Node2)
10424 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
10425 4 => False, -- Library_Unit (Node4-Sem)
10426 5 => True), -- Aux_Decls_Node (Node5)
10427
10428 N_Compilation_Unit_Aux =>
10429 (1 => True, -- Actions (List1)
10430 2 => True, -- Declarations (List2)
10431 3 => False, -- unused
10432 4 => True, -- Config_Pragmas (List4)
10433 5 => True), -- Pragmas_After (List5)
10434
10435 N_With_Clause =>
10436 (1 => False, -- unused
10437 2 => True, -- Name (Node2)
10438 3 => False, -- unused
10439 4 => False, -- Library_Unit (Node4-Sem)
10440 5 => False), -- Corresponding_Spec (Node5-Sem)
10441
10442 N_Subprogram_Body_Stub =>
10443 (1 => True, -- Specification (Node1)
10444 2 => False, -- unused
10445 3 => False, -- unused
10446 4 => False, -- Library_Unit (Node4-Sem)
10447 5 => False), -- Corresponding_Body (Node5-Sem)
10448
10449 N_Package_Body_Stub =>
10450 (1 => True, -- Defining_Identifier (Node1)
10451 2 => False, -- unused
10452 3 => False, -- unused
10453 4 => False, -- Library_Unit (Node4-Sem)
10454 5 => False), -- Corresponding_Body (Node5-Sem)
10455
10456 N_Task_Body_Stub =>
10457 (1 => True, -- Defining_Identifier (Node1)
10458 2 => False, -- unused
10459 3 => False, -- unused
10460 4 => False, -- Library_Unit (Node4-Sem)
10461 5 => False), -- Corresponding_Body (Node5-Sem)
10462
10463 N_Protected_Body_Stub =>
10464 (1 => True, -- Defining_Identifier (Node1)
10465 2 => False, -- unused
10466 3 => False, -- unused
10467 4 => False, -- Library_Unit (Node4-Sem)
10468 5 => False), -- Corresponding_Body (Node5-Sem)
10469
10470 N_Subunit =>
10471 (1 => True, -- Proper_Body (Node1)
10472 2 => True, -- Name (Node2)
10473 3 => False, -- Corresponding_Stub (Node3-Sem)
10474 4 => False, -- unused
10475 5 => False), -- unused
10476
10477 N_Exception_Declaration =>
10478 (1 => True, -- Defining_Identifier (Node1)
10479 2 => False, -- unused
10480 3 => False, -- Expression (Node3-Sem)
10481 4 => False, -- unused
10482 5 => False), -- unused
10483
10484 N_Handled_Sequence_Of_Statements =>
10485 (1 => True, -- At_End_Proc (Node1)
10486 2 => False, -- First_Real_Statement (Node2-Sem)
10487 3 => True, -- Statements (List3)
10488 4 => True, -- End_Label (Node4)
10489 5 => True), -- Exception_Handlers (List5)
10490
10491 N_Exception_Handler =>
10492 (1 => False, -- Local_Raise_Statements (Elist1)
10493 2 => True, -- Choice_Parameter (Node2)
10494 3 => True, -- Statements (List3)
10495 4 => True, -- Exception_Choices (List4)
10496 5 => False), -- Exception_Label (Node5)
10497
10498 N_Raise_Statement =>
10499 (1 => False, -- unused
10500 2 => True, -- Name (Node2)
10501 3 => True, -- Expression (Node3)
10502 4 => False, -- unused
10503 5 => False), -- unused
10504
10505 N_Generic_Subprogram_Declaration =>
10506 (1 => True, -- Specification (Node1)
10507 2 => True, -- Generic_Formal_Declarations (List2)
10508 3 => False, -- unused
10509 4 => False, -- Parent_Spec (Node4-Sem)
10510 5 => False), -- Corresponding_Body (Node5-Sem)
10511
10512 N_Generic_Package_Declaration =>
10513 (1 => True, -- Specification (Node1)
10514 2 => True, -- Generic_Formal_Declarations (List2)
10515 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10516 4 => False, -- Parent_Spec (Node4-Sem)
10517 5 => False), -- Corresponding_Body (Node5-Sem)
10518
10519 N_Package_Instantiation =>
10520 (1 => True, -- Defining_Unit_Name (Node1)
10521 2 => True, -- Name (Node2)
10522 3 => True, -- Generic_Associations (List3)
10523 4 => False, -- Parent_Spec (Node4-Sem)
10524 5 => False), -- Instance_Spec (Node5-Sem)
10525
10526 N_Procedure_Instantiation =>
10527 (1 => True, -- Defining_Unit_Name (Node1)
10528 2 => True, -- Name (Node2)
10529 3 => True, -- Generic_Associations (List3)
10530 4 => False, -- Parent_Spec (Node4-Sem)
10531 5 => False), -- Instance_Spec (Node5-Sem)
10532
10533 N_Function_Instantiation =>
10534 (1 => True, -- Defining_Unit_Name (Node1)
10535 2 => True, -- Name (Node2)
10536 3 => True, -- Generic_Associations (List3)
10537 4 => False, -- Parent_Spec (Node4-Sem)
10538 5 => False), -- Instance_Spec (Node5-Sem)
10539
10540 N_Generic_Association =>
10541 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
10542 2 => True, -- Selector_Name (Node2)
10543 3 => False, -- unused
10544 4 => False, -- unused
10545 5 => False), -- unused
10546
10547 N_Formal_Object_Declaration =>
10548 (1 => True, -- Defining_Identifier (Node1)
10549 2 => False, -- unused
10550 3 => True, -- Access_Definition (Node3)
10551 4 => True, -- Subtype_Mark (Node4)
10552 5 => True), -- Default_Expression (Node5)
10553
10554 N_Formal_Type_Declaration =>
10555 (1 => True, -- Defining_Identifier (Node1)
10556 2 => False, -- unused
10557 3 => True, -- Formal_Type_Definition (Node3)
10558 4 => True, -- Discriminant_Specifications (List4)
10559 5 => False), -- unused
10560
10561 N_Formal_Private_Type_Definition =>
10562 (1 => False, -- unused
10563 2 => False, -- unused
10564 3 => False, -- unused
10565 4 => False, -- unused
10566 5 => False), -- unused
10567
10568 N_Formal_Derived_Type_Definition =>
10569 (1 => False, -- unused
10570 2 => True, -- Interface_List (List2)
10571 3 => False, -- unused
10572 4 => True, -- Subtype_Mark (Node4)
10573 5 => False), -- unused
10574
10575 N_Formal_Discrete_Type_Definition =>
10576 (1 => False, -- unused
10577 2 => False, -- unused
10578 3 => False, -- unused
10579 4 => False, -- unused
10580 5 => False), -- unused
10581
10582 N_Formal_Signed_Integer_Type_Definition =>
10583 (1 => False, -- unused
10584 2 => False, -- unused
10585 3 => False, -- unused
10586 4 => False, -- unused
10587 5 => False), -- unused
10588
10589 N_Formal_Modular_Type_Definition =>
10590 (1 => False, -- unused
10591 2 => False, -- unused
10592 3 => False, -- unused
10593 4 => False, -- unused
10594 5 => False), -- unused
10595
10596 N_Formal_Floating_Point_Definition =>
10597 (1 => False, -- unused
10598 2 => False, -- unused
10599 3 => False, -- unused
10600 4 => False, -- unused
10601 5 => False), -- unused
10602
10603 N_Formal_Ordinary_Fixed_Point_Definition =>
10604 (1 => False, -- unused
10605 2 => False, -- unused
10606 3 => False, -- unused
10607 4 => False, -- unused
10608 5 => False), -- unused
10609
10610 N_Formal_Decimal_Fixed_Point_Definition =>
10611 (1 => False, -- unused
10612 2 => False, -- unused
10613 3 => False, -- unused
10614 4 => False, -- unused
10615 5 => False), -- unused
10616
10617 N_Formal_Concrete_Subprogram_Declaration =>
10618 (1 => True, -- Specification (Node1)
10619 2 => True, -- Default_Name (Node2)
10620 3 => False, -- unused
10621 4 => False, -- unused
10622 5 => False), -- unused
10623
10624 N_Formal_Abstract_Subprogram_Declaration =>
10625 (1 => True, -- Specification (Node1)
10626 2 => True, -- Default_Name (Node2)
10627 3 => False, -- unused
10628 4 => False, -- unused
10629 5 => False), -- unused
10630
10631 N_Formal_Package_Declaration =>
10632 (1 => True, -- Defining_Identifier (Node1)
10633 2 => True, -- Name (Node2)
10634 3 => True, -- Generic_Associations (List3)
10635 4 => False, -- unused
10636 5 => False), -- Instance_Spec (Node5-Sem)
10637
10638 N_Attribute_Definition_Clause =>
10639 (1 => True, -- Chars (Name1)
10640 2 => True, -- Name (Node2)
10641 3 => True, -- Expression (Node3)
10642 4 => False, -- unused
10643 5 => False), -- Next_Rep_Item (Node5-Sem)
10644
10645 N_Enumeration_Representation_Clause =>
10646 (1 => True, -- Identifier (Node1)
10647 2 => False, -- unused
10648 3 => True, -- Array_Aggregate (Node3)
10649 4 => False, -- unused
10650 5 => False), -- Next_Rep_Item (Node5-Sem)
10651
10652 N_Record_Representation_Clause =>
10653 (1 => True, -- Identifier (Node1)
10654 2 => True, -- Mod_Clause (Node2)
10655 3 => True, -- Component_Clauses (List3)
10656 4 => False, -- unused
10657 5 => False), -- Next_Rep_Item (Node5-Sem)
10658
10659 N_Component_Clause =>
10660 (1 => True, -- Component_Name (Node1)
10661 2 => True, -- Position (Node2)
10662 3 => True, -- First_Bit (Node3)
10663 4 => True, -- Last_Bit (Node4)
10664 5 => False), -- unused
10665
10666 N_Code_Statement =>
10667 (1 => False, -- unused
10668 2 => False, -- unused
10669 3 => True, -- Expression (Node3)
10670 4 => False, -- unused
10671 5 => False), -- unused
10672
10673 N_Op_Rotate_Left =>
10674 (1 => True, -- Chars (Name1)
10675 2 => True, -- Left_Opnd (Node2)
10676 3 => True, -- Right_Opnd (Node3)
10677 4 => False, -- Entity (Node4-Sem)
10678 5 => False), -- Etype (Node5-Sem)
10679
10680 N_Op_Rotate_Right =>
10681 (1 => True, -- Chars (Name1)
10682 2 => True, -- Left_Opnd (Node2)
10683 3 => True, -- Right_Opnd (Node3)
10684 4 => False, -- Entity (Node4-Sem)
10685 5 => False), -- Etype (Node5-Sem)
10686
10687 N_Op_Shift_Left =>
10688 (1 => True, -- Chars (Name1)
10689 2 => True, -- Left_Opnd (Node2)
10690 3 => True, -- Right_Opnd (Node3)
10691 4 => False, -- Entity (Node4-Sem)
10692 5 => False), -- Etype (Node5-Sem)
10693
10694 N_Op_Shift_Right_Arithmetic =>
10695 (1 => True, -- Chars (Name1)
10696 2 => True, -- Left_Opnd (Node2)
10697 3 => True, -- Right_Opnd (Node3)
10698 4 => False, -- Entity (Node4-Sem)
10699 5 => False), -- Etype (Node5-Sem)
10700
10701 N_Op_Shift_Right =>
10702 (1 => True, -- Chars (Name1)
10703 2 => True, -- Left_Opnd (Node2)
10704 3 => True, -- Right_Opnd (Node3)
10705 4 => False, -- Entity (Node4-Sem)
10706 5 => False), -- Etype (Node5-Sem)
10707
10708 N_Delta_Constraint =>
10709 (1 => False, -- unused
10710 2 => False, -- unused
10711 3 => True, -- Delta_Expression (Node3)
10712 4 => True, -- Range_Constraint (Node4)
10713 5 => False), -- unused
10714
10715 N_At_Clause =>
10716 (1 => True, -- Identifier (Node1)
10717 2 => False, -- unused
10718 3 => True, -- Expression (Node3)
10719 4 => False, -- unused
10720 5 => False), -- unused
10721
10722 N_Mod_Clause =>
10723 (1 => False, -- unused
10724 2 => False, -- unused
10725 3 => True, -- Expression (Node3)
10726 4 => True, -- Pragmas_Before (List4)
10727 5 => False), -- unused
10728
10729 N_Conditional_Expression =>
10730 (1 => True, -- Expressions (List1)
10731 2 => False, -- Then_Actions (List2-Sem)
10732 3 => False, -- Else_Actions (List3-Sem)
10733 4 => False, -- unused
10734 5 => False), -- Etype (Node5-Sem)
10735
10736 N_Expanded_Name =>
10737 (1 => True, -- Chars (Name1)
10738 2 => True, -- Selector_Name (Node2)
10739 3 => True, -- Prefix (Node3)
10740 4 => False, -- Entity (Node4-Sem)
10741 5 => False), -- Etype (Node5-Sem)
10742
10743 N_Free_Statement =>
10744 (1 => False, -- Storage_Pool (Node1-Sem)
10745 2 => False, -- Procedure_To_Call (Node2-Sem)
10746 3 => True, -- Expression (Node3)
10747 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
10748 5 => False), -- unused
10749
10750 N_Freeze_Entity =>
10751 (1 => True, -- Actions (List1)
10752 2 => False, -- Access_Types_To_Process (Elist2-Sem)
10753 3 => False, -- TSS_Elist (Elist3-Sem)
10754 4 => False, -- Entity (Node4-Sem)
10755 5 => False), -- First_Subtype_Link (Node5-Sem)
10756
10757 N_Implicit_Label_Declaration =>
10758 (1 => True, -- Defining_Identifier (Node1)
10759 2 => False, -- Label_Construct (Node2-Sem)
10760 3 => False, -- unused
10761 4 => False, -- unused
10762 5 => False), -- unused
10763
10764 N_Itype_Reference =>
10765 (1 => False, -- Itype (Node1-Sem)
10766 2 => False, -- unused
10767 3 => False, -- unused
10768 4 => False, -- unused
10769 5 => False), -- unused
10770
10771 N_Raise_Constraint_Error =>
10772 (1 => True, -- Condition (Node1)
10773 2 => False, -- unused
10774 3 => True, -- Reason (Uint3)
10775 4 => False, -- unused
10776 5 => False), -- Etype (Node5-Sem)
10777
10778 N_Raise_Program_Error =>
10779 (1 => True, -- Condition (Node1)
10780 2 => False, -- unused
10781 3 => True, -- Reason (Uint3)
10782 4 => False, -- unused
10783 5 => False), -- Etype (Node5-Sem)
10784
10785 N_Raise_Storage_Error =>
10786 (1 => True, -- Condition (Node1)
10787 2 => False, -- unused
10788 3 => True, -- Reason (Uint3)
10789 4 => False, -- unused
10790 5 => False), -- Etype (Node5-Sem)
10791
10792 N_Push_Constraint_Error_Label =>
10793 (1 => False, -- unused
10794 2 => False, -- unused
10795 3 => False, -- unused
10796 4 => False, -- unused
10797 5 => False), -- unused
10798
10799 N_Push_Program_Error_Label =>
10800 (1 => False, -- Exception_Label
10801 2 => False, -- unused
10802 3 => False, -- unused
10803 4 => False, -- unused
10804 5 => False), -- Exception_Label
10805
10806 N_Push_Storage_Error_Label =>
10807 (1 => False, -- Exception_Label
10808 2 => False, -- unused
10809 3 => False, -- unused
10810 4 => False, -- unused
10811 5 => False), -- Exception_Label
10812
10813 N_Pop_Constraint_Error_Label =>
10814 (1 => False, -- unused
10815 2 => False, -- unused
10816 3 => False, -- unused
10817 4 => False, -- unused
10818 5 => False), -- unused
10819
10820 N_Pop_Program_Error_Label =>
10821 (1 => False, -- unused
10822 2 => False, -- unused
10823 3 => False, -- unused
10824 4 => False, -- unused
10825 5 => False), -- unused
10826
10827 N_Pop_Storage_Error_Label =>
10828 (1 => False, -- unused
10829 2 => False, -- unused
10830 3 => False, -- unused
10831 4 => False, -- unused
10832 5 => False), -- unused
10833
10834 N_Reference =>
10835 (1 => False, -- unused
10836 2 => False, -- unused
10837 3 => True, -- Prefix (Node3)
10838 4 => False, -- unused
10839 5 => False), -- Etype (Node5-Sem)
10840
10841 N_Subprogram_Info =>
10842 (1 => True, -- Identifier (Node1)
10843 2 => False, -- unused
10844 3 => False, -- unused
10845 4 => False, -- unused
10846 5 => False), -- Etype (Node5-Sem)
10847
10848 N_Unchecked_Expression =>
10849 (1 => False, -- unused
10850 2 => False, -- unused
10851 3 => True, -- Expression (Node3)
10852 4 => False, -- unused
10853 5 => False), -- Etype (Node5-Sem)
10854
10855 N_Unchecked_Type_Conversion =>
10856 (1 => False, -- unused
10857 2 => False, -- unused
10858 3 => True, -- Expression (Node3)
10859 4 => True, -- Subtype_Mark (Node4)
10860 5 => False), -- Etype (Node5-Sem)
10861
10862 N_Validate_Unchecked_Conversion =>
10863 (1 => False, -- Source_Type (Node1-Sem)
10864 2 => False, -- Target_Type (Node2-Sem)
10865 3 => False, -- unused
10866 4 => False, -- unused
10867 5 => False), -- unused
10868
10869 -- End of inserted output from makeisf program
10870
10871 -- Entries for Empty, Error and Unused. Even thought these have a Chars
10872 -- field for debugging purposes, they are not really syntactic fields, so
10873 -- we mark all fields as unused.
10874
10875 N_Empty =>
10876 (1 => False, -- unused
10877 2 => False, -- unused
10878 3 => False, -- unused
10879 4 => False, -- unused
10880 5 => False), -- unused
10881
10882 N_Error =>
10883 (1 => False, -- unused
10884 2 => False, -- unused
10885 3 => False, -- unused
10886 4 => False, -- unused
10887 5 => False), -- unused
10888
10889 N_Unused_At_Start =>
10890 (1 => False, -- unused
10891 2 => False, -- unused
10892 3 => False, -- unused
10893 4 => False, -- unused
10894 5 => False), -- unused
10895
10896 N_Unused_At_End =>
10897 (1 => False, -- unused
10898 2 => False, -- unused
10899 3 => False, -- unused
10900 4 => False, -- unused
10901 5 => False)); -- unused
10902
10903 --------------------
10904 -- Inline Pragmas --
10905 --------------------
10906
10907 pragma Inline (ABE_Is_Certain);
10908 pragma Inline (Abort_Present);
10909 pragma Inline (Abortable_Part);
10910 pragma Inline (Abstract_Present);
10911 pragma Inline (Accept_Handler_Records);
10912 pragma Inline (Accept_Statement);
10913 pragma Inline (Access_Definition);
10914 pragma Inline (Access_To_Subprogram_Definition);
10915 pragma Inline (Access_Types_To_Process);
10916 pragma Inline (Actions);
10917 pragma Inline (Activation_Chain_Entity);
10918 pragma Inline (Acts_As_Spec);
10919 pragma Inline (Actual_Designated_Subtype);
10920 pragma Inline (Address_Warning_Posted);
10921 pragma Inline (Aggregate_Bounds);
10922 pragma Inline (Aliased_Present);
10923 pragma Inline (All_Others);
10924 pragma Inline (All_Present);
10925 pragma Inline (Alternatives);
10926 pragma Inline (Ancestor_Part);
10927 pragma Inline (Array_Aggregate);
10928 pragma Inline (Assignment_OK);
10929 pragma Inline (Associated_Node);
10930 pragma Inline (At_End_Proc);
10931 pragma Inline (Attribute_Name);
10932 pragma Inline (Aux_Decls_Node);
10933 pragma Inline (Backwards_OK);
10934 pragma Inline (Bad_Is_Detected);
10935 pragma Inline (Body_To_Inline);
10936 pragma Inline (Body_Required);
10937 pragma Inline (By_Ref);
10938 pragma Inline (Box_Present);
10939 pragma Inline (Char_Literal_Value);
10940 pragma Inline (Chars);
10941 pragma Inline (Check_Address_Alignment);
10942 pragma Inline (Choice_Parameter);
10943 pragma Inline (Choices);
10944 pragma Inline (Coextensions);
10945 pragma Inline (Comes_From_Extended_Return_Statement);
10946 pragma Inline (Compile_Time_Known_Aggregate);
10947 pragma Inline (Component_Associations);
10948 pragma Inline (Component_Clauses);
10949 pragma Inline (Component_Definition);
10950 pragma Inline (Component_Items);
10951 pragma Inline (Component_List);
10952 pragma Inline (Component_Name);
10953 pragma Inline (Condition);
10954 pragma Inline (Condition_Actions);
10955 pragma Inline (Config_Pragmas);
10956 pragma Inline (Constant_Present);
10957 pragma Inline (Constraint);
10958 pragma Inline (Constraints);
10959 pragma Inline (Context_Installed);
10960 pragma Inline (Context_Items);
10961 pragma Inline (Controlling_Argument);
10962 pragma Inline (Conversion_OK);
10963 pragma Inline (Corresponding_Body);
10964 pragma Inline (Corresponding_Formal_Spec);
10965 pragma Inline (Corresponding_Generic_Association);
10966 pragma Inline (Corresponding_Integer_Value);
10967 pragma Inline (Corresponding_Spec);
10968 pragma Inline (Corresponding_Stub);
10969 pragma Inline (Dcheck_Function);
10970 pragma Inline (Debug_Statement);
10971 pragma Inline (Declarations);
10972 pragma Inline (Default_Expression);
10973 pragma Inline (Default_Name);
10974 pragma Inline (Defining_Identifier);
10975 pragma Inline (Defining_Unit_Name);
10976 pragma Inline (Delay_Alternative);
10977 pragma Inline (Delay_Statement);
10978 pragma Inline (Delta_Expression);
10979 pragma Inline (Digits_Expression);
10980 pragma Inline (Discr_Check_Funcs_Built);
10981 pragma Inline (Discrete_Choices);
10982 pragma Inline (Discrete_Range);
10983 pragma Inline (Discrete_Subtype_Definition);
10984 pragma Inline (Discrete_Subtype_Definitions);
10985 pragma Inline (Discriminant_Specifications);
10986 pragma Inline (Discriminant_Type);
10987 pragma Inline (Do_Accessibility_Check);
10988 pragma Inline (Do_Discriminant_Check);
10989 pragma Inline (Do_Length_Check);
10990 pragma Inline (Do_Division_Check);
10991 pragma Inline (Do_Overflow_Check);
10992 pragma Inline (Do_Range_Check);
10993 pragma Inline (Do_Storage_Check);
10994 pragma Inline (Do_Tag_Check);
10995 pragma Inline (Elaborate_Present);
10996 pragma Inline (Elaborate_All_Desirable);
10997 pragma Inline (Elaborate_All_Present);
10998 pragma Inline (Elaborate_Desirable);
10999 pragma Inline (Elaboration_Boolean);
11000 pragma Inline (Else_Actions);
11001 pragma Inline (Else_Statements);
11002 pragma Inline (Elsif_Parts);
11003 pragma Inline (Enclosing_Variant);
11004 pragma Inline (End_Label);
11005 pragma Inline (End_Span);
11006 pragma Inline (Entity);
11007 pragma Inline (Entity_Or_Associated_Node);
11008 pragma Inline (Entry_Body_Formal_Part);
11009 pragma Inline (Entry_Call_Alternative);
11010 pragma Inline (Entry_Call_Statement);
11011 pragma Inline (Entry_Direct_Name);
11012 pragma Inline (Entry_Index);
11013 pragma Inline (Entry_Index_Specification);
11014 pragma Inline (Etype);
11015 pragma Inline (Exception_Choices);
11016 pragma Inline (Exception_Handlers);
11017 pragma Inline (Exception_Junk);
11018 pragma Inline (Exception_Label);
11019 pragma Inline (Expansion_Delayed);
11020 pragma Inline (Explicit_Actual_Parameter);
11021 pragma Inline (Explicit_Generic_Actual_Parameter);
11022 pragma Inline (Expression);
11023 pragma Inline (Expressions);
11024 pragma Inline (First_Bit);
11025 pragma Inline (First_Inlined_Subprogram);
11026 pragma Inline (First_Name);
11027 pragma Inline (First_Named_Actual);
11028 pragma Inline (First_Real_Statement);
11029 pragma Inline (First_Subtype_Link);
11030 pragma Inline (Float_Truncate);
11031 pragma Inline (Formal_Type_Definition);
11032 pragma Inline (Forwards_OK);
11033 pragma Inline (From_At_End);
11034 pragma Inline (From_At_Mod);
11035 pragma Inline (From_Default);
11036 pragma Inline (Generic_Associations);
11037 pragma Inline (Generic_Formal_Declarations);
11038 pragma Inline (Generic_Parent);
11039 pragma Inline (Generic_Parent_Type);
11040 pragma Inline (Handled_Statement_Sequence);
11041 pragma Inline (Handler_List_Entry);
11042 pragma Inline (Has_Created_Identifier);
11043 pragma Inline (Has_Dynamic_Length_Check);
11044 pragma Inline (Has_Dynamic_Range_Check);
11045 pragma Inline (Has_Init_Expression);
11046 pragma Inline (Has_Local_Raise);
11047 pragma Inline (Has_Self_Reference);
11048 pragma Inline (Has_No_Elaboration_Code);
11049 pragma Inline (Has_Priority_Pragma);
11050 pragma Inline (Has_Private_View);
11051 pragma Inline (Has_Relative_Deadline_Pragma);
11052 pragma Inline (Has_Storage_Size_Pragma);
11053 pragma Inline (Has_Task_Info_Pragma);
11054 pragma Inline (Has_Task_Name_Pragma);
11055 pragma Inline (Has_Wide_Character);
11056 pragma Inline (Hidden_By_Use_Clause);
11057 pragma Inline (High_Bound);
11058 pragma Inline (Identifier);
11059 pragma Inline (Implicit_With);
11060 pragma Inline (Interface_List);
11061 pragma Inline (Interface_Present);
11062 pragma Inline (Includes_Infinities);
11063 pragma Inline (In_Present);
11064 pragma Inline (Instance_Spec);
11065 pragma Inline (Intval);
11066 pragma Inline (Is_Asynchronous_Call_Block);
11067 pragma Inline (Is_Component_Left_Opnd);
11068 pragma Inline (Is_Component_Right_Opnd);
11069 pragma Inline (Is_Controlling_Actual);
11070 pragma Inline (Is_Dynamic_Coextension);
11071 pragma Inline (Is_Elsif);
11072 pragma Inline (Is_Entry_Barrier_Function);
11073 pragma Inline (Is_Expanded_Build_In_Place_Call);
11074 pragma Inline (Is_Folded_In_Parser);
11075 pragma Inline (Is_In_Discriminant_Check);
11076 pragma Inline (Is_Machine_Number);
11077 pragma Inline (Is_Null_Loop);
11078 pragma Inline (Is_Overloaded);
11079 pragma Inline (Is_Power_Of_2_For_Shift);
11080 pragma Inline (Is_Protected_Subprogram_Body);
11081 pragma Inline (Is_Static_Coextension);
11082 pragma Inline (Is_Static_Expression);
11083 pragma Inline (Is_Subprogram_Descriptor);
11084 pragma Inline (Is_Task_Allocation_Block);
11085 pragma Inline (Is_Task_Master);
11086 pragma Inline (Iteration_Scheme);
11087 pragma Inline (Itype);
11088 pragma Inline (Kill_Range_Check);
11089 pragma Inline (Last_Bit);
11090 pragma Inline (Last_Name);
11091 pragma Inline (Library_Unit);
11092 pragma Inline (Label_Construct);
11093 pragma Inline (Left_Opnd);
11094 pragma Inline (Limited_View_Installed);
11095 pragma Inline (Limited_Present);
11096 pragma Inline (Literals);
11097 pragma Inline (Local_Raise_Not_OK);
11098 pragma Inline (Local_Raise_Statements);
11099 pragma Inline (Loop_Actions);
11100 pragma Inline (Loop_Parameter_Specification);
11101 pragma Inline (Low_Bound);
11102 pragma Inline (Mod_Clause);
11103 pragma Inline (More_Ids);
11104 pragma Inline (Must_Be_Byte_Aligned);
11105 pragma Inline (Must_Not_Freeze);
11106 pragma Inline (Must_Not_Override);
11107 pragma Inline (Must_Override);
11108 pragma Inline (Name);
11109 pragma Inline (Names);
11110 pragma Inline (Next_Entity);
11111 pragma Inline (Next_Implicit_With);
11112 pragma Inline (Next_Named_Actual);
11113 pragma Inline (Next_Pragma);
11114 pragma Inline (Next_Rep_Item);
11115 pragma Inline (Next_Use_Clause);
11116 pragma Inline (No_Ctrl_Actions);
11117 pragma Inline (No_Elaboration_Check);
11118 pragma Inline (No_Entities_Ref_In_Spec);
11119 pragma Inline (No_Initialization);
11120 pragma Inline (No_Truncation);
11121 pragma Inline (Null_Present);
11122 pragma Inline (Null_Exclusion_Present);
11123 pragma Inline (Null_Exclusion_In_Return_Present);
11124 pragma Inline (Null_Record_Present);
11125 pragma Inline (Object_Definition);
11126 pragma Inline (Original_Discriminant);
11127 pragma Inline (Original_Entity);
11128 pragma Inline (Others_Discrete_Choices);
11129 pragma Inline (Out_Present);
11130 pragma Inline (Parameter_Associations);
11131 pragma Inline (Parameter_Specifications);
11132 pragma Inline (Parameter_List_Truncated);
11133 pragma Inline (Parameter_Type);
11134 pragma Inline (Parent_Spec);
11135 pragma Inline (PPC_Enabled);
11136 pragma Inline (Position);
11137 pragma Inline (Pragma_Argument_Associations);
11138 pragma Inline (Pragma_Identifier);
11139 pragma Inline (Pragmas_After);
11140 pragma Inline (Pragmas_Before);
11141 pragma Inline (Prefix);
11142 pragma Inline (Present_Expr);
11143 pragma Inline (Prev_Ids);
11144 pragma Inline (Print_In_Hex);
11145 pragma Inline (Private_Declarations);
11146 pragma Inline (Private_Present);
11147 pragma Inline (Procedure_To_Call);
11148 pragma Inline (Proper_Body);
11149 pragma Inline (Protected_Definition);
11150 pragma Inline (Protected_Present);
11151 pragma Inline (Raises_Constraint_Error);
11152 pragma Inline (Range_Constraint);
11153 pragma Inline (Range_Expression);
11154 pragma Inline (Real_Range_Specification);
11155 pragma Inline (Realval);
11156 pragma Inline (Reason);
11157 pragma Inline (Record_Extension_Part);
11158 pragma Inline (Redundant_Use);
11159 pragma Inline (Renaming_Exception);
11160 pragma Inline (Result_Definition);
11161 pragma Inline (Return_Object_Declarations);
11162 pragma Inline (Return_Statement_Entity);
11163 pragma Inline (Reverse_Present);
11164 pragma Inline (Right_Opnd);
11165 pragma Inline (Rounded_Result);
11166 pragma Inline (Scope);
11167 pragma Inline (Select_Alternatives);
11168 pragma Inline (Selector_Name);
11169 pragma Inline (Selector_Names);
11170 pragma Inline (Shift_Count_OK);
11171 pragma Inline (Source_Type);
11172 pragma Inline (Specification);
11173 pragma Inline (Statements);
11174 pragma Inline (Static_Processing_OK);
11175 pragma Inline (Storage_Pool);
11176 pragma Inline (Strval);
11177 pragma Inline (Subtype_Indication);
11178 pragma Inline (Subtype_Mark);
11179 pragma Inline (Subtype_Marks);
11180 pragma Inline (Suppress_Loop_Warnings);
11181 pragma Inline (Synchronized_Present);
11182 pragma Inline (Tagged_Present);
11183 pragma Inline (Target_Type);
11184 pragma Inline (Task_Definition);
11185 pragma Inline (Task_Present);
11186 pragma Inline (Then_Actions);
11187 pragma Inline (Then_Statements);
11188 pragma Inline (Triggering_Alternative);
11189 pragma Inline (Triggering_Statement);
11190 pragma Inline (Treat_Fixed_As_Integer);
11191 pragma Inline (TSS_Elist);
11192 pragma Inline (Type_Definition);
11193 pragma Inline (Unit);
11194 pragma Inline (Unknown_Discriminants_Present);
11195 pragma Inline (Unreferenced_In_Spec);
11196 pragma Inline (Variant_Part);
11197 pragma Inline (Variants);
11198 pragma Inline (Visible_Declarations);
11199 pragma Inline (Was_Originally_Stub);
11200 pragma Inline (Zero_Cost_Handling);
11201
11202 pragma Inline (Set_ABE_Is_Certain);
11203 pragma Inline (Set_Abort_Present);
11204 pragma Inline (Set_Abortable_Part);
11205 pragma Inline (Set_Abstract_Present);
11206 pragma Inline (Set_Accept_Handler_Records);
11207 pragma Inline (Set_Accept_Statement);
11208 pragma Inline (Set_Access_Definition);
11209 pragma Inline (Set_Access_To_Subprogram_Definition);
11210 pragma Inline (Set_Access_Types_To_Process);
11211 pragma Inline (Set_Actions);
11212 pragma Inline (Set_Activation_Chain_Entity);
11213 pragma Inline (Set_Acts_As_Spec);
11214 pragma Inline (Set_Actual_Designated_Subtype);
11215 pragma Inline (Set_Address_Warning_Posted);
11216 pragma Inline (Set_Aggregate_Bounds);
11217 pragma Inline (Set_Aliased_Present);
11218 pragma Inline (Set_All_Others);
11219 pragma Inline (Set_All_Present);
11220 pragma Inline (Set_Alternatives);
11221 pragma Inline (Set_Ancestor_Part);
11222 pragma Inline (Set_Array_Aggregate);
11223 pragma Inline (Set_Assignment_OK);
11224 pragma Inline (Set_Associated_Node);
11225 pragma Inline (Set_At_End_Proc);
11226 pragma Inline (Set_Attribute_Name);
11227 pragma Inline (Set_Aux_Decls_Node);
11228 pragma Inline (Set_Backwards_OK);
11229 pragma Inline (Set_Bad_Is_Detected);
11230 pragma Inline (Set_Body_To_Inline);
11231 pragma Inline (Set_Body_Required);
11232 pragma Inline (Set_By_Ref);
11233 pragma Inline (Set_Box_Present);
11234 pragma Inline (Set_Char_Literal_Value);
11235 pragma Inline (Set_Chars);
11236 pragma Inline (Set_Check_Address_Alignment);
11237 pragma Inline (Set_Choice_Parameter);
11238 pragma Inline (Set_Choices);
11239 pragma Inline (Set_Coextensions);
11240 pragma Inline (Set_Comes_From_Extended_Return_Statement);
11241 pragma Inline (Set_Compile_Time_Known_Aggregate);
11242 pragma Inline (Set_Component_Associations);
11243 pragma Inline (Set_Component_Clauses);
11244 pragma Inline (Set_Component_Definition);
11245 pragma Inline (Set_Component_Items);
11246 pragma Inline (Set_Component_List);
11247 pragma Inline (Set_Component_Name);
11248 pragma Inline (Set_Condition);
11249 pragma Inline (Set_Condition_Actions);
11250 pragma Inline (Set_Config_Pragmas);
11251 pragma Inline (Set_Constant_Present);
11252 pragma Inline (Set_Constraint);
11253 pragma Inline (Set_Constraints);
11254 pragma Inline (Set_Context_Installed);
11255 pragma Inline (Set_Context_Items);
11256 pragma Inline (Set_Controlling_Argument);
11257 pragma Inline (Set_Conversion_OK);
11258 pragma Inline (Set_Corresponding_Body);
11259 pragma Inline (Set_Corresponding_Formal_Spec);
11260 pragma Inline (Set_Corresponding_Generic_Association);
11261 pragma Inline (Set_Corresponding_Integer_Value);
11262 pragma Inline (Set_Corresponding_Spec);
11263 pragma Inline (Set_Corresponding_Stub);
11264 pragma Inline (Set_Dcheck_Function);
11265 pragma Inline (Set_Debug_Statement);
11266 pragma Inline (Set_Declarations);
11267 pragma Inline (Set_Default_Expression);
11268 pragma Inline (Set_Default_Name);
11269 pragma Inline (Set_Defining_Identifier);
11270 pragma Inline (Set_Defining_Unit_Name);
11271 pragma Inline (Set_Delay_Alternative);
11272 pragma Inline (Set_Delay_Statement);
11273 pragma Inline (Set_Delta_Expression);
11274 pragma Inline (Set_Digits_Expression);
11275 pragma Inline (Set_Discr_Check_Funcs_Built);
11276 pragma Inline (Set_Discrete_Choices);
11277 pragma Inline (Set_Discrete_Range);
11278 pragma Inline (Set_Discrete_Subtype_Definition);
11279 pragma Inline (Set_Discrete_Subtype_Definitions);
11280 pragma Inline (Set_Discriminant_Specifications);
11281 pragma Inline (Set_Discriminant_Type);
11282 pragma Inline (Set_Do_Accessibility_Check);
11283 pragma Inline (Set_Do_Discriminant_Check);
11284 pragma Inline (Set_Do_Length_Check);
11285 pragma Inline (Set_Do_Division_Check);
11286 pragma Inline (Set_Do_Overflow_Check);
11287 pragma Inline (Set_Do_Range_Check);
11288 pragma Inline (Set_Do_Storage_Check);
11289 pragma Inline (Set_Do_Tag_Check);
11290 pragma Inline (Set_Elaborate_Present);
11291 pragma Inline (Set_Elaborate_All_Desirable);
11292 pragma Inline (Set_Elaborate_All_Present);
11293 pragma Inline (Set_Elaborate_Desirable);
11294 pragma Inline (Set_Elaboration_Boolean);
11295 pragma Inline (Set_Else_Actions);
11296 pragma Inline (Set_Else_Statements);
11297 pragma Inline (Set_Elsif_Parts);
11298 pragma Inline (Set_Enclosing_Variant);
11299 pragma Inline (Set_End_Label);
11300 pragma Inline (Set_End_Span);
11301 pragma Inline (Set_Entity);
11302 pragma Inline (Set_Entry_Body_Formal_Part);
11303 pragma Inline (Set_Entry_Call_Alternative);
11304 pragma Inline (Set_Entry_Call_Statement);
11305 pragma Inline (Set_Entry_Direct_Name);
11306 pragma Inline (Set_Entry_Index);
11307 pragma Inline (Set_Entry_Index_Specification);
11308 pragma Inline (Set_Etype);
11309 pragma Inline (Set_Exception_Choices);
11310 pragma Inline (Set_Exception_Handlers);
11311 pragma Inline (Set_Exception_Junk);
11312 pragma Inline (Set_Exception_Label);
11313 pragma Inline (Set_Expansion_Delayed);
11314 pragma Inline (Set_Explicit_Actual_Parameter);
11315 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
11316 pragma Inline (Set_Expression);
11317 pragma Inline (Set_Expressions);
11318 pragma Inline (Set_First_Bit);
11319 pragma Inline (Set_First_Inlined_Subprogram);
11320 pragma Inline (Set_First_Name);
11321 pragma Inline (Set_First_Named_Actual);
11322 pragma Inline (Set_First_Real_Statement);
11323 pragma Inline (Set_First_Subtype_Link);
11324 pragma Inline (Set_Float_Truncate);
11325 pragma Inline (Set_Formal_Type_Definition);
11326 pragma Inline (Set_Forwards_OK);
11327 pragma Inline (Set_From_At_End);
11328 pragma Inline (Set_From_At_Mod);
11329 pragma Inline (Set_From_Default);
11330 pragma Inline (Set_Generic_Associations);
11331 pragma Inline (Set_Generic_Formal_Declarations);
11332 pragma Inline (Set_Generic_Parent);
11333 pragma Inline (Set_Generic_Parent_Type);
11334 pragma Inline (Set_Handled_Statement_Sequence);
11335 pragma Inline (Set_Handler_List_Entry);
11336 pragma Inline (Set_Has_Created_Identifier);
11337 pragma Inline (Set_Has_Dynamic_Length_Check);
11338 pragma Inline (Set_Has_Init_Expression);
11339 pragma Inline (Set_Has_Local_Raise);
11340 pragma Inline (Set_Has_Dynamic_Range_Check);
11341 pragma Inline (Set_Has_No_Elaboration_Code);
11342 pragma Inline (Set_Has_Priority_Pragma);
11343 pragma Inline (Set_Has_Private_View);
11344 pragma Inline (Set_Has_Relative_Deadline_Pragma);
11345 pragma Inline (Set_Has_Storage_Size_Pragma);
11346 pragma Inline (Set_Has_Task_Info_Pragma);
11347 pragma Inline (Set_Has_Task_Name_Pragma);
11348 pragma Inline (Set_Has_Wide_Character);
11349 pragma Inline (Set_Hidden_By_Use_Clause);
11350 pragma Inline (Set_High_Bound);
11351 pragma Inline (Set_Identifier);
11352 pragma Inline (Set_Implicit_With);
11353 pragma Inline (Set_Includes_Infinities);
11354 pragma Inline (Set_Interface_List);
11355 pragma Inline (Set_Interface_Present);
11356 pragma Inline (Set_In_Present);
11357 pragma Inline (Set_Instance_Spec);
11358 pragma Inline (Set_Intval);
11359 pragma Inline (Set_Is_Asynchronous_Call_Block);
11360 pragma Inline (Set_Is_Component_Left_Opnd);
11361 pragma Inline (Set_Is_Component_Right_Opnd);
11362 pragma Inline (Set_Is_Controlling_Actual);
11363 pragma Inline (Set_Is_Dynamic_Coextension);
11364 pragma Inline (Set_Is_Elsif);
11365 pragma Inline (Set_Is_Entry_Barrier_Function);
11366 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
11367 pragma Inline (Set_Is_Folded_In_Parser);
11368 pragma Inline (Set_Is_In_Discriminant_Check);
11369 pragma Inline (Set_Is_Machine_Number);
11370 pragma Inline (Set_Is_Null_Loop);
11371 pragma Inline (Set_Is_Overloaded);
11372 pragma Inline (Set_Is_Power_Of_2_For_Shift);
11373 pragma Inline (Set_Is_Protected_Subprogram_Body);
11374 pragma Inline (Set_Has_Self_Reference);
11375 pragma Inline (Set_Is_Static_Coextension);
11376 pragma Inline (Set_Is_Static_Expression);
11377 pragma Inline (Set_Is_Subprogram_Descriptor);
11378 pragma Inline (Set_Is_Task_Allocation_Block);
11379 pragma Inline (Set_Is_Task_Master);
11380 pragma Inline (Set_Iteration_Scheme);
11381 pragma Inline (Set_Itype);
11382 pragma Inline (Set_Kill_Range_Check);
11383 pragma Inline (Set_Last_Bit);
11384 pragma Inline (Set_Last_Name);
11385 pragma Inline (Set_Library_Unit);
11386 pragma Inline (Set_Label_Construct);
11387 pragma Inline (Set_Left_Opnd);
11388 pragma Inline (Set_Limited_View_Installed);
11389 pragma Inline (Set_Limited_Present);
11390 pragma Inline (Set_Literals);
11391 pragma Inline (Set_Local_Raise_Not_OK);
11392 pragma Inline (Set_Local_Raise_Statements);
11393 pragma Inline (Set_Loop_Actions);
11394 pragma Inline (Set_Loop_Parameter_Specification);
11395 pragma Inline (Set_Low_Bound);
11396 pragma Inline (Set_Mod_Clause);
11397 pragma Inline (Set_More_Ids);
11398 pragma Inline (Set_Must_Be_Byte_Aligned);
11399 pragma Inline (Set_Must_Not_Freeze);
11400 pragma Inline (Set_Must_Not_Override);
11401 pragma Inline (Set_Must_Override);
11402 pragma Inline (Set_Name);
11403 pragma Inline (Set_Names);
11404 pragma Inline (Set_Next_Entity);
11405 pragma Inline (Set_Next_Implicit_With);
11406 pragma Inline (Set_Next_Named_Actual);
11407 pragma Inline (Set_Next_Pragma);
11408 pragma Inline (Set_Next_Rep_Item);
11409 pragma Inline (Set_Next_Use_Clause);
11410 pragma Inline (Set_No_Ctrl_Actions);
11411 pragma Inline (Set_No_Elaboration_Check);
11412 pragma Inline (Set_No_Entities_Ref_In_Spec);
11413 pragma Inline (Set_No_Initialization);
11414 pragma Inline (Set_No_Truncation);
11415 pragma Inline (Set_Null_Present);
11416 pragma Inline (Set_Null_Exclusion_Present);
11417 pragma Inline (Set_Null_Exclusion_In_Return_Present);
11418 pragma Inline (Set_Null_Record_Present);
11419 pragma Inline (Set_Object_Definition);
11420 pragma Inline (Set_Original_Discriminant);
11421 pragma Inline (Set_Original_Entity);
11422 pragma Inline (Set_Others_Discrete_Choices);
11423 pragma Inline (Set_Out_Present);
11424 pragma Inline (Set_Parameter_Associations);
11425 pragma Inline (Set_Parameter_Specifications);
11426 pragma Inline (Set_Parameter_List_Truncated);
11427 pragma Inline (Set_Parameter_Type);
11428 pragma Inline (Set_Parent_Spec);
11429 pragma Inline (Set_PPC_Enabled);
11430 pragma Inline (Set_Position);
11431 pragma Inline (Set_Pragma_Argument_Associations);
11432 pragma Inline (Set_Pragma_Identifier);
11433 pragma Inline (Set_Pragmas_After);
11434 pragma Inline (Set_Pragmas_Before);
11435 pragma Inline (Set_Prefix);
11436 pragma Inline (Set_Present_Expr);
11437 pragma Inline (Set_Prev_Ids);
11438 pragma Inline (Set_Print_In_Hex);
11439 pragma Inline (Set_Private_Declarations);
11440 pragma Inline (Set_Private_Present);
11441 pragma Inline (Set_Procedure_To_Call);
11442 pragma Inline (Set_Proper_Body);
11443 pragma Inline (Set_Protected_Definition);
11444 pragma Inline (Set_Protected_Present);
11445 pragma Inline (Set_Raises_Constraint_Error);
11446 pragma Inline (Set_Range_Constraint);
11447 pragma Inline (Set_Range_Expression);
11448 pragma Inline (Set_Real_Range_Specification);
11449 pragma Inline (Set_Realval);
11450 pragma Inline (Set_Reason);
11451 pragma Inline (Set_Record_Extension_Part);
11452 pragma Inline (Set_Redundant_Use);
11453 pragma Inline (Set_Renaming_Exception);
11454 pragma Inline (Set_Result_Definition);
11455 pragma Inline (Set_Return_Object_Declarations);
11456 pragma Inline (Set_Reverse_Present);
11457 pragma Inline (Set_Right_Opnd);
11458 pragma Inline (Set_Rounded_Result);
11459 pragma Inline (Set_Scope);
11460 pragma Inline (Set_Select_Alternatives);
11461 pragma Inline (Set_Selector_Name);
11462 pragma Inline (Set_Selector_Names);
11463 pragma Inline (Set_Shift_Count_OK);
11464 pragma Inline (Set_Source_Type);
11465 pragma Inline (Set_Specification);
11466 pragma Inline (Set_Statements);
11467 pragma Inline (Set_Static_Processing_OK);
11468 pragma Inline (Set_Storage_Pool);
11469 pragma Inline (Set_Strval);
11470 pragma Inline (Set_Subtype_Indication);
11471 pragma Inline (Set_Subtype_Mark);
11472 pragma Inline (Set_Subtype_Marks);
11473 pragma Inline (Set_Suppress_Loop_Warnings);
11474 pragma Inline (Set_Synchronized_Present);
11475 pragma Inline (Set_Tagged_Present);
11476 pragma Inline (Set_Target_Type);
11477 pragma Inline (Set_Task_Definition);
11478 pragma Inline (Set_Task_Present);
11479 pragma Inline (Set_Then_Actions);
11480 pragma Inline (Set_Then_Statements);
11481 pragma Inline (Set_Triggering_Alternative);
11482 pragma Inline (Set_Triggering_Statement);
11483 pragma Inline (Set_Treat_Fixed_As_Integer);
11484 pragma Inline (Set_TSS_Elist);
11485 pragma Inline (Set_Type_Definition);
11486 pragma Inline (Set_Unit);
11487 pragma Inline (Set_Unknown_Discriminants_Present);
11488 pragma Inline (Set_Unreferenced_In_Spec);
11489 pragma Inline (Set_Variant_Part);
11490 pragma Inline (Set_Variants);
11491 pragma Inline (Set_Visible_Declarations);
11492 pragma Inline (Set_Was_Originally_Stub);
11493 pragma Inline (Set_Zero_Cost_Handling);
11494
11495 N_Simple_Return_Statement : constant Node_Kind := N_Return_Statement;
11496 -- Rename N_Return_Statement to be N_Simple_Return_Statement. Clients
11497 -- should refer to N_Simple_Return_Statement.
11498
11499 end Sinfo;