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