[multiple changes]
[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 -- Compile_Time_Known_Aggregate (Flag18-Sem)
676 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
677 -- evaluated at compile time without raising constraint error. Such
678 -- aggregates can be passed as is to Gigi without any expansion. See
679 -- Sem_Aggr for the specific conditions under which an aggregate has this
680 -- flag set. See also the flag Static_Processing_OK.
681
682 -- Componentwise_Assignment (Flag14-Sem)
683 -- Present in N_Assignment_Statement nodes. Set for a record assignment
684 -- where all that needs doing is to expand it into component-by-component
685 -- assignments. This is used internally for the case of tagged types with
686 -- rep clauses, where we need to avoid recursion (we don't want to try to
687 -- generate a call to the primitive operation, because this is the case
688 -- where we are compiling the primitive operation). Note that when we are
689 -- expanding component assignments in this case, we never assign the _tag
690 -- field, but we recursively assign components of the parent type.
691
692 -- Condition_Actions (List3-Sem)
693 -- This field appears in else-if nodes and in the iteration scheme node
694 -- for while loops. This field is only used during semantic processing to
695 -- temporarily hold actions inserted into the tree. In the tree passed
696 -- to gigi, the condition actions field is always set to No_List. For
697 -- details on how this field is used, see the routine Insert_Actions in
698 -- package Exp_Util, and also the expansion routines for the relevant
699 -- nodes.
700
701 -- Context_Pending (Flag16-Sem)
702 -- This field appears in Compilation_Unit nodes, to indicate that the
703 -- context of the unit is being compiled. Used to detect circularities
704 -- that are not otherwise detected by the loading mechanism. Such
705 -- circularities can occur in the presence of limited and non-limited
706 -- with_clauses that mention the same units.
707
708 -- Controlling_Argument (Node1-Sem)
709 -- This field is set in procedure and function call nodes if the call
710 -- is a dispatching call (it is Empty for a non-dispatching call). It
711 -- indicates the source of the call's controlling tag. For procedure
712 -- calls, the Controlling_Argument is one of the actuals. For function
713 -- that has a dispatching result, it is an entity in the context of the
714 -- call that can provide a tag, or else it is the tag of the root type
715 -- of the class. It can also specify a tag directly rather than being a
716 -- tagged object. The latter is needed by the implementations of AI-239
717 -- and AI-260.
718
719 -- Conversion_OK (Flag14-Sem)
720 -- A flag set on type conversion nodes to indicate that the conversion
721 -- is to be considered as being valid, even though it is the case that
722 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
723 -- Fixed_Value and Integer_Value, for internal conversions done for
724 -- fixed-point operations, and for certain conversions for calls to
725 -- initialization procedures. If Conversion_OK is set, then Etype must be
726 -- set (the analyzer assumes that Etype has been set). For the case of
727 -- fixed-point operands, it also indicates that the conversion is to be
728 -- direct conversion of the underlying integer result, with no regard to
729 -- the small operand.
730
731 -- Corresponding_Body (Node5-Sem)
732 -- This field is set in subprogram declarations, package declarations,
733 -- entry declarations of protected types, and in generic units. It
734 -- points to the defining entity for the corresponding body (NOT the
735 -- node for the body itself).
736
737 -- Corresponding_Formal_Spec (Node3-Sem)
738 -- This field is set in subprogram renaming declarations, where it points
739 -- to the defining entity for a formal subprogram in the case where the
740 -- renaming corresponds to a generic formal subprogram association in an
741 -- instantiation. The field is Empty if the renaming does not correspond
742 -- to such a formal association.
743
744 -- Corresponding_Generic_Association (Node5-Sem)
745 -- This field is defined for object declarations and object renaming
746 -- declarations. It is set for the declarations within an instance that
747 -- map generic formals to their actuals. If set, the field points to
748 -- a generic_association which is the original parent of the expression
749 -- or name appearing in the declaration. This simplifies ASIS queries.
750
751 -- Corresponding_Integer_Value (Uint4-Sem)
752 -- This field is set in real literals of fixed-point types (it is not
753 -- used for floating-point types). It contains the integer value used
754 -- to represent the fixed-point value. It is also set on the universal
755 -- real literals used to represent bounds of fixed-point base types
756 -- and their first named subtypes.
757
758 -- Corresponding_Spec (Node5-Sem)
759 -- This field is set in subprogram, package, task, and protected body
760 -- nodes, where it points to the defining entity in the corresponding
761 -- spec. The attribute is also set in N_With_Clause nodes where it points
762 -- to the defining entity for the with'ed spec, and in a subprogram
763 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
764 -- if there is no corresponding spec, as in the case of a subprogram body
765 -- that serves as its own spec.
766
767 -- Corresponding_Stub (Node3-Sem)
768 -- This field is present in an N_Subunit node. It holds the node in
769 -- the parent unit that is the stub declaration for the subunit. It is
770 -- set when analysis of the stub forces loading of the proper body. If
771 -- expansion of the proper body creates new declarative nodes, they are
772 -- inserted at the point of the corresponding_stub.
773
774 -- Dcheck_Function (Node5-Sem)
775 -- This field is present in an N_Variant node, It references the entity
776 -- for the discriminant checking function for the variant.
777
778 -- Debug_Statement (Node3)
779 -- This field is present in an N_Pragma node. It is used only for a Debug
780 -- pragma. The parameter is of the form of an expression, as required by
781 -- the pragma syntax, but is actually a procedure call. To simplify
782 -- semantic processing, the parser creates a copy of the argument
783 -- rearranged into a procedure call statement and places it in the
784 -- Debug_Statement field. Note that this field is considered syntactic
785 -- field, since it is created by the parser.
786
787 -- Default_Expression (Node5-Sem)
788 -- This field is Empty if there is no default expression. If there is a
789 -- simple default expression (one with no side effects), then this field
790 -- simply contains a copy of the Expression field (both point to the tree
791 -- for the default expression). Default_Expression is used for
792 -- conformance checking.
793
794 -- Discr_Check_Funcs_Built (Flag11-Sem)
795 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
796 -- discriminant checking functions are constructed. The purpose is to
797 -- avoid attempting to set these functions more than once.
798
799 -- Do_Accessibility_Check (Flag13-Sem)
800 -- This flag is set on N_Parameter_Specification nodes to indicate
801 -- that an accessibility check is required for the parameter. It is
802 -- not yet decided who takes care of this check (TBD ???).
803
804 -- Do_Discriminant_Check (Flag13-Sem)
805 -- This flag is set on N_Selected_Component nodes to indicate that a
806 -- discriminant check is required using the discriminant check routine
807 -- associated with the selector. The actual check is generated by the
808 -- expander when processing selected components.
809
810 -- Do_Division_Check (Flag13-Sem)
811 -- This flag is set on a division operator (/ mod rem) to indicate
812 -- that a zero divide check is required. The actual check is dealt
813 -- with by the backend (all the front end does is to set the flag).
814
815 -- Do_Length_Check (Flag4-Sem)
816 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
817 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
818 -- is required. It is not determined who deals with this flag (???).
819
820 -- Do_Overflow_Check (Flag17-Sem)
821 -- This flag is set on an operator where an overflow check is required on
822 -- the operation. The actual check is dealt with by the backend (all the
823 -- front end does is to set the flag). The other cases where this flag is
824 -- used is on a Type_Conversion node and for attribute reference nodes.
825 -- For a type conversion, it means that the conversion is from one base
826 -- type to another, and the value may not fit in the target base type.
827 -- See also the description of Do_Range_Check for this case. The only
828 -- attribute references which use this flag are Pred and Succ, where it
829 -- means that the result should be checked for going outside the base
830 -- range. Note that this flag is not set for modular types.
831
832 -- Do_Range_Check (Flag9-Sem)
833 -- This flag is set on an expression which appears in a context where a
834 -- range check is required. The target type is clear from the context.
835 -- The contexts in which this flag can appear are the following:
836
837 -- Right side of an assignment. In this case the target type is
838 -- taken from the left side of the assignment, which is referenced
839 -- by the Name of the N_Assignment_Statement node.
840
841 -- Subscript expressions in an indexed component. In this case the
842 -- target type is determined from the type of the array, which is
843 -- referenced by the Prefix of the N_Indexed_Component node.
844
845 -- Argument expression for a parameter, appearing either directly in
846 -- the Parameter_Associations list of a call or as the Expression of an
847 -- N_Parameter_Association node that appears in this list. In either
848 -- case, the check is against the type of the formal. Note that the
849 -- flag is relevant only in IN and IN OUT parameters, and will be
850 -- ignored for OUT parameters, where no check is required in the call,
851 -- and if a check is required on the return, it is generated explicitly
852 -- with a type conversion.
853
854 -- Initialization expression for the initial value in an object
855 -- declaration. In this case the Do_Range_Check flag is set on
856 -- the initialization expression, and the check is against the
857 -- range of the type of the object being declared.
858
859 -- The expression of a type conversion. In this case the range check is
860 -- against the target type of the conversion. See also the use of
861 -- Do_Overflow_Check on a type conversion. The distinction is that the
862 -- overflow check protects against a value that is outside the range of
863 -- the target base type, whereas a range check checks that the
864 -- resulting value (which is a value of the base type of the target
865 -- type), satisfies the range constraint of the target type.
866
867 -- Note: when a range check is required in contexts other than those
868 -- listed above (e.g. in a return statement), an additional type
869 -- conversion node is introduced to represent the required check.
870
871 -- Do_Storage_Check (Flag17-Sem)
872 -- This flag is set in an N_Allocator node to indicate that a storage
873 -- check is required for the allocation, or in an N_Subprogram_Body node
874 -- to indicate that a stack check is required in the subprogram prolog.
875 -- The N_Allocator case is handled by the routine that expands the call
876 -- to the runtime routine. The N_Subprogram_Body case is handled by the
877 -- backend, and all the semantics does is set the flag.
878
879 -- Do_Tag_Check (Flag13-Sem)
880 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
881 -- N_Procedure_Call_Statement, N_Type_Conversion,
882 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
883 -- node to indicate that the tag check can be suppressed. It is not
884 -- yet decided how this flag is used (TBD ???).
885
886 -- Elaborate_Present (Flag4-Sem)
887 -- This flag is set in the N_With_Clause node to indicate that pragma
888 -- Elaborate pragma appears for the with'ed units.
889
890 -- Elaborate_All_Desirable (Flag9-Sem)
891 -- This flag is set in the N_With_Clause mode to indicate that the static
892 -- elaboration processing has determined that an Elaborate_All pragma is
893 -- desirable for correct elaboration for this unit.
894
895 -- Elaborate_All_Present (Flag14-Sem)
896 -- This flag is set in the N_With_Clause node to indicate that a
897 -- pragma Elaborate_All pragma appears for the with'ed units.
898
899 -- Elaborate_Desirable (Flag11-Sem)
900 -- This flag is set in the N_With_Clause mode to indicate that the static
901 -- elaboration processing has determined that an Elaborate pragma is
902 -- desirable for correct elaboration for this unit.
903
904 -- Elaboration_Boolean (Node2-Sem)
905 -- This field is present in function and procedure specification nodes.
906 -- If set, it points to the entity for a Boolean flag that must be tested
907 -- for certain calls to check for access before elaboration. See body of
908 -- Sem_Elab for further details. This field is Empty if no elaboration
909 -- boolean is required.
910
911 -- Else_Actions (List3-Sem)
912 -- This field is present in conditional expression nodes. During code
913 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
914 -- actions at an appropriate place in the tree to get elaborated at the
915 -- right time. For conditional expressions, we have to be sure that the
916 -- actions for the Else branch are only elaborated if the condition is
917 -- False. The Else_Actions field is used as a temporary parking place for
918 -- these actions. The final tree is always rewritten to eliminate the
919 -- need for this field, so in the tree passed to Gigi, this field is
920 -- always set to No_List.
921
922 -- Enclosing_Variant (Node2-Sem)
923 -- This field is present in the N_Variant node and identifies the Node_Id
924 -- corresponding to the immediately enclosing variant when the variant is
925 -- nested, and N_Empty otherwise. Set during semantic processing of the
926 -- variant part of a record type.
927
928 -- Entity (Node4-Sem)
929 -- Appears in all direct names (identifiers, character literals, and
930 -- operator symbols), as well as expanded names, and attributes that
931 -- denote entities, such as 'Class. Points to entity for corresponding
932 -- defining occurrence. Set after name resolution. For identifiers in a
933 -- WITH list, the corresponding defining occurrence is in a separately
934 -- compiled file, and Entity must be set by the library Load procedure.
935 --
936 -- Note: During name resolution, the value in Entity may be temporarily
937 -- incorrect (e.g. during overload resolution, Entity is initially set to
938 -- the first possible correct interpretation, and then later modified if
939 -- necessary to contain the correct value after resolution).
940 --
941 -- Note: This field overlaps Associated_Node, which is used during
942 -- generic processing (see Sem_Ch12 for details). Note also that in
943 -- generic templates, this means that the Entity field does not always
944 -- point to an Entity. Since the back end is expected to ignore generic
945 -- templates, this is harmless.
946 --
947 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
948 -- It is used only for stream attributes definition clauses. In this
949 -- case, it denotes a (possibly dummy) subprogram entity that is declared
950 -- conceptually at the point of the clause. Thus the visibility of the
951 -- attribute definition clause (in the sense of 8.3(23) as amended by
952 -- AI-195) can be checked by testing the visibility of that subprogram.
953 --
954 -- Note: Normally the Entity field of an identifier points to the entity
955 -- for the corresponding defining identifier, and hence the Chars field
956 -- of an identifier will match the Chars field of the entity. However,
957 -- there is no requirement that these match, and there are obscure cases
958 -- of generated code where they do not match.
959
960 -- Entity_Or_Associated_Node (Node4-Sem)
961 -- A synonym for both Entity and Associated_Node. Used by convention in
962 -- the code when referencing this field in cases where it is not known
963 -- whether the field contains an Entity or an Associated_Node.
964
965 -- Etype (Node5-Sem)
966 -- Appears in all expression nodes, all direct names, and all entities.
967 -- Points to the entity for the related type. Set after type resolution.
968 -- Normally this is the actual subtype of the expression. However, in
969 -- certain contexts such as the right side of an assignment, subscripts,
970 -- arguments to calls, returned value in a function, initial value etc.
971 -- it is the desired target type. In the event that this is different
972 -- from the actual type, the Do_Range_Check flag will be set if a range
973 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
974 -- points to an essentially arbitrary choice from the possible set of
975 -- types.
976
977 -- Exception_Junk (Flag8-Sem)
978 -- This flag is set in a various nodes appearing in a statement sequence
979 -- to indicate that the corresponding node is an artifact of the
980 -- generated code for exception handling, and should be ignored when
981 -- analyzing the control flow of the relevant sequence of statements
982 -- (e.g. to check that it does not end with a bad return statement).
983
984 -- Exception_Label (Node5-Sem)
985 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
986 -- to be used for transforming the corresponding exception into a goto,
987 -- or contains Empty, if this exception is not to be transformed. Also
988 -- appears in N_Exception_Handler nodes, where, if set, it indicates
989 -- that there may be a local raise for the handler, so that expansion
990 -- to allow a goto is required (and this field contains the label for
991 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
992
993 -- Expansion_Delayed (Flag11-Sem)
994 -- Set on aggregates and extension aggregates that need a top-down rather
995 -- than bottom-up expansion. Typically aggregate expansion happens bottom
996 -- up. For nested aggregates the expansion is delayed until the enclosing
997 -- aggregate itself is expanded, e.g. in the context of a declaration. To
998 -- delay it we set this flag. This is done to avoid creating a temporary
999 -- for each level of a nested aggregates, and also to prevent the
1000 -- premature generation of constraint checks. This is also a requirement
1001 -- if we want to generate the proper attachment to the internal
1002 -- finalization lists (for record with controlled components). Top down
1003 -- expansion of aggregates is also used for in-place array aggregate
1004 -- assignment or initialization. When the full context is known, the
1005 -- target of the assignment or initialization is used to generate the
1006 -- left-hand side of individual assignment to each sub-component.
1007
1008 -- First_Inlined_Subprogram (Node3-Sem)
1009 -- Present in the N_Compilation_Unit node for the main program. Points
1010 -- to a chain of entities for subprograms that are to be inlined. The
1011 -- Next_Inlined_Subprogram field of these entities is used as a link
1012 -- pointer with Empty marking the end of the list. This field is Empty
1013 -- if there are no inlined subprograms or inlining is not active.
1014
1015 -- First_Named_Actual (Node4-Sem)
1016 -- Present in procedure call statement and function call nodes, and also
1017 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1018 -- named parameter where parameters are ordered by declaration order (as
1019 -- opposed to the actual order in the call which may be different due to
1020 -- named associations). Note: this field points to the explicit actual
1021 -- parameter itself, not the N_Parameter_Association node (its parent).
1022
1023 -- First_Real_Statement (Node2-Sem)
1024 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
1025 -- Empty. Used only when declarations are moved into the statement part
1026 -- of a construct as a result of wrapping an AT END handler that is
1027 -- required to cover the declarations. In this case, this field is used
1028 -- to remember the location in the statements list of the first real
1029 -- statement, i.e. the statement that used to be first in the statement
1030 -- list before the declarations were prepended.
1031
1032 -- First_Subtype_Link (Node5-Sem)
1033 -- Present in N_Freeze_Entity node for an anonymous base type that is
1034 -- implicitly created by the declaration of a first subtype. It points
1035 -- to the entity for the first subtype.
1036
1037 -- Float_Truncate (Flag11-Sem)
1038 -- A flag present in type conversion nodes. This is used for float to
1039 -- integer conversions where truncation is required rather than rounding.
1040 -- Note that Gigi does not handle type conversions from real to integer
1041 -- with rounding (see Expand_N_Type_Conversion).
1042
1043 -- Forwards_OK (Flag5-Sem)
1044 -- A flag present in the N_Assignment_Statement node. It is used only
1045 -- if the type being assigned is an array type, and is set if analysis
1046 -- determines that it is definitely safe to do the copy forwards, i.e.
1047 -- starting at the lowest addressed element. This is the case if either
1048 -- the operands do not overlap, or they may overlap, but if they do,
1049 -- then the left operand is at a lower address than the right operand.
1050 --
1051 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1052 -- means that the front end could not determine that either direction is
1053 -- definitely safe, and a runtime check may be required if the backend
1054 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1055 -- set, it means that the front end can assure no overlap of operands.
1056
1057 -- From_At_End (Flag4-Sem)
1058 -- This flag is set on an N_Raise_Statement node if it corresponds to
1059 -- the reraise statement generated as the last statement of an AT END
1060 -- handler when SJLJ exception handling is active. It is used to stop
1061 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1062 -- because if the restriction is set, the reraise is not generated.
1063
1064 -- From_At_Mod (Flag4-Sem)
1065 -- This flag is set on the attribute definition clause node that is
1066 -- generated by a transformation of an at mod phrase in a record
1067 -- representation clause. This is used to give slightly different (Ada 83
1068 -- compatible) semantics to such a clause, namely it is used to specify a
1069 -- minimum acceptable alignment for the base type and all subtypes. In
1070 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1071 -- must be a multiple of the given value, and the representation clause
1072 -- is considered to be type specific instead of subtype specific.
1073
1074 -- From_Default (Flag6-Sem)
1075 -- This flag is set on the subprogram renaming declaration created in an
1076 -- instance for a formal subprogram, when the formal is declared with a
1077 -- box, and there is no explicit actual. If the flag is present, the
1078 -- declaration is treated as an implicit reference to the formal in the
1079 -- ali file.
1080
1081 -- Generic_Parent (Node5-Sem)
1082 -- Generic_Parent is defined on declaration nodes that are instances. The
1083 -- value of Generic_Parent is the generic entity from which the instance
1084 -- is obtained. Generic_Parent is also defined for the renaming
1085 -- declarations and object declarations created for the actuals in an
1086 -- instantiation. The generic parent of such a declaration is the
1087 -- corresponding generic association in the Instantiation node.
1088
1089 -- Generic_Parent_Type (Node4-Sem)
1090 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1091 -- actuals of formal private and derived types. Within the instance, the
1092 -- operations on the actual are those inherited from the parent. For a
1093 -- formal private type, the parent type is the generic type itself. The
1094 -- Generic_Parent_Type is also used in an instance to determine whether a
1095 -- private operation overrides an inherited one.
1096
1097 -- Handler_List_Entry (Node2-Sem)
1098 -- This field is present in N_Object_Declaration nodes. It is set only
1099 -- for the Handler_Record entry generated for an exception in zero cost
1100 -- exception handling mode. It references the corresponding item in the
1101 -- handler list, and is used to delete this entry if the corresponding
1102 -- handler is deleted during optimization. For further details on why
1103 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1104
1105 -- Has_No_Elaboration_Code (Flag17-Sem)
1106 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1107 -- or not elaboration code is present for this unit. It is initially set
1108 -- true for subprogram specs and bodies and for all generic units and
1109 -- false for non-generic package specs and bodies. Gigi may set the flag
1110 -- in the non-generic package case if it determines that no elaboration
1111 -- code is generated. Note that this flag is not related to the
1112 -- Is_Preelaborated status, there can be preelaborated packages that
1113 -- generate elaboration code, and non-preelaborated packages which do
1114 -- not generate elaboration code.
1115
1116 -- Has_Priority_Pragma (Flag6-Sem)
1117 -- A flag present in N_Subprogram_Body, N_Task_Definition and
1118 -- N_Protected_Definition nodes to flag the presence of either a Priority
1119 -- or Interrupt_Priority pragma in the declaration sequence (public or
1120 -- private in the task and protected cases)
1121
1122 -- Has_Private_View (Flag11-Sem)
1123 -- A flag present in generic nodes that have an entity, to indicate that
1124 -- the node has a private type. Used to exchange private and full
1125 -- declarations if the visibility at instantiation is different from the
1126 -- visibility at generic definition.
1127
1128 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1129 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1130 -- flag the presence of a pragma Relative_Deadline.
1131
1132 -- Has_Self_Reference (Flag13-Sem)
1133 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1134 -- of the expressions contains an access attribute reference to the
1135 -- enclosing type. Such a self-reference can only appear in default-
1136 -- initialized aggregate for a record type.
1137
1138 -- Has_Storage_Size_Pragma (Flag5-Sem)
1139 -- A flag present in an N_Task_Definition node to flag the presence of a
1140 -- Storage_Size pragma.
1141
1142 -- Has_Task_Info_Pragma (Flag7-Sem)
1143 -- A flag present in an N_Task_Definition node to flag the presence of a
1144 -- Task_Info pragma. Used to detect duplicate pragmas.
1145
1146 -- Has_Task_Name_Pragma (Flag8-Sem)
1147 -- A flag present in N_Task_Definition nodes to flag the presence of a
1148 -- Task_Name pragma in the declaration sequence for the task.
1149
1150 -- Has_Wide_Character (Flag11-Sem)
1151 -- Present in string literals, set if any wide character (i.e. character
1152 -- code outside the Character range) appears in the string.
1153
1154 -- Hidden_By_Use_Clause (Elist4-Sem)
1155 -- An entity list present in use clauses that appear within
1156 -- instantiations. For the resolution of local entities, entities
1157 -- introduced by these use clauses have priority over global ones, and
1158 -- outer entities must be explicitly hidden/restored on exit.
1159
1160 -- Implicit_With (Flag16-Sem)
1161 -- This flag is set in the N_With_Clause node that is implicitly
1162 -- generated for runtime units that are loaded by the expander, and also
1163 -- for package System, if it is loaded implicitly by a use of the
1164 -- 'Address or 'Tag attribute. ???There are other implicit with clauses
1165 -- as well.
1166
1167 -- Includes_Infinities (Flag11-Sem)
1168 -- This flag is present in N_Range nodes. It is set for the range of
1169 -- unconstrained float types defined in Standard, which include not only
1170 -- the given range of values, but also legitimately can include infinite
1171 -- values. This flag is false for any float type for which an explicit
1172 -- range is given by the programmer, even if that range is identical to
1173 -- the range for Float.
1174
1175 -- Instance_Spec (Node5-Sem)
1176 -- This field is present in generic instantiation nodes, and also in
1177 -- formal package declaration nodes (formal package declarations are
1178 -- treated in a manner very similar to package instantiations). It points
1179 -- to the node for the spec of the instance, inserted as part of the
1180 -- semantic processing for instantiations in Sem_Ch12.
1181
1182 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1183 -- A flag set in a Block_Statement node to indicate that it is the
1184 -- expansion of an asynchronous entry call. Such a block needs cleanup
1185 -- handler to assure that the call is cancelled.
1186
1187 -- Is_Component_Left_Opnd (Flag13-Sem)
1188 -- Is_Component_Right_Opnd (Flag14-Sem)
1189 -- Present in concatenation nodes, to indicate that the corresponding
1190 -- operand is of the component type of the result. Used in resolving
1191 -- concatenation nodes in instances.
1192
1193 -- Is_Controlling_Actual (Flag16-Sem)
1194 -- This flag is set on in an expression that is a controlling argument in
1195 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1196 -- details of its use.
1197
1198 -- Is_Dynamic_Coextension (Flag18-Sem)
1199 -- Present in allocator nodes, to indicate that this is an allocator
1200 -- for an access discriminant of a dynamically allocated object. The
1201 -- coextension must be deallocated and finalized at the same time as
1202 -- the enclosing object.
1203
1204 -- Is_Entry_Barrier_Function (Flag8-Sem)
1205 -- This flag is set in an N_Subprogram_Body node which is the expansion
1206 -- of an entry barrier from a protected entry body. It is used for the
1207 -- circuitry checking for incorrect use of Current_Task.
1208
1209 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1210 -- This flag is set in an N_Function_Call node to indicate that the extra
1211 -- actuals to support a build-in-place style of call have been added to
1212 -- the call.
1213
1214 -- Is_In_Discriminant_Check (Flag11-Sem)
1215 -- This flag is present in a selected component, and is used to indicate
1216 -- that the reference occurs within a discriminant check. The
1217 -- significance is that optimizations based on assuming that the
1218 -- discriminant check has a correct value cannot be performed in this
1219 -- case (or the discriminant check may be optimized away!)
1220
1221 -- Is_Machine_Number (Flag11-Sem)
1222 -- This flag is set in an N_Real_Literal node to indicate that the value
1223 -- is a machine number. This avoids some unnecessary cases of converting
1224 -- real literals to machine numbers.
1225
1226 -- Is_Null_Loop (Flag16-Sem)
1227 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1228 -- can be determined to be null at compile time. This is used to remove
1229 -- the loop entirely at expansion time.
1230
1231 -- Is_Overloaded (Flag5-Sem)
1232 -- A flag present in all expression nodes. Used temporarily during
1233 -- overloading determination. The setting of this flag is not relevant
1234 -- once overloading analysis is complete.
1235
1236 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1237 -- A flag present only in N_Op_Expon nodes. It is set when the
1238 -- exponentiation is of the form 2 ** N, where the type of N is an
1239 -- unsigned integral subtype whose size does not exceed the size of
1240 -- Standard_Integer (i.e. a type that can be safely converted to
1241 -- Natural), and the exponentiation appears as the right operand of an
1242 -- integer multiplication or an integer division where the dividend is
1243 -- unsigned. It is also required that overflow checking is off for both
1244 -- the exponentiation and the multiply/divide node. If this set of
1245 -- conditions holds, and the flag is set, then the division or
1246 -- multiplication can be (and is) converted to a shift.
1247
1248 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1249 -- A flag set in a Subprogram_Body block to indicate that it is the
1250 -- implementation of a protected subprogram. Such a body needs cleanup
1251 -- handler to make sure that the associated protected object is unlocked
1252 -- when the subprogram completes.
1253
1254 -- Is_Static_Coextension (Flag14-Sem)
1255 -- Present in N_Allocator nodes. Set if the allocator is a coextension
1256 -- of an object allocated on the stack rather than the heap.
1257
1258 -- Is_Static_Expression (Flag6-Sem)
1259 -- Indicates that an expression is a static expression (RM 4.9). See spec
1260 -- of package Sem_Eval for full details on the use of this flag.
1261
1262 -- Is_Subprogram_Descriptor (Flag16-Sem)
1263 -- Present in N_Object_Declaration, and set only for the object
1264 -- declaration generated for a subprogram descriptor in fast exception
1265 -- mode. See Exp_Ch11 for details of use.
1266
1267 -- Is_Task_Allocation_Block (Flag6-Sem)
1268 -- A flag set in a Block_Statement node to indicate that it is the
1269 -- expansion of a task allocator, or the allocator of an object
1270 -- containing tasks. Such a block requires a cleanup handler to call
1271 -- Expunge_Unactivated_Tasks to complete any tasks that have been
1272 -- allocated but not activated when the allocator completes abnormally.
1273
1274 -- Is_Task_Master (Flag5-Sem)
1275 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1276 -- indicate that the construct is a task master (i.e. has declared tasks
1277 -- or declares an access to a task type).
1278
1279 -- Itype (Node1-Sem)
1280 -- Used in N_Itype_Reference node to reference an itype for which it is
1281 -- important to ensure that it is defined. See description of this node
1282 -- for further details.
1283
1284 -- Kill_Range_Check (Flag11-Sem)
1285 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1286 -- result should not be subjected to range checks. This is used for the
1287 -- implementation of Normalize_Scalars.
1288
1289 -- Label_Construct (Node2-Sem)
1290 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1291 -- N_Block_Statement or N_Loop_Statement node to which the label
1292 -- declaration applies. This is not currently used in the compiler
1293 -- itself, but it is useful in the implementation of ASIS queries.
1294 -- This field is left empty for the special labels generated as part
1295 -- of expanding raise statements with a local exception handler.
1296
1297 -- Library_Unit (Node4-Sem)
1298 -- In a stub node, Library_Unit points to the compilation unit node of
1299 -- the corresponding subunit.
1300 --
1301 -- In a with clause node, Library_Unit points to the spec of the with'ed
1302 -- unit.
1303 --
1304 -- In a compilation unit node, the usage depends on the unit type:
1305 --
1306 -- For a library unit body, Library_Unit points to the compilation unit
1307 -- node of the corresponding spec, unless it's a subprogram body with
1308 -- Acts_As_Spec set, in which case it points to itself.
1309 --
1310 -- For a spec, Library_Unit points to the compilation unit node of the
1311 -- corresponding body, if present. The body will be present if the spec
1312 -- is or contains generics that we needed to instantiate. Similarly, the
1313 -- body will be present if we needed it for inlining purposes. Thus, if
1314 -- we have a spec/body pair, both of which are present, they point to
1315 -- each other via Library_Unit.
1316 --
1317 -- For a subunit, Library_Unit points to the compilation unit node of
1318 -- the parent body.
1319 --
1320 -- Note that this field is not used to hold the parent pointer for child
1321 -- unit (which might in any case need to use it for some other purpose as
1322 -- described above). Instead for a child unit, implicit with's are
1323 -- generated for all parents.
1324
1325 -- Local_Raise_Statements (Elist1)
1326 -- This field is present in exception handler nodes. It is set to
1327 -- No_Elist in the normal case. If there is at least one raise statement
1328 -- which can potentially be handled as a local raise, then this field
1329 -- points to a list of raise nodes, which are calls to a routine to raise
1330 -- an exception. These are raise nodes which can be optimized into gotos
1331 -- if the handler turns out to meet the conditions which permit this
1332 -- transformation. Note that this does NOT include instances of the
1333 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
1334 -- handled by the back end (using the N_Push/N_Pop mechanism).
1335
1336 -- Loop_Actions (List2-Sem)
1337 -- A list present in Component_Association nodes in array aggregates.
1338 -- Used to collect actions that must be executed within the loop because
1339 -- they may need to be evaluated anew each time through.
1340
1341 -- Limited_View_Installed (Flag18-Sem)
1342 -- Present in With_Clauses and in package specifications. If set on
1343 -- with_clause, it indicates that this clause has created the current
1344 -- limited view of the designated package. On a package specification, it
1345 -- indicates that the limited view has already been created because the
1346 -- package is mentioned in a limited_with_clause in the closure of the
1347 -- unit being compiled.
1348
1349 -- Local_Raise_Not_OK (Flag7-Sem)
1350 -- Present in N_Exception_Handler nodes. Set if the handler contains
1351 -- a construct (reraise statement, or call to subprogram in package
1352 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
1353 -- for a local raise (one that could otherwise be converted to a goto).
1354
1355 -- Must_Be_Byte_Aligned (Flag14-Sem)
1356 -- This flag is present in N_Attribute_Reference nodes. It can be set
1357 -- only for the Address and Unrestricted_Access attributes. If set it
1358 -- means that the object for which the address/access is given must be on
1359 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
1360 -- of the object is to be made before taking the address (this copy is in
1361 -- the current scope on the stack frame). This is used for certain cases
1362 -- of code generated by the expander that passes parameters by address.
1363 --
1364 -- The reason the copy is not made by the front end is that the back end
1365 -- has more information about type layout and may be able to (but is not
1366 -- guaranteed to) prevent making unnecessary copies.
1367
1368 -- Must_Not_Freeze (Flag8-Sem)
1369 -- A flag present in all expression nodes. Normally expressions cause
1370 -- freezing as described in the RM. If this flag is set, then this is
1371 -- inhibited. This is used by the analyzer and expander to label nodes
1372 -- that are created by semantic analysis or expansion and which must not
1373 -- cause freezing even though they normally would. This flag is also
1374 -- present in an N_Subtype_Indication node, since we also use these in
1375 -- calls to Freeze_Expression.
1376
1377 -- Next_Entity (Node2-Sem)
1378 -- Present in defining identifiers, defining character literals and
1379 -- defining operator symbols (i.e. in all entities). The entities of a
1380 -- scope are chained, and this field is used as the forward pointer for
1381 -- this list. See Einfo for further details.
1382
1383 -- Next_Implicit_With (Node3-Sem)
1384 -- Present in N_With_Clause. Part of a chain of with_clauses generated
1385 -- in rtsfind to indicate implicit dependencies on predefined units. Used
1386 -- to prevent multiple with_clauses for the same unit in a given context.
1387 -- A postorder traversal of the tree whose nodes are units and whose
1388 -- links are with_clauses defines the order in which Inspector must
1389 -- examine a compiled unit and its full context. This ordering ensures
1390 -- that any subprogram call is examined after the subprogram declartion
1391 -- has been seen.
1392
1393 -- Next_Named_Actual (Node4-Sem)
1394 -- Present in parameter association node. Set during semantic analysis to
1395 -- point to the next named parameter, where parameters are ordered by
1396 -- declaration order (as opposed to the actual order in the call, which
1397 -- may be different due to named associations). Not that this field
1398 -- points to the explicit actual parameter itself, not to the
1399 -- N_Parameter_Association node (its parent).
1400
1401 -- Next_Pragma (Node1-Sem)
1402 -- Present in N_Pragma nodes. Used to create a linked list of pragma
1403 -- nodes. Currently used for two purposes:
1404 --
1405 -- Create a list of linked Check_Policy pragmas. The head of this list
1406 -- is stored in Opt.Check_Policy_List (which has further details).
1407 --
1408 -- Used by processing for Pre/Postcondition pragmas to store a list of
1409 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
1410 -- details).
1411
1412 -- Next_Rep_Item (Node5-Sem)
1413 -- Present in pragma nodes and attribute definition nodes. Used to link
1414 -- representation items that apply to an entity. See description of
1415 -- First_Rep_Item field in Einfo for full details.
1416
1417 -- Next_Use_Clause (Node3-Sem)
1418 -- While use clauses are active during semantic processing, they are
1419 -- chained from the scope stack entry, using Next_Use_Clause as a link
1420 -- pointer, with Empty marking the end of the list. The head pointer is
1421 -- in the scope stack entry (First_Use_Clause). At the end of semantic
1422 -- processing (i.e. when Gigi sees the tree, the contents of this field
1423 -- is undefined and should not be read).
1424
1425 -- No_Ctrl_Actions (Flag7-Sem)
1426 -- Present in N_Assignment_Statement to indicate that no finalize nor
1427 -- adjust should take place on this assignment even though the rhs is
1428 -- controlled. This is used in init procs and aggregate expansions where
1429 -- the generated assignments are more initialisations than real
1430 -- assignments.
1431
1432 -- No_Elaboration_Check (Flag14-Sem)
1433 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1434 -- that no elaboration check is needed on the call, because it appears in
1435 -- the context of a local Suppress pragma. This is used on calls within
1436 -- task bodies, where the actual elaboration checks are applied after
1437 -- analysis, when the local scope stack is not present.
1438
1439 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1440 -- Present in N_With_Clause nodes. Set if the with clause is on the
1441 -- package or subprogram spec where the main unit is the corresponding
1442 -- body, and no entities of the with'ed unit are referenced by the spec
1443 -- (an entity may still be referenced in the body, so this flag is used
1444 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1445 -- full details)
1446
1447 -- No_Initialization (Flag13-Sem)
1448 -- Present in N_Object_Declaration and N_Allocator to indicate that the
1449 -- object must not be initialized (by Initialize or call to an init
1450 -- proc). This is needed for controlled aggregates. When the Object
1451 -- declaration has an expression, this flag means that this expression
1452 -- should not be taken into account (needed for in place initialization
1453 -- with aggregates).
1454
1455 -- No_Truncation (Flag17-Sem)
1456 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
1457 -- only if the RM_Size of the source is greater than the RM_Size of the
1458 -- target for scalar operands. Normally in such a case we truncate some
1459 -- higher order bits of the source, and then sign/zero extend the result
1460 -- to form the output value. But if this flag is set, then we do not do
1461 -- any truncation, so for example, if an 8 bit input is converted to 5
1462 -- bit result which is in fact stored in 8 bits, then the high order
1463 -- three bits of the target result will be copied from the source. This
1464 -- is used for properly setting out of range values for use by pragmas
1465 -- Initialize_Scalars and Normalize_Scalars.
1466
1467 -- Original_Discriminant (Node2-Sem)
1468 -- Present in identifiers. Used in references to discriminants that
1469 -- appear in generic units. Because the names of the discriminants may be
1470 -- different in an instance, we use this field to recover the position of
1471 -- the discriminant in the original type, and replace it with the
1472 -- discriminant at the same position in the instantiated type.
1473
1474 -- Original_Entity (Node2-Sem)
1475 -- Present in numeric literals. Used to denote the named number that has
1476 -- been constant-folded into the given literal. If literal is from
1477 -- source, or the result of some other constant-folding operation, then
1478 -- Original_Entity is empty. This field is needed to handle properly
1479 -- named numbers in generic units, where the Associated_Node field
1480 -- interferes with the Entity field, making it impossible to preserve the
1481 -- original entity at the point of instantiation (ASIS problem).
1482
1483 -- Others_Discrete_Choices (List1-Sem)
1484 -- When a case statement or variant is analyzed, the semantic checks
1485 -- determine the actual list of choices that correspond to an others
1486 -- choice. This list is materialized for later use by the expander and
1487 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
1488 -- this materialized list of choices, which is in standard format for a
1489 -- list of discrete choices, except that of course it cannot contain an
1490 -- N_Others_Choice entry.
1491
1492 -- Parameter_List_Truncated (Flag17-Sem)
1493 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. Set
1494 -- (for OpenVMS ports of GNAT only) if the parameter list is truncated as
1495 -- a result of a First_Optional_Parameter specification in an
1496 -- Import_Function, Import_Procedure, or Import_Valued_Procedure pragma.
1497 -- The truncation is done by the expander by removing trailing parameters
1498 -- from the argument list, in accordance with the set of rules allowing
1499 -- such parameter removal. In particular, parameters can be removed
1500 -- working from the end of the parameter list backwards up to and
1501 -- including the entry designated by First_Optional_Parameter in the
1502 -- Import pragma. Parameters can be removed if they are implicit and the
1503 -- default value is a known-at-compile-time value, including the use of
1504 -- the Null_Parameter attribute, or if explicit parameter values are
1505 -- present that match the corresponding defaults.
1506
1507 -- Parent_Spec (Node4-Sem)
1508 -- For a library unit that is a child unit spec (package or subprogram
1509 -- declaration, generic declaration or instantiation, or library level
1510 -- rename, this field points to the compilation unit node for the parent
1511 -- package specification. This field is Empty for library bodies (the
1512 -- parent spec in this case can be found from the corresponding spec).
1513
1514 -- PPC_Enabled (Flag5-Sem)
1515 -- Present in N_Pragma nodes. This flag is relevant only for precondition
1516 -- and postcondition nodes. It is true if the check corresponding to the
1517 -- pragma type is enabled at the point where the pragma appears.
1518
1519 -- Present_Expr (Uint3-Sem)
1520 -- Present in an N_Variant node. This has a meaningful value only after
1521 -- Gigi has back annotated the tree with representation information. At
1522 -- this point, it contains a reference to a gcc expression that depends
1523 -- on the values of one or more discriminants. Give a set of discriminant
1524 -- values, this expression evaluates to False (zero) if variant is not
1525 -- present, and True (non-zero) if it is present. See unit Repinfo for
1526 -- further details on gigi back annotation. This field is used during
1527 -- ASIS processing (data decomposition annex) to determine if a field is
1528 -- present or not.
1529
1530 -- Print_In_Hex (Flag13-Sem)
1531 -- Set on an N_Integer_Literal node to indicate that the value should be
1532 -- printed in hexadecimal in the sprint listing. Has no effect on
1533 -- legality or semantics of program, only on the displayed output. This
1534 -- is used to clarify output from the packed array cases.
1535
1536 -- Procedure_To_Call (Node2-Sem)
1537 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1538 -- and N_Extended_Return_Statement nodes. References the entity for the
1539 -- declaration of the procedure to be called to accomplish the required
1540 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
1541 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
1542 -- allocating the return value), and for the Deallocate procedure in the
1543 -- case of N_Free_Statement.
1544
1545 -- Raises_Constraint_Error (Flag7-Sem)
1546 -- Set on an expression whose evaluation will definitely fail constraint
1547 -- error check. In the case of static expressions, this flag must be set
1548 -- accurately (and if it is set, the expression is typically illegal
1549 -- unless it appears as a non-elaborated branch of a short-circuit form).
1550 -- For a non-static expression, this flag may be set whenever an
1551 -- expression (e.g. an aggregate) is known to raise constraint error. If
1552 -- set, the expression definitely will raise CE if elaborated at runtime.
1553 -- If not set, the expression may or may not raise CE. In other words, on
1554 -- static expressions, the flag is set accurately, on non-static
1555 -- expressions it is set conservatively.
1556
1557 -- Redundant_Use (Flag13-Sem)
1558 -- Present in nodes that can appear as an operand in a use clause or use
1559 -- type clause (identifiers, expanded names, attribute references). Set
1560 -- to indicate that a use is redundant (and therefore need not be undone
1561 -- on scope exit).
1562
1563 -- Renaming_Exception (Node2-Sem)
1564 -- Present in N_Exception_Declaration node. Used to point back to the
1565 -- exception renaming for an exception declared within a subprogram.
1566 -- What happens is that an exception declared in a subprogram is moved
1567 -- to the library level with a unique name, and the original exception
1568 -- becomes a renaming. This link from the library level exception to the
1569 -- renaming declaration allows registering of the proper exception name.
1570
1571 -- Return_Statement_Entity (Node5-Sem)
1572 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
1573 -- Points to an E_Return_Statement representing the return statement.
1574
1575 -- Return_Object_Declarations (List3)
1576 -- Present in N_Extended_Return_Statement.
1577 -- Points to a list initially containing a single
1578 -- N_Object_Declaration representing the return object.
1579 -- We use a list (instead of just a pointer to the object decl)
1580 -- because Analyze wants to insert extra actions on this list.
1581
1582 -- Rounded_Result (Flag18-Sem)
1583 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1584 -- Used in the fixed-point cases to indicate that the result must be
1585 -- rounded as a result of the use of the 'Round attribute. Also used for
1586 -- integer N_Op_Divide nodes to indicate that the result should be
1587 -- rounded to the nearest integer (breaking ties away from zero), rather
1588 -- than truncated towards zero as usual. These rounded integer operations
1589 -- are the result of expansion of rounded fixed-point divide, conversion
1590 -- and multiplication operations.
1591
1592 -- Scope (Node3-Sem)
1593 -- Present in defining identifiers, defining character literals and
1594 -- defining operator symbols (i.e. in all entities). The entities of a
1595 -- scope all use this field to reference the corresponding scope entity.
1596 -- See Einfo for further details.
1597
1598 -- Shift_Count_OK (Flag4-Sem)
1599 -- A flag present in shift nodes to indicate that the shift count is
1600 -- known to be in range, i.e. is in the range from zero to word length
1601 -- minus one. If this flag is not set, then the shift count may be
1602 -- outside this range, i.e. larger than the word length, and the code
1603 -- must ensure that such shift counts give the appropriate result.
1604
1605 -- Source_Type (Node1-Sem)
1606 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1607 -- source type entity for the unchecked conversion instantiation
1608 -- which gigi must do size validation for.
1609
1610 -- Static_Processing_OK (Flag4-Sem)
1611 -- Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate
1612 -- flag is set, the full value of the aggregate can be determined at
1613 -- compile time and the aggregate can be passed as is to the back-end.
1614 -- In this event it is irrelevant whether this flag is set or not.
1615 -- However, if the flag Compile_Time_Known_Aggregate is not set but
1616 -- Static_Processing_OK is set, the aggregate can (but need not) be
1617 -- converted into a compile time known aggregate by the expander. See
1618 -- Sem_Aggr for the specific conditions under which an aggregate has its
1619 -- Static_Processing_OK flag set.
1620
1621 -- Storage_Pool (Node1-Sem)
1622 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1623 -- and N_Extended_Return_Statement nodes. References the entity for the
1624 -- storage pool to be used for the allocate or free call or for the
1625 -- allocation of the returned value from function. Empty indicates that
1626 -- the global default pool is to be used. Note that in the case
1627 -- of a return statement, this field is set only if the function returns
1628 -- value of a type whose size is not known at compile time on the
1629 -- secondary stack.
1630
1631 -- Suppress_Loop_Warnings (Flag17-Sem)
1632 -- Used in N_Loop_Statement node to indicate that warnings within the
1633 -- body of the loop should be suppressed. This is set when the range
1634 -- of a FOR loop is known to be null, or is probably null (loop would
1635 -- only execute if invalid values are present).
1636
1637 -- Target_Type (Node2-Sem)
1638 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
1639 -- type entity for the unchecked conversion instantiation which gigi must
1640 -- do size validation for.
1641
1642 -- Then_Actions (List3-Sem)
1643 -- This field is present in conditional expression nodes. During code
1644 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1645 -- actions at an appropriate place in the tree to get elaborated at the
1646 -- right time. For conditional expressions, we have to be sure that the
1647 -- actions for the Then branch are only elaborated if the condition is
1648 -- True. The Then_Actions field is used as a temporary parking place for
1649 -- these actions. The final tree is always rewritten to eliminate the
1650 -- need for this field, so in the tree passed to Gigi, this field is
1651 -- always set to No_List.
1652
1653 -- Treat_Fixed_As_Integer (Flag14-Sem)
1654 -- This flag appears in operator nodes for divide, multiply, mod and rem
1655 -- on fixed-point operands. It indicates that the operands are to be
1656 -- treated as integer values, ignoring small values. This flag is only
1657 -- set as a result of expansion of fixed-point operations. Typically a
1658 -- fixed-point multiplication in the source generates subsidiary
1659 -- multiplication and division operations that work with the underlying
1660 -- integer values and have this flag set. Note that this flag is not
1661 -- needed on other arithmetic operations (add, neg, subtract etc.) since
1662 -- in these cases it is always the case that fixed is treated as integer.
1663 -- The Etype field MUST be set if this flag is set. The analyzer knows to
1664 -- leave such nodes alone, and whoever makes them must set the correct
1665 -- Etype value.
1666
1667 -- TSS_Elist (Elist3-Sem)
1668 -- Present in N_Freeze_Entity nodes. Holds an element list containing
1669 -- entries for each TSS (type support subprogram) associated with the
1670 -- frozen type. The elements of the list are the entities for the
1671 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
1672 -- if there are no type support subprograms for the type or if the freeze
1673 -- node is not for a type.
1674
1675 -- Unreferenced_In_Spec (Flag7-Sem)
1676 -- Present in N_With_Clause nodes. Set if the with clause is on the
1677 -- package or subprogram spec where the main unit is the corresponding
1678 -- body, and is not referenced by the spec (it may still be referenced by
1679 -- the body, so this flag is used to generate the proper message (see
1680 -- Sem_Util.Check_Unused_Withs for details)
1681
1682 -- Was_Originally_Stub (Flag13-Sem)
1683 -- This flag is set in the node for a proper body that replaces stub.
1684 -- During the analysis procedure, stubs in some situations get rewritten
1685 -- by the corresponding bodies, and we set this flag to remember that
1686 -- this happened. Note that it is not good enough to rely on the use of
1687 -- Original_Node here because of the case of nested instantiations where
1688 -- the substituted node can be copied.
1689
1690 -- Zero_Cost_Handling (Flag5-Sem)
1691 -- This flag is set in all handled sequence of statement and exception
1692 -- handler nodes if exceptions are to be handled using the zero-cost
1693 -- mechanism (see Ada.Exceptions and System.Exceptions in files
1694 -- a-except.ads/adb and s-except.ads for full details). What gigi needs
1695 -- to do for such a handler is simply to put the code in the handler
1696 -- somewhere. The front end has generated all necessary labels.
1697
1698 --------------------------------------------------
1699 -- Note on Use of End_Label and End_Span Fields --
1700 --------------------------------------------------
1701
1702 -- Several constructs have end lines:
1703
1704 -- Loop Statement end loop [loop_IDENTIFIER];
1705 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
1706 -- Task Definition end [task_IDENTIFIER]
1707 -- Protected Definition end [protected_IDENTIFIER]
1708 -- Protected Body end [protected_IDENTIFIER]
1709
1710 -- Block Statement end [block_IDENTIFIER];
1711 -- Subprogram Body end [DESIGNATOR];
1712 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
1713 -- Task Body end [task_IDENTIFIER];
1714 -- Accept Statement end [entry_IDENTIFIER]];
1715 -- Entry Body end [entry_IDENTIFIER];
1716
1717 -- If Statement end if;
1718 -- Case Statement end case;
1719
1720 -- Record Definition end record;
1721 -- Enumeration Definition );
1722
1723 -- The End_Label and End_Span fields are used to mark the locations of
1724 -- these lines, and also keep track of the label in the case where a label
1725 -- is present.
1726
1727 -- For the first group above, the End_Label field of the corresponding node
1728 -- is used to point to the label identifier. In the case where there is no
1729 -- label in the source, the parser supplies a dummy identifier (with
1730 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
1731 -- marks the location of the token following the END token.
1732
1733 -- For the second group, the use of End_Label is similar, but the End_Label
1734 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
1735 -- simply because in some cases there is no room in the parent node.
1736
1737 -- For the third group, there is never any label, and instead of using
1738 -- End_Label, we use the End_Span field which gives the location of the
1739 -- token following END, relative to the starting Sloc of the construct,
1740 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
1741 -- following the End_Label.
1742
1743 -- The record definition case is handled specially, we treat it as though
1744 -- it required an optional label which is never present, and so the parser
1745 -- always builds a dummy identifier with Comes From Source set False. The
1746 -- reason we do this, rather than using End_Span in this case, is that we
1747 -- want to generate a cross-ref entry for the end of a record, since it
1748 -- represents a scope for name declaration purposes.
1749
1750 -- The enumeration definition case is handled in an exactly similar manner,
1751 -- building a dummy identifier to get a cross-reference.
1752
1753 -- Note: the reason we store the difference as a Uint, instead of storing
1754 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
1755 -- distinguished from other types of values, and we count on all general
1756 -- use fields being self describing. To make things easier for clients,
1757 -- note that we provide function End_Location, and procedure
1758 -- Set_End_Location to allow access to the logical value (which is the
1759 -- Source_Ptr value for the end token).
1760
1761 ---------------------
1762 -- Syntactic Nodes --
1763 ---------------------
1764
1765 ---------------------
1766 -- 2.3 Identifier --
1767 ---------------------
1768
1769 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
1770 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
1771
1772 -- An IDENTIFIER shall not be a reserved word
1773
1774 -- In the Ada grammar identifiers are the bottom level tokens which have
1775 -- very few semantics. Actual program identifiers are direct names. If
1776 -- we were being 100% honest with the grammar, then we would have a node
1777 -- called N_Direct_Name which would point to an identifier. However,
1778 -- that's too many extra nodes, so we just use the N_Identifier node
1779 -- directly as a direct name, and it contains the expression fields and
1780 -- Entity field that correspond to its use as a direct name. In those
1781 -- few cases where identifiers appear in contexts where they are not
1782 -- direct names (pragmas, pragma argument associations, attribute
1783 -- references and attribute definition clauses), the Chars field of the
1784 -- node contains the Name_Id for the identifier name.
1785
1786 -- Note: in GNAT, a reserved word can be treated as an identifier in two
1787 -- cases. First, an incorrect use of a reserved word as an identifier is
1788 -- diagnosed and then treated as a normal identifier. Second, an
1789 -- attribute designator of the form of a reserved word (access, delta,
1790 -- digits, range) is treated as an identifier.
1791
1792 -- Note: The set of letters that is permitted in an identifier depends
1793 -- on the character set in use. See package Csets for full details.
1794
1795 -- N_Identifier
1796 -- Sloc points to identifier
1797 -- Chars (Name1) contains the Name_Id for the identifier
1798 -- Entity (Node4-Sem)
1799 -- Associated_Node (Node4-Sem)
1800 -- Original_Discriminant (Node2-Sem)
1801 -- Redundant_Use (Flag13-Sem)
1802 -- Has_Private_View (Flag11-Sem) (set in generic units)
1803 -- plus fields for expression
1804
1805 --------------------------
1806 -- 2.4 Numeric Literal --
1807 --------------------------
1808
1809 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
1810
1811 ----------------------------
1812 -- 2.4.1 Decimal Literal --
1813 ----------------------------
1814
1815 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
1816
1817 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
1818
1819 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
1820
1821 -- Decimal literals appear in the tree as either integer literal nodes
1822 -- or real literal nodes, depending on whether a period is present.
1823
1824 -- Note: literal nodes appear as a result of direct use of literals
1825 -- in the source program, and also as the result of evaluating
1826 -- expressions at compile time. In the latter case, it is possible
1827 -- to construct real literals that have no syntactic representation
1828 -- using the standard literal format. Such literals are listed by
1829 -- Sprint using the notation [numerator / denominator].
1830
1831 -- Note: the value of an integer literal node created by the front end
1832 -- is never outside the range of values of the base type. However, it
1833 -- can be the case that the value is outside the range of the
1834 -- particular subtype. This happens in the case of integer overflows
1835 -- with checks suppressed.
1836
1837 -- N_Integer_Literal
1838 -- Sloc points to literal
1839 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1840 -- has been constant-folded into its literal value.
1841 -- Intval (Uint3) contains integer value of literal
1842 -- plus fields for expression
1843 -- Print_In_Hex (Flag13-Sem)
1844
1845 -- N_Real_Literal
1846 -- Sloc points to literal
1847 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1848 -- has been constant-folded into its literal value.
1849 -- Realval (Ureal3) contains real value of literal
1850 -- Corresponding_Integer_Value (Uint4-Sem)
1851 -- Is_Machine_Number (Flag11-Sem)
1852 -- plus fields for expression
1853
1854 --------------------------
1855 -- 2.4.2 Based Literal --
1856 --------------------------
1857
1858 -- BASED_LITERAL ::=
1859 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
1860
1861 -- BASE ::= NUMERAL
1862
1863 -- BASED_NUMERAL ::=
1864 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
1865
1866 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
1867
1868 -- Based literals appear in the tree as either integer literal nodes
1869 -- or real literal nodes, depending on whether a period is present.
1870
1871 ----------------------------
1872 -- 2.5 Character Literal --
1873 ----------------------------
1874
1875 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
1876
1877 -- N_Character_Literal
1878 -- Sloc points to literal
1879 -- Chars (Name1) contains the Name_Id for the identifier
1880 -- Char_Literal_Value (Uint2) contains the literal value
1881 -- Entity (Node4-Sem)
1882 -- Associated_Node (Node4-Sem)
1883 -- Has_Private_View (Flag11-Sem) set in generic units.
1884 -- plus fields for expression
1885
1886 -- Note: the Entity field will be missing (set to Empty) for character
1887 -- literals whose type is Standard.Wide_Character or Standard.Character
1888 -- or a type derived from one of these two. In this case the character
1889 -- literal stands for its own coding. The reason we take this irregular
1890 -- short cut is to avoid the need to build lots of junk defining
1891 -- character literal nodes.
1892
1893 -------------------------
1894 -- 2.6 String Literal --
1895 -------------------------
1896
1897 -- STRING LITERAL ::= "{STRING_ELEMENT}"
1898
1899 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
1900 -- single GRAPHIC_CHARACTER other than a quotation mark.
1901 --
1902 -- Is_Folded_In_Parser is True if the parser created this literal by
1903 -- folding a sequence of "&" operators. For example, if the source code
1904 -- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
1905 -- is set. This flag is needed because the parser doesn't know about
1906 -- visibility, so the folded result might be wrong, and semantic
1907 -- analysis needs to check for that.
1908
1909 -- N_String_Literal
1910 -- Sloc points to literal
1911 -- Strval (Str3) contains Id of string value
1912 -- Has_Wide_Character (Flag11-Sem)
1913 -- Is_Folded_In_Parser (Flag4)
1914 -- plus fields for expression
1915
1916 ------------------
1917 -- 2.7 Comment --
1918 ------------------
1919
1920 -- A COMMENT starts with two adjacent hyphens and extends up to the
1921 -- end of the line. A COMMENT may appear on any line of a program.
1922
1923 -- Comments are skipped by the scanner and do not appear in the tree.
1924 -- It is possible to reconstruct the position of comments with respect
1925 -- to the elements of the tree by using the source position (Sloc)
1926 -- pointers that appear in every tree node.
1927
1928 -----------------
1929 -- 2.8 Pragma --
1930 -----------------
1931
1932 -- PRAGMA ::= pragma IDENTIFIER
1933 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
1934
1935 -- Note that a pragma may appear in the tree anywhere a declaration
1936 -- or a statement may appear, as well as in some other situations
1937 -- which are explicitly documented.
1938
1939 -- N_Pragma
1940 -- Sloc points to pragma identifier
1941 -- Next_Pragma (Node1-Sem)
1942 -- Pragma_Argument_Associations (List2) (set to No_List if none)
1943 -- Debug_Statement (Node3) (set to Empty if not Debug, Assert)
1944 -- Pragma_Identifier (Node4)
1945 -- Next_Rep_Item (Node5-Sem)
1946 -- PPC_Enabled (Flag5-Sem)
1947
1948 -- Note: we should have a section on what pragmas are passed on to
1949 -- the back end to be processed. This section should note that pragma
1950 -- Psect_Object is always converted to Common_Object, but there are
1951 -- undoubtedly many other similar notes required ???
1952
1953 -- Note: a utility function Pragma_Name may be applied to pragma nodes
1954 -- to conveniently obtain the Chars field of the Pragma_Identifier.
1955
1956 --------------------------------------
1957 -- 2.8 Pragma Argument Association --
1958 --------------------------------------
1959
1960 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
1961 -- [pragma_argument_IDENTIFIER =>] NAME
1962 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
1963
1964 -- N_Pragma_Argument_Association
1965 -- Sloc points to first token in association
1966 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
1967 -- Expression (Node3)
1968
1969 ------------------------
1970 -- 2.9 Reserved Word --
1971 ------------------------
1972
1973 -- Reserved words are parsed by the scanner, and returned as the
1974 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
1975
1976 ----------------------------
1977 -- 3.1 Basic Declaration --
1978 ----------------------------
1979
1980 -- BASIC_DECLARATION ::=
1981 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
1982 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
1983 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
1984 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
1985 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
1986 -- | GENERIC_INSTANTIATION
1987
1988 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
1989 -- see further description in section on semantic nodes.
1990
1991 -- Also, in the tree that is constructed, a pragma may appear
1992 -- anywhere that a declaration may appear.
1993
1994 ------------------------------
1995 -- 3.1 Defining Identifier --
1996 ------------------------------
1997
1998 -- DEFINING_IDENTIFIER ::= IDENTIFIER
1999
2000 -- A defining identifier is an entity, which has additional fields
2001 -- depending on the setting of the Ekind field. These additional
2002 -- fields are defined (and access subprograms declared) in package
2003 -- Einfo.
2004
2005 -- Note: N_Defining_Identifier is an extended node whose fields are
2006 -- deliberate layed out to match the layout of fields in an ordinary
2007 -- N_Identifier node allowing for easy alteration of an identifier
2008 -- node into a defining identifier node. For details, see procedure
2009 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
2010
2011 -- N_Defining_Identifier
2012 -- Sloc points to identifier
2013 -- Chars (Name1) contains the Name_Id for the identifier
2014 -- Next_Entity (Node2-Sem)
2015 -- Scope (Node3-Sem)
2016 -- Etype (Node5-Sem)
2017
2018 -----------------------------
2019 -- 3.2.1 Type Declaration --
2020 -----------------------------
2021
2022 -- TYPE_DECLARATION ::=
2023 -- FULL_TYPE_DECLARATION
2024 -- | INCOMPLETE_TYPE_DECLARATION
2025 -- | PRIVATE_TYPE_DECLARATION
2026 -- | PRIVATE_EXTENSION_DECLARATION
2027
2028 ----------------------------------
2029 -- 3.2.1 Full Type Declaration --
2030 ----------------------------------
2031
2032 -- FULL_TYPE_DECLARATION ::=
2033 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2034 -- is TYPE_DEFINITION;
2035 -- | TASK_TYPE_DECLARATION
2036 -- | PROTECTED_TYPE_DECLARATION
2037
2038 -- The full type declaration node is used only for the first case. The
2039 -- second case (concurrent type declaration), is represented directly
2040 -- by a task type declaration or a protected type declaration.
2041
2042 -- N_Full_Type_Declaration
2043 -- Sloc points to TYPE
2044 -- Defining_Identifier (Node1)
2045 -- Discriminant_Specifications (List4) (set to No_List if none)
2046 -- Type_Definition (Node3)
2047 -- Discr_Check_Funcs_Built (Flag11-Sem)
2048
2049 ----------------------------
2050 -- 3.2.1 Type Definition --
2051 ----------------------------
2052
2053 -- TYPE_DEFINITION ::=
2054 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2055 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2056 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
2057 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
2058
2059 --------------------------------
2060 -- 3.2.2 Subtype Declaration --
2061 --------------------------------
2062
2063 -- SUBTYPE_DECLARATION ::=
2064 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION;
2065
2066 -- The subtype indication field is set to Empty for subtypes
2067 -- declared in package Standard (Positive, Natural).
2068
2069 -- N_Subtype_Declaration
2070 -- Sloc points to SUBTYPE
2071 -- Defining_Identifier (Node1)
2072 -- Null_Exclusion_Present (Flag11)
2073 -- Subtype_Indication (Node5)
2074 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2075 -- Exception_Junk (Flag8-Sem)
2076
2077 -------------------------------
2078 -- 3.2.2 Subtype Indication --
2079 -------------------------------
2080
2081 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2082
2083 -- Note: if no constraint is present, the subtype indication appears
2084 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2085 -- node is used only if a constraint is present.
2086
2087 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2088 -- with the null-exclusion part (see AI-231), we had to introduce a new
2089 -- attribute in all the parents of subtype_indication nodes to indicate
2090 -- if the null-exclusion is present.
2091
2092 -- Note: the reason that this node has expression fields is that a
2093 -- subtype indication can appear as an operand of a membership test.
2094
2095 -- N_Subtype_Indication
2096 -- Sloc points to first token of subtype mark
2097 -- Subtype_Mark (Node4)
2098 -- Constraint (Node3)
2099 -- Etype (Node5-Sem)
2100 -- Must_Not_Freeze (Flag8-Sem)
2101
2102 -- Note: Etype is a copy of the Etype field of the Subtype_Mark. The
2103 -- reason for this redundancy is so that in a list of array index types,
2104 -- the Etype can be uniformly accessed to determine the subscript type.
2105 -- This means that no Itype is constructed for the actual subtype that
2106 -- is created by the subtype indication. If such an Itype is required,
2107 -- it is constructed in the context in which the indication appears.
2108
2109 -------------------------
2110 -- 3.2.2 Subtype Mark --
2111 -------------------------
2112
2113 -- SUBTYPE_MARK ::= subtype_NAME
2114
2115 -----------------------
2116 -- 3.2.2 Constraint --
2117 -----------------------
2118
2119 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2120
2121 ------------------------------
2122 -- 3.2.2 Scalar Constraint --
2123 ------------------------------
2124
2125 -- SCALAR_CONSTRAINT ::=
2126 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2127
2128 ---------------------------------
2129 -- 3.2.2 Composite Constraint --
2130 ---------------------------------
2131
2132 -- COMPOSITE_CONSTRAINT ::=
2133 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2134
2135 -------------------------------
2136 -- 3.3.1 Object Declaration --
2137 -------------------------------
2138
2139 -- OBJECT_DECLARATION ::=
2140 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2141 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION];
2142 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2143 -- ACCESS_DEFINITION [:= EXPRESSION];
2144 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2145 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION];
2146 -- | SINGLE_TASK_DECLARATION
2147 -- | SINGLE_PROTECTED_DECLARATION
2148
2149 -- Note: aliased is not permitted in Ada 83 mode
2150
2151 -- The N_Object_Declaration node is only for the first two cases.
2152 -- Single task declaration is handled by P_Task (9.1)
2153 -- Single protected declaration is handled by P_protected (9.5)
2154
2155 -- Although the syntax allows multiple identifiers in the list, the
2156 -- semantics is as though successive declarations were given with
2157 -- identical type definition and expression components. To simplify
2158 -- semantic processing, the parser represents a multiple declaration
2159 -- case as a sequence of single declarations, using the More_Ids and
2160 -- Prev_Ids flags to preserve the original source form as described
2161 -- in the section on "Handling of Defining Identifier Lists".
2162
2163 -- The flag Has_Init_Expression is set if an initializing expression
2164 -- is present. Normally it is set if and only if Expression contains
2165 -- a non-empty value, but there is an exception to this. When the
2166 -- initializing expression is an aggregate which requires explicit
2167 -- assignments, the Expression field gets set to Empty, but this flag
2168 -- is still set, so we don't forget we had an initializing expression.
2169
2170 -- Note: if a range check is required for the initialization
2171 -- expression then the Do_Range_Check flag is set in the Expression,
2172 -- with the check being done against the type given by the object
2173 -- definition, which is also the Etype of the defining identifier.
2174
2175 -- Note: the contents of the Expression field must be ignored (i.e.
2176 -- treated as though it were Empty) if No_Initialization is set True.
2177
2178 -- Note: the back end places some restrictions on the form of the
2179 -- Expression field. If the object being declared is Atomic, then
2180 -- the Expression may not have the form of an aggregate (since this
2181 -- might cause the back end to generate separate assignments). In this
2182 -- case the front end must generate an extra temporary and initialize
2183 -- this temporary as required (the temporary itself is not atomic).
2184
2185 -- Note: there is not node kind for object definition. Instead, the
2186 -- corresponding field holds a subtype indication, an array type
2187 -- definition, or (Ada 2005, AI-406) an access definition.
2188
2189 -- N_Object_Declaration
2190 -- Sloc points to first identifier
2191 -- Defining_Identifier (Node1)
2192 -- Aliased_Present (Flag4) set if ALIASED appears
2193 -- Constant_Present (Flag17) set if CONSTANT appears
2194 -- Null_Exclusion_Present (Flag11)
2195 -- Object_Definition (Node4) subtype indic./array type def./access def.
2196 -- Expression (Node3) (set to Empty if not present)
2197 -- Handler_List_Entry (Node2-Sem)
2198 -- Corresponding_Generic_Association (Node5-Sem)
2199 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2200 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2201 -- No_Initialization (Flag13-Sem)
2202 -- Assignment_OK (Flag15-Sem)
2203 -- Exception_Junk (Flag8-Sem)
2204 -- Is_Subprogram_Descriptor (Flag16-Sem)
2205 -- Has_Init_Expression (Flag14)
2206
2207 -------------------------------------
2208 -- 3.3.1 Defining Identifier List --
2209 -------------------------------------
2210
2211 -- DEFINING_IDENTIFIER_LIST ::=
2212 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2213
2214 -------------------------------
2215 -- 3.3.2 Number Declaration --
2216 -------------------------------
2217
2218 -- NUMBER_DECLARATION ::=
2219 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2220
2221 -- Although the syntax allows multiple identifiers in the list, the
2222 -- semantics is as though successive declarations were given with
2223 -- identical expressions. To simplify semantic processing, the parser
2224 -- represents a multiple declaration case as a sequence of single
2225 -- declarations, using the More_Ids and Prev_Ids flags to preserve
2226 -- the original source form as described in the section on "Handling
2227 -- of Defining Identifier Lists".
2228
2229 -- N_Number_Declaration
2230 -- Sloc points to first identifier
2231 -- Defining_Identifier (Node1)
2232 -- Expression (Node3)
2233 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2234 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2235
2236 ----------------------------------
2237 -- 3.4 Derived Type Definition --
2238 ----------------------------------
2239
2240 -- DERIVED_TYPE_DEFINITION ::=
2241 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2242 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2243
2244 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
2245 -- in Ada 83 mode
2246
2247 -- Note: a record extension part is required if ABSTRACT is present
2248
2249 -- N_Derived_Type_Definition
2250 -- Sloc points to NEW
2251 -- Abstract_Present (Flag4)
2252 -- Null_Exclusion_Present (Flag11) (set to False if not present)
2253 -- Subtype_Indication (Node5)
2254 -- Record_Extension_Part (Node3) (set to Empty if not present)
2255 -- Limited_Present (Flag17)
2256 -- Task_Present (Flag5) set in task interfaces
2257 -- Protected_Present (Flag6) set in protected interfaces
2258 -- Synchronized_Present (Flag7) set in interfaces
2259 -- Interface_List (List2) (set to No_List if none)
2260 -- Interface_Present (Flag16) set in abstract interfaces
2261
2262 -- Note: Task_Present, Protected_Present, Synchronized_Present,
2263 -- Interface_List, and Interface_Present are used for abstract
2264 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2265
2266 ---------------------------
2267 -- 3.5 Range Constraint --
2268 ---------------------------
2269
2270 -- RANGE_CONSTRAINT ::= range RANGE
2271
2272 -- N_Range_Constraint
2273 -- Sloc points to RANGE
2274 -- Range_Expression (Node4)
2275
2276 ----------------
2277 -- 3.5 Range --
2278 ----------------
2279
2280 -- RANGE ::=
2281 -- RANGE_ATTRIBUTE_REFERENCE
2282 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2283
2284 -- Note: the case of a range given as a range attribute reference
2285 -- appears directly in the tree as an attribute reference.
2286
2287 -- Note: the field name for a reference to a range is Range_Expression
2288 -- rather than Range, because range is a reserved keyword in Ada!
2289
2290 -- Note: the reason that this node has expression fields is that a
2291 -- range can appear as an operand of a membership test. The Etype
2292 -- field is the type of the range (we do NOT construct an implicit
2293 -- subtype to represent the range exactly).
2294
2295 -- N_Range
2296 -- Sloc points to ..
2297 -- Low_Bound (Node1)
2298 -- High_Bound (Node2)
2299 -- Includes_Infinities (Flag11)
2300 -- plus fields for expression
2301
2302 -- Note: if the range appears in a context, such as a subtype
2303 -- declaration, where range checks are required on one or both of
2304 -- the expression fields, then type conversion nodes are inserted
2305 -- to represent the required checks.
2306
2307 ----------------------------------------
2308 -- 3.5.1 Enumeration Type Definition --
2309 ----------------------------------------
2310
2311 -- ENUMERATION_TYPE_DEFINITION ::=
2312 -- (ENUMERATION_LITERAL_SPECIFICATION
2313 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2314
2315 -- Note: the Literals field in the node described below is null for
2316 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2317 -- which special processing handles these types as special cases.
2318
2319 -- N_Enumeration_Type_Definition
2320 -- Sloc points to left parenthesis
2321 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2322 -- End_Label (Node4) (set to Empty if internally generated record)
2323
2324 ----------------------------------------------
2325 -- 3.5.1 Enumeration Literal Specification --
2326 ----------------------------------------------
2327
2328 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2329 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2330
2331 ---------------------------------------
2332 -- 3.5.1 Defining Character Literal --
2333 ---------------------------------------
2334
2335 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2336
2337 -- A defining character literal is an entity, which has additional
2338 -- fields depending on the setting of the Ekind field. These
2339 -- additional fields are defined (and access subprograms declared)
2340 -- in package Einfo.
2341
2342 -- Note: N_Defining_Character_Literal is an extended node whose fields
2343 -- are deliberate layed out to match the layout of fields in an ordinary
2344 -- N_Character_Literal node allowing for easy alteration of a character
2345 -- literal node into a defining character literal node. For details, see
2346 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2347
2348 -- N_Defining_Character_Literal
2349 -- Sloc points to literal
2350 -- Chars (Name1) contains the Name_Id for the identifier
2351 -- Next_Entity (Node2-Sem)
2352 -- Scope (Node3-Sem)
2353 -- Etype (Node5-Sem)
2354
2355 ------------------------------------
2356 -- 3.5.4 Integer Type Definition --
2357 ------------------------------------
2358
2359 -- Note: there is an error in this rule in the latest version of the
2360 -- grammar, so we have retained the old rule pending clarification.
2361
2362 -- INTEGER_TYPE_DEFINITION ::=
2363 -- SIGNED_INTEGER_TYPE_DEFINITION
2364 -- | MODULAR_TYPE_DEFINITION
2365
2366 -------------------------------------------
2367 -- 3.5.4 Signed Integer Type Definition --
2368 -------------------------------------------
2369
2370 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2371 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2372
2373 -- Note: the Low_Bound and High_Bound fields are set to Empty
2374 -- for integer types defined in package Standard.
2375
2376 -- N_Signed_Integer_Type_Definition
2377 -- Sloc points to RANGE
2378 -- Low_Bound (Node1)
2379 -- High_Bound (Node2)
2380
2381 ------------------------------------
2382 -- 3.5.4 Modular Type Definition --
2383 ------------------------------------
2384
2385 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2386
2387 -- N_Modular_Type_Definition
2388 -- Sloc points to MOD
2389 -- Expression (Node3)
2390
2391 ---------------------------------
2392 -- 3.5.6 Real Type Definition --
2393 ---------------------------------
2394
2395 -- REAL_TYPE_DEFINITION ::=
2396 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2397
2398 --------------------------------------
2399 -- 3.5.7 Floating Point Definition --
2400 --------------------------------------
2401
2402 -- FLOATING_POINT_DEFINITION ::=
2403 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2404
2405 -- Note: The Digits_Expression and Real_Range_Specifications fields
2406 -- are set to Empty for floating-point types declared in Standard.
2407
2408 -- N_Floating_Point_Definition
2409 -- Sloc points to DIGITS
2410 -- Digits_Expression (Node2)
2411 -- Real_Range_Specification (Node4) (set to Empty if not present)
2412
2413 -------------------------------------
2414 -- 3.5.7 Real Range Specification --
2415 -------------------------------------
2416
2417 -- REAL_RANGE_SPECIFICATION ::=
2418 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2419
2420 -- N_Real_Range_Specification
2421 -- Sloc points to RANGE
2422 -- Low_Bound (Node1)
2423 -- High_Bound (Node2)
2424
2425 -----------------------------------
2426 -- 3.5.9 Fixed Point Definition --
2427 -----------------------------------
2428
2429 -- FIXED_POINT_DEFINITION ::=
2430 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2431
2432 --------------------------------------------
2433 -- 3.5.9 Ordinary Fixed Point Definition --
2434 --------------------------------------------
2435
2436 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2437 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2438
2439 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2440
2441 -- N_Ordinary_Fixed_Point_Definition
2442 -- Sloc points to DELTA
2443 -- Delta_Expression (Node3)
2444 -- Real_Range_Specification (Node4)
2445
2446 -------------------------------------------
2447 -- 3.5.9 Decimal Fixed Point Definition --
2448 -------------------------------------------
2449
2450 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2451 -- delta static_EXPRESSION
2452 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2453
2454 -- Note: decimal types are not permitted in Ada 83 mode
2455
2456 -- N_Decimal_Fixed_Point_Definition
2457 -- Sloc points to DELTA
2458 -- Delta_Expression (Node3)
2459 -- Digits_Expression (Node2)
2460 -- Real_Range_Specification (Node4) (set to Empty if not present)
2461
2462 ------------------------------
2463 -- 3.5.9 Digits Constraint --
2464 ------------------------------
2465
2466 -- DIGITS_CONSTRAINT ::=
2467 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2468
2469 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2470 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2471
2472 -- N_Digits_Constraint
2473 -- Sloc points to DIGITS
2474 -- Digits_Expression (Node2)
2475 -- Range_Constraint (Node4) (set to Empty if not present)
2476
2477 --------------------------------
2478 -- 3.6 Array Type Definition --
2479 --------------------------------
2480
2481 -- ARRAY_TYPE_DEFINITION ::=
2482 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2483
2484 -----------------------------------------
2485 -- 3.6 Unconstrained Array Definition --
2486 -----------------------------------------
2487
2488 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2489 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2490 -- COMPONENT_DEFINITION
2491
2492 -- Note: dimensionality of array is indicated by number of entries in
2493 -- the Subtype_Marks list, which has one entry for each dimension.
2494
2495 -- N_Unconstrained_Array_Definition
2496 -- Sloc points to ARRAY
2497 -- Subtype_Marks (List2)
2498 -- Component_Definition (Node4)
2499
2500 -----------------------------------
2501 -- 3.6 Index Subtype Definition --
2502 -----------------------------------
2503
2504 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2505
2506 -- There is no explicit node in the tree for an index subtype
2507 -- definition since the N_Unconstrained_Array_Definition node
2508 -- incorporates the type marks which appear in this context.
2509
2510 ---------------------------------------
2511 -- 3.6 Constrained Array Definition --
2512 ---------------------------------------
2513
2514 -- CONSTRAINED_ARRAY_DEFINITION ::=
2515 -- array (DISCRETE_SUBTYPE_DEFINITION
2516 -- {, DISCRETE_SUBTYPE_DEFINITION})
2517 -- of COMPONENT_DEFINITION
2518
2519 -- Note: dimensionality of array is indicated by number of entries
2520 -- in the Discrete_Subtype_Definitions list, which has one entry
2521 -- for each dimension.
2522
2523 -- N_Constrained_Array_Definition
2524 -- Sloc points to ARRAY
2525 -- Discrete_Subtype_Definitions (List2)
2526 -- Component_Definition (Node4)
2527
2528 --------------------------------------
2529 -- 3.6 Discrete Subtype Definition --
2530 --------------------------------------
2531
2532 -- DISCRETE_SUBTYPE_DEFINITION ::=
2533 -- discrete_SUBTYPE_INDICATION | RANGE
2534
2535 -------------------------------
2536 -- 3.6 Component Definition --
2537 -------------------------------
2538
2539 -- COMPONENT_DEFINITION ::=
2540 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
2541
2542 -- Note: although the syntax does not permit a component definition to
2543 -- be an anonymous array (and the parser will diagnose such an attempt
2544 -- with an appropriate message), it is possible for anonymous arrays
2545 -- to appear as component definitions. The semantics and back end handle
2546 -- this case properly, and the expander in fact generates such cases.
2547 -- Access_Definition is an optional field that gives support to
2548 -- Ada 2005 (AI-230). The parser generates nodes that have either the
2549 -- Subtype_Indication field or else the Access_Definition field.
2550
2551 -- N_Component_Definition
2552 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
2553 -- Aliased_Present (Flag4)
2554 -- Null_Exclusion_Present (Flag11)
2555 -- Subtype_Indication (Node5) (set to Empty if not present)
2556 -- Access_Definition (Node3) (set to Empty if not present)
2557
2558 -----------------------------
2559 -- 3.6.1 Index Constraint --
2560 -----------------------------
2561
2562 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
2563
2564 -- It is not in general possible to distinguish between discriminant
2565 -- constraints and index constraints at parse time, since a simple
2566 -- name could be either the subtype mark of a discrete range, or an
2567 -- expression in a discriminant association with no name. Either
2568 -- entry appears simply as the name, and the semantic parse must
2569 -- distinguish between the two cases. Thus we use a common tree
2570 -- node format for both of these constraint types.
2571
2572 -- See Discriminant_Constraint for format of node
2573
2574 ---------------------------
2575 -- 3.6.1 Discrete Range --
2576 ---------------------------
2577
2578 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
2579
2580 ----------------------------
2581 -- 3.7 Discriminant Part --
2582 ----------------------------
2583
2584 -- DISCRIMINANT_PART ::=
2585 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
2586
2587 ------------------------------------
2588 -- 3.7 Unknown Discriminant Part --
2589 ------------------------------------
2590
2591 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
2592
2593 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
2594
2595 -- There is no explicit node in the tree for an unknown discriminant
2596 -- part. Instead the Unknown_Discriminants_Present flag is set in the
2597 -- parent node.
2598
2599 ----------------------------------
2600 -- 3.7 Known Discriminant Part --
2601 ----------------------------------
2602
2603 -- KNOWN_DISCRIMINANT_PART ::=
2604 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
2605
2606 -------------------------------------
2607 -- 3.7 Discriminant Specification --
2608 -------------------------------------
2609
2610 -- DISCRIMINANT_SPECIFICATION ::=
2611 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
2612 -- [:= DEFAULT_EXPRESSION]
2613 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
2614 -- [:= DEFAULT_EXPRESSION]
2615
2616 -- Although the syntax allows multiple identifiers in the list, the
2617 -- semantics is as though successive specifications were given with
2618 -- identical type definition and expression components. To simplify
2619 -- semantic processing, the parser represents a multiple declaration
2620 -- case as a sequence of single specifications, using the More_Ids and
2621 -- Prev_Ids flags to preserve the original source form as described
2622 -- in the section on "Handling of Defining Identifier Lists".
2623
2624 -- N_Discriminant_Specification
2625 -- Sloc points to first identifier
2626 -- Defining_Identifier (Node1)
2627 -- Null_Exclusion_Present (Flag11)
2628 -- Discriminant_Type (Node5) subtype mark or access parameter definition
2629 -- Expression (Node3) (set to Empty if no default expression)
2630 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2631 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2632
2633 -----------------------------
2634 -- 3.7 Default Expression --
2635 -----------------------------
2636
2637 -- DEFAULT_EXPRESSION ::= EXPRESSION
2638
2639 ------------------------------------
2640 -- 3.7.1 Discriminant Constraint --
2641 ------------------------------------
2642
2643 -- DISCRIMINANT_CONSTRAINT ::=
2644 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
2645
2646 -- It is not in general possible to distinguish between discriminant
2647 -- constraints and index constraints at parse time, since a simple
2648 -- name could be either the subtype mark of a discrete range, or an
2649 -- expression in a discriminant association with no name. Either
2650 -- entry appears simply as the name, and the semantic parse must
2651 -- distinguish between the two cases. Thus we use a common tree
2652 -- node format for both of these constraint types.
2653
2654 -- N_Index_Or_Discriminant_Constraint
2655 -- Sloc points to left paren
2656 -- Constraints (List1) points to list of discrete ranges or
2657 -- discriminant associations
2658
2659 -------------------------------------
2660 -- 3.7.1 Discriminant Association --
2661 -------------------------------------
2662
2663 -- DISCRIMINANT_ASSOCIATION ::=
2664 -- [discriminant_SELECTOR_NAME
2665 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
2666
2667 -- Note: a discriminant association that has no selector name list
2668 -- appears directly as an expression in the tree.
2669
2670 -- N_Discriminant_Association
2671 -- Sloc points to first token of discriminant association
2672 -- Selector_Names (List1) (always non-empty, since if no selector
2673 -- names are present, this node is not used, see comment above)
2674 -- Expression (Node3)
2675
2676 ---------------------------------
2677 -- 3.8 Record Type Definition --
2678 ---------------------------------
2679
2680 -- RECORD_TYPE_DEFINITION ::=
2681 -- [[abstract] tagged] [limited] RECORD_DEFINITION
2682
2683 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
2684
2685 -- There is no explicit node in the tree for a record type definition.
2686 -- Instead the flags for Tagged_Present and Limited_Present appear in
2687 -- the N_Record_Definition node for a record definition appearing in
2688 -- the context of a record type definition.
2689
2690 ----------------------------
2691 -- 3.8 Record Definition --
2692 ----------------------------
2693
2694 -- RECORD_DEFINITION ::=
2695 -- record
2696 -- COMPONENT_LIST
2697 -- end record
2698 -- | null record
2699
2700 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
2701 -- flags appear only for a record definition appearing in a record
2702 -- type definition.
2703
2704 -- Note: the NULL RECORD case is not permitted in Ada 83
2705
2706 -- N_Record_Definition
2707 -- Sloc points to RECORD or NULL
2708 -- End_Label (Node4) (set to Empty if internally generated record)
2709 -- Abstract_Present (Flag4)
2710 -- Tagged_Present (Flag15)
2711 -- Limited_Present (Flag17)
2712 -- Component_List (Node1) empty in null record case
2713 -- Null_Present (Flag13) set in null record case
2714 -- Task_Present (Flag5) set in task interfaces
2715 -- Protected_Present (Flag6) set in protected interfaces
2716 -- Synchronized_Present (Flag7) set in interfaces
2717 -- Interface_Present (Flag16) set in abstract interfaces
2718 -- Interface_List (List2) (set to No_List if none)
2719
2720 -- Note: Task_Present, Protected_Present, Synchronized _Present,
2721 -- Interface_List and Interface_Present are used for abstract
2722 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2723
2724 -------------------------
2725 -- 3.8 Component List --
2726 -------------------------
2727
2728 -- COMPONENT_LIST ::=
2729 -- COMPONENT_ITEM {COMPONENT_ITEM}
2730 -- | {COMPONENT_ITEM} VARIANT_PART
2731 -- | null;
2732
2733 -- N_Component_List
2734 -- Sloc points to first token of component list
2735 -- Component_Items (List3)
2736 -- Variant_Part (Node4) (set to Empty if no variant part)
2737 -- Null_Present (Flag13)
2738
2739 -------------------------
2740 -- 3.8 Component Item --
2741 -------------------------
2742
2743 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
2744
2745 -- Note: A component item can also be a pragma, and in the tree
2746 -- that is obtained after semantic processing, a component item
2747 -- can be an N_Null node resulting from a non-recognized pragma.
2748
2749 --------------------------------
2750 -- 3.8 Component Declaration --
2751 --------------------------------
2752
2753 -- COMPONENT_DECLARATION ::=
2754 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
2755 -- [:= DEFAULT_EXPRESSION]
2756
2757 -- Note: although the syntax does not permit a component definition to
2758 -- be an anonymous array (and the parser will diagnose such an attempt
2759 -- with an appropriate message), it is possible for anonymous arrays
2760 -- to appear as component definitions. The semantics and back end handle
2761 -- this case properly, and the expander in fact generates such cases.
2762
2763 -- Although the syntax allows multiple identifiers in the list, the
2764 -- semantics is as though successive declarations were given with the
2765 -- same component definition and expression components. To simplify
2766 -- semantic processing, the parser represents a multiple declaration
2767 -- case as a sequence of single declarations, using the More_Ids and
2768 -- Prev_Ids flags to preserve the original source form as described
2769 -- in the section on "Handling of Defining Identifier Lists".
2770
2771 -- N_Component_Declaration
2772 -- Sloc points to first identifier
2773 -- Defining_Identifier (Node1)
2774 -- Component_Definition (Node4)
2775 -- Expression (Node3) (set to Empty if no default expression)
2776 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2777 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2778
2779 -------------------------
2780 -- 3.8.1 Variant Part --
2781 -------------------------
2782
2783 -- VARIANT_PART ::=
2784 -- case discriminant_DIRECT_NAME is
2785 -- VARIANT
2786 -- {VARIANT}
2787 -- end case;
2788
2789 -- Note: the variants list can contain pragmas as well as variants.
2790 -- In a properly formed program there is at least one variant.
2791
2792 -- N_Variant_Part
2793 -- Sloc points to CASE
2794 -- Name (Node2)
2795 -- Variants (List1)
2796
2797 --------------------
2798 -- 3.8.1 Variant --
2799 --------------------
2800
2801 -- VARIANT ::=
2802 -- when DISCRETE_CHOICE_LIST =>
2803 -- COMPONENT_LIST
2804
2805 -- N_Variant
2806 -- Sloc points to WHEN
2807 -- Discrete_Choices (List4)
2808 -- Component_List (Node1)
2809 -- Enclosing_Variant (Node2-Sem)
2810 -- Present_Expr (Uint3-Sem)
2811 -- Dcheck_Function (Node5-Sem)
2812
2813 ---------------------------------
2814 -- 3.8.1 Discrete Choice List --
2815 ---------------------------------
2816
2817 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
2818
2819 ----------------------------
2820 -- 3.8.1 Discrete Choice --
2821 ----------------------------
2822
2823 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
2824
2825 -- Note: in Ada 83 mode, the expression must be a simple expression
2826
2827 -- The only choice that appears explicitly is the OTHERS choice, as
2828 -- defined here. Other cases of discrete choice (expression and
2829 -- discrete range) appear directly. This production is also used
2830 -- for the OTHERS possibility of an exception choice.
2831
2832 -- Note: in accordance with the syntax, the parser does not check that
2833 -- OTHERS appears at the end on its own in a choice list context. This
2834 -- is a semantic check.
2835
2836 -- N_Others_Choice
2837 -- Sloc points to OTHERS
2838 -- Others_Discrete_Choices (List1-Sem)
2839 -- All_Others (Flag11-Sem)
2840
2841 ----------------------------------
2842 -- 3.9.1 Record Extension Part --
2843 ----------------------------------
2844
2845 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
2846
2847 -- Note: record extension parts are not permitted in Ada 83 mode
2848
2849 --------------------------------------
2850 -- 3.9.4 Interface Type Definition --
2851 --------------------------------------
2852
2853 -- INTERFACE_TYPE_DEFINITION ::=
2854 -- [limited | task | protected | synchronized]
2855 -- interface [interface_list]
2856
2857 -- Note: Interfaces are implemented with N_Record_Definition and
2858 -- N_Derived_Type_Definition nodes because most of the support
2859 -- for the analysis of abstract types has been reused to
2860 -- analyze abstract interfaces.
2861
2862 ----------------------------------
2863 -- 3.10 Access Type Definition --
2864 ----------------------------------
2865
2866 -- ACCESS_TYPE_DEFINITION ::=
2867 -- ACCESS_TO_OBJECT_DEFINITION
2868 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2869
2870 --------------------------
2871 -- 3.10 Null Exclusion --
2872 --------------------------
2873
2874 -- NULL_EXCLUSION ::= not null
2875
2876 ---------------------------------------
2877 -- 3.10 Access To Object Definition --
2878 ---------------------------------------
2879
2880 -- ACCESS_TO_OBJECT_DEFINITION ::=
2881 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
2882 -- SUBTYPE_INDICATION
2883
2884 -- N_Access_To_Object_Definition
2885 -- Sloc points to ACCESS
2886 -- All_Present (Flag15)
2887 -- Null_Exclusion_Present (Flag11)
2888 -- Subtype_Indication (Node5)
2889 -- Constant_Present (Flag17)
2890
2891 -----------------------------------
2892 -- 3.10 General Access Modifier --
2893 -----------------------------------
2894
2895 -- GENERAL_ACCESS_MODIFIER ::= all | constant
2896
2897 -- Note: general access modifiers are not permitted in Ada 83 mode
2898
2899 -- There is no explicit node in the tree for general access modifier.
2900 -- Instead the All_Present or Constant_Present flags are set in the
2901 -- parent node.
2902
2903 -------------------------------------------
2904 -- 3.10 Access To Subprogram Definition --
2905 -------------------------------------------
2906
2907 -- ACCESS_TO_SUBPROGRAM_DEFINITION
2908 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
2909 -- | [NULL_EXCLUSION] access [protected] function
2910 -- PARAMETER_AND_RESULT_PROFILE
2911
2912 -- Note: access to subprograms are not permitted in Ada 83 mode
2913
2914 -- N_Access_Function_Definition
2915 -- Sloc points to ACCESS
2916 -- Null_Exclusion_Present (Flag11)
2917 -- Null_Exclusion_In_Return_Present (Flag14)
2918 -- Protected_Present (Flag6)
2919 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2920 -- Result_Definition (Node4) result subtype (subtype mark or access def)
2921
2922 -- N_Access_Procedure_Definition
2923 -- Sloc points to ACCESS
2924 -- Null_Exclusion_Present (Flag11)
2925 -- Protected_Present (Flag6)
2926 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2927
2928 -----------------------------
2929 -- 3.10 Access Definition --
2930 -----------------------------
2931
2932 -- ACCESS_DEFINITION ::=
2933 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
2934 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2935
2936 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
2937
2938 -- N_Access_Definition
2939 -- Sloc points to ACCESS
2940 -- Null_Exclusion_Present (Flag11)
2941 -- All_Present (Flag15)
2942 -- Constant_Present (Flag17)
2943 -- Subtype_Mark (Node4)
2944 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
2945
2946 -----------------------------------------
2947 -- 3.10.1 Incomplete Type Declaration --
2948 -----------------------------------------
2949
2950 -- INCOMPLETE_TYPE_DECLARATION ::=
2951 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
2952
2953 -- N_Incomplete_Type_Declaration
2954 -- Sloc points to TYPE
2955 -- Defining_Identifier (Node1)
2956 -- Discriminant_Specifications (List4) (set to No_List if no
2957 -- discriminant part, or if the discriminant part is an
2958 -- unknown discriminant part)
2959 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
2960 -- Tagged_Present (Flag15)
2961
2962 ----------------------------
2963 -- 3.11 Declarative Part --
2964 ----------------------------
2965
2966 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
2967
2968 -- Note: although the parser enforces the syntactic requirement that
2969 -- a declarative part can contain only declarations, the semantic
2970 -- processing may add statements to the list of actions in a
2971 -- declarative part, so the code generator should be prepared
2972 -- to accept a statement in this position.
2973
2974 ----------------------------
2975 -- 3.11 Declarative Item --
2976 ----------------------------
2977
2978 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
2979
2980 ----------------------------------
2981 -- 3.11 Basic Declarative Item --
2982 ----------------------------------
2983
2984 -- BASIC_DECLARATIVE_ITEM ::=
2985 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
2986
2987 ----------------
2988 -- 3.11 Body --
2989 ----------------
2990
2991 -- BODY ::= PROPER_BODY | BODY_STUB
2992
2993 -----------------------
2994 -- 3.11 Proper Body --
2995 -----------------------
2996
2997 -- PROPER_BODY ::=
2998 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
2999
3000 ---------------
3001 -- 4.1 Name --
3002 ---------------
3003
3004 -- NAME ::=
3005 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
3006 -- | INDEXED_COMPONENT | SLICE
3007 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
3008 -- | TYPE_CONVERSION | FUNCTION_CALL
3009 -- | CHARACTER_LITERAL
3010
3011 ----------------------
3012 -- 4.1 Direct Name --
3013 ----------------------
3014
3015 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3016
3017 -----------------
3018 -- 4.1 Prefix --
3019 -----------------
3020
3021 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3022
3023 -------------------------------
3024 -- 4.1 Explicit Dereference --
3025 -------------------------------
3026
3027 -- EXPLICIT_DEREFERENCE ::= NAME . all
3028
3029 -- N_Explicit_Dereference
3030 -- Sloc points to ALL
3031 -- Prefix (Node3)
3032 -- Actual_Designated_Subtype (Node4-Sem)
3033 -- plus fields for expression
3034
3035 -------------------------------
3036 -- 4.1 Implicit Dereference --
3037 -------------------------------
3038
3039 -- IMPLICIT_DEREFERENCE ::= NAME
3040
3041 ------------------------------
3042 -- 4.1.1 Indexed Component --
3043 ------------------------------
3044
3045 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3046
3047 -- Note: the parser may generate this node in some situations where it
3048 -- should be a function call. The semantic pass must correct this
3049 -- misidentification (which is inevitable at the parser level).
3050
3051 -- N_Indexed_Component
3052 -- Sloc contains a copy of the Sloc value of the Prefix
3053 -- Prefix (Node3)
3054 -- Expressions (List1)
3055 -- plus fields for expression
3056
3057 -- Note: if any of the subscripts requires a range check, then the
3058 -- Do_Range_Check flag is set on the corresponding expression, with
3059 -- the index type being determined from the type of the Prefix, which
3060 -- references the array being indexed.
3061
3062 -- Note: in a fully analyzed and expanded indexed component node, and
3063 -- hence in any such node that gigi sees, if the prefix is an access
3064 -- type, then an explicit dereference operation has been inserted.
3065
3066 ------------------
3067 -- 4.1.2 Slice --
3068 ------------------
3069
3070 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3071
3072 -- Note: an implicit subtype is created to describe the resulting
3073 -- type, so that the bounds of this type are the bounds of the slice.
3074
3075 -- N_Slice
3076 -- Sloc points to first token of prefix
3077 -- Prefix (Node3)
3078 -- Discrete_Range (Node4)
3079 -- plus fields for expression
3080
3081 -------------------------------
3082 -- 4.1.3 Selected Component --
3083 -------------------------------
3084
3085 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3086
3087 -- Note: selected components that are semantically expanded names get
3088 -- changed during semantic processing into the separate N_Expanded_Name
3089 -- node. See description of this node in the section on semantic nodes.
3090
3091 -- N_Selected_Component
3092 -- Sloc points to period
3093 -- Prefix (Node3)
3094 -- Selector_Name (Node2)
3095 -- Associated_Node (Node4-Sem)
3096 -- Do_Discriminant_Check (Flag13-Sem)
3097 -- Is_In_Discriminant_Check (Flag11-Sem)
3098 -- plus fields for expression
3099
3100 --------------------------
3101 -- 4.1.3 Selector Name --
3102 --------------------------
3103
3104 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3105
3106 --------------------------------
3107 -- 4.1.4 Attribute Reference --
3108 --------------------------------
3109
3110 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3111
3112 -- Note: the syntax is quite ambiguous at this point. Consider:
3113
3114 -- A'Length (X) X is part of the attribute designator
3115 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
3116 -- A'Class (X) X is the expression of a type conversion
3117
3118 -- It would be possible for the parser to distinguish these cases
3119 -- by looking at the attribute identifier. However, that would mean
3120 -- more work in introducing new implementation defined attributes,
3121 -- and also it would mean that special processing for attributes
3122 -- would be scattered around, instead of being centralized in the
3123 -- semantic routine that handles an N_Attribute_Reference node.
3124 -- Consequently, the parser in all the above cases stores the
3125 -- expression (X in these examples) as a single element list in
3126 -- in the Expressions field of the N_Attribute_Reference node.
3127
3128 -- Similarly, for attributes like Max which take two arguments,
3129 -- we store the two arguments as a two element list in the
3130 -- Expressions field. Of course it is clear at parse time that
3131 -- this case is really a function call with an attribute as the
3132 -- prefix, but it turns out to be convenient to handle the two
3133 -- argument case in a similar manner to the one argument case,
3134 -- and indeed in general the parser will accept any number of
3135 -- expressions in this position and store them as a list in the
3136 -- attribute reference node. This allows for future addition of
3137 -- attributes that take more than two arguments.
3138
3139 -- Note: named associates are not permitted in function calls where
3140 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
3141 -- to skip the normal subprogram argument processing.
3142
3143 -- Note: for the attributes whose designators are technically keywords,
3144 -- i.e. digits, access, delta, range, the Attribute_Name field contains
3145 -- the corresponding name, even though no identifier is involved.
3146
3147 -- Note: the generated code may contain stream attributes applied to
3148 -- limited types for which no stream routines exist officially. In such
3149 -- case, the result is to use the stream attribute for the underlying
3150 -- full type, or in the case of a protected type, the components
3151 -- (including any discriminants) are merely streamed in order.
3152
3153 -- See Exp_Attr for a complete description of which attributes are
3154 -- passed onto Gigi, and which are handled entirely by the front end.
3155
3156 -- Gigi restriction: For the Pos attribute, the prefix cannot be
3157 -- a non-standard enumeration type or a nonzero/zero semantics
3158 -- boolean type, so the value is simply the stored representation.
3159
3160 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
3161 -- references a subprogram that is a renaming, then the front end must
3162 -- rewrite the attribute to refer directly to the renamed entity.
3163
3164 -- Note: In generated code, the Address and Unrestricted_Access
3165 -- attributes can be applied to any expression, and the meaning is
3166 -- to create an object containing the value (the object is in the
3167 -- current stack frame), and pass the address of this value. If the
3168 -- Must_Be_Byte_Aligned flag is set, then the object whose address
3169 -- is taken must be on a byte (storage unit) boundary, and if it is
3170 -- not (or may not be), then the generated code must create a copy
3171 -- that is byte aligned, and pass the address of this copy.
3172
3173 -- N_Attribute_Reference
3174 -- Sloc points to apostrophe
3175 -- Prefix (Node3)
3176 -- Attribute_Name (Name2) identifier name from attribute designator
3177 -- Expressions (List1) (set to No_List if no associated expressions)
3178 -- Entity (Node4-Sem) used if the attribute yields a type
3179 -- Associated_Node (Node4-Sem)
3180 -- Do_Overflow_Check (Flag17-Sem)
3181 -- Redundant_Use (Flag13-Sem)
3182 -- Must_Be_Byte_Aligned (Flag14)
3183 -- plus fields for expression
3184
3185 ---------------------------------
3186 -- 4.1.4 Attribute Designator --
3187 ---------------------------------
3188
3189 -- ATTRIBUTE_DESIGNATOR ::=
3190 -- IDENTIFIER [(static_EXPRESSION)]
3191 -- | access | delta | digits
3192
3193 -- There is no explicit node in the tree for an attribute designator.
3194 -- Instead the Attribute_Name and Expressions fields of the parent
3195 -- node (N_Attribute_Reference node) hold the information.
3196
3197 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
3198 -- designator, then they are treated as identifiers internally
3199 -- rather than the keywords of the same name.
3200
3201 --------------------------------------
3202 -- 4.1.4 Range Attribute Reference --
3203 --------------------------------------
3204
3205 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3206
3207 -- A range attribute reference is represented in the tree using the
3208 -- normal N_Attribute_Reference node.
3209
3210 ---------------------------------------
3211 -- 4.1.4 Range Attribute Designator --
3212 ---------------------------------------
3213
3214 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3215
3216 -- A range attribute designator is represented in the tree using the
3217 -- normal N_Attribute_Reference node.
3218
3219 --------------------
3220 -- 4.3 Aggregate --
3221 --------------------
3222
3223 -- AGGREGATE ::=
3224 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3225
3226 -----------------------------
3227 -- 4.3.1 Record Aggregate --
3228 -----------------------------
3229
3230 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3231
3232 -- N_Aggregate
3233 -- Sloc points to left parenthesis
3234 -- Expressions (List1) (set to No_List if none or null record case)
3235 -- Component_Associations (List2) (set to No_List if none)
3236 -- Null_Record_Present (Flag17)
3237 -- Aggregate_Bounds (Node3-Sem)
3238 -- Associated_Node (Node4-Sem)
3239 -- Static_Processing_OK (Flag4-Sem)
3240 -- Compile_Time_Known_Aggregate (Flag18-Sem)
3241 -- Expansion_Delayed (Flag11-Sem)
3242 -- Has_Self_Reference (Flag13-Sem)
3243 -- plus fields for expression
3244
3245 -- Note: this structure is used for both record and array aggregates
3246 -- since the two cases are not separable by the parser. The parser
3247 -- makes no attempt to enforce consistency here, so it is up to the
3248 -- semantic phase to make sure that the aggregate is consistent (i.e.
3249 -- that it is not a "half-and-half" case that mixes record and array
3250 -- syntax. In particular, for a record aggregate, the expressions
3251 -- field will be set if there are positional associations.
3252
3253 -- Note: N_Aggregate is not used for all aggregates; in particular,
3254 -- there is a separate node kind for extension aggregates.
3255
3256 -- Note: gigi/gcc can handle array aggregates correctly providing that
3257 -- they are entirely positional, and the array subtype involved has a
3258 -- known at compile time length and is not bit packed, or a convention
3259 -- Fortran array with more than one dimension. If these conditions
3260 -- are not met, then the front end must translate the aggregate into
3261 -- an appropriate set of assignments into a temporary.
3262
3263 -- Note: for the record aggregate case, gigi/gcc can handle all cases
3264 -- of record aggregates, including those for packed, and rep-claused
3265 -- records, and also variant records, providing that there are no
3266 -- variable length fields whose size is not known at runtime, and
3267 -- providing that the aggregate is presented in fully named form.
3268
3269 ----------------------------------------------
3270 -- 4.3.1 Record Component Association List --
3271 ----------------------------------------------
3272
3273 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
3274 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3275 -- | null record
3276
3277 -- There is no explicit node in the tree for a record component
3278 -- association list. Instead the Null_Record_Present flag is set in
3279 -- the parent node for the NULL RECORD case.
3280
3281 ------------------------------------------------------
3282 -- 4.3.1 Record Component Association (also 4.3.3) --
3283 ------------------------------------------------------
3284
3285 -- RECORD_COMPONENT_ASSOCIATION ::=
3286 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
3287
3288 -- N_Component_Association
3289 -- Sloc points to first selector name
3290 -- Choices (List1)
3291 -- Loop_Actions (List2-Sem)
3292 -- Expression (Node3)
3293 -- Box_Present (Flag15)
3294
3295 -- Note: this structure is used for both record component associations
3296 -- and array component associations, since the two cases aren't always
3297 -- separable by the parser. The choices list may represent either a
3298 -- list of selector names in the record aggregate case, or a list of
3299 -- discrete choices in the array aggregate case or an N_Others_Choice
3300 -- node (which appears as a singleton list). Box_Present gives support
3301 -- to Ada 2005 (AI-287).
3302
3303 ----------------------------------
3304 -- 4.3.1 Component Choice List --
3305 ----------------------------------
3306
3307 -- COMPONENT_CHOICE_LIST ::=
3308 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
3309 -- | others
3310
3311 -- The entries of a component choice list appear in the Choices list of
3312 -- the associated N_Component_Association, as either selector names, or
3313 -- as an N_Others_Choice node.
3314
3315 --------------------------------
3316 -- 4.3.2 Extension Aggregate --
3317 --------------------------------
3318
3319 -- EXTENSION_AGGREGATE ::=
3320 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3321
3322 -- Note: extension aggregates are not permitted in Ada 83 mode
3323
3324 -- N_Extension_Aggregate
3325 -- Sloc points to left parenthesis
3326 -- Ancestor_Part (Node3)
3327 -- Associated_Node (Node4-Sem)
3328 -- Expressions (List1) (set to No_List if none or null record case)
3329 -- Component_Associations (List2) (set to No_List if none)
3330 -- Null_Record_Present (Flag17)
3331 -- Expansion_Delayed (Flag11-Sem)
3332 -- Has_Self_Reference (Flag13-Sem)
3333 -- plus fields for expression
3334
3335 --------------------------
3336 -- 4.3.2 Ancestor Part --
3337 --------------------------
3338
3339 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3340
3341 ----------------------------
3342 -- 4.3.3 Array Aggregate --
3343 ----------------------------
3344
3345 -- ARRAY_AGGREGATE ::=
3346 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3347
3348 ---------------------------------------
3349 -- 4.3.3 Positional Array Aggregate --
3350 ---------------------------------------
3351
3352 -- POSITIONAL_ARRAY_AGGREGATE ::=
3353 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3354 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3355
3356 -- See Record_Aggregate (4.3.1) for node structure
3357
3358 ----------------------------------
3359 -- 4.3.3 Named Array Aggregate --
3360 ----------------------------------
3361
3362 -- NAMED_ARRAY_AGGREGATE ::=
3363 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3364
3365 -- See Record_Aggregate (4.3.1) for node structure
3366
3367 ----------------------------------------
3368 -- 4.3.3 Array Component Association --
3369 ----------------------------------------
3370
3371 -- ARRAY_COMPONENT_ASSOCIATION ::=
3372 -- DISCRETE_CHOICE_LIST => EXPRESSION
3373
3374 -- See Record_Component_Association (4.3.1) for node structure
3375
3376 --------------------------------------------------
3377 -- 4.4 Expression/Relation/Term/Factor/Primary --
3378 --------------------------------------------------
3379
3380 -- EXPRESSION ::=
3381 -- RELATION {and RELATION} | RELATION {and then RELATION}
3382 -- | RELATION {or RELATION} | RELATION {or else RELATION}
3383 -- | RELATION {xor RELATION}
3384
3385 -- RELATION ::=
3386 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3387 -- | SIMPLE_EXPRESSION [not] in RANGE
3388 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3389
3390 -- SIMPLE_EXPRESSION ::=
3391 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3392
3393 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3394
3395 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3396
3397 -- No nodes are generated for any of these constructs. Instead, the
3398 -- node for the operator appears directly. When we refer to an
3399 -- expression in this description, we mean any of the possible
3400 -- constituent components of an expression (e.g. identifier is
3401 -- an example of an expression).
3402
3403 ------------------
3404 -- 4.4 Primary --
3405 ------------------
3406
3407 -- PRIMARY ::=
3408 -- NUMERIC_LITERAL | null
3409 -- | STRING_LITERAL | AGGREGATE
3410 -- | NAME | QUALIFIED_EXPRESSION
3411 -- | ALLOCATOR | (EXPRESSION)
3412
3413 -- Usually there is no explicit node in the tree for primary. Instead
3414 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3415 -- exceptions. First, there is an explicit node for a null primary.
3416
3417 -- N_Null
3418 -- Sloc points to NULL
3419 -- plus fields for expression
3420
3421 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3422 -- that the parser keep track of which subexpressions are enclosed
3423 -- in parentheses, and how many levels of parentheses are used. This
3424 -- information is required for optimization purposes, and also for
3425 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3426 -- conform with ((((1)))) in the body).
3427
3428 -- The parentheses are recorded by keeping a Paren_Count field in every
3429 -- subexpression node (it is actually present in all nodes, but only
3430 -- used in subexpression nodes). This count records the number of
3431 -- levels of parentheses. If the number of levels in the source exceeds
3432 -- the maximum accommodated by this count, then the count is simply left
3433 -- at the maximum value. This means that there are some pathological
3434 -- cases of failure to detect conformance failures (e.g. an expression
3435 -- with 500 levels of parens will conform with one with 501 levels),
3436 -- but we do not need to lose sleep over this.
3437
3438 -- Historical note: in versions of GNAT prior to 1.75, there was a node
3439 -- type N_Parenthesized_Expression used to accurately record unlimited
3440 -- numbers of levels of parentheses. However, it turned out to be a
3441 -- real nuisance to have to take into account the possible presence of
3442 -- this node during semantic analysis, since basically parentheses have
3443 -- zero relevance to semantic analysis.
3444
3445 -- Note: the level of parentheses always present in things like
3446 -- aggregates does not count, only the parentheses in the primary
3447 -- (EXPRESSION) affect the setting of the Paren_Count field.
3448
3449 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
3450 -- treated as though it were Empty) if No_Initialization is set True.
3451
3452 --------------------------------------
3453 -- 4.5 Short Circuit Control Forms --
3454 --------------------------------------
3455
3456 -- EXPRESSION ::=
3457 -- RELATION {and then RELATION} | RELATION {or else RELATION}
3458
3459 -- Gigi restriction: For both these control forms, the operand and
3460 -- result types are always Standard.Boolean. The expander inserts the
3461 -- required conversion operations where needed to ensure this is the
3462 -- case.
3463
3464 -- N_And_Then
3465 -- Sloc points to AND of AND THEN
3466 -- Left_Opnd (Node2)
3467 -- Right_Opnd (Node3)
3468 -- Actions (List1-Sem)
3469 -- plus fields for expression
3470
3471 -- N_Or_Else
3472 -- Sloc points to OR of OR ELSE
3473 -- Left_Opnd (Node2)
3474 -- Right_Opnd (Node3)
3475 -- Actions (List1-Sem)
3476 -- plus fields for expression
3477
3478 -- Note: The Actions field is used to hold actions associated with
3479 -- the right hand operand. These have to be treated specially since
3480 -- they are not unconditionally executed. See Insert_Actions for a
3481 -- more detailed description of how these actions are handled.
3482
3483 ---------------------------
3484 -- 4.5 Membership Tests --
3485 ---------------------------
3486
3487 -- RELATION ::=
3488 -- SIMPLE_EXPRESSION [not] in RANGE
3489 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3490
3491 -- Note: although the grammar above allows only a range or a subtype
3492 -- mark, the parser in fact will accept any simple expression in place
3493 -- of a subtype mark. This means that the semantic analyzer must be able
3494 -- to deal with, and diagnose a simple expression other than a name for
3495 -- the right operand. This simplifies error recovery in the parser.
3496
3497 -- If extensions are enabled, the grammar is as follows:
3498
3499 -- RELATION ::=
3500 -- SIMPLE_EXPRESSION [not] in SET_ALTERNATIVE {| SET_ALTERNATIVE}
3501
3502 -- SET_ALTERNATIVE ::= RANGE | SUBTYPE_MARK
3503
3504 -- The Alternatives field below is present only if there is more than
3505 -- one Set_Alternative present, in which case Right_Opnd is set to
3506 -- Empty, and Alternatives contains the list of alternatives. In the
3507 -- tree passed to the back end, Alternatives is always No_List, and
3508 -- Right_Opnd is set (i.e. the expansion circuitry expands out the
3509 -- complex set membership case using simple membership operations).
3510
3511 -- N_In
3512 -- Sloc points to IN
3513 -- Left_Opnd (Node2)
3514 -- Right_Opnd (Node3)
3515 -- Alternatives (List4) (set to No_List if only one set alternative)
3516 -- plus fields for expression
3517
3518 -- N_Not_In
3519 -- Sloc points to NOT of NOT IN
3520 -- Left_Opnd (Node2)
3521 -- Right_Opnd (Node3)
3522 -- Alternatives (List4) (set to No_List if only one set alternative)
3523 -- plus fields for expression
3524
3525 --------------------
3526 -- 4.5 Operators --
3527 --------------------
3528
3529 -- LOGICAL_OPERATOR ::= and | or | xor
3530
3531 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
3532
3533 -- BINARY_ADDING_OPERATOR ::= + | - | &
3534
3535 -- UNARY_ADDING_OPERATOR ::= + | -
3536
3537 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
3538
3539 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
3540
3541 -- Sprint syntax if Treat_Fixed_As_Integer is set:
3542
3543 -- x #* y
3544 -- x #/ y
3545 -- x #mod y
3546 -- x #rem y
3547
3548 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
3549 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
3550 -- All handling of smalls for multiplication and division is handled
3551 -- by the front end (mod and rem result only from expansion). Gigi
3552 -- thus never needs to worry about small values (for other operators
3553 -- operating on fixed-point, e.g. addition, the small value does not
3554 -- have any semantic effect anyway, these are always integer operations.
3555
3556 -- Gigi restriction: For all operators taking Boolean operands, the
3557 -- type is always Standard.Boolean. The expander inserts the required
3558 -- conversion operations where needed to ensure this is the case.
3559
3560 -- N_Op_And
3561 -- Sloc points to AND
3562 -- Do_Length_Check (Flag4-Sem)
3563 -- plus fields for binary operator
3564 -- plus fields for expression
3565
3566 -- N_Op_Or
3567 -- Sloc points to OR
3568 -- Do_Length_Check (Flag4-Sem)
3569 -- plus fields for binary operator
3570 -- plus fields for expression
3571
3572 -- N_Op_Xor
3573 -- Sloc points to XOR
3574 -- Do_Length_Check (Flag4-Sem)
3575 -- plus fields for binary operator
3576 -- plus fields for expression
3577
3578 -- N_Op_Eq
3579 -- Sloc points to =
3580 -- plus fields for binary operator
3581 -- plus fields for expression
3582
3583 -- N_Op_Ne
3584 -- Sloc points to /=
3585 -- plus fields for binary operator
3586 -- plus fields for expression
3587
3588 -- N_Op_Lt
3589 -- Sloc points to <
3590 -- plus fields for binary operator
3591 -- plus fields for expression
3592
3593 -- N_Op_Le
3594 -- Sloc points to <=
3595 -- plus fields for binary operator
3596 -- plus fields for expression
3597
3598 -- N_Op_Gt
3599 -- Sloc points to >
3600 -- plus fields for binary operator
3601 -- plus fields for expression
3602
3603 -- N_Op_Ge
3604 -- Sloc points to >=
3605 -- plus fields for binary operator
3606 -- plus fields for expression
3607
3608 -- N_Op_Add
3609 -- Sloc points to + (binary)
3610 -- plus fields for binary operator
3611 -- plus fields for expression
3612
3613 -- N_Op_Subtract
3614 -- Sloc points to - (binary)
3615 -- plus fields for binary operator
3616 -- plus fields for expression
3617
3618 -- N_Op_Concat
3619 -- Sloc points to &
3620 -- Is_Component_Left_Opnd (Flag13-Sem)
3621 -- Is_Component_Right_Opnd (Flag14-Sem)
3622 -- plus fields for binary operator
3623 -- plus fields for expression
3624
3625 -- N_Op_Multiply
3626 -- Sloc points to *
3627 -- Treat_Fixed_As_Integer (Flag14-Sem)
3628 -- Rounded_Result (Flag18-Sem)
3629 -- plus fields for binary operator
3630 -- plus fields for expression
3631
3632 -- N_Op_Divide
3633 -- Sloc points to /
3634 -- Treat_Fixed_As_Integer (Flag14-Sem)
3635 -- Do_Division_Check (Flag13-Sem)
3636 -- Rounded_Result (Flag18-Sem)
3637 -- plus fields for binary operator
3638 -- plus fields for expression
3639
3640 -- N_Op_Mod
3641 -- Sloc points to MOD
3642 -- Treat_Fixed_As_Integer (Flag14-Sem)
3643 -- Do_Division_Check (Flag13-Sem)
3644 -- plus fields for binary operator
3645 -- plus fields for expression
3646
3647 -- N_Op_Rem
3648 -- Sloc points to REM
3649 -- Treat_Fixed_As_Integer (Flag14-Sem)
3650 -- Do_Division_Check (Flag13-Sem)
3651 -- plus fields for binary operator
3652 -- plus fields for expression
3653
3654 -- N_Op_Expon
3655 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
3656 -- Sloc points to **
3657 -- plus fields for binary operator
3658 -- plus fields for expression
3659
3660 -- N_Op_Plus
3661 -- Sloc points to + (unary)
3662 -- plus fields for unary operator
3663 -- plus fields for expression
3664
3665 -- N_Op_Minus
3666 -- Sloc points to - (unary)
3667 -- plus fields for unary operator
3668 -- plus fields for expression
3669
3670 -- N_Op_Abs
3671 -- Sloc points to ABS
3672 -- plus fields for unary operator
3673 -- plus fields for expression
3674
3675 -- N_Op_Not
3676 -- Sloc points to NOT
3677 -- plus fields for unary operator
3678 -- plus fields for expression
3679
3680 -- See also shift operators in section B.2
3681
3682 -- Note on fixed-point operations passed to Gigi: For adding operators,
3683 -- the semantics is to treat these simply as integer operations, with
3684 -- the small values being ignored (the bounds are already stored in
3685 -- units of small, so that constraint checking works as usual). For the
3686 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
3687 -- point operands if the Treat_Fixed_As_Integer flag is set and will
3688 -- thus treat these nodes in identical manner, ignoring small values.
3689
3690 --------------------------
3691 -- 4.6 Type Conversion --
3692 --------------------------
3693
3694 -- TYPE_CONVERSION ::=
3695 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
3696
3697 -- In the (NAME) case, the name is stored as the expression
3698
3699 -- Note: the parser never generates a type conversion node, since it
3700 -- looks like an indexed component which is generated by preference.
3701 -- The semantic pass must correct this misidentification.
3702
3703 -- Gigi handles conversions that involve no change in the root type,
3704 -- and also all conversions from integer to floating-point types.
3705 -- Conversions from floating-point to integer are only handled in
3706 -- the case where Float_Truncate flag set. Other conversions from
3707 -- floating-point to integer (involving rounding) and all conversions
3708 -- involving fixed-point types are handled by the expander.
3709
3710 -- Sprint syntax if Float_Truncate set: X^(Y)
3711 -- Sprint syntax if Conversion_OK set X?(Y)
3712 -- Sprint syntax if both flags set X?^(Y)
3713
3714 -- Note: If either the operand or result type is fixed-point, Gigi will
3715 -- only see a type conversion node with Conversion_OK set. The front end
3716 -- takes care of all handling of small's for fixed-point conversions.
3717
3718 -- N_Type_Conversion
3719 -- Sloc points to first token of subtype mark
3720 -- Subtype_Mark (Node4)
3721 -- Expression (Node3)
3722 -- Do_Tag_Check (Flag13-Sem)
3723 -- Do_Length_Check (Flag4-Sem)
3724 -- Do_Overflow_Check (Flag17-Sem)
3725 -- Float_Truncate (Flag11-Sem)
3726 -- Rounded_Result (Flag18-Sem)
3727 -- Conversion_OK (Flag14-Sem)
3728 -- plus fields for expression
3729
3730 -- Note: if a range check is required, then the Do_Range_Check flag
3731 -- is set in the Expression with the check being done against the
3732 -- target type range (after the base type conversion, if any).
3733
3734 -------------------------------
3735 -- 4.7 Qualified Expression --
3736 -------------------------------
3737
3738 -- QUALIFIED_EXPRESSION ::=
3739 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
3740
3741 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
3742 -- the expression, so the Expression field of this node always points
3743 -- to a parenthesized expression in this case (i.e. Paren_Count will
3744 -- always be non-zero for the referenced expression if it is not an
3745 -- aggregate).
3746
3747 -- N_Qualified_Expression
3748 -- Sloc points to apostrophe
3749 -- Subtype_Mark (Node4)
3750 -- Expression (Node3) expression or aggregate
3751 -- plus fields for expression
3752
3753 --------------------
3754 -- 4.8 Allocator --
3755 --------------------
3756
3757 -- ALLOCATOR ::=
3758 -- new [NULL_EXCLUSION] SUBTYPE_INDICATION | new QUALIFIED_EXPRESSION
3759
3760 -- Sprint syntax (when storage pool present)
3761 -- new xxx (storage_pool = pool)
3762
3763 -- N_Allocator
3764 -- Sloc points to NEW
3765 -- Expression (Node3) subtype indication or qualified expression
3766 -- Storage_Pool (Node1-Sem)
3767 -- Procedure_To_Call (Node2-Sem)
3768 -- Coextensions (Elist4-Sem)
3769 -- Null_Exclusion_Present (Flag11)
3770 -- No_Initialization (Flag13-Sem)
3771 -- Is_Static_Coextension (Flag14-Sem)
3772 -- Do_Storage_Check (Flag17-Sem)
3773 -- Is_Dynamic_Coextension (Flag18-Sem)
3774 -- plus fields for expression
3775
3776 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
3777 -- This flag has a special function in conjunction with the restriction
3778 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
3779 -- is not set. This means that if a source allocator is replaced with
3780 -- a constructed allocator, the Comes_From_Source flag should be copied
3781 -- to the newly created allocator.
3782
3783 ---------------------------------
3784 -- 5.1 Sequence Of Statements --
3785 ---------------------------------
3786
3787 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
3788
3789 -- Note: Although the parser will not accept a declaration as a
3790 -- statement, the semantic analyzer may insert declarations (e.g.
3791 -- declarations of implicit types needed for execution of other
3792 -- statements) into a sequence of statements, so the code generator
3793 -- should be prepared to accept a declaration where a statement is
3794 -- expected. Note also that pragmas can appear as statements.
3795
3796 --------------------
3797 -- 5.1 Statement --
3798 --------------------
3799
3800 -- STATEMENT ::=
3801 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
3802
3803 -- There is no explicit node in the tree for a statement. Instead, the
3804 -- individual statement appears directly. Labels are treated as a
3805 -- kind of statement, i.e. they are linked into a statement list at
3806 -- the point they appear, so the labeled statement appears following
3807 -- the label or labels in the statement list.
3808
3809 ---------------------------
3810 -- 5.1 Simple Statement --
3811 ---------------------------
3812
3813 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
3814 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
3815 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
3816 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
3817 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
3818 -- | ABORT_STATEMENT | RAISE_STATEMENT
3819 -- | CODE_STATEMENT
3820
3821 -----------------------------
3822 -- 5.1 Compound Statement --
3823 -----------------------------
3824
3825 -- COMPOUND_STATEMENT ::=
3826 -- IF_STATEMENT | CASE_STATEMENT
3827 -- | LOOP_STATEMENT | BLOCK_STATEMENT
3828 -- | EXTENDED_RETURN_STATEMENT
3829 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
3830
3831 -------------------------
3832 -- 5.1 Null Statement --
3833 -------------------------
3834
3835 -- NULL_STATEMENT ::= null;
3836
3837 -- N_Null_Statement
3838 -- Sloc points to NULL
3839
3840 ----------------
3841 -- 5.1 Label --
3842 ----------------
3843
3844 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
3845
3846 -- Note that the occurrence of a label is not a defining identifier,
3847 -- but rather a referencing occurrence. The defining occurrence is
3848 -- in the implicit label declaration which occurs in the innermost
3849 -- enclosing block.
3850
3851 -- N_Label
3852 -- Sloc points to <<
3853 -- Identifier (Node1) direct name of statement identifier
3854 -- Exception_Junk (Flag8-Sem)
3855
3856 -------------------------------
3857 -- 5.1 Statement Identifier --
3858 -------------------------------
3859
3860 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
3861
3862 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
3863 -- (not an OPERATOR_SYMBOL)
3864
3865 -------------------------------
3866 -- 5.2 Assignment Statement --
3867 -------------------------------
3868
3869 -- ASSIGNMENT_STATEMENT ::=
3870 -- variable_NAME := EXPRESSION;
3871
3872 -- N_Assignment_Statement
3873 -- Sloc points to :=
3874 -- Name (Node2)
3875 -- Expression (Node3)
3876 -- Do_Tag_Check (Flag13-Sem)
3877 -- Do_Length_Check (Flag4-Sem)
3878 -- Forwards_OK (Flag5-Sem)
3879 -- Backwards_OK (Flag6-Sem)
3880 -- No_Ctrl_Actions (Flag7-Sem)
3881 -- Componentwise_Assignment (Flag14-Sem)
3882
3883 -- Note: if a range check is required, then the Do_Range_Check flag
3884 -- is set in the Expression (right hand side), with the check being
3885 -- done against the type of the Name (left hand side).
3886
3887 -- Note: the back end places some restrictions on the form of the
3888 -- Expression field. If the object being assigned to is Atomic, then
3889 -- the Expression may not have the form of an aggregate (since this
3890 -- might cause the back end to generate separate assignments). In this
3891 -- case the front end must generate an extra temporary and initialize
3892 -- this temporary as required (the temporary itself is not atomic).
3893
3894 -----------------------
3895 -- 5.3 If Statement --
3896 -----------------------
3897
3898 -- IF_STATEMENT ::=
3899 -- if CONDITION then
3900 -- SEQUENCE_OF_STATEMENTS
3901 -- {elsif CONDITION then
3902 -- SEQUENCE_OF_STATEMENTS}
3903 -- [else
3904 -- SEQUENCE_OF_STATEMENTS]
3905 -- end if;
3906
3907 -- Gigi restriction: This expander ensures that the type of the
3908 -- Condition fields is always Standard.Boolean, even if the type
3909 -- in the source is some non-standard boolean type.
3910
3911 -- N_If_Statement
3912 -- Sloc points to IF
3913 -- Condition (Node1)
3914 -- Then_Statements (List2)
3915 -- Elsif_Parts (List3) (set to No_List if none present)
3916 -- Else_Statements (List4) (set to No_List if no else part present)
3917 -- End_Span (Uint5) (set to No_Uint if expander generated)
3918
3919 -- N_Elsif_Part
3920 -- Sloc points to ELSIF
3921 -- Condition (Node1)
3922 -- Then_Statements (List2)
3923 -- Condition_Actions (List3-Sem)
3924
3925 --------------------
3926 -- 5.3 Condition --
3927 --------------------
3928
3929 -- CONDITION ::= boolean_EXPRESSION
3930
3931 -------------------------
3932 -- 5.4 Case Statement --
3933 -------------------------
3934
3935 -- CASE_STATEMENT ::=
3936 -- case EXPRESSION is
3937 -- CASE_STATEMENT_ALTERNATIVE
3938 -- {CASE_STATEMENT_ALTERNATIVE}
3939 -- end case;
3940
3941 -- Note: the Alternatives can contain pragmas. These only occur at
3942 -- the start of the list, since any pragmas occurring after the first
3943 -- alternative are absorbed into the corresponding statement sequence.
3944
3945 -- N_Case_Statement
3946 -- Sloc points to CASE
3947 -- Expression (Node3)
3948 -- Alternatives (List4)
3949 -- End_Span (Uint5) (set to No_Uint if expander generated)
3950
3951 -------------------------------------
3952 -- 5.4 Case Statement Alternative --
3953 -------------------------------------
3954
3955 -- CASE_STATEMENT_ALTERNATIVE ::=
3956 -- when DISCRETE_CHOICE_LIST =>
3957 -- SEQUENCE_OF_STATEMENTS
3958
3959 -- N_Case_Statement_Alternative
3960 -- Sloc points to WHEN
3961 -- Discrete_Choices (List4)
3962 -- Statements (List3)
3963
3964 -------------------------
3965 -- 5.5 Loop Statement --
3966 -------------------------
3967
3968 -- LOOP_STATEMENT ::=
3969 -- [loop_STATEMENT_IDENTIFIER :]
3970 -- [ITERATION_SCHEME] loop
3971 -- SEQUENCE_OF_STATEMENTS
3972 -- end loop [loop_IDENTIFIER];
3973
3974 -- Note: The occurrence of a loop label is not a defining identifier
3975 -- but rather a referencing occurrence. The defining occurrence is in
3976 -- the implicit label declaration which occurs in the innermost
3977 -- enclosing block.
3978
3979 -- Note: there is always a loop statement identifier present in
3980 -- the tree, even if none was given in the source. In the case where
3981 -- no loop identifier is given in the source, the parser creates
3982 -- a name of the form _Loop_n, where n is a decimal integer (the
3983 -- two underlines ensure that the loop names created in this manner
3984 -- do not conflict with any user defined identifiers), and the flag
3985 -- Has_Created_Identifier is set to True. The only exception to the
3986 -- rule that all loop statement nodes have identifiers occurs for
3987 -- loops constructed by the expander, and the semantic analyzer will
3988 -- create and supply dummy loop identifiers in these cases.
3989
3990 -- N_Loop_Statement
3991 -- Sloc points to LOOP
3992 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
3993 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
3994 -- Statements (List3)
3995 -- End_Label (Node4)
3996 -- Has_Created_Identifier (Flag15)
3997 -- Is_Null_Loop (Flag16)
3998 -- Suppress_Loop_Warnings (Flag17)
3999
4000 --------------------------
4001 -- 5.5 Iteration Scheme --
4002 --------------------------
4003
4004 -- ITERATION_SCHEME ::=
4005 -- while CONDITION | for LOOP_PARAMETER_SPECIFICATION
4006
4007 -- Gigi restriction: This expander ensures that the type of the
4008 -- Condition field is always Standard.Boolean, even if the type
4009 -- in the source is some non-standard boolean type.
4010
4011 -- N_Iteration_Scheme
4012 -- Sloc points to WHILE or FOR
4013 -- Condition (Node1) (set to Empty if FOR case)
4014 -- Condition_Actions (List3-Sem)
4015 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
4016
4017 ---------------------------------------
4018 -- 5.5 Loop parameter specification --
4019 ---------------------------------------
4020
4021 -- LOOP_PARAMETER_SPECIFICATION ::=
4022 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
4023
4024 -- N_Loop_Parameter_Specification
4025 -- Sloc points to first identifier
4026 -- Defining_Identifier (Node1)
4027 -- Reverse_Present (Flag15)
4028 -- Discrete_Subtype_Definition (Node4)
4029
4030 --------------------------
4031 -- 5.6 Block Statement --
4032 --------------------------
4033
4034 -- BLOCK_STATEMENT ::=
4035 -- [block_STATEMENT_IDENTIFIER:]
4036 -- [declare
4037 -- DECLARATIVE_PART]
4038 -- begin
4039 -- HANDLED_SEQUENCE_OF_STATEMENTS
4040 -- end [block_IDENTIFIER];
4041
4042 -- Note that the occurrence of a block identifier is not a defining
4043 -- identifier, but rather a referencing occurrence. The defining
4044 -- occurrence is an E_Block entity declared by the implicit label
4045 -- declaration which occurs in the innermost enclosing block statement
4046 -- or body; the block identifier denotes that E_Block.
4047
4048 -- For block statements that come from source code, there is always a
4049 -- block statement identifier present in the tree, denoting an
4050 -- E_Block. In the case where no block identifier is given in the
4051 -- source, the parser creates a name of the form B_n, where n is a
4052 -- decimal integer, and the flag Has_Created_Identifier is set to
4053 -- True. Blocks constructed by the expander usually have no identifier,
4054 -- and no corresponding entity.
4055
4056 -- Note: the block statement created for an extended return statement
4057 -- has an entity, and this entity is an E_Return_Statement, rather than
4058 -- the usual E_Block.
4059
4060 -- Note: Exception_Junk is set for the wrapping blocks created during
4061 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
4062
4063 -- N_Block_Statement
4064 -- Sloc points to DECLARE or BEGIN
4065 -- Identifier (Node1) block direct name (set to Empty if not present)
4066 -- Declarations (List2) (set to No_List if no DECLARE part)
4067 -- Handled_Statement_Sequence (Node4)
4068 -- Is_Task_Master (Flag5-Sem)
4069 -- Activation_Chain_Entity (Node3-Sem)
4070 -- Has_Created_Identifier (Flag15)
4071 -- Is_Task_Allocation_Block (Flag6)
4072 -- Is_Asynchronous_Call_Block (Flag7)
4073 -- Exception_Junk (Flag8-Sem)
4074
4075 -------------------------
4076 -- 5.7 Exit Statement --
4077 -------------------------
4078
4079 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
4080
4081 -- Gigi restriction: This expander ensures that the type of the
4082 -- Condition field is always Standard.Boolean, even if the type
4083 -- in the source is some non-standard boolean type.
4084
4085 -- N_Exit_Statement
4086 -- Sloc points to EXIT
4087 -- Name (Node2) (set to Empty if no loop name present)
4088 -- Condition (Node1) (set to Empty if no when part present)
4089
4090 -------------------------
4091 -- 5.9 Goto Statement --
4092 -------------------------
4093
4094 -- GOTO_STATEMENT ::= goto label_NAME;
4095
4096 -- N_Goto_Statement
4097 -- Sloc points to GOTO
4098 -- Name (Node2)
4099 -- Exception_Junk (Flag8-Sem)
4100
4101 ---------------------------------
4102 -- 6.1 Subprogram Declaration --
4103 ---------------------------------
4104
4105 -- SUBPROGRAM_DECLARATION ::= SUBPROGRAM_SPECIFICATION;
4106
4107 -- N_Subprogram_Declaration
4108 -- Sloc points to FUNCTION or PROCEDURE
4109 -- Specification (Node1)
4110 -- Body_To_Inline (Node3-Sem)
4111 -- Corresponding_Body (Node5-Sem)
4112 -- Parent_Spec (Node4-Sem)
4113
4114 ------------------------------------------
4115 -- 6.1 Abstract Subprogram Declaration --
4116 ------------------------------------------
4117
4118 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
4119 -- SUBPROGRAM_SPECIFICATION is abstract;
4120
4121 -- N_Abstract_Subprogram_Declaration
4122 -- Sloc points to ABSTRACT
4123 -- Specification (Node1)
4124
4125 -----------------------------------
4126 -- 6.1 Subprogram Specification --
4127 -----------------------------------
4128
4129 -- SUBPROGRAM_SPECIFICATION ::=
4130 -- [[not] overriding]
4131 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
4132 -- | [[not] overriding]
4133 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
4134
4135 -- Note: there are no separate nodes for the profiles, instead the
4136 -- information appears directly in the following nodes.
4137
4138 -- N_Function_Specification
4139 -- Sloc points to FUNCTION
4140 -- Defining_Unit_Name (Node1) (the designator)
4141 -- Elaboration_Boolean (Node2-Sem)
4142 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4143 -- Null_Exclusion_Present (Flag11)
4144 -- Result_Definition (Node4) for result subtype
4145 -- Generic_Parent (Node5-Sem)
4146 -- Must_Override (Flag14) set if overriding indicator present
4147 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4148
4149 -- N_Procedure_Specification
4150 -- Sloc points to PROCEDURE
4151 -- Defining_Unit_Name (Node1)
4152 -- Elaboration_Boolean (Node2-Sem)
4153 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4154 -- Generic_Parent (Node5-Sem)
4155 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
4156 -- Must_Override (Flag14) set if overriding indicator present
4157 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4158
4159 -- Note: overriding indicator is an Ada 2005 feature
4160
4161 ---------------------
4162 -- 6.1 Designator --
4163 ---------------------
4164
4165 -- DESIGNATOR ::=
4166 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
4167
4168 -- Designators that are simply identifiers or operator symbols appear
4169 -- directly in the tree in this form. The following node is used only
4170 -- in the case where the designator has a parent unit name component.
4171
4172 -- N_Designator
4173 -- Sloc points to period
4174 -- Name (Node2) holds the parent unit name. Note that this is always
4175 -- non-Empty, since this node is only used for the case where a
4176 -- parent library unit package name is present.
4177 -- Identifier (Node1)
4178
4179 -- Note that the identifier can also be an operator symbol here
4180
4181 ------------------------------
4182 -- 6.1 Defining Designator --
4183 ------------------------------
4184
4185 -- DEFINING_DESIGNATOR ::=
4186 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
4187
4188 -------------------------------------
4189 -- 6.1 Defining Program Unit Name --
4190 -------------------------------------
4191
4192 -- DEFINING_PROGRAM_UNIT_NAME ::=
4193 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
4194
4195 -- The parent unit name is present only in the case of a child unit
4196 -- name (permissible only for Ada 95 for a library level unit, i.e.
4197 -- a unit at scope level one). If no such name is present, the defining
4198 -- program unit name is represented simply as the defining identifier.
4199 -- In the child unit case, the following node is used to represent the
4200 -- child unit name.
4201
4202 -- N_Defining_Program_Unit_Name
4203 -- Sloc points to period
4204 -- Name (Node2) holds the parent unit name. Note that this is always
4205 -- non-Empty, since this node is only used for the case where a
4206 -- parent unit name is present.
4207 -- Defining_Identifier (Node1)
4208
4209 --------------------------
4210 -- 6.1 Operator Symbol --
4211 --------------------------
4212
4213 -- OPERATOR_SYMBOL ::= STRING_LITERAL
4214
4215 -- Note: the fields of the N_Operator_Symbol node are laid out to
4216 -- match the corresponding fields of an N_Character_Literal node. This
4217 -- allows easy conversion of the operator symbol node into a character
4218 -- literal node in the case where a string constant of the form of an
4219 -- operator symbol is scanned out as such, but turns out semantically
4220 -- to be a string literal that is not an operator. For details see
4221 -- Sinfo.CN.Change_Operator_Symbol_To_String_Literal.
4222
4223 -- N_Operator_Symbol
4224 -- Sloc points to literal
4225 -- Chars (Name1) contains the Name_Id for the operator symbol
4226 -- Strval (Str3) Id of string value. This is used if the operator
4227 -- symbol turns out to be a normal string after all.
4228 -- Entity (Node4-Sem)
4229 -- Associated_Node (Node4-Sem)
4230 -- Has_Private_View (Flag11-Sem) set in generic units.
4231 -- Etype (Node5-Sem)
4232
4233 -- Note: the Strval field may be set to No_String for generated
4234 -- operator symbols that are known not to be string literals
4235 -- semantically.
4236
4237 -----------------------------------
4238 -- 6.1 Defining Operator Symbol --
4239 -----------------------------------
4240
4241 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
4242
4243 -- A defining operator symbol is an entity, which has additional
4244 -- fields depending on the setting of the Ekind field. These
4245 -- additional fields are defined (and access subprograms declared)
4246 -- in package Einfo.
4247
4248 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
4249 -- are deliberately layed out to match the layout of fields in an
4250 -- ordinary N_Operator_Symbol node allowing for easy alteration of
4251 -- an operator symbol node into a defining operator symbol node.
4252 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
4253 -- for further details.
4254
4255 -- N_Defining_Operator_Symbol
4256 -- Sloc points to literal
4257 -- Chars (Name1) contains the Name_Id for the operator symbol
4258 -- Next_Entity (Node2-Sem)
4259 -- Scope (Node3-Sem)
4260 -- Etype (Node5-Sem)
4261
4262 ----------------------------
4263 -- 6.1 Parameter Profile --
4264 ----------------------------
4265
4266 -- PARAMETER_PROFILE ::= [FORMAL_PART]
4267
4268 ---------------------------------------
4269 -- 6.1 Parameter and Result Profile --
4270 ---------------------------------------
4271
4272 -- PARAMETER_AND_RESULT_PROFILE ::=
4273 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
4274 -- | [FORMAL_PART] return ACCESS_DEFINITION
4275
4276 -- There is no explicit node in the tree for a parameter and result
4277 -- profile. Instead the information appears directly in the parent.
4278
4279 ----------------------
4280 -- 6.1 Formal part --
4281 ----------------------
4282
4283 -- FORMAL_PART ::=
4284 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
4285
4286 ----------------------------------
4287 -- 6.1 Parameter specification --
4288 ----------------------------------
4289
4290 -- PARAMETER_SPECIFICATION ::=
4291 -- DEFINING_IDENTIFIER_LIST : MODE [NULL_EXCLUSION] SUBTYPE_MARK
4292 -- [:= DEFAULT_EXPRESSION]
4293 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
4294 -- [:= DEFAULT_EXPRESSION]
4295
4296 -- Although the syntax allows multiple identifiers in the list, the
4297 -- semantics is as though successive specifications were given with
4298 -- identical type definition and expression components. To simplify
4299 -- semantic processing, the parser represents a multiple declaration
4300 -- case as a sequence of single Specifications, using the More_Ids and
4301 -- Prev_Ids flags to preserve the original source form as described
4302 -- in the section on "Handling of Defining Identifier Lists".
4303
4304 -- N_Parameter_Specification
4305 -- Sloc points to first identifier
4306 -- Defining_Identifier (Node1)
4307 -- In_Present (Flag15)
4308 -- Out_Present (Flag17)
4309 -- Null_Exclusion_Present (Flag11)
4310 -- Parameter_Type (Node2) subtype mark or access definition
4311 -- Expression (Node3) (set to Empty if no default expression present)
4312 -- Do_Accessibility_Check (Flag13-Sem)
4313 -- More_Ids (Flag5) (set to False if no more identifiers in list)
4314 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
4315 -- Default_Expression (Node5-Sem)
4316
4317 ---------------
4318 -- 6.1 Mode --
4319 ---------------
4320
4321 -- MODE ::= [in] | in out | out
4322
4323 -- There is no explicit node in the tree for the Mode. Instead the
4324 -- In_Present and Out_Present flags are set in the parent node to
4325 -- record the presence of keywords specifying the mode.
4326
4327 --------------------------
4328 -- 6.3 Subprogram Body --
4329 --------------------------
4330
4331 -- SUBPROGRAM_BODY ::=
4332 -- SUBPROGRAM_SPECIFICATION is
4333 -- DECLARATIVE_PART
4334 -- begin
4335 -- HANDLED_SEQUENCE_OF_STATEMENTS
4336 -- end [DESIGNATOR];
4337
4338 -- N_Subprogram_Body
4339 -- Sloc points to FUNCTION or PROCEDURE
4340 -- Specification (Node1)
4341 -- Declarations (List2)
4342 -- Handled_Statement_Sequence (Node4)
4343 -- Activation_Chain_Entity (Node3-Sem)
4344 -- Corresponding_Spec (Node5-Sem)
4345 -- Acts_As_Spec (Flag4-Sem)
4346 -- Bad_Is_Detected (Flag15) used only by parser
4347 -- Do_Storage_Check (Flag17-Sem)
4348 -- Has_Priority_Pragma (Flag6-Sem)
4349 -- Is_Protected_Subprogram_Body (Flag7-Sem)
4350 -- Is_Entry_Barrier_Function (Flag8-Sem)
4351 -- Is_Task_Master (Flag5-Sem)
4352 -- Was_Originally_Stub (Flag13-Sem)
4353 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
4354
4355 -----------------------------------
4356 -- 6.4 Procedure Call Statement --
4357 -----------------------------------
4358
4359 -- PROCEDURE_CALL_STATEMENT ::=
4360 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
4361
4362 -- Note: the reason that a procedure call has expression fields is
4363 -- that it semantically resembles an expression, e.g. overloading is
4364 -- allowed and a type is concocted for semantic processing purposes.
4365 -- Certain of these fields, such as Parens are not relevant, but it
4366 -- is easier to just supply all of them together!
4367
4368 -- N_Procedure_Call_Statement
4369 -- Sloc points to first token of name or prefix
4370 -- Name (Node2) stores name or prefix
4371 -- Parameter_Associations (List3) (set to No_List if no
4372 -- actual parameter part)
4373 -- First_Named_Actual (Node4-Sem)
4374 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
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 -- If any IN parameter requires a range check, then the corresponding
4382 -- argument expression has the Do_Range_Check flag set, and the range
4383 -- check is done against the formal type. Note that this argument
4384 -- expression may appear directly in the Parameter_Associations list,
4385 -- or may be a descendent of an N_Parameter_Association node that
4386 -- appears in this list.
4387
4388 ------------------------
4389 -- 6.4 Function Call --
4390 ------------------------
4391
4392 -- FUNCTION_CALL ::=
4393 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
4394
4395 -- Note: the parser may generate an indexed component node or simply
4396 -- a name node instead of a function call node. The semantic pass must
4397 -- correct this misidentification.
4398
4399 -- N_Function_Call
4400 -- Sloc points to first token of name or prefix
4401 -- Name (Node2) stores name or prefix
4402 -- Parameter_Associations (List3) (set to No_List if no
4403 -- actual parameter part)
4404 -- First_Named_Actual (Node4-Sem)
4405 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4406 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
4407 -- Do_Tag_Check (Flag13-Sem)
4408 -- No_Elaboration_Check (Flag14-Sem)
4409 -- Parameter_List_Truncated (Flag17-Sem)
4410 -- ABE_Is_Certain (Flag18-Sem)
4411 -- plus fields for expression
4412
4413 --------------------------------
4414 -- 6.4 Actual Parameter Part --
4415 --------------------------------
4416
4417 -- ACTUAL_PARAMETER_PART ::=
4418 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
4419
4420 --------------------------------
4421 -- 6.4 Parameter Association --
4422 --------------------------------
4423
4424 -- PARAMETER_ASSOCIATION ::=
4425 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
4426
4427 -- Note: the N_Parameter_Association node is built only if a formal
4428 -- parameter selector name is present, otherwise the parameter
4429 -- association appears in the tree simply as the node for the
4430 -- explicit actual parameter.
4431
4432 -- N_Parameter_Association
4433 -- Sloc points to formal parameter
4434 -- Selector_Name (Node2) (always non-Empty)
4435 -- Explicit_Actual_Parameter (Node3)
4436 -- Next_Named_Actual (Node4-Sem)
4437
4438 ---------------------------
4439 -- 6.4 Actual Parameter --
4440 ---------------------------
4441
4442 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
4443
4444 ---------------------------
4445 -- 6.5 Return Statement --
4446 ---------------------------
4447
4448 -- RETURN_STATEMENT ::= return [EXPRESSION]; -- Ada 95
4449
4450 -- In Ada 2005, we have:
4451
4452 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
4453
4454 -- EXTENDED_RETURN_STATEMENT ::=
4455 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4456 -- [:= EXPRESSION] [do
4457 -- HANDLED_SEQUENCE_OF_STATEMENTS
4458 -- end return];
4459
4460 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
4461
4462 -- So in Ada 2005, RETURN_STATEMENT is no longer a nonterminal, but
4463 -- "return statement" is defined in 6.5 to mean a
4464 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT.
4465
4466 -- N_Return_Statement
4467 -- Sloc points to RETURN
4468 -- Return_Statement_Entity (Node5-Sem)
4469 -- Expression (Node3) (set to Empty if no expression present)
4470 -- Storage_Pool (Node1-Sem)
4471 -- Procedure_To_Call (Node2-Sem)
4472 -- Do_Tag_Check (Flag13-Sem)
4473 -- By_Ref (Flag5-Sem)
4474 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
4475
4476 -- N_Return_Statement represents a simple_return_statement, and is
4477 -- renamed to be N_Simple_Return_Statement below. Clients should refer
4478 -- to N_Simple_Return_Statement. We retain N_Return_Statement because
4479 -- that's how gigi knows it. See also renaming of Make_Return_Statement
4480 -- as Make_Simple_Return_Statement in Sem_Util.
4481
4482 -- Note: Return_Statement_Entity points to an E_Return_Statement
4483
4484 -- If a range check is required, then Do_Range_Check is set on the
4485 -- Expression. The check is against the return subtype of the function.
4486
4487 -- N_Extended_Return_Statement
4488 -- Sloc points to RETURN
4489 -- Return_Statement_Entity (Node5-Sem)
4490 -- Return_Object_Declarations (List3)
4491 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
4492 -- Storage_Pool (Node1-Sem)
4493 -- Procedure_To_Call (Node2-Sem)
4494 -- Do_Tag_Check (Flag13-Sem)
4495 -- By_Ref (Flag5-Sem)
4496
4497 -- Note: Return_Statement_Entity points to an E_Return_Statement.
4498 -- Note that Return_Object_Declarations is a list containing the
4499 -- N_Object_Declaration -- see comment on this field above.
4500 -- The declared object will have Is_Return_Object = True.
4501 -- There is no such syntactic category as return_object_declaration
4502 -- in the RM. Return_Object_Declarations represents this portion of
4503 -- the syntax for EXTENDED_RETURN_STATEMENT:
4504 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4505 -- [:= EXPRESSION]
4506
4507 -- There are two entities associated with an extended_return_statement:
4508 -- the Return_Statement_Entity represents the statement itself, and the
4509 -- Defining_Identifier of the Object_Declaration in
4510 -- Return_Object_Declarations represents the object being
4511 -- returned. N_Simple_Return_Statement has only the former.
4512
4513 ------------------------------
4514 -- 7.1 Package Declaration --
4515 ------------------------------
4516
4517 -- PACKAGE_DECLARATION ::= PACKAGE_SPECIFICATION;
4518
4519 -- Note: the activation chain entity for a package spec is used for
4520 -- all tasks declared in the package spec, or in the package body.
4521
4522 -- N_Package_Declaration
4523 -- Sloc points to PACKAGE
4524 -- Specification (Node1)
4525 -- Corresponding_Body (Node5-Sem)
4526 -- Parent_Spec (Node4-Sem)
4527 -- Activation_Chain_Entity (Node3-Sem)
4528
4529 --------------------------------
4530 -- 7.1 Package Specification --
4531 --------------------------------
4532
4533 -- PACKAGE_SPECIFICATION ::=
4534 -- package DEFINING_PROGRAM_UNIT_NAME is
4535 -- {BASIC_DECLARATIVE_ITEM}
4536 -- [private
4537 -- {BASIC_DECLARATIVE_ITEM}]
4538 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
4539
4540 -- N_Package_Specification
4541 -- Sloc points to PACKAGE
4542 -- Defining_Unit_Name (Node1)
4543 -- Visible_Declarations (List2)
4544 -- Private_Declarations (List3) (set to No_List if no private
4545 -- part present)
4546 -- End_Label (Node4)
4547 -- Generic_Parent (Node5-Sem)
4548 -- Limited_View_Installed (Flag18-Sem)
4549
4550 -----------------------
4551 -- 7.1 Package Body --
4552 -----------------------
4553
4554 -- PACKAGE_BODY ::=
4555 -- package body DEFINING_PROGRAM_UNIT_NAME is
4556 -- DECLARATIVE_PART
4557 -- [begin
4558 -- HANDLED_SEQUENCE_OF_STATEMENTS]
4559 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
4560
4561 -- N_Package_Body
4562 -- Sloc points to PACKAGE
4563 -- Defining_Unit_Name (Node1)
4564 -- Declarations (List2)
4565 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
4566 -- Corresponding_Spec (Node5-Sem)
4567 -- Was_Originally_Stub (Flag13-Sem)
4568
4569 -- Note: if a source level package does not contain a handled sequence
4570 -- of statements, then the parser supplies a dummy one with a null
4571 -- sequence of statements. Comes_From_Source will be False in this
4572 -- constructed sequence. The reason we need this is for the End_Label
4573 -- field in the HSS.
4574
4575 -----------------------------------
4576 -- 7.4 Private Type Declaration --
4577 -----------------------------------
4578
4579 -- PRIVATE_TYPE_DECLARATION ::=
4580 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
4581 -- is [[abstract] tagged] [limited] private;
4582
4583 -- Note: TAGGED is not permitted in Ada 83 mode
4584
4585 -- N_Private_Type_Declaration
4586 -- Sloc points to TYPE
4587 -- Defining_Identifier (Node1)
4588 -- Discriminant_Specifications (List4) (set to No_List if no
4589 -- discriminant part)
4590 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4591 -- Abstract_Present (Flag4)
4592 -- Tagged_Present (Flag15)
4593 -- Limited_Present (Flag17)
4594
4595 ----------------------------------------
4596 -- 7.4 Private Extension Declaration --
4597 ----------------------------------------
4598
4599 -- PRIVATE_EXTENSION_DECLARATION ::=
4600 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
4601 -- [abstract] [limited | synchronized]
4602 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
4603 -- with private;
4604
4605 -- Note: LIMITED, and private extension declarations are not allowed
4606 -- in Ada 83 mode.
4607
4608 -- N_Private_Extension_Declaration
4609 -- Sloc points to TYPE
4610 -- Defining_Identifier (Node1)
4611 -- Discriminant_Specifications (List4) (set to No_List if no
4612 -- discriminant part)
4613 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4614 -- Abstract_Present (Flag4)
4615 -- Limited_Present (Flag17)
4616 -- Synchronized_Present (Flag7)
4617 -- Subtype_Indication (Node5)
4618 -- Interface_List (List2) (set to No_List if none)
4619
4620 ---------------------
4621 -- 8.4 Use Clause --
4622 ---------------------
4623
4624 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
4625
4626 -----------------------------
4627 -- 8.4 Use Package Clause --
4628 -----------------------------
4629
4630 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
4631
4632 -- N_Use_Package_Clause
4633 -- Sloc points to USE
4634 -- Names (List2)
4635 -- Next_Use_Clause (Node3-Sem)
4636 -- Hidden_By_Use_Clause (Elist4-Sem)
4637
4638 --------------------------
4639 -- 8.4 Use Type Clause --
4640 --------------------------
4641
4642 -- USE_TYPE_CLAUSE ::= use type SUBTYPE_MARK {, SUBTYPE_MARK};
4643
4644 -- Note: use type clause is not permitted in Ada 83 mode
4645
4646 -- N_Use_Type_Clause
4647 -- Sloc points to USE
4648 -- Subtype_Marks (List2)
4649 -- Next_Use_Clause (Node3-Sem)
4650 -- Hidden_By_Use_Clause (Elist4-Sem)
4651
4652 -------------------------------
4653 -- 8.5 Renaming Declaration --
4654 -------------------------------
4655
4656 -- RENAMING_DECLARATION ::=
4657 -- OBJECT_RENAMING_DECLARATION
4658 -- | EXCEPTION_RENAMING_DECLARATION
4659 -- | PACKAGE_RENAMING_DECLARATION
4660 -- | SUBPROGRAM_RENAMING_DECLARATION
4661 -- | GENERIC_RENAMING_DECLARATION
4662
4663 --------------------------------------
4664 -- 8.5 Object Renaming Declaration --
4665 --------------------------------------
4666
4667 -- OBJECT_RENAMING_DECLARATION ::=
4668 -- DEFINING_IDENTIFIER :
4669 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME;
4670 -- | DEFINING_IDENTIFIER :
4671 -- ACCESS_DEFINITION renames object_NAME;
4672
4673 -- Note: Access_Definition is an optional field that gives support to
4674 -- Ada 2005 (AI-230). The parser generates nodes that have either the
4675 -- Subtype_Indication field or else the Access_Definition field.
4676
4677 -- N_Object_Renaming_Declaration
4678 -- Sloc points to first identifier
4679 -- Defining_Identifier (Node1)
4680 -- Null_Exclusion_Present (Flag11) (set to False if not present)
4681 -- Subtype_Mark (Node4) (set to Empty if not present)
4682 -- Access_Definition (Node3) (set to Empty if not present)
4683 -- Name (Node2)
4684 -- Corresponding_Generic_Association (Node5-Sem)
4685
4686 -----------------------------------------
4687 -- 8.5 Exception Renaming Declaration --
4688 -----------------------------------------
4689
4690 -- EXCEPTION_RENAMING_DECLARATION ::=
4691 -- DEFINING_IDENTIFIER : exception renames exception_NAME;
4692
4693 -- N_Exception_Renaming_Declaration
4694 -- Sloc points to first identifier
4695 -- Defining_Identifier (Node1)
4696 -- Name (Node2)
4697
4698 ---------------------------------------
4699 -- 8.5 Package Renaming Declaration --
4700 ---------------------------------------
4701
4702 -- PACKAGE_RENAMING_DECLARATION ::=
4703 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME;
4704
4705 -- N_Package_Renaming_Declaration
4706 -- Sloc points to PACKAGE
4707 -- Defining_Unit_Name (Node1)
4708 -- Name (Node2)
4709 -- Parent_Spec (Node4-Sem)
4710
4711 ------------------------------------------
4712 -- 8.5 Subprogram Renaming Declaration --
4713 ------------------------------------------
4714
4715 -- SUBPROGRAM_RENAMING_DECLARATION ::=
4716 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
4717
4718 -- N_Subprogram_Renaming_Declaration
4719 -- Sloc points to RENAMES
4720 -- Specification (Node1)
4721 -- Name (Node2)
4722 -- Parent_Spec (Node4-Sem)
4723 -- Corresponding_Spec (Node5-Sem)
4724 -- Corresponding_Formal_Spec (Node3-Sem)
4725 -- From_Default (Flag6-Sem)
4726
4727 -----------------------------------------
4728 -- 8.5.5 Generic Renaming Declaration --
4729 -----------------------------------------
4730
4731 -- GENERIC_RENAMING_DECLARATION ::=
4732 -- generic package DEFINING_PROGRAM_UNIT_NAME
4733 -- renames generic_package_NAME
4734 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
4735 -- renames generic_procedure_NAME
4736 -- | generic function DEFINING_PROGRAM_UNIT_NAME
4737 -- renames generic_function_NAME
4738
4739 -- N_Generic_Package_Renaming_Declaration
4740 -- Sloc points to GENERIC
4741 -- Defining_Unit_Name (Node1)
4742 -- Name (Node2)
4743 -- Parent_Spec (Node4-Sem)
4744
4745 -- N_Generic_Procedure_Renaming_Declaration
4746 -- Sloc points to GENERIC
4747 -- Defining_Unit_Name (Node1)
4748 -- Name (Node2)
4749 -- Parent_Spec (Node4-Sem)
4750
4751 -- N_Generic_Function_Renaming_Declaration
4752 -- Sloc points to GENERIC
4753 -- Defining_Unit_Name (Node1)
4754 -- Name (Node2)
4755 -- Parent_Spec (Node4-Sem)
4756
4757 --------------------------------
4758 -- 9.1 Task Type Declaration --
4759 --------------------------------
4760
4761 -- TASK_TYPE_DECLARATION ::=
4762 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4763 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
4764
4765 -- N_Task_Type_Declaration
4766 -- Sloc points to TASK
4767 -- Defining_Identifier (Node1)
4768 -- Discriminant_Specifications (List4) (set to No_List if no
4769 -- discriminant part)
4770 -- Interface_List (List2) (set to No_List if none)
4771 -- Task_Definition (Node3) (set to Empty if not present)
4772 -- Corresponding_Body (Node5-Sem)
4773
4774 ----------------------------------
4775 -- 9.1 Single Task Declaration --
4776 ----------------------------------
4777
4778 -- SINGLE_TASK_DECLARATION ::=
4779 -- task DEFINING_IDENTIFIER
4780 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
4781
4782 -- N_Single_Task_Declaration
4783 -- Sloc points to TASK
4784 -- Defining_Identifier (Node1)
4785 -- Interface_List (List2) (set to No_List if none)
4786 -- Task_Definition (Node3) (set to Empty if not present)
4787
4788 --------------------------
4789 -- 9.1 Task Definition --
4790 --------------------------
4791
4792 -- TASK_DEFINITION ::=
4793 -- {TASK_ITEM}
4794 -- [private
4795 -- {TASK_ITEM}]
4796 -- end [task_IDENTIFIER]
4797
4798 -- Note: as a result of semantic analysis, the list of task items can
4799 -- include implicit type declarations resulting from entry families.
4800
4801 -- N_Task_Definition
4802 -- Sloc points to first token of task definition
4803 -- Visible_Declarations (List2)
4804 -- Private_Declarations (List3) (set to No_List if no private part)
4805 -- End_Label (Node4)
4806 -- Has_Priority_Pragma (Flag6-Sem)
4807 -- Has_Storage_Size_Pragma (Flag5-Sem)
4808 -- Has_Task_Info_Pragma (Flag7-Sem)
4809 -- Has_Task_Name_Pragma (Flag8-Sem)
4810 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
4811
4812 --------------------
4813 -- 9.1 Task Item --
4814 --------------------
4815
4816 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
4817
4818 --------------------
4819 -- 9.1 Task Body --
4820 --------------------
4821
4822 -- TASK_BODY ::=
4823 -- task body task_DEFINING_IDENTIFIER is
4824 -- DECLARATIVE_PART
4825 -- begin
4826 -- HANDLED_SEQUENCE_OF_STATEMENTS
4827 -- end [task_IDENTIFIER];
4828
4829 -- Gigi restriction: This node never appears
4830
4831 -- N_Task_Body
4832 -- Sloc points to TASK
4833 -- Defining_Identifier (Node1)
4834 -- Declarations (List2)
4835 -- Handled_Statement_Sequence (Node4)
4836 -- Is_Task_Master (Flag5-Sem)
4837 -- Activation_Chain_Entity (Node3-Sem)
4838 -- Corresponding_Spec (Node5-Sem)
4839 -- Was_Originally_Stub (Flag13-Sem)
4840
4841 -------------------------------------
4842 -- 9.4 Protected Type Declaration --
4843 -------------------------------------
4844
4845 -- PROTECTED_TYPE_DECLARATION ::=
4846 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4847 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4848
4849 -- Note: protected type declarations are not permitted in Ada 83 mode
4850
4851 -- N_Protected_Type_Declaration
4852 -- Sloc points to PROTECTED
4853 -- Defining_Identifier (Node1)
4854 -- Discriminant_Specifications (List4) (set to No_List if no
4855 -- discriminant part)
4856 -- Interface_List (List2) (set to No_List if none)
4857 -- Protected_Definition (Node3)
4858 -- Corresponding_Body (Node5-Sem)
4859
4860 ---------------------------------------
4861 -- 9.4 Single Protected Declaration --
4862 ---------------------------------------
4863
4864 -- SINGLE_PROTECTED_DECLARATION ::=
4865 -- protected DEFINING_IDENTIFIER
4866 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4867
4868 -- Note: single protected declarations are not allowed in Ada 83 mode
4869
4870 -- N_Single_Protected_Declaration
4871 -- Sloc points to PROTECTED
4872 -- Defining_Identifier (Node1)
4873 -- Interface_List (List2) (set to No_List if none)
4874 -- Protected_Definition (Node3)
4875
4876 -------------------------------
4877 -- 9.4 Protected Definition --
4878 -------------------------------
4879
4880 -- PROTECTED_DEFINITION ::=
4881 -- {PROTECTED_OPERATION_DECLARATION}
4882 -- [private
4883 -- {PROTECTED_ELEMENT_DECLARATION}]
4884 -- end [protected_IDENTIFIER]
4885
4886 -- N_Protected_Definition
4887 -- Sloc points to first token of protected definition
4888 -- Visible_Declarations (List2)
4889 -- Private_Declarations (List3) (set to No_List if no private part)
4890 -- End_Label (Node4)
4891 -- Has_Priority_Pragma (Flag6-Sem)
4892
4893 ------------------------------------------
4894 -- 9.4 Protected Operation Declaration --
4895 ------------------------------------------
4896
4897 -- PROTECTED_OPERATION_DECLARATION ::=
4898 -- SUBPROGRAM_DECLARATION
4899 -- | ENTRY_DECLARATION
4900 -- | REPRESENTATION_CLAUSE
4901
4902 ----------------------------------------
4903 -- 9.4 Protected Element Declaration --
4904 ----------------------------------------
4905
4906 -- PROTECTED_ELEMENT_DECLARATION ::=
4907 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
4908
4909 -------------------------
4910 -- 9.4 Protected Body --
4911 -------------------------
4912
4913 -- PROTECTED_BODY ::=
4914 -- protected body DEFINING_IDENTIFIER is
4915 -- {PROTECTED_OPERATION_ITEM}
4916 -- end [protected_IDENTIFIER];
4917
4918 -- Note: protected bodies are not allowed in Ada 83 mode
4919
4920 -- Gigi restriction: This node never appears
4921
4922 -- N_Protected_Body
4923 -- Sloc points to PROTECTED
4924 -- Defining_Identifier (Node1)
4925 -- Declarations (List2) protected operation items (and pragmas)
4926 -- End_Label (Node4)
4927 -- Corresponding_Spec (Node5-Sem)
4928 -- Was_Originally_Stub (Flag13-Sem)
4929
4930 -----------------------------------
4931 -- 9.4 Protected Operation Item --
4932 -----------------------------------
4933
4934 -- PROTECTED_OPERATION_ITEM ::=
4935 -- SUBPROGRAM_DECLARATION
4936 -- | SUBPROGRAM_BODY
4937 -- | ENTRY_BODY
4938 -- | REPRESENTATION_CLAUSE
4939
4940 ------------------------------
4941 -- 9.5.2 Entry Declaration --
4942 ------------------------------
4943
4944 -- ENTRY_DECLARATION ::=
4945 -- [[not] overriding]
4946 -- entry DEFINING_IDENTIFIER
4947 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE;
4948
4949 -- N_Entry_Declaration
4950 -- Sloc points to ENTRY
4951 -- Defining_Identifier (Node1)
4952 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
4953 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4954 -- Corresponding_Body (Node5-Sem)
4955 -- Must_Override (Flag14) set if overriding indicator present
4956 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4957
4958 -- Note: overriding indicator is an Ada 2005 feature
4959
4960 -----------------------------
4961 -- 9.5.2 Accept statement --
4962 -----------------------------
4963
4964 -- ACCEPT_STATEMENT ::=
4965 -- accept entry_DIRECT_NAME
4966 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
4967 -- HANDLED_SEQUENCE_OF_STATEMENTS
4968 -- end [entry_IDENTIFIER]];
4969
4970 -- Gigi restriction: This node never appears
4971
4972 -- Note: there are no explicit declarations allowed in an accept
4973 -- statement. However, the implicit declarations for any statement
4974 -- identifiers (labels and block/loop identifiers) are declarations
4975 -- that belong logically to the accept statement, and that is why
4976 -- there is a Declarations field in this node.
4977
4978 -- N_Accept_Statement
4979 -- Sloc points to ACCEPT
4980 -- Entry_Direct_Name (Node1)
4981 -- Entry_Index (Node5) (set to Empty if not present)
4982 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4983 -- Handled_Statement_Sequence (Node4)
4984 -- Declarations (List2) (set to No_List if no declarations)
4985
4986 ------------------------
4987 -- 9.5.2 Entry Index --
4988 ------------------------
4989
4990 -- ENTRY_INDEX ::= EXPRESSION
4991
4992 -----------------------
4993 -- 9.5.2 Entry Body --
4994 -----------------------
4995
4996 -- ENTRY_BODY ::=
4997 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
4998 -- DECLARATIVE_PART
4999 -- begin
5000 -- HANDLED_SEQUENCE_OF_STATEMENTS
5001 -- end [entry_IDENTIFIER];
5002
5003 -- ENTRY_BARRIER ::= when CONDITION
5004
5005 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
5006 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
5007 -- too full (it would otherwise have too many fields)
5008
5009 -- Gigi restriction: This node never appears
5010
5011 -- N_Entry_Body
5012 -- Sloc points to ENTRY
5013 -- Defining_Identifier (Node1)
5014 -- Entry_Body_Formal_Part (Node5)
5015 -- Declarations (List2)
5016 -- Handled_Statement_Sequence (Node4)
5017 -- Activation_Chain_Entity (Node3-Sem)
5018
5019 -----------------------------------
5020 -- 9.5.2 Entry Body Formal Part --
5021 -----------------------------------
5022
5023 -- ENTRY_BODY_FORMAL_PART ::=
5024 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
5025
5026 -- Note that an entry body formal part node is present even if it is
5027 -- empty. This reflects the grammar, in which it is the components of
5028 -- the entry body formal part that are optional, not the entry body
5029 -- formal part itself. Also this means that the barrier condition
5030 -- always has somewhere to be stored.
5031
5032 -- Gigi restriction: This node never appears
5033
5034 -- N_Entry_Body_Formal_Part
5035 -- Sloc points to first token
5036 -- Entry_Index_Specification (Node4) (set to Empty if not present)
5037 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5038 -- Condition (Node1) from entry barrier of entry body
5039
5040 --------------------------
5041 -- 9.5.2 Entry Barrier --
5042 --------------------------
5043
5044 -- ENTRY_BARRIER ::= when CONDITION
5045
5046 --------------------------------------
5047 -- 9.5.2 Entry Index Specification --
5048 --------------------------------------
5049
5050 -- ENTRY_INDEX_SPECIFICATION ::=
5051 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
5052
5053 -- Gigi restriction: This node never appears
5054
5055 -- N_Entry_Index_Specification
5056 -- Sloc points to FOR
5057 -- Defining_Identifier (Node1)
5058 -- Discrete_Subtype_Definition (Node4)
5059
5060 ---------------------------------
5061 -- 9.5.3 Entry Call Statement --
5062 ---------------------------------
5063
5064 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
5065
5066 -- The parser may generate a procedure call for this construct. The
5067 -- semantic pass must correct this misidentification where needed.
5068
5069 -- Gigi restriction: This node never appears
5070
5071 -- N_Entry_Call_Statement
5072 -- Sloc points to first token of name
5073 -- Name (Node2)
5074 -- Parameter_Associations (List3) (set to No_List if no
5075 -- actual parameter part)
5076 -- First_Named_Actual (Node4-Sem)
5077
5078 ------------------------------
5079 -- 9.5.4 Requeue Statement --
5080 ------------------------------
5081
5082 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
5083
5084 -- Note: requeue statements are not permitted in Ada 83 mode
5085
5086 -- Gigi restriction: This node never appears
5087
5088 -- N_Requeue_Statement
5089 -- Sloc points to REQUEUE
5090 -- Name (Node2)
5091 -- Abort_Present (Flag15)
5092
5093 --------------------------
5094 -- 9.6 Delay Statement --
5095 --------------------------
5096
5097 -- DELAY_STATEMENT ::=
5098 -- DELAY_UNTIL_STATEMENT
5099 -- | DELAY_RELATIVE_STATEMENT
5100
5101 --------------------------------
5102 -- 9.6 Delay Until Statement --
5103 --------------------------------
5104
5105 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
5106
5107 -- Note: delay until statements are not permitted in Ada 83 mode
5108
5109 -- Gigi restriction: This node never appears
5110
5111 -- N_Delay_Until_Statement
5112 -- Sloc points to DELAY
5113 -- Expression (Node3)
5114
5115 -----------------------------------
5116 -- 9.6 Delay Relative Statement --
5117 -----------------------------------
5118
5119 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
5120
5121 -- Gigi restriction: This node never appears
5122
5123 -- N_Delay_Relative_Statement
5124 -- Sloc points to DELAY
5125 -- Expression (Node3)
5126
5127 ---------------------------
5128 -- 9.7 Select Statement --
5129 ---------------------------
5130
5131 -- SELECT_STATEMENT ::=
5132 -- SELECTIVE_ACCEPT
5133 -- | TIMED_ENTRY_CALL
5134 -- | CONDITIONAL_ENTRY_CALL
5135 -- | ASYNCHRONOUS_SELECT
5136
5137 -----------------------------
5138 -- 9.7.1 Selective Accept --
5139 -----------------------------
5140
5141 -- SELECTIVE_ACCEPT ::=
5142 -- select
5143 -- [GUARD]
5144 -- SELECT_ALTERNATIVE
5145 -- {or
5146 -- [GUARD]
5147 -- SELECT_ALTERNATIVE}
5148 -- [else
5149 -- SEQUENCE_OF_STATEMENTS]
5150 -- end select;
5151
5152 -- Gigi restriction: This node never appears
5153
5154 -- Note: the guard expression, if present, appears in the node for
5155 -- the select alternative.
5156
5157 -- N_Selective_Accept
5158 -- Sloc points to SELECT
5159 -- Select_Alternatives (List1)
5160 -- Else_Statements (List4) (set to No_List if no else part)
5161
5162 ------------------
5163 -- 9.7.1 Guard --
5164 ------------------
5165
5166 -- GUARD ::= when CONDITION =>
5167
5168 -- As noted above, the CONDITION that is part of a GUARD is included
5169 -- in the node for the select alternative for convenience.
5170
5171 -------------------------------
5172 -- 9.7.1 Select Alternative --
5173 -------------------------------
5174
5175 -- SELECT_ALTERNATIVE ::=
5176 -- ACCEPT_ALTERNATIVE
5177 -- | DELAY_ALTERNATIVE
5178 -- | TERMINATE_ALTERNATIVE
5179
5180 -------------------------------
5181 -- 9.7.1 Accept Alternative --
5182 -------------------------------
5183
5184 -- ACCEPT_ALTERNATIVE ::=
5185 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
5186
5187 -- Gigi restriction: This node never appears
5188
5189 -- N_Accept_Alternative
5190 -- Sloc points to ACCEPT
5191 -- Accept_Statement (Node2)
5192 -- Condition (Node1) from the guard (set to Empty if no guard present)
5193 -- Statements (List3) (set to Empty_List if no statements)
5194 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5195 -- Accept_Handler_Records (List5-Sem)
5196
5197 ------------------------------
5198 -- 9.7.1 Delay Alternative --
5199 ------------------------------
5200
5201 -- DELAY_ALTERNATIVE ::=
5202 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
5203
5204 -- Gigi restriction: This node never appears
5205
5206 -- N_Delay_Alternative
5207 -- Sloc points to DELAY
5208 -- Delay_Statement (Node2)
5209 -- Condition (Node1) from the guard (set to Empty if no guard present)
5210 -- Statements (List3) (set to Empty_List if no statements)
5211 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5212
5213 ----------------------------------
5214 -- 9.7.1 Terminate Alternative --
5215 ----------------------------------
5216
5217 -- TERMINATE_ALTERNATIVE ::= terminate;
5218
5219 -- Gigi restriction: This node never appears
5220
5221 -- N_Terminate_Alternative
5222 -- Sloc points to TERMINATE
5223 -- Condition (Node1) from the guard (set to Empty if no guard present)
5224 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5225 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
5226
5227 -----------------------------
5228 -- 9.7.2 Timed Entry Call --
5229 -----------------------------
5230
5231 -- TIMED_ENTRY_CALL ::=
5232 -- select
5233 -- ENTRY_CALL_ALTERNATIVE
5234 -- or
5235 -- DELAY_ALTERNATIVE
5236 -- end select;
5237
5238 -- Gigi restriction: This node never appears
5239
5240 -- N_Timed_Entry_Call
5241 -- Sloc points to SELECT
5242 -- Entry_Call_Alternative (Node1)
5243 -- Delay_Alternative (Node4)
5244
5245 -----------------------------------
5246 -- 9.7.2 Entry Call Alternative --
5247 -----------------------------------
5248
5249 -- ENTRY_CALL_ALTERNATIVE ::=
5250 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
5251
5252 -- PROCEDURE_OR_ENTRY_CALL ::=
5253 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
5254
5255 -- Gigi restriction: This node never appears
5256
5257 -- N_Entry_Call_Alternative
5258 -- Sloc points to first token of entry call statement
5259 -- Entry_Call_Statement (Node1)
5260 -- Statements (List3) (set to Empty_List if no statements)
5261 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5262
5263 -----------------------------------
5264 -- 9.7.3 Conditional Entry Call --
5265 -----------------------------------
5266
5267 -- CONDITIONAL_ENTRY_CALL ::=
5268 -- select
5269 -- ENTRY_CALL_ALTERNATIVE
5270 -- else
5271 -- SEQUENCE_OF_STATEMENTS
5272 -- end select;
5273
5274 -- Gigi restriction: This node never appears
5275
5276 -- N_Conditional_Entry_Call
5277 -- Sloc points to SELECT
5278 -- Entry_Call_Alternative (Node1)
5279 -- Else_Statements (List4)
5280
5281 --------------------------------
5282 -- 9.7.4 Asynchronous Select --
5283 --------------------------------
5284
5285 -- ASYNCHRONOUS_SELECT ::=
5286 -- select
5287 -- TRIGGERING_ALTERNATIVE
5288 -- then abort
5289 -- ABORTABLE_PART
5290 -- end select;
5291
5292 -- Note: asynchronous select is not permitted in Ada 83 mode
5293
5294 -- Gigi restriction: This node never appears
5295
5296 -- N_Asynchronous_Select
5297 -- Sloc points to SELECT
5298 -- Triggering_Alternative (Node1)
5299 -- Abortable_Part (Node2)
5300
5301 -----------------------------------
5302 -- 9.7.4 Triggering Alternative --
5303 -----------------------------------
5304
5305 -- TRIGGERING_ALTERNATIVE ::=
5306 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
5307
5308 -- Gigi restriction: This node never appears
5309
5310 -- N_Triggering_Alternative
5311 -- Sloc points to first token of triggering statement
5312 -- Triggering_Statement (Node1)
5313 -- Statements (List3) (set to Empty_List if no statements)
5314 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5315
5316 ---------------------------------
5317 -- 9.7.4 Triggering Statement --
5318 ---------------------------------
5319
5320 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
5321
5322 ---------------------------
5323 -- 9.7.4 Abortable Part --
5324 ---------------------------
5325
5326 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
5327
5328 -- Gigi restriction: This node never appears
5329
5330 -- N_Abortable_Part
5331 -- Sloc points to ABORT
5332 -- Statements (List3)
5333
5334 --------------------------
5335 -- 9.8 Abort Statement --
5336 --------------------------
5337
5338 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
5339
5340 -- Gigi restriction: This node never appears
5341
5342 -- N_Abort_Statement
5343 -- Sloc points to ABORT
5344 -- Names (List2)
5345
5346 -------------------------
5347 -- 10.1.1 Compilation --
5348 -------------------------
5349
5350 -- COMPILATION ::= {COMPILATION_UNIT}
5351
5352 -- There is no explicit node in the tree for a compilation, since in
5353 -- general the compiler is processing only a single compilation unit
5354 -- at a time. It is possible to parse multiple units in syntax check
5355 -- only mode, but the trees are discarded in that case.
5356
5357 ------------------------------
5358 -- 10.1.1 Compilation Unit --
5359 ------------------------------
5360
5361 -- COMPILATION_UNIT ::=
5362 -- CONTEXT_CLAUSE LIBRARY_ITEM
5363 -- | CONTEXT_CLAUSE SUBUNIT
5364
5365 -- The N_Compilation_Unit node itself represents the above syntax.
5366 -- However, there are two additional items not reflected in the above
5367 -- syntax. First we have the global declarations that are added by the
5368 -- code generator. These are outer level declarations (so they cannot
5369 -- be represented as being inside the units). An example is the wrapper
5370 -- subprograms that are created to do ABE checking. As always a list of
5371 -- declarations can contain actions as well (i.e. statements), and such
5372 -- statements are executed as part of the elaboration of the unit. Note
5373 -- that all such declarations are elaborated before the library unit.
5374
5375 -- Similarly, certain actions need to be elaborated at the completion
5376 -- of elaboration of the library unit (notably the statement that sets
5377 -- the Boolean flag indicating that elaboration is complete).
5378
5379 -- The third item not reflected in the syntax is pragmas that appear
5380 -- after the compilation unit. As always pragmas are a problem since
5381 -- they are not part of the formal syntax, but can be stuck into the
5382 -- source following a set of ad hoc rules, and we have to find an ad
5383 -- hoc way of sticking them into the tree. For pragmas that appear
5384 -- before the library unit, we just consider them to be part of the
5385 -- context clause, and pragmas can appear in the Context_Items list
5386 -- of the compilation unit. However, pragmas can also appear after
5387 -- the library item.
5388
5389 -- To deal with all these problems, we create an auxiliary node for
5390 -- a compilation unit, referenced from the N_Compilation_Unit node
5391 -- that contains these three items.
5392
5393 -- N_Compilation_Unit
5394 -- Sloc points to first token of defining unit name
5395 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
5396 -- Context_Items (List1) context items and pragmas preceding unit
5397 -- Private_Present (Flag15) set if library unit has private keyword
5398 -- Unit (Node2) library item or subunit
5399 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
5400 -- Has_No_Elaboration_Code (Flag17-Sem)
5401 -- Body_Required (Flag13-Sem) set for spec if body is required
5402 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
5403 -- Context_Pending (Flag16-Sem)
5404 -- First_Inlined_Subprogram (Node3-Sem)
5405
5406 -- N_Compilation_Unit_Aux
5407 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
5408 -- Declarations (List2) (set to No_List if no global declarations)
5409 -- Actions (List1) (set to No_List if no actions)
5410 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
5411 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
5412
5413 --------------------------
5414 -- 10.1.1 Library Item --
5415 --------------------------
5416
5417 -- LIBRARY_ITEM ::=
5418 -- [private] LIBRARY_UNIT_DECLARATION
5419 -- | LIBRARY_UNIT_BODY
5420 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
5421
5422 -- Note: PRIVATE is not allowed in Ada 83 mode
5423
5424 -- There is no explicit node in the tree for library item, instead
5425 -- the declaration or body, and the flag for private if present,
5426 -- appear in the N_Compilation_Unit node.
5427
5428 --------------------------------------
5429 -- 10.1.1 Library Unit Declaration --
5430 --------------------------------------
5431
5432 -- LIBRARY_UNIT_DECLARATION ::=
5433 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
5434 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
5435
5436 -----------------------------------------------
5437 -- 10.1.1 Library Unit Renaming Declaration --
5438 -----------------------------------------------
5439
5440 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
5441 -- PACKAGE_RENAMING_DECLARATION
5442 -- | GENERIC_RENAMING_DECLARATION
5443 -- | SUBPROGRAM_RENAMING_DECLARATION
5444
5445 -------------------------------
5446 -- 10.1.1 Library unit body --
5447 -------------------------------
5448
5449 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
5450
5451 ------------------------------
5452 -- 10.1.1 Parent Unit Name --
5453 ------------------------------
5454
5455 -- PARENT_UNIT_NAME ::= NAME
5456
5457 ----------------------------
5458 -- 10.1.2 Context clause --
5459 ----------------------------
5460
5461 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
5462
5463 -- The context clause can include pragmas, and any pragmas that appear
5464 -- before the context clause proper (i.e. all configuration pragmas,
5465 -- also appear at the front of this list).
5466
5467 --------------------------
5468 -- 10.1.2 Context_Item --
5469 --------------------------
5470
5471 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
5472
5473 -------------------------
5474 -- 10.1.2 With clause --
5475 -------------------------
5476
5477 -- WITH_CLAUSE ::=
5478 -- with library_unit_NAME {,library_unit_NAME};
5479
5480 -- A separate With clause is built for each name, so that we have
5481 -- a Corresponding_Spec field for each with'ed spec. The flags
5482 -- First_Name and Last_Name are used to reconstruct the exact
5483 -- source form. When a list of names appears in one with clause,
5484 -- the first name in the list has First_Name set, and the last
5485 -- has Last_Name set. If the with clause has only one name, then
5486 -- both of the flags First_Name and Last_Name are set in this name.
5487
5488 -- Note: in the case of implicit with's that are installed by the
5489 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
5490 -- set to Standard_Location, but it is incorrect to test the Sloc
5491 -- to find out if a with clause is implicit, test the flag instead.
5492
5493 -- N_With_Clause
5494 -- Sloc points to first token of library unit name
5495 -- Name (Node2)
5496 -- Next_Implicit_With (Node3-Sem)
5497 -- Library_Unit (Node4-Sem)
5498 -- Corresponding_Spec (Node5-Sem)
5499 -- First_Name (Flag5) (set to True if first name or only one name)
5500 -- Last_Name (Flag6) (set to True if last name or only one name)
5501 -- Context_Installed (Flag13-Sem)
5502 -- Elaborate_Present (Flag4-Sem)
5503 -- Elaborate_All_Present (Flag14-Sem)
5504 -- Elaborate_All_Desirable (Flag9-Sem)
5505 -- Elaborate_Desirable (Flag11-Sem)
5506 -- Private_Present (Flag15) set if with_clause has private keyword
5507 -- Implicit_With (Flag16-Sem)
5508 -- Limited_Present (Flag17) set if LIMITED is present
5509 -- Limited_View_Installed (Flag18-Sem)
5510 -- Unreferenced_In_Spec (Flag7-Sem)
5511 -- No_Entities_Ref_In_Spec (Flag8-Sem)
5512
5513 -- Note: Limited_Present and Limited_View_Installed give support to
5514 -- Ada 2005 (AI-50217).
5515 -- Similarly, Private_Present gives support to AI-50262.
5516
5517 ----------------------
5518 -- With_Type clause --
5519 ----------------------
5520
5521 -- This is a GNAT extension, used to implement mutually recursive
5522 -- types declared in different packages.
5523 -- Note: this is now obsolete. The functionality of this construct
5524 -- is now implemented by the Ada 2005 Limited_with_Clause.
5525
5526 ---------------------
5527 -- 10.2 Body stub --
5528 ---------------------
5529
5530 -- BODY_STUB ::=
5531 -- SUBPROGRAM_BODY_STUB
5532 -- | PACKAGE_BODY_STUB
5533 -- | TASK_BODY_STUB
5534 -- | PROTECTED_BODY_STUB
5535
5536 ----------------------------------
5537 -- 10.1.3 Subprogram Body Stub --
5538 ----------------------------------
5539
5540 -- SUBPROGRAM_BODY_STUB ::=
5541 -- SUBPROGRAM_SPECIFICATION is separate;
5542
5543 -- N_Subprogram_Body_Stub
5544 -- Sloc points to FUNCTION or PROCEDURE
5545 -- Specification (Node1)
5546 -- Library_Unit (Node4-Sem) points to the subunit
5547 -- Corresponding_Body (Node5-Sem)
5548
5549 -------------------------------
5550 -- 10.1.3 Package Body Stub --
5551 -------------------------------
5552
5553 -- PACKAGE_BODY_STUB ::=
5554 -- package body DEFINING_IDENTIFIER is separate;
5555
5556 -- N_Package_Body_Stub
5557 -- Sloc points to PACKAGE
5558 -- Defining_Identifier (Node1)
5559 -- Library_Unit (Node4-Sem) points to the subunit
5560 -- Corresponding_Body (Node5-Sem)
5561
5562 ----------------------------
5563 -- 10.1.3 Task Body Stub --
5564 ----------------------------
5565
5566 -- TASK_BODY_STUB ::=
5567 -- task body DEFINING_IDENTIFIER is separate;
5568
5569 -- N_Task_Body_Stub
5570 -- Sloc points to TASK
5571 -- Defining_Identifier (Node1)
5572 -- Library_Unit (Node4-Sem) points to the subunit
5573 -- Corresponding_Body (Node5-Sem)
5574
5575 ---------------------------------
5576 -- 10.1.3 Protected Body Stub --
5577 ---------------------------------
5578
5579 -- PROTECTED_BODY_STUB ::=
5580 -- protected body DEFINING_IDENTIFIER is separate;
5581
5582 -- Note: protected body stubs are not allowed in Ada 83 mode
5583
5584 -- N_Protected_Body_Stub
5585 -- Sloc points to PROTECTED
5586 -- Defining_Identifier (Node1)
5587 -- Library_Unit (Node4-Sem) points to the subunit
5588 -- Corresponding_Body (Node5-Sem)
5589
5590 ---------------------
5591 -- 10.1.3 Subunit --
5592 ---------------------
5593
5594 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
5595
5596 -- N_Subunit
5597 -- Sloc points to SEPARATE
5598 -- Name (Node2) is the name of the parent unit
5599 -- Proper_Body (Node1) is the subunit body
5600 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
5601
5602 ---------------------------------
5603 -- 11.1 Exception Declaration --
5604 ---------------------------------
5605
5606 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception;
5607
5608 -- For consistency with object declarations etc., the parser converts
5609 -- the case of multiple identifiers being declared to a series of
5610 -- declarations in which the expression is copied, using the More_Ids
5611 -- and Prev_Ids flags to remember the source form as described in the
5612 -- section on "Handling of Defining Identifier Lists".
5613
5614 -- N_Exception_Declaration
5615 -- Sloc points to EXCEPTION
5616 -- Defining_Identifier (Node1)
5617 -- Expression (Node3-Sem)
5618 -- Renaming_Exception (Node2-Sem)
5619 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5620 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5621
5622 ------------------------------------------
5623 -- 11.2 Handled Sequence Of Statements --
5624 ------------------------------------------
5625
5626 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
5627 -- SEQUENCE_OF_STATEMENTS
5628 -- [exception
5629 -- EXCEPTION_HANDLER
5630 -- {EXCEPTION_HANDLER}]
5631 -- [at end
5632 -- cleanup_procedure_call (param, param, param, ...);]
5633
5634 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
5635 -- used only internally currently, but is considered to be syntactic.
5636 -- At the moment, the only cleanup action allowed is a single call to
5637 -- a parameterless procedure, and the Identifier field of the node is
5638 -- the procedure to be called. Also there is a current restriction
5639 -- that exception handles and a cleanup cannot be present in the same
5640 -- frame, so at least one of Exception_Handlers or the Identifier must
5641 -- be missing.
5642
5643 -- Actually, more accurately, this restriction applies to the original
5644 -- source program. In the expanded tree, if the At_End_Proc field is
5645 -- present, then there will also be an exception handler of the form:
5646
5647 -- when all others =>
5648 -- cleanup;
5649 -- raise;
5650
5651 -- where cleanup is the procedure to be generated. The reason we do
5652 -- this is so that the front end can handle the necessary entries in
5653 -- the exception tables, and other exception handler actions required
5654 -- as part of the normal handling for exception handlers.
5655
5656 -- The AT END cleanup handler protects only the sequence of statements
5657 -- (not the associated declarations of the parent), just like exception
5658 -- handlers. The big difference is that the cleanup procedure is called
5659 -- on either a normal or an abnormal exit from the statement sequence.
5660
5661 -- Note: the list of Exception_Handlers can contain pragmas as well
5662 -- as actual handlers. In practice these pragmas can only occur at
5663 -- the start of the list, since any pragmas occurring later on will
5664 -- be included in the statement list of the corresponding handler.
5665
5666 -- Note: although in the Ada syntax, the sequence of statements in
5667 -- a handled sequence of statements can only contain statements, we
5668 -- allow free mixing of declarations and statements in the resulting
5669 -- expanded tree. This is for example used to deal with the case of
5670 -- a cleanup procedure that must handle declarations as well as the
5671 -- statements of a block.
5672
5673 -- N_Handled_Sequence_Of_Statements
5674 -- Sloc points to first token of first statement
5675 -- Statements (List3)
5676 -- End_Label (Node4) (set to Empty if expander generated)
5677 -- Exception_Handlers (List5) (set to No_List if none present)
5678 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
5679 -- First_Real_Statement (Node2-Sem)
5680 -- Zero_Cost_Handling (Flag5-Sem)
5681
5682 -- Note: the parent always contains a Declarations field which contains
5683 -- declarations associated with the handled sequence of statements. This
5684 -- is true even in the case of an accept statement (see description of
5685 -- the N_Accept_Statement node).
5686
5687 -- End_Label refers to the containing construct
5688
5689 -----------------------------
5690 -- 11.2 Exception Handler --
5691 -----------------------------
5692
5693 -- EXCEPTION_HANDLER ::=
5694 -- when [CHOICE_PARAMETER_SPECIFICATION :]
5695 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
5696 -- SEQUENCE_OF_STATEMENTS
5697
5698 -- Note: choice parameter specification is not allowed in Ada 83 mode
5699
5700 -- N_Exception_Handler
5701 -- Sloc points to WHEN
5702 -- Choice_Parameter (Node2) (set to Empty if not present)
5703 -- Exception_Choices (List4)
5704 -- Statements (List3)
5705 -- Exception_Label (Node5-Sem) (set to Empty of not present)
5706 -- Zero_Cost_Handling (Flag5-Sem)
5707 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
5708 -- Local_Raise_Not_OK (Flag7-Sem)
5709 -- Has_Local_Raise (Flag8-Sem)
5710
5711 ------------------------------------------
5712 -- 11.2 Choice parameter specification --
5713 ------------------------------------------
5714
5715 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
5716
5717 ----------------------------
5718 -- 11.2 Exception Choice --
5719 ----------------------------
5720
5721 -- EXCEPTION_CHOICE ::= exception_NAME | others
5722
5723 -- Except in the case of OTHERS, no explicit node appears in the tree
5724 -- for exception choice. Instead the exception name appears directly.
5725 -- An OTHERS choice is represented by a N_Others_Choice node (see
5726 -- section 3.8.1.
5727
5728 -- Note: for the exception choice created for an at end handler, the
5729 -- exception choice is an N_Others_Choice node with All_Others set.
5730
5731 ---------------------------
5732 -- 11.3 Raise Statement --
5733 ---------------------------
5734
5735 -- RAISE_STATEMENT ::= raise [exception_NAME];
5736
5737 -- In Ada 2005, we have
5738
5739 -- RAISE_STATEMENT ::= raise; | raise exception_NAME [with EXPRESSION];
5740
5741 -- N_Raise_Statement
5742 -- Sloc points to RAISE
5743 -- Name (Node2) (set to Empty if no exception name present)
5744 -- Expression (Node3) (set to Empty if no expression present)
5745 -- From_At_End (Flag4-Sem)
5746
5747 -------------------------------
5748 -- 12.1 Generic Declaration --
5749 -------------------------------
5750
5751 -- GENERIC_DECLARATION ::=
5752 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
5753
5754 ------------------------------------------
5755 -- 12.1 Generic Subprogram Declaration --
5756 ------------------------------------------
5757
5758 -- GENERIC_SUBPROGRAM_DECLARATION ::=
5759 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION;
5760
5761 -- Note: Generic_Formal_Declarations can include pragmas
5762
5763 -- N_Generic_Subprogram_Declaration
5764 -- Sloc points to GENERIC
5765 -- Specification (Node1) subprogram specification
5766 -- Corresponding_Body (Node5-Sem)
5767 -- Generic_Formal_Declarations (List2) from generic formal part
5768 -- Parent_Spec (Node4-Sem)
5769
5770 ---------------------------------------
5771 -- 12.1 Generic Package Declaration --
5772 ---------------------------------------
5773
5774 -- GENERIC_PACKAGE_DECLARATION ::=
5775 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION;
5776
5777 -- Note: when we do generics right, the Activation_Chain_Entity entry
5778 -- for this node can be removed (since the expander won't see generic
5779 -- units any more)???.
5780
5781 -- Note: Generic_Formal_Declarations can include pragmas
5782
5783 -- N_Generic_Package_Declaration
5784 -- Sloc points to GENERIC
5785 -- Specification (Node1) package specification
5786 -- Corresponding_Body (Node5-Sem)
5787 -- Generic_Formal_Declarations (List2) from generic formal part
5788 -- Parent_Spec (Node4-Sem)
5789 -- Activation_Chain_Entity (Node3-Sem)
5790
5791 -------------------------------
5792 -- 12.1 Generic Formal Part --
5793 -------------------------------
5794
5795 -- GENERIC_FORMAL_PART ::=
5796 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
5797
5798 ------------------------------------------------
5799 -- 12.1 Generic Formal Parameter Declaration --
5800 ------------------------------------------------
5801
5802 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
5803 -- FORMAL_OBJECT_DECLARATION
5804 -- | FORMAL_TYPE_DECLARATION
5805 -- | FORMAL_SUBPROGRAM_DECLARATION
5806 -- | FORMAL_PACKAGE_DECLARATION
5807
5808 ---------------------------------
5809 -- 12.3 Generic Instantiation --
5810 ---------------------------------
5811
5812 -- GENERIC_INSTANTIATION ::=
5813 -- package DEFINING_PROGRAM_UNIT_NAME is
5814 -- new generic_package_NAME [GENERIC_ACTUAL_PART];
5815 -- | [[not] overriding]
5816 -- procedure DEFINING_PROGRAM_UNIT_NAME is
5817 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART];
5818 -- | [[not] overriding]
5819 -- function DEFINING_DESIGNATOR is
5820 -- new generic_function_NAME [GENERIC_ACTUAL_PART];
5821
5822 -- N_Package_Instantiation
5823 -- Sloc points to PACKAGE
5824 -- Defining_Unit_Name (Node1)
5825 -- Name (Node2)
5826 -- Generic_Associations (List3) (set to No_List if no
5827 -- generic actual part)
5828 -- Parent_Spec (Node4-Sem)
5829 -- Instance_Spec (Node5-Sem)
5830 -- ABE_Is_Certain (Flag18-Sem)
5831
5832 -- N_Procedure_Instantiation
5833 -- Sloc points to PROCEDURE
5834 -- Defining_Unit_Name (Node1)
5835 -- Name (Node2)
5836 -- Parent_Spec (Node4-Sem)
5837 -- Generic_Associations (List3) (set to No_List if no
5838 -- generic actual part)
5839 -- Instance_Spec (Node5-Sem)
5840 -- Must_Override (Flag14) set if overriding indicator present
5841 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5842 -- ABE_Is_Certain (Flag18-Sem)
5843
5844 -- N_Function_Instantiation
5845 -- Sloc points to FUNCTION
5846 -- Defining_Unit_Name (Node1)
5847 -- Name (Node2)
5848 -- Generic_Associations (List3) (set to No_List if no
5849 -- generic actual part)
5850 -- Parent_Spec (Node4-Sem)
5851 -- Instance_Spec (Node5-Sem)
5852 -- Must_Override (Flag14) set if overriding indicator present
5853 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5854 -- ABE_Is_Certain (Flag18-Sem)
5855
5856 -- Note: overriding indicator is an Ada 2005 feature
5857
5858 -------------------------------
5859 -- 12.3 Generic Actual Part --
5860 -------------------------------
5861
5862 -- GENERIC_ACTUAL_PART ::=
5863 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
5864
5865 -------------------------------
5866 -- 12.3 Generic Association --
5867 -------------------------------
5868
5869 -- GENERIC_ASSOCIATION ::=
5870 -- [generic_formal_parameter_SELECTOR_NAME =>]
5871
5872 -- Note: unlike the procedure call case, a generic association node
5873 -- is generated for every association, even if no formal parameter
5874 -- selector name is present. In this case the parser will leave the
5875 -- Selector_Name field set to Empty, to be filled in later by the
5876 -- semantic pass.
5877
5878 -- In Ada 2005, a formal may be associated with a box, if the
5879 -- association is part of the list of actuals for a formal package.
5880 -- If the association is given by OTHERS => <>, the association is
5881 -- an N_Others_Choice.
5882
5883 -- N_Generic_Association
5884 -- Sloc points to first token of generic association
5885 -- Selector_Name (Node2) (set to Empty if no formal
5886 -- parameter selector name)
5887 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
5888 -- Box_Present (Flag15) (for formal_package associations with a box)
5889
5890 ---------------------------------------------
5891 -- 12.3 Explicit Generic Actual Parameter --
5892 ---------------------------------------------
5893
5894 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
5895 -- EXPRESSION | variable_NAME | subprogram_NAME
5896 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
5897
5898 -------------------------------------
5899 -- 12.4 Formal Object Declaration --
5900 -------------------------------------
5901
5902 -- FORMAL_OBJECT_DECLARATION ::=
5903 -- DEFINING_IDENTIFIER_LIST :
5904 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION];
5905 -- | DEFINING_IDENTIFIER_LIST :
5906 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION];
5907
5908 -- Although the syntax allows multiple identifiers in the list, the
5909 -- semantics is as though successive declarations were given with
5910 -- identical type definition and expression components. To simplify
5911 -- semantic processing, the parser represents a multiple declaration
5912 -- case as a sequence of single declarations, using the More_Ids and
5913 -- Prev_Ids flags to preserve the original source form as described
5914 -- in the section on "Handling of Defining Identifier Lists".
5915
5916 -- N_Formal_Object_Declaration
5917 -- Sloc points to first identifier
5918 -- Defining_Identifier (Node1)
5919 -- In_Present (Flag15)
5920 -- Out_Present (Flag17)
5921 -- Null_Exclusion_Present (Flag11) (set to False if not present)
5922 -- Subtype_Mark (Node4) (set to Empty if not present)
5923 -- Access_Definition (Node3) (set to Empty if not present)
5924 -- Default_Expression (Node5) (set to Empty if no default expression)
5925 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5926 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5927
5928 -----------------------------------
5929 -- 12.5 Formal Type Declaration --
5930 -----------------------------------
5931
5932 -- FORMAL_TYPE_DECLARATION ::=
5933 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5934 -- is FORMAL_TYPE_DEFINITION;
5935
5936 -- N_Formal_Type_Declaration
5937 -- Sloc points to TYPE
5938 -- Defining_Identifier (Node1)
5939 -- Formal_Type_Definition (Node3)
5940 -- Discriminant_Specifications (List4) (set to No_List if no
5941 -- discriminant part)
5942 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5943
5944 ----------------------------------
5945 -- 12.5 Formal type definition --
5946 ----------------------------------
5947
5948 -- FORMAL_TYPE_DEFINITION ::=
5949 -- FORMAL_PRIVATE_TYPE_DEFINITION
5950 -- | FORMAL_DERIVED_TYPE_DEFINITION
5951 -- | FORMAL_DISCRETE_TYPE_DEFINITION
5952 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
5953 -- | FORMAL_MODULAR_TYPE_DEFINITION
5954 -- | FORMAL_FLOATING_POINT_DEFINITION
5955 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
5956 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
5957 -- | FORMAL_ARRAY_TYPE_DEFINITION
5958 -- | FORMAL_ACCESS_TYPE_DEFINITION
5959 -- | FORMAL_INTERFACE_TYPE_DEFINITION
5960
5961 ---------------------------------------------
5962 -- 12.5.1 Formal Private Type Definition --
5963 ---------------------------------------------
5964
5965 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
5966 -- [[abstract] tagged] [limited] private
5967
5968 -- Note: TAGGED is not allowed in Ada 83 mode
5969
5970 -- N_Formal_Private_Type_Definition
5971 -- Sloc points to PRIVATE
5972 -- Abstract_Present (Flag4)
5973 -- Tagged_Present (Flag15)
5974 -- Limited_Present (Flag17)
5975
5976 --------------------------------------------
5977 -- 12.5.1 Formal Derived Type Definition --
5978 --------------------------------------------
5979
5980 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
5981 -- [abstract] [limited | synchronized]
5982 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
5983 -- Note: this construct is not allowed in Ada 83 mode
5984
5985 -- N_Formal_Derived_Type_Definition
5986 -- Sloc points to NEW
5987 -- Subtype_Mark (Node4)
5988 -- Private_Present (Flag15)
5989 -- Abstract_Present (Flag4)
5990 -- Limited_Present (Flag17)
5991 -- Synchronized_Present (Flag7)
5992 -- Interface_List (List2) (set to No_List if none)
5993
5994 ---------------------------------------------
5995 -- 12.5.2 Formal Discrete Type Definition --
5996 ---------------------------------------------
5997
5998 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
5999
6000 -- N_Formal_Discrete_Type_Definition
6001 -- Sloc points to (
6002
6003 ---------------------------------------------------
6004 -- 12.5.2 Formal Signed Integer Type Definition --
6005 ---------------------------------------------------
6006
6007 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
6008
6009 -- N_Formal_Signed_Integer_Type_Definition
6010 -- Sloc points to RANGE
6011
6012 --------------------------------------------
6013 -- 12.5.2 Formal Modular Type Definition --
6014 --------------------------------------------
6015
6016 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
6017
6018 -- N_Formal_Modular_Type_Definition
6019 -- Sloc points to MOD
6020
6021 ----------------------------------------------
6022 -- 12.5.2 Formal Floating Point Definition --
6023 ----------------------------------------------
6024
6025 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
6026
6027 -- N_Formal_Floating_Point_Definition
6028 -- Sloc points to DIGITS
6029
6030 ----------------------------------------------------
6031 -- 12.5.2 Formal Ordinary Fixed Point Definition --
6032 ----------------------------------------------------
6033
6034 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
6035
6036 -- N_Formal_Ordinary_Fixed_Point_Definition
6037 -- Sloc points to DELTA
6038
6039 ---------------------------------------------------
6040 -- 12.5.2 Formal Decimal Fixed Point Definition --
6041 ---------------------------------------------------
6042
6043 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
6044
6045 -- Note: formal decimal fixed point definition not allowed in Ada 83
6046
6047 -- N_Formal_Decimal_Fixed_Point_Definition
6048 -- Sloc points to DELTA
6049
6050 ------------------------------------------
6051 -- 12.5.3 Formal Array Type Definition --
6052 ------------------------------------------
6053
6054 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
6055
6056 -------------------------------------------
6057 -- 12.5.4 Formal Access Type Definition --
6058 -------------------------------------------
6059
6060 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
6061
6062 ----------------------------------------------
6063 -- 12.5.5 Formal Interface Type Definition --
6064 ----------------------------------------------
6065
6066 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
6067
6068 -----------------------------------------
6069 -- 12.6 Formal Subprogram Declaration --
6070 -----------------------------------------
6071
6072 -- FORMAL_SUBPROGRAM_DECLARATION ::=
6073 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
6074 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
6075
6076 --------------------------------------------------
6077 -- 12.6 Formal Concrete Subprogram Declaration --
6078 --------------------------------------------------
6079
6080 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
6081 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT];
6082
6083 -- N_Formal_Concrete_Subprogram_Declaration
6084 -- Sloc points to WITH
6085 -- Specification (Node1)
6086 -- Default_Name (Node2) (set to Empty if no subprogram default)
6087 -- Box_Present (Flag15)
6088
6089 -- Note: if no subprogram default is present, then Name is set
6090 -- to Empty, and Box_Present is False.
6091
6092 --------------------------------------------------
6093 -- 12.6 Formal Abstract Subprogram Declaration --
6094 --------------------------------------------------
6095
6096 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
6097 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT];
6098
6099 -- N_Formal_Abstract_Subprogram_Declaration
6100 -- Sloc points to WITH
6101 -- Specification (Node1)
6102 -- Default_Name (Node2) (set to Empty if no subprogram default)
6103 -- Box_Present (Flag15)
6104
6105 -- Note: if no subprogram default is present, then Name is set
6106 -- to Empty, and Box_Present is False.
6107
6108 ------------------------------
6109 -- 12.6 Subprogram Default --
6110 ------------------------------
6111
6112 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
6113
6114 -- There is no separate node in the tree for a subprogram default.
6115 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
6116 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
6117 -- default name or box indication, as needed.
6118
6119 ------------------------
6120 -- 12.6 Default Name --
6121 ------------------------
6122
6123 -- DEFAULT_NAME ::= NAME
6124
6125 --------------------------------------
6126 -- 12.7 Formal Package Declaration --
6127 --------------------------------------
6128
6129 -- FORMAL_PACKAGE_DECLARATION ::=
6130 -- with package DEFINING_IDENTIFIER
6131 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART;
6132
6133 -- Note: formal package declarations not allowed in Ada 83 mode
6134
6135 -- N_Formal_Package_Declaration
6136 -- Sloc points to WITH
6137 -- Defining_Identifier (Node1)
6138 -- Name (Node2)
6139 -- Generic_Associations (List3) (set to No_List if (<>) case or
6140 -- empty generic actual part)
6141 -- Box_Present (Flag15)
6142 -- Instance_Spec (Node5-Sem)
6143 -- ABE_Is_Certain (Flag18-Sem)
6144
6145 --------------------------------------
6146 -- 12.7 Formal Package Actual Part --
6147 --------------------------------------
6148
6149 -- FORMAL_PACKAGE_ACTUAL_PART ::=
6150 -- ([OTHERS] => <>)
6151 -- | [GENERIC_ACTUAL_PART]
6152 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
6153
6154 -- FORMAL_PACKAGE_ASSOCIATION ::=
6155 -- GENERIC_ASSOCIATION
6156 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
6157
6158 -- There is no explicit node in the tree for a formal package actual
6159 -- part. Instead the information appears in the parent node (i.e. the
6160 -- formal package declaration node itself).
6161
6162 -- There is no explicit node for a formal package association. All of
6163 -- them are represented either by a generic association, possibly with
6164 -- Box_Present, or by an N_Others_Choice.
6165
6166 ---------------------------------
6167 -- 13.1 Representation clause --
6168 ---------------------------------
6169
6170 -- REPRESENTATION_CLAUSE ::=
6171 -- ATTRIBUTE_DEFINITION_CLAUSE
6172 -- | ENUMERATION_REPRESENTATION_CLAUSE
6173 -- | RECORD_REPRESENTATION_CLAUSE
6174 -- | AT_CLAUSE
6175
6176 ----------------------
6177 -- 13.1 Local Name --
6178 ----------------------
6179
6180 -- LOCAL_NAME :=
6181 -- DIRECT_NAME
6182 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
6183 -- | library_unit_NAME
6184
6185 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
6186 -- as an attribute reference, which has essentially the same form.
6187
6188 ---------------------------------------
6189 -- 13.3 Attribute definition clause --
6190 ---------------------------------------
6191
6192 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
6193 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
6194 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
6195
6196 -- In Ada 83, the expression must be a simple expression and the
6197 -- local name must be a direct name.
6198
6199 -- Note: the only attribute definition clause that is processed by
6200 -- gigi is an address clause. For all other cases, the information
6201 -- is extracted by the front end and either results in setting entity
6202 -- information, e.g. Esize for the Size clause, or in appropriate
6203 -- expansion actions (e.g. in the case of Storage_Size).
6204
6205 -- For an address clause, Gigi constructs the appropriate addressing
6206 -- code. It also ensures that no aliasing optimizations are made
6207 -- for the object for which the address clause appears.
6208
6209 -- Note: for an address clause used to achieve an overlay:
6210
6211 -- A : Integer;
6212 -- B : Integer;
6213 -- for B'Address use A'Address;
6214
6215 -- the above rule means that Gigi will ensure that no optimizations
6216 -- will be made for B that would violate the implementation advice
6217 -- of RM 13.3(19). However, this advice applies only to B and not
6218 -- to A, which seems unfortunate. The GNAT front end will mark the
6219 -- object A as volatile to also prevent unwanted optimization
6220 -- assumptions based on no aliasing being made for B.
6221
6222 -- N_Attribute_Definition_Clause
6223 -- Sloc points to FOR
6224 -- Name (Node2) the local name
6225 -- Chars (Name1) the identifier name from the attribute designator
6226 -- Expression (Node3) the expression or name
6227 -- Entity (Node4-Sem)
6228 -- Next_Rep_Item (Node5-Sem)
6229 -- From_At_Mod (Flag4-Sem)
6230 -- Check_Address_Alignment (Flag11-Sem)
6231 -- Address_Warning_Posted (Flag18-Sem)
6232
6233 ---------------------------------------------
6234 -- 13.4 Enumeration representation clause --
6235 ---------------------------------------------
6236
6237 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
6238 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
6239
6240 -- In Ada 83, the name must be a direct name
6241
6242 -- N_Enumeration_Representation_Clause
6243 -- Sloc points to FOR
6244 -- Identifier (Node1) direct name
6245 -- Array_Aggregate (Node3)
6246 -- Next_Rep_Item (Node5-Sem)
6247
6248 ---------------------------------
6249 -- 13.4 Enumeration aggregate --
6250 ---------------------------------
6251
6252 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
6253
6254 ------------------------------------------
6255 -- 13.5.1 Record representation clause --
6256 ------------------------------------------
6257
6258 -- RECORD_REPRESENTATION_CLAUSE ::=
6259 -- for first_subtype_LOCAL_NAME use
6260 -- record [MOD_CLAUSE]
6261 -- {COMPONENT_CLAUSE}
6262 -- end record;
6263
6264 -- Gigi restriction: Mod_Clause is always Empty (if present it is
6265 -- replaced by a corresponding Alignment attribute definition clause).
6266
6267 -- Note: Component_Clauses can include pragmas
6268
6269 -- N_Record_Representation_Clause
6270 -- Sloc points to FOR
6271 -- Identifier (Node1) direct name
6272 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
6273 -- Component_Clauses (List3)
6274 -- Next_Rep_Item (Node5-Sem)
6275
6276 ------------------------------
6277 -- 13.5.1 Component clause --
6278 ------------------------------
6279
6280 -- COMPONENT_CLAUSE ::=
6281 -- component_LOCAL_NAME at POSITION
6282 -- range FIRST_BIT .. LAST_BIT;
6283
6284 -- N_Component_Clause
6285 -- Sloc points to AT
6286 -- Component_Name (Node1) points to Name or Attribute_Reference
6287 -- Position (Node2)
6288 -- First_Bit (Node3)
6289 -- Last_Bit (Node4)
6290
6291 ----------------------
6292 -- 13.5.1 Position --
6293 ----------------------
6294
6295 -- POSITION ::= static_EXPRESSION
6296
6297 -----------------------
6298 -- 13.5.1 First_Bit --
6299 -----------------------
6300
6301 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
6302
6303 ----------------------
6304 -- 13.5.1 Last_Bit --
6305 ----------------------
6306
6307 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
6308
6309 --------------------------
6310 -- 13.8 Code statement --
6311 --------------------------
6312
6313 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
6314
6315 -- Note: in GNAT, the qualified expression has the form
6316
6317 -- Asm_Insn'(Asm (...));
6318
6319 -- See package System.Machine_Code in file s-maccod.ads for details on
6320 -- the allowed parameters to Asm. There are two ways this node can
6321 -- arise, as a code statement, in which case the expression is the
6322 -- qualified expression, or as a result of the expansion of an intrinsic
6323 -- call to the Asm or Asm_Input procedure.
6324
6325 -- N_Code_Statement
6326 -- Sloc points to first token of the expression
6327 -- Expression (Node3)
6328
6329 -- Note: package Exp_Code contains an abstract functional interface
6330 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
6331
6332 ------------------------
6333 -- 13.12 Restriction --
6334 ------------------------
6335
6336 -- RESTRICTION ::=
6337 -- restriction_IDENTIFIER
6338 -- | restriction_parameter_IDENTIFIER => EXPRESSION
6339
6340 -- There is no explicit node for restrictions. Instead the restriction
6341 -- appears in normal pragma syntax as a pragma argument association,
6342 -- which has the same syntactic form.
6343
6344 --------------------------
6345 -- B.2 Shift Operators --
6346 --------------------------
6347
6348 -- Calls to the intrinsic shift functions are converted to one of
6349 -- the following shift nodes, which have the form of normal binary
6350 -- operator names. Note that for a given shift operation, one node
6351 -- covers all possible types, as for normal operators.
6352
6353 -- Note: it is perfectly permissible for the expander to generate
6354 -- shift operation nodes directly, in which case they will be analyzed
6355 -- and parsed in the usual manner.
6356
6357 -- Sprint syntax: shift-function-name!(expr, count)
6358
6359 -- Note: the Left_Opnd field holds the first argument (the value to
6360 -- be shifted). The Right_Opnd field holds the second argument (the
6361 -- shift count). The Chars field is the name of the intrinsic function.
6362
6363 -- N_Op_Rotate_Left
6364 -- Sloc points to the function name
6365 -- plus fields for binary operator
6366 -- plus fields for expression
6367 -- Shift_Count_OK (Flag4-Sem)
6368
6369 -- N_Op_Rotate_Right
6370 -- Sloc points to the function name
6371 -- plus fields for binary operator
6372 -- plus fields for expression
6373 -- Shift_Count_OK (Flag4-Sem)
6374
6375 -- N_Op_Shift_Left
6376 -- Sloc points to the function name
6377 -- plus fields for binary operator
6378 -- plus fields for expression
6379 -- Shift_Count_OK (Flag4-Sem)
6380
6381 -- N_Op_Shift_Right_Arithmetic
6382 -- Sloc points to the function name
6383 -- plus fields for binary operator
6384 -- plus fields for expression
6385 -- Shift_Count_OK (Flag4-Sem)
6386
6387 -- N_Op_Shift_Right
6388 -- Sloc points to the function name
6389 -- plus fields for binary operator
6390 -- plus fields for expression
6391 -- Shift_Count_OK (Flag4-Sem)
6392
6393 --------------------------
6394 -- Obsolescent Features --
6395 --------------------------
6396
6397 -- The syntax descriptions and tree nodes for obsolescent features are
6398 -- grouped together, corresponding to their location in appendix I in
6399 -- the RM. However, parsing and semantic analysis for these constructs
6400 -- is located in an appropriate chapter (see individual notes).
6401
6402 ---------------------------
6403 -- J.3 Delta Constraint --
6404 ---------------------------
6405
6406 -- Note: the parse routine for this construct is located in section
6407 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
6408 -- where delta constraint logically belongs.
6409
6410 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
6411
6412 -- N_Delta_Constraint
6413 -- Sloc points to DELTA
6414 -- Delta_Expression (Node3)
6415 -- Range_Constraint (Node4) (set to Empty if not present)
6416
6417 --------------------
6418 -- J.7 At Clause --
6419 --------------------
6420
6421 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
6422
6423 -- Note: the parse routine for this construct is located in Par-Ch13,
6424 -- and the semantic analysis is in Sem_Ch13, where at clause logically
6425 -- belongs if it were not obsolescent.
6426
6427 -- Note: in Ada 83 the expression must be a simple expression
6428
6429 -- Gigi restriction: This node never appears, it is rewritten as an
6430 -- address attribute definition clause.
6431
6432 -- N_At_Clause
6433 -- Sloc points to FOR
6434 -- Identifier (Node1)
6435 -- Expression (Node3)
6436
6437 ---------------------
6438 -- J.8 Mod clause --
6439 ---------------------
6440
6441 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
6442
6443 -- Note: the parse routine for this construct is located in Par-Ch13,
6444 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
6445 -- belongs if it were not obsolescent.
6446
6447 -- Note: in Ada 83, the expression must be a simple expression
6448
6449 -- Gigi restriction: this node never appears. It is replaced
6450 -- by a corresponding Alignment attribute definition clause.
6451
6452 -- Note: pragmas can appear before and after the MOD_CLAUSE since
6453 -- its name has "clause" in it. This is rather strange, but is quite
6454 -- definitely specified. The pragmas before are collected in the
6455 -- Pragmas_Before field of the mod clause node itself, and pragmas
6456 -- after are simply swallowed up in the list of component clauses.
6457
6458 -- N_Mod_Clause
6459 -- Sloc points to AT
6460 -- Expression (Node3)
6461 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
6462
6463 --------------------
6464 -- Semantic Nodes --
6465 --------------------
6466
6467 -- These semantic nodes are used to hold additional semantic information.
6468 -- They are inserted into the tree as a result of semantic processing.
6469 -- Although there are no legitimate source syntax constructions that
6470 -- correspond directly to these nodes, we need a source syntax for the
6471 -- reconstructed tree printed by Sprint, and the node descriptions here
6472 -- show this syntax.
6473
6474 -- Note: Conditional_Expression is in this section for historical reasons.
6475 -- We will move it to its appropriate place when it is officially approved
6476 -- as an extension (and then we will know what the exact grammar and place
6477 -- in the Reference Manual is!)
6478
6479 ----------------------------
6480 -- Conditional Expression --
6481 ----------------------------
6482
6483 -- This node is used to represent an expression corresponding to the
6484 -- C construct (condition ? then-expression : else_expression), where
6485 -- Expressions is a three element list, whose first expression is the
6486 -- condition, and whose second and third expressions are the then and
6487 -- else expressions respectively.
6488
6489 -- Note: the Then_Actions and Else_Actions fields are always set to
6490 -- No_List in the tree passed to Gigi. These fields are used only
6491 -- for temporary processing purposes in the expander.
6492
6493 -- The Ada language does not permit conditional expressions, however
6494 -- this is under discussion as a possible extension by the ARG, and we
6495 -- have implemented a form of this capability in GNAT under control of
6496 -- the -gnatX switch. The syntax is:
6497
6498 -- CONDITIONAL_EXPRESSION ::=
6499 -- if EXPRESSION then EXPRESSION
6500 -- {elsif EXPRESSION then EXPRESSION}
6501 -- [else EXPRESSION]
6502
6503 -- And we add the additional constructs
6504
6505 -- PRIMARY ::= ( CONDITIONAL_EXPRESION )
6506 -- PRAGMA_ARGUMENT_ASSOCIATION ::= CONDITIONAL_EXPRESSION
6507
6508 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
6509 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
6510 -- the Is_Elsif flag is set on the inner conditional expression.
6511
6512 -- N_Conditional_Expression
6513 -- Sloc points to IF or ELSIF keyword
6514 -- Expressions (List1)
6515 -- Then_Actions (List2-Sem)
6516 -- Else_Actions (List3-Sem)
6517 -- Is_Elsif (Flag13) (set if comes from ELSIF)
6518 -- plus fields for expression
6519
6520 -------------------
6521 -- Expanded_Name --
6522 -------------------
6523
6524 -- The N_Expanded_Name node is used to represent a selected component
6525 -- name that has been resolved to an expanded name. The semantic phase
6526 -- replaces N_Selected_Component nodes that represent names by the use
6527 -- of this node, leaving the N_Selected_Component node used only when
6528 -- the prefix is a record or protected type.
6529
6530 -- The fields of the N_Expanded_Name node are layed out identically
6531 -- to those of the N_Selected_Component node, allowing conversion of
6532 -- an expanded name node to a selected component node to be done
6533 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
6534
6535 -- There is no special sprint syntax for an expanded name
6536
6537 -- N_Expanded_Name
6538 -- Sloc points to the period
6539 -- Chars (Name1) copy of Chars field of selector name
6540 -- Prefix (Node3)
6541 -- Selector_Name (Node2)
6542 -- Entity (Node4-Sem)
6543 -- Associated_Node (Node4-Sem)
6544 -- Redundant_Use (Flag13-Sem)
6545 -- Has_Private_View (Flag11-Sem) set in generic units.
6546 -- plus fields for expression
6547
6548 --------------------
6549 -- Free Statement --
6550 --------------------
6551
6552 -- The N_Free_Statement node is generated as a result of a call to an
6553 -- instantiation of Unchecked_Deallocation. The instantiation of this
6554 -- generic is handled specially and generates this node directly.
6555
6556 -- Sprint syntax: free expression
6557
6558 -- N_Free_Statement
6559 -- Sloc is copied from the unchecked deallocation call
6560 -- Expression (Node3) argument to unchecked deallocation call
6561 -- Storage_Pool (Node1-Sem)
6562 -- Procedure_To_Call (Node2-Sem)
6563 -- Actual_Designated_Subtype (Node4-Sem)
6564
6565 -- Note: in the case where a debug source file is generated, the Sloc
6566 -- for this node points to the FREE keyword in the Sprint file output.
6567
6568 -------------------
6569 -- Freeze Entity --
6570 -------------------
6571
6572 -- This node marks the point in a declarative part at which an entity
6573 -- declared therein becomes frozen. The expander places initialization
6574 -- procedures for types at those points. Gigi uses the freezing point
6575 -- to elaborate entities that may depend on previous private types.
6576
6577 -- See the section in Einfo "Delayed Freezing and Elaboration" for
6578 -- a full description of the use of this node.
6579
6580 -- The Entity field points back to the entity for the type (whose
6581 -- Freeze_Node field points back to this freeze node).
6582
6583 -- The Actions field contains a list of declarations and statements
6584 -- generated by the expander which are associated with the freeze
6585 -- node, and are elaborated as though the freeze node were replaced
6586 -- by this sequence of actions.
6587
6588 -- Note: the Sloc field in the freeze node references a construct
6589 -- associated with the freezing point. This is used for posting
6590 -- messages in some error/warning situations, e.g. the case where
6591 -- a primitive operation of a tagged type is declared too late.
6592
6593 -- Sprint syntax: freeze entity-name [
6594 -- freeze actions
6595 -- ]
6596
6597 -- N_Freeze_Entity
6598 -- Sloc points near freeze point (see above special note)
6599 -- Entity (Node4-Sem)
6600 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
6601 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
6602 -- Actions (List1) (set to No_List if no freeze actions)
6603 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
6604
6605 -- The Actions field holds actions associated with the freeze. These
6606 -- actions are elaborated at the point where the type is frozen.
6607
6608 -- Note: in the case where a debug source file is generated, the Sloc
6609 -- for this node points to the FREEZE keyword in the Sprint file output.
6610
6611 --------------------------------
6612 -- Implicit Label Declaration --
6613 --------------------------------
6614
6615 -- An implicit label declaration is created for every occurrence of a
6616 -- label on a statement or a label on a block or loop. It is chained
6617 -- in the declarations of the innermost enclosing block as specified
6618 -- in RM section 5.1 (3).
6619
6620 -- The Defining_Identifier is the actual identifier for the statement
6621 -- identifier. Note that the occurrence of the label is a reference, NOT
6622 -- the defining occurrence. The defining occurrence occurs at the head
6623 -- of the innermost enclosing block, and is represented by this node.
6624
6625 -- Note: from the grammar, this might better be called an implicit
6626 -- statement identifier declaration, but the term we choose seems
6627 -- friendlier, since at least informally statement identifiers are
6628 -- called labels in both cases (i.e. when used in labels, and when
6629 -- used as the identifiers of blocks and loops).
6630
6631 -- Note: although this is logically a semantic node, since it does not
6632 -- correspond directly to a source syntax construction, these nodes are
6633 -- actually created by the parser in a post pass done just after parsing
6634 -- is complete, before semantic analysis is started (see Par.Labl).
6635
6636 -- Sprint syntax: labelname : label;
6637
6638 -- N_Implicit_Label_Declaration
6639 -- Sloc points to the << of the label
6640 -- Defining_Identifier (Node1)
6641 -- Label_Construct (Node2-Sem)
6642
6643 -- Note: in the case where a debug source file is generated, the Sloc
6644 -- for this node points to the label name in the generated declaration.
6645
6646 ---------------------
6647 -- Itype_Reference --
6648 ---------------------
6649
6650 -- This node is used to create a reference to an Itype. The only purpose
6651 -- is to make sure the Itype is defined if this is the first reference.
6652
6653 -- A typical use of this node is when an Itype is to be referenced in
6654 -- two branches of an IF statement. In this case it is important that
6655 -- the first use of the Itype not be inside the conditional, since then
6656 -- it might not be defined if the other branch of the IF is taken, in
6657 -- the case where the definition generates elaboration code.
6658
6659 -- The Itype field points to the referenced Itype
6660
6661 -- Sprint syntax: reference itype-name
6662
6663 -- N_Itype_Reference
6664 -- Sloc points to the node generating the reference
6665 -- Itype (Node1-Sem)
6666
6667 -- Note: in the case where a debug source file is generated, the Sloc
6668 -- for this node points to the REFERENCE keyword in the file output.
6669
6670 ---------------------
6671 -- Raise_xxx_Error --
6672 ---------------------
6673
6674 -- One of these nodes is created during semantic analysis to replace
6675 -- a node for an expression that is determined to definitely raise
6676 -- the corresponding exception.
6677
6678 -- The N_Raise_xxx_Error node may also stand alone in place
6679 -- of a declaration or statement, in which case it simply causes
6680 -- the exception to be raised (i.e. it is equivalent to a raise
6681 -- statement that raises the corresponding exception). This use
6682 -- is distinguished by the fact that the Etype in this case is
6683 -- Standard_Void_Type, In the subexpression case, the Etype is the
6684 -- same as the type of the subexpression which it replaces.
6685
6686 -- If Condition is empty, then the raise is unconditional. If the
6687 -- Condition field is non-empty, it is a boolean expression which
6688 -- is first evaluated, and the exception is raised only if the
6689 -- value of the expression is True. In the unconditional case, the
6690 -- creation of this node is usually accompanied by a warning message
6691 -- error. The creation of this node will usually be accompanied by a
6692 -- message (unless it appears within the right operand of a short
6693 -- circuit form whose left argument is static and decisively
6694 -- eliminates elaboration of the raise operation. The condition field
6695 -- can ONLY be present when the node is used as a statement form, it
6696 -- may NOT be present in the case where the node appears within an
6697 -- expression.
6698
6699 -- The exception is generated with a message that contains the
6700 -- file name and line number, and then appended text. The Reason
6701 -- code shows the text to be added. The Reason code is an element
6702 -- of the type Types.RT_Exception_Code, and indicates both the
6703 -- message to be added, and the exception to be raised (which must
6704 -- match the node type). The value is stored by storing a Uint which
6705 -- is the Pos value of the enumeration element in this type.
6706
6707 -- Gigi restriction: This expander ensures that the type of the
6708 -- Condition field is always Standard.Boolean, even if the type
6709 -- in the source is some non-standard boolean type.
6710
6711 -- Sprint syntax: [xxx_error "msg"]
6712 -- or: [xxx_error when condition "msg"]
6713
6714 -- N_Raise_Constraint_Error
6715 -- Sloc references related construct
6716 -- Condition (Node1) (set to Empty if no condition)
6717 -- Reason (Uint3)
6718 -- plus fields for expression
6719
6720 -- N_Raise_Program_Error
6721 -- Sloc references related construct
6722 -- Condition (Node1) (set to Empty if no condition)
6723 -- Reason (Uint3)
6724 -- plus fields for expression
6725
6726 -- N_Raise_Storage_Error
6727 -- Sloc references related construct
6728 -- Condition (Node1) (set to Empty if no condition)
6729 -- Reason (Uint3)
6730 -- plus fields for expression
6731
6732 -- Note: Sloc is copied from the expression generating the exception.
6733 -- In the case where a debug source file is generated, the Sloc for
6734 -- this node points to the left bracket in the Sprint file output.
6735
6736 -- Note: the back end may be required to translate these nodes into
6737 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
6738
6739 ---------------------------------------------
6740 -- Optimization of Exception Raise to Goto --
6741 ---------------------------------------------
6742
6743 -- In some cases, the front end will determine that any exception raised
6744 -- by the back end for a certain exception should be transformed into a
6745 -- goto statement.
6746
6747 -- There are three kinds of exceptions raised by the back end (note that
6748 -- for this purpose we consider gigi to be part of the back end in the
6749 -- gcc case):
6750
6751 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
6752 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
6753 -- 3. Other cases not specifically marked by the front end
6754
6755 -- Normally all such exceptions are translated into calls to the proper
6756 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
6757 -- and the exception message.
6758
6759 -- The front end may determine that for a particular sequence of code,
6760 -- exceptions in any of these three categories for a particular builtin
6761 -- exception should result in a goto, rather than a call to Rcheck_xx.
6762 -- The exact sequence to be generated is:
6763
6764 -- Local_Raise (exception'Identity);
6765 -- goto Label
6766
6767 -- The front end marks such a sequence of code by bracketing it with
6768 -- push and pop nodes:
6769
6770 -- N_Push_xxx_Label (referencing the label)
6771 -- ...
6772 -- (code where transformation is expected for exception xxx)
6773 -- ...
6774 -- N_Pop_xxx_Label
6775
6776 -- The use of push/pop reflects the fact that such regions can properly
6777 -- nest, and one special case is a subregion in which no transformation
6778 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
6779 -- Exception_Label field is Empty.
6780
6781 -- N_Push_Constraint_Error_Label
6782 -- Sloc references first statement in region covered
6783 -- Exception_Label (Node5-Sem)
6784
6785 -- N_Push_Program_Error_Label
6786 -- Sloc references first statement in region covered
6787 -- Exception_Label (Node5-Sem)
6788
6789 -- N_Push_Storage_Error_Label
6790 -- Sloc references first statement in region covered
6791 -- Exception_Label (Node5-Sem)
6792
6793 -- N_Pop_Constraint_Error_Label
6794 -- Sloc references last statement in region covered
6795
6796 -- N_Pop_Program_Error_Label
6797 -- Sloc references last statement in region covered
6798
6799 -- N_Pop_Storage_Error_Label
6800 -- Sloc references last statement in region covered
6801
6802 ---------------
6803 -- Reference --
6804 ---------------
6805
6806 -- For a number of purposes, we need to construct references to objects.
6807 -- These references are subsequently treated as normal access values.
6808 -- An example is the construction of the parameter block passed to a
6809 -- task entry. The N_Reference node is provided for this purpose. It is
6810 -- similar in effect to the use of the Unrestricted_Access attribute,
6811 -- and like Unrestricted_Access can be applied to objects which would
6812 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
6813 -- objects which are not aliased, and slices). In addition it can be
6814 -- applied to composite type values as well as objects, including string
6815 -- values and aggregates.
6816
6817 -- Note: we use the Prefix field for this expression so that the
6818 -- resulting node can be treated using common code with the attribute
6819 -- nodes for the 'Access and related attributes. Logically it would make
6820 -- more sense to call it an Expression field, but then we would have to
6821 -- special case the treatment of the N_Reference node.
6822
6823 -- Sprint syntax: prefix'reference
6824
6825 -- N_Reference
6826 -- Sloc is copied from the expression
6827 -- Prefix (Node3)
6828 -- plus fields for expression
6829
6830 -- Note: in the case where a debug source file is generated, the Sloc
6831 -- for this node points to the quote in the Sprint file output.
6832
6833 ---------------------
6834 -- Subprogram_Info --
6835 ---------------------
6836
6837 -- This node generates the appropriate Subprogram_Info value for a
6838 -- given procedure. See Ada.Exceptions for further details
6839
6840 -- Sprint syntax: subprog'subprogram_info
6841
6842 -- N_Subprogram_Info
6843 -- Sloc points to the entity for the procedure
6844 -- Identifier (Node1) identifier referencing the procedure
6845 -- Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc
6846
6847 -- Note: in the case where a debug source file is generated, the Sloc
6848 -- for this node points to the quote in the Sprint file output.
6849
6850 --------------------------
6851 -- Unchecked Expression --
6852 --------------------------
6853
6854 -- An unchecked expression is one that must be analyzed and resolved
6855 -- with all checks off, regardless of the current setting of scope
6856 -- suppress flags.
6857
6858 -- Sprint syntax: `(expression)
6859
6860 -- Note: this node is always removed from the tree (and replaced by
6861 -- its constituent expression) on completion of analysis, so it only
6862 -- appears in intermediate trees, and will never be seen by Gigi.
6863
6864 -- N_Unchecked_Expression
6865 -- Sloc is a copy of the Sloc of the expression
6866 -- Expression (Node3)
6867 -- plus fields for expression
6868
6869 -- Note: in the case where a debug source file is generated, the Sloc
6870 -- for this node points to the back quote in the Sprint file output.
6871
6872 -------------------------------
6873 -- Unchecked Type Conversion --
6874 -------------------------------
6875
6876 -- An unchecked type conversion node represents the semantic action
6877 -- corresponding to a call to an instantiation of Unchecked_Conversion.
6878 -- It is generated as a result of actual use of Unchecked_Conversion
6879 -- and also the expander generates unchecked type conversion nodes
6880 -- directly for expansion of complex semantic actions.
6881
6882 -- Note: an unchecked type conversion is a variable as far as the
6883 -- semantics are concerned, which is convenient for the expander.
6884 -- This does not change what Ada source programs are legal, since
6885 -- clearly a function call to an instantiation of Unchecked_Conversion
6886 -- is not a variable in any case.
6887
6888 -- Sprint syntax: subtype-mark!(expression)
6889
6890 -- N_Unchecked_Type_Conversion
6891 -- Sloc points to related node in source
6892 -- Subtype_Mark (Node4)
6893 -- Expression (Node3)
6894 -- Kill_Range_Check (Flag11-Sem)
6895 -- No_Truncation (Flag17-Sem)
6896 -- plus fields for expression
6897
6898 -- Note: in the case where a debug source file is generated, the Sloc
6899 -- for this node points to the exclamation in the Sprint file output.
6900
6901 -----------------------------------
6902 -- Validate_Unchecked_Conversion --
6903 -----------------------------------
6904
6905 -- The front end does most of the validation of unchecked conversion,
6906 -- including checking sizes (this is done after the back end is called
6907 -- to take advantage of back-annotation of calculated sizes).
6908
6909 -- The front end also deals with specific cases that are not allowed
6910 -- e.g. involving unconstrained array types.
6911
6912 -- For the case of the standard gigi backend, this means that all
6913 -- checks are done in the front-end.
6914
6915 -- However, in the case of specialized back-ends, notably the JVM
6916 -- backend for JGNAT, additional requirements and restrictions apply
6917 -- to unchecked conversion, and these are most conveniently performed
6918 -- in the specialized back-end.
6919
6920 -- To accommodate this requirement, for such back ends, the following
6921 -- special node is generated recording an unchecked conversion that
6922 -- needs to be validated. The back end should post an appropriate
6923 -- error message if the unchecked conversion is invalid or warrants
6924 -- a special warning message.
6925
6926 -- Source_Type and Target_Type point to the entities for the two
6927 -- types involved in the unchecked conversion instantiation that
6928 -- is to be validated.
6929
6930 -- Sprint syntax: validate Unchecked_Conversion (source, target);
6931
6932 -- N_Validate_Unchecked_Conversion
6933 -- Sloc points to instantiation (location for warning message)
6934 -- Source_Type (Node1-Sem)
6935 -- Target_Type (Node2-Sem)
6936
6937 -- Note: in the case where a debug source file is generated, the Sloc
6938 -- for this node points to the VALIDATE keyword in the file output.
6939
6940 -----------
6941 -- Empty --
6942 -----------
6943
6944 -- Used as the contents of the Nkind field of the dummy Empty node
6945 -- and in some other situations to indicate an uninitialized value.
6946
6947 -- N_Empty
6948 -- Chars (Name1) is set to No_Name
6949
6950 -----------
6951 -- Error --
6952 -----------
6953
6954 -- Used as the contents of the Nkind field of the dummy Error node.
6955 -- Has an Etype field, which gets set to Any_Type later on, to help
6956 -- error recovery (Error_Posted is also set in the Error node).
6957
6958 -- N_Error
6959 -- Chars (Name1) is set to Error_Name
6960 -- Etype (Node5-Sem)
6961
6962 --------------------------
6963 -- Node Type Definition --
6964 --------------------------
6965
6966 -- The following is the definition of the Node_Kind type. As previously
6967 -- discussed, this is separated off to allow rearrangement of the order
6968 -- to facilitate definition of subtype ranges. The comments show the
6969 -- subtype classes which apply to each set of node kinds. The first
6970 -- entry in the comment characterizes the following list of nodes.
6971
6972 type Node_Kind is (
6973 N_Unused_At_Start,
6974
6975 -- N_Representation_Clause
6976
6977 N_At_Clause,
6978 N_Component_Clause,
6979 N_Enumeration_Representation_Clause,
6980 N_Mod_Clause,
6981 N_Record_Representation_Clause,
6982
6983 -- N_Representation_Clause, N_Has_Chars
6984
6985 N_Attribute_Definition_Clause,
6986
6987 -- N_Has_Chars
6988
6989 N_Empty,
6990 N_Pragma_Argument_Association,
6991
6992 -- N_Has_Etype
6993
6994 N_Error,
6995
6996 -- N_Entity, N_Has_Etype, N_Has_Chars
6997
6998 N_Defining_Character_Literal,
6999 N_Defining_Identifier,
7000 N_Defining_Operator_Symbol,
7001
7002 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
7003
7004 N_Expanded_Name,
7005
7006 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
7007 -- N_Has_Chars, N_Has_Entity
7008
7009 N_Identifier,
7010 N_Operator_Symbol,
7011
7012 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
7013 -- N_Has_Chars, N_Has_Entity
7014
7015 N_Character_Literal,
7016
7017 -- N_Binary_Op, N_Op, N_Subexpr,
7018 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
7019
7020 N_Op_Add,
7021 N_Op_Concat,
7022 N_Op_Expon,
7023 N_Op_Subtract,
7024
7025 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
7026 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
7027
7028 N_Op_Divide,
7029 N_Op_Mod,
7030 N_Op_Multiply,
7031 N_Op_Rem,
7032
7033 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7034 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7035
7036 N_Op_And,
7037
7038 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7039 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
7040
7041 N_Op_Eq,
7042 N_Op_Ge,
7043 N_Op_Gt,
7044 N_Op_Le,
7045 N_Op_Lt,
7046 N_Op_Ne,
7047
7048 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7049 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7050
7051 N_Op_Or,
7052 N_Op_Xor,
7053
7054 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
7055 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
7056
7057 N_Op_Rotate_Left,
7058 N_Op_Rotate_Right,
7059 N_Op_Shift_Left,
7060 N_Op_Shift_Right,
7061 N_Op_Shift_Right_Arithmetic,
7062
7063 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
7064 -- N_Has_Chars, N_Has_Entity
7065
7066 N_Op_Abs,
7067 N_Op_Minus,
7068 N_Op_Not,
7069 N_Op_Plus,
7070
7071 -- N_Subexpr, N_Has_Etype, N_Has_Entity
7072
7073 N_Attribute_Reference,
7074
7075 -- N_Subexpr, N_Has_Etype, N_Membership_Test
7076
7077 N_In,
7078 N_Not_In,
7079
7080 -- N_Subexpr, N_Has_Etype, N_Short_Circuit
7081
7082 N_And_Then,
7083 N_Or_Else,
7084
7085 -- N_Subexpr, N_Has_Etype
7086
7087 N_Conditional_Expression,
7088 N_Explicit_Dereference,
7089 N_Function_Call,
7090 N_Indexed_Component,
7091 N_Integer_Literal,
7092 N_Null,
7093 N_Procedure_Call_Statement,
7094 N_Qualified_Expression,
7095
7096 -- N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
7097
7098 N_Raise_Constraint_Error,
7099 N_Raise_Program_Error,
7100 N_Raise_Storage_Error,
7101
7102 -- N_Subexpr, N_Has_Etype
7103
7104 N_Aggregate,
7105 N_Allocator,
7106 N_Extension_Aggregate,
7107 N_Range,
7108 N_Real_Literal,
7109 N_Reference,
7110 N_Selected_Component,
7111 N_Slice,
7112 N_String_Literal,
7113 N_Subprogram_Info,
7114 N_Type_Conversion,
7115 N_Unchecked_Expression,
7116 N_Unchecked_Type_Conversion,
7117
7118 -- N_Has_Etype
7119
7120 N_Subtype_Indication,
7121
7122 -- N_Declaration
7123
7124 N_Component_Declaration,
7125 N_Entry_Declaration,
7126 N_Formal_Object_Declaration,
7127 N_Formal_Type_Declaration,
7128 N_Full_Type_Declaration,
7129 N_Incomplete_Type_Declaration,
7130 N_Loop_Parameter_Specification,
7131 N_Object_Declaration,
7132 N_Protected_Type_Declaration,
7133 N_Private_Extension_Declaration,
7134 N_Private_Type_Declaration,
7135 N_Subtype_Declaration,
7136
7137 -- N_Subprogram_Specification, N_Declaration
7138
7139 N_Function_Specification,
7140 N_Procedure_Specification,
7141
7142 -- N_Access_To_Subprogram_Definition
7143
7144 N_Access_Function_Definition,
7145 N_Access_Procedure_Definition,
7146
7147 -- N_Later_Decl_Item
7148
7149 N_Task_Type_Declaration,
7150
7151 -- N_Body_Stub, N_Later_Decl_Item
7152
7153 N_Package_Body_Stub,
7154 N_Protected_Body_Stub,
7155 N_Subprogram_Body_Stub,
7156 N_Task_Body_Stub,
7157
7158 -- N_Generic_Instantiation, N_Later_Decl_Item
7159 -- N_Subprogram_Instantiation
7160
7161 N_Function_Instantiation,
7162 N_Procedure_Instantiation,
7163
7164 -- N_Generic_Instantiation, N_Later_Decl_Item
7165
7166 N_Package_Instantiation,
7167
7168 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
7169
7170 N_Package_Body,
7171 N_Subprogram_Body,
7172
7173 -- N_Later_Decl_Item, N_Proper_Body
7174
7175 N_Protected_Body,
7176 N_Task_Body,
7177
7178 -- N_Later_Decl_Item
7179
7180 N_Implicit_Label_Declaration,
7181 N_Package_Declaration,
7182 N_Single_Task_Declaration,
7183 N_Subprogram_Declaration,
7184 N_Use_Package_Clause,
7185
7186 -- N_Generic_Declaration, N_Later_Decl_Item
7187
7188 N_Generic_Package_Declaration,
7189 N_Generic_Subprogram_Declaration,
7190
7191 -- N_Array_Type_Definition
7192
7193 N_Constrained_Array_Definition,
7194 N_Unconstrained_Array_Definition,
7195
7196 -- N_Renaming_Declaration
7197
7198 N_Exception_Renaming_Declaration,
7199 N_Object_Renaming_Declaration,
7200 N_Package_Renaming_Declaration,
7201 N_Subprogram_Renaming_Declaration,
7202
7203 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
7204
7205 N_Generic_Function_Renaming_Declaration,
7206 N_Generic_Package_Renaming_Declaration,
7207 N_Generic_Procedure_Renaming_Declaration,
7208
7209 -- N_Statement_Other_Than_Procedure_Call
7210
7211 N_Abort_Statement,
7212 N_Accept_Statement,
7213 N_Assignment_Statement,
7214 N_Asynchronous_Select,
7215 N_Block_Statement,
7216 N_Case_Statement,
7217 N_Code_Statement,
7218 N_Conditional_Entry_Call,
7219
7220 -- N_Statement_Other_Than_Procedure_Call. N_Delay_Statement
7221
7222 N_Delay_Relative_Statement,
7223 N_Delay_Until_Statement,
7224
7225 -- N_Statement_Other_Than_Procedure_Call
7226
7227 N_Entry_Call_Statement,
7228 N_Free_Statement,
7229 N_Goto_Statement,
7230 N_Loop_Statement,
7231 N_Null_Statement,
7232 N_Raise_Statement,
7233 N_Requeue_Statement,
7234 N_Return_Statement, -- renamed as N_Simple_Return_Statement below
7235 N_Extended_Return_Statement,
7236 N_Selective_Accept,
7237 N_Timed_Entry_Call,
7238
7239 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
7240
7241 N_Exit_Statement,
7242 N_If_Statement,
7243
7244 -- N_Has_Condition
7245
7246 N_Accept_Alternative,
7247 N_Delay_Alternative,
7248 N_Elsif_Part,
7249 N_Entry_Body_Formal_Part,
7250 N_Iteration_Scheme,
7251 N_Terminate_Alternative,
7252
7253 -- N_Formal_Subprogram_Declaration
7254
7255 N_Formal_Abstract_Subprogram_Declaration,
7256 N_Formal_Concrete_Subprogram_Declaration,
7257
7258 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
7259
7260 N_Push_Constraint_Error_Label,
7261 N_Push_Program_Error_Label,
7262 N_Push_Storage_Error_Label,
7263
7264 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
7265
7266 N_Pop_Constraint_Error_Label,
7267 N_Pop_Program_Error_Label,
7268 N_Pop_Storage_Error_Label,
7269
7270 -- Other nodes (not part of any subtype class)
7271
7272 N_Abortable_Part,
7273 N_Abstract_Subprogram_Declaration,
7274 N_Access_Definition,
7275 N_Access_To_Object_Definition,
7276 N_Case_Statement_Alternative,
7277 N_Compilation_Unit,
7278 N_Compilation_Unit_Aux,
7279 N_Component_Association,
7280 N_Component_Definition,
7281 N_Component_List,
7282 N_Derived_Type_Definition,
7283 N_Decimal_Fixed_Point_Definition,
7284 N_Defining_Program_Unit_Name,
7285 N_Delta_Constraint,
7286 N_Designator,
7287 N_Digits_Constraint,
7288 N_Discriminant_Association,
7289 N_Discriminant_Specification,
7290 N_Enumeration_Type_Definition,
7291 N_Entry_Body,
7292 N_Entry_Call_Alternative,
7293 N_Entry_Index_Specification,
7294 N_Exception_Declaration,
7295 N_Exception_Handler,
7296 N_Floating_Point_Definition,
7297 N_Formal_Decimal_Fixed_Point_Definition,
7298 N_Formal_Derived_Type_Definition,
7299 N_Formal_Discrete_Type_Definition,
7300 N_Formal_Floating_Point_Definition,
7301 N_Formal_Modular_Type_Definition,
7302 N_Formal_Ordinary_Fixed_Point_Definition,
7303 N_Formal_Package_Declaration,
7304 N_Formal_Private_Type_Definition,
7305 N_Formal_Signed_Integer_Type_Definition,
7306 N_Freeze_Entity,
7307 N_Generic_Association,
7308 N_Handled_Sequence_Of_Statements,
7309 N_Index_Or_Discriminant_Constraint,
7310 N_Itype_Reference,
7311 N_Label,
7312 N_Modular_Type_Definition,
7313 N_Number_Declaration,
7314 N_Ordinary_Fixed_Point_Definition,
7315 N_Others_Choice,
7316 N_Package_Specification,
7317 N_Parameter_Association,
7318 N_Parameter_Specification,
7319 N_Pragma,
7320 N_Protected_Definition,
7321 N_Range_Constraint,
7322 N_Real_Range_Specification,
7323 N_Record_Definition,
7324 N_Signed_Integer_Type_Definition,
7325 N_Single_Protected_Declaration,
7326 N_Subunit,
7327 N_Task_Definition,
7328 N_Triggering_Alternative,
7329 N_Use_Type_Clause,
7330 N_Validate_Unchecked_Conversion,
7331 N_Variant,
7332 N_Variant_Part,
7333 N_With_Clause,
7334 N_Unused_At_End);
7335
7336 for Node_Kind'Size use 8;
7337 -- The data structures in Atree assume this!
7338
7339 ----------------------------
7340 -- Node Class Definitions --
7341 ----------------------------
7342
7343 subtype N_Access_To_Subprogram_Definition is Node_Kind range
7344 N_Access_Function_Definition ..
7345 N_Access_Procedure_Definition;
7346
7347 subtype N_Array_Type_Definition is Node_Kind range
7348 N_Constrained_Array_Definition ..
7349 N_Unconstrained_Array_Definition;
7350
7351 subtype N_Binary_Op is Node_Kind range
7352 N_Op_Add ..
7353 N_Op_Shift_Right_Arithmetic;
7354
7355 subtype N_Body_Stub is Node_Kind range
7356 N_Package_Body_Stub ..
7357 N_Task_Body_Stub;
7358
7359 subtype N_Declaration is Node_Kind range
7360 N_Component_Declaration ..
7361 N_Procedure_Specification;
7362 -- Note: this includes all constructs normally thought of as declarations
7363 -- except those which are separately grouped as later declarations.
7364
7365 subtype N_Delay_Statement is Node_Kind range
7366 N_Delay_Relative_Statement ..
7367 N_Delay_Until_Statement;
7368
7369 subtype N_Direct_Name is Node_Kind range
7370 N_Identifier ..
7371 N_Character_Literal;
7372
7373 subtype N_Entity is Node_Kind range
7374 N_Defining_Character_Literal ..
7375 N_Defining_Operator_Symbol;
7376
7377 subtype N_Formal_Subprogram_Declaration is Node_Kind range
7378 N_Formal_Abstract_Subprogram_Declaration ..
7379 N_Formal_Concrete_Subprogram_Declaration;
7380
7381 subtype N_Generic_Declaration is Node_Kind range
7382 N_Generic_Package_Declaration ..
7383 N_Generic_Subprogram_Declaration;
7384
7385 subtype N_Generic_Instantiation is Node_Kind range
7386 N_Function_Instantiation ..
7387 N_Package_Instantiation;
7388
7389 subtype N_Generic_Renaming_Declaration is Node_Kind range
7390 N_Generic_Function_Renaming_Declaration ..
7391 N_Generic_Procedure_Renaming_Declaration;
7392
7393 subtype N_Has_Chars is Node_Kind range
7394 N_Attribute_Definition_Clause ..
7395 N_Op_Plus;
7396
7397 subtype N_Has_Entity is Node_Kind range
7398 N_Expanded_Name ..
7399 N_Attribute_Reference;
7400 -- Nodes that have Entity fields
7401 -- Warning: DOES NOT INCLUDE N_Freeze_Entity!
7402
7403 subtype N_Has_Etype is Node_Kind range
7404 N_Error ..
7405 N_Subtype_Indication;
7406
7407 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
7408 N_Op_Divide ..
7409 N_Op_Rem;
7410
7411 subtype N_Multiplying_Operator is Node_Kind range
7412 N_Op_Divide ..
7413 N_Op_Rem;
7414
7415 subtype N_Later_Decl_Item is Node_Kind range
7416 N_Task_Type_Declaration ..
7417 N_Generic_Subprogram_Declaration;
7418 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and
7419 -- includes only those items which can appear as later declarative
7420 -- items. This also includes N_Implicit_Label_Declaration which is
7421 -- not specifically in the grammar but may appear as a valid later
7422 -- declarative items. It does NOT include N_Pragma which can also
7423 -- appear among later declarative items. It does however include
7424 -- N_Protected_Body, which is a bit peculiar, but harmless since
7425 -- this cannot appear in Ada 83 mode anyway.
7426
7427 subtype N_Membership_Test is Node_Kind range
7428 N_In ..
7429 N_Not_In;
7430
7431 subtype N_Op is Node_Kind range
7432 N_Op_Add ..
7433 N_Op_Plus;
7434
7435 subtype N_Op_Boolean is Node_Kind range
7436 N_Op_And ..
7437 N_Op_Xor;
7438 -- Binary operators which take operands of a boolean type, and yield
7439 -- a result of a boolean type.
7440
7441 subtype N_Op_Compare is Node_Kind range
7442 N_Op_Eq ..
7443 N_Op_Ne;
7444
7445 subtype N_Op_Shift is Node_Kind range
7446 N_Op_Rotate_Left ..
7447 N_Op_Shift_Right_Arithmetic;
7448
7449 subtype N_Proper_Body is Node_Kind range
7450 N_Package_Body ..
7451 N_Task_Body;
7452
7453 subtype N_Push_xxx_Label is Node_Kind range
7454 N_Push_Constraint_Error_Label ..
7455 N_Push_Storage_Error_Label;
7456
7457 subtype N_Pop_xxx_Label is Node_Kind range
7458 N_Pop_Constraint_Error_Label ..
7459 N_Pop_Storage_Error_Label;
7460
7461 subtype N_Push_Pop_xxx_Label is Node_Kind range
7462 N_Push_Constraint_Error_Label ..
7463 N_Pop_Storage_Error_Label;
7464
7465 subtype N_Raise_xxx_Error is Node_Kind range
7466 N_Raise_Constraint_Error ..
7467 N_Raise_Storage_Error;
7468
7469 subtype N_Renaming_Declaration is Node_Kind range
7470 N_Exception_Renaming_Declaration ..
7471 N_Generic_Procedure_Renaming_Declaration;
7472
7473 subtype N_Representation_Clause is Node_Kind range
7474 N_At_Clause ..
7475 N_Attribute_Definition_Clause;
7476
7477 subtype N_Short_Circuit is Node_Kind range
7478 N_And_Then ..
7479 N_Or_Else;
7480
7481 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
7482 N_Abort_Statement ..
7483 N_If_Statement;
7484 -- Note that this includes all statement types except for the cases of the
7485 -- N_Procedure_Call_Statement which is considered to be a subexpression
7486 -- (since overloading is possible, so it needs to go through the normal
7487 -- overloading resolution for expressions).
7488
7489 subtype N_Subprogram_Instantiation is Node_Kind range
7490 N_Function_Instantiation ..
7491 N_Procedure_Instantiation;
7492
7493 subtype N_Has_Condition is Node_Kind range
7494 N_Exit_Statement ..
7495 N_Terminate_Alternative;
7496 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
7497
7498 subtype N_Subexpr is Node_Kind range
7499 N_Expanded_Name ..
7500 N_Unchecked_Type_Conversion;
7501 -- Nodes with expression fields
7502
7503 subtype N_Subprogram_Specification is Node_Kind range
7504 N_Function_Specification ..
7505 N_Procedure_Specification;
7506
7507 subtype N_Unary_Op is Node_Kind range
7508 N_Op_Abs ..
7509 N_Op_Plus;
7510
7511 subtype N_Unit_Body is Node_Kind range
7512 N_Package_Body ..
7513 N_Subprogram_Body;
7514
7515 ---------------------------
7516 -- Node Access Functions --
7517 ---------------------------
7518
7519 -- The following functions return the contents of the indicated field of
7520 -- the node referenced by the argument, which is a Node_Id. They provide
7521 -- logical access to fields in the node which could be accessed using the
7522 -- Atree.Unchecked_Access package, but the idea is always to use these
7523 -- higher level routines which preserve strong typing. In debug mode,
7524 -- these routines check that they are being applied to an appropriate
7525 -- node, as well as checking that the node is in range.
7526
7527 function ABE_Is_Certain
7528 (N : Node_Id) return Boolean; -- Flag18
7529
7530 function Abort_Present
7531 (N : Node_Id) return Boolean; -- Flag15
7532
7533 function Abortable_Part
7534 (N : Node_Id) return Node_Id; -- Node2
7535
7536 function Abstract_Present
7537 (N : Node_Id) return Boolean; -- Flag4
7538
7539 function Accept_Handler_Records
7540 (N : Node_Id) return List_Id; -- List5
7541
7542 function Accept_Statement
7543 (N : Node_Id) return Node_Id; -- Node2
7544
7545 function Access_Definition
7546 (N : Node_Id) return Node_Id; -- Node3
7547
7548 function Access_To_Subprogram_Definition
7549 (N : Node_Id) return Node_Id; -- Node3
7550
7551 function Access_Types_To_Process
7552 (N : Node_Id) return Elist_Id; -- Elist2
7553
7554 function Actions
7555 (N : Node_Id) return List_Id; -- List1
7556
7557 function Activation_Chain_Entity
7558 (N : Node_Id) return Node_Id; -- Node3
7559
7560 function Acts_As_Spec
7561 (N : Node_Id) return Boolean; -- Flag4
7562
7563 function Actual_Designated_Subtype
7564 (N : Node_Id) return Node_Id; -- Node4
7565
7566 function Address_Warning_Posted
7567 (N : Node_Id) return Boolean; -- Flag18
7568
7569 function Aggregate_Bounds
7570 (N : Node_Id) return Node_Id; -- Node3
7571
7572 function Aliased_Present
7573 (N : Node_Id) return Boolean; -- Flag4
7574
7575 function All_Others
7576 (N : Node_Id) return Boolean; -- Flag11
7577
7578 function All_Present
7579 (N : Node_Id) return Boolean; -- Flag15
7580
7581 function Alternatives
7582 (N : Node_Id) return List_Id; -- List4
7583
7584 function Ancestor_Part
7585 (N : Node_Id) return Node_Id; -- Node3
7586
7587 function Array_Aggregate
7588 (N : Node_Id) return Node_Id; -- Node3
7589
7590 function Assignment_OK
7591 (N : Node_Id) return Boolean; -- Flag15
7592
7593 function Associated_Node
7594 (N : Node_Id) return Node_Id; -- Node4
7595
7596 function At_End_Proc
7597 (N : Node_Id) return Node_Id; -- Node1
7598
7599 function Attribute_Name
7600 (N : Node_Id) return Name_Id; -- Name2
7601
7602 function Aux_Decls_Node
7603 (N : Node_Id) return Node_Id; -- Node5
7604
7605 function Backwards_OK
7606 (N : Node_Id) return Boolean; -- Flag6
7607
7608 function Bad_Is_Detected
7609 (N : Node_Id) return Boolean; -- Flag15
7610
7611 function By_Ref
7612 (N : Node_Id) return Boolean; -- Flag5
7613
7614 function Body_Required
7615 (N : Node_Id) return Boolean; -- Flag13
7616
7617 function Body_To_Inline
7618 (N : Node_Id) return Node_Id; -- Node3
7619
7620 function Box_Present
7621 (N : Node_Id) return Boolean; -- Flag15
7622
7623 function Char_Literal_Value
7624 (N : Node_Id) return Uint; -- Uint2
7625
7626 function Chars
7627 (N : Node_Id) return Name_Id; -- Name1
7628
7629 function Check_Address_Alignment
7630 (N : Node_Id) return Boolean; -- Flag11
7631
7632 function Choice_Parameter
7633 (N : Node_Id) return Node_Id; -- Node2
7634
7635 function Choices
7636 (N : Node_Id) return List_Id; -- List1
7637
7638 function Coextensions
7639 (N : Node_Id) return Elist_Id; -- Elist4
7640
7641 function Comes_From_Extended_Return_Statement
7642 (N : Node_Id) return Boolean; -- Flag18
7643
7644 function Compile_Time_Known_Aggregate
7645 (N : Node_Id) return Boolean; -- Flag18
7646
7647 function Component_Associations
7648 (N : Node_Id) return List_Id; -- List2
7649
7650 function Component_Clauses
7651 (N : Node_Id) return List_Id; -- List3
7652
7653 function Component_Definition
7654 (N : Node_Id) return Node_Id; -- Node4
7655
7656 function Component_Items
7657 (N : Node_Id) return List_Id; -- List3
7658
7659 function Component_List
7660 (N : Node_Id) return Node_Id; -- Node1
7661
7662 function Component_Name
7663 (N : Node_Id) return Node_Id; -- Node1
7664
7665 function Componentwise_Assignment
7666 (N : Node_Id) return Boolean; -- Flag14
7667
7668 function Condition
7669 (N : Node_Id) return Node_Id; -- Node1
7670
7671 function Condition_Actions
7672 (N : Node_Id) return List_Id; -- List3
7673
7674 function Config_Pragmas
7675 (N : Node_Id) return List_Id; -- List4
7676
7677 function Constant_Present
7678 (N : Node_Id) return Boolean; -- Flag17
7679
7680 function Constraint
7681 (N : Node_Id) return Node_Id; -- Node3
7682
7683 function Constraints
7684 (N : Node_Id) return List_Id; -- List1
7685
7686 function Context_Installed
7687 (N : Node_Id) return Boolean; -- Flag13
7688
7689 function Context_Pending
7690 (N : Node_Id) return Boolean; -- Flag16
7691
7692 function Context_Items
7693 (N : Node_Id) return List_Id; -- List1
7694
7695 function Controlling_Argument
7696 (N : Node_Id) return Node_Id; -- Node1
7697
7698 function Conversion_OK
7699 (N : Node_Id) return Boolean; -- Flag14
7700
7701 function Corresponding_Body
7702 (N : Node_Id) return Node_Id; -- Node5
7703
7704 function Corresponding_Formal_Spec
7705 (N : Node_Id) return Node_Id; -- Node3
7706
7707 function Corresponding_Generic_Association
7708 (N : Node_Id) return Node_Id; -- Node5
7709
7710 function Corresponding_Integer_Value
7711 (N : Node_Id) return Uint; -- Uint4
7712
7713 function Corresponding_Spec
7714 (N : Node_Id) return Node_Id; -- Node5
7715
7716 function Corresponding_Stub
7717 (N : Node_Id) return Node_Id; -- Node3
7718
7719 function Dcheck_Function
7720 (N : Node_Id) return Entity_Id; -- Node5
7721
7722 function Debug_Statement
7723 (N : Node_Id) return Node_Id; -- Node3
7724
7725 function Declarations
7726 (N : Node_Id) return List_Id; -- List2
7727
7728 function Default_Expression
7729 (N : Node_Id) return Node_Id; -- Node5
7730
7731 function Default_Name
7732 (N : Node_Id) return Node_Id; -- Node2
7733
7734 function Defining_Identifier
7735 (N : Node_Id) return Entity_Id; -- Node1
7736
7737 function Defining_Unit_Name
7738 (N : Node_Id) return Node_Id; -- Node1
7739
7740 function Delay_Alternative
7741 (N : Node_Id) return Node_Id; -- Node4
7742
7743 function Delay_Statement
7744 (N : Node_Id) return Node_Id; -- Node2
7745
7746 function Delta_Expression
7747 (N : Node_Id) return Node_Id; -- Node3
7748
7749 function Digits_Expression
7750 (N : Node_Id) return Node_Id; -- Node2
7751
7752 function Discr_Check_Funcs_Built
7753 (N : Node_Id) return Boolean; -- Flag11
7754
7755 function Discrete_Choices
7756 (N : Node_Id) return List_Id; -- List4
7757
7758 function Discrete_Range
7759 (N : Node_Id) return Node_Id; -- Node4
7760
7761 function Discrete_Subtype_Definition
7762 (N : Node_Id) return Node_Id; -- Node4
7763
7764 function Discrete_Subtype_Definitions
7765 (N : Node_Id) return List_Id; -- List2
7766
7767 function Discriminant_Specifications
7768 (N : Node_Id) return List_Id; -- List4
7769
7770 function Discriminant_Type
7771 (N : Node_Id) return Node_Id; -- Node5
7772
7773 function Do_Accessibility_Check
7774 (N : Node_Id) return Boolean; -- Flag13
7775
7776 function Do_Discriminant_Check
7777 (N : Node_Id) return Boolean; -- Flag13
7778
7779 function Do_Division_Check
7780 (N : Node_Id) return Boolean; -- Flag13
7781
7782 function Do_Length_Check
7783 (N : Node_Id) return Boolean; -- Flag4
7784
7785 function Do_Overflow_Check
7786 (N : Node_Id) return Boolean; -- Flag17
7787
7788 function Do_Range_Check
7789 (N : Node_Id) return Boolean; -- Flag9
7790
7791 function Do_Storage_Check
7792 (N : Node_Id) return Boolean; -- Flag17
7793
7794 function Do_Tag_Check
7795 (N : Node_Id) return Boolean; -- Flag13
7796
7797 function Elaborate_All_Desirable
7798 (N : Node_Id) return Boolean; -- Flag9
7799
7800 function Elaborate_All_Present
7801 (N : Node_Id) return Boolean; -- Flag14
7802
7803 function Elaborate_Desirable
7804 (N : Node_Id) return Boolean; -- Flag11
7805
7806 function Elaborate_Present
7807 (N : Node_Id) return Boolean; -- Flag4
7808
7809 function Elaboration_Boolean
7810 (N : Node_Id) return Node_Id; -- Node2
7811
7812 function Else_Actions
7813 (N : Node_Id) return List_Id; -- List3
7814
7815 function Else_Statements
7816 (N : Node_Id) return List_Id; -- List4
7817
7818 function Elsif_Parts
7819 (N : Node_Id) return List_Id; -- List3
7820
7821 function Enclosing_Variant
7822 (N : Node_Id) return Node_Id; -- Node2
7823
7824 function End_Label
7825 (N : Node_Id) return Node_Id; -- Node4
7826
7827 function End_Span
7828 (N : Node_Id) return Uint; -- Uint5
7829
7830 function Entity
7831 (N : Node_Id) return Node_Id; -- Node4
7832
7833 function Entity_Or_Associated_Node
7834 (N : Node_Id) return Node_Id; -- Node4
7835
7836 function Entry_Body_Formal_Part
7837 (N : Node_Id) return Node_Id; -- Node5
7838
7839 function Entry_Call_Alternative
7840 (N : Node_Id) return Node_Id; -- Node1
7841
7842 function Entry_Call_Statement
7843 (N : Node_Id) return Node_Id; -- Node1
7844
7845 function Entry_Direct_Name
7846 (N : Node_Id) return Node_Id; -- Node1
7847
7848 function Entry_Index
7849 (N : Node_Id) return Node_Id; -- Node5
7850
7851 function Entry_Index_Specification
7852 (N : Node_Id) return Node_Id; -- Node4
7853
7854 function Etype
7855 (N : Node_Id) return Node_Id; -- Node5
7856
7857 function Exception_Choices
7858 (N : Node_Id) return List_Id; -- List4
7859
7860 function Exception_Handlers
7861 (N : Node_Id) return List_Id; -- List5
7862
7863 function Exception_Junk
7864 (N : Node_Id) return Boolean; -- Flag8
7865
7866 function Exception_Label
7867 (N : Node_Id) return Node_Id; -- Node5
7868
7869 function Explicit_Actual_Parameter
7870 (N : Node_Id) return Node_Id; -- Node3
7871
7872 function Expansion_Delayed
7873 (N : Node_Id) return Boolean; -- Flag11
7874
7875 function Explicit_Generic_Actual_Parameter
7876 (N : Node_Id) return Node_Id; -- Node1
7877
7878 function Expression
7879 (N : Node_Id) return Node_Id; -- Node3
7880
7881 function Expressions
7882 (N : Node_Id) return List_Id; -- List1
7883
7884 function First_Bit
7885 (N : Node_Id) return Node_Id; -- Node3
7886
7887 function First_Inlined_Subprogram
7888 (N : Node_Id) return Entity_Id; -- Node3
7889
7890 function First_Name
7891 (N : Node_Id) return Boolean; -- Flag5
7892
7893 function First_Named_Actual
7894 (N : Node_Id) return Node_Id; -- Node4
7895
7896 function First_Real_Statement
7897 (N : Node_Id) return Node_Id; -- Node2
7898
7899 function First_Subtype_Link
7900 (N : Node_Id) return Entity_Id; -- Node5
7901
7902 function Float_Truncate
7903 (N : Node_Id) return Boolean; -- Flag11
7904
7905 function Formal_Type_Definition
7906 (N : Node_Id) return Node_Id; -- Node3
7907
7908 function Forwards_OK
7909 (N : Node_Id) return Boolean; -- Flag5
7910
7911 function From_At_End
7912 (N : Node_Id) return Boolean; -- Flag4
7913
7914 function From_At_Mod
7915 (N : Node_Id) return Boolean; -- Flag4
7916
7917 function From_Default
7918 (N : Node_Id) return Boolean; -- Flag6
7919
7920 function Generic_Associations
7921 (N : Node_Id) return List_Id; -- List3
7922
7923 function Generic_Formal_Declarations
7924 (N : Node_Id) return List_Id; -- List2
7925
7926 function Generic_Parent
7927 (N : Node_Id) return Node_Id; -- Node5
7928
7929 function Generic_Parent_Type
7930 (N : Node_Id) return Node_Id; -- Node4
7931
7932 function Handled_Statement_Sequence
7933 (N : Node_Id) return Node_Id; -- Node4
7934
7935 function Handler_List_Entry
7936 (N : Node_Id) return Node_Id; -- Node2
7937
7938 function Has_Created_Identifier
7939 (N : Node_Id) return Boolean; -- Flag15
7940
7941 function Has_Dynamic_Length_Check
7942 (N : Node_Id) return Boolean; -- Flag10
7943
7944 function Has_Dynamic_Range_Check
7945 (N : Node_Id) return Boolean; -- Flag12
7946
7947 function Has_Init_Expression
7948 (N : Node_Id) return Boolean; -- Flag14
7949
7950 function Has_Local_Raise
7951 (N : Node_Id) return Boolean; -- Flag8
7952
7953 function Has_No_Elaboration_Code
7954 (N : Node_Id) return Boolean; -- Flag17
7955
7956 function Has_Priority_Pragma
7957 (N : Node_Id) return Boolean; -- Flag6
7958
7959 function Has_Private_View
7960 (N : Node_Id) return Boolean; -- Flag11
7961
7962 function Has_Relative_Deadline_Pragma
7963 (N : Node_Id) return Boolean; -- Flag9
7964
7965 function Has_Self_Reference
7966 (N : Node_Id) return Boolean; -- Flag13
7967
7968 function Has_Storage_Size_Pragma
7969 (N : Node_Id) return Boolean; -- Flag5
7970
7971 function Has_Task_Info_Pragma
7972 (N : Node_Id) return Boolean; -- Flag7
7973
7974 function Has_Task_Name_Pragma
7975 (N : Node_Id) return Boolean; -- Flag8
7976
7977 function Has_Wide_Character
7978 (N : Node_Id) return Boolean; -- Flag11
7979
7980 function Hidden_By_Use_Clause
7981 (N : Node_Id) return Elist_Id; -- Elist4
7982
7983 function High_Bound
7984 (N : Node_Id) return Node_Id; -- Node2
7985
7986 function Identifier
7987 (N : Node_Id) return Node_Id; -- Node1
7988
7989 function Interface_List
7990 (N : Node_Id) return List_Id; -- List2
7991
7992 function Interface_Present
7993 (N : Node_Id) return Boolean; -- Flag16
7994
7995 function Implicit_With
7996 (N : Node_Id) return Boolean; -- Flag16
7997
7998 function In_Present
7999 (N : Node_Id) return Boolean; -- Flag15
8000
8001 function Includes_Infinities
8002 (N : Node_Id) return Boolean; -- Flag11
8003
8004 function Instance_Spec
8005 (N : Node_Id) return Node_Id; -- Node5
8006
8007 function Intval
8008 (N : Node_Id) return Uint; -- Uint3
8009
8010 function Is_Asynchronous_Call_Block
8011 (N : Node_Id) return Boolean; -- Flag7
8012
8013 function Is_Component_Left_Opnd
8014 (N : Node_Id) return Boolean; -- Flag13
8015
8016 function Is_Component_Right_Opnd
8017 (N : Node_Id) return Boolean; -- Flag14
8018
8019 function Is_Controlling_Actual
8020 (N : Node_Id) return Boolean; -- Flag16
8021
8022 function Is_Dynamic_Coextension
8023 (N : Node_Id) return Boolean; -- Flag18
8024
8025 function Is_Elsif
8026 (N : Node_Id) return Boolean; -- Flag13
8027
8028 function Is_Entry_Barrier_Function
8029 (N : Node_Id) return Boolean; -- Flag8
8030
8031 function Is_Expanded_Build_In_Place_Call
8032 (N : Node_Id) return Boolean; -- Flag11
8033
8034 function Is_Folded_In_Parser
8035 (N : Node_Id) return Boolean; -- Flag4
8036
8037 function Is_In_Discriminant_Check
8038 (N : Node_Id) return Boolean; -- Flag11
8039
8040 function Is_Machine_Number
8041 (N : Node_Id) return Boolean; -- Flag11
8042
8043 function Is_Null_Loop
8044 (N : Node_Id) return Boolean; -- Flag16
8045
8046 function Is_Overloaded
8047 (N : Node_Id) return Boolean; -- Flag5
8048
8049 function Is_Power_Of_2_For_Shift
8050 (N : Node_Id) return Boolean; -- Flag13
8051
8052 function Is_Protected_Subprogram_Body
8053 (N : Node_Id) return Boolean; -- Flag7
8054
8055 function Is_Static_Coextension
8056 (N : Node_Id) return Boolean; -- Flag14
8057
8058 function Is_Static_Expression
8059 (N : Node_Id) return Boolean; -- Flag6
8060
8061 function Is_Subprogram_Descriptor
8062 (N : Node_Id) return Boolean; -- Flag16
8063
8064 function Is_Task_Allocation_Block
8065 (N : Node_Id) return Boolean; -- Flag6
8066
8067 function Is_Task_Master
8068 (N : Node_Id) return Boolean; -- Flag5
8069
8070 function Iteration_Scheme
8071 (N : Node_Id) return Node_Id; -- Node2
8072
8073 function Itype
8074 (N : Node_Id) return Entity_Id; -- Node1
8075
8076 function Kill_Range_Check
8077 (N : Node_Id) return Boolean; -- Flag11
8078
8079 function Label_Construct
8080 (N : Node_Id) return Node_Id; -- Node2
8081
8082 function Left_Opnd
8083 (N : Node_Id) return Node_Id; -- Node2
8084
8085 function Last_Bit
8086 (N : Node_Id) return Node_Id; -- Node4
8087
8088 function Last_Name
8089 (N : Node_Id) return Boolean; -- Flag6
8090
8091 function Library_Unit
8092 (N : Node_Id) return Node_Id; -- Node4
8093
8094 function Limited_View_Installed
8095 (N : Node_Id) return Boolean; -- Flag18
8096
8097 function Limited_Present
8098 (N : Node_Id) return Boolean; -- Flag17
8099
8100 function Literals
8101 (N : Node_Id) return List_Id; -- List1
8102
8103 function Local_Raise_Not_OK
8104 (N : Node_Id) return Boolean; -- Flag7
8105
8106 function Local_Raise_Statements
8107 (N : Node_Id) return Elist_Id; -- Elist1
8108
8109 function Loop_Actions
8110 (N : Node_Id) return List_Id; -- List2
8111
8112 function Loop_Parameter_Specification
8113 (N : Node_Id) return Node_Id; -- Node4
8114
8115 function Low_Bound
8116 (N : Node_Id) return Node_Id; -- Node1
8117
8118 function Mod_Clause
8119 (N : Node_Id) return Node_Id; -- Node2
8120
8121 function More_Ids
8122 (N : Node_Id) return Boolean; -- Flag5
8123
8124 function Must_Be_Byte_Aligned
8125 (N : Node_Id) return Boolean; -- Flag14
8126
8127 function Must_Not_Freeze
8128 (N : Node_Id) return Boolean; -- Flag8
8129
8130 function Must_Not_Override
8131 (N : Node_Id) return Boolean; -- Flag15
8132
8133 function Must_Override
8134 (N : Node_Id) return Boolean; -- Flag14
8135
8136 function Name
8137 (N : Node_Id) return Node_Id; -- Node2
8138
8139 function Names
8140 (N : Node_Id) return List_Id; -- List2
8141
8142 function Next_Entity
8143 (N : Node_Id) return Node_Id; -- Node2
8144
8145 function Next_Implicit_With
8146 (N : Node_Id) return Node_Id; -- Node3
8147
8148 function Next_Named_Actual
8149 (N : Node_Id) return Node_Id; -- Node4
8150
8151 function Next_Pragma
8152 (N : Node_Id) return Node_Id; -- Node1
8153
8154 function Next_Rep_Item
8155 (N : Node_Id) return Node_Id; -- Node5
8156
8157 function Next_Use_Clause
8158 (N : Node_Id) return Node_Id; -- Node3
8159
8160 function No_Ctrl_Actions
8161 (N : Node_Id) return Boolean; -- Flag7
8162
8163 function No_Elaboration_Check
8164 (N : Node_Id) return Boolean; -- Flag14
8165
8166 function No_Entities_Ref_In_Spec
8167 (N : Node_Id) return Boolean; -- Flag8
8168
8169 function No_Initialization
8170 (N : Node_Id) return Boolean; -- Flag13
8171
8172 function No_Truncation
8173 (N : Node_Id) return Boolean; -- Flag17
8174
8175 function Null_Present
8176 (N : Node_Id) return Boolean; -- Flag13
8177
8178 function Null_Exclusion_Present
8179 (N : Node_Id) return Boolean; -- Flag11
8180
8181 function Null_Exclusion_In_Return_Present
8182 (N : Node_Id) return Boolean; -- Flag14
8183
8184 function Null_Record_Present
8185 (N : Node_Id) return Boolean; -- Flag17
8186
8187 function Object_Definition
8188 (N : Node_Id) return Node_Id; -- Node4
8189
8190 function Original_Discriminant
8191 (N : Node_Id) return Node_Id; -- Node2
8192
8193 function Original_Entity
8194 (N : Node_Id) return Entity_Id; -- Node2
8195
8196 function Others_Discrete_Choices
8197 (N : Node_Id) return List_Id; -- List1
8198
8199 function Out_Present
8200 (N : Node_Id) return Boolean; -- Flag17
8201
8202 function Parameter_Associations
8203 (N : Node_Id) return List_Id; -- List3
8204
8205 function Parameter_List_Truncated
8206 (N : Node_Id) return Boolean; -- Flag17
8207
8208 function Parameter_Specifications
8209 (N : Node_Id) return List_Id; -- List3
8210
8211 function Parameter_Type
8212 (N : Node_Id) return Node_Id; -- Node2
8213
8214 function Parent_Spec
8215 (N : Node_Id) return Node_Id; -- Node4
8216
8217 function PPC_Enabled
8218 (N : Node_Id) return Boolean; -- Flag5
8219
8220 function Position
8221 (N : Node_Id) return Node_Id; -- Node2
8222
8223 function Pragma_Argument_Associations
8224 (N : Node_Id) return List_Id; -- List2
8225
8226 function Pragma_Identifier
8227 (N : Node_Id) return Node_Id; -- Node4
8228
8229 function Pragmas_After
8230 (N : Node_Id) return List_Id; -- List5
8231
8232 function Pragmas_Before
8233 (N : Node_Id) return List_Id; -- List4
8234
8235 function Prefix
8236 (N : Node_Id) return Node_Id; -- Node3
8237
8238 function Present_Expr
8239 (N : Node_Id) return Uint; -- Uint3
8240
8241 function Prev_Ids
8242 (N : Node_Id) return Boolean; -- Flag6
8243
8244 function Print_In_Hex
8245 (N : Node_Id) return Boolean; -- Flag13
8246
8247 function Private_Declarations
8248 (N : Node_Id) return List_Id; -- List3
8249
8250 function Private_Present
8251 (N : Node_Id) return Boolean; -- Flag15
8252
8253 function Procedure_To_Call
8254 (N : Node_Id) return Node_Id; -- Node2
8255
8256 function Proper_Body
8257 (N : Node_Id) return Node_Id; -- Node1
8258
8259 function Protected_Definition
8260 (N : Node_Id) return Node_Id; -- Node3
8261
8262 function Protected_Present
8263 (N : Node_Id) return Boolean; -- Flag6
8264
8265 function Raises_Constraint_Error
8266 (N : Node_Id) return Boolean; -- Flag7
8267
8268 function Range_Constraint
8269 (N : Node_Id) return Node_Id; -- Node4
8270
8271 function Range_Expression
8272 (N : Node_Id) return Node_Id; -- Node4
8273
8274 function Real_Range_Specification
8275 (N : Node_Id) return Node_Id; -- Node4
8276
8277 function Realval
8278 (N : Node_Id) return Ureal; -- Ureal3
8279
8280 function Reason
8281 (N : Node_Id) return Uint; -- Uint3
8282
8283 function Record_Extension_Part
8284 (N : Node_Id) return Node_Id; -- Node3
8285
8286 function Redundant_Use
8287 (N : Node_Id) return Boolean; -- Flag13
8288
8289 function Renaming_Exception
8290 (N : Node_Id) return Node_Id; -- Node2
8291
8292 function Result_Definition
8293 (N : Node_Id) return Node_Id; -- Node4
8294
8295 function Return_Object_Declarations
8296 (N : Node_Id) return List_Id; -- List3
8297
8298 function Return_Statement_Entity
8299 (N : Node_Id) return Node_Id; -- Node5
8300
8301 function Reverse_Present
8302 (N : Node_Id) return Boolean; -- Flag15
8303
8304 function Right_Opnd
8305 (N : Node_Id) return Node_Id; -- Node3
8306
8307 function Rounded_Result
8308 (N : Node_Id) return Boolean; -- Flag18
8309
8310 function Scope
8311 (N : Node_Id) return Node_Id; -- Node3
8312
8313 function Select_Alternatives
8314 (N : Node_Id) return List_Id; -- List1
8315
8316 function Selector_Name
8317 (N : Node_Id) return Node_Id; -- Node2
8318
8319 function Selector_Names
8320 (N : Node_Id) return List_Id; -- List1
8321
8322 function Shift_Count_OK
8323 (N : Node_Id) return Boolean; -- Flag4
8324
8325 function Source_Type
8326 (N : Node_Id) return Entity_Id; -- Node1
8327
8328 function Specification
8329 (N : Node_Id) return Node_Id; -- Node1
8330
8331 function Statements
8332 (N : Node_Id) return List_Id; -- List3
8333
8334 function Static_Processing_OK
8335 (N : Node_Id) return Boolean; -- Flag4
8336
8337 function Storage_Pool
8338 (N : Node_Id) return Node_Id; -- Node1
8339
8340 function Strval
8341 (N : Node_Id) return String_Id; -- Str3
8342
8343 function Subtype_Indication
8344 (N : Node_Id) return Node_Id; -- Node5
8345
8346 function Subtype_Mark
8347 (N : Node_Id) return Node_Id; -- Node4
8348
8349 function Subtype_Marks
8350 (N : Node_Id) return List_Id; -- List2
8351
8352 function Suppress_Loop_Warnings
8353 (N : Node_Id) return Boolean; -- Flag17
8354
8355 function Synchronized_Present
8356 (N : Node_Id) return Boolean; -- Flag7
8357
8358 function Tagged_Present
8359 (N : Node_Id) return Boolean; -- Flag15
8360
8361 function Target_Type
8362 (N : Node_Id) return Entity_Id; -- Node2
8363
8364 function Task_Definition
8365 (N : Node_Id) return Node_Id; -- Node3
8366
8367 function Task_Present
8368 (N : Node_Id) return Boolean; -- Flag5
8369
8370 function Then_Actions
8371 (N : Node_Id) return List_Id; -- List2
8372
8373 function Then_Statements
8374 (N : Node_Id) return List_Id; -- List2
8375
8376 function Treat_Fixed_As_Integer
8377 (N : Node_Id) return Boolean; -- Flag14
8378
8379 function Triggering_Alternative
8380 (N : Node_Id) return Node_Id; -- Node1
8381
8382 function Triggering_Statement
8383 (N : Node_Id) return Node_Id; -- Node1
8384
8385 function TSS_Elist
8386 (N : Node_Id) return Elist_Id; -- Elist3
8387
8388 function Type_Definition
8389 (N : Node_Id) return Node_Id; -- Node3
8390
8391 function Unit
8392 (N : Node_Id) return Node_Id; -- Node2
8393
8394 function Unknown_Discriminants_Present
8395 (N : Node_Id) return Boolean; -- Flag13
8396
8397 function Unreferenced_In_Spec
8398 (N : Node_Id) return Boolean; -- Flag7
8399
8400 function Variant_Part
8401 (N : Node_Id) return Node_Id; -- Node4
8402
8403 function Variants
8404 (N : Node_Id) return List_Id; -- List1
8405
8406 function Visible_Declarations
8407 (N : Node_Id) return List_Id; -- List2
8408
8409 function Was_Originally_Stub
8410 (N : Node_Id) return Boolean; -- Flag13
8411
8412 function Zero_Cost_Handling
8413 (N : Node_Id) return Boolean; -- Flag5
8414
8415 -- End functions (note used by xsinfo utility program to end processing)
8416
8417 ----------------------------
8418 -- Node Update Procedures --
8419 ----------------------------
8420
8421 -- These are the corresponding node update routines, which again provide
8422 -- a high level logical access with type checking. In addition to setting
8423 -- the indicated field of the node N to the given Val, in the case of
8424 -- tree pointers (List1-4), the parent pointer of the Val node is set to
8425 -- point back to node N. This automates the setting of the parent pointer.
8426
8427 procedure Set_ABE_Is_Certain
8428 (N : Node_Id; Val : Boolean := True); -- Flag18
8429
8430 procedure Set_Abort_Present
8431 (N : Node_Id; Val : Boolean := True); -- Flag15
8432
8433 procedure Set_Abortable_Part
8434 (N : Node_Id; Val : Node_Id); -- Node2
8435
8436 procedure Set_Abstract_Present
8437 (N : Node_Id; Val : Boolean := True); -- Flag4
8438
8439 procedure Set_Accept_Handler_Records
8440 (N : Node_Id; Val : List_Id); -- List5
8441
8442 procedure Set_Accept_Statement
8443 (N : Node_Id; Val : Node_Id); -- Node2
8444
8445 procedure Set_Access_Definition
8446 (N : Node_Id; Val : Node_Id); -- Node3
8447
8448 procedure Set_Access_To_Subprogram_Definition
8449 (N : Node_Id; Val : Node_Id); -- Node3
8450
8451 procedure Set_Access_Types_To_Process
8452 (N : Node_Id; Val : Elist_Id); -- Elist2
8453
8454 procedure Set_Actions
8455 (N : Node_Id; Val : List_Id); -- List1
8456
8457 procedure Set_Activation_Chain_Entity
8458 (N : Node_Id; Val : Node_Id); -- Node3
8459
8460 procedure Set_Acts_As_Spec
8461 (N : Node_Id; Val : Boolean := True); -- Flag4
8462
8463 procedure Set_Actual_Designated_Subtype
8464 (N : Node_Id; Val : Node_Id); -- Node4
8465
8466 procedure Set_Address_Warning_Posted
8467 (N : Node_Id; Val : Boolean := True); -- Flag18
8468
8469 procedure Set_Aggregate_Bounds
8470 (N : Node_Id; Val : Node_Id); -- Node3
8471
8472 procedure Set_Aliased_Present
8473 (N : Node_Id; Val : Boolean := True); -- Flag4
8474
8475 procedure Set_All_Others
8476 (N : Node_Id; Val : Boolean := True); -- Flag11
8477
8478 procedure Set_All_Present
8479 (N : Node_Id; Val : Boolean := True); -- Flag15
8480
8481 procedure Set_Alternatives
8482 (N : Node_Id; Val : List_Id); -- List4
8483
8484 procedure Set_Ancestor_Part
8485 (N : Node_Id; Val : Node_Id); -- Node3
8486
8487 procedure Set_Array_Aggregate
8488 (N : Node_Id; Val : Node_Id); -- Node3
8489
8490 procedure Set_Assignment_OK
8491 (N : Node_Id; Val : Boolean := True); -- Flag15
8492
8493 procedure Set_Associated_Node
8494 (N : Node_Id; Val : Node_Id); -- Node4
8495
8496 procedure Set_Attribute_Name
8497 (N : Node_Id; Val : Name_Id); -- Name2
8498
8499 procedure Set_At_End_Proc
8500 (N : Node_Id; Val : Node_Id); -- Node1
8501
8502 procedure Set_Aux_Decls_Node
8503 (N : Node_Id; Val : Node_Id); -- Node5
8504
8505 procedure Set_Backwards_OK
8506 (N : Node_Id; Val : Boolean := True); -- Flag6
8507
8508 procedure Set_Bad_Is_Detected
8509 (N : Node_Id; Val : Boolean := True); -- Flag15
8510
8511 procedure Set_Body_Required
8512 (N : Node_Id; Val : Boolean := True); -- Flag13
8513
8514 procedure Set_Body_To_Inline
8515 (N : Node_Id; Val : Node_Id); -- Node3
8516
8517 procedure Set_Box_Present
8518 (N : Node_Id; Val : Boolean := True); -- Flag15
8519
8520 procedure Set_By_Ref
8521 (N : Node_Id; Val : Boolean := True); -- Flag5
8522
8523 procedure Set_Char_Literal_Value
8524 (N : Node_Id; Val : Uint); -- Uint2
8525
8526 procedure Set_Chars
8527 (N : Node_Id; Val : Name_Id); -- Name1
8528
8529 procedure Set_Check_Address_Alignment
8530 (N : Node_Id; Val : Boolean := True); -- Flag11
8531
8532 procedure Set_Choice_Parameter
8533 (N : Node_Id; Val : Node_Id); -- Node2
8534
8535 procedure Set_Coextensions
8536 (N : Node_Id; Val : Elist_Id); -- Elist4
8537
8538 procedure Set_Choices
8539 (N : Node_Id; Val : List_Id); -- List1
8540
8541 procedure Set_Comes_From_Extended_Return_Statement
8542 (N : Node_Id; Val : Boolean := True); -- Flag18
8543
8544 procedure Set_Compile_Time_Known_Aggregate
8545 (N : Node_Id; Val : Boolean := True); -- Flag18
8546
8547 procedure Set_Component_Associations
8548 (N : Node_Id; Val : List_Id); -- List2
8549
8550 procedure Set_Component_Clauses
8551 (N : Node_Id; Val : List_Id); -- List3
8552
8553 procedure Set_Component_Definition
8554 (N : Node_Id; Val : Node_Id); -- Node4
8555
8556 procedure Set_Component_Items
8557 (N : Node_Id; Val : List_Id); -- List3
8558
8559 procedure Set_Component_List
8560 (N : Node_Id; Val : Node_Id); -- Node1
8561
8562 procedure Set_Component_Name
8563 (N : Node_Id; Val : Node_Id); -- Node1
8564
8565 procedure Set_Componentwise_Assignment
8566 (N : Node_Id; Val : Boolean := True); -- Flag14
8567
8568 procedure Set_Condition
8569 (N : Node_Id; Val : Node_Id); -- Node1
8570
8571 procedure Set_Condition_Actions
8572 (N : Node_Id; Val : List_Id); -- List3
8573
8574 procedure Set_Config_Pragmas
8575 (N : Node_Id; Val : List_Id); -- List4
8576
8577 procedure Set_Constant_Present
8578 (N : Node_Id; Val : Boolean := True); -- Flag17
8579
8580 procedure Set_Constraint
8581 (N : Node_Id; Val : Node_Id); -- Node3
8582
8583 procedure Set_Constraints
8584 (N : Node_Id; Val : List_Id); -- List1
8585
8586 procedure Set_Context_Installed
8587 (N : Node_Id; Val : Boolean := True); -- Flag13
8588
8589 procedure Set_Context_Items
8590 (N : Node_Id; Val : List_Id); -- List1
8591
8592 procedure Set_Context_Pending
8593 (N : Node_Id; Val : Boolean := True); -- Flag16
8594
8595 procedure Set_Controlling_Argument
8596 (N : Node_Id; Val : Node_Id); -- Node1
8597
8598 procedure Set_Conversion_OK
8599 (N : Node_Id; Val : Boolean := True); -- Flag14
8600
8601 procedure Set_Corresponding_Body
8602 (N : Node_Id; Val : Node_Id); -- Node5
8603
8604 procedure Set_Corresponding_Formal_Spec
8605 (N : Node_Id; Val : Node_Id); -- Node3
8606
8607 procedure Set_Corresponding_Generic_Association
8608 (N : Node_Id; Val : Node_Id); -- Node5
8609
8610 procedure Set_Corresponding_Integer_Value
8611 (N : Node_Id; Val : Uint); -- Uint4
8612
8613 procedure Set_Corresponding_Spec
8614 (N : Node_Id; Val : Node_Id); -- Node5
8615
8616 procedure Set_Corresponding_Stub
8617 (N : Node_Id; Val : Node_Id); -- Node3
8618
8619 procedure Set_Dcheck_Function
8620 (N : Node_Id; Val : Entity_Id); -- Node5
8621
8622 procedure Set_Debug_Statement
8623 (N : Node_Id; Val : Node_Id); -- Node3
8624
8625 procedure Set_Declarations
8626 (N : Node_Id; Val : List_Id); -- List2
8627
8628 procedure Set_Default_Expression
8629 (N : Node_Id; Val : Node_Id); -- Node5
8630
8631 procedure Set_Default_Name
8632 (N : Node_Id; Val : Node_Id); -- Node2
8633
8634 procedure Set_Defining_Identifier
8635 (N : Node_Id; Val : Entity_Id); -- Node1
8636
8637 procedure Set_Defining_Unit_Name
8638 (N : Node_Id; Val : Node_Id); -- Node1
8639
8640 procedure Set_Delay_Alternative
8641 (N : Node_Id; Val : Node_Id); -- Node4
8642
8643 procedure Set_Delay_Statement
8644 (N : Node_Id; Val : Node_Id); -- Node2
8645
8646 procedure Set_Delta_Expression
8647 (N : Node_Id; Val : Node_Id); -- Node3
8648
8649 procedure Set_Digits_Expression
8650 (N : Node_Id; Val : Node_Id); -- Node2
8651
8652 procedure Set_Discr_Check_Funcs_Built
8653 (N : Node_Id; Val : Boolean := True); -- Flag11
8654
8655 procedure Set_Discrete_Choices
8656 (N : Node_Id; Val : List_Id); -- List4
8657
8658 procedure Set_Discrete_Range
8659 (N : Node_Id; Val : Node_Id); -- Node4
8660
8661 procedure Set_Discrete_Subtype_Definition
8662 (N : Node_Id; Val : Node_Id); -- Node4
8663
8664 procedure Set_Discrete_Subtype_Definitions
8665 (N : Node_Id; Val : List_Id); -- List2
8666
8667 procedure Set_Discriminant_Specifications
8668 (N : Node_Id; Val : List_Id); -- List4
8669
8670 procedure Set_Discriminant_Type
8671 (N : Node_Id; Val : Node_Id); -- Node5
8672
8673 procedure Set_Do_Accessibility_Check
8674 (N : Node_Id; Val : Boolean := True); -- Flag13
8675
8676 procedure Set_Do_Discriminant_Check
8677 (N : Node_Id; Val : Boolean := True); -- Flag13
8678
8679 procedure Set_Do_Division_Check
8680 (N : Node_Id; Val : Boolean := True); -- Flag13
8681
8682 procedure Set_Do_Length_Check
8683 (N : Node_Id; Val : Boolean := True); -- Flag4
8684
8685 procedure Set_Do_Overflow_Check
8686 (N : Node_Id; Val : Boolean := True); -- Flag17
8687
8688 procedure Set_Do_Range_Check
8689 (N : Node_Id; Val : Boolean := True); -- Flag9
8690
8691 procedure Set_Do_Storage_Check
8692 (N : Node_Id; Val : Boolean := True); -- Flag17
8693
8694 procedure Set_Do_Tag_Check
8695 (N : Node_Id; Val : Boolean := True); -- Flag13
8696
8697 procedure Set_Elaborate_All_Desirable
8698 (N : Node_Id; Val : Boolean := True); -- Flag9
8699
8700 procedure Set_Elaborate_All_Present
8701 (N : Node_Id; Val : Boolean := True); -- Flag14
8702
8703 procedure Set_Elaborate_Desirable
8704 (N : Node_Id; Val : Boolean := True); -- Flag11
8705
8706 procedure Set_Elaborate_Present
8707 (N : Node_Id; Val : Boolean := True); -- Flag4
8708
8709 procedure Set_Elaboration_Boolean
8710 (N : Node_Id; Val : Node_Id); -- Node2
8711
8712 procedure Set_Else_Actions
8713 (N : Node_Id; Val : List_Id); -- List3
8714
8715 procedure Set_Else_Statements
8716 (N : Node_Id; Val : List_Id); -- List4
8717
8718 procedure Set_Elsif_Parts
8719 (N : Node_Id; Val : List_Id); -- List3
8720
8721 procedure Set_Enclosing_Variant
8722 (N : Node_Id; Val : Node_Id); -- Node2
8723
8724 procedure Set_End_Label
8725 (N : Node_Id; Val : Node_Id); -- Node4
8726
8727 procedure Set_End_Span
8728 (N : Node_Id; Val : Uint); -- Uint5
8729
8730 procedure Set_Entity
8731 (N : Node_Id; Val : Node_Id); -- Node4
8732
8733 procedure Set_Entry_Body_Formal_Part
8734 (N : Node_Id; Val : Node_Id); -- Node5
8735
8736 procedure Set_Entry_Call_Alternative
8737 (N : Node_Id; Val : Node_Id); -- Node1
8738
8739 procedure Set_Entry_Call_Statement
8740 (N : Node_Id; Val : Node_Id); -- Node1
8741
8742 procedure Set_Entry_Direct_Name
8743 (N : Node_Id; Val : Node_Id); -- Node1
8744
8745 procedure Set_Entry_Index
8746 (N : Node_Id; Val : Node_Id); -- Node5
8747
8748 procedure Set_Entry_Index_Specification
8749 (N : Node_Id; Val : Node_Id); -- Node4
8750
8751 procedure Set_Etype
8752 (N : Node_Id; Val : Node_Id); -- Node5
8753
8754 procedure Set_Exception_Choices
8755 (N : Node_Id; Val : List_Id); -- List4
8756
8757 procedure Set_Exception_Handlers
8758 (N : Node_Id; Val : List_Id); -- List5
8759
8760 procedure Set_Exception_Junk
8761 (N : Node_Id; Val : Boolean := True); -- Flag8
8762
8763 procedure Set_Exception_Label
8764 (N : Node_Id; Val : Node_Id); -- Node5
8765
8766 procedure Set_Expansion_Delayed
8767 (N : Node_Id; Val : Boolean := True); -- Flag11
8768
8769 procedure Set_Explicit_Actual_Parameter
8770 (N : Node_Id; Val : Node_Id); -- Node3
8771
8772 procedure Set_Explicit_Generic_Actual_Parameter
8773 (N : Node_Id; Val : Node_Id); -- Node1
8774
8775 procedure Set_Expression
8776 (N : Node_Id; Val : Node_Id); -- Node3
8777
8778 procedure Set_Expressions
8779 (N : Node_Id; Val : List_Id); -- List1
8780
8781 procedure Set_First_Bit
8782 (N : Node_Id; Val : Node_Id); -- Node3
8783
8784 procedure Set_First_Inlined_Subprogram
8785 (N : Node_Id; Val : Entity_Id); -- Node3
8786
8787 procedure Set_First_Name
8788 (N : Node_Id; Val : Boolean := True); -- Flag5
8789
8790 procedure Set_First_Named_Actual
8791 (N : Node_Id; Val : Node_Id); -- Node4
8792
8793 procedure Set_First_Real_Statement
8794 (N : Node_Id; Val : Node_Id); -- Node2
8795
8796 procedure Set_First_Subtype_Link
8797 (N : Node_Id; Val : Entity_Id); -- Node5
8798
8799 procedure Set_Float_Truncate
8800 (N : Node_Id; Val : Boolean := True); -- Flag11
8801
8802 procedure Set_Formal_Type_Definition
8803 (N : Node_Id; Val : Node_Id); -- Node3
8804
8805 procedure Set_Forwards_OK
8806 (N : Node_Id; Val : Boolean := True); -- Flag5
8807
8808 procedure Set_From_At_Mod
8809 (N : Node_Id; Val : Boolean := True); -- Flag4
8810
8811 procedure Set_From_At_End
8812 (N : Node_Id; Val : Boolean := True); -- Flag4
8813
8814 procedure Set_From_Default
8815 (N : Node_Id; Val : Boolean := True); -- Flag6
8816
8817 procedure Set_Generic_Associations
8818 (N : Node_Id; Val : List_Id); -- List3
8819
8820 procedure Set_Generic_Formal_Declarations
8821 (N : Node_Id; Val : List_Id); -- List2
8822
8823 procedure Set_Generic_Parent
8824 (N : Node_Id; Val : Node_Id); -- Node5
8825
8826 procedure Set_Generic_Parent_Type
8827 (N : Node_Id; Val : Node_Id); -- Node4
8828
8829 procedure Set_Handled_Statement_Sequence
8830 (N : Node_Id; Val : Node_Id); -- Node4
8831
8832 procedure Set_Handler_List_Entry
8833 (N : Node_Id; Val : Node_Id); -- Node2
8834
8835 procedure Set_Has_Created_Identifier
8836 (N : Node_Id; Val : Boolean := True); -- Flag15
8837
8838 procedure Set_Has_Dynamic_Length_Check
8839 (N : Node_Id; Val : Boolean := True); -- Flag10
8840
8841 procedure Set_Has_Dynamic_Range_Check
8842 (N : Node_Id; Val : Boolean := True); -- Flag12
8843
8844 procedure Set_Has_Init_Expression
8845 (N : Node_Id; Val : Boolean := True); -- Flag14
8846
8847 procedure Set_Has_Local_Raise
8848 (N : Node_Id; Val : Boolean := True); -- Flag8
8849
8850 procedure Set_Has_No_Elaboration_Code
8851 (N : Node_Id; Val : Boolean := True); -- Flag17
8852
8853 procedure Set_Has_Priority_Pragma
8854 (N : Node_Id; Val : Boolean := True); -- Flag6
8855
8856 procedure Set_Has_Private_View
8857 (N : Node_Id; Val : Boolean := True); -- Flag11
8858
8859 procedure Set_Has_Relative_Deadline_Pragma
8860 (N : Node_Id; Val : Boolean := True); -- Flag9
8861
8862 procedure Set_Has_Self_Reference
8863 (N : Node_Id; Val : Boolean := True); -- Flag13
8864
8865 procedure Set_Has_Storage_Size_Pragma
8866 (N : Node_Id; Val : Boolean := True); -- Flag5
8867
8868 procedure Set_Has_Task_Info_Pragma
8869 (N : Node_Id; Val : Boolean := True); -- Flag7
8870
8871 procedure Set_Has_Task_Name_Pragma
8872 (N : Node_Id; Val : Boolean := True); -- Flag8
8873
8874 procedure Set_Has_Wide_Character
8875 (N : Node_Id; Val : Boolean := True); -- Flag11
8876
8877 procedure Set_Hidden_By_Use_Clause
8878 (N : Node_Id; Val : Elist_Id); -- Elist4
8879
8880 procedure Set_High_Bound
8881 (N : Node_Id; Val : Node_Id); -- Node2
8882
8883 procedure Set_Identifier
8884 (N : Node_Id; Val : Node_Id); -- Node1
8885
8886 procedure Set_Interface_List
8887 (N : Node_Id; Val : List_Id); -- List2
8888
8889 procedure Set_Interface_Present
8890 (N : Node_Id; Val : Boolean := True); -- Flag16
8891
8892 procedure Set_Implicit_With
8893 (N : Node_Id; Val : Boolean := True); -- Flag16
8894
8895 procedure Set_In_Present
8896 (N : Node_Id; Val : Boolean := True); -- Flag15
8897
8898 procedure Set_Includes_Infinities
8899 (N : Node_Id; Val : Boolean := True); -- Flag11
8900
8901 procedure Set_Instance_Spec
8902 (N : Node_Id; Val : Node_Id); -- Node5
8903
8904 procedure Set_Intval
8905 (N : Node_Id; Val : Uint); -- Uint3
8906
8907 procedure Set_Is_Asynchronous_Call_Block
8908 (N : Node_Id; Val : Boolean := True); -- Flag7
8909
8910 procedure Set_Is_Component_Left_Opnd
8911 (N : Node_Id; Val : Boolean := True); -- Flag13
8912
8913 procedure Set_Is_Component_Right_Opnd
8914 (N : Node_Id; Val : Boolean := True); -- Flag14
8915
8916 procedure Set_Is_Controlling_Actual
8917 (N : Node_Id; Val : Boolean := True); -- Flag16
8918
8919 procedure Set_Is_Dynamic_Coextension
8920 (N : Node_Id; Val : Boolean := True); -- Flag18
8921
8922 procedure Set_Is_Elsif
8923 (N : Node_Id; Val : Boolean := True); -- Flag13
8924
8925 procedure Set_Is_Entry_Barrier_Function
8926 (N : Node_Id; Val : Boolean := True); -- Flag8
8927
8928 procedure Set_Is_Expanded_Build_In_Place_Call
8929 (N : Node_Id; Val : Boolean := True); -- Flag11
8930
8931 procedure Set_Is_Folded_In_Parser
8932 (N : Node_Id; Val : Boolean := True); -- Flag4
8933
8934 procedure Set_Is_In_Discriminant_Check
8935 (N : Node_Id; Val : Boolean := True); -- Flag11
8936
8937 procedure Set_Is_Machine_Number
8938 (N : Node_Id; Val : Boolean := True); -- Flag11
8939
8940 procedure Set_Is_Null_Loop
8941 (N : Node_Id; Val : Boolean := True); -- Flag16
8942
8943 procedure Set_Is_Overloaded
8944 (N : Node_Id; Val : Boolean := True); -- Flag5
8945
8946 procedure Set_Is_Power_Of_2_For_Shift
8947 (N : Node_Id; Val : Boolean := True); -- Flag13
8948
8949 procedure Set_Is_Protected_Subprogram_Body
8950 (N : Node_Id; Val : Boolean := True); -- Flag7
8951
8952 procedure Set_Is_Static_Coextension
8953 (N : Node_Id; Val : Boolean := True); -- Flag14
8954
8955 procedure Set_Is_Static_Expression
8956 (N : Node_Id; Val : Boolean := True); -- Flag6
8957
8958 procedure Set_Is_Subprogram_Descriptor
8959 (N : Node_Id; Val : Boolean := True); -- Flag16
8960
8961 procedure Set_Is_Task_Allocation_Block
8962 (N : Node_Id; Val : Boolean := True); -- Flag6
8963
8964 procedure Set_Is_Task_Master
8965 (N : Node_Id; Val : Boolean := True); -- Flag5
8966
8967 procedure Set_Iteration_Scheme
8968 (N : Node_Id; Val : Node_Id); -- Node2
8969
8970 procedure Set_Itype
8971 (N : Node_Id; Val : Entity_Id); -- Node1
8972
8973 procedure Set_Kill_Range_Check
8974 (N : Node_Id; Val : Boolean := True); -- Flag11
8975
8976 procedure Set_Last_Bit
8977 (N : Node_Id; Val : Node_Id); -- Node4
8978
8979 procedure Set_Last_Name
8980 (N : Node_Id; Val : Boolean := True); -- Flag6
8981
8982 procedure Set_Library_Unit
8983 (N : Node_Id; Val : Node_Id); -- Node4
8984
8985 procedure Set_Label_Construct
8986 (N : Node_Id; Val : Node_Id); -- Node2
8987
8988 procedure Set_Left_Opnd
8989 (N : Node_Id; Val : Node_Id); -- Node2
8990
8991 procedure Set_Limited_View_Installed
8992 (N : Node_Id; Val : Boolean := True); -- Flag18
8993
8994 procedure Set_Limited_Present
8995 (N : Node_Id; Val : Boolean := True); -- Flag17
8996
8997 procedure Set_Literals
8998 (N : Node_Id; Val : List_Id); -- List1
8999
9000 procedure Set_Local_Raise_Not_OK
9001 (N : Node_Id; Val : Boolean := True); -- Flag7
9002
9003 procedure Set_Local_Raise_Statements
9004 (N : Node_Id; Val : Elist_Id); -- Elist1
9005
9006 procedure Set_Loop_Actions
9007 (N : Node_Id; Val : List_Id); -- List2
9008
9009 procedure Set_Loop_Parameter_Specification
9010 (N : Node_Id; Val : Node_Id); -- Node4
9011
9012 procedure Set_Low_Bound
9013 (N : Node_Id; Val : Node_Id); -- Node1
9014
9015 procedure Set_Mod_Clause
9016 (N : Node_Id; Val : Node_Id); -- Node2
9017
9018 procedure Set_More_Ids
9019 (N : Node_Id; Val : Boolean := True); -- Flag5
9020
9021 procedure Set_Must_Be_Byte_Aligned
9022 (N : Node_Id; Val : Boolean := True); -- Flag14
9023
9024 procedure Set_Must_Not_Freeze
9025 (N : Node_Id; Val : Boolean := True); -- Flag8
9026
9027 procedure Set_Must_Not_Override
9028 (N : Node_Id; Val : Boolean := True); -- Flag15
9029
9030 procedure Set_Must_Override
9031 (N : Node_Id; Val : Boolean := True); -- Flag14
9032
9033 procedure Set_Name
9034 (N : Node_Id; Val : Node_Id); -- Node2
9035
9036 procedure Set_Names
9037 (N : Node_Id; Val : List_Id); -- List2
9038
9039 procedure Set_Next_Entity
9040 (N : Node_Id; Val : Node_Id); -- Node2
9041
9042 procedure Set_Next_Implicit_With
9043 (N : Node_Id; Val : Node_Id); -- Node3
9044
9045 procedure Set_Next_Named_Actual
9046 (N : Node_Id; Val : Node_Id); -- Node4
9047
9048 procedure Set_Next_Pragma
9049 (N : Node_Id; Val : Node_Id); -- Node1
9050
9051 procedure Set_Next_Rep_Item
9052 (N : Node_Id; Val : Node_Id); -- Node5
9053
9054 procedure Set_Next_Use_Clause
9055 (N : Node_Id; Val : Node_Id); -- Node3
9056
9057 procedure Set_No_Ctrl_Actions
9058 (N : Node_Id; Val : Boolean := True); -- Flag7
9059
9060 procedure Set_No_Elaboration_Check
9061 (N : Node_Id; Val : Boolean := True); -- Flag14
9062
9063 procedure Set_No_Entities_Ref_In_Spec
9064 (N : Node_Id; Val : Boolean := True); -- Flag8
9065
9066 procedure Set_No_Initialization
9067 (N : Node_Id; Val : Boolean := True); -- Flag13
9068
9069 procedure Set_No_Truncation
9070 (N : Node_Id; Val : Boolean := True); -- Flag17
9071
9072 procedure Set_Null_Present
9073 (N : Node_Id; Val : Boolean := True); -- Flag13
9074
9075 procedure Set_Null_Exclusion_Present
9076 (N : Node_Id; Val : Boolean := True); -- Flag11
9077
9078 procedure Set_Null_Exclusion_In_Return_Present
9079 (N : Node_Id; Val : Boolean := True); -- Flag14
9080
9081 procedure Set_Null_Record_Present
9082 (N : Node_Id; Val : Boolean := True); -- Flag17
9083
9084 procedure Set_Object_Definition
9085 (N : Node_Id; Val : Node_Id); -- Node4
9086
9087 procedure Set_Original_Discriminant
9088 (N : Node_Id; Val : Node_Id); -- Node2
9089
9090 procedure Set_Original_Entity
9091 (N : Node_Id; Val : Entity_Id); -- Node2
9092
9093 procedure Set_Others_Discrete_Choices
9094 (N : Node_Id; Val : List_Id); -- List1
9095
9096 procedure Set_Out_Present
9097 (N : Node_Id; Val : Boolean := True); -- Flag17
9098
9099 procedure Set_Parameter_Associations
9100 (N : Node_Id; Val : List_Id); -- List3
9101
9102 procedure Set_Parameter_List_Truncated
9103 (N : Node_Id; Val : Boolean := True); -- Flag17
9104
9105 procedure Set_Parameter_Specifications
9106 (N : Node_Id; Val : List_Id); -- List3
9107
9108 procedure Set_Parameter_Type
9109 (N : Node_Id; Val : Node_Id); -- Node2
9110
9111 procedure Set_Parent_Spec
9112 (N : Node_Id; Val : Node_Id); -- Node4
9113
9114 procedure Set_PPC_Enabled
9115 (N : Node_Id; Val : Boolean := True); -- Flag5
9116
9117 procedure Set_Position
9118 (N : Node_Id; Val : Node_Id); -- Node2
9119
9120 procedure Set_Pragma_Argument_Associations
9121 (N : Node_Id; Val : List_Id); -- List2
9122
9123 procedure Set_Pragma_Identifier
9124 (N : Node_Id; Val : Node_Id); -- Node4
9125
9126 procedure Set_Pragmas_After
9127 (N : Node_Id; Val : List_Id); -- List5
9128
9129 procedure Set_Pragmas_Before
9130 (N : Node_Id; Val : List_Id); -- List4
9131
9132 procedure Set_Prefix
9133 (N : Node_Id; Val : Node_Id); -- Node3
9134
9135 procedure Set_Present_Expr
9136 (N : Node_Id; Val : Uint); -- Uint3
9137
9138 procedure Set_Prev_Ids
9139 (N : Node_Id; Val : Boolean := True); -- Flag6
9140
9141 procedure Set_Print_In_Hex
9142 (N : Node_Id; Val : Boolean := True); -- Flag13
9143
9144 procedure Set_Private_Declarations
9145 (N : Node_Id; Val : List_Id); -- List3
9146
9147 procedure Set_Private_Present
9148 (N : Node_Id; Val : Boolean := True); -- Flag15
9149
9150 procedure Set_Procedure_To_Call
9151 (N : Node_Id; Val : Node_Id); -- Node2
9152
9153 procedure Set_Proper_Body
9154 (N : Node_Id; Val : Node_Id); -- Node1
9155
9156 procedure Set_Protected_Definition
9157 (N : Node_Id; Val : Node_Id); -- Node3
9158
9159 procedure Set_Protected_Present
9160 (N : Node_Id; Val : Boolean := True); -- Flag6
9161
9162 procedure Set_Raises_Constraint_Error
9163 (N : Node_Id; Val : Boolean := True); -- Flag7
9164
9165 procedure Set_Range_Constraint
9166 (N : Node_Id; Val : Node_Id); -- Node4
9167
9168 procedure Set_Range_Expression
9169 (N : Node_Id; Val : Node_Id); -- Node4
9170
9171 procedure Set_Real_Range_Specification
9172 (N : Node_Id; Val : Node_Id); -- Node4
9173
9174 procedure Set_Realval
9175 (N : Node_Id; Val : Ureal); -- Ureal3
9176
9177 procedure Set_Reason
9178 (N : Node_Id; Val : Uint); -- Uint3
9179
9180 procedure Set_Record_Extension_Part
9181 (N : Node_Id; Val : Node_Id); -- Node3
9182
9183 procedure Set_Redundant_Use
9184 (N : Node_Id; Val : Boolean := True); -- Flag13
9185
9186 procedure Set_Renaming_Exception
9187 (N : Node_Id; Val : Node_Id); -- Node2
9188
9189 procedure Set_Result_Definition
9190 (N : Node_Id; Val : Node_Id); -- Node4
9191
9192 procedure Set_Return_Object_Declarations
9193 (N : Node_Id; Val : List_Id); -- List3
9194
9195 procedure Set_Return_Statement_Entity
9196 (N : Node_Id; Val : Node_Id); -- Node5
9197
9198 procedure Set_Reverse_Present
9199 (N : Node_Id; Val : Boolean := True); -- Flag15
9200
9201 procedure Set_Right_Opnd
9202 (N : Node_Id; Val : Node_Id); -- Node3
9203
9204 procedure Set_Rounded_Result
9205 (N : Node_Id; Val : Boolean := True); -- Flag18
9206
9207 procedure Set_Scope
9208 (N : Node_Id; Val : Node_Id); -- Node3
9209
9210 procedure Set_Select_Alternatives
9211 (N : Node_Id; Val : List_Id); -- List1
9212
9213 procedure Set_Selector_Name
9214 (N : Node_Id; Val : Node_Id); -- Node2
9215
9216 procedure Set_Selector_Names
9217 (N : Node_Id; Val : List_Id); -- List1
9218
9219 procedure Set_Shift_Count_OK
9220 (N : Node_Id; Val : Boolean := True); -- Flag4
9221
9222 procedure Set_Source_Type
9223 (N : Node_Id; Val : Entity_Id); -- Node1
9224
9225 procedure Set_Specification
9226 (N : Node_Id; Val : Node_Id); -- Node1
9227
9228 procedure Set_Statements
9229 (N : Node_Id; Val : List_Id); -- List3
9230
9231 procedure Set_Static_Processing_OK
9232 (N : Node_Id; Val : Boolean); -- Flag4
9233
9234 procedure Set_Storage_Pool
9235 (N : Node_Id; Val : Node_Id); -- Node1
9236
9237 procedure Set_Strval
9238 (N : Node_Id; Val : String_Id); -- Str3
9239
9240 procedure Set_Subtype_Indication
9241 (N : Node_Id; Val : Node_Id); -- Node5
9242
9243 procedure Set_Subtype_Mark
9244 (N : Node_Id; Val : Node_Id); -- Node4
9245
9246 procedure Set_Subtype_Marks
9247 (N : Node_Id; Val : List_Id); -- List2
9248
9249 procedure Set_Suppress_Loop_Warnings
9250 (N : Node_Id; Val : Boolean := True); -- Flag17
9251
9252 procedure Set_Synchronized_Present
9253 (N : Node_Id; Val : Boolean := True); -- Flag7
9254
9255 procedure Set_Tagged_Present
9256 (N : Node_Id; Val : Boolean := True); -- Flag15
9257
9258 procedure Set_Target_Type
9259 (N : Node_Id; Val : Entity_Id); -- Node2
9260
9261 procedure Set_Task_Definition
9262 (N : Node_Id; Val : Node_Id); -- Node3
9263
9264 procedure Set_Task_Present
9265 (N : Node_Id; Val : Boolean := True); -- Flag5
9266
9267 procedure Set_Then_Actions
9268 (N : Node_Id; Val : List_Id); -- List2
9269
9270 procedure Set_Then_Statements
9271 (N : Node_Id; Val : List_Id); -- List2
9272
9273 procedure Set_Treat_Fixed_As_Integer
9274 (N : Node_Id; Val : Boolean := True); -- Flag14
9275
9276 procedure Set_Triggering_Alternative
9277 (N : Node_Id; Val : Node_Id); -- Node1
9278
9279 procedure Set_Triggering_Statement
9280 (N : Node_Id; Val : Node_Id); -- Node1
9281
9282 procedure Set_TSS_Elist
9283 (N : Node_Id; Val : Elist_Id); -- Elist3
9284
9285 procedure Set_Type_Definition
9286 (N : Node_Id; Val : Node_Id); -- Node3
9287
9288 procedure Set_Unit
9289 (N : Node_Id; Val : Node_Id); -- Node2
9290
9291 procedure Set_Unknown_Discriminants_Present
9292 (N : Node_Id; Val : Boolean := True); -- Flag13
9293
9294 procedure Set_Unreferenced_In_Spec
9295 (N : Node_Id; Val : Boolean := True); -- Flag7
9296
9297 procedure Set_Variant_Part
9298 (N : Node_Id; Val : Node_Id); -- Node4
9299
9300 procedure Set_Variants
9301 (N : Node_Id; Val : List_Id); -- List1
9302
9303 procedure Set_Visible_Declarations
9304 (N : Node_Id; Val : List_Id); -- List2
9305
9306 procedure Set_Was_Originally_Stub
9307 (N : Node_Id; Val : Boolean := True); -- Flag13
9308
9309 procedure Set_Zero_Cost_Handling
9310 (N : Node_Id; Val : Boolean := True); -- Flag5
9311
9312 -------------------------
9313 -- Iterator Procedures --
9314 -------------------------
9315
9316 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
9317
9318 procedure Next_Entity (N : in out Node_Id);
9319 procedure Next_Named_Actual (N : in out Node_Id);
9320 procedure Next_Rep_Item (N : in out Node_Id);
9321 procedure Next_Use_Clause (N : in out Node_Id);
9322
9323 --------------------------------------
9324 -- Logical Access to End_Span Field --
9325 --------------------------------------
9326
9327 function End_Location (N : Node_Id) return Source_Ptr;
9328 -- N is an N_If_Statement or N_Case_Statement node, and this
9329 -- function returns the location of the IF token in the END IF
9330 -- sequence by translating the value of the End_Span field.
9331
9332 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
9333 -- N is an N_If_Statement or N_Case_Statement node. This procedure
9334 -- sets the End_Span field to correspond to the given value S. In
9335 -- other words, End_Span is set to the difference between S and
9336 -- Sloc (N), the starting location.
9337
9338 --------------------------------
9339 -- Node_Kind Membership Tests --
9340 --------------------------------
9341
9342 -- The following functions allow a convenient notation for testing whether
9343 -- a Node_Kind value matches any one of a list of possible values. In each
9344 -- case True is returned if the given T argument is equal to any of the V
9345 -- arguments. Note that there is a similar set of functions defined in
9346 -- Atree where the first argument is a Node_Id whose Nkind field is tested.
9347
9348 function Nkind_In
9349 (T : Node_Kind;
9350 V1 : Node_Kind;
9351 V2 : Node_Kind) return Boolean;
9352
9353 function Nkind_In
9354 (T : Node_Kind;
9355 V1 : Node_Kind;
9356 V2 : Node_Kind;
9357 V3 : Node_Kind) return Boolean;
9358
9359 function Nkind_In
9360 (T : Node_Kind;
9361 V1 : Node_Kind;
9362 V2 : Node_Kind;
9363 V3 : Node_Kind;
9364 V4 : Node_Kind) return Boolean;
9365
9366 function Nkind_In
9367 (T : Node_Kind;
9368 V1 : Node_Kind;
9369 V2 : Node_Kind;
9370 V3 : Node_Kind;
9371 V4 : Node_Kind;
9372 V5 : Node_Kind) return Boolean;
9373
9374 function Nkind_In
9375 (T : Node_Kind;
9376 V1 : Node_Kind;
9377 V2 : Node_Kind;
9378 V3 : Node_Kind;
9379 V4 : Node_Kind;
9380 V5 : Node_Kind;
9381 V6 : Node_Kind) return Boolean;
9382
9383 function Nkind_In
9384 (T : Node_Kind;
9385 V1 : Node_Kind;
9386 V2 : Node_Kind;
9387 V3 : Node_Kind;
9388 V4 : Node_Kind;
9389 V5 : Node_Kind;
9390 V6 : Node_Kind;
9391 V7 : Node_Kind) return Boolean;
9392
9393 function Nkind_In
9394 (T : Node_Kind;
9395 V1 : Node_Kind;
9396 V2 : Node_Kind;
9397 V3 : Node_Kind;
9398 V4 : Node_Kind;
9399 V5 : Node_Kind;
9400 V6 : Node_Kind;
9401 V7 : Node_Kind;
9402 V8 : Node_Kind) return Boolean;
9403
9404 function Nkind_In
9405 (T : Node_Kind;
9406 V1 : Node_Kind;
9407 V2 : Node_Kind;
9408 V3 : Node_Kind;
9409 V4 : Node_Kind;
9410 V5 : Node_Kind;
9411 V6 : Node_Kind;
9412 V7 : Node_Kind;
9413 V8 : Node_Kind;
9414 V9 : Node_Kind) return Boolean;
9415
9416 pragma Inline (Nkind_In);
9417 -- Inline all above functions
9418
9419 -----------------------
9420 -- Utility Functions --
9421 -----------------------
9422
9423 function Pragma_Name (N : Node_Id) return Name_Id;
9424 pragma Inline (Pragma_Name);
9425 -- Convenient function to obtain Chars field of Pragma_Identifier
9426
9427 -----------------------------
9428 -- Syntactic Parent Tables --
9429 -----------------------------
9430
9431 -- These tables show for each node, and for each of the five fields,
9432 -- whether the corresponding field is syntactic (True) or semantic (False).
9433 -- Unused entries are also set to False.
9434
9435 subtype Field_Num is Natural range 1 .. 5;
9436
9437 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
9438
9439 -- Following entries can be built automatically from the sinfo sources
9440 -- using the makeisf utility (currently this program is in spitbol).
9441
9442 N_Identifier =>
9443 (1 => True, -- Chars (Name1)
9444 2 => False, -- Original_Discriminant (Node2-Sem)
9445 3 => False, -- unused
9446 4 => False, -- Entity (Node4-Sem)
9447 5 => False), -- Etype (Node5-Sem)
9448
9449 N_Integer_Literal =>
9450 (1 => False, -- unused
9451 2 => False, -- Original_Entity (Node2-Sem)
9452 3 => True, -- Intval (Uint3)
9453 4 => False, -- unused
9454 5 => False), -- Etype (Node5-Sem)
9455
9456 N_Real_Literal =>
9457 (1 => False, -- unused
9458 2 => False, -- Original_Entity (Node2-Sem)
9459 3 => True, -- Realval (Ureal3)
9460 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
9461 5 => False), -- Etype (Node5-Sem)
9462
9463 N_Character_Literal =>
9464 (1 => True, -- Chars (Name1)
9465 2 => True, -- Char_Literal_Value (Uint2)
9466 3 => False, -- unused
9467 4 => False, -- Entity (Node4-Sem)
9468 5 => False), -- Etype (Node5-Sem)
9469
9470 N_String_Literal =>
9471 (1 => False, -- unused
9472 2 => False, -- unused
9473 3 => True, -- Strval (Str3)
9474 4 => False, -- unused
9475 5 => False), -- Etype (Node5-Sem)
9476
9477 N_Pragma =>
9478 (1 => False, -- Next_Pragma (Node1-Sem)
9479 2 => True, -- Pragma_Argument_Associations (List2)
9480 3 => True, -- Debug_Statement (Node3)
9481 4 => True, -- Pragma_Identifier (Node4)
9482 5 => False), -- Next_Rep_Item (Node5-Sem)
9483
9484 N_Pragma_Argument_Association =>
9485 (1 => True, -- Chars (Name1)
9486 2 => False, -- unused
9487 3 => True, -- Expression (Node3)
9488 4 => False, -- unused
9489 5 => False), -- unused
9490
9491 N_Defining_Identifier =>
9492 (1 => True, -- Chars (Name1)
9493 2 => False, -- Next_Entity (Node2-Sem)
9494 3 => False, -- Scope (Node3-Sem)
9495 4 => False, -- unused
9496 5 => False), -- Etype (Node5-Sem)
9497
9498 N_Full_Type_Declaration =>
9499 (1 => True, -- Defining_Identifier (Node1)
9500 2 => False, -- unused
9501 3 => True, -- Type_Definition (Node3)
9502 4 => True, -- Discriminant_Specifications (List4)
9503 5 => False), -- unused
9504
9505 N_Subtype_Declaration =>
9506 (1 => True, -- Defining_Identifier (Node1)
9507 2 => False, -- unused
9508 3 => False, -- unused
9509 4 => False, -- Generic_Parent_Type (Node4-Sem)
9510 5 => True), -- Subtype_Indication (Node5)
9511
9512 N_Subtype_Indication =>
9513 (1 => False, -- unused
9514 2 => False, -- unused
9515 3 => True, -- Constraint (Node3)
9516 4 => True, -- Subtype_Mark (Node4)
9517 5 => False), -- Etype (Node5-Sem)
9518
9519 N_Object_Declaration =>
9520 (1 => True, -- Defining_Identifier (Node1)
9521 2 => False, -- Handler_List_Entry (Node2-Sem)
9522 3 => True, -- Expression (Node3)
9523 4 => True, -- Object_Definition (Node4)
9524 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
9525
9526 N_Number_Declaration =>
9527 (1 => True, -- Defining_Identifier (Node1)
9528 2 => False, -- unused
9529 3 => True, -- Expression (Node3)
9530 4 => False, -- unused
9531 5 => False), -- unused
9532
9533 N_Derived_Type_Definition =>
9534 (1 => False, -- unused
9535 2 => True, -- Interface_List (List2)
9536 3 => True, -- Record_Extension_Part (Node3)
9537 4 => False, -- unused
9538 5 => True), -- Subtype_Indication (Node5)
9539
9540 N_Range_Constraint =>
9541 (1 => False, -- unused
9542 2 => False, -- unused
9543 3 => False, -- unused
9544 4 => True, -- Range_Expression (Node4)
9545 5 => False), -- unused
9546
9547 N_Range =>
9548 (1 => True, -- Low_Bound (Node1)
9549 2 => True, -- High_Bound (Node2)
9550 3 => False, -- unused
9551 4 => False, -- unused
9552 5 => False), -- Etype (Node5-Sem)
9553
9554 N_Enumeration_Type_Definition =>
9555 (1 => True, -- Literals (List1)
9556 2 => False, -- unused
9557 3 => False, -- unused
9558 4 => True, -- End_Label (Node4)
9559 5 => False), -- unused
9560
9561 N_Defining_Character_Literal =>
9562 (1 => True, -- Chars (Name1)
9563 2 => False, -- Next_Entity (Node2-Sem)
9564 3 => False, -- Scope (Node3-Sem)
9565 4 => False, -- unused
9566 5 => False), -- Etype (Node5-Sem)
9567
9568 N_Signed_Integer_Type_Definition =>
9569 (1 => True, -- Low_Bound (Node1)
9570 2 => True, -- High_Bound (Node2)
9571 3 => False, -- unused
9572 4 => False, -- unused
9573 5 => False), -- unused
9574
9575 N_Modular_Type_Definition =>
9576 (1 => False, -- unused
9577 2 => False, -- unused
9578 3 => True, -- Expression (Node3)
9579 4 => False, -- unused
9580 5 => False), -- unused
9581
9582 N_Floating_Point_Definition =>
9583 (1 => False, -- unused
9584 2 => True, -- Digits_Expression (Node2)
9585 3 => False, -- unused
9586 4 => True, -- Real_Range_Specification (Node4)
9587 5 => False), -- unused
9588
9589 N_Real_Range_Specification =>
9590 (1 => True, -- Low_Bound (Node1)
9591 2 => True, -- High_Bound (Node2)
9592 3 => False, -- unused
9593 4 => False, -- unused
9594 5 => False), -- unused
9595
9596 N_Ordinary_Fixed_Point_Definition =>
9597 (1 => False, -- unused
9598 2 => False, -- unused
9599 3 => True, -- Delta_Expression (Node3)
9600 4 => True, -- Real_Range_Specification (Node4)
9601 5 => False), -- unused
9602
9603 N_Decimal_Fixed_Point_Definition =>
9604 (1 => False, -- unused
9605 2 => True, -- Digits_Expression (Node2)
9606 3 => True, -- Delta_Expression (Node3)
9607 4 => True, -- Real_Range_Specification (Node4)
9608 5 => False), -- unused
9609
9610 N_Digits_Constraint =>
9611 (1 => False, -- unused
9612 2 => True, -- Digits_Expression (Node2)
9613 3 => False, -- unused
9614 4 => True, -- Range_Constraint (Node4)
9615 5 => False), -- unused
9616
9617 N_Unconstrained_Array_Definition =>
9618 (1 => False, -- unused
9619 2 => True, -- Subtype_Marks (List2)
9620 3 => False, -- unused
9621 4 => True, -- Component_Definition (Node4)
9622 5 => False), -- unused
9623
9624 N_Constrained_Array_Definition =>
9625 (1 => False, -- unused
9626 2 => True, -- Discrete_Subtype_Definitions (List2)
9627 3 => False, -- unused
9628 4 => True, -- Component_Definition (Node4)
9629 5 => False), -- unused
9630
9631 N_Component_Definition =>
9632 (1 => False, -- unused
9633 2 => False, -- unused
9634 3 => True, -- Access_Definition (Node3)
9635 4 => False, -- unused
9636 5 => True), -- Subtype_Indication (Node5)
9637
9638 N_Discriminant_Specification =>
9639 (1 => True, -- Defining_Identifier (Node1)
9640 2 => False, -- unused
9641 3 => True, -- Expression (Node3)
9642 4 => False, -- unused
9643 5 => True), -- Discriminant_Type (Node5)
9644
9645 N_Index_Or_Discriminant_Constraint =>
9646 (1 => True, -- Constraints (List1)
9647 2 => False, -- unused
9648 3 => False, -- unused
9649 4 => False, -- unused
9650 5 => False), -- unused
9651
9652 N_Discriminant_Association =>
9653 (1 => True, -- Selector_Names (List1)
9654 2 => False, -- unused
9655 3 => True, -- Expression (Node3)
9656 4 => False, -- unused
9657 5 => False), -- unused
9658
9659 N_Record_Definition =>
9660 (1 => True, -- Component_List (Node1)
9661 2 => True, -- Interface_List (List2)
9662 3 => False, -- unused
9663 4 => True, -- End_Label (Node4)
9664 5 => False), -- unused
9665
9666 N_Component_List =>
9667 (1 => False, -- unused
9668 2 => False, -- unused
9669 3 => True, -- Component_Items (List3)
9670 4 => True, -- Variant_Part (Node4)
9671 5 => False), -- unused
9672
9673 N_Component_Declaration =>
9674 (1 => True, -- Defining_Identifier (Node1)
9675 2 => False, -- unused
9676 3 => True, -- Expression (Node3)
9677 4 => True, -- Component_Definition (Node4)
9678 5 => False), -- unused
9679
9680 N_Variant_Part =>
9681 (1 => True, -- Variants (List1)
9682 2 => True, -- Name (Node2)
9683 3 => False, -- unused
9684 4 => False, -- unused
9685 5 => False), -- unused
9686
9687 N_Variant =>
9688 (1 => True, -- Component_List (Node1)
9689 2 => False, -- Enclosing_Variant (Node2-Sem)
9690 3 => False, -- Present_Expr (Uint3-Sem)
9691 4 => True, -- Discrete_Choices (List4)
9692 5 => False), -- Dcheck_Function (Node5-Sem)
9693
9694 N_Others_Choice =>
9695 (1 => False, -- Others_Discrete_Choices (List1-Sem)
9696 2 => False, -- unused
9697 3 => False, -- unused
9698 4 => False, -- unused
9699 5 => False), -- unused
9700
9701 N_Access_To_Object_Definition =>
9702 (1 => False, -- unused
9703 2 => False, -- unused
9704 3 => False, -- unused
9705 4 => False, -- unused
9706 5 => True), -- Subtype_Indication (Node5)
9707
9708 N_Access_Function_Definition =>
9709 (1 => False, -- unused
9710 2 => False, -- unused
9711 3 => True, -- Parameter_Specifications (List3)
9712 4 => True, -- Result_Definition (Node4)
9713 5 => False), -- unused
9714
9715 N_Access_Procedure_Definition =>
9716 (1 => False, -- unused
9717 2 => False, -- unused
9718 3 => True, -- Parameter_Specifications (List3)
9719 4 => False, -- unused
9720 5 => False), -- unused
9721
9722 N_Access_Definition =>
9723 (1 => False, -- unused
9724 2 => False, -- unused
9725 3 => True, -- Access_To_Subprogram_Definition (Node3)
9726 4 => True, -- Subtype_Mark (Node4)
9727 5 => False), -- unused
9728
9729 N_Incomplete_Type_Declaration =>
9730 (1 => True, -- Defining_Identifier (Node1)
9731 2 => False, -- unused
9732 3 => False, -- unused
9733 4 => True, -- Discriminant_Specifications (List4)
9734 5 => False), -- unused
9735
9736 N_Explicit_Dereference =>
9737 (1 => False, -- unused
9738 2 => False, -- unused
9739 3 => True, -- Prefix (Node3)
9740 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
9741 5 => False), -- Etype (Node5-Sem)
9742
9743 N_Indexed_Component =>
9744 (1 => True, -- Expressions (List1)
9745 2 => False, -- unused
9746 3 => True, -- Prefix (Node3)
9747 4 => False, -- unused
9748 5 => False), -- Etype (Node5-Sem)
9749
9750 N_Slice =>
9751 (1 => False, -- unused
9752 2 => False, -- unused
9753 3 => True, -- Prefix (Node3)
9754 4 => True, -- Discrete_Range (Node4)
9755 5 => False), -- Etype (Node5-Sem)
9756
9757 N_Selected_Component =>
9758 (1 => False, -- unused
9759 2 => True, -- Selector_Name (Node2)
9760 3 => True, -- Prefix (Node3)
9761 4 => False, -- unused
9762 5 => False), -- Etype (Node5-Sem)
9763
9764 N_Attribute_Reference =>
9765 (1 => True, -- Expressions (List1)
9766 2 => True, -- Attribute_Name (Name2)
9767 3 => True, -- Prefix (Node3)
9768 4 => False, -- Entity (Node4-Sem)
9769 5 => False), -- Etype (Node5-Sem)
9770
9771 N_Aggregate =>
9772 (1 => True, -- Expressions (List1)
9773 2 => True, -- Component_Associations (List2)
9774 3 => False, -- Aggregate_Bounds (Node3-Sem)
9775 4 => False, -- unused
9776 5 => False), -- Etype (Node5-Sem)
9777
9778 N_Component_Association =>
9779 (1 => True, -- Choices (List1)
9780 2 => False, -- Loop_Actions (List2-Sem)
9781 3 => True, -- Expression (Node3)
9782 4 => False, -- unused
9783 5 => False), -- unused
9784
9785 N_Extension_Aggregate =>
9786 (1 => True, -- Expressions (List1)
9787 2 => True, -- Component_Associations (List2)
9788 3 => True, -- Ancestor_Part (Node3)
9789 4 => False, -- unused
9790 5 => False), -- Etype (Node5-Sem)
9791
9792 N_Null =>
9793 (1 => False, -- unused
9794 2 => False, -- unused
9795 3 => False, -- unused
9796 4 => False, -- unused
9797 5 => False), -- Etype (Node5-Sem)
9798
9799 N_And_Then =>
9800 (1 => False, -- Actions (List1-Sem)
9801 2 => True, -- Left_Opnd (Node2)
9802 3 => True, -- Right_Opnd (Node3)
9803 4 => False, -- unused
9804 5 => False), -- Etype (Node5-Sem)
9805
9806 N_Or_Else =>
9807 (1 => False, -- Actions (List1-Sem)
9808 2 => True, -- Left_Opnd (Node2)
9809 3 => True, -- Right_Opnd (Node3)
9810 4 => False, -- unused
9811 5 => False), -- Etype (Node5-Sem)
9812
9813 N_In =>
9814 (1 => False, -- unused
9815 2 => True, -- Left_Opnd (Node2)
9816 3 => True, -- Right_Opnd (Node3)
9817 4 => True, -- Alternatives (List4)
9818 5 => False), -- Etype (Node5-Sem)
9819
9820 N_Not_In =>
9821 (1 => False, -- unused
9822 2 => True, -- Left_Opnd (Node2)
9823 3 => True, -- Right_Opnd (Node3)
9824 4 => True, -- Alternatives (List4)
9825 5 => False), -- Etype (Node5-Sem)
9826
9827 N_Op_And =>
9828 (1 => True, -- Chars (Name1)
9829 2 => True, -- Left_Opnd (Node2)
9830 3 => True, -- Right_Opnd (Node3)
9831 4 => False, -- Entity (Node4-Sem)
9832 5 => False), -- Etype (Node5-Sem)
9833
9834 N_Op_Or =>
9835 (1 => True, -- Chars (Name1)
9836 2 => True, -- Left_Opnd (Node2)
9837 3 => True, -- Right_Opnd (Node3)
9838 4 => False, -- Entity (Node4-Sem)
9839 5 => False), -- Etype (Node5-Sem)
9840
9841 N_Op_Xor =>
9842 (1 => True, -- Chars (Name1)
9843 2 => True, -- Left_Opnd (Node2)
9844 3 => True, -- Right_Opnd (Node3)
9845 4 => False, -- Entity (Node4-Sem)
9846 5 => False), -- Etype (Node5-Sem)
9847
9848 N_Op_Eq =>
9849 (1 => True, -- Chars (Name1)
9850 2 => True, -- Left_Opnd (Node2)
9851 3 => True, -- Right_Opnd (Node3)
9852 4 => False, -- Entity (Node4-Sem)
9853 5 => False), -- Etype (Node5-Sem)
9854
9855 N_Op_Ne =>
9856 (1 => True, -- Chars (Name1)
9857 2 => True, -- Left_Opnd (Node2)
9858 3 => True, -- Right_Opnd (Node3)
9859 4 => False, -- Entity (Node4-Sem)
9860 5 => False), -- Etype (Node5-Sem)
9861
9862 N_Op_Lt =>
9863 (1 => True, -- Chars (Name1)
9864 2 => True, -- Left_Opnd (Node2)
9865 3 => True, -- Right_Opnd (Node3)
9866 4 => False, -- Entity (Node4-Sem)
9867 5 => False), -- Etype (Node5-Sem)
9868
9869 N_Op_Le =>
9870 (1 => True, -- Chars (Name1)
9871 2 => True, -- Left_Opnd (Node2)
9872 3 => True, -- Right_Opnd (Node3)
9873 4 => False, -- Entity (Node4-Sem)
9874 5 => False), -- Etype (Node5-Sem)
9875
9876 N_Op_Gt =>
9877 (1 => True, -- Chars (Name1)
9878 2 => True, -- Left_Opnd (Node2)
9879 3 => True, -- Right_Opnd (Node3)
9880 4 => False, -- Entity (Node4-Sem)
9881 5 => False), -- Etype (Node5-Sem)
9882
9883 N_Op_Ge =>
9884 (1 => True, -- Chars (Name1)
9885 2 => True, -- Left_Opnd (Node2)
9886 3 => True, -- Right_Opnd (Node3)
9887 4 => False, -- Entity (Node4-Sem)
9888 5 => False), -- Etype (Node5-Sem)
9889
9890 N_Op_Add =>
9891 (1 => True, -- Chars (Name1)
9892 2 => True, -- Left_Opnd (Node2)
9893 3 => True, -- Right_Opnd (Node3)
9894 4 => False, -- Entity (Node4-Sem)
9895 5 => False), -- Etype (Node5-Sem)
9896
9897 N_Op_Subtract =>
9898 (1 => True, -- Chars (Name1)
9899 2 => True, -- Left_Opnd (Node2)
9900 3 => True, -- Right_Opnd (Node3)
9901 4 => False, -- Entity (Node4-Sem)
9902 5 => False), -- Etype (Node5-Sem)
9903
9904 N_Op_Concat =>
9905 (1 => True, -- Chars (Name1)
9906 2 => True, -- Left_Opnd (Node2)
9907 3 => True, -- Right_Opnd (Node3)
9908 4 => False, -- Entity (Node4-Sem)
9909 5 => False), -- Etype (Node5-Sem)
9910
9911 N_Op_Multiply =>
9912 (1 => True, -- Chars (Name1)
9913 2 => True, -- Left_Opnd (Node2)
9914 3 => True, -- Right_Opnd (Node3)
9915 4 => False, -- Entity (Node4-Sem)
9916 5 => False), -- Etype (Node5-Sem)
9917
9918 N_Op_Divide =>
9919 (1 => True, -- Chars (Name1)
9920 2 => True, -- Left_Opnd (Node2)
9921 3 => True, -- Right_Opnd (Node3)
9922 4 => False, -- Entity (Node4-Sem)
9923 5 => False), -- Etype (Node5-Sem)
9924
9925 N_Op_Mod =>
9926 (1 => True, -- Chars (Name1)
9927 2 => True, -- Left_Opnd (Node2)
9928 3 => True, -- Right_Opnd (Node3)
9929 4 => False, -- Entity (Node4-Sem)
9930 5 => False), -- Etype (Node5-Sem)
9931
9932 N_Op_Rem =>
9933 (1 => True, -- Chars (Name1)
9934 2 => True, -- Left_Opnd (Node2)
9935 3 => True, -- Right_Opnd (Node3)
9936 4 => False, -- Entity (Node4-Sem)
9937 5 => False), -- Etype (Node5-Sem)
9938
9939 N_Op_Expon =>
9940 (1 => True, -- Chars (Name1)
9941 2 => True, -- Left_Opnd (Node2)
9942 3 => True, -- Right_Opnd (Node3)
9943 4 => False, -- Entity (Node4-Sem)
9944 5 => False), -- Etype (Node5-Sem)
9945
9946 N_Op_Plus =>
9947 (1 => True, -- Chars (Name1)
9948 2 => False, -- unused
9949 3 => True, -- Right_Opnd (Node3)
9950 4 => False, -- Entity (Node4-Sem)
9951 5 => False), -- Etype (Node5-Sem)
9952
9953 N_Op_Minus =>
9954 (1 => True, -- Chars (Name1)
9955 2 => False, -- unused
9956 3 => True, -- Right_Opnd (Node3)
9957 4 => False, -- Entity (Node4-Sem)
9958 5 => False), -- Etype (Node5-Sem)
9959
9960 N_Op_Abs =>
9961 (1 => True, -- Chars (Name1)
9962 2 => False, -- unused
9963 3 => True, -- Right_Opnd (Node3)
9964 4 => False, -- Entity (Node4-Sem)
9965 5 => False), -- Etype (Node5-Sem)
9966
9967 N_Op_Not =>
9968 (1 => True, -- Chars (Name1)
9969 2 => False, -- unused
9970 3 => True, -- Right_Opnd (Node3)
9971 4 => False, -- Entity (Node4-Sem)
9972 5 => False), -- Etype (Node5-Sem)
9973
9974 N_Type_Conversion =>
9975 (1 => False, -- unused
9976 2 => False, -- unused
9977 3 => True, -- Expression (Node3)
9978 4 => True, -- Subtype_Mark (Node4)
9979 5 => False), -- Etype (Node5-Sem)
9980
9981 N_Qualified_Expression =>
9982 (1 => False, -- unused
9983 2 => False, -- unused
9984 3 => True, -- Expression (Node3)
9985 4 => True, -- Subtype_Mark (Node4)
9986 5 => False), -- Etype (Node5-Sem)
9987
9988 N_Allocator =>
9989 (1 => False, -- Storage_Pool (Node1-Sem)
9990 2 => False, -- Procedure_To_Call (Node2-Sem)
9991 3 => True, -- Expression (Node3)
9992 4 => False, -- Coextensions (Elist4-Sem)
9993 5 => False), -- Etype (Node5-Sem)
9994
9995 N_Null_Statement =>
9996 (1 => False, -- unused
9997 2 => False, -- unused
9998 3 => False, -- unused
9999 4 => False, -- unused
10000 5 => False), -- unused
10001
10002 N_Label =>
10003 (1 => True, -- Identifier (Node1)
10004 2 => False, -- unused
10005 3 => False, -- unused
10006 4 => False, -- unused
10007 5 => False), -- unused
10008
10009 N_Assignment_Statement =>
10010 (1 => False, -- unused
10011 2 => True, -- Name (Node2)
10012 3 => True, -- Expression (Node3)
10013 4 => False, -- unused
10014 5 => False), -- unused
10015
10016 N_If_Statement =>
10017 (1 => True, -- Condition (Node1)
10018 2 => True, -- Then_Statements (List2)
10019 3 => True, -- Elsif_Parts (List3)
10020 4 => True, -- Else_Statements (List4)
10021 5 => True), -- End_Span (Uint5)
10022
10023 N_Elsif_Part =>
10024 (1 => True, -- Condition (Node1)
10025 2 => True, -- Then_Statements (List2)
10026 3 => False, -- Condition_Actions (List3-Sem)
10027 4 => False, -- unused
10028 5 => False), -- unused
10029
10030 N_Case_Statement =>
10031 (1 => False, -- unused
10032 2 => False, -- unused
10033 3 => True, -- Expression (Node3)
10034 4 => True, -- Alternatives (List4)
10035 5 => True), -- End_Span (Uint5)
10036
10037 N_Case_Statement_Alternative =>
10038 (1 => False, -- unused
10039 2 => False, -- unused
10040 3 => True, -- Statements (List3)
10041 4 => True, -- Discrete_Choices (List4)
10042 5 => False), -- unused
10043
10044 N_Loop_Statement =>
10045 (1 => True, -- Identifier (Node1)
10046 2 => True, -- Iteration_Scheme (Node2)
10047 3 => True, -- Statements (List3)
10048 4 => True, -- End_Label (Node4)
10049 5 => False), -- unused
10050
10051 N_Iteration_Scheme =>
10052 (1 => True, -- Condition (Node1)
10053 2 => False, -- unused
10054 3 => False, -- Condition_Actions (List3-Sem)
10055 4 => True, -- Loop_Parameter_Specification (Node4)
10056 5 => False), -- unused
10057
10058 N_Loop_Parameter_Specification =>
10059 (1 => True, -- Defining_Identifier (Node1)
10060 2 => False, -- unused
10061 3 => False, -- unused
10062 4 => True, -- Discrete_Subtype_Definition (Node4)
10063 5 => False), -- unused
10064
10065 N_Block_Statement =>
10066 (1 => True, -- Identifier (Node1)
10067 2 => True, -- Declarations (List2)
10068 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10069 4 => True, -- Handled_Statement_Sequence (Node4)
10070 5 => False), -- unused
10071
10072 N_Exit_Statement =>
10073 (1 => True, -- Condition (Node1)
10074 2 => True, -- Name (Node2)
10075 3 => False, -- unused
10076 4 => False, -- unused
10077 5 => False), -- unused
10078
10079 N_Goto_Statement =>
10080 (1 => False, -- unused
10081 2 => True, -- Name (Node2)
10082 3 => False, -- unused
10083 4 => False, -- unused
10084 5 => False), -- unused
10085
10086 N_Subprogram_Declaration =>
10087 (1 => True, -- Specification (Node1)
10088 2 => False, -- unused
10089 3 => False, -- Body_To_Inline (Node3-Sem)
10090 4 => False, -- Parent_Spec (Node4-Sem)
10091 5 => False), -- Corresponding_Body (Node5-Sem)
10092
10093 N_Abstract_Subprogram_Declaration =>
10094 (1 => True, -- Specification (Node1)
10095 2 => False, -- unused
10096 3 => False, -- unused
10097 4 => False, -- unused
10098 5 => False), -- unused
10099
10100 N_Function_Specification =>
10101 (1 => True, -- Defining_Unit_Name (Node1)
10102 2 => False, -- Elaboration_Boolean (Node2-Sem)
10103 3 => True, -- Parameter_Specifications (List3)
10104 4 => True, -- Result_Definition (Node4)
10105 5 => False), -- Generic_Parent (Node5-Sem)
10106
10107 N_Procedure_Specification =>
10108 (1 => True, -- Defining_Unit_Name (Node1)
10109 2 => False, -- Elaboration_Boolean (Node2-Sem)
10110 3 => True, -- Parameter_Specifications (List3)
10111 4 => False, -- unused
10112 5 => False), -- Generic_Parent (Node5-Sem)
10113
10114 N_Designator =>
10115 (1 => True, -- Identifier (Node1)
10116 2 => True, -- Name (Node2)
10117 3 => False, -- unused
10118 4 => False, -- unused
10119 5 => False), -- unused
10120
10121 N_Defining_Program_Unit_Name =>
10122 (1 => True, -- Defining_Identifier (Node1)
10123 2 => True, -- Name (Node2)
10124 3 => False, -- unused
10125 4 => False, -- unused
10126 5 => False), -- unused
10127
10128 N_Operator_Symbol =>
10129 (1 => True, -- Chars (Name1)
10130 2 => False, -- unused
10131 3 => True, -- Strval (Str3)
10132 4 => False, -- Entity (Node4-Sem)
10133 5 => False), -- Etype (Node5-Sem)
10134
10135 N_Defining_Operator_Symbol =>
10136 (1 => True, -- Chars (Name1)
10137 2 => False, -- Next_Entity (Node2-Sem)
10138 3 => False, -- Scope (Node3-Sem)
10139 4 => False, -- unused
10140 5 => False), -- Etype (Node5-Sem)
10141
10142 N_Parameter_Specification =>
10143 (1 => True, -- Defining_Identifier (Node1)
10144 2 => True, -- Parameter_Type (Node2)
10145 3 => True, -- Expression (Node3)
10146 4 => False, -- unused
10147 5 => False), -- Default_Expression (Node5-Sem)
10148
10149 N_Subprogram_Body =>
10150 (1 => True, -- Specification (Node1)
10151 2 => True, -- Declarations (List2)
10152 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10153 4 => True, -- Handled_Statement_Sequence (Node4)
10154 5 => False), -- Corresponding_Spec (Node5-Sem)
10155
10156 N_Procedure_Call_Statement =>
10157 (1 => False, -- Controlling_Argument (Node1-Sem)
10158 2 => True, -- Name (Node2)
10159 3 => True, -- Parameter_Associations (List3)
10160 4 => False, -- First_Named_Actual (Node4-Sem)
10161 5 => False), -- Etype (Node5-Sem)
10162
10163 N_Function_Call =>
10164 (1 => False, -- Controlling_Argument (Node1-Sem)
10165 2 => True, -- Name (Node2)
10166 3 => True, -- Parameter_Associations (List3)
10167 4 => False, -- First_Named_Actual (Node4-Sem)
10168 5 => False), -- Etype (Node5-Sem)
10169
10170 N_Parameter_Association =>
10171 (1 => False, -- unused
10172 2 => True, -- Selector_Name (Node2)
10173 3 => True, -- Explicit_Actual_Parameter (Node3)
10174 4 => False, -- Next_Named_Actual (Node4-Sem)
10175 5 => False), -- unused
10176
10177 N_Return_Statement =>
10178 (1 => False, -- Storage_Pool (Node1-Sem)
10179 2 => False, -- Procedure_To_Call (Node2-Sem)
10180 3 => True, -- Expression (Node3)
10181 4 => False, -- unused
10182 5 => False), -- Return_Statement_Entity (Node5-Sem)
10183
10184 N_Extended_Return_Statement =>
10185 (1 => False, -- Storage_Pool (Node1-Sem)
10186 2 => False, -- Procedure_To_Call (Node2-Sem)
10187 3 => True, -- Return_Object_Declarations (List3)
10188 4 => True, -- Handled_Statement_Sequence (Node4)
10189 5 => False), -- Return_Statement_Entity (Node5-Sem)
10190
10191 N_Package_Declaration =>
10192 (1 => True, -- Specification (Node1)
10193 2 => False, -- unused
10194 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10195 4 => False, -- Parent_Spec (Node4-Sem)
10196 5 => False), -- Corresponding_Body (Node5-Sem)
10197
10198 N_Package_Specification =>
10199 (1 => True, -- Defining_Unit_Name (Node1)
10200 2 => True, -- Visible_Declarations (List2)
10201 3 => True, -- Private_Declarations (List3)
10202 4 => True, -- End_Label (Node4)
10203 5 => False), -- Generic_Parent (Node5-Sem)
10204
10205 N_Package_Body =>
10206 (1 => True, -- Defining_Unit_Name (Node1)
10207 2 => True, -- Declarations (List2)
10208 3 => False, -- unused
10209 4 => True, -- Handled_Statement_Sequence (Node4)
10210 5 => False), -- Corresponding_Spec (Node5-Sem)
10211
10212 N_Private_Type_Declaration =>
10213 (1 => True, -- Defining_Identifier (Node1)
10214 2 => False, -- unused
10215 3 => False, -- unused
10216 4 => True, -- Discriminant_Specifications (List4)
10217 5 => False), -- unused
10218
10219 N_Private_Extension_Declaration =>
10220 (1 => True, -- Defining_Identifier (Node1)
10221 2 => True, -- Interface_List (List2)
10222 3 => False, -- unused
10223 4 => True, -- Discriminant_Specifications (List4)
10224 5 => True), -- Subtype_Indication (Node5)
10225
10226 N_Use_Package_Clause =>
10227 (1 => False, -- unused
10228 2 => True, -- Names (List2)
10229 3 => False, -- Next_Use_Clause (Node3-Sem)
10230 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10231 5 => False), -- unused
10232
10233 N_Use_Type_Clause =>
10234 (1 => False, -- unused
10235 2 => True, -- Subtype_Marks (List2)
10236 3 => False, -- Next_Use_Clause (Node3-Sem)
10237 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10238 5 => False), -- unused
10239
10240 N_Object_Renaming_Declaration =>
10241 (1 => True, -- Defining_Identifier (Node1)
10242 2 => True, -- Name (Node2)
10243 3 => True, -- Access_Definition (Node3)
10244 4 => True, -- Subtype_Mark (Node4)
10245 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
10246
10247 N_Exception_Renaming_Declaration =>
10248 (1 => True, -- Defining_Identifier (Node1)
10249 2 => True, -- Name (Node2)
10250 3 => False, -- unused
10251 4 => False, -- unused
10252 5 => False), -- unused
10253
10254 N_Package_Renaming_Declaration =>
10255 (1 => True, -- Defining_Unit_Name (Node1)
10256 2 => True, -- Name (Node2)
10257 3 => False, -- unused
10258 4 => False, -- Parent_Spec (Node4-Sem)
10259 5 => False), -- unused
10260
10261 N_Subprogram_Renaming_Declaration =>
10262 (1 => True, -- Specification (Node1)
10263 2 => True, -- Name (Node2)
10264 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
10265 4 => False, -- Parent_Spec (Node4-Sem)
10266 5 => False), -- Corresponding_Spec (Node5-Sem)
10267
10268 N_Generic_Package_Renaming_Declaration =>
10269 (1 => True, -- Defining_Unit_Name (Node1)
10270 2 => True, -- Name (Node2)
10271 3 => False, -- unused
10272 4 => False, -- Parent_Spec (Node4-Sem)
10273 5 => False), -- unused
10274
10275 N_Generic_Procedure_Renaming_Declaration =>
10276 (1 => True, -- Defining_Unit_Name (Node1)
10277 2 => True, -- Name (Node2)
10278 3 => False, -- unused
10279 4 => False, -- Parent_Spec (Node4-Sem)
10280 5 => False), -- unused
10281
10282 N_Generic_Function_Renaming_Declaration =>
10283 (1 => True, -- Defining_Unit_Name (Node1)
10284 2 => True, -- Name (Node2)
10285 3 => False, -- unused
10286 4 => False, -- Parent_Spec (Node4-Sem)
10287 5 => False), -- unused
10288
10289 N_Task_Type_Declaration =>
10290 (1 => True, -- Defining_Identifier (Node1)
10291 2 => True, -- Interface_List (List2)
10292 3 => True, -- Task_Definition (Node3)
10293 4 => True, -- Discriminant_Specifications (List4)
10294 5 => False), -- Corresponding_Body (Node5-Sem)
10295
10296 N_Single_Task_Declaration =>
10297 (1 => True, -- Defining_Identifier (Node1)
10298 2 => True, -- Interface_List (List2)
10299 3 => True, -- Task_Definition (Node3)
10300 4 => False, -- unused
10301 5 => False), -- unused
10302
10303 N_Task_Definition =>
10304 (1 => False, -- unused
10305 2 => True, -- Visible_Declarations (List2)
10306 3 => True, -- Private_Declarations (List3)
10307 4 => True, -- End_Label (Node4)
10308 5 => False), -- unused
10309
10310 N_Task_Body =>
10311 (1 => True, -- Defining_Identifier (Node1)
10312 2 => True, -- Declarations (List2)
10313 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10314 4 => True, -- Handled_Statement_Sequence (Node4)
10315 5 => False), -- Corresponding_Spec (Node5-Sem)
10316
10317 N_Protected_Type_Declaration =>
10318 (1 => True, -- Defining_Identifier (Node1)
10319 2 => True, -- Interface_List (List2)
10320 3 => True, -- Protected_Definition (Node3)
10321 4 => True, -- Discriminant_Specifications (List4)
10322 5 => False), -- Corresponding_Body (Node5-Sem)
10323
10324 N_Single_Protected_Declaration =>
10325 (1 => True, -- Defining_Identifier (Node1)
10326 2 => True, -- Interface_List (List2)
10327 3 => True, -- Protected_Definition (Node3)
10328 4 => False, -- unused
10329 5 => False), -- unused
10330
10331 N_Protected_Definition =>
10332 (1 => False, -- unused
10333 2 => True, -- Visible_Declarations (List2)
10334 3 => True, -- Private_Declarations (List3)
10335 4 => True, -- End_Label (Node4)
10336 5 => False), -- unused
10337
10338 N_Protected_Body =>
10339 (1 => True, -- Defining_Identifier (Node1)
10340 2 => True, -- Declarations (List2)
10341 3 => False, -- unused
10342 4 => True, -- End_Label (Node4)
10343 5 => False), -- Corresponding_Spec (Node5-Sem)
10344
10345 N_Entry_Declaration =>
10346 (1 => True, -- Defining_Identifier (Node1)
10347 2 => False, -- unused
10348 3 => True, -- Parameter_Specifications (List3)
10349 4 => True, -- Discrete_Subtype_Definition (Node4)
10350 5 => False), -- Corresponding_Body (Node5-Sem)
10351
10352 N_Accept_Statement =>
10353 (1 => True, -- Entry_Direct_Name (Node1)
10354 2 => True, -- Declarations (List2)
10355 3 => True, -- Parameter_Specifications (List3)
10356 4 => True, -- Handled_Statement_Sequence (Node4)
10357 5 => True), -- Entry_Index (Node5)
10358
10359 N_Entry_Body =>
10360 (1 => True, -- Defining_Identifier (Node1)
10361 2 => True, -- Declarations (List2)
10362 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10363 4 => True, -- Handled_Statement_Sequence (Node4)
10364 5 => True), -- Entry_Body_Formal_Part (Node5)
10365
10366 N_Entry_Body_Formal_Part =>
10367 (1 => True, -- Condition (Node1)
10368 2 => False, -- unused
10369 3 => True, -- Parameter_Specifications (List3)
10370 4 => True, -- Entry_Index_Specification (Node4)
10371 5 => False), -- unused
10372
10373 N_Entry_Index_Specification =>
10374 (1 => True, -- Defining_Identifier (Node1)
10375 2 => False, -- unused
10376 3 => False, -- unused
10377 4 => True, -- Discrete_Subtype_Definition (Node4)
10378 5 => False), -- unused
10379
10380 N_Entry_Call_Statement =>
10381 (1 => False, -- unused
10382 2 => True, -- Name (Node2)
10383 3 => True, -- Parameter_Associations (List3)
10384 4 => False, -- First_Named_Actual (Node4-Sem)
10385 5 => False), -- unused
10386
10387 N_Requeue_Statement =>
10388 (1 => False, -- unused
10389 2 => True, -- Name (Node2)
10390 3 => False, -- unused
10391 4 => False, -- unused
10392 5 => False), -- unused
10393
10394 N_Delay_Until_Statement =>
10395 (1 => False, -- unused
10396 2 => False, -- unused
10397 3 => True, -- Expression (Node3)
10398 4 => False, -- unused
10399 5 => False), -- unused
10400
10401 N_Delay_Relative_Statement =>
10402 (1 => False, -- unused
10403 2 => False, -- unused
10404 3 => True, -- Expression (Node3)
10405 4 => False, -- unused
10406 5 => False), -- unused
10407
10408 N_Selective_Accept =>
10409 (1 => True, -- Select_Alternatives (List1)
10410 2 => False, -- unused
10411 3 => False, -- unused
10412 4 => True, -- Else_Statements (List4)
10413 5 => False), -- unused
10414
10415 N_Accept_Alternative =>
10416 (1 => True, -- Condition (Node1)
10417 2 => True, -- Accept_Statement (Node2)
10418 3 => True, -- Statements (List3)
10419 4 => True, -- Pragmas_Before (List4)
10420 5 => False), -- Accept_Handler_Records (List5-Sem)
10421
10422 N_Delay_Alternative =>
10423 (1 => True, -- Condition (Node1)
10424 2 => True, -- Delay_Statement (Node2)
10425 3 => True, -- Statements (List3)
10426 4 => True, -- Pragmas_Before (List4)
10427 5 => False), -- unused
10428
10429 N_Terminate_Alternative =>
10430 (1 => True, -- Condition (Node1)
10431 2 => False, -- unused
10432 3 => False, -- unused
10433 4 => True, -- Pragmas_Before (List4)
10434 5 => True), -- Pragmas_After (List5)
10435
10436 N_Timed_Entry_Call =>
10437 (1 => True, -- Entry_Call_Alternative (Node1)
10438 2 => False, -- unused
10439 3 => False, -- unused
10440 4 => True, -- Delay_Alternative (Node4)
10441 5 => False), -- unused
10442
10443 N_Entry_Call_Alternative =>
10444 (1 => True, -- Entry_Call_Statement (Node1)
10445 2 => False, -- unused
10446 3 => True, -- Statements (List3)
10447 4 => True, -- Pragmas_Before (List4)
10448 5 => False), -- unused
10449
10450 N_Conditional_Entry_Call =>
10451 (1 => True, -- Entry_Call_Alternative (Node1)
10452 2 => False, -- unused
10453 3 => False, -- unused
10454 4 => True, -- Else_Statements (List4)
10455 5 => False), -- unused
10456
10457 N_Asynchronous_Select =>
10458 (1 => True, -- Triggering_Alternative (Node1)
10459 2 => True, -- Abortable_Part (Node2)
10460 3 => False, -- unused
10461 4 => False, -- unused
10462 5 => False), -- unused
10463
10464 N_Triggering_Alternative =>
10465 (1 => True, -- Triggering_Statement (Node1)
10466 2 => False, -- unused
10467 3 => True, -- Statements (List3)
10468 4 => True, -- Pragmas_Before (List4)
10469 5 => False), -- unused
10470
10471 N_Abortable_Part =>
10472 (1 => False, -- unused
10473 2 => False, -- unused
10474 3 => True, -- Statements (List3)
10475 4 => False, -- unused
10476 5 => False), -- unused
10477
10478 N_Abort_Statement =>
10479 (1 => False, -- unused
10480 2 => True, -- Names (List2)
10481 3 => False, -- unused
10482 4 => False, -- unused
10483 5 => False), -- unused
10484
10485 N_Compilation_Unit =>
10486 (1 => True, -- Context_Items (List1)
10487 2 => True, -- Unit (Node2)
10488 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
10489 4 => False, -- Library_Unit (Node4-Sem)
10490 5 => True), -- Aux_Decls_Node (Node5)
10491
10492 N_Compilation_Unit_Aux =>
10493 (1 => True, -- Actions (List1)
10494 2 => True, -- Declarations (List2)
10495 3 => False, -- unused
10496 4 => True, -- Config_Pragmas (List4)
10497 5 => True), -- Pragmas_After (List5)
10498
10499 N_With_Clause =>
10500 (1 => False, -- unused
10501 2 => True, -- Name (Node2)
10502 3 => False, -- unused
10503 4 => False, -- Library_Unit (Node4-Sem)
10504 5 => False), -- Corresponding_Spec (Node5-Sem)
10505
10506 N_Subprogram_Body_Stub =>
10507 (1 => True, -- Specification (Node1)
10508 2 => False, -- unused
10509 3 => False, -- unused
10510 4 => False, -- Library_Unit (Node4-Sem)
10511 5 => False), -- Corresponding_Body (Node5-Sem)
10512
10513 N_Package_Body_Stub =>
10514 (1 => True, -- Defining_Identifier (Node1)
10515 2 => False, -- unused
10516 3 => False, -- unused
10517 4 => False, -- Library_Unit (Node4-Sem)
10518 5 => False), -- Corresponding_Body (Node5-Sem)
10519
10520 N_Task_Body_Stub =>
10521 (1 => True, -- Defining_Identifier (Node1)
10522 2 => False, -- unused
10523 3 => False, -- unused
10524 4 => False, -- Library_Unit (Node4-Sem)
10525 5 => False), -- Corresponding_Body (Node5-Sem)
10526
10527 N_Protected_Body_Stub =>
10528 (1 => True, -- Defining_Identifier (Node1)
10529 2 => False, -- unused
10530 3 => False, -- unused
10531 4 => False, -- Library_Unit (Node4-Sem)
10532 5 => False), -- Corresponding_Body (Node5-Sem)
10533
10534 N_Subunit =>
10535 (1 => True, -- Proper_Body (Node1)
10536 2 => True, -- Name (Node2)
10537 3 => False, -- Corresponding_Stub (Node3-Sem)
10538 4 => False, -- unused
10539 5 => False), -- unused
10540
10541 N_Exception_Declaration =>
10542 (1 => True, -- Defining_Identifier (Node1)
10543 2 => False, -- unused
10544 3 => False, -- Expression (Node3-Sem)
10545 4 => False, -- unused
10546 5 => False), -- unused
10547
10548 N_Handled_Sequence_Of_Statements =>
10549 (1 => True, -- At_End_Proc (Node1)
10550 2 => False, -- First_Real_Statement (Node2-Sem)
10551 3 => True, -- Statements (List3)
10552 4 => True, -- End_Label (Node4)
10553 5 => True), -- Exception_Handlers (List5)
10554
10555 N_Exception_Handler =>
10556 (1 => False, -- Local_Raise_Statements (Elist1)
10557 2 => True, -- Choice_Parameter (Node2)
10558 3 => True, -- Statements (List3)
10559 4 => True, -- Exception_Choices (List4)
10560 5 => False), -- Exception_Label (Node5)
10561
10562 N_Raise_Statement =>
10563 (1 => False, -- unused
10564 2 => True, -- Name (Node2)
10565 3 => True, -- Expression (Node3)
10566 4 => False, -- unused
10567 5 => False), -- unused
10568
10569 N_Generic_Subprogram_Declaration =>
10570 (1 => True, -- Specification (Node1)
10571 2 => True, -- Generic_Formal_Declarations (List2)
10572 3 => False, -- unused
10573 4 => False, -- Parent_Spec (Node4-Sem)
10574 5 => False), -- Corresponding_Body (Node5-Sem)
10575
10576 N_Generic_Package_Declaration =>
10577 (1 => True, -- Specification (Node1)
10578 2 => True, -- Generic_Formal_Declarations (List2)
10579 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10580 4 => False, -- Parent_Spec (Node4-Sem)
10581 5 => False), -- Corresponding_Body (Node5-Sem)
10582
10583 N_Package_Instantiation =>
10584 (1 => True, -- Defining_Unit_Name (Node1)
10585 2 => True, -- Name (Node2)
10586 3 => True, -- Generic_Associations (List3)
10587 4 => False, -- Parent_Spec (Node4-Sem)
10588 5 => False), -- Instance_Spec (Node5-Sem)
10589
10590 N_Procedure_Instantiation =>
10591 (1 => True, -- Defining_Unit_Name (Node1)
10592 2 => True, -- Name (Node2)
10593 3 => True, -- Generic_Associations (List3)
10594 4 => False, -- Parent_Spec (Node4-Sem)
10595 5 => False), -- Instance_Spec (Node5-Sem)
10596
10597 N_Function_Instantiation =>
10598 (1 => True, -- Defining_Unit_Name (Node1)
10599 2 => True, -- Name (Node2)
10600 3 => True, -- Generic_Associations (List3)
10601 4 => False, -- Parent_Spec (Node4-Sem)
10602 5 => False), -- Instance_Spec (Node5-Sem)
10603
10604 N_Generic_Association =>
10605 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
10606 2 => True, -- Selector_Name (Node2)
10607 3 => False, -- unused
10608 4 => False, -- unused
10609 5 => False), -- unused
10610
10611 N_Formal_Object_Declaration =>
10612 (1 => True, -- Defining_Identifier (Node1)
10613 2 => False, -- unused
10614 3 => True, -- Access_Definition (Node3)
10615 4 => True, -- Subtype_Mark (Node4)
10616 5 => True), -- Default_Expression (Node5)
10617
10618 N_Formal_Type_Declaration =>
10619 (1 => True, -- Defining_Identifier (Node1)
10620 2 => False, -- unused
10621 3 => True, -- Formal_Type_Definition (Node3)
10622 4 => True, -- Discriminant_Specifications (List4)
10623 5 => False), -- unused
10624
10625 N_Formal_Private_Type_Definition =>
10626 (1 => False, -- unused
10627 2 => False, -- unused
10628 3 => False, -- unused
10629 4 => False, -- unused
10630 5 => False), -- unused
10631
10632 N_Formal_Derived_Type_Definition =>
10633 (1 => False, -- unused
10634 2 => True, -- Interface_List (List2)
10635 3 => False, -- unused
10636 4 => True, -- Subtype_Mark (Node4)
10637 5 => False), -- unused
10638
10639 N_Formal_Discrete_Type_Definition =>
10640 (1 => False, -- unused
10641 2 => False, -- unused
10642 3 => False, -- unused
10643 4 => False, -- unused
10644 5 => False), -- unused
10645
10646 N_Formal_Signed_Integer_Type_Definition =>
10647 (1 => False, -- unused
10648 2 => False, -- unused
10649 3 => False, -- unused
10650 4 => False, -- unused
10651 5 => False), -- unused
10652
10653 N_Formal_Modular_Type_Definition =>
10654 (1 => False, -- unused
10655 2 => False, -- unused
10656 3 => False, -- unused
10657 4 => False, -- unused
10658 5 => False), -- unused
10659
10660 N_Formal_Floating_Point_Definition =>
10661 (1 => False, -- unused
10662 2 => False, -- unused
10663 3 => False, -- unused
10664 4 => False, -- unused
10665 5 => False), -- unused
10666
10667 N_Formal_Ordinary_Fixed_Point_Definition =>
10668 (1 => False, -- unused
10669 2 => False, -- unused
10670 3 => False, -- unused
10671 4 => False, -- unused
10672 5 => False), -- unused
10673
10674 N_Formal_Decimal_Fixed_Point_Definition =>
10675 (1 => False, -- unused
10676 2 => False, -- unused
10677 3 => False, -- unused
10678 4 => False, -- unused
10679 5 => False), -- unused
10680
10681 N_Formal_Concrete_Subprogram_Declaration =>
10682 (1 => True, -- Specification (Node1)
10683 2 => True, -- Default_Name (Node2)
10684 3 => False, -- unused
10685 4 => False, -- unused
10686 5 => False), -- unused
10687
10688 N_Formal_Abstract_Subprogram_Declaration =>
10689 (1 => True, -- Specification (Node1)
10690 2 => True, -- Default_Name (Node2)
10691 3 => False, -- unused
10692 4 => False, -- unused
10693 5 => False), -- unused
10694
10695 N_Formal_Package_Declaration =>
10696 (1 => True, -- Defining_Identifier (Node1)
10697 2 => True, -- Name (Node2)
10698 3 => True, -- Generic_Associations (List3)
10699 4 => False, -- unused
10700 5 => False), -- Instance_Spec (Node5-Sem)
10701
10702 N_Attribute_Definition_Clause =>
10703 (1 => True, -- Chars (Name1)
10704 2 => True, -- Name (Node2)
10705 3 => True, -- Expression (Node3)
10706 4 => False, -- unused
10707 5 => False), -- Next_Rep_Item (Node5-Sem)
10708
10709 N_Enumeration_Representation_Clause =>
10710 (1 => True, -- Identifier (Node1)
10711 2 => False, -- unused
10712 3 => True, -- Array_Aggregate (Node3)
10713 4 => False, -- unused
10714 5 => False), -- Next_Rep_Item (Node5-Sem)
10715
10716 N_Record_Representation_Clause =>
10717 (1 => True, -- Identifier (Node1)
10718 2 => True, -- Mod_Clause (Node2)
10719 3 => True, -- Component_Clauses (List3)
10720 4 => False, -- unused
10721 5 => False), -- Next_Rep_Item (Node5-Sem)
10722
10723 N_Component_Clause =>
10724 (1 => True, -- Component_Name (Node1)
10725 2 => True, -- Position (Node2)
10726 3 => True, -- First_Bit (Node3)
10727 4 => True, -- Last_Bit (Node4)
10728 5 => False), -- unused
10729
10730 N_Code_Statement =>
10731 (1 => False, -- unused
10732 2 => False, -- unused
10733 3 => True, -- Expression (Node3)
10734 4 => False, -- unused
10735 5 => False), -- unused
10736
10737 N_Op_Rotate_Left =>
10738 (1 => True, -- Chars (Name1)
10739 2 => True, -- Left_Opnd (Node2)
10740 3 => True, -- Right_Opnd (Node3)
10741 4 => False, -- Entity (Node4-Sem)
10742 5 => False), -- Etype (Node5-Sem)
10743
10744 N_Op_Rotate_Right =>
10745 (1 => True, -- Chars (Name1)
10746 2 => True, -- Left_Opnd (Node2)
10747 3 => True, -- Right_Opnd (Node3)
10748 4 => False, -- Entity (Node4-Sem)
10749 5 => False), -- Etype (Node5-Sem)
10750
10751 N_Op_Shift_Left =>
10752 (1 => True, -- Chars (Name1)
10753 2 => True, -- Left_Opnd (Node2)
10754 3 => True, -- Right_Opnd (Node3)
10755 4 => False, -- Entity (Node4-Sem)
10756 5 => False), -- Etype (Node5-Sem)
10757
10758 N_Op_Shift_Right_Arithmetic =>
10759 (1 => True, -- Chars (Name1)
10760 2 => True, -- Left_Opnd (Node2)
10761 3 => True, -- Right_Opnd (Node3)
10762 4 => False, -- Entity (Node4-Sem)
10763 5 => False), -- Etype (Node5-Sem)
10764
10765 N_Op_Shift_Right =>
10766 (1 => True, -- Chars (Name1)
10767 2 => True, -- Left_Opnd (Node2)
10768 3 => True, -- Right_Opnd (Node3)
10769 4 => False, -- Entity (Node4-Sem)
10770 5 => False), -- Etype (Node5-Sem)
10771
10772 N_Delta_Constraint =>
10773 (1 => False, -- unused
10774 2 => False, -- unused
10775 3 => True, -- Delta_Expression (Node3)
10776 4 => True, -- Range_Constraint (Node4)
10777 5 => False), -- unused
10778
10779 N_At_Clause =>
10780 (1 => True, -- Identifier (Node1)
10781 2 => False, -- unused
10782 3 => True, -- Expression (Node3)
10783 4 => False, -- unused
10784 5 => False), -- unused
10785
10786 N_Mod_Clause =>
10787 (1 => False, -- unused
10788 2 => False, -- unused
10789 3 => True, -- Expression (Node3)
10790 4 => True, -- Pragmas_Before (List4)
10791 5 => False), -- unused
10792
10793 N_Conditional_Expression =>
10794 (1 => True, -- Expressions (List1)
10795 2 => False, -- Then_Actions (List2-Sem)
10796 3 => False, -- Else_Actions (List3-Sem)
10797 4 => False, -- unused
10798 5 => False), -- Etype (Node5-Sem)
10799
10800 N_Expanded_Name =>
10801 (1 => True, -- Chars (Name1)
10802 2 => True, -- Selector_Name (Node2)
10803 3 => True, -- Prefix (Node3)
10804 4 => False, -- Entity (Node4-Sem)
10805 5 => False), -- Etype (Node5-Sem)
10806
10807 N_Free_Statement =>
10808 (1 => False, -- Storage_Pool (Node1-Sem)
10809 2 => False, -- Procedure_To_Call (Node2-Sem)
10810 3 => True, -- Expression (Node3)
10811 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
10812 5 => False), -- unused
10813
10814 N_Freeze_Entity =>
10815 (1 => True, -- Actions (List1)
10816 2 => False, -- Access_Types_To_Process (Elist2-Sem)
10817 3 => False, -- TSS_Elist (Elist3-Sem)
10818 4 => False, -- Entity (Node4-Sem)
10819 5 => False), -- First_Subtype_Link (Node5-Sem)
10820
10821 N_Implicit_Label_Declaration =>
10822 (1 => True, -- Defining_Identifier (Node1)
10823 2 => False, -- Label_Construct (Node2-Sem)
10824 3 => False, -- unused
10825 4 => False, -- unused
10826 5 => False), -- unused
10827
10828 N_Itype_Reference =>
10829 (1 => False, -- Itype (Node1-Sem)
10830 2 => False, -- unused
10831 3 => False, -- unused
10832 4 => False, -- unused
10833 5 => False), -- unused
10834
10835 N_Raise_Constraint_Error =>
10836 (1 => True, -- Condition (Node1)
10837 2 => False, -- unused
10838 3 => True, -- Reason (Uint3)
10839 4 => False, -- unused
10840 5 => False), -- Etype (Node5-Sem)
10841
10842 N_Raise_Program_Error =>
10843 (1 => True, -- Condition (Node1)
10844 2 => False, -- unused
10845 3 => True, -- Reason (Uint3)
10846 4 => False, -- unused
10847 5 => False), -- Etype (Node5-Sem)
10848
10849 N_Raise_Storage_Error =>
10850 (1 => True, -- Condition (Node1)
10851 2 => False, -- unused
10852 3 => True, -- Reason (Uint3)
10853 4 => False, -- unused
10854 5 => False), -- Etype (Node5-Sem)
10855
10856 N_Push_Constraint_Error_Label =>
10857 (1 => False, -- unused
10858 2 => False, -- unused
10859 3 => False, -- unused
10860 4 => False, -- unused
10861 5 => False), -- unused
10862
10863 N_Push_Program_Error_Label =>
10864 (1 => False, -- Exception_Label
10865 2 => False, -- unused
10866 3 => False, -- unused
10867 4 => False, -- unused
10868 5 => False), -- Exception_Label
10869
10870 N_Push_Storage_Error_Label =>
10871 (1 => False, -- Exception_Label
10872 2 => False, -- unused
10873 3 => False, -- unused
10874 4 => False, -- unused
10875 5 => False), -- Exception_Label
10876
10877 N_Pop_Constraint_Error_Label =>
10878 (1 => False, -- unused
10879 2 => False, -- unused
10880 3 => False, -- unused
10881 4 => False, -- unused
10882 5 => False), -- unused
10883
10884 N_Pop_Program_Error_Label =>
10885 (1 => False, -- unused
10886 2 => False, -- unused
10887 3 => False, -- unused
10888 4 => False, -- unused
10889 5 => False), -- unused
10890
10891 N_Pop_Storage_Error_Label =>
10892 (1 => False, -- unused
10893 2 => False, -- unused
10894 3 => False, -- unused
10895 4 => False, -- unused
10896 5 => False), -- unused
10897
10898 N_Reference =>
10899 (1 => False, -- unused
10900 2 => False, -- unused
10901 3 => True, -- Prefix (Node3)
10902 4 => False, -- unused
10903 5 => False), -- Etype (Node5-Sem)
10904
10905 N_Subprogram_Info =>
10906 (1 => True, -- Identifier (Node1)
10907 2 => False, -- unused
10908 3 => False, -- unused
10909 4 => False, -- unused
10910 5 => False), -- Etype (Node5-Sem)
10911
10912 N_Unchecked_Expression =>
10913 (1 => False, -- unused
10914 2 => False, -- unused
10915 3 => True, -- Expression (Node3)
10916 4 => False, -- unused
10917 5 => False), -- Etype (Node5-Sem)
10918
10919 N_Unchecked_Type_Conversion =>
10920 (1 => False, -- unused
10921 2 => False, -- unused
10922 3 => True, -- Expression (Node3)
10923 4 => True, -- Subtype_Mark (Node4)
10924 5 => False), -- Etype (Node5-Sem)
10925
10926 N_Validate_Unchecked_Conversion =>
10927 (1 => False, -- Source_Type (Node1-Sem)
10928 2 => False, -- Target_Type (Node2-Sem)
10929 3 => False, -- unused
10930 4 => False, -- unused
10931 5 => False), -- unused
10932
10933 -- End of inserted output from makeisf program
10934
10935 -- Entries for Empty, Error and Unused. Even thought these have a Chars
10936 -- field for debugging purposes, they are not really syntactic fields, so
10937 -- we mark all fields as unused.
10938
10939 N_Empty =>
10940 (1 => False, -- unused
10941 2 => False, -- unused
10942 3 => False, -- unused
10943 4 => False, -- unused
10944 5 => False), -- unused
10945
10946 N_Error =>
10947 (1 => False, -- unused
10948 2 => False, -- unused
10949 3 => False, -- unused
10950 4 => False, -- unused
10951 5 => False), -- unused
10952
10953 N_Unused_At_Start =>
10954 (1 => False, -- unused
10955 2 => False, -- unused
10956 3 => False, -- unused
10957 4 => False, -- unused
10958 5 => False), -- unused
10959
10960 N_Unused_At_End =>
10961 (1 => False, -- unused
10962 2 => False, -- unused
10963 3 => False, -- unused
10964 4 => False, -- unused
10965 5 => False)); -- unused
10966
10967 --------------------
10968 -- Inline Pragmas --
10969 --------------------
10970
10971 pragma Inline (ABE_Is_Certain);
10972 pragma Inline (Abort_Present);
10973 pragma Inline (Abortable_Part);
10974 pragma Inline (Abstract_Present);
10975 pragma Inline (Accept_Handler_Records);
10976 pragma Inline (Accept_Statement);
10977 pragma Inline (Access_Definition);
10978 pragma Inline (Access_To_Subprogram_Definition);
10979 pragma Inline (Access_Types_To_Process);
10980 pragma Inline (Actions);
10981 pragma Inline (Activation_Chain_Entity);
10982 pragma Inline (Acts_As_Spec);
10983 pragma Inline (Actual_Designated_Subtype);
10984 pragma Inline (Address_Warning_Posted);
10985 pragma Inline (Aggregate_Bounds);
10986 pragma Inline (Aliased_Present);
10987 pragma Inline (All_Others);
10988 pragma Inline (All_Present);
10989 pragma Inline (Alternatives);
10990 pragma Inline (Ancestor_Part);
10991 pragma Inline (Array_Aggregate);
10992 pragma Inline (Assignment_OK);
10993 pragma Inline (Associated_Node);
10994 pragma Inline (At_End_Proc);
10995 pragma Inline (Attribute_Name);
10996 pragma Inline (Aux_Decls_Node);
10997 pragma Inline (Backwards_OK);
10998 pragma Inline (Bad_Is_Detected);
10999 pragma Inline (Body_To_Inline);
11000 pragma Inline (Body_Required);
11001 pragma Inline (By_Ref);
11002 pragma Inline (Box_Present);
11003 pragma Inline (Char_Literal_Value);
11004 pragma Inline (Chars);
11005 pragma Inline (Check_Address_Alignment);
11006 pragma Inline (Choice_Parameter);
11007 pragma Inline (Choices);
11008 pragma Inline (Coextensions);
11009 pragma Inline (Comes_From_Extended_Return_Statement);
11010 pragma Inline (Compile_Time_Known_Aggregate);
11011 pragma Inline (Component_Associations);
11012 pragma Inline (Component_Clauses);
11013 pragma Inline (Component_Definition);
11014 pragma Inline (Component_Items);
11015 pragma Inline (Component_List);
11016 pragma Inline (Component_Name);
11017 pragma Inline (Componentwise_Assignment);
11018 pragma Inline (Condition);
11019 pragma Inline (Condition_Actions);
11020 pragma Inline (Config_Pragmas);
11021 pragma Inline (Constant_Present);
11022 pragma Inline (Constraint);
11023 pragma Inline (Constraints);
11024 pragma Inline (Context_Installed);
11025 pragma Inline (Context_Items);
11026 pragma Inline (Context_Pending);
11027 pragma Inline (Controlling_Argument);
11028 pragma Inline (Conversion_OK);
11029 pragma Inline (Corresponding_Body);
11030 pragma Inline (Corresponding_Formal_Spec);
11031 pragma Inline (Corresponding_Generic_Association);
11032 pragma Inline (Corresponding_Integer_Value);
11033 pragma Inline (Corresponding_Spec);
11034 pragma Inline (Corresponding_Stub);
11035 pragma Inline (Dcheck_Function);
11036 pragma Inline (Debug_Statement);
11037 pragma Inline (Declarations);
11038 pragma Inline (Default_Expression);
11039 pragma Inline (Default_Name);
11040 pragma Inline (Defining_Identifier);
11041 pragma Inline (Defining_Unit_Name);
11042 pragma Inline (Delay_Alternative);
11043 pragma Inline (Delay_Statement);
11044 pragma Inline (Delta_Expression);
11045 pragma Inline (Digits_Expression);
11046 pragma Inline (Discr_Check_Funcs_Built);
11047 pragma Inline (Discrete_Choices);
11048 pragma Inline (Discrete_Range);
11049 pragma Inline (Discrete_Subtype_Definition);
11050 pragma Inline (Discrete_Subtype_Definitions);
11051 pragma Inline (Discriminant_Specifications);
11052 pragma Inline (Discriminant_Type);
11053 pragma Inline (Do_Accessibility_Check);
11054 pragma Inline (Do_Discriminant_Check);
11055 pragma Inline (Do_Length_Check);
11056 pragma Inline (Do_Division_Check);
11057 pragma Inline (Do_Overflow_Check);
11058 pragma Inline (Do_Range_Check);
11059 pragma Inline (Do_Storage_Check);
11060 pragma Inline (Do_Tag_Check);
11061 pragma Inline (Elaborate_Present);
11062 pragma Inline (Elaborate_All_Desirable);
11063 pragma Inline (Elaborate_All_Present);
11064 pragma Inline (Elaborate_Desirable);
11065 pragma Inline (Elaboration_Boolean);
11066 pragma Inline (Else_Actions);
11067 pragma Inline (Else_Statements);
11068 pragma Inline (Elsif_Parts);
11069 pragma Inline (Enclosing_Variant);
11070 pragma Inline (End_Label);
11071 pragma Inline (End_Span);
11072 pragma Inline (Entity);
11073 pragma Inline (Entity_Or_Associated_Node);
11074 pragma Inline (Entry_Body_Formal_Part);
11075 pragma Inline (Entry_Call_Alternative);
11076 pragma Inline (Entry_Call_Statement);
11077 pragma Inline (Entry_Direct_Name);
11078 pragma Inline (Entry_Index);
11079 pragma Inline (Entry_Index_Specification);
11080 pragma Inline (Etype);
11081 pragma Inline (Exception_Choices);
11082 pragma Inline (Exception_Handlers);
11083 pragma Inline (Exception_Junk);
11084 pragma Inline (Exception_Label);
11085 pragma Inline (Expansion_Delayed);
11086 pragma Inline (Explicit_Actual_Parameter);
11087 pragma Inline (Explicit_Generic_Actual_Parameter);
11088 pragma Inline (Expression);
11089 pragma Inline (Expressions);
11090 pragma Inline (First_Bit);
11091 pragma Inline (First_Inlined_Subprogram);
11092 pragma Inline (First_Name);
11093 pragma Inline (First_Named_Actual);
11094 pragma Inline (First_Real_Statement);
11095 pragma Inline (First_Subtype_Link);
11096 pragma Inline (Float_Truncate);
11097 pragma Inline (Formal_Type_Definition);
11098 pragma Inline (Forwards_OK);
11099 pragma Inline (From_At_End);
11100 pragma Inline (From_At_Mod);
11101 pragma Inline (From_Default);
11102 pragma Inline (Generic_Associations);
11103 pragma Inline (Generic_Formal_Declarations);
11104 pragma Inline (Generic_Parent);
11105 pragma Inline (Generic_Parent_Type);
11106 pragma Inline (Handled_Statement_Sequence);
11107 pragma Inline (Handler_List_Entry);
11108 pragma Inline (Has_Created_Identifier);
11109 pragma Inline (Has_Dynamic_Length_Check);
11110 pragma Inline (Has_Dynamic_Range_Check);
11111 pragma Inline (Has_Init_Expression);
11112 pragma Inline (Has_Local_Raise);
11113 pragma Inline (Has_Self_Reference);
11114 pragma Inline (Has_No_Elaboration_Code);
11115 pragma Inline (Has_Priority_Pragma);
11116 pragma Inline (Has_Private_View);
11117 pragma Inline (Has_Relative_Deadline_Pragma);
11118 pragma Inline (Has_Storage_Size_Pragma);
11119 pragma Inline (Has_Task_Info_Pragma);
11120 pragma Inline (Has_Task_Name_Pragma);
11121 pragma Inline (Has_Wide_Character);
11122 pragma Inline (Hidden_By_Use_Clause);
11123 pragma Inline (High_Bound);
11124 pragma Inline (Identifier);
11125 pragma Inline (Implicit_With);
11126 pragma Inline (Interface_List);
11127 pragma Inline (Interface_Present);
11128 pragma Inline (Includes_Infinities);
11129 pragma Inline (In_Present);
11130 pragma Inline (Instance_Spec);
11131 pragma Inline (Intval);
11132 pragma Inline (Is_Asynchronous_Call_Block);
11133 pragma Inline (Is_Component_Left_Opnd);
11134 pragma Inline (Is_Component_Right_Opnd);
11135 pragma Inline (Is_Controlling_Actual);
11136 pragma Inline (Is_Dynamic_Coextension);
11137 pragma Inline (Is_Elsif);
11138 pragma Inline (Is_Entry_Barrier_Function);
11139 pragma Inline (Is_Expanded_Build_In_Place_Call);
11140 pragma Inline (Is_Folded_In_Parser);
11141 pragma Inline (Is_In_Discriminant_Check);
11142 pragma Inline (Is_Machine_Number);
11143 pragma Inline (Is_Null_Loop);
11144 pragma Inline (Is_Overloaded);
11145 pragma Inline (Is_Power_Of_2_For_Shift);
11146 pragma Inline (Is_Protected_Subprogram_Body);
11147 pragma Inline (Is_Static_Coextension);
11148 pragma Inline (Is_Static_Expression);
11149 pragma Inline (Is_Subprogram_Descriptor);
11150 pragma Inline (Is_Task_Allocation_Block);
11151 pragma Inline (Is_Task_Master);
11152 pragma Inline (Iteration_Scheme);
11153 pragma Inline (Itype);
11154 pragma Inline (Kill_Range_Check);
11155 pragma Inline (Last_Bit);
11156 pragma Inline (Last_Name);
11157 pragma Inline (Library_Unit);
11158 pragma Inline (Label_Construct);
11159 pragma Inline (Left_Opnd);
11160 pragma Inline (Limited_View_Installed);
11161 pragma Inline (Limited_Present);
11162 pragma Inline (Literals);
11163 pragma Inline (Local_Raise_Not_OK);
11164 pragma Inline (Local_Raise_Statements);
11165 pragma Inline (Loop_Actions);
11166 pragma Inline (Loop_Parameter_Specification);
11167 pragma Inline (Low_Bound);
11168 pragma Inline (Mod_Clause);
11169 pragma Inline (More_Ids);
11170 pragma Inline (Must_Be_Byte_Aligned);
11171 pragma Inline (Must_Not_Freeze);
11172 pragma Inline (Must_Not_Override);
11173 pragma Inline (Must_Override);
11174 pragma Inline (Name);
11175 pragma Inline (Names);
11176 pragma Inline (Next_Entity);
11177 pragma Inline (Next_Implicit_With);
11178 pragma Inline (Next_Named_Actual);
11179 pragma Inline (Next_Pragma);
11180 pragma Inline (Next_Rep_Item);
11181 pragma Inline (Next_Use_Clause);
11182 pragma Inline (No_Ctrl_Actions);
11183 pragma Inline (No_Elaboration_Check);
11184 pragma Inline (No_Entities_Ref_In_Spec);
11185 pragma Inline (No_Initialization);
11186 pragma Inline (No_Truncation);
11187 pragma Inline (Null_Present);
11188 pragma Inline (Null_Exclusion_Present);
11189 pragma Inline (Null_Exclusion_In_Return_Present);
11190 pragma Inline (Null_Record_Present);
11191 pragma Inline (Object_Definition);
11192 pragma Inline (Original_Discriminant);
11193 pragma Inline (Original_Entity);
11194 pragma Inline (Others_Discrete_Choices);
11195 pragma Inline (Out_Present);
11196 pragma Inline (Parameter_Associations);
11197 pragma Inline (Parameter_Specifications);
11198 pragma Inline (Parameter_List_Truncated);
11199 pragma Inline (Parameter_Type);
11200 pragma Inline (Parent_Spec);
11201 pragma Inline (PPC_Enabled);
11202 pragma Inline (Position);
11203 pragma Inline (Pragma_Argument_Associations);
11204 pragma Inline (Pragma_Identifier);
11205 pragma Inline (Pragmas_After);
11206 pragma Inline (Pragmas_Before);
11207 pragma Inline (Prefix);
11208 pragma Inline (Present_Expr);
11209 pragma Inline (Prev_Ids);
11210 pragma Inline (Print_In_Hex);
11211 pragma Inline (Private_Declarations);
11212 pragma Inline (Private_Present);
11213 pragma Inline (Procedure_To_Call);
11214 pragma Inline (Proper_Body);
11215 pragma Inline (Protected_Definition);
11216 pragma Inline (Protected_Present);
11217 pragma Inline (Raises_Constraint_Error);
11218 pragma Inline (Range_Constraint);
11219 pragma Inline (Range_Expression);
11220 pragma Inline (Real_Range_Specification);
11221 pragma Inline (Realval);
11222 pragma Inline (Reason);
11223 pragma Inline (Record_Extension_Part);
11224 pragma Inline (Redundant_Use);
11225 pragma Inline (Renaming_Exception);
11226 pragma Inline (Result_Definition);
11227 pragma Inline (Return_Object_Declarations);
11228 pragma Inline (Return_Statement_Entity);
11229 pragma Inline (Reverse_Present);
11230 pragma Inline (Right_Opnd);
11231 pragma Inline (Rounded_Result);
11232 pragma Inline (Scope);
11233 pragma Inline (Select_Alternatives);
11234 pragma Inline (Selector_Name);
11235 pragma Inline (Selector_Names);
11236 pragma Inline (Shift_Count_OK);
11237 pragma Inline (Source_Type);
11238 pragma Inline (Specification);
11239 pragma Inline (Statements);
11240 pragma Inline (Static_Processing_OK);
11241 pragma Inline (Storage_Pool);
11242 pragma Inline (Strval);
11243 pragma Inline (Subtype_Indication);
11244 pragma Inline (Subtype_Mark);
11245 pragma Inline (Subtype_Marks);
11246 pragma Inline (Suppress_Loop_Warnings);
11247 pragma Inline (Synchronized_Present);
11248 pragma Inline (Tagged_Present);
11249 pragma Inline (Target_Type);
11250 pragma Inline (Task_Definition);
11251 pragma Inline (Task_Present);
11252 pragma Inline (Then_Actions);
11253 pragma Inline (Then_Statements);
11254 pragma Inline (Triggering_Alternative);
11255 pragma Inline (Triggering_Statement);
11256 pragma Inline (Treat_Fixed_As_Integer);
11257 pragma Inline (TSS_Elist);
11258 pragma Inline (Type_Definition);
11259 pragma Inline (Unit);
11260 pragma Inline (Unknown_Discriminants_Present);
11261 pragma Inline (Unreferenced_In_Spec);
11262 pragma Inline (Variant_Part);
11263 pragma Inline (Variants);
11264 pragma Inline (Visible_Declarations);
11265 pragma Inline (Was_Originally_Stub);
11266 pragma Inline (Zero_Cost_Handling);
11267
11268 pragma Inline (Set_ABE_Is_Certain);
11269 pragma Inline (Set_Abort_Present);
11270 pragma Inline (Set_Abortable_Part);
11271 pragma Inline (Set_Abstract_Present);
11272 pragma Inline (Set_Accept_Handler_Records);
11273 pragma Inline (Set_Accept_Statement);
11274 pragma Inline (Set_Access_Definition);
11275 pragma Inline (Set_Access_To_Subprogram_Definition);
11276 pragma Inline (Set_Access_Types_To_Process);
11277 pragma Inline (Set_Actions);
11278 pragma Inline (Set_Activation_Chain_Entity);
11279 pragma Inline (Set_Acts_As_Spec);
11280 pragma Inline (Set_Actual_Designated_Subtype);
11281 pragma Inline (Set_Address_Warning_Posted);
11282 pragma Inline (Set_Aggregate_Bounds);
11283 pragma Inline (Set_Aliased_Present);
11284 pragma Inline (Set_All_Others);
11285 pragma Inline (Set_All_Present);
11286 pragma Inline (Set_Alternatives);
11287 pragma Inline (Set_Ancestor_Part);
11288 pragma Inline (Set_Array_Aggregate);
11289 pragma Inline (Set_Assignment_OK);
11290 pragma Inline (Set_Associated_Node);
11291 pragma Inline (Set_At_End_Proc);
11292 pragma Inline (Set_Attribute_Name);
11293 pragma Inline (Set_Aux_Decls_Node);
11294 pragma Inline (Set_Backwards_OK);
11295 pragma Inline (Set_Bad_Is_Detected);
11296 pragma Inline (Set_Body_To_Inline);
11297 pragma Inline (Set_Body_Required);
11298 pragma Inline (Set_By_Ref);
11299 pragma Inline (Set_Box_Present);
11300 pragma Inline (Set_Char_Literal_Value);
11301 pragma Inline (Set_Chars);
11302 pragma Inline (Set_Check_Address_Alignment);
11303 pragma Inline (Set_Choice_Parameter);
11304 pragma Inline (Set_Choices);
11305 pragma Inline (Set_Coextensions);
11306 pragma Inline (Set_Comes_From_Extended_Return_Statement);
11307 pragma Inline (Set_Compile_Time_Known_Aggregate);
11308 pragma Inline (Set_Component_Associations);
11309 pragma Inline (Set_Component_Clauses);
11310 pragma Inline (Set_Component_Definition);
11311 pragma Inline (Set_Component_Items);
11312 pragma Inline (Set_Component_List);
11313 pragma Inline (Set_Component_Name);
11314 pragma Inline (Set_Componentwise_Assignment);
11315 pragma Inline (Set_Condition);
11316 pragma Inline (Set_Condition_Actions);
11317 pragma Inline (Set_Config_Pragmas);
11318 pragma Inline (Set_Constant_Present);
11319 pragma Inline (Set_Constraint);
11320 pragma Inline (Set_Constraints);
11321 pragma Inline (Set_Context_Installed);
11322 pragma Inline (Set_Context_Items);
11323 pragma Inline (Set_Context_Pending);
11324 pragma Inline (Set_Controlling_Argument);
11325 pragma Inline (Set_Conversion_OK);
11326 pragma Inline (Set_Corresponding_Body);
11327 pragma Inline (Set_Corresponding_Formal_Spec);
11328 pragma Inline (Set_Corresponding_Generic_Association);
11329 pragma Inline (Set_Corresponding_Integer_Value);
11330 pragma Inline (Set_Corresponding_Spec);
11331 pragma Inline (Set_Corresponding_Stub);
11332 pragma Inline (Set_Dcheck_Function);
11333 pragma Inline (Set_Debug_Statement);
11334 pragma Inline (Set_Declarations);
11335 pragma Inline (Set_Default_Expression);
11336 pragma Inline (Set_Default_Name);
11337 pragma Inline (Set_Defining_Identifier);
11338 pragma Inline (Set_Defining_Unit_Name);
11339 pragma Inline (Set_Delay_Alternative);
11340 pragma Inline (Set_Delay_Statement);
11341 pragma Inline (Set_Delta_Expression);
11342 pragma Inline (Set_Digits_Expression);
11343 pragma Inline (Set_Discr_Check_Funcs_Built);
11344 pragma Inline (Set_Discrete_Choices);
11345 pragma Inline (Set_Discrete_Range);
11346 pragma Inline (Set_Discrete_Subtype_Definition);
11347 pragma Inline (Set_Discrete_Subtype_Definitions);
11348 pragma Inline (Set_Discriminant_Specifications);
11349 pragma Inline (Set_Discriminant_Type);
11350 pragma Inline (Set_Do_Accessibility_Check);
11351 pragma Inline (Set_Do_Discriminant_Check);
11352 pragma Inline (Set_Do_Length_Check);
11353 pragma Inline (Set_Do_Division_Check);
11354 pragma Inline (Set_Do_Overflow_Check);
11355 pragma Inline (Set_Do_Range_Check);
11356 pragma Inline (Set_Do_Storage_Check);
11357 pragma Inline (Set_Do_Tag_Check);
11358 pragma Inline (Set_Elaborate_Present);
11359 pragma Inline (Set_Elaborate_All_Desirable);
11360 pragma Inline (Set_Elaborate_All_Present);
11361 pragma Inline (Set_Elaborate_Desirable);
11362 pragma Inline (Set_Elaboration_Boolean);
11363 pragma Inline (Set_Else_Actions);
11364 pragma Inline (Set_Else_Statements);
11365 pragma Inline (Set_Elsif_Parts);
11366 pragma Inline (Set_Enclosing_Variant);
11367 pragma Inline (Set_End_Label);
11368 pragma Inline (Set_End_Span);
11369 pragma Inline (Set_Entity);
11370 pragma Inline (Set_Entry_Body_Formal_Part);
11371 pragma Inline (Set_Entry_Call_Alternative);
11372 pragma Inline (Set_Entry_Call_Statement);
11373 pragma Inline (Set_Entry_Direct_Name);
11374 pragma Inline (Set_Entry_Index);
11375 pragma Inline (Set_Entry_Index_Specification);
11376 pragma Inline (Set_Etype);
11377 pragma Inline (Set_Exception_Choices);
11378 pragma Inline (Set_Exception_Handlers);
11379 pragma Inline (Set_Exception_Junk);
11380 pragma Inline (Set_Exception_Label);
11381 pragma Inline (Set_Expansion_Delayed);
11382 pragma Inline (Set_Explicit_Actual_Parameter);
11383 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
11384 pragma Inline (Set_Expression);
11385 pragma Inline (Set_Expressions);
11386 pragma Inline (Set_First_Bit);
11387 pragma Inline (Set_First_Inlined_Subprogram);
11388 pragma Inline (Set_First_Name);
11389 pragma Inline (Set_First_Named_Actual);
11390 pragma Inline (Set_First_Real_Statement);
11391 pragma Inline (Set_First_Subtype_Link);
11392 pragma Inline (Set_Float_Truncate);
11393 pragma Inline (Set_Formal_Type_Definition);
11394 pragma Inline (Set_Forwards_OK);
11395 pragma Inline (Set_From_At_End);
11396 pragma Inline (Set_From_At_Mod);
11397 pragma Inline (Set_From_Default);
11398 pragma Inline (Set_Generic_Associations);
11399 pragma Inline (Set_Generic_Formal_Declarations);
11400 pragma Inline (Set_Generic_Parent);
11401 pragma Inline (Set_Generic_Parent_Type);
11402 pragma Inline (Set_Handled_Statement_Sequence);
11403 pragma Inline (Set_Handler_List_Entry);
11404 pragma Inline (Set_Has_Created_Identifier);
11405 pragma Inline (Set_Has_Dynamic_Length_Check);
11406 pragma Inline (Set_Has_Init_Expression);
11407 pragma Inline (Set_Has_Local_Raise);
11408 pragma Inline (Set_Has_Dynamic_Range_Check);
11409 pragma Inline (Set_Has_No_Elaboration_Code);
11410 pragma Inline (Set_Has_Priority_Pragma);
11411 pragma Inline (Set_Has_Private_View);
11412 pragma Inline (Set_Has_Relative_Deadline_Pragma);
11413 pragma Inline (Set_Has_Storage_Size_Pragma);
11414 pragma Inline (Set_Has_Task_Info_Pragma);
11415 pragma Inline (Set_Has_Task_Name_Pragma);
11416 pragma Inline (Set_Has_Wide_Character);
11417 pragma Inline (Set_Hidden_By_Use_Clause);
11418 pragma Inline (Set_High_Bound);
11419 pragma Inline (Set_Identifier);
11420 pragma Inline (Set_Implicit_With);
11421 pragma Inline (Set_Includes_Infinities);
11422 pragma Inline (Set_Interface_List);
11423 pragma Inline (Set_Interface_Present);
11424 pragma Inline (Set_In_Present);
11425 pragma Inline (Set_Instance_Spec);
11426 pragma Inline (Set_Intval);
11427 pragma Inline (Set_Is_Asynchronous_Call_Block);
11428 pragma Inline (Set_Is_Component_Left_Opnd);
11429 pragma Inline (Set_Is_Component_Right_Opnd);
11430 pragma Inline (Set_Is_Controlling_Actual);
11431 pragma Inline (Set_Is_Dynamic_Coextension);
11432 pragma Inline (Set_Is_Elsif);
11433 pragma Inline (Set_Is_Entry_Barrier_Function);
11434 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
11435 pragma Inline (Set_Is_Folded_In_Parser);
11436 pragma Inline (Set_Is_In_Discriminant_Check);
11437 pragma Inline (Set_Is_Machine_Number);
11438 pragma Inline (Set_Is_Null_Loop);
11439 pragma Inline (Set_Is_Overloaded);
11440 pragma Inline (Set_Is_Power_Of_2_For_Shift);
11441 pragma Inline (Set_Is_Protected_Subprogram_Body);
11442 pragma Inline (Set_Has_Self_Reference);
11443 pragma Inline (Set_Is_Static_Coextension);
11444 pragma Inline (Set_Is_Static_Expression);
11445 pragma Inline (Set_Is_Subprogram_Descriptor);
11446 pragma Inline (Set_Is_Task_Allocation_Block);
11447 pragma Inline (Set_Is_Task_Master);
11448 pragma Inline (Set_Iteration_Scheme);
11449 pragma Inline (Set_Itype);
11450 pragma Inline (Set_Kill_Range_Check);
11451 pragma Inline (Set_Last_Bit);
11452 pragma Inline (Set_Last_Name);
11453 pragma Inline (Set_Library_Unit);
11454 pragma Inline (Set_Label_Construct);
11455 pragma Inline (Set_Left_Opnd);
11456 pragma Inline (Set_Limited_View_Installed);
11457 pragma Inline (Set_Limited_Present);
11458 pragma Inline (Set_Literals);
11459 pragma Inline (Set_Local_Raise_Not_OK);
11460 pragma Inline (Set_Local_Raise_Statements);
11461 pragma Inline (Set_Loop_Actions);
11462 pragma Inline (Set_Loop_Parameter_Specification);
11463 pragma Inline (Set_Low_Bound);
11464 pragma Inline (Set_Mod_Clause);
11465 pragma Inline (Set_More_Ids);
11466 pragma Inline (Set_Must_Be_Byte_Aligned);
11467 pragma Inline (Set_Must_Not_Freeze);
11468 pragma Inline (Set_Must_Not_Override);
11469 pragma Inline (Set_Must_Override);
11470 pragma Inline (Set_Name);
11471 pragma Inline (Set_Names);
11472 pragma Inline (Set_Next_Entity);
11473 pragma Inline (Set_Next_Implicit_With);
11474 pragma Inline (Set_Next_Named_Actual);
11475 pragma Inline (Set_Next_Pragma);
11476 pragma Inline (Set_Next_Rep_Item);
11477 pragma Inline (Set_Next_Use_Clause);
11478 pragma Inline (Set_No_Ctrl_Actions);
11479 pragma Inline (Set_No_Elaboration_Check);
11480 pragma Inline (Set_No_Entities_Ref_In_Spec);
11481 pragma Inline (Set_No_Initialization);
11482 pragma Inline (Set_No_Truncation);
11483 pragma Inline (Set_Null_Present);
11484 pragma Inline (Set_Null_Exclusion_Present);
11485 pragma Inline (Set_Null_Exclusion_In_Return_Present);
11486 pragma Inline (Set_Null_Record_Present);
11487 pragma Inline (Set_Object_Definition);
11488 pragma Inline (Set_Original_Discriminant);
11489 pragma Inline (Set_Original_Entity);
11490 pragma Inline (Set_Others_Discrete_Choices);
11491 pragma Inline (Set_Out_Present);
11492 pragma Inline (Set_Parameter_Associations);
11493 pragma Inline (Set_Parameter_Specifications);
11494 pragma Inline (Set_Parameter_List_Truncated);
11495 pragma Inline (Set_Parameter_Type);
11496 pragma Inline (Set_Parent_Spec);
11497 pragma Inline (Set_PPC_Enabled);
11498 pragma Inline (Set_Position);
11499 pragma Inline (Set_Pragma_Argument_Associations);
11500 pragma Inline (Set_Pragma_Identifier);
11501 pragma Inline (Set_Pragmas_After);
11502 pragma Inline (Set_Pragmas_Before);
11503 pragma Inline (Set_Prefix);
11504 pragma Inline (Set_Present_Expr);
11505 pragma Inline (Set_Prev_Ids);
11506 pragma Inline (Set_Print_In_Hex);
11507 pragma Inline (Set_Private_Declarations);
11508 pragma Inline (Set_Private_Present);
11509 pragma Inline (Set_Procedure_To_Call);
11510 pragma Inline (Set_Proper_Body);
11511 pragma Inline (Set_Protected_Definition);
11512 pragma Inline (Set_Protected_Present);
11513 pragma Inline (Set_Raises_Constraint_Error);
11514 pragma Inline (Set_Range_Constraint);
11515 pragma Inline (Set_Range_Expression);
11516 pragma Inline (Set_Real_Range_Specification);
11517 pragma Inline (Set_Realval);
11518 pragma Inline (Set_Reason);
11519 pragma Inline (Set_Record_Extension_Part);
11520 pragma Inline (Set_Redundant_Use);
11521 pragma Inline (Set_Renaming_Exception);
11522 pragma Inline (Set_Result_Definition);
11523 pragma Inline (Set_Return_Object_Declarations);
11524 pragma Inline (Set_Reverse_Present);
11525 pragma Inline (Set_Right_Opnd);
11526 pragma Inline (Set_Rounded_Result);
11527 pragma Inline (Set_Scope);
11528 pragma Inline (Set_Select_Alternatives);
11529 pragma Inline (Set_Selector_Name);
11530 pragma Inline (Set_Selector_Names);
11531 pragma Inline (Set_Shift_Count_OK);
11532 pragma Inline (Set_Source_Type);
11533 pragma Inline (Set_Specification);
11534 pragma Inline (Set_Statements);
11535 pragma Inline (Set_Static_Processing_OK);
11536 pragma Inline (Set_Storage_Pool);
11537 pragma Inline (Set_Strval);
11538 pragma Inline (Set_Subtype_Indication);
11539 pragma Inline (Set_Subtype_Mark);
11540 pragma Inline (Set_Subtype_Marks);
11541 pragma Inline (Set_Suppress_Loop_Warnings);
11542 pragma Inline (Set_Synchronized_Present);
11543 pragma Inline (Set_Tagged_Present);
11544 pragma Inline (Set_Target_Type);
11545 pragma Inline (Set_Task_Definition);
11546 pragma Inline (Set_Task_Present);
11547 pragma Inline (Set_Then_Actions);
11548 pragma Inline (Set_Then_Statements);
11549 pragma Inline (Set_Triggering_Alternative);
11550 pragma Inline (Set_Triggering_Statement);
11551 pragma Inline (Set_Treat_Fixed_As_Integer);
11552 pragma Inline (Set_TSS_Elist);
11553 pragma Inline (Set_Type_Definition);
11554 pragma Inline (Set_Unit);
11555 pragma Inline (Set_Unknown_Discriminants_Present);
11556 pragma Inline (Set_Unreferenced_In_Spec);
11557 pragma Inline (Set_Variant_Part);
11558 pragma Inline (Set_Variants);
11559 pragma Inline (Set_Visible_Declarations);
11560 pragma Inline (Set_Was_Originally_Stub);
11561 pragma Inline (Set_Zero_Cost_Handling);
11562
11563 N_Simple_Return_Statement : constant Node_Kind := N_Return_Statement;
11564 -- Rename N_Return_Statement to be N_Simple_Return_Statement. Clients
11565 -- should refer to N_Simple_Return_Statement.
11566
11567 end Sinfo;