[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-2010, 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
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
465 -- This flag is set if the node comes directly from an explicit construct
466 -- in the source. It is normally on for any nodes built by the scanner or
467 -- parser from the source program, with the exception that in a few cases
468 -- the parser adds nodes to normalize the representation (in particular
469 -- a null statement is added to a package body if there is no begin/end
470 -- initialization section.
471 --
472 -- Most nodes inserted by the analyzer or expander are not considered
473 -- as coming from source, so the flag is off for such nodes. In a few
474 -- cases, the expander constructs nodes closely equivalent to nodes
475 -- from the source program (e.g. the allocator built for build-in-place
476 -- case), and the Comes_From_Source flag is deliberately set.
477
478 -- Error_Posted
479 -- This flag is used to avoid multiple error messages being posted on or
480 -- referring to the same node. This flag is set if an error message
481 -- refers to a node or is posted on its source location, and has the
482 -- effect of inhibiting further messages involving this same node.
483
484 -- Has_Dynamic_Length_Check (Flag10-Sem)
485 -- This flag is present on all nodes. It is set to indicate that one of
486 -- the routines in unit Checks has generated a length check action which
487 -- has been inserted at the flagged node. This is used to avoid the
488 -- generation of duplicate checks.
489
490 -- Has_Dynamic_Range_Check (Flag12-Sem)
491 -- This flag is present on all nodes. It is set to indicate that one of
492 -- the routines in unit Checks has generated a range check action which
493 -- has been inserted at the flagged node. This is used to avoid the
494 -- generation of duplicate checks.
495
496 -- Has_Local_Raise (Flag8-Sem)
497 -- Present in exception handler nodes. Set if the handler can be entered
498 -- via a local raise that gets transformed to a goto statement. This will
499 -- always be set if Local_Raise_Statements is non-empty, but can also be
500 -- set as a result of generation of N_Raise_xxx nodes, or flags set in
501 -- nodes requiring generation of back end checks.
502
503 ------------------------------------
504 -- Description of Semantic Fields --
505 ------------------------------------
506
507 -- The meaning of the syntactic fields is generally clear from their names
508 -- without any further description, since the names are chosen to
509 -- correspond very closely to the syntax in the reference manual. This
510 -- section describes the usage of the semantic fields, which are used to
511 -- contain additional information determined during semantic analysis.
512
513 -- ABE_Is_Certain (Flag18-Sem)
514 -- This flag is set in an instantiation node or a call node is determined
515 -- to be sure to raise an ABE. This is used to trigger special handling
516 -- of such cases, particularly in the instantiation case where we avoid
517 -- instantiating the body if this flag is set. This flag is also present
518 -- in an N_Formal_Package_Declaration_Node since formal package
519 -- declarations are treated like instantiations, but it is always set to
520 -- False in this context.
521
522 -- Accept_Handler_Records (List5-Sem)
523 -- This field is present only in an N_Accept_Alternative node. It is used
524 -- to temporarily hold the exception handler records from an accept
525 -- statement in a selective accept. These exception handlers will
526 -- eventually be placed in the Handler_Records list of the procedure
527 -- built for this accept (see Expand_N_Selective_Accept procedure in
528 -- Exp_Ch9 for further details).
529
530 -- Access_Types_To_Process (Elist2-Sem)
531 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
532 -- Contains the list of access types which may require specific treatment
533 -- when the nature of the type completion is completely known. An example
534 -- of such treatment is the generation of the associated_final_chain.
535
536 -- Actions (List1-Sem)
537 -- This field contains a sequence of actions that are associated with the
538 -- node holding the field. See the individual node types for details of
539 -- how this field is used, as well as the description of the specific use
540 -- for a particular node type.
541
542 -- Activation_Chain_Entity (Node3-Sem)
543 -- This is used in tree nodes representing task activators (blocks,
544 -- subprogram bodies, package declarations, and task bodies). It is
545 -- initially Empty, and then gets set to point to the entity for the
546 -- declared Activation_Chain variable when the first task is declared.
547 -- When tasks are declared in the corresponding declarative region this
548 -- entity is located by name (its name is always _Chain) and the declared
549 -- tasks are added to the chain. Note that N_Extended_Return_Statement
550 -- does not have this attribute, although it does have an activation
551 -- chain. This chain is used to store the tasks temporarily, and is not
552 -- used for activating them. On successful completion of the return
553 -- statement, the tasks are moved to the caller's chain, and the caller
554 -- activates them.
555
556 -- Acts_As_Spec (Flag4-Sem)
557 -- A flag set in the N_Subprogram_Body node for a subprogram body which
558 -- is acting as its own spec, except in the case of a library level
559 -- subprogram, in which case the flag is set on the parent compilation
560 -- unit node instead (see further description in spec of Lib package).
561 -- ??? Above note about Lib is dubious since lib.ads does not mention
562 -- Acts_As_Spec at all.
563
564 -- Actual_Designated_Subtype (Node4-Sem)
565 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
566 -- needs to known the dynamic constrained subtype of the designated
567 -- object, this attribute is set to that type. This is done for
568 -- N_Free_Statements for access-to-classwide types and access to
569 -- unconstrained packed array types, and for N_Explicit_Dereference when
570 -- the designated type is an unconstrained packed array and the
571 -- dereference is the prefix of a 'Size attribute reference.
572
573 -- Address_Warning_Posted (Flag18-Sem)
574 -- Present in N_Attribute_Definition nodes. Set to indicate that we have
575 -- posted a warning for the address clause regarding size or alignment
576 -- issues. Used to inhibit multiple redundant messages.
577
578 -- Aggregate_Bounds (Node3-Sem)
579 -- Present in array N_Aggregate nodes. If the bounds of the aggregate are
580 -- known at compile time, this field points to an N_Range node with those
581 -- bounds. Otherwise Empty.
582
583 -- All_Others (Flag11-Sem)
584 -- Present in an N_Others_Choice node. This flag is set for an others
585 -- exception where all exceptions are to be caught, even those that are
586 -- not normally handled (in particular the tasking abort signal). This
587 -- is used for translation of the at end handler into a normal exception
588 -- handler.
589
590 -- Aspect_Cancel (Flag11-Sem)
591 -- Processing of aspect specifications typically generates pragmas and
592 -- attribute definition clauses that are inserted into the tree after
593 -- the declaration node to get the desired aspect effect. In the case
594 -- of Boolean aspects that use "=> False" to cancel the effect of an
595 -- aspect (i.e. turn if off), the generated pragma has the Aspect_Cancel
596 -- flag set to indicate that the pragma operates in the opposite sense.
597
598 -- Aspect_Rep_Item (Node2-Sem)
599 -- Present in N_Aspect_Specification nodes. Points to the corresponding
600 -- pragma/attribute definition node used to process the aspect.
601
602 -- Assignment_OK (Flag15-Sem)
603 -- This flag is set in a subexpression node for an object, indicating
604 -- that the associated object can be modified, even if this would not
605 -- normally be permissible (either by direct assignment, or by being
606 -- passed as an out or in-out parameter). This is used by the expander
607 -- for a number of purposes, including initialization of constants and
608 -- limited type objects (such as tasks), setting discriminant fields,
609 -- setting tag values, etc. N_Object_Declaration nodes also have this
610 -- flag defined. Here it is used to indicate that an initialization
611 -- expression is valid, even where it would normally not be allowed
612 -- (e.g. where the type involved is limited).
613
614 -- Associated_Node (Node4-Sem)
615 -- Present in nodes that can denote an entity: identifiers, character
616 -- literals, operator symbols, expanded names, operator nodes, and
617 -- attribute reference nodes (all these nodes have an Entity field).
618 -- This field is also present in N_Aggregate, N_Selected_Component, and
619 -- N_Extension_Aggregate nodes. This field is used in generic processing
620 -- to create links between the generic template and the generic copy.
621 -- See Sem_Ch12.Get_Associated_Node for full details. Note that this
622 -- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
623 -- the normal function of Entity is not required at the point where the
624 -- Associated_Node is set. Note also, that in generic templates, this
625 -- means that the Entity field does not necessarily point to an Entity.
626 -- Since the back end is expected to ignore generic templates, this is
627 -- harmless.
628
629 -- At_End_Proc (Node1)
630 -- This field is present in an N_Handled_Sequence_Of_Statements node.
631 -- It contains an identifier reference for the cleanup procedure to be
632 -- called. See description of this node for further details.
633
634 -- Backwards_OK (Flag6-Sem)
635 -- A flag present in the N_Assignment_Statement node. It is used only
636 -- if the type being assigned is an array type, and is set if analysis
637 -- determines that it is definitely safe to do the copy backwards, i.e.
638 -- starting at the highest addressed element. This is the case if either
639 -- the operands do not overlap, or they may overlap, but if they do,
640 -- then the left operand is at a higher address than the right operand.
641 --
642 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
643 -- means that the front end could not determine that either direction is
644 -- definitely safe, and a runtime check may be required if the backend
645 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
646 -- set, it means that the front end can assure no overlap of operands.
647
648 -- Body_To_Inline (Node3-Sem)
649 -- present in subprogram declarations. Denotes analyzed but unexpanded
650 -- body of subprogram, to be used when inlining calls. Present when the
651 -- subprogram has an Inline pragma and inlining is enabled. If the
652 -- declaration is completed by a renaming_as_body, and the renamed en-
653 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
654 -- which is used directly in later calls to the original subprogram.
655
656 -- Body_Required (Flag13-Sem)
657 -- A flag that appears in the N_Compilation_Unit node indicating that
658 -- the corresponding unit requires a body. For the package case, this
659 -- indicates that a completion is required. In Ada 95, if the flag is not
660 -- set for the package case, then a body may not be present. In Ada 83,
661 -- if the flag is not set for the package case, then body is optional.
662 -- For a subprogram declaration, the flag is set except in the case where
663 -- a pragma Import or Interface applies, in which case no body is
664 -- permitted (in Ada 83 or Ada 95).
665
666 -- By_Ref (Flag5-Sem)
667 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
668 -- this flag is set when the returned expression is already allocated on
669 -- the secondary stack and thus the result is passed by reference rather
670 -- than copied another time.
671
672 -- Check_Address_Alignment (Flag11-Sem)
673 -- A flag present in N_Attribute_Definition clause for a 'Address
674 -- attribute definition. This flag is set if a dynamic check should be
675 -- generated at the freeze point for the entity to which this address
676 -- clause applies. The reason that we need this flag is that we want to
677 -- check for range checks being suppressed at the point where the
678 -- attribute definition clause is given, rather than testing this at the
679 -- freeze point.
680
681 -- Coextensions (Elist4-Sem)
682 -- Present in allocators nodes. Points to list of allocators for the
683 -- access discriminants of the allocated object.
684
685 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
686 -- Present in N_Simple_Return_Statement nodes. True if this node was
687 -- constructed as part of the N_Extended_Return_Statement expansion.
688
689 -- Compile_Time_Known_Aggregate (Flag18-Sem)
690 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
691 -- evaluated at compile time without raising constraint error. Such
692 -- aggregates can be passed as is to Gigi without any expansion. See
693 -- Sem_Aggr for the specific conditions under which an aggregate has this
694 -- flag set. See also the flag Static_Processing_OK.
695
696 -- Componentwise_Assignment (Flag14-Sem)
697 -- Present in N_Assignment_Statement nodes. Set for a record assignment
698 -- where all that needs doing is to expand it into component-by-component
699 -- assignments. This is used internally for the case of tagged types with
700 -- rep clauses, where we need to avoid recursion (we don't want to try to
701 -- generate a call to the primitive operation, because this is the case
702 -- where we are compiling the primitive operation). Note that when we are
703 -- expanding component assignments in this case, we never assign the _tag
704 -- field, but we recursively assign components of the parent type.
705
706 -- Condition_Actions (List3-Sem)
707 -- This field appears in else-if nodes and in the iteration scheme node
708 -- for while loops. This field is only used during semantic processing to
709 -- temporarily hold actions inserted into the tree. In the tree passed
710 -- to gigi, the condition actions field is always set to No_List. For
711 -- details on how this field is used, see the routine Insert_Actions in
712 -- package Exp_Util, and also the expansion routines for the relevant
713 -- nodes.
714
715 -- Context_Pending (Flag16-Sem)
716 -- This field appears in Compilation_Unit nodes, to indicate that the
717 -- context of the unit is being compiled. Used to detect circularities
718 -- that are not otherwise detected by the loading mechanism. Such
719 -- circularities can occur in the presence of limited and non-limited
720 -- with_clauses that mention the same units.
721
722 -- Controlling_Argument (Node1-Sem)
723 -- This field is set in procedure and function call nodes if the call
724 -- is a dispatching call (it is Empty for a non-dispatching call). It
725 -- indicates the source of the call's controlling tag. For procedure
726 -- calls, the Controlling_Argument is one of the actuals. For function
727 -- that has a dispatching result, it is an entity in the context of the
728 -- call that can provide a tag, or else it is the tag of the root type
729 -- of the class. It can also specify a tag directly rather than being a
730 -- tagged object. The latter is needed by the implementations of AI-239
731 -- and AI-260.
732
733 -- Conversion_OK (Flag14-Sem)
734 -- A flag set on type conversion nodes to indicate that the conversion
735 -- is to be considered as being valid, even though it is the case that
736 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
737 -- Fixed_Value and Integer_Value, for internal conversions done for
738 -- fixed-point operations, and for certain conversions for calls to
739 -- initialization procedures. If Conversion_OK is set, then Etype must be
740 -- set (the analyzer assumes that Etype has been set). For the case of
741 -- fixed-point operands, it also indicates that the conversion is to be
742 -- direct conversion of the underlying integer result, with no regard to
743 -- the small operand.
744
745 -- Corresponding_Body (Node5-Sem)
746 -- This field is set in subprogram declarations, package declarations,
747 -- entry declarations of protected types, and in generic units. It
748 -- points to the defining entity for the corresponding body (NOT the
749 -- node for the body itself).
750
751 -- Corresponding_Formal_Spec (Node3-Sem)
752 -- This field is set in subprogram renaming declarations, where it points
753 -- to the defining entity for a formal subprogram in the case where the
754 -- renaming corresponds to a generic formal subprogram association in an
755 -- instantiation. The field is Empty if the renaming does not correspond
756 -- to such a formal association.
757
758 -- Corresponding_Generic_Association (Node5-Sem)
759 -- This field is defined for object declarations and object renaming
760 -- declarations. It is set for the declarations within an instance that
761 -- map generic formals to their actuals. If set, the field points to
762 -- a generic_association which is the original parent of the expression
763 -- or name appearing in the declaration. This simplifies ASIS queries.
764
765 -- Corresponding_Integer_Value (Uint4-Sem)
766 -- This field is set in real literals of fixed-point types (it is not
767 -- used for floating-point types). It contains the integer value used
768 -- to represent the fixed-point value. It is also set on the universal
769 -- real literals used to represent bounds of fixed-point base types
770 -- and their first named subtypes.
771
772 -- Corresponding_Spec (Node5-Sem)
773 -- This field is set in subprogram, package, task, and protected body
774 -- nodes, where it points to the defining entity in the corresponding
775 -- spec. The attribute is also set in N_With_Clause nodes where it points
776 -- to the defining entity for the with'ed spec, and in a subprogram
777 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
778 -- if there is no corresponding spec, as in the case of a subprogram body
779 -- that serves as its own spec.
780
781 -- Corresponding_Stub (Node3-Sem)
782 -- This field is present in an N_Subunit node. It holds the node in
783 -- the parent unit that is the stub declaration for the subunit. It is
784 -- set when analysis of the stub forces loading of the proper body. If
785 -- expansion of the proper body creates new declarative nodes, they are
786 -- inserted at the point of the corresponding_stub.
787
788 -- Dcheck_Function (Node5-Sem)
789 -- This field is present in an N_Variant node, It references the entity
790 -- for the discriminant checking function for the variant.
791
792 -- Debug_Statement (Node3)
793 -- This field is present in an N_Pragma node. It is used only for a Debug
794 -- pragma. The parameter is of the form of an expression, as required by
795 -- the pragma syntax, but is actually a procedure call. To simplify
796 -- semantic processing, the parser creates a copy of the argument
797 -- rearranged into a procedure call statement and places it in the
798 -- Debug_Statement field. Note that this field is considered syntactic
799 -- field, since it is created by the parser.
800
801 -- Default_Expression (Node5-Sem)
802 -- This field is Empty if there is no default expression. If there is a
803 -- simple default expression (one with no side effects), then this field
804 -- simply contains a copy of the Expression field (both point to the tree
805 -- for the default expression). Default_Expression is used for
806 -- conformance checking.
807
808 -- Discr_Check_Funcs_Built (Flag11-Sem)
809 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
810 -- discriminant checking functions are constructed. The purpose is to
811 -- avoid attempting to set these functions more than once.
812
813 -- Do_Accessibility_Check (Flag13-Sem)
814 -- This flag is set on N_Parameter_Specification nodes to indicate
815 -- that an accessibility check is required for the parameter. It is
816 -- not yet decided who takes care of this check (TBD ???).
817
818 -- Do_Discriminant_Check (Flag13-Sem)
819 -- This flag is set on N_Selected_Component nodes to indicate that a
820 -- discriminant check is required using the discriminant check routine
821 -- associated with the selector. The actual check is generated by the
822 -- expander when processing selected components.
823
824 -- Do_Division_Check (Flag13-Sem)
825 -- This flag is set on a division operator (/ mod rem) to indicate
826 -- that a zero divide check is required. The actual check is dealt
827 -- with by the backend (all the front end does is to set the flag).
828
829 -- Do_Length_Check (Flag4-Sem)
830 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
831 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
832 -- is required. It is not determined who deals with this flag (???).
833
834 -- Do_Overflow_Check (Flag17-Sem)
835 -- This flag is set on an operator where an overflow check is required on
836 -- the operation. The actual check is dealt with by the backend (all the
837 -- front end does is to set the flag). The other cases where this flag is
838 -- used is on a Type_Conversion node and for attribute reference nodes.
839 -- For a type conversion, it means that the conversion is from one base
840 -- type to another, and the value may not fit in the target base type.
841 -- See also the description of Do_Range_Check for this case. The only
842 -- attribute references which use this flag are Pred and Succ, where it
843 -- means that the result should be checked for going outside the base
844 -- range. Note that this flag is not set for modular types.
845
846 -- Do_Range_Check (Flag9-Sem)
847 -- This flag is set on an expression which appears in a context where a
848 -- range check is required. The target type is clear from the context.
849 -- The contexts in which this flag can appear are the following:
850
851 -- Right side of an assignment. In this case the target type is
852 -- taken from the left side of the assignment, which is referenced
853 -- by the Name of the N_Assignment_Statement node.
854
855 -- Subscript expressions in an indexed component. In this case the
856 -- target type is determined from the type of the array, which is
857 -- referenced by the Prefix of the N_Indexed_Component node.
858
859 -- Argument expression for a parameter, appearing either directly in
860 -- the Parameter_Associations list of a call or as the Expression of an
861 -- N_Parameter_Association node that appears in this list. In either
862 -- case, the check is against the type of the formal. Note that the
863 -- flag is relevant only in IN and IN OUT parameters, and will be
864 -- ignored for OUT parameters, where no check is required in the call,
865 -- and if a check is required on the return, it is generated explicitly
866 -- with a type conversion.
867
868 -- Initialization expression for the initial value in an object
869 -- declaration. In this case the Do_Range_Check flag is set on
870 -- the initialization expression, and the check is against the
871 -- range of the type of the object being declared.
872
873 -- The expression of a type conversion. In this case the range check is
874 -- against the target type of the conversion. See also the use of
875 -- Do_Overflow_Check on a type conversion. The distinction is that the
876 -- overflow check protects against a value that is outside the range of
877 -- the target base type, whereas a range check checks that the
878 -- resulting value (which is a value of the base type of the target
879 -- type), satisfies the range constraint of the target type.
880
881 -- Note: when a range check is required in contexts other than those
882 -- listed above (e.g. in a return statement), an additional type
883 -- conversion node is introduced to represent the required check.
884
885 -- Do_Storage_Check (Flag17-Sem)
886 -- This flag is set in an N_Allocator node to indicate that a storage
887 -- check is required for the allocation, or in an N_Subprogram_Body node
888 -- to indicate that a stack check is required in the subprogram prolog.
889 -- The N_Allocator case is handled by the routine that expands the call
890 -- to the runtime routine. The N_Subprogram_Body case is handled by the
891 -- backend, and all the semantics does is set the flag.
892
893 -- Do_Tag_Check (Flag13-Sem)
894 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
895 -- N_Procedure_Call_Statement, N_Type_Conversion,
896 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
897 -- node to indicate that the tag check can be suppressed. It is not
898 -- yet decided how this flag is used (TBD ???).
899
900 -- Elaborate_Present (Flag4-Sem)
901 -- This flag is set in the N_With_Clause node to indicate that pragma
902 -- Elaborate pragma appears for the with'ed units.
903
904 -- Elaborate_All_Desirable (Flag9-Sem)
905 -- This flag is set in the N_With_Clause mode to indicate that the static
906 -- elaboration processing has determined that an Elaborate_All pragma is
907 -- desirable for correct elaboration for this unit.
908
909 -- Elaborate_All_Present (Flag14-Sem)
910 -- This flag is set in the N_With_Clause node to indicate that a
911 -- pragma Elaborate_All pragma appears for the with'ed units.
912
913 -- Elaborate_Desirable (Flag11-Sem)
914 -- This flag is set in the N_With_Clause mode to indicate that the static
915 -- elaboration processing has determined that an Elaborate pragma is
916 -- desirable for correct elaboration for this unit.
917
918 -- Elaboration_Boolean (Node2-Sem)
919 -- This field is present in function and procedure specification nodes.
920 -- If set, it points to the entity for a Boolean flag that must be tested
921 -- for certain calls to check for access before elaboration. See body of
922 -- Sem_Elab for further details. This field is Empty if no elaboration
923 -- boolean is required.
924
925 -- Else_Actions (List3-Sem)
926 -- This field is present in conditional expression nodes. During code
927 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
928 -- actions at an appropriate place in the tree to get elaborated at the
929 -- right time. For conditional expressions, we have to be sure that the
930 -- actions for the Else branch are only elaborated if the condition is
931 -- False. The Else_Actions field is used as a temporary parking place for
932 -- these actions. The final tree is always rewritten to eliminate the
933 -- need for this field, so in the tree passed to Gigi, this field is
934 -- always set to No_List.
935
936 -- Enclosing_Variant (Node2-Sem)
937 -- This field is present in the N_Variant node and identifies the Node_Id
938 -- corresponding to the immediately enclosing variant when the variant is
939 -- nested, and N_Empty otherwise. Set during semantic processing of the
940 -- variant part of a record type.
941
942 -- Entity (Node4-Sem)
943 -- Appears in all direct names (identifiers, character literals, and
944 -- operator symbols), as well as expanded names, and attributes that
945 -- denote entities, such as 'Class. Points to entity for corresponding
946 -- defining occurrence. Set after name resolution. For identifiers in a
947 -- WITH list, the corresponding defining occurrence is in a separately
948 -- compiled file, and Entity must be set by the library Load procedure.
949 --
950 -- Note: During name resolution, the value in Entity may be temporarily
951 -- incorrect (e.g. during overload resolution, Entity is initially set to
952 -- the first possible correct interpretation, and then later modified if
953 -- necessary to contain the correct value after resolution).
954 --
955 -- Note: This field overlaps Associated_Node, which is used during
956 -- generic processing (see Sem_Ch12 for details). Note also that in
957 -- generic templates, this means that the Entity field does not always
958 -- point to an Entity. Since the back end is expected to ignore generic
959 -- templates, this is harmless.
960 --
961 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
962 -- It is used only for stream attributes definition clauses. In this
963 -- case, it denotes a (possibly dummy) subprogram entity that is declared
964 -- conceptually at the point of the clause. Thus the visibility of the
965 -- attribute definition clause (in the sense of 8.3(23) as amended by
966 -- AI-195) can be checked by testing the visibility of that subprogram.
967 --
968 -- Note: Normally the Entity field of an identifier points to the entity
969 -- for the corresponding defining identifier, and hence the Chars field
970 -- of an identifier will match the Chars field of the entity. However,
971 -- there is no requirement that these match, and there are obscure cases
972 -- of generated code where they do not match.
973
974 -- Entity_Or_Associated_Node (Node4-Sem)
975 -- A synonym for both Entity and Associated_Node. Used by convention in
976 -- the code when referencing this field in cases where it is not known
977 -- whether the field contains an Entity or an Associated_Node.
978
979 -- Etype (Node5-Sem)
980 -- Appears in all expression nodes, all direct names, and all entities.
981 -- Points to the entity for the related type. Set after type resolution.
982 -- Normally this is the actual subtype of the expression. However, in
983 -- certain contexts such as the right side of an assignment, subscripts,
984 -- arguments to calls, returned value in a function, initial value etc.
985 -- it is the desired target type. In the event that this is different
986 -- from the actual type, the Do_Range_Check flag will be set if a range
987 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
988 -- points to an essentially arbitrary choice from the possible set of
989 -- types.
990
991 -- Exception_Junk (Flag8-Sem)
992 -- This flag is set in a various nodes appearing in a statement sequence
993 -- to indicate that the corresponding node is an artifact of the
994 -- generated code for exception handling, and should be ignored when
995 -- analyzing the control flow of the relevant sequence of statements
996 -- (e.g. to check that it does not end with a bad return statement).
997
998 -- Exception_Label (Node5-Sem)
999 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
1000 -- to be used for transforming the corresponding exception into a goto,
1001 -- or contains Empty, if this exception is not to be transformed. Also
1002 -- appears in N_Exception_Handler nodes, where, if set, it indicates
1003 -- that there may be a local raise for the handler, so that expansion
1004 -- to allow a goto is required (and this field contains the label for
1005 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
1006
1007 -- Expansion_Delayed (Flag11-Sem)
1008 -- Set on aggregates and extension aggregates that need a top-down rather
1009 -- than bottom-up expansion. Typically aggregate expansion happens bottom
1010 -- up. For nested aggregates the expansion is delayed until the enclosing
1011 -- aggregate itself is expanded, e.g. in the context of a declaration. To
1012 -- delay it we set this flag. This is done to avoid creating a temporary
1013 -- for each level of a nested aggregates, and also to prevent the
1014 -- premature generation of constraint checks. This is also a requirement
1015 -- if we want to generate the proper attachment to the internal
1016 -- finalization lists (for record with controlled components). Top down
1017 -- expansion of aggregates is also used for in-place array aggregate
1018 -- assignment or initialization. When the full context is known, the
1019 -- target of the assignment or initialization is used to generate the
1020 -- left-hand side of individual assignment to each sub-component.
1021
1022 -- First_Inlined_Subprogram (Node3-Sem)
1023 -- Present in the N_Compilation_Unit node for the main program. Points
1024 -- to a chain of entities for subprograms that are to be inlined. The
1025 -- Next_Inlined_Subprogram field of these entities is used as a link
1026 -- pointer with Empty marking the end of the list. This field is Empty
1027 -- if there are no inlined subprograms or inlining is not active.
1028
1029 -- First_Named_Actual (Node4-Sem)
1030 -- Present in procedure call statement and function call nodes, and also
1031 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1032 -- named parameter where parameters are ordered by declaration order (as
1033 -- opposed to the actual order in the call which may be different due to
1034 -- named associations). Note: this field points to the explicit actual
1035 -- parameter itself, not the N_Parameter_Association node (its parent).
1036
1037 -- First_Real_Statement (Node2-Sem)
1038 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
1039 -- Empty. Used only when declarations are moved into the statement part
1040 -- of a construct as a result of wrapping an AT END handler that is
1041 -- required to cover the declarations. In this case, this field is used
1042 -- to remember the location in the statements list of the first real
1043 -- statement, i.e. the statement that used to be first in the statement
1044 -- list before the declarations were prepended.
1045
1046 -- First_Subtype_Link (Node5-Sem)
1047 -- Present in N_Freeze_Entity node for an anonymous base type that is
1048 -- implicitly created by the declaration of a first subtype. It points
1049 -- to the entity for the first subtype.
1050
1051 -- Float_Truncate (Flag11-Sem)
1052 -- A flag present in type conversion nodes. This is used for float to
1053 -- integer conversions where truncation is required rather than rounding.
1054 -- Note that Gigi does not handle type conversions from real to integer
1055 -- with rounding (see Expand_N_Type_Conversion).
1056
1057 -- Forwards_OK (Flag5-Sem)
1058 -- A flag present in the N_Assignment_Statement node. It is used only
1059 -- if the type being assigned is an array type, and is set if analysis
1060 -- determines that it is definitely safe to do the copy forwards, i.e.
1061 -- starting at the lowest addressed element. This is the case if either
1062 -- the operands do not overlap, or they may overlap, but if they do,
1063 -- then the left operand is at a lower address than the right operand.
1064 --
1065 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1066 -- means that the front end could not determine that either direction is
1067 -- definitely safe, and a runtime check may be required if the backend
1068 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1069 -- set, it means that the front end can assure no overlap of operands.
1070
1071 -- From_Aspect_Specification (Flag13-Sem)
1072 -- Processing of aspect specifications typically results in insertion in
1073 -- the tree of corresponding pragma or attribute definition clause nodes.
1074 -- These generated nodes have the From_Aspect_Specification flag set to
1075 -- indicate that they came from aspect specifications originally.
1076
1077 -- From_At_End (Flag4-Sem)
1078 -- This flag is set on an N_Raise_Statement node if it corresponds to
1079 -- the reraise statement generated as the last statement of an AT END
1080 -- handler when SJLJ exception handling is active. It is used to stop
1081 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1082 -- because if the restriction is set, the reraise is not generated.
1083
1084 -- From_At_Mod (Flag4-Sem)
1085 -- This flag is set on the attribute definition clause node that is
1086 -- generated by a transformation of an at mod phrase in a record
1087 -- representation clause. This is used to give slightly different (Ada 83
1088 -- compatible) semantics to such a clause, namely it is used to specify a
1089 -- minimum acceptable alignment for the base type and all subtypes. In
1090 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1091 -- must be a multiple of the given value, and the representation clause
1092 -- is considered to be type specific instead of subtype specific.
1093
1094 -- From_Default (Flag6-Sem)
1095 -- This flag is set on the subprogram renaming declaration created in an
1096 -- instance for a formal subprogram, when the formal is declared with a
1097 -- box, and there is no explicit actual. If the flag is present, the
1098 -- declaration is treated as an implicit reference to the formal in the
1099 -- ali file.
1100
1101 -- Generic_Parent (Node5-Sem)
1102 -- Generic_Parent is defined on declaration nodes that are instances. The
1103 -- value of Generic_Parent is the generic entity from which the instance
1104 -- is obtained. Generic_Parent is also defined for the renaming
1105 -- declarations and object declarations created for the actuals in an
1106 -- instantiation. The generic parent of such a declaration is the
1107 -- corresponding generic association in the Instantiation node.
1108
1109 -- Generic_Parent_Type (Node4-Sem)
1110 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1111 -- actuals of formal private and derived types. Within the instance, the
1112 -- operations on the actual are those inherited from the parent. For a
1113 -- formal private type, the parent type is the generic type itself. The
1114 -- Generic_Parent_Type is also used in an instance to determine whether a
1115 -- private operation overrides an inherited one.
1116
1117 -- Handler_List_Entry (Node2-Sem)
1118 -- This field is present in N_Object_Declaration nodes. It is set only
1119 -- for the Handler_Record entry generated for an exception in zero cost
1120 -- exception handling mode. It references the corresponding item in the
1121 -- handler list, and is used to delete this entry if the corresponding
1122 -- handler is deleted during optimization. For further details on why
1123 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1124
1125 -- Has_No_Elaboration_Code (Flag17-Sem)
1126 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1127 -- or not elaboration code is present for this unit. It is initially set
1128 -- true for subprogram specs and bodies and for all generic units and
1129 -- false for non-generic package specs and bodies. Gigi may set the flag
1130 -- in the non-generic package case if it determines that no elaboration
1131 -- code is generated. Note that this flag is not related to the
1132 -- Is_Preelaborated status, there can be preelaborated packages that
1133 -- generate elaboration code, and non-preelaborated packages which do
1134 -- not generate elaboration code.
1135
1136 -- Has_Pragma_Suppress_All (Flag14-Sem)
1137 -- This flag is set in an N_Compilation_Unit node if the Suppress_All
1138 -- pragma appears anywhere in the unit. This accomodates the rather
1139 -- strange placement rules of other compilers (DEC permits it at the
1140 -- end of a unit, and Rational allows it as a program unit pragma). We
1141 -- allow it anywhere at all, and consider it equivalent to a pragma
1142 -- Suppress (All_Checks) appearing at the start of the configuration
1143 -- pragmas for the unit.
1144
1145 -- Has_Pragma_Priority (Flag6-Sem)
1146 -- A flag present in N_Subprogram_Body, N_Task_Definition and
1147 -- N_Protected_Definition nodes to flag the presence of either a Priority
1148 -- or Interrupt_Priority pragma in the declaration sequence (public or
1149 -- private in the task and protected cases)
1150
1151 -- Has_Private_View (Flag11-Sem)
1152 -- A flag present in generic nodes that have an entity, to indicate that
1153 -- the node has a private type. Used to exchange private and full
1154 -- declarations if the visibility at instantiation is different from the
1155 -- visibility at generic definition.
1156
1157 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1158 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1159 -- flag the presence of a pragma Relative_Deadline.
1160
1161 -- Has_Self_Reference (Flag13-Sem)
1162 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1163 -- of the expressions contains an access attribute reference to the
1164 -- enclosing type. Such a self-reference can only appear in default-
1165 -- initialized aggregate for a record type.
1166
1167 -- Has_Storage_Size_Pragma (Flag5-Sem)
1168 -- A flag present in an N_Task_Definition node to flag the presence of a
1169 -- Storage_Size pragma.
1170
1171 -- Has_Task_Info_Pragma (Flag7-Sem)
1172 -- A flag present in an N_Task_Definition node to flag the presence of a
1173 -- Task_Info pragma. Used to detect duplicate pragmas.
1174
1175 -- Has_Task_Name_Pragma (Flag8-Sem)
1176 -- A flag present in N_Task_Definition nodes to flag the presence of a
1177 -- Task_Name pragma in the declaration sequence for the task.
1178
1179 -- Has_Wide_Character (Flag11-Sem)
1180 -- Present in string literals, set if any wide character (i.e. character
1181 -- code outside the Character range but within Wide_Character range)
1182 -- appears in the string. Used to implement pragma preference rules.
1183
1184 -- Has_Wide_Wide_Character (Flag13-Sem)
1185 -- Present in string literals, set if any wide character (i.e. character
1186 -- code outside the Wide_Character range) appears in the string. Used to
1187 -- implement pragma preference rules.
1188
1189 -- Hidden_By_Use_Clause (Elist4-Sem)
1190 -- An entity list present in use clauses that appear within
1191 -- instantiations. For the resolution of local entities, entities
1192 -- introduced by these use clauses have priority over global ones, and
1193 -- outer entities must be explicitly hidden/restored on exit.
1194
1195 -- Implicit_With (Flag16-Sem)
1196 -- This flag is set in the N_With_Clause node that is implicitly
1197 -- generated for runtime units that are loaded by the expander, and also
1198 -- for package System, if it is loaded implicitly by a use of the
1199 -- 'Address or 'Tag attribute. ???There are other implicit with clauses
1200 -- as well.
1201
1202 -- Import_Interface_Present (Flag16-Sem)
1203 -- This flag is set in an Interface or Import pragma if a matching
1204 -- pragma of the other kind is also present. This is used to avoid
1205 -- generating some unwanted error messages.
1206
1207 -- Includes_Infinities (Flag11-Sem)
1208 -- This flag is present in N_Range nodes. It is set for the range of
1209 -- unconstrained float types defined in Standard, which include not only
1210 -- the given range of values, but also legitimately can include infinite
1211 -- values. This flag is false for any float type for which an explicit
1212 -- range is given by the programmer, even if that range is identical to
1213 -- the range for Float.
1214
1215 -- Inherited_Discriminant (Flag13-Sem)
1216 -- This flag is present in N_Component_Association nodes. It indicates
1217 -- that a given component association in an extension aggregate is the
1218 -- value obtained from a constraint on an ancestor. Used to prevent
1219 -- double expansion when the aggregate has expansion delayed.
1220
1221 -- Instance_Spec (Node5-Sem)
1222 -- This field is present in generic instantiation nodes, and also in
1223 -- formal package declaration nodes (formal package declarations are
1224 -- treated in a manner very similar to package instantiations). It points
1225 -- to the node for the spec of the instance, inserted as part of the
1226 -- semantic processing for instantiations in Sem_Ch12.
1227
1228 -- Is_Accessibility_Actual (Flag12-Sem)
1229 -- Present in N_Parameter_Association nodes. True if the parameter is
1230 -- an extra actual that carries the accessibility level of the actual
1231 -- for an access parameter, in a function that dispatches on result and
1232 -- is called in a dispatching context. Used to prevent a formal/actual
1233 -- mismatch when the call is rewritten as a dispatching call.
1234
1235 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1236 -- A flag set in a Block_Statement node to indicate that it is the
1237 -- expansion of an asynchronous entry call. Such a block needs cleanup
1238 -- handler to assure that the call is cancelled.
1239
1240 -- Is_Component_Left_Opnd (Flag13-Sem)
1241 -- Is_Component_Right_Opnd (Flag14-Sem)
1242 -- Present in concatenation nodes, to indicate that the corresponding
1243 -- operand is of the component type of the result. Used in resolving
1244 -- concatenation nodes in instances.
1245
1246 -- Is_Delayed_Aspect (Flag14-Sem)
1247 -- Present in N_Pragma and N_Attribute_Definition_Clause nodes which
1248 -- come from aspect specifications, where the evaluation of the aspect
1249 -- must be delayed to the freeze point.
1250
1251 -- Is_Controlling_Actual (Flag16-Sem)
1252 -- This flag is set on in an expression that is a controlling argument in
1253 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1254 -- details of its use.
1255
1256 -- Is_Dynamic_Coextension (Flag18-Sem)
1257 -- Present in allocator nodes, to indicate that this is an allocator
1258 -- for an access discriminant of a dynamically allocated object. The
1259 -- coextension must be deallocated and finalized at the same time as
1260 -- the enclosing object.
1261
1262 -- Is_Entry_Barrier_Function (Flag8-Sem)
1263 -- This flag is set in an N_Subprogram_Body node which is the expansion
1264 -- of an entry barrier from a protected entry body. It is used for the
1265 -- circuitry checking for incorrect use of Current_Task.
1266
1267 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1268 -- This flag is set in an N_Function_Call node to indicate that the extra
1269 -- actuals to support a build-in-place style of call have been added to
1270 -- the call.
1271
1272 -- Is_In_Discriminant_Check (Flag11-Sem)
1273 -- This flag is present in a selected component, and is used to indicate
1274 -- that the reference occurs within a discriminant check. The
1275 -- significance is that optimizations based on assuming that the
1276 -- discriminant check has a correct value cannot be performed in this
1277 -- case (or the discriminant check may be optimized away!)
1278
1279 -- Is_Machine_Number (Flag11-Sem)
1280 -- This flag is set in an N_Real_Literal node to indicate that the value
1281 -- is a machine number. This avoids some unnecessary cases of converting
1282 -- real literals to machine numbers.
1283
1284 -- Is_Null_Loop (Flag16-Sem)
1285 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1286 -- can be determined to be null at compile time. This is used to remove
1287 -- the loop entirely at expansion time.
1288
1289 -- Is_Overloaded (Flag5-Sem)
1290 -- A flag present in all expression nodes. Used temporarily during
1291 -- overloading determination. The setting of this flag is not relevant
1292 -- once overloading analysis is complete.
1293
1294 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1295 -- A flag present only in N_Op_Expon nodes. It is set when the
1296 -- exponentiation is of the form 2 ** N, where the type of N is an
1297 -- unsigned integral subtype whose size does not exceed the size of
1298 -- Standard_Integer (i.e. a type that can be safely converted to
1299 -- Natural), and the exponentiation appears as the right operand of an
1300 -- integer multiplication or an integer division where the dividend is
1301 -- unsigned. It is also required that overflow checking is off for both
1302 -- the exponentiation and the multiply/divide node. If this set of
1303 -- conditions holds, and the flag is set, then the division or
1304 -- multiplication can be (and is) converted to a shift.
1305
1306 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1307 -- A flag set in a Subprogram_Body block to indicate that it is the
1308 -- implementation of a protected subprogram. Such a body needs cleanup
1309 -- handler to make sure that the associated protected object is unlocked
1310 -- when the subprogram completes.
1311
1312 -- Is_Static_Coextension (Flag14-Sem)
1313 -- Present in N_Allocator nodes. Set if the allocator is a coextension
1314 -- of an object allocated on the stack rather than the heap.
1315
1316 -- Is_Static_Expression (Flag6-Sem)
1317 -- Indicates that an expression is a static expression (RM 4.9). See spec
1318 -- of package Sem_Eval for full details on the use of this flag.
1319
1320 -- Is_Subprogram_Descriptor (Flag16-Sem)
1321 -- Present in N_Object_Declaration, and set only for the object
1322 -- declaration generated for a subprogram descriptor in fast exception
1323 -- mode. See Exp_Ch11 for details of use.
1324
1325 -- Is_Task_Allocation_Block (Flag6-Sem)
1326 -- A flag set in a Block_Statement node to indicate that it is the
1327 -- expansion of a task allocator, or the allocator of an object
1328 -- containing tasks. Such a block requires a cleanup handler to call
1329 -- Expunge_Unactivated_Tasks to complete any tasks that have been
1330 -- allocated but not activated when the allocator completes abnormally.
1331
1332 -- Is_Task_Master (Flag5-Sem)
1333 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1334 -- indicate that the construct is a task master (i.e. has declared tasks
1335 -- or declares an access to a task type).
1336
1337 -- Itype (Node1-Sem)
1338 -- Used in N_Itype_Reference node to reference an itype for which it is
1339 -- important to ensure that it is defined. See description of this node
1340 -- for further details.
1341
1342 -- Kill_Range_Check (Flag11-Sem)
1343 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1344 -- result should not be subjected to range checks. This is used for the
1345 -- implementation of Normalize_Scalars.
1346
1347 -- Label_Construct (Node2-Sem)
1348 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1349 -- N_Block_Statement or N_Loop_Statement node to which the label
1350 -- declaration applies. This is not currently used in the compiler
1351 -- itself, but it is useful in the implementation of ASIS queries.
1352 -- This field is left empty for the special labels generated as part
1353 -- of expanding raise statements with a local exception handler.
1354
1355 -- Library_Unit (Node4-Sem)
1356 -- In a stub node, Library_Unit points to the compilation unit node of
1357 -- the corresponding subunit.
1358 --
1359 -- In a with clause node, Library_Unit points to the spec of the with'ed
1360 -- unit.
1361 --
1362 -- In a compilation unit node, the usage depends on the unit type:
1363 --
1364 -- For a library unit body, Library_Unit points to the compilation unit
1365 -- node of the corresponding spec, unless it's a subprogram body with
1366 -- Acts_As_Spec set, in which case it points to itself.
1367 --
1368 -- For a spec, Library_Unit points to the compilation unit node of the
1369 -- corresponding body, if present. The body will be present if the spec
1370 -- is or contains generics that we needed to instantiate. Similarly, the
1371 -- body will be present if we needed it for inlining purposes. Thus, if
1372 -- we have a spec/body pair, both of which are present, they point to
1373 -- each other via Library_Unit.
1374 --
1375 -- For a subunit, Library_Unit points to the compilation unit node of
1376 -- the parent body.
1377 --
1378 -- Note that this field is not used to hold the parent pointer for child
1379 -- unit (which might in any case need to use it for some other purpose as
1380 -- described above). Instead for a child unit, implicit with's are
1381 -- generated for all parents.
1382
1383 -- Local_Raise_Statements (Elist1)
1384 -- This field is present in exception handler nodes. It is set to
1385 -- No_Elist in the normal case. If there is at least one raise statement
1386 -- which can potentially be handled as a local raise, then this field
1387 -- points to a list of raise nodes, which are calls to a routine to raise
1388 -- an exception. These are raise nodes which can be optimized into gotos
1389 -- if the handler turns out to meet the conditions which permit this
1390 -- transformation. Note that this does NOT include instances of the
1391 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
1392 -- handled by the back end (using the N_Push/N_Pop mechanism).
1393
1394 -- Loop_Actions (List2-Sem)
1395 -- A list present in Component_Association nodes in array aggregates.
1396 -- Used to collect actions that must be executed within the loop because
1397 -- they may need to be evaluated anew each time through.
1398
1399 -- Limited_View_Installed (Flag18-Sem)
1400 -- Present in With_Clauses and in package specifications. If set on
1401 -- with_clause, it indicates that this clause has created the current
1402 -- limited view of the designated package. On a package specification, it
1403 -- indicates that the limited view has already been created because the
1404 -- package is mentioned in a limited_with_clause in the closure of the
1405 -- unit being compiled.
1406
1407 -- Local_Raise_Not_OK (Flag7-Sem)
1408 -- Present in N_Exception_Handler nodes. Set if the handler contains
1409 -- a construct (reraise statement, or call to subprogram in package
1410 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
1411 -- for a local raise (one that could otherwise be converted to a goto).
1412
1413 -- Must_Be_Byte_Aligned (Flag14-Sem)
1414 -- This flag is present in N_Attribute_Reference nodes. It can be set
1415 -- only for the Address and Unrestricted_Access attributes. If set it
1416 -- means that the object for which the address/access is given must be on
1417 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
1418 -- of the object is to be made before taking the address (this copy is in
1419 -- the current scope on the stack frame). This is used for certain cases
1420 -- of code generated by the expander that passes parameters by address.
1421 --
1422 -- The reason the copy is not made by the front end is that the back end
1423 -- has more information about type layout and may be able to (but is not
1424 -- guaranteed to) prevent making unnecessary copies.
1425
1426 -- Must_Not_Freeze (Flag8-Sem)
1427 -- A flag present in all expression nodes. Normally expressions cause
1428 -- freezing as described in the RM. If this flag is set, then this is
1429 -- inhibited. This is used by the analyzer and expander to label nodes
1430 -- that are created by semantic analysis or expansion and which must not
1431 -- cause freezing even though they normally would. This flag is also
1432 -- present in an N_Subtype_Indication node, since we also use these in
1433 -- calls to Freeze_Expression.
1434
1435 -- Next_Entity (Node2-Sem)
1436 -- Present in defining identifiers, defining character literals and
1437 -- defining operator symbols (i.e. in all entities). The entities of a
1438 -- scope are chained, and this field is used as the forward pointer for
1439 -- this list. See Einfo for further details.
1440
1441 -- Next_Exit_Statement (Node3-Sem)
1442 -- Present in N_Exit_Statement nodes. The exit statements for a loop are
1443 -- chained (in reverse order of appearence) from the First_Exit_Statement
1444 -- field of the E_Loop entity for the loop. Next_Exit_Statement points to
1445 -- the next entry on this chain (Empty = end of list).
1446
1447 -- Next_Implicit_With (Node3-Sem)
1448 -- Present in N_With_Clause. Part of a chain of with_clauses generated
1449 -- in rtsfind to indicate implicit dependencies on predefined units. Used
1450 -- to prevent multiple with_clauses for the same unit in a given context.
1451 -- A postorder traversal of the tree whose nodes are units and whose
1452 -- links are with_clauses defines the order in which Inspector must
1453 -- examine a compiled unit and its full context. This ordering ensures
1454 -- that any subprogram call is examined after the subprogram declartion
1455 -- has been seen.
1456
1457 -- Next_Named_Actual (Node4-Sem)
1458 -- Present in parameter association node. Set during semantic analysis to
1459 -- point to the next named parameter, where parameters are ordered by
1460 -- declaration order (as opposed to the actual order in the call, which
1461 -- may be different due to named associations). Not that this field
1462 -- points to the explicit actual parameter itself, not to the
1463 -- N_Parameter_Association node (its parent).
1464
1465 -- Next_Pragma (Node1-Sem)
1466 -- Present in N_Pragma nodes. Used to create a linked list of pragma
1467 -- nodes. Currently used for two purposes:
1468 --
1469 -- Create a list of linked Check_Policy pragmas. The head of this list
1470 -- is stored in Opt.Check_Policy_List (which has further details).
1471 --
1472 -- Used by processing for Pre/Postcondition pragmas to store a list of
1473 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
1474 -- details).
1475
1476 -- Next_Rep_Item (Node5-Sem)
1477 -- Present in pragma nodes, attribute definition nodes, enumeration rep
1478 -- clauses, record rep clauses, aspect specification nodes. Used to link
1479 -- representation items that apply to an entity. See full description of
1480 -- First_Rep_Item field in Einfo for further details.
1481
1482 -- Next_Use_Clause (Node3-Sem)
1483 -- While use clauses are active during semantic processing, they are
1484 -- chained from the scope stack entry, using Next_Use_Clause as a link
1485 -- pointer, with Empty marking the end of the list. The head pointer is
1486 -- in the scope stack entry (First_Use_Clause). At the end of semantic
1487 -- processing (i.e. when Gigi sees the tree, the contents of this field
1488 -- is undefined and should not be read).
1489
1490 -- No_Ctrl_Actions (Flag7-Sem)
1491 -- Present in N_Assignment_Statement to indicate that no finalize nor
1492 -- adjust should take place on this assignment even though the rhs is
1493 -- controlled. This is used in init procs and aggregate expansions where
1494 -- the generated assignments are more initialisations than real
1495 -- assignments.
1496
1497 -- No_Elaboration_Check (Flag14-Sem)
1498 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1499 -- that no elaboration check is needed on the call, because it appears in
1500 -- the context of a local Suppress pragma. This is used on calls within
1501 -- task bodies, where the actual elaboration checks are applied after
1502 -- analysis, when the local scope stack is not present.
1503
1504 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1505 -- Present in N_With_Clause nodes. Set if the with clause is on the
1506 -- package or subprogram spec where the main unit is the corresponding
1507 -- body, and no entities of the with'ed unit are referenced by the spec
1508 -- (an entity may still be referenced in the body, so this flag is used
1509 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1510 -- full details)
1511
1512 -- No_Initialization (Flag13-Sem)
1513 -- Present in N_Object_Declaration and N_Allocator to indicate that the
1514 -- object must not be initialized (by Initialize or call to an init
1515 -- proc). This is needed for controlled aggregates. When the Object
1516 -- declaration has an expression, this flag means that this expression
1517 -- should not be taken into account (needed for in place initialization
1518 -- with aggregates).
1519
1520 -- No_Truncation (Flag17-Sem)
1521 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
1522 -- only if the RM_Size of the source is greater than the RM_Size of the
1523 -- target for scalar operands. Normally in such a case we truncate some
1524 -- higher order bits of the source, and then sign/zero extend the result
1525 -- to form the output value. But if this flag is set, then we do not do
1526 -- any truncation, so for example, if an 8 bit input is converted to 5
1527 -- bit result which is in fact stored in 8 bits, then the high order
1528 -- three bits of the target result will be copied from the source. This
1529 -- is used for properly setting out of range values for use by pragmas
1530 -- Initialize_Scalars and Normalize_Scalars.
1531
1532 -- Original_Discriminant (Node2-Sem)
1533 -- Present in identifiers. Used in references to discriminants that
1534 -- appear in generic units. Because the names of the discriminants may be
1535 -- different in an instance, we use this field to recover the position of
1536 -- the discriminant in the original type, and replace it with the
1537 -- discriminant at the same position in the instantiated type.
1538
1539 -- Original_Entity (Node2-Sem)
1540 -- Present in numeric literals. Used to denote the named number that has
1541 -- been constant-folded into the given literal. If literal is from
1542 -- source, or the result of some other constant-folding operation, then
1543 -- Original_Entity is empty. This field is needed to handle properly
1544 -- named numbers in generic units, where the Associated_Node field
1545 -- interferes with the Entity field, making it impossible to preserve the
1546 -- original entity at the point of instantiation (ASIS problem).
1547
1548 -- Others_Discrete_Choices (List1-Sem)
1549 -- When a case statement or variant is analyzed, the semantic checks
1550 -- determine the actual list of choices that correspond to an others
1551 -- choice. This list is materialized for later use by the expander and
1552 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
1553 -- this materialized list of choices, which is in standard format for a
1554 -- list of discrete choices, except that of course it cannot contain an
1555 -- N_Others_Choice entry.
1556
1557 -- Parameter_List_Truncated (Flag17-Sem)
1558 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. Set
1559 -- (for OpenVMS ports of GNAT only) if the parameter list is truncated as
1560 -- a result of a First_Optional_Parameter specification in an
1561 -- Import_Function, Import_Procedure, or Import_Valued_Procedure pragma.
1562 -- The truncation is done by the expander by removing trailing parameters
1563 -- from the argument list, in accordance with the set of rules allowing
1564 -- such parameter removal. In particular, parameters can be removed
1565 -- working from the end of the parameter list backwards up to and
1566 -- including the entry designated by First_Optional_Parameter in the
1567 -- Import pragma. Parameters can be removed if they are implicit and the
1568 -- default value is a known-at-compile-time value, including the use of
1569 -- the Null_Parameter attribute, or if explicit parameter values are
1570 -- present that match the corresponding defaults.
1571
1572 -- Parent_Spec (Node4-Sem)
1573 -- For a library unit that is a child unit spec (package or subprogram
1574 -- declaration, generic declaration or instantiation, or library level
1575 -- rename, this field points to the compilation unit node for the parent
1576 -- package specification. This field is Empty for library bodies (the
1577 -- parent spec in this case can be found from the corresponding spec).
1578
1579 -- Pragma_Enabled (Flag5-Sem)
1580 -- Present in N_Pragma nodes. This flag is relevant only for pragmas
1581 -- Assert, Check, Precondition, and Postcondition. It is true if the
1582 -- check corresponding to the pragma type is enabled at the point where
1583 -- the pragma appears.
1584
1585 -- Present_Expr (Uint3-Sem)
1586 -- Present in an N_Variant node. This has a meaningful value only after
1587 -- Gigi has back annotated the tree with representation information. At
1588 -- this point, it contains a reference to a gcc expression that depends
1589 -- on the values of one or more discriminants. Give a set of discriminant
1590 -- values, this expression evaluates to False (zero) if variant is not
1591 -- present, and True (non-zero) if it is present. See unit Repinfo for
1592 -- further details on gigi back annotation. This field is used during
1593 -- ASIS processing (data decomposition annex) to determine if a field is
1594 -- present or not.
1595
1596 -- Print_In_Hex (Flag13-Sem)
1597 -- Set on an N_Integer_Literal node to indicate that the value should be
1598 -- printed in hexadecimal in the sprint listing. Has no effect on
1599 -- legality or semantics of program, only on the displayed output. This
1600 -- is used to clarify output from the packed array cases.
1601
1602 -- Procedure_To_Call (Node2-Sem)
1603 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1604 -- and N_Extended_Return_Statement nodes. References the entity for the
1605 -- declaration of the procedure to be called to accomplish the required
1606 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
1607 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
1608 -- allocating the return value), and for the Deallocate procedure in the
1609 -- case of N_Free_Statement.
1610
1611 -- Raises_Constraint_Error (Flag7-Sem)
1612 -- Set on an expression whose evaluation will definitely fail constraint
1613 -- error check. In the case of static expressions, this flag must be set
1614 -- accurately (and if it is set, the expression is typically illegal
1615 -- unless it appears as a non-elaborated branch of a short-circuit form).
1616 -- For a non-static expression, this flag may be set whenever an
1617 -- expression (e.g. an aggregate) is known to raise constraint error. If
1618 -- set, the expression definitely will raise CE if elaborated at runtime.
1619 -- If not set, the expression may or may not raise CE. In other words, on
1620 -- static expressions, the flag is set accurately, on non-static
1621 -- expressions it is set conservatively.
1622
1623 -- Redundant_Use (Flag13-Sem)
1624 -- Present in nodes that can appear as an operand in a use clause or use
1625 -- type clause (identifiers, expanded names, attribute references). Set
1626 -- to indicate that a use is redundant (and therefore need not be undone
1627 -- on scope exit).
1628
1629 -- Renaming_Exception (Node2-Sem)
1630 -- Present in N_Exception_Declaration node. Used to point back to the
1631 -- exception renaming for an exception declared within a subprogram.
1632 -- What happens is that an exception declared in a subprogram is moved
1633 -- to the library level with a unique name, and the original exception
1634 -- becomes a renaming. This link from the library level exception to the
1635 -- renaming declaration allows registering of the proper exception name.
1636
1637 -- Return_Statement_Entity (Node5-Sem)
1638 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
1639 -- Points to an E_Return_Statement representing the return statement.
1640
1641 -- Return_Object_Declarations (List3)
1642 -- Present in N_Extended_Return_Statement.
1643 -- Points to a list initially containing a single
1644 -- N_Object_Declaration representing the return object.
1645 -- We use a list (instead of just a pointer to the object decl)
1646 -- because Analyze wants to insert extra actions on this list.
1647
1648 -- Rounded_Result (Flag18-Sem)
1649 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1650 -- Used in the fixed-point cases to indicate that the result must be
1651 -- rounded as a result of the use of the 'Round attribute. Also used for
1652 -- integer N_Op_Divide nodes to indicate that the result should be
1653 -- rounded to the nearest integer (breaking ties away from zero), rather
1654 -- than truncated towards zero as usual. These rounded integer operations
1655 -- are the result of expansion of rounded fixed-point divide, conversion
1656 -- and multiplication operations.
1657
1658 -- SCIL_Entity (Node4-Sem)
1659 -- Present in SCIL nodes. Used to reference the tagged type associated
1660 -- with the SCIL node.
1661
1662 -- SCIL_Controlling_Tag (Node5-Sem)
1663 -- Present in N_SCIL_Dispatching_Call nodes. Used to reference the
1664 -- controlling tag of a dispatching call.
1665
1666 -- SCIL_Tag_Value (Node5-Sem)
1667 -- Present in N_SCIL_Membership_Test nodes. Used to reference the tag
1668 -- value that is being tested.
1669
1670 -- SCIL_Target_Prim (Node2-Sem)
1671 -- Present in N_SCIL_Dispatching_Call nodes. Used to reference the tagged
1672 -- type primitive associated with the SCIL node.
1673
1674 -- Scope (Node3-Sem)
1675 -- Present in defining identifiers, defining character literals and
1676 -- defining operator symbols (i.e. in all entities). The entities of a
1677 -- scope all use this field to reference the corresponding scope entity.
1678 -- See Einfo for further details.
1679
1680 -- Shift_Count_OK (Flag4-Sem)
1681 -- A flag present in shift nodes to indicate that the shift count is
1682 -- known to be in range, i.e. is in the range from zero to word length
1683 -- minus one. If this flag is not set, then the shift count may be
1684 -- outside this range, i.e. larger than the word length, and the code
1685 -- must ensure that such shift counts give the appropriate result.
1686
1687 -- Source_Type (Node1-Sem)
1688 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1689 -- source type entity for the unchecked conversion instantiation
1690 -- which gigi must do size validation for.
1691
1692 -- Static_Processing_OK (Flag4-Sem)
1693 -- Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate
1694 -- flag is set, the full value of the aggregate can be determined at
1695 -- compile time and the aggregate can be passed as is to the back-end.
1696 -- In this event it is irrelevant whether this flag is set or not.
1697 -- However, if the flag Compile_Time_Known_Aggregate is not set but
1698 -- Static_Processing_OK is set, the aggregate can (but need not) be
1699 -- converted into a compile time known aggregate by the expander. See
1700 -- Sem_Aggr for the specific conditions under which an aggregate has its
1701 -- Static_Processing_OK flag set.
1702
1703 -- Storage_Pool (Node1-Sem)
1704 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1705 -- and N_Extended_Return_Statement nodes. References the entity for the
1706 -- storage pool to be used for the allocate or free call or for the
1707 -- allocation of the returned value from function. Empty indicates that
1708 -- the global default pool is to be used. Note that in the case
1709 -- of a return statement, this field is set only if the function returns
1710 -- value of a type whose size is not known at compile time on the
1711 -- secondary stack.
1712
1713 -- Suppress_Loop_Warnings (Flag17-Sem)
1714 -- Used in N_Loop_Statement node to indicate that warnings within the
1715 -- body of the loop should be suppressed. This is set when the range
1716 -- of a FOR loop is known to be null, or is probably null (loop would
1717 -- only execute if invalid values are present).
1718
1719 -- Target_Type (Node2-Sem)
1720 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
1721 -- type entity for the unchecked conversion instantiation which gigi must
1722 -- do size validation for.
1723
1724 -- Then_Actions (List3-Sem)
1725 -- This field is present in conditional expression nodes. During code
1726 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1727 -- actions at an appropriate place in the tree to get elaborated at the
1728 -- right time. For conditional expressions, we have to be sure that the
1729 -- actions for the Then branch are only elaborated if the condition is
1730 -- True. The Then_Actions field is used as a temporary parking place for
1731 -- these actions. The final tree is always rewritten to eliminate the
1732 -- need for this field, so in the tree passed to Gigi, this field is
1733 -- always set to No_List.
1734
1735 -- Treat_Fixed_As_Integer (Flag14-Sem)
1736 -- This flag appears in operator nodes for divide, multiply, mod and rem
1737 -- on fixed-point operands. It indicates that the operands are to be
1738 -- treated as integer values, ignoring small values. This flag is only
1739 -- set as a result of expansion of fixed-point operations. Typically a
1740 -- fixed-point multiplication in the source generates subsidiary
1741 -- multiplication and division operations that work with the underlying
1742 -- integer values and have this flag set. Note that this flag is not
1743 -- needed on other arithmetic operations (add, neg, subtract etc.) since
1744 -- in these cases it is always the case that fixed is treated as integer.
1745 -- The Etype field MUST be set if this flag is set. The analyzer knows to
1746 -- leave such nodes alone, and whoever makes them must set the correct
1747 -- Etype value.
1748
1749 -- TSS_Elist (Elist3-Sem)
1750 -- Present in N_Freeze_Entity nodes. Holds an element list containing
1751 -- entries for each TSS (type support subprogram) associated with the
1752 -- frozen type. The elements of the list are the entities for the
1753 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
1754 -- if there are no type support subprograms for the type or if the freeze
1755 -- node is not for a type.
1756
1757 -- Unreferenced_In_Spec (Flag7-Sem)
1758 -- Present in N_With_Clause nodes. Set if the with clause is on the
1759 -- package or subprogram spec where the main unit is the corresponding
1760 -- body, and is not referenced by the spec (it may still be referenced by
1761 -- the body, so this flag is used to generate the proper message (see
1762 -- Sem_Util.Check_Unused_Withs for details)
1763
1764 -- Was_Originally_Stub (Flag13-Sem)
1765 -- This flag is set in the node for a proper body that replaces stub.
1766 -- During the analysis procedure, stubs in some situations get rewritten
1767 -- by the corresponding bodies, and we set this flag to remember that
1768 -- this happened. Note that it is not good enough to rely on the use of
1769 -- Original_Node here because of the case of nested instantiations where
1770 -- the substituted node can be copied.
1771
1772 -- Withed_Body (Node1-Sem)
1773 -- Present in N_With_Clause nodes. Set if the unit in whose context
1774 -- the with_clause appears instantiates a generic contained in the
1775 -- library unit of the with_clause and as a result loads its body.
1776 -- Used for a more precise unit traversal for CodePeer.
1777
1778 -- Zero_Cost_Handling (Flag5-Sem)
1779 -- This flag is set in all handled sequence of statement and exception
1780 -- handler nodes if exceptions are to be handled using the zero-cost
1781 -- mechanism (see Ada.Exceptions and System.Exceptions in files
1782 -- a-except.ads/adb and s-except.ads for full details). What gigi needs
1783 -- to do for such a handler is simply to put the code in the handler
1784 -- somewhere. The front end has generated all necessary labels.
1785
1786 --------------------------------------------------
1787 -- Note on Use of End_Label and End_Span Fields --
1788 --------------------------------------------------
1789
1790 -- Several constructs have end lines:
1791
1792 -- Loop Statement end loop [loop_IDENTIFIER];
1793 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
1794 -- Task Definition end [task_IDENTIFIER]
1795 -- Protected Definition end [protected_IDENTIFIER]
1796 -- Protected Body end [protected_IDENTIFIER]
1797
1798 -- Block Statement end [block_IDENTIFIER];
1799 -- Subprogram Body end [DESIGNATOR];
1800 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
1801 -- Task Body end [task_IDENTIFIER];
1802 -- Accept Statement end [entry_IDENTIFIER]];
1803 -- Entry Body end [entry_IDENTIFIER];
1804
1805 -- If Statement end if;
1806 -- Case Statement end case;
1807
1808 -- Record Definition end record;
1809 -- Enumeration Definition );
1810
1811 -- The End_Label and End_Span fields are used to mark the locations of
1812 -- these lines, and also keep track of the label in the case where a label
1813 -- is present.
1814
1815 -- For the first group above, the End_Label field of the corresponding node
1816 -- is used to point to the label identifier. In the case where there is no
1817 -- label in the source, the parser supplies a dummy identifier (with
1818 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
1819 -- marks the location of the token following the END token.
1820
1821 -- For the second group, the use of End_Label is similar, but the End_Label
1822 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
1823 -- simply because in some cases there is no room in the parent node.
1824
1825 -- For the third group, there is never any label, and instead of using
1826 -- End_Label, we use the End_Span field which gives the location of the
1827 -- token following END, relative to the starting Sloc of the construct,
1828 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
1829 -- following the End_Label.
1830
1831 -- The record definition case is handled specially, we treat it as though
1832 -- it required an optional label which is never present, and so the parser
1833 -- always builds a dummy identifier with Comes From Source set False. The
1834 -- reason we do this, rather than using End_Span in this case, is that we
1835 -- want to generate a cross-ref entry for the end of a record, since it
1836 -- represents a scope for name declaration purposes.
1837
1838 -- The enumeration definition case is handled in an exactly similar manner,
1839 -- building a dummy identifier to get a cross-reference.
1840
1841 -- Note: the reason we store the difference as a Uint, instead of storing
1842 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
1843 -- distinguished from other types of values, and we count on all general
1844 -- use fields being self describing. To make things easier for clients,
1845 -- note that we provide function End_Location, and procedure
1846 -- Set_End_Location to allow access to the logical value (which is the
1847 -- Source_Ptr value for the end token).
1848
1849 ---------------------
1850 -- Syntactic Nodes --
1851 ---------------------
1852
1853 ---------------------
1854 -- 2.3 Identifier --
1855 ---------------------
1856
1857 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
1858 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
1859
1860 -- An IDENTIFIER shall not be a reserved word
1861
1862 -- In the Ada grammar identifiers are the bottom level tokens which have
1863 -- very few semantics. Actual program identifiers are direct names. If
1864 -- we were being 100% honest with the grammar, then we would have a node
1865 -- called N_Direct_Name which would point to an identifier. However,
1866 -- that's too many extra nodes, so we just use the N_Identifier node
1867 -- directly as a direct name, and it contains the expression fields and
1868 -- Entity field that correspond to its use as a direct name. In those
1869 -- few cases where identifiers appear in contexts where they are not
1870 -- direct names (pragmas, pragma argument associations, attribute
1871 -- references and attribute definition clauses), the Chars field of the
1872 -- node contains the Name_Id for the identifier name.
1873
1874 -- Note: in GNAT, a reserved word can be treated as an identifier in two
1875 -- cases. First, an incorrect use of a reserved word as an identifier is
1876 -- diagnosed and then treated as a normal identifier. Second, an
1877 -- attribute designator of the form of a reserved word (access, delta,
1878 -- digits, range) is treated as an identifier.
1879
1880 -- Note: The set of letters that is permitted in an identifier depends
1881 -- on the character set in use. See package Csets for full details.
1882
1883 -- N_Identifier
1884 -- Sloc points to identifier
1885 -- Chars (Name1) contains the Name_Id for the identifier
1886 -- Entity (Node4-Sem)
1887 -- Associated_Node (Node4-Sem)
1888 -- Original_Discriminant (Node2-Sem)
1889 -- Redundant_Use (Flag13-Sem)
1890 -- Has_Private_View (Flag11-Sem) (set in generic units)
1891 -- plus fields for expression
1892
1893 --------------------------
1894 -- 2.4 Numeric Literal --
1895 --------------------------
1896
1897 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
1898
1899 ----------------------------
1900 -- 2.4.1 Decimal Literal --
1901 ----------------------------
1902
1903 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
1904
1905 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
1906
1907 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
1908
1909 -- Decimal literals appear in the tree as either integer literal nodes
1910 -- or real literal nodes, depending on whether a period is present.
1911
1912 -- Note: literal nodes appear as a result of direct use of literals
1913 -- in the source program, and also as the result of evaluating
1914 -- expressions at compile time. In the latter case, it is possible
1915 -- to construct real literals that have no syntactic representation
1916 -- using the standard literal format. Such literals are listed by
1917 -- Sprint using the notation [numerator / denominator].
1918
1919 -- Note: the value of an integer literal node created by the front end
1920 -- is never outside the range of values of the base type. However, it
1921 -- can be the case that the value is outside the range of the
1922 -- particular subtype. This happens in the case of integer overflows
1923 -- with checks suppressed.
1924
1925 -- N_Integer_Literal
1926 -- Sloc points to literal
1927 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1928 -- has been constant-folded into its literal value.
1929 -- Intval (Uint3) contains integer value of literal
1930 -- plus fields for expression
1931 -- Print_In_Hex (Flag13-Sem)
1932
1933 -- N_Real_Literal
1934 -- Sloc points to literal
1935 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1936 -- has been constant-folded into its literal value.
1937 -- Realval (Ureal3) contains real value of literal
1938 -- Corresponding_Integer_Value (Uint4-Sem)
1939 -- Is_Machine_Number (Flag11-Sem)
1940 -- plus fields for expression
1941
1942 --------------------------
1943 -- 2.4.2 Based Literal --
1944 --------------------------
1945
1946 -- BASED_LITERAL ::=
1947 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
1948
1949 -- BASE ::= NUMERAL
1950
1951 -- BASED_NUMERAL ::=
1952 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
1953
1954 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
1955
1956 -- Based literals appear in the tree as either integer literal nodes
1957 -- or real literal nodes, depending on whether a period is present.
1958
1959 ----------------------------
1960 -- 2.5 Character Literal --
1961 ----------------------------
1962
1963 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
1964
1965 -- N_Character_Literal
1966 -- Sloc points to literal
1967 -- Chars (Name1) contains the Name_Id for the identifier
1968 -- Char_Literal_Value (Uint2) contains the literal value
1969 -- Entity (Node4-Sem)
1970 -- Associated_Node (Node4-Sem)
1971 -- Has_Private_View (Flag11-Sem) set in generic units.
1972 -- plus fields for expression
1973
1974 -- Note: the Entity field will be missing (set to Empty) for character
1975 -- literals whose type is Standard.Wide_Character or Standard.Character
1976 -- or a type derived from one of these two. In this case the character
1977 -- literal stands for its own coding. The reason we take this irregular
1978 -- short cut is to avoid the need to build lots of junk defining
1979 -- character literal nodes.
1980
1981 -------------------------
1982 -- 2.6 String Literal --
1983 -------------------------
1984
1985 -- STRING LITERAL ::= "{STRING_ELEMENT}"
1986
1987 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
1988 -- single GRAPHIC_CHARACTER other than a quotation mark.
1989 --
1990 -- Is_Folded_In_Parser is True if the parser created this literal by
1991 -- folding a sequence of "&" operators. For example, if the source code
1992 -- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
1993 -- is set. This flag is needed because the parser doesn't know about
1994 -- visibility, so the folded result might be wrong, and semantic
1995 -- analysis needs to check for that.
1996
1997 -- N_String_Literal
1998 -- Sloc points to literal
1999 -- Strval (Str3) contains Id of string value
2000 -- Has_Wide_Character (Flag11-Sem)
2001 -- Has_Wide_Wide_Character (Flag13-Sem)
2002 -- Is_Folded_In_Parser (Flag4)
2003 -- plus fields for expression
2004
2005 ------------------
2006 -- 2.7 Comment --
2007 ------------------
2008
2009 -- A COMMENT starts with two adjacent hyphens and extends up to the
2010 -- end of the line. A COMMENT may appear on any line of a program.
2011
2012 -- Comments are skipped by the scanner and do not appear in the tree.
2013 -- It is possible to reconstruct the position of comments with respect
2014 -- to the elements of the tree by using the source position (Sloc)
2015 -- pointers that appear in every tree node.
2016
2017 -----------------
2018 -- 2.8 Pragma --
2019 -----------------
2020
2021 -- PRAGMA ::= pragma IDENTIFIER
2022 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
2023
2024 -- Note that a pragma may appear in the tree anywhere a declaration
2025 -- or a statement may appear, as well as in some other situations
2026 -- which are explicitly documented.
2027
2028 -- N_Pragma
2029 -- Sloc points to PRAGMA
2030 -- Next_Pragma (Node1-Sem)
2031 -- Pragma_Argument_Associations (List2) (set to No_List if none)
2032 -- Debug_Statement (Node3) (set to Empty if not Debug)
2033 -- Pragma_Identifier (Node4)
2034 -- Next_Rep_Item (Node5-Sem)
2035 -- Pragma_Enabled (Flag5-Sem)
2036 -- From_Aspect_Specification (Flag13-Sem)
2037 -- Is_Delayed_Aspect (Flag14-Sem)
2038 -- Import_Interface_Present (Flag16-Sem)
2039 -- Aspect_Cancel (Flag11-Sem)
2040 -- Class_Present (Flag6) (set False if not from Aspect with 'Class)
2041
2042 -- Note: we should have a section on what pragmas are passed on to
2043 -- the back end to be processed. This section should note that pragma
2044 -- Psect_Object is always converted to Common_Object, but there are
2045 -- undoubtedly many other similar notes required ???
2046
2047 -- Note: a utility function Pragma_Name may be applied to pragma nodes
2048 -- to conveniently obtain the Chars field of the Pragma_Identifier.
2049
2050 -- Note: if From_Aspect_Specification is set, then Sloc points to the
2051 -- aspect name, as does the Pragma_Identifier. In this case if the
2052 -- pragma has a local name argument (such as pragma Inline), it is
2053 -- resolved to point to the specific entity affected by the pragma.
2054
2055 --------------------------------------
2056 -- 2.8 Pragma Argument Association --
2057 --------------------------------------
2058
2059 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2060 -- [pragma_argument_IDENTIFIER =>] NAME
2061 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
2062
2063 -- N_Pragma_Argument_Association
2064 -- Sloc points to first token in association
2065 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
2066 -- Expression (Node3)
2067
2068 ------------------------
2069 -- 2.9 Reserved Word --
2070 ------------------------
2071
2072 -- Reserved words are parsed by the scanner, and returned as the
2073 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
2074
2075 ----------------------------
2076 -- 3.1 Basic Declaration --
2077 ----------------------------
2078
2079 -- BASIC_DECLARATION ::=
2080 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
2081 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
2082 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
2083 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
2084 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
2085 -- | GENERIC_INSTANTIATION
2086
2087 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
2088 -- see further description in section on semantic nodes.
2089
2090 -- Also, in the tree that is constructed, a pragma may appear
2091 -- anywhere that a declaration may appear.
2092
2093 ------------------------------
2094 -- 3.1 Defining Identifier --
2095 ------------------------------
2096
2097 -- DEFINING_IDENTIFIER ::= IDENTIFIER
2098
2099 -- A defining identifier is an entity, which has additional fields
2100 -- depending on the setting of the Ekind field. These additional
2101 -- fields are defined (and access subprograms declared) in package
2102 -- Einfo.
2103
2104 -- Note: N_Defining_Identifier is an extended node whose fields are
2105 -- deliberate layed out to match the layout of fields in an ordinary
2106 -- N_Identifier node allowing for easy alteration of an identifier
2107 -- node into a defining identifier node. For details, see procedure
2108 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
2109
2110 -- N_Defining_Identifier
2111 -- Sloc points to identifier
2112 -- Chars (Name1) contains the Name_Id for the identifier
2113 -- Next_Entity (Node2-Sem)
2114 -- Scope (Node3-Sem)
2115 -- Etype (Node5-Sem)
2116
2117 -----------------------------
2118 -- 3.2.1 Type Declaration --
2119 -----------------------------
2120
2121 -- TYPE_DECLARATION ::=
2122 -- FULL_TYPE_DECLARATION
2123 -- | INCOMPLETE_TYPE_DECLARATION
2124 -- | PRIVATE_TYPE_DECLARATION
2125 -- | PRIVATE_EXTENSION_DECLARATION
2126
2127 ----------------------------------
2128 -- 3.2.1 Full Type Declaration --
2129 ----------------------------------
2130
2131 -- FULL_TYPE_DECLARATION ::=
2132 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2133 -- is TYPE_DEFINITION
2134 -- [ASPECT_SPECIFICATIONS];
2135
2136 -- | TASK_TYPE_DECLARATION
2137 -- | PROTECTED_TYPE_DECLARATION
2138
2139 -- The full type declaration node is used only for the first case. The
2140 -- second case (concurrent type declaration), is represented directly
2141 -- by a task type declaration or a protected type declaration.
2142
2143 -- N_Full_Type_Declaration
2144 -- Sloc points to TYPE
2145 -- Defining_Identifier (Node1)
2146 -- Discriminant_Specifications (List4) (set to No_List if none)
2147 -- Type_Definition (Node3)
2148 -- Discr_Check_Funcs_Built (Flag11-Sem)
2149
2150 ----------------------------
2151 -- 3.2.1 Type Definition --
2152 ----------------------------
2153
2154 -- TYPE_DEFINITION ::=
2155 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2156 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2157 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
2158 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
2159
2160 --------------------------------
2161 -- 3.2.2 Subtype Declaration --
2162 --------------------------------
2163
2164 -- SUBTYPE_DECLARATION ::=
2165 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION;
2166
2167 -- The subtype indication field is set to Empty for subtypes
2168 -- declared in package Standard (Positive, Natural).
2169
2170 -- N_Subtype_Declaration
2171 -- Sloc points to SUBTYPE
2172 -- Defining_Identifier (Node1)
2173 -- Null_Exclusion_Present (Flag11)
2174 -- Subtype_Indication (Node5)
2175 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2176 -- Exception_Junk (Flag8-Sem)
2177
2178 -------------------------------
2179 -- 3.2.2 Subtype Indication --
2180 -------------------------------
2181
2182 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2183
2184 -- Note: if no constraint is present, the subtype indication appears
2185 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2186 -- node is used only if a constraint is present.
2187
2188 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2189 -- with the null-exclusion part (see AI-231), we had to introduce a new
2190 -- attribute in all the parents of subtype_indication nodes to indicate
2191 -- if the null-exclusion is present.
2192
2193 -- Note: the reason that this node has expression fields is that a
2194 -- subtype indication can appear as an operand of a membership test.
2195
2196 -- N_Subtype_Indication
2197 -- Sloc points to first token of subtype mark
2198 -- Subtype_Mark (Node4)
2199 -- Constraint (Node3)
2200 -- Etype (Node5-Sem)
2201 -- Must_Not_Freeze (Flag8-Sem)
2202
2203 -- Note: Etype is a copy of the Etype field of the Subtype_Mark. The
2204 -- reason for this redundancy is so that in a list of array index types,
2205 -- the Etype can be uniformly accessed to determine the subscript type.
2206 -- This means that no Itype is constructed for the actual subtype that
2207 -- is created by the subtype indication. If such an Itype is required,
2208 -- it is constructed in the context in which the indication appears.
2209
2210 -------------------------
2211 -- 3.2.2 Subtype Mark --
2212 -------------------------
2213
2214 -- SUBTYPE_MARK ::= subtype_NAME
2215
2216 -----------------------
2217 -- 3.2.2 Constraint --
2218 -----------------------
2219
2220 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2221
2222 ------------------------------
2223 -- 3.2.2 Scalar Constraint --
2224 ------------------------------
2225
2226 -- SCALAR_CONSTRAINT ::=
2227 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2228
2229 ---------------------------------
2230 -- 3.2.2 Composite Constraint --
2231 ---------------------------------
2232
2233 -- COMPOSITE_CONSTRAINT ::=
2234 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2235
2236 -------------------------------
2237 -- 3.3.1 Object Declaration --
2238 -------------------------------
2239
2240 -- OBJECT_DECLARATION ::=
2241 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2242 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION]
2243 -- [ASPECT_SPECIFICATIONS];
2244 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2245 -- ACCESS_DEFINITION [:= EXPRESSION]
2246 -- [ASPECT_SPECIFICATIONS];
2247 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2248 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION]
2249 -- [ASPECT_SPECIFICATIONS];
2250 -- | SINGLE_TASK_DECLARATION
2251 -- | SINGLE_PROTECTED_DECLARATION
2252
2253 -- Note: aliased is not permitted in Ada 83 mode
2254
2255 -- The N_Object_Declaration node is only for the first two cases.
2256 -- Single task declaration is handled by P_Task (9.1)
2257 -- Single protected declaration is handled by P_protected (9.5)
2258
2259 -- Although the syntax allows multiple identifiers in the list, the
2260 -- semantics is as though successive declarations were given with
2261 -- identical type definition and expression components. To simplify
2262 -- semantic processing, the parser represents a multiple declaration
2263 -- case as a sequence of single declarations, using the More_Ids and
2264 -- Prev_Ids flags to preserve the original source form as described
2265 -- in the section on "Handling of Defining Identifier Lists".
2266
2267 -- The flag Has_Init_Expression is set if an initializing expression
2268 -- is present. Normally it is set if and only if Expression contains
2269 -- a non-empty value, but there is an exception to this. When the
2270 -- initializing expression is an aggregate which requires explicit
2271 -- assignments, the Expression field gets set to Empty, but this flag
2272 -- is still set, so we don't forget we had an initializing expression.
2273
2274 -- Note: if a range check is required for the initialization
2275 -- expression then the Do_Range_Check flag is set in the Expression,
2276 -- with the check being done against the type given by the object
2277 -- definition, which is also the Etype of the defining identifier.
2278
2279 -- Note: the contents of the Expression field must be ignored (i.e.
2280 -- treated as though it were Empty) if No_Initialization is set True.
2281
2282 -- Note: the back end places some restrictions on the form of the
2283 -- Expression field. If the object being declared is Atomic, then
2284 -- the Expression may not have the form of an aggregate (since this
2285 -- might cause the back end to generate separate assignments). In this
2286 -- case the front end must generate an extra temporary and initialize
2287 -- this temporary as required (the temporary itself is not atomic).
2288
2289 -- Note: there is not node kind for object definition. Instead, the
2290 -- corresponding field holds a subtype indication, an array type
2291 -- definition, or (Ada 2005, AI-406) an access definition.
2292
2293 -- N_Object_Declaration
2294 -- Sloc points to first identifier
2295 -- Defining_Identifier (Node1)
2296 -- Aliased_Present (Flag4) set if ALIASED appears
2297 -- Constant_Present (Flag17) set if CONSTANT appears
2298 -- Null_Exclusion_Present (Flag11)
2299 -- Object_Definition (Node4) subtype indic./array type def./access def.
2300 -- Expression (Node3) (set to Empty if not present)
2301 -- Handler_List_Entry (Node2-Sem)
2302 -- Corresponding_Generic_Association (Node5-Sem)
2303 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2304 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2305 -- No_Initialization (Flag13-Sem)
2306 -- Assignment_OK (Flag15-Sem)
2307 -- Exception_Junk (Flag8-Sem)
2308 -- Is_Subprogram_Descriptor (Flag16-Sem)
2309 -- Has_Init_Expression (Flag14)
2310
2311 -------------------------------------
2312 -- 3.3.1 Defining Identifier List --
2313 -------------------------------------
2314
2315 -- DEFINING_IDENTIFIER_LIST ::=
2316 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2317
2318 -------------------------------
2319 -- 3.3.2 Number Declaration --
2320 -------------------------------
2321
2322 -- NUMBER_DECLARATION ::=
2323 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2324
2325 -- Although the syntax allows multiple identifiers in the list, the
2326 -- semantics is as though successive declarations were given with
2327 -- identical expressions. To simplify semantic processing, the parser
2328 -- represents a multiple declaration case as a sequence of single
2329 -- declarations, using the More_Ids and Prev_Ids flags to preserve
2330 -- the original source form as described in the section on "Handling
2331 -- of Defining Identifier Lists".
2332
2333 -- N_Number_Declaration
2334 -- Sloc points to first identifier
2335 -- Defining_Identifier (Node1)
2336 -- Expression (Node3)
2337 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2338 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2339
2340 ----------------------------------
2341 -- 3.4 Derived Type Definition --
2342 ----------------------------------
2343
2344 -- DERIVED_TYPE_DEFINITION ::=
2345 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2346 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2347
2348 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
2349 -- in Ada 83 mode
2350
2351 -- Note: a record extension part is required if ABSTRACT is present
2352
2353 -- N_Derived_Type_Definition
2354 -- Sloc points to NEW
2355 -- Abstract_Present (Flag4)
2356 -- Null_Exclusion_Present (Flag11) (set to False if not present)
2357 -- Subtype_Indication (Node5)
2358 -- Record_Extension_Part (Node3) (set to Empty if not present)
2359 -- Limited_Present (Flag17)
2360 -- Task_Present (Flag5) set in task interfaces
2361 -- Protected_Present (Flag6) set in protected interfaces
2362 -- Synchronized_Present (Flag7) set in interfaces
2363 -- Interface_List (List2) (set to No_List if none)
2364 -- Interface_Present (Flag16) set in abstract interfaces
2365
2366 -- Note: Task_Present, Protected_Present, Synchronized_Present,
2367 -- Interface_List, and Interface_Present are used for abstract
2368 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2369
2370 ---------------------------
2371 -- 3.5 Range Constraint --
2372 ---------------------------
2373
2374 -- RANGE_CONSTRAINT ::= range RANGE
2375
2376 -- N_Range_Constraint
2377 -- Sloc points to RANGE
2378 -- Range_Expression (Node4)
2379
2380 ----------------
2381 -- 3.5 Range --
2382 ----------------
2383
2384 -- RANGE ::=
2385 -- RANGE_ATTRIBUTE_REFERENCE
2386 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2387
2388 -- Note: the case of a range given as a range attribute reference
2389 -- appears directly in the tree as an attribute reference.
2390
2391 -- Note: the field name for a reference to a range is Range_Expression
2392 -- rather than Range, because range is a reserved keyword in Ada!
2393
2394 -- Note: the reason that this node has expression fields is that a
2395 -- range can appear as an operand of a membership test. The Etype
2396 -- field is the type of the range (we do NOT construct an implicit
2397 -- subtype to represent the range exactly).
2398
2399 -- N_Range
2400 -- Sloc points to ..
2401 -- Low_Bound (Node1)
2402 -- High_Bound (Node2)
2403 -- Includes_Infinities (Flag11)
2404 -- plus fields for expression
2405
2406 -- Note: if the range appears in a context, such as a subtype
2407 -- declaration, where range checks are required on one or both of
2408 -- the expression fields, then type conversion nodes are inserted
2409 -- to represent the required checks.
2410
2411 ----------------------------------------
2412 -- 3.5.1 Enumeration Type Definition --
2413 ----------------------------------------
2414
2415 -- ENUMERATION_TYPE_DEFINITION ::=
2416 -- (ENUMERATION_LITERAL_SPECIFICATION
2417 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2418
2419 -- Note: the Literals field in the node described below is null for
2420 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2421 -- which special processing handles these types as special cases.
2422
2423 -- N_Enumeration_Type_Definition
2424 -- Sloc points to left parenthesis
2425 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2426 -- End_Label (Node4) (set to Empty if internally generated record)
2427
2428 ----------------------------------------------
2429 -- 3.5.1 Enumeration Literal Specification --
2430 ----------------------------------------------
2431
2432 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2433 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2434
2435 ---------------------------------------
2436 -- 3.5.1 Defining Character Literal --
2437 ---------------------------------------
2438
2439 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2440
2441 -- A defining character literal is an entity, which has additional
2442 -- fields depending on the setting of the Ekind field. These
2443 -- additional fields are defined (and access subprograms declared)
2444 -- in package Einfo.
2445
2446 -- Note: N_Defining_Character_Literal is an extended node whose fields
2447 -- are deliberate layed out to match the layout of fields in an ordinary
2448 -- N_Character_Literal node allowing for easy alteration of a character
2449 -- literal node into a defining character literal node. For details, see
2450 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2451
2452 -- N_Defining_Character_Literal
2453 -- Sloc points to literal
2454 -- Chars (Name1) contains the Name_Id for the identifier
2455 -- Next_Entity (Node2-Sem)
2456 -- Scope (Node3-Sem)
2457 -- Etype (Node5-Sem)
2458
2459 ------------------------------------
2460 -- 3.5.4 Integer Type Definition --
2461 ------------------------------------
2462
2463 -- Note: there is an error in this rule in the latest version of the
2464 -- grammar, so we have retained the old rule pending clarification.
2465
2466 -- INTEGER_TYPE_DEFINITION ::=
2467 -- SIGNED_INTEGER_TYPE_DEFINITION
2468 -- | MODULAR_TYPE_DEFINITION
2469
2470 -------------------------------------------
2471 -- 3.5.4 Signed Integer Type Definition --
2472 -------------------------------------------
2473
2474 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2475 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2476
2477 -- Note: the Low_Bound and High_Bound fields are set to Empty
2478 -- for integer types defined in package Standard.
2479
2480 -- N_Signed_Integer_Type_Definition
2481 -- Sloc points to RANGE
2482 -- Low_Bound (Node1)
2483 -- High_Bound (Node2)
2484
2485 ------------------------------------
2486 -- 3.5.4 Modular Type Definition --
2487 ------------------------------------
2488
2489 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2490
2491 -- N_Modular_Type_Definition
2492 -- Sloc points to MOD
2493 -- Expression (Node3)
2494
2495 ---------------------------------
2496 -- 3.5.6 Real Type Definition --
2497 ---------------------------------
2498
2499 -- REAL_TYPE_DEFINITION ::=
2500 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2501
2502 --------------------------------------
2503 -- 3.5.7 Floating Point Definition --
2504 --------------------------------------
2505
2506 -- FLOATING_POINT_DEFINITION ::=
2507 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2508
2509 -- Note: The Digits_Expression and Real_Range_Specifications fields
2510 -- are set to Empty for floating-point types declared in Standard.
2511
2512 -- N_Floating_Point_Definition
2513 -- Sloc points to DIGITS
2514 -- Digits_Expression (Node2)
2515 -- Real_Range_Specification (Node4) (set to Empty if not present)
2516
2517 -------------------------------------
2518 -- 3.5.7 Real Range Specification --
2519 -------------------------------------
2520
2521 -- REAL_RANGE_SPECIFICATION ::=
2522 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2523
2524 -- N_Real_Range_Specification
2525 -- Sloc points to RANGE
2526 -- Low_Bound (Node1)
2527 -- High_Bound (Node2)
2528
2529 -----------------------------------
2530 -- 3.5.9 Fixed Point Definition --
2531 -----------------------------------
2532
2533 -- FIXED_POINT_DEFINITION ::=
2534 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2535
2536 --------------------------------------------
2537 -- 3.5.9 Ordinary Fixed Point Definition --
2538 --------------------------------------------
2539
2540 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2541 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2542
2543 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2544
2545 -- N_Ordinary_Fixed_Point_Definition
2546 -- Sloc points to DELTA
2547 -- Delta_Expression (Node3)
2548 -- Real_Range_Specification (Node4)
2549
2550 -------------------------------------------
2551 -- 3.5.9 Decimal Fixed Point Definition --
2552 -------------------------------------------
2553
2554 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2555 -- delta static_EXPRESSION
2556 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2557
2558 -- Note: decimal types are not permitted in Ada 83 mode
2559
2560 -- N_Decimal_Fixed_Point_Definition
2561 -- Sloc points to DELTA
2562 -- Delta_Expression (Node3)
2563 -- Digits_Expression (Node2)
2564 -- Real_Range_Specification (Node4) (set to Empty if not present)
2565
2566 ------------------------------
2567 -- 3.5.9 Digits Constraint --
2568 ------------------------------
2569
2570 -- DIGITS_CONSTRAINT ::=
2571 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2572
2573 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2574 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2575
2576 -- N_Digits_Constraint
2577 -- Sloc points to DIGITS
2578 -- Digits_Expression (Node2)
2579 -- Range_Constraint (Node4) (set to Empty if not present)
2580
2581 --------------------------------
2582 -- 3.6 Array Type Definition --
2583 --------------------------------
2584
2585 -- ARRAY_TYPE_DEFINITION ::=
2586 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2587
2588 -----------------------------------------
2589 -- 3.6 Unconstrained Array Definition --
2590 -----------------------------------------
2591
2592 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2593 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2594 -- COMPONENT_DEFINITION
2595
2596 -- Note: dimensionality of array is indicated by number of entries in
2597 -- the Subtype_Marks list, which has one entry for each dimension.
2598
2599 -- N_Unconstrained_Array_Definition
2600 -- Sloc points to ARRAY
2601 -- Subtype_Marks (List2)
2602 -- Component_Definition (Node4)
2603
2604 -----------------------------------
2605 -- 3.6 Index Subtype Definition --
2606 -----------------------------------
2607
2608 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2609
2610 -- There is no explicit node in the tree for an index subtype
2611 -- definition since the N_Unconstrained_Array_Definition node
2612 -- incorporates the type marks which appear in this context.
2613
2614 ---------------------------------------
2615 -- 3.6 Constrained Array Definition --
2616 ---------------------------------------
2617
2618 -- CONSTRAINED_ARRAY_DEFINITION ::=
2619 -- array (DISCRETE_SUBTYPE_DEFINITION
2620 -- {, DISCRETE_SUBTYPE_DEFINITION})
2621 -- of COMPONENT_DEFINITION
2622
2623 -- Note: dimensionality of array is indicated by number of entries
2624 -- in the Discrete_Subtype_Definitions list, which has one entry
2625 -- for each dimension.
2626
2627 -- N_Constrained_Array_Definition
2628 -- Sloc points to ARRAY
2629 -- Discrete_Subtype_Definitions (List2)
2630 -- Component_Definition (Node4)
2631
2632 --------------------------------------
2633 -- 3.6 Discrete Subtype Definition --
2634 --------------------------------------
2635
2636 -- DISCRETE_SUBTYPE_DEFINITION ::=
2637 -- discrete_SUBTYPE_INDICATION | RANGE
2638
2639 -------------------------------
2640 -- 3.6 Component Definition --
2641 -------------------------------
2642
2643 -- COMPONENT_DEFINITION ::=
2644 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
2645
2646 -- Note: although the syntax does not permit a component definition to
2647 -- be an anonymous array (and the parser will diagnose such an attempt
2648 -- with an appropriate message), it is possible for anonymous arrays
2649 -- to appear as component definitions. The semantics and back end handle
2650 -- this case properly, and the expander in fact generates such cases.
2651 -- Access_Definition is an optional field that gives support to
2652 -- Ada 2005 (AI-230). The parser generates nodes that have either the
2653 -- Subtype_Indication field or else the Access_Definition field.
2654
2655 -- N_Component_Definition
2656 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
2657 -- Aliased_Present (Flag4)
2658 -- Null_Exclusion_Present (Flag11)
2659 -- Subtype_Indication (Node5) (set to Empty if not present)
2660 -- Access_Definition (Node3) (set to Empty if not present)
2661
2662 -----------------------------
2663 -- 3.6.1 Index Constraint --
2664 -----------------------------
2665
2666 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
2667
2668 -- It is not in general possible to distinguish between discriminant
2669 -- constraints and index constraints at parse time, since a simple
2670 -- name could be either the subtype mark of a discrete range, or an
2671 -- expression in a discriminant association with no name. Either
2672 -- entry appears simply as the name, and the semantic parse must
2673 -- distinguish between the two cases. Thus we use a common tree
2674 -- node format for both of these constraint types.
2675
2676 -- See Discriminant_Constraint for format of node
2677
2678 ---------------------------
2679 -- 3.6.1 Discrete Range --
2680 ---------------------------
2681
2682 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
2683
2684 ----------------------------
2685 -- 3.7 Discriminant Part --
2686 ----------------------------
2687
2688 -- DISCRIMINANT_PART ::=
2689 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
2690
2691 ------------------------------------
2692 -- 3.7 Unknown Discriminant Part --
2693 ------------------------------------
2694
2695 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
2696
2697 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
2698
2699 -- There is no explicit node in the tree for an unknown discriminant
2700 -- part. Instead the Unknown_Discriminants_Present flag is set in the
2701 -- parent node.
2702
2703 ----------------------------------
2704 -- 3.7 Known Discriminant Part --
2705 ----------------------------------
2706
2707 -- KNOWN_DISCRIMINANT_PART ::=
2708 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
2709
2710 -------------------------------------
2711 -- 3.7 Discriminant Specification --
2712 -------------------------------------
2713
2714 -- DISCRIMINANT_SPECIFICATION ::=
2715 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
2716 -- [:= DEFAULT_EXPRESSION]
2717 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
2718 -- [:= DEFAULT_EXPRESSION]
2719
2720 -- Although the syntax allows multiple identifiers in the list, the
2721 -- semantics is as though successive specifications were given with
2722 -- identical type definition and expression components. To simplify
2723 -- semantic processing, the parser represents a multiple declaration
2724 -- case as a sequence of single specifications, using the More_Ids and
2725 -- Prev_Ids flags to preserve the original source form as described
2726 -- in the section on "Handling of Defining Identifier Lists".
2727
2728 -- N_Discriminant_Specification
2729 -- Sloc points to first identifier
2730 -- Defining_Identifier (Node1)
2731 -- Null_Exclusion_Present (Flag11)
2732 -- Discriminant_Type (Node5) subtype mark or access parameter definition
2733 -- Expression (Node3) (set to Empty if no default expression)
2734 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2735 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2736
2737 -----------------------------
2738 -- 3.7 Default Expression --
2739 -----------------------------
2740
2741 -- DEFAULT_EXPRESSION ::= EXPRESSION
2742
2743 ------------------------------------
2744 -- 3.7.1 Discriminant Constraint --
2745 ------------------------------------
2746
2747 -- DISCRIMINANT_CONSTRAINT ::=
2748 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
2749
2750 -- It is not in general possible to distinguish between discriminant
2751 -- constraints and index constraints at parse time, since a simple
2752 -- name could be either the subtype mark of a discrete range, or an
2753 -- expression in a discriminant association with no name. Either
2754 -- entry appears simply as the name, and the semantic parse must
2755 -- distinguish between the two cases. Thus we use a common tree
2756 -- node format for both of these constraint types.
2757
2758 -- N_Index_Or_Discriminant_Constraint
2759 -- Sloc points to left paren
2760 -- Constraints (List1) points to list of discrete ranges or
2761 -- discriminant associations
2762
2763 -------------------------------------
2764 -- 3.7.1 Discriminant Association --
2765 -------------------------------------
2766
2767 -- DISCRIMINANT_ASSOCIATION ::=
2768 -- [discriminant_SELECTOR_NAME
2769 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
2770
2771 -- Note: a discriminant association that has no selector name list
2772 -- appears directly as an expression in the tree.
2773
2774 -- N_Discriminant_Association
2775 -- Sloc points to first token of discriminant association
2776 -- Selector_Names (List1) (always non-empty, since if no selector
2777 -- names are present, this node is not used, see comment above)
2778 -- Expression (Node3)
2779
2780 ---------------------------------
2781 -- 3.8 Record Type Definition --
2782 ---------------------------------
2783
2784 -- RECORD_TYPE_DEFINITION ::=
2785 -- [[abstract] tagged] [limited] RECORD_DEFINITION
2786
2787 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
2788
2789 -- There is no explicit node in the tree for a record type definition.
2790 -- Instead the flags for Tagged_Present and Limited_Present appear in
2791 -- the N_Record_Definition node for a record definition appearing in
2792 -- the context of a record type definition.
2793
2794 ----------------------------
2795 -- 3.8 Record Definition --
2796 ----------------------------
2797
2798 -- RECORD_DEFINITION ::=
2799 -- record
2800 -- COMPONENT_LIST
2801 -- end record
2802 -- | null record
2803
2804 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
2805 -- flags appear only for a record definition appearing in a record
2806 -- type definition.
2807
2808 -- Note: the NULL RECORD case is not permitted in Ada 83
2809
2810 -- N_Record_Definition
2811 -- Sloc points to RECORD or NULL
2812 -- End_Label (Node4) (set to Empty if internally generated record)
2813 -- Abstract_Present (Flag4)
2814 -- Tagged_Present (Flag15)
2815 -- Limited_Present (Flag17)
2816 -- Component_List (Node1) empty in null record case
2817 -- Null_Present (Flag13) set in null record case
2818 -- Task_Present (Flag5) set in task interfaces
2819 -- Protected_Present (Flag6) set in protected interfaces
2820 -- Synchronized_Present (Flag7) set in interfaces
2821 -- Interface_Present (Flag16) set in abstract interfaces
2822 -- Interface_List (List2) (set to No_List if none)
2823
2824 -- Note: Task_Present, Protected_Present, Synchronized _Present,
2825 -- Interface_List and Interface_Present are used for abstract
2826 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2827
2828 -------------------------
2829 -- 3.8 Component List --
2830 -------------------------
2831
2832 -- COMPONENT_LIST ::=
2833 -- COMPONENT_ITEM {COMPONENT_ITEM}
2834 -- | {COMPONENT_ITEM} VARIANT_PART
2835 -- | null;
2836
2837 -- N_Component_List
2838 -- Sloc points to first token of component list
2839 -- Component_Items (List3)
2840 -- Variant_Part (Node4) (set to Empty if no variant part)
2841 -- Null_Present (Flag13)
2842
2843 -------------------------
2844 -- 3.8 Component Item --
2845 -------------------------
2846
2847 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
2848
2849 -- Note: A component item can also be a pragma, and in the tree
2850 -- that is obtained after semantic processing, a component item
2851 -- can be an N_Null node resulting from a non-recognized pragma.
2852
2853 --------------------------------
2854 -- 3.8 Component Declaration --
2855 --------------------------------
2856
2857 -- COMPONENT_DECLARATION ::=
2858 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
2859 -- [:= DEFAULT_EXPRESSION]
2860 -- [ASPECT_SPECIFICATIONS];
2861
2862 -- Note: although the syntax does not permit a component definition to
2863 -- be an anonymous array (and the parser will diagnose such an attempt
2864 -- with an appropriate message), it is possible for anonymous arrays
2865 -- to appear as component definitions. The semantics and back end handle
2866 -- this case properly, and the expander in fact generates such cases.
2867
2868 -- Although the syntax allows multiple identifiers in the list, the
2869 -- semantics is as though successive declarations were given with the
2870 -- same component definition and expression components. To simplify
2871 -- semantic processing, the parser represents a multiple declaration
2872 -- case as a sequence of single declarations, using the More_Ids and
2873 -- Prev_Ids flags to preserve the original source form as described
2874 -- in the section on "Handling of Defining Identifier Lists".
2875
2876 -- N_Component_Declaration
2877 -- Sloc points to first identifier
2878 -- Defining_Identifier (Node1)
2879 -- Component_Definition (Node4)
2880 -- Expression (Node3) (set to Empty if no default expression)
2881 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2882 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2883
2884 -------------------------
2885 -- 3.8.1 Variant Part --
2886 -------------------------
2887
2888 -- VARIANT_PART ::=
2889 -- case discriminant_DIRECT_NAME is
2890 -- VARIANT
2891 -- {VARIANT}
2892 -- end case;
2893
2894 -- Note: the variants list can contain pragmas as well as variants.
2895 -- In a properly formed program there is at least one variant.
2896
2897 -- N_Variant_Part
2898 -- Sloc points to CASE
2899 -- Name (Node2)
2900 -- Variants (List1)
2901
2902 --------------------
2903 -- 3.8.1 Variant --
2904 --------------------
2905
2906 -- VARIANT ::=
2907 -- when DISCRETE_CHOICE_LIST =>
2908 -- COMPONENT_LIST
2909
2910 -- N_Variant
2911 -- Sloc points to WHEN
2912 -- Discrete_Choices (List4)
2913 -- Component_List (Node1)
2914 -- Enclosing_Variant (Node2-Sem)
2915 -- Present_Expr (Uint3-Sem)
2916 -- Dcheck_Function (Node5-Sem)
2917
2918 ---------------------------------
2919 -- 3.8.1 Discrete Choice List --
2920 ---------------------------------
2921
2922 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
2923
2924 ----------------------------
2925 -- 3.8.1 Discrete Choice --
2926 ----------------------------
2927
2928 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
2929
2930 -- Note: in Ada 83 mode, the expression must be a simple expression
2931
2932 -- The only choice that appears explicitly is the OTHERS choice, as
2933 -- defined here. Other cases of discrete choice (expression and
2934 -- discrete range) appear directly. This production is also used
2935 -- for the OTHERS possibility of an exception choice.
2936
2937 -- Note: in accordance with the syntax, the parser does not check that
2938 -- OTHERS appears at the end on its own in a choice list context. This
2939 -- is a semantic check.
2940
2941 -- N_Others_Choice
2942 -- Sloc points to OTHERS
2943 -- Others_Discrete_Choices (List1-Sem)
2944 -- All_Others (Flag11-Sem)
2945
2946 ----------------------------------
2947 -- 3.9.1 Record Extension Part --
2948 ----------------------------------
2949
2950 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
2951
2952 -- Note: record extension parts are not permitted in Ada 83 mode
2953
2954 --------------------------------------
2955 -- 3.9.4 Interface Type Definition --
2956 --------------------------------------
2957
2958 -- INTERFACE_TYPE_DEFINITION ::=
2959 -- [limited | task | protected | synchronized]
2960 -- interface [interface_list]
2961
2962 -- Note: Interfaces are implemented with N_Record_Definition and
2963 -- N_Derived_Type_Definition nodes because most of the support
2964 -- for the analysis of abstract types has been reused to
2965 -- analyze abstract interfaces.
2966
2967 ----------------------------------
2968 -- 3.10 Access Type Definition --
2969 ----------------------------------
2970
2971 -- ACCESS_TYPE_DEFINITION ::=
2972 -- ACCESS_TO_OBJECT_DEFINITION
2973 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2974
2975 --------------------------
2976 -- 3.10 Null Exclusion --
2977 --------------------------
2978
2979 -- NULL_EXCLUSION ::= not null
2980
2981 ---------------------------------------
2982 -- 3.10 Access To Object Definition --
2983 ---------------------------------------
2984
2985 -- ACCESS_TO_OBJECT_DEFINITION ::=
2986 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
2987 -- SUBTYPE_INDICATION
2988
2989 -- N_Access_To_Object_Definition
2990 -- Sloc points to ACCESS
2991 -- All_Present (Flag15)
2992 -- Null_Exclusion_Present (Flag11)
2993 -- Subtype_Indication (Node5)
2994 -- Constant_Present (Flag17)
2995
2996 -----------------------------------
2997 -- 3.10 General Access Modifier --
2998 -----------------------------------
2999
3000 -- GENERAL_ACCESS_MODIFIER ::= all | constant
3001
3002 -- Note: general access modifiers are not permitted in Ada 83 mode
3003
3004 -- There is no explicit node in the tree for general access modifier.
3005 -- Instead the All_Present or Constant_Present flags are set in the
3006 -- parent node.
3007
3008 -------------------------------------------
3009 -- 3.10 Access To Subprogram Definition --
3010 -------------------------------------------
3011
3012 -- ACCESS_TO_SUBPROGRAM_DEFINITION
3013 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
3014 -- | [NULL_EXCLUSION] access [protected] function
3015 -- PARAMETER_AND_RESULT_PROFILE
3016
3017 -- Note: access to subprograms are not permitted in Ada 83 mode
3018
3019 -- N_Access_Function_Definition
3020 -- Sloc points to ACCESS
3021 -- Null_Exclusion_Present (Flag11)
3022 -- Null_Exclusion_In_Return_Present (Flag14)
3023 -- Protected_Present (Flag6)
3024 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3025 -- Result_Definition (Node4) result subtype (subtype mark or access def)
3026
3027 -- N_Access_Procedure_Definition
3028 -- Sloc points to ACCESS
3029 -- Null_Exclusion_Present (Flag11)
3030 -- Protected_Present (Flag6)
3031 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3032
3033 -----------------------------
3034 -- 3.10 Access Definition --
3035 -----------------------------
3036
3037 -- ACCESS_DEFINITION ::=
3038 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
3039 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3040
3041 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
3042
3043 -- N_Access_Definition
3044 -- Sloc points to ACCESS
3045 -- Null_Exclusion_Present (Flag11)
3046 -- All_Present (Flag15)
3047 -- Constant_Present (Flag17)
3048 -- Subtype_Mark (Node4)
3049 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
3050
3051 -----------------------------------------
3052 -- 3.10.1 Incomplete Type Declaration --
3053 -----------------------------------------
3054
3055 -- INCOMPLETE_TYPE_DECLARATION ::=
3056 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
3057
3058 -- N_Incomplete_Type_Declaration
3059 -- Sloc points to TYPE
3060 -- Defining_Identifier (Node1)
3061 -- Discriminant_Specifications (List4) (set to No_List if no
3062 -- discriminant part, or if the discriminant part is an
3063 -- unknown discriminant part)
3064 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
3065 -- Tagged_Present (Flag15)
3066
3067 ----------------------------
3068 -- 3.11 Declarative Part --
3069 ----------------------------
3070
3071 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
3072
3073 -- Note: although the parser enforces the syntactic requirement that
3074 -- a declarative part can contain only declarations, the semantic
3075 -- processing may add statements to the list of actions in a
3076 -- declarative part, so the code generator should be prepared
3077 -- to accept a statement in this position.
3078
3079 ----------------------------
3080 -- 3.11 Declarative Item --
3081 ----------------------------
3082
3083 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
3084
3085 ----------------------------------
3086 -- 3.11 Basic Declarative Item --
3087 ----------------------------------
3088
3089 -- BASIC_DECLARATIVE_ITEM ::=
3090 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
3091
3092 ----------------
3093 -- 3.11 Body --
3094 ----------------
3095
3096 -- BODY ::= PROPER_BODY | BODY_STUB
3097
3098 -----------------------
3099 -- 3.11 Proper Body --
3100 -----------------------
3101
3102 -- PROPER_BODY ::=
3103 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
3104
3105 ---------------
3106 -- 4.1 Name --
3107 ---------------
3108
3109 -- NAME ::=
3110 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
3111 -- | INDEXED_COMPONENT | SLICE
3112 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
3113 -- | TYPE_CONVERSION | FUNCTION_CALL
3114 -- | CHARACTER_LITERAL
3115
3116 ----------------------
3117 -- 4.1 Direct Name --
3118 ----------------------
3119
3120 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3121
3122 -----------------
3123 -- 4.1 Prefix --
3124 -----------------
3125
3126 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3127
3128 -------------------------------
3129 -- 4.1 Explicit Dereference --
3130 -------------------------------
3131
3132 -- EXPLICIT_DEREFERENCE ::= NAME . all
3133
3134 -- N_Explicit_Dereference
3135 -- Sloc points to ALL
3136 -- Prefix (Node3)
3137 -- Actual_Designated_Subtype (Node4-Sem)
3138 -- plus fields for expression
3139
3140 -------------------------------
3141 -- 4.1 Implicit Dereference --
3142 -------------------------------
3143
3144 -- IMPLICIT_DEREFERENCE ::= NAME
3145
3146 ------------------------------
3147 -- 4.1.1 Indexed Component --
3148 ------------------------------
3149
3150 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3151
3152 -- Note: the parser may generate this node in some situations where it
3153 -- should be a function call. The semantic pass must correct this
3154 -- misidentification (which is inevitable at the parser level).
3155
3156 -- N_Indexed_Component
3157 -- Sloc contains a copy of the Sloc value of the Prefix
3158 -- Prefix (Node3)
3159 -- Expressions (List1)
3160 -- plus fields for expression
3161
3162 -- Note: if any of the subscripts requires a range check, then the
3163 -- Do_Range_Check flag is set on the corresponding expression, with
3164 -- the index type being determined from the type of the Prefix, which
3165 -- references the array being indexed.
3166
3167 -- Note: in a fully analyzed and expanded indexed component node, and
3168 -- hence in any such node that gigi sees, if the prefix is an access
3169 -- type, then an explicit dereference operation has been inserted.
3170
3171 ------------------
3172 -- 4.1.2 Slice --
3173 ------------------
3174
3175 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3176
3177 -- Note: an implicit subtype is created to describe the resulting
3178 -- type, so that the bounds of this type are the bounds of the slice.
3179
3180 -- N_Slice
3181 -- Sloc points to first token of prefix
3182 -- Prefix (Node3)
3183 -- Discrete_Range (Node4)
3184 -- plus fields for expression
3185
3186 -------------------------------
3187 -- 4.1.3 Selected Component --
3188 -------------------------------
3189
3190 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3191
3192 -- Note: selected components that are semantically expanded names get
3193 -- changed during semantic processing into the separate N_Expanded_Name
3194 -- node. See description of this node in the section on semantic nodes.
3195
3196 -- N_Selected_Component
3197 -- Sloc points to period
3198 -- Prefix (Node3)
3199 -- Selector_Name (Node2)
3200 -- Associated_Node (Node4-Sem)
3201 -- Do_Discriminant_Check (Flag13-Sem)
3202 -- Is_In_Discriminant_Check (Flag11-Sem)
3203 -- plus fields for expression
3204
3205 --------------------------
3206 -- 4.1.3 Selector Name --
3207 --------------------------
3208
3209 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3210
3211 --------------------------------
3212 -- 4.1.4 Attribute Reference --
3213 --------------------------------
3214
3215 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3216
3217 -- Note: the syntax is quite ambiguous at this point. Consider:
3218
3219 -- A'Length (X) X is part of the attribute designator
3220 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
3221 -- A'Class (X) X is the expression of a type conversion
3222
3223 -- It would be possible for the parser to distinguish these cases
3224 -- by looking at the attribute identifier. However, that would mean
3225 -- more work in introducing new implementation defined attributes,
3226 -- and also it would mean that special processing for attributes
3227 -- would be scattered around, instead of being centralized in the
3228 -- semantic routine that handles an N_Attribute_Reference node.
3229 -- Consequently, the parser in all the above cases stores the
3230 -- expression (X in these examples) as a single element list in
3231 -- in the Expressions field of the N_Attribute_Reference node.
3232
3233 -- Similarly, for attributes like Max which take two arguments,
3234 -- we store the two arguments as a two element list in the
3235 -- Expressions field. Of course it is clear at parse time that
3236 -- this case is really a function call with an attribute as the
3237 -- prefix, but it turns out to be convenient to handle the two
3238 -- argument case in a similar manner to the one argument case,
3239 -- and indeed in general the parser will accept any number of
3240 -- expressions in this position and store them as a list in the
3241 -- attribute reference node. This allows for future addition of
3242 -- attributes that take more than two arguments.
3243
3244 -- Note: named associates are not permitted in function calls where
3245 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
3246 -- to skip the normal subprogram argument processing.
3247
3248 -- Note: for the attributes whose designators are technically keywords,
3249 -- i.e. digits, access, delta, range, the Attribute_Name field contains
3250 -- the corresponding name, even though no identifier is involved.
3251
3252 -- Note: the generated code may contain stream attributes applied to
3253 -- limited types for which no stream routines exist officially. In such
3254 -- case, the result is to use the stream attribute for the underlying
3255 -- full type, or in the case of a protected type, the components
3256 -- (including any discriminants) are merely streamed in order.
3257
3258 -- See Exp_Attr for a complete description of which attributes are
3259 -- passed onto Gigi, and which are handled entirely by the front end.
3260
3261 -- Gigi restriction: For the Pos attribute, the prefix cannot be
3262 -- a non-standard enumeration type or a nonzero/zero semantics
3263 -- boolean type, so the value is simply the stored representation.
3264
3265 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
3266 -- references a subprogram that is a renaming, then the front end must
3267 -- rewrite the attribute to refer directly to the renamed entity.
3268
3269 -- Note: In generated code, the Address and Unrestricted_Access
3270 -- attributes can be applied to any expression, and the meaning is
3271 -- to create an object containing the value (the object is in the
3272 -- current stack frame), and pass the address of this value. If the
3273 -- Must_Be_Byte_Aligned flag is set, then the object whose address
3274 -- is taken must be on a byte (storage unit) boundary, and if it is
3275 -- not (or may not be), then the generated code must create a copy
3276 -- that is byte aligned, and pass the address of this copy.
3277
3278 -- N_Attribute_Reference
3279 -- Sloc points to apostrophe
3280 -- Prefix (Node3)
3281 -- Attribute_Name (Name2) identifier name from attribute designator
3282 -- Expressions (List1) (set to No_List if no associated expressions)
3283 -- Entity (Node4-Sem) used if the attribute yields a type
3284 -- Associated_Node (Node4-Sem)
3285 -- Do_Overflow_Check (Flag17-Sem)
3286 -- Redundant_Use (Flag13-Sem)
3287 -- Must_Be_Byte_Aligned (Flag14)
3288 -- plus fields for expression
3289
3290 ---------------------------------
3291 -- 4.1.4 Attribute Designator --
3292 ---------------------------------
3293
3294 -- ATTRIBUTE_DESIGNATOR ::=
3295 -- IDENTIFIER [(static_EXPRESSION)]
3296 -- | access | delta | digits
3297
3298 -- There is no explicit node in the tree for an attribute designator.
3299 -- Instead the Attribute_Name and Expressions fields of the parent
3300 -- node (N_Attribute_Reference node) hold the information.
3301
3302 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
3303 -- designator, then they are treated as identifiers internally
3304 -- rather than the keywords of the same name.
3305
3306 --------------------------------------
3307 -- 4.1.4 Range Attribute Reference --
3308 --------------------------------------
3309
3310 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3311
3312 -- A range attribute reference is represented in the tree using the
3313 -- normal N_Attribute_Reference node.
3314
3315 ---------------------------------------
3316 -- 4.1.4 Range Attribute Designator --
3317 ---------------------------------------
3318
3319 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3320
3321 -- A range attribute designator is represented in the tree using the
3322 -- normal N_Attribute_Reference node.
3323
3324 --------------------
3325 -- 4.3 Aggregate --
3326 --------------------
3327
3328 -- AGGREGATE ::=
3329 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3330
3331 -----------------------------
3332 -- 4.3.1 Record Aggregate --
3333 -----------------------------
3334
3335 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3336
3337 -- N_Aggregate
3338 -- Sloc points to left parenthesis
3339 -- Expressions (List1) (set to No_List if none or null record case)
3340 -- Component_Associations (List2) (set to No_List if none)
3341 -- Null_Record_Present (Flag17)
3342 -- Aggregate_Bounds (Node3-Sem)
3343 -- Associated_Node (Node4-Sem)
3344 -- Static_Processing_OK (Flag4-Sem)
3345 -- Compile_Time_Known_Aggregate (Flag18-Sem)
3346 -- Expansion_Delayed (Flag11-Sem)
3347 -- Has_Self_Reference (Flag13-Sem)
3348 -- plus fields for expression
3349
3350 -- Note: this structure is used for both record and array aggregates
3351 -- since the two cases are not separable by the parser. The parser
3352 -- makes no attempt to enforce consistency here, so it is up to the
3353 -- semantic phase to make sure that the aggregate is consistent (i.e.
3354 -- that it is not a "half-and-half" case that mixes record and array
3355 -- syntax. In particular, for a record aggregate, the expressions
3356 -- field will be set if there are positional associations.
3357
3358 -- Note: N_Aggregate is not used for all aggregates; in particular,
3359 -- there is a separate node kind for extension aggregates.
3360
3361 -- Note: gigi/gcc can handle array aggregates correctly providing that
3362 -- they are entirely positional, and the array subtype involved has a
3363 -- known at compile time length and is not bit packed, or a convention
3364 -- Fortran array with more than one dimension. If these conditions
3365 -- are not met, then the front end must translate the aggregate into
3366 -- an appropriate set of assignments into a temporary.
3367
3368 -- Note: for the record aggregate case, gigi/gcc can handle all cases of
3369 -- record aggregates, including those for packed, and rep-claused
3370 -- records, and also variant records, providing that there are no
3371 -- variable length fields whose size is not known at compile time, and
3372 -- providing that the aggregate is presented in fully named form.
3373
3374 ----------------------------------------------
3375 -- 4.3.1 Record Component Association List --
3376 ----------------------------------------------
3377
3378 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
3379 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3380 -- | null record
3381
3382 -- There is no explicit node in the tree for a record component
3383 -- association list. Instead the Null_Record_Present flag is set in
3384 -- the parent node for the NULL RECORD case.
3385
3386 ------------------------------------------------------
3387 -- 4.3.1 Record Component Association (also 4.3.3) --
3388 ------------------------------------------------------
3389
3390 -- RECORD_COMPONENT_ASSOCIATION ::=
3391 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
3392
3393 -- N_Component_Association
3394 -- Sloc points to first selector name
3395 -- Choices (List1)
3396 -- Loop_Actions (List2-Sem)
3397 -- Expression (Node3)
3398 -- Box_Present (Flag15)
3399 -- Inherited_Discriminant (Flag13)
3400
3401 -- Note: this structure is used for both record component associations
3402 -- and array component associations, since the two cases aren't always
3403 -- separable by the parser. The choices list may represent either a
3404 -- list of selector names in the record aggregate case, or a list of
3405 -- discrete choices in the array aggregate case or an N_Others_Choice
3406 -- node (which appears as a singleton list). Box_Present gives support
3407 -- to Ada 2005 (AI-287).
3408
3409 ----------------------------------
3410 -- 4.3.1 Component Choice List --
3411 ----------------------------------
3412
3413 -- COMPONENT_CHOICE_LIST ::=
3414 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
3415 -- | others
3416
3417 -- The entries of a component choice list appear in the Choices list of
3418 -- the associated N_Component_Association, as either selector names, or
3419 -- as an N_Others_Choice node.
3420
3421 --------------------------------
3422 -- 4.3.2 Extension Aggregate --
3423 --------------------------------
3424
3425 -- EXTENSION_AGGREGATE ::=
3426 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3427
3428 -- Note: extension aggregates are not permitted in Ada 83 mode
3429
3430 -- N_Extension_Aggregate
3431 -- Sloc points to left parenthesis
3432 -- Ancestor_Part (Node3)
3433 -- Associated_Node (Node4-Sem)
3434 -- Expressions (List1) (set to No_List if none or null record case)
3435 -- Component_Associations (List2) (set to No_List if none)
3436 -- Null_Record_Present (Flag17)
3437 -- Expansion_Delayed (Flag11-Sem)
3438 -- Has_Self_Reference (Flag13-Sem)
3439 -- plus fields for expression
3440
3441 --------------------------
3442 -- 4.3.2 Ancestor Part --
3443 --------------------------
3444
3445 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3446
3447 ----------------------------
3448 -- 4.3.3 Array Aggregate --
3449 ----------------------------
3450
3451 -- ARRAY_AGGREGATE ::=
3452 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3453
3454 ---------------------------------------
3455 -- 4.3.3 Positional Array Aggregate --
3456 ---------------------------------------
3457
3458 -- POSITIONAL_ARRAY_AGGREGATE ::=
3459 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3460 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3461
3462 -- See Record_Aggregate (4.3.1) for node structure
3463
3464 ----------------------------------
3465 -- 4.3.3 Named Array Aggregate --
3466 ----------------------------------
3467
3468 -- NAMED_ARRAY_AGGREGATE ::=
3469 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3470
3471 -- See Record_Aggregate (4.3.1) for node structure
3472
3473 ----------------------------------------
3474 -- 4.3.3 Array Component Association --
3475 ----------------------------------------
3476
3477 -- ARRAY_COMPONENT_ASSOCIATION ::=
3478 -- DISCRETE_CHOICE_LIST => EXPRESSION
3479
3480 -- See Record_Component_Association (4.3.1) for node structure
3481
3482 --------------------------------------------------
3483 -- 4.4 Expression/Relation/Term/Factor/Primary --
3484 --------------------------------------------------
3485
3486 -- EXPRESSION ::=
3487 -- RELATION {and RELATION} | RELATION {and then RELATION}
3488 -- | RELATION {or RELATION} | RELATION {or else RELATION}
3489 -- | RELATION {xor RELATION}
3490
3491 -- RELATION ::=
3492 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3493 -- | SIMPLE_EXPRESSION [not] in RANGE
3494 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3495
3496 -- SIMPLE_EXPRESSION ::=
3497 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3498
3499 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3500
3501 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3502
3503 -- No nodes are generated for any of these constructs. Instead, the
3504 -- node for the operator appears directly. When we refer to an
3505 -- expression in this description, we mean any of the possible
3506 -- constituent components of an expression (e.g. identifier is
3507 -- an example of an expression).
3508
3509 ------------------
3510 -- 4.4 Primary --
3511 ------------------
3512
3513 -- PRIMARY ::=
3514 -- NUMERIC_LITERAL | null
3515 -- | STRING_LITERAL | AGGREGATE
3516 -- | NAME | QUALIFIED_EXPRESSION
3517 -- | ALLOCATOR | (EXPRESSION)
3518
3519 -- Usually there is no explicit node in the tree for primary. Instead
3520 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3521 -- exceptions. First, there is an explicit node for a null primary.
3522
3523 -- N_Null
3524 -- Sloc points to NULL
3525 -- plus fields for expression
3526
3527 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3528 -- that the parser keep track of which subexpressions are enclosed
3529 -- in parentheses, and how many levels of parentheses are used. This
3530 -- information is required for optimization purposes, and also for
3531 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3532 -- conform with ((((1)))) in the body).
3533
3534 -- The parentheses are recorded by keeping a Paren_Count field in every
3535 -- subexpression node (it is actually present in all nodes, but only
3536 -- used in subexpression nodes). This count records the number of
3537 -- levels of parentheses. If the number of levels in the source exceeds
3538 -- the maximum accommodated by this count, then the count is simply left
3539 -- at the maximum value. This means that there are some pathological
3540 -- cases of failure to detect conformance failures (e.g. an expression
3541 -- with 500 levels of parens will conform with one with 501 levels),
3542 -- but we do not need to lose sleep over this.
3543
3544 -- Historical note: in versions of GNAT prior to 1.75, there was a node
3545 -- type N_Parenthesized_Expression used to accurately record unlimited
3546 -- numbers of levels of parentheses. However, it turned out to be a
3547 -- real nuisance to have to take into account the possible presence of
3548 -- this node during semantic analysis, since basically parentheses have
3549 -- zero relevance to semantic analysis.
3550
3551 -- Note: the level of parentheses always present in things like
3552 -- aggregates does not count, only the parentheses in the primary
3553 -- (EXPRESSION) affect the setting of the Paren_Count field.
3554
3555 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
3556 -- treated as though it were Empty) if No_Initialization is set True.
3557
3558 --------------------------------------
3559 -- 4.5 Short Circuit Control Forms --
3560 --------------------------------------
3561
3562 -- EXPRESSION ::=
3563 -- RELATION {and then RELATION} | RELATION {or else RELATION}
3564
3565 -- Gigi restriction: For both these control forms, the operand and
3566 -- result types are always Standard.Boolean. The expander inserts the
3567 -- required conversion operations where needed to ensure this is the
3568 -- case.
3569
3570 -- N_And_Then
3571 -- Sloc points to AND of AND THEN
3572 -- Left_Opnd (Node2)
3573 -- Right_Opnd (Node3)
3574 -- Actions (List1-Sem)
3575 -- plus fields for expression
3576
3577 -- N_Or_Else
3578 -- Sloc points to OR of OR ELSE
3579 -- Left_Opnd (Node2)
3580 -- Right_Opnd (Node3)
3581 -- Actions (List1-Sem)
3582 -- plus fields for expression
3583
3584 -- Note: The Actions field is used to hold actions associated with
3585 -- the right hand operand. These have to be treated specially since
3586 -- they are not unconditionally executed. See Insert_Actions for a
3587 -- more detailed description of how these actions are handled.
3588
3589 ---------------------------
3590 -- 4.5 Membership Tests --
3591 ---------------------------
3592
3593 -- RELATION ::=
3594 -- SIMPLE_EXPRESSION [not] in RANGE
3595 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3596
3597 -- Note: although the grammar above allows only a range or a subtype
3598 -- mark, the parser in fact will accept any simple expression in place
3599 -- of a subtype mark. This means that the semantic analyzer must be able
3600 -- to deal with, and diagnose a simple expression other than a name for
3601 -- the right operand. This simplifies error recovery in the parser.
3602
3603 -- If extensions are enabled, the grammar is as follows:
3604
3605 -- RELATION ::=
3606 -- SIMPLE_EXPRESSION [not] in SET_ALTERNATIVE {| SET_ALTERNATIVE}
3607
3608 -- SET_ALTERNATIVE ::= RANGE | SUBTYPE_MARK
3609
3610 -- The Alternatives field below is present only if there is more than
3611 -- one Set_Alternative present, in which case Right_Opnd is set to
3612 -- Empty, and Alternatives contains the list of alternatives. In the
3613 -- tree passed to the back end, Alternatives is always No_List, and
3614 -- Right_Opnd is set (i.e. the expansion circuitry expands out the
3615 -- complex set membership case using simple membership operations).
3616
3617 -- N_In
3618 -- Sloc points to IN
3619 -- Left_Opnd (Node2)
3620 -- Right_Opnd (Node3)
3621 -- Alternatives (List4) (set to No_List if only one set alternative)
3622 -- plus fields for expression
3623
3624 -- N_Not_In
3625 -- Sloc points to NOT of NOT IN
3626 -- Left_Opnd (Node2)
3627 -- Right_Opnd (Node3)
3628 -- Alternatives (List4) (set to No_List if only one set alternative)
3629 -- plus fields for expression
3630
3631 --------------------
3632 -- 4.5 Operators --
3633 --------------------
3634
3635 -- LOGICAL_OPERATOR ::= and | or | xor
3636
3637 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
3638
3639 -- BINARY_ADDING_OPERATOR ::= + | - | &
3640
3641 -- UNARY_ADDING_OPERATOR ::= + | -
3642
3643 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
3644
3645 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
3646
3647 -- Sprint syntax if Treat_Fixed_As_Integer is set:
3648
3649 -- x #* y
3650 -- x #/ y
3651 -- x #mod y
3652 -- x #rem y
3653
3654 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
3655 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
3656 -- All handling of smalls for multiplication and division is handled
3657 -- by the front end (mod and rem result only from expansion). Gigi
3658 -- thus never needs to worry about small values (for other operators
3659 -- operating on fixed-point, e.g. addition, the small value does not
3660 -- have any semantic effect anyway, these are always integer operations.
3661
3662 -- Gigi restriction: For all operators taking Boolean operands, the
3663 -- type is always Standard.Boolean. The expander inserts the required
3664 -- conversion operations where needed to ensure this is the case.
3665
3666 -- N_Op_And
3667 -- Sloc points to AND
3668 -- Do_Length_Check (Flag4-Sem)
3669 -- plus fields for binary operator
3670 -- plus fields for expression
3671
3672 -- N_Op_Or
3673 -- Sloc points to OR
3674 -- Do_Length_Check (Flag4-Sem)
3675 -- plus fields for binary operator
3676 -- plus fields for expression
3677
3678 -- N_Op_Xor
3679 -- Sloc points to XOR
3680 -- Do_Length_Check (Flag4-Sem)
3681 -- plus fields for binary operator
3682 -- plus fields for expression
3683
3684 -- N_Op_Eq
3685 -- Sloc points to =
3686 -- plus fields for binary operator
3687 -- plus fields for expression
3688
3689 -- N_Op_Ne
3690 -- Sloc points to /=
3691 -- plus fields for binary operator
3692 -- plus fields for expression
3693
3694 -- N_Op_Lt
3695 -- Sloc points to <
3696 -- plus fields for binary operator
3697 -- plus fields for expression
3698
3699 -- N_Op_Le
3700 -- Sloc points to <=
3701 -- plus fields for binary operator
3702 -- plus fields for expression
3703
3704 -- N_Op_Gt
3705 -- Sloc points to >
3706 -- plus fields for binary operator
3707 -- plus fields for expression
3708
3709 -- N_Op_Ge
3710 -- Sloc points to >=
3711 -- plus fields for binary operator
3712 -- plus fields for expression
3713
3714 -- N_Op_Add
3715 -- Sloc points to + (binary)
3716 -- plus fields for binary operator
3717 -- plus fields for expression
3718
3719 -- N_Op_Subtract
3720 -- Sloc points to - (binary)
3721 -- plus fields for binary operator
3722 -- plus fields for expression
3723
3724 -- N_Op_Concat
3725 -- Sloc points to &
3726 -- Is_Component_Left_Opnd (Flag13-Sem)
3727 -- Is_Component_Right_Opnd (Flag14-Sem)
3728 -- plus fields for binary operator
3729 -- plus fields for expression
3730
3731 -- N_Op_Multiply
3732 -- Sloc points to *
3733 -- Treat_Fixed_As_Integer (Flag14-Sem)
3734 -- Rounded_Result (Flag18-Sem)
3735 -- plus fields for binary operator
3736 -- plus fields for expression
3737
3738 -- N_Op_Divide
3739 -- Sloc points to /
3740 -- Treat_Fixed_As_Integer (Flag14-Sem)
3741 -- Do_Division_Check (Flag13-Sem)
3742 -- Rounded_Result (Flag18-Sem)
3743 -- plus fields for binary operator
3744 -- plus fields for expression
3745
3746 -- N_Op_Mod
3747 -- Sloc points to MOD
3748 -- Treat_Fixed_As_Integer (Flag14-Sem)
3749 -- Do_Division_Check (Flag13-Sem)
3750 -- plus fields for binary operator
3751 -- plus fields for expression
3752
3753 -- N_Op_Rem
3754 -- Sloc points to REM
3755 -- Treat_Fixed_As_Integer (Flag14-Sem)
3756 -- Do_Division_Check (Flag13-Sem)
3757 -- plus fields for binary operator
3758 -- plus fields for expression
3759
3760 -- N_Op_Expon
3761 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
3762 -- Sloc points to **
3763 -- plus fields for binary operator
3764 -- plus fields for expression
3765
3766 -- N_Op_Plus
3767 -- Sloc points to + (unary)
3768 -- plus fields for unary operator
3769 -- plus fields for expression
3770
3771 -- N_Op_Minus
3772 -- Sloc points to - (unary)
3773 -- plus fields for unary operator
3774 -- plus fields for expression
3775
3776 -- N_Op_Abs
3777 -- Sloc points to ABS
3778 -- plus fields for unary operator
3779 -- plus fields for expression
3780
3781 -- N_Op_Not
3782 -- Sloc points to NOT
3783 -- plus fields for unary operator
3784 -- plus fields for expression
3785
3786 -- See also shift operators in section B.2
3787
3788 -- Note on fixed-point operations passed to Gigi: For adding operators,
3789 -- the semantics is to treat these simply as integer operations, with
3790 -- the small values being ignored (the bounds are already stored in
3791 -- units of small, so that constraint checking works as usual). For the
3792 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
3793 -- point operands if the Treat_Fixed_As_Integer flag is set and will
3794 -- thus treat these nodes in identical manner, ignoring small values.
3795
3796 --------------------------
3797 -- 4.6 Type Conversion --
3798 --------------------------
3799
3800 -- TYPE_CONVERSION ::=
3801 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
3802
3803 -- In the (NAME) case, the name is stored as the expression
3804
3805 -- Note: the parser never generates a type conversion node, since it
3806 -- looks like an indexed component which is generated by preference.
3807 -- The semantic pass must correct this misidentification.
3808
3809 -- Gigi handles conversions that involve no change in the root type,
3810 -- and also all conversions from integer to floating-point types.
3811 -- Conversions from floating-point to integer are only handled in
3812 -- the case where Float_Truncate flag set. Other conversions from
3813 -- floating-point to integer (involving rounding) and all conversions
3814 -- involving fixed-point types are handled by the expander.
3815
3816 -- Sprint syntax if Float_Truncate set: X^(Y)
3817 -- Sprint syntax if Conversion_OK set X?(Y)
3818 -- Sprint syntax if both flags set X?^(Y)
3819
3820 -- Note: If either the operand or result type is fixed-point, Gigi will
3821 -- only see a type conversion node with Conversion_OK set. The front end
3822 -- takes care of all handling of small's for fixed-point conversions.
3823
3824 -- N_Type_Conversion
3825 -- Sloc points to first token of subtype mark
3826 -- Subtype_Mark (Node4)
3827 -- Expression (Node3)
3828 -- Do_Tag_Check (Flag13-Sem)
3829 -- Do_Length_Check (Flag4-Sem)
3830 -- Do_Overflow_Check (Flag17-Sem)
3831 -- Float_Truncate (Flag11-Sem)
3832 -- Rounded_Result (Flag18-Sem)
3833 -- Conversion_OK (Flag14-Sem)
3834 -- plus fields for expression
3835
3836 -- Note: if a range check is required, then the Do_Range_Check flag
3837 -- is set in the Expression with the check being done against the
3838 -- target type range (after the base type conversion, if any).
3839
3840 -------------------------------
3841 -- 4.7 Qualified Expression --
3842 -------------------------------
3843
3844 -- QUALIFIED_EXPRESSION ::=
3845 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
3846
3847 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
3848 -- the expression, so the Expression field of this node always points
3849 -- to a parenthesized expression in this case (i.e. Paren_Count will
3850 -- always be non-zero for the referenced expression if it is not an
3851 -- aggregate).
3852
3853 -- N_Qualified_Expression
3854 -- Sloc points to apostrophe
3855 -- Subtype_Mark (Node4)
3856 -- Expression (Node3) expression or aggregate
3857 -- plus fields for expression
3858
3859 --------------------
3860 -- 4.8 Allocator --
3861 --------------------
3862
3863 -- ALLOCATOR ::=
3864 -- new [NULL_EXCLUSION] SUBTYPE_INDICATION | new QUALIFIED_EXPRESSION
3865
3866 -- Sprint syntax (when storage pool present)
3867 -- new xxx (storage_pool = pool)
3868
3869 -- N_Allocator
3870 -- Sloc points to NEW
3871 -- Expression (Node3) subtype indication or qualified expression
3872 -- Storage_Pool (Node1-Sem)
3873 -- Procedure_To_Call (Node2-Sem)
3874 -- Coextensions (Elist4-Sem)
3875 -- Null_Exclusion_Present (Flag11)
3876 -- No_Initialization (Flag13-Sem)
3877 -- Is_Static_Coextension (Flag14-Sem)
3878 -- Do_Storage_Check (Flag17-Sem)
3879 -- Is_Dynamic_Coextension (Flag18-Sem)
3880 -- plus fields for expression
3881
3882 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
3883 -- This flag has a special function in conjunction with the restriction
3884 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
3885 -- is not set. This means that if a source allocator is replaced with
3886 -- a constructed allocator, the Comes_From_Source flag should be copied
3887 -- to the newly created allocator.
3888
3889 ---------------------------------
3890 -- 5.1 Sequence Of Statements --
3891 ---------------------------------
3892
3893 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
3894
3895 -- Note: Although the parser will not accept a declaration as a
3896 -- statement, the semantic analyzer may insert declarations (e.g.
3897 -- declarations of implicit types needed for execution of other
3898 -- statements) into a sequence of statements, so the code generator
3899 -- should be prepared to accept a declaration where a statement is
3900 -- expected. Note also that pragmas can appear as statements.
3901
3902 --------------------
3903 -- 5.1 Statement --
3904 --------------------
3905
3906 -- STATEMENT ::=
3907 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
3908
3909 -- There is no explicit node in the tree for a statement. Instead, the
3910 -- individual statement appears directly. Labels are treated as a
3911 -- kind of statement, i.e. they are linked into a statement list at
3912 -- the point they appear, so the labeled statement appears following
3913 -- the label or labels in the statement list.
3914
3915 ---------------------------
3916 -- 5.1 Simple Statement --
3917 ---------------------------
3918
3919 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
3920 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
3921 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
3922 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
3923 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
3924 -- | ABORT_STATEMENT | RAISE_STATEMENT
3925 -- | CODE_STATEMENT
3926
3927 -----------------------------
3928 -- 5.1 Compound Statement --
3929 -----------------------------
3930
3931 -- COMPOUND_STATEMENT ::=
3932 -- IF_STATEMENT | CASE_STATEMENT
3933 -- | LOOP_STATEMENT | BLOCK_STATEMENT
3934 -- | EXTENDED_RETURN_STATEMENT
3935 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
3936
3937 -------------------------
3938 -- 5.1 Null Statement --
3939 -------------------------
3940
3941 -- NULL_STATEMENT ::= null;
3942
3943 -- N_Null_Statement
3944 -- Sloc points to NULL
3945
3946 ----------------
3947 -- 5.1 Label --
3948 ----------------
3949
3950 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
3951
3952 -- Note that the occurrence of a label is not a defining identifier,
3953 -- but rather a referencing occurrence. The defining occurrence is
3954 -- in the implicit label declaration which occurs in the innermost
3955 -- enclosing block.
3956
3957 -- N_Label
3958 -- Sloc points to <<
3959 -- Identifier (Node1) direct name of statement identifier
3960 -- Exception_Junk (Flag8-Sem)
3961
3962 -- Note: Before Ada 2012, a label is always followed by a statement,
3963 -- and this is true in the tree even in Ada 2012 mode (the parser
3964 -- inserts a null statement marked with Comes_From_Source False).
3965
3966 -------------------------------
3967 -- 5.1 Statement Identifier --
3968 -------------------------------
3969
3970 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
3971
3972 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
3973 -- (not an OPERATOR_SYMBOL)
3974
3975 -------------------------------
3976 -- 5.2 Assignment Statement --
3977 -------------------------------
3978
3979 -- ASSIGNMENT_STATEMENT ::=
3980 -- variable_NAME := EXPRESSION;
3981
3982 -- N_Assignment_Statement
3983 -- Sloc points to :=
3984 -- Name (Node2)
3985 -- Expression (Node3)
3986 -- Do_Tag_Check (Flag13-Sem)
3987 -- Do_Length_Check (Flag4-Sem)
3988 -- Forwards_OK (Flag5-Sem)
3989 -- Backwards_OK (Flag6-Sem)
3990 -- No_Ctrl_Actions (Flag7-Sem)
3991 -- Componentwise_Assignment (Flag14-Sem)
3992
3993 -- Note: if a range check is required, then the Do_Range_Check flag
3994 -- is set in the Expression (right hand side), with the check being
3995 -- done against the type of the Name (left hand side).
3996
3997 -- Note: the back end places some restrictions on the form of the
3998 -- Expression field. If the object being assigned to is Atomic, then
3999 -- the Expression may not have the form of an aggregate (since this
4000 -- might cause the back end to generate separate assignments). In this
4001 -- case the front end must generate an extra temporary and initialize
4002 -- this temporary as required (the temporary itself is not atomic).
4003
4004 -----------------------
4005 -- 5.3 If Statement --
4006 -----------------------
4007
4008 -- IF_STATEMENT ::=
4009 -- if CONDITION then
4010 -- SEQUENCE_OF_STATEMENTS
4011 -- {elsif CONDITION then
4012 -- SEQUENCE_OF_STATEMENTS}
4013 -- [else
4014 -- SEQUENCE_OF_STATEMENTS]
4015 -- end if;
4016
4017 -- Gigi restriction: This expander ensures that the type of the
4018 -- Condition fields is always Standard.Boolean, even if the type
4019 -- in the source is some non-standard boolean type.
4020
4021 -- N_If_Statement
4022 -- Sloc points to IF
4023 -- Condition (Node1)
4024 -- Then_Statements (List2)
4025 -- Elsif_Parts (List3) (set to No_List if none present)
4026 -- Else_Statements (List4) (set to No_List if no else part present)
4027 -- End_Span (Uint5) (set to No_Uint if expander generated)
4028
4029 -- N_Elsif_Part
4030 -- Sloc points to ELSIF
4031 -- Condition (Node1)
4032 -- Then_Statements (List2)
4033 -- Condition_Actions (List3-Sem)
4034
4035 --------------------
4036 -- 5.3 Condition --
4037 --------------------
4038
4039 -- CONDITION ::= boolean_EXPRESSION
4040
4041 -------------------------
4042 -- 5.4 Case Statement --
4043 -------------------------
4044
4045 -- CASE_STATEMENT ::=
4046 -- case EXPRESSION is
4047 -- CASE_STATEMENT_ALTERNATIVE
4048 -- {CASE_STATEMENT_ALTERNATIVE}
4049 -- end case;
4050
4051 -- Note: the Alternatives can contain pragmas. These only occur at
4052 -- the start of the list, since any pragmas occurring after the first
4053 -- alternative are absorbed into the corresponding statement sequence.
4054
4055 -- N_Case_Statement
4056 -- Sloc points to CASE
4057 -- Expression (Node3)
4058 -- Alternatives (List4)
4059 -- End_Span (Uint5) (set to No_Uint if expander generated)
4060
4061 -- Note: Before Ada 2012, a pragma in a statement sequence is always
4062 -- followed by a statement, and this is true in the tree even in Ada
4063 -- 2012 mode (the parser inserts a null statement marked with the flag
4064 -- Comes_From_Source False).
4065
4066 -------------------------------------
4067 -- 5.4 Case Statement Alternative --
4068 -------------------------------------
4069
4070 -- CASE_STATEMENT_ALTERNATIVE ::=
4071 -- when DISCRETE_CHOICE_LIST =>
4072 -- SEQUENCE_OF_STATEMENTS
4073
4074 -- N_Case_Statement_Alternative
4075 -- Sloc points to WHEN
4076 -- Discrete_Choices (List4)
4077 -- Statements (List3)
4078
4079 -------------------------
4080 -- 5.5 Loop Statement --
4081 -------------------------
4082
4083 -- LOOP_STATEMENT ::=
4084 -- [loop_STATEMENT_IDENTIFIER :]
4085 -- [ITERATION_SCHEME] loop
4086 -- SEQUENCE_OF_STATEMENTS
4087 -- end loop [loop_IDENTIFIER];
4088
4089 -- Note: The occurrence of a loop label is not a defining identifier
4090 -- but rather a referencing occurrence. The defining occurrence is in
4091 -- the implicit label declaration which occurs in the innermost
4092 -- enclosing block.
4093
4094 -- Note: there is always a loop statement identifier present in
4095 -- the tree, even if none was given in the source. In the case where
4096 -- no loop identifier is given in the source, the parser creates
4097 -- a name of the form _Loop_n, where n is a decimal integer (the
4098 -- two underlines ensure that the loop names created in this manner
4099 -- do not conflict with any user defined identifiers), and the flag
4100 -- Has_Created_Identifier is set to True. The only exception to the
4101 -- rule that all loop statement nodes have identifiers occurs for
4102 -- loops constructed by the expander, and the semantic analyzer will
4103 -- create and supply dummy loop identifiers in these cases.
4104
4105 -- N_Loop_Statement
4106 -- Sloc points to LOOP
4107 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
4108 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
4109 -- Statements (List3)
4110 -- End_Label (Node4)
4111 -- Has_Created_Identifier (Flag15)
4112 -- Is_Null_Loop (Flag16)
4113 -- Suppress_Loop_Warnings (Flag17)
4114
4115 -- Note: the parser fills in the Identifier field if there is an
4116 -- explicit loop identifier. Otherwise the parser leaves this field
4117 -- set to Empty, and then the semantic processing for a loop statement
4118 -- creates an identifier, setting the Has_Created_Identifier flag to
4119 -- True. So after semantic anlaysis, the Identifier is always set,
4120 -- referencing an identifier whose entity has an Ekind of E_Loop.
4121
4122 --------------------------
4123 -- 5.5 Iteration Scheme --
4124 --------------------------
4125
4126 -- ITERATION_SCHEME ::=
4127 -- while CONDITION | for LOOP_PARAMETER_SPECIFICATION
4128
4129 -- Gigi restriction: This expander ensures that the type of the
4130 -- Condition field is always Standard.Boolean, even if the type
4131 -- in the source is some non-standard boolean type.
4132
4133 -- N_Iteration_Scheme
4134 -- Sloc points to WHILE or FOR
4135 -- Condition (Node1) (set to Empty if FOR case)
4136 -- Condition_Actions (List3-Sem)
4137 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
4138
4139 ---------------------------------------
4140 -- 5.5 Loop parameter specification --
4141 ---------------------------------------
4142
4143 -- LOOP_PARAMETER_SPECIFICATION ::=
4144 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
4145
4146 -- N_Loop_Parameter_Specification
4147 -- Sloc points to first identifier
4148 -- Defining_Identifier (Node1)
4149 -- Reverse_Present (Flag15)
4150 -- Discrete_Subtype_Definition (Node4)
4151
4152 --------------------------
4153 -- 5.6 Block Statement --
4154 --------------------------
4155
4156 -- BLOCK_STATEMENT ::=
4157 -- [block_STATEMENT_IDENTIFIER:]
4158 -- [declare
4159 -- DECLARATIVE_PART]
4160 -- begin
4161 -- HANDLED_SEQUENCE_OF_STATEMENTS
4162 -- end [block_IDENTIFIER];
4163
4164 -- Note that the occurrence of a block identifier is not a defining
4165 -- identifier, but rather a referencing occurrence. The defining
4166 -- occurrence is an E_Block entity declared by the implicit label
4167 -- declaration which occurs in the innermost enclosing block statement
4168 -- or body; the block identifier denotes that E_Block.
4169
4170 -- For block statements that come from source code, there is always a
4171 -- block statement identifier present in the tree, denoting an
4172 -- E_Block. In the case where no block identifier is given in the
4173 -- source, the parser creates a name of the form B_n, where n is a
4174 -- decimal integer, and the flag Has_Created_Identifier is set to
4175 -- True. Blocks constructed by the expander usually have no identifier,
4176 -- and no corresponding entity.
4177
4178 -- Note: the block statement created for an extended return statement
4179 -- has an entity, and this entity is an E_Return_Statement, rather than
4180 -- the usual E_Block.
4181
4182 -- Note: Exception_Junk is set for the wrapping blocks created during
4183 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
4184
4185 -- N_Block_Statement
4186 -- Sloc points to DECLARE or BEGIN
4187 -- Identifier (Node1) block direct name (set to Empty if not present)
4188 -- Declarations (List2) (set to No_List if no DECLARE part)
4189 -- Handled_Statement_Sequence (Node4)
4190 -- Is_Task_Master (Flag5-Sem)
4191 -- Activation_Chain_Entity (Node3-Sem)
4192 -- Has_Created_Identifier (Flag15)
4193 -- Is_Task_Allocation_Block (Flag6)
4194 -- Is_Asynchronous_Call_Block (Flag7)
4195 -- Exception_Junk (Flag8-Sem)
4196
4197 -------------------------
4198 -- 5.7 Exit Statement --
4199 -------------------------
4200
4201 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
4202
4203 -- Gigi restriction: This expander ensures that the type of the
4204 -- Condition field is always Standard.Boolean, even if the type
4205 -- in the source is some non-standard boolean type.
4206
4207 -- N_Exit_Statement
4208 -- Sloc points to EXIT
4209 -- Name (Node2) (set to Empty if no loop name present)
4210 -- Condition (Node1) (set to Empty if no WHEN part present)
4211 -- Next_Exit_Statement (Node3-Sem): Next exit on chain
4212
4213 -------------------------
4214 -- 5.9 Goto Statement --
4215 -------------------------
4216
4217 -- GOTO_STATEMENT ::= goto label_NAME;
4218
4219 -- N_Goto_Statement
4220 -- Sloc points to GOTO
4221 -- Name (Node2)
4222 -- Exception_Junk (Flag8-Sem)
4223
4224 ---------------------------------
4225 -- 6.1 Subprogram Declaration --
4226 ---------------------------------
4227
4228 -- SUBPROGRAM_DECLARATION ::=
4229 -- SUBPROGRAM_SPECIFICATION
4230 -- [ASPECT_SPECIFICATIONS];
4231
4232 -- N_Subprogram_Declaration
4233 -- Sloc points to FUNCTION or PROCEDURE
4234 -- Specification (Node1)
4235 -- Body_To_Inline (Node3-Sem)
4236 -- Corresponding_Body (Node5-Sem)
4237 -- Parent_Spec (Node4-Sem)
4238
4239 ------------------------------------------
4240 -- 6.1 Abstract Subprogram Declaration --
4241 ------------------------------------------
4242
4243 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
4244 -- SUBPROGRAM_SPECIFICATION is abstract
4245 -- [ASPECT_SPECIFICATIONS];
4246
4247 -- N_Abstract_Subprogram_Declaration
4248 -- Sloc points to ABSTRACT
4249 -- Specification (Node1)
4250
4251 -----------------------------------
4252 -- 6.1 Subprogram Specification --
4253 -----------------------------------
4254
4255 -- SUBPROGRAM_SPECIFICATION ::=
4256 -- [[not] overriding]
4257 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
4258 -- | [[not] overriding]
4259 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
4260
4261 -- Note: there are no separate nodes for the profiles, instead the
4262 -- information appears directly in the following nodes.
4263
4264 -- N_Function_Specification
4265 -- Sloc points to FUNCTION
4266 -- Defining_Unit_Name (Node1) (the designator)
4267 -- Elaboration_Boolean (Node2-Sem)
4268 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4269 -- Null_Exclusion_Present (Flag11)
4270 -- Result_Definition (Node4) for result subtype
4271 -- Generic_Parent (Node5-Sem)
4272 -- Must_Override (Flag14) set if overriding indicator present
4273 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4274
4275 -- N_Procedure_Specification
4276 -- Sloc points to PROCEDURE
4277 -- Defining_Unit_Name (Node1)
4278 -- Elaboration_Boolean (Node2-Sem)
4279 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4280 -- Generic_Parent (Node5-Sem)
4281 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
4282 -- Must_Override (Flag14) set if overriding indicator present
4283 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4284
4285 -- Note: overriding indicator is an Ada 2005 feature
4286
4287 ---------------------
4288 -- 6.1 Designator --
4289 ---------------------
4290
4291 -- DESIGNATOR ::=
4292 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
4293
4294 -- Designators that are simply identifiers or operator symbols appear
4295 -- directly in the tree in this form. The following node is used only
4296 -- in the case where the designator has a parent unit name component.
4297
4298 -- N_Designator
4299 -- Sloc points to period
4300 -- Name (Node2) holds the parent unit name. Note that this is always
4301 -- non-Empty, since this node is only used for the case where a
4302 -- parent library unit package name is present.
4303 -- Identifier (Node1)
4304
4305 -- Note that the identifier can also be an operator symbol here
4306
4307 ------------------------------
4308 -- 6.1 Defining Designator --
4309 ------------------------------
4310
4311 -- DEFINING_DESIGNATOR ::=
4312 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
4313
4314 -------------------------------------
4315 -- 6.1 Defining Program Unit Name --
4316 -------------------------------------
4317
4318 -- DEFINING_PROGRAM_UNIT_NAME ::=
4319 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
4320
4321 -- The parent unit name is present only in the case of a child unit
4322 -- name (permissible only for Ada 95 for a library level unit, i.e.
4323 -- a unit at scope level one). If no such name is present, the defining
4324 -- program unit name is represented simply as the defining identifier.
4325 -- In the child unit case, the following node is used to represent the
4326 -- child unit name.
4327
4328 -- N_Defining_Program_Unit_Name
4329 -- Sloc points to period
4330 -- Name (Node2) holds the parent unit name. Note that this is always
4331 -- non-Empty, since this node is only used for the case where a
4332 -- parent unit name is present.
4333 -- Defining_Identifier (Node1)
4334
4335 --------------------------
4336 -- 6.1 Operator Symbol --
4337 --------------------------
4338
4339 -- OPERATOR_SYMBOL ::= STRING_LITERAL
4340
4341 -- Note: the fields of the N_Operator_Symbol node are laid out to
4342 -- match the corresponding fields of an N_Character_Literal node. This
4343 -- allows easy conversion of the operator symbol node into a character
4344 -- literal node in the case where a string constant of the form of an
4345 -- operator symbol is scanned out as such, but turns out semantically
4346 -- to be a string literal that is not an operator. For details see
4347 -- Sinfo.CN.Change_Operator_Symbol_To_String_Literal.
4348
4349 -- N_Operator_Symbol
4350 -- Sloc points to literal
4351 -- Chars (Name1) contains the Name_Id for the operator symbol
4352 -- Strval (Str3) Id of string value. This is used if the operator
4353 -- symbol turns out to be a normal string after all.
4354 -- Entity (Node4-Sem)
4355 -- Associated_Node (Node4-Sem)
4356 -- Has_Private_View (Flag11-Sem) set in generic units.
4357 -- Etype (Node5-Sem)
4358
4359 -- Note: the Strval field may be set to No_String for generated
4360 -- operator symbols that are known not to be string literals
4361 -- semantically.
4362
4363 -----------------------------------
4364 -- 6.1 Defining Operator Symbol --
4365 -----------------------------------
4366
4367 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
4368
4369 -- A defining operator symbol is an entity, which has additional
4370 -- fields depending on the setting of the Ekind field. These
4371 -- additional fields are defined (and access subprograms declared)
4372 -- in package Einfo.
4373
4374 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
4375 -- are deliberately layed out to match the layout of fields in an
4376 -- ordinary N_Operator_Symbol node allowing for easy alteration of
4377 -- an operator symbol node into a defining operator symbol node.
4378 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
4379 -- for further details.
4380
4381 -- N_Defining_Operator_Symbol
4382 -- Sloc points to literal
4383 -- Chars (Name1) contains the Name_Id for the operator symbol
4384 -- Next_Entity (Node2-Sem)
4385 -- Scope (Node3-Sem)
4386 -- Etype (Node5-Sem)
4387
4388 ----------------------------
4389 -- 6.1 Parameter Profile --
4390 ----------------------------
4391
4392 -- PARAMETER_PROFILE ::= [FORMAL_PART]
4393
4394 ---------------------------------------
4395 -- 6.1 Parameter and Result Profile --
4396 ---------------------------------------
4397
4398 -- PARAMETER_AND_RESULT_PROFILE ::=
4399 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
4400 -- | [FORMAL_PART] return ACCESS_DEFINITION
4401
4402 -- There is no explicit node in the tree for a parameter and result
4403 -- profile. Instead the information appears directly in the parent.
4404
4405 ----------------------
4406 -- 6.1 Formal part --
4407 ----------------------
4408
4409 -- FORMAL_PART ::=
4410 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
4411
4412 ----------------------------------
4413 -- 6.1 Parameter specification --
4414 ----------------------------------
4415
4416 -- PARAMETER_SPECIFICATION ::=
4417 -- DEFINING_IDENTIFIER_LIST : MODE [NULL_EXCLUSION] SUBTYPE_MARK
4418 -- [:= DEFAULT_EXPRESSION]
4419 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
4420 -- [:= DEFAULT_EXPRESSION]
4421
4422 -- Although the syntax allows multiple identifiers in the list, the
4423 -- semantics is as though successive specifications were given with
4424 -- identical type definition and expression components. To simplify
4425 -- semantic processing, the parser represents a multiple declaration
4426 -- case as a sequence of single Specifications, using the More_Ids and
4427 -- Prev_Ids flags to preserve the original source form as described
4428 -- in the section on "Handling of Defining Identifier Lists".
4429
4430 -- N_Parameter_Specification
4431 -- Sloc points to first identifier
4432 -- Defining_Identifier (Node1)
4433 -- In_Present (Flag15)
4434 -- Out_Present (Flag17)
4435 -- Null_Exclusion_Present (Flag11)
4436 -- Parameter_Type (Node2) subtype mark or access definition
4437 -- Expression (Node3) (set to Empty if no default expression present)
4438 -- Do_Accessibility_Check (Flag13-Sem)
4439 -- More_Ids (Flag5) (set to False if no more identifiers in list)
4440 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
4441 -- Default_Expression (Node5-Sem)
4442
4443 ---------------
4444 -- 6.1 Mode --
4445 ---------------
4446
4447 -- MODE ::= [in] | in out | out
4448
4449 -- There is no explicit node in the tree for the Mode. Instead the
4450 -- In_Present and Out_Present flags are set in the parent node to
4451 -- record the presence of keywords specifying the mode.
4452
4453 --------------------------
4454 -- 6.3 Subprogram Body --
4455 --------------------------
4456
4457 -- SUBPROGRAM_BODY ::=
4458 -- SUBPROGRAM_SPECIFICATION is
4459 -- DECLARATIVE_PART
4460 -- begin
4461 -- HANDLED_SEQUENCE_OF_STATEMENTS
4462 -- end [DESIGNATOR];
4463
4464 -- N_Subprogram_Body
4465 -- Sloc points to FUNCTION or PROCEDURE
4466 -- Specification (Node1)
4467 -- Declarations (List2)
4468 -- Handled_Statement_Sequence (Node4)
4469 -- Activation_Chain_Entity (Node3-Sem)
4470 -- Corresponding_Spec (Node5-Sem)
4471 -- Acts_As_Spec (Flag4-Sem)
4472 -- Bad_Is_Detected (Flag15) used only by parser
4473 -- Do_Storage_Check (Flag17-Sem)
4474 -- Has_Pragma_Priority (Flag6-Sem)
4475 -- Is_Protected_Subprogram_Body (Flag7-Sem)
4476 -- Is_Entry_Barrier_Function (Flag8-Sem)
4477 -- Is_Task_Master (Flag5-Sem)
4478 -- Was_Originally_Stub (Flag13-Sem)
4479 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
4480
4481 ------------------------------
4482 -- Parameterized Expression --
4483 ------------------------------
4484
4485 -- This is an Ada 2012 extension, we put it here for now, to be labeled
4486 -- and put in its proper section when we know exactly where that is!
4487
4488 -- PARAMETERIZED_EXPRESSION ::=
4489 -- FUNCTION SPECIFICATION IS (EXPRESSION);
4490
4491 -- N_Parameterized_Expression
4492 -- Sloc points to FUNCTION
4493 -- Specification (Node1)
4494 -- Expression (Node3)
4495
4496 -----------------------------------
4497 -- 6.4 Procedure Call Statement --
4498 -----------------------------------
4499
4500 -- PROCEDURE_CALL_STATEMENT ::=
4501 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
4502
4503 -- Note: the reason that a procedure call has expression fields is
4504 -- that it semantically resembles an expression, e.g. overloading is
4505 -- allowed and a type is concocted for semantic processing purposes.
4506 -- Certain of these fields, such as Parens are not relevant, but it
4507 -- is easier to just supply all of them together!
4508
4509 -- N_Procedure_Call_Statement
4510 -- Sloc points to first token of name or prefix
4511 -- Name (Node2) stores name or prefix
4512 -- Parameter_Associations (List3) (set to No_List if no
4513 -- actual parameter part)
4514 -- First_Named_Actual (Node4-Sem)
4515 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4516 -- Do_Tag_Check (Flag13-Sem)
4517 -- No_Elaboration_Check (Flag14-Sem)
4518 -- Parameter_List_Truncated (Flag17-Sem)
4519 -- ABE_Is_Certain (Flag18-Sem)
4520 -- plus fields for expression
4521
4522 -- If any IN parameter requires a range check, then the corresponding
4523 -- argument expression has the Do_Range_Check flag set, and the range
4524 -- check is done against the formal type. Note that this argument
4525 -- expression may appear directly in the Parameter_Associations list,
4526 -- or may be a descendent of an N_Parameter_Association node that
4527 -- appears in this list.
4528
4529 ------------------------
4530 -- 6.4 Function Call --
4531 ------------------------
4532
4533 -- FUNCTION_CALL ::=
4534 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
4535
4536 -- Note: the parser may generate an indexed component node or simply
4537 -- a name node instead of a function call node. The semantic pass must
4538 -- correct this misidentification.
4539
4540 -- N_Function_Call
4541 -- Sloc points to first token of name or prefix
4542 -- Name (Node2) stores name or prefix
4543 -- Parameter_Associations (List3) (set to No_List if no
4544 -- actual parameter part)
4545 -- First_Named_Actual (Node4-Sem)
4546 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4547 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
4548 -- Do_Tag_Check (Flag13-Sem)
4549 -- No_Elaboration_Check (Flag14-Sem)
4550 -- Parameter_List_Truncated (Flag17-Sem)
4551 -- ABE_Is_Certain (Flag18-Sem)
4552 -- plus fields for expression
4553
4554 --------------------------------
4555 -- 6.4 Actual Parameter Part --
4556 --------------------------------
4557
4558 -- ACTUAL_PARAMETER_PART ::=
4559 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
4560
4561 --------------------------------
4562 -- 6.4 Parameter Association --
4563 --------------------------------
4564
4565 -- PARAMETER_ASSOCIATION ::=
4566 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
4567
4568 -- Note: the N_Parameter_Association node is built only if a formal
4569 -- parameter selector name is present, otherwise the parameter
4570 -- association appears in the tree simply as the node for the
4571 -- explicit actual parameter.
4572
4573 -- N_Parameter_Association
4574 -- Sloc points to formal parameter
4575 -- Selector_Name (Node2) (always non-Empty)
4576 -- Explicit_Actual_Parameter (Node3)
4577 -- Next_Named_Actual (Node4-Sem)
4578 -- Is_Accessibility_Actual (Flag13-Sem)
4579
4580 ---------------------------
4581 -- 6.4 Actual Parameter --
4582 ---------------------------
4583
4584 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
4585
4586 ---------------------------
4587 -- 6.5 Return Statement --
4588 ---------------------------
4589
4590 -- RETURN_STATEMENT ::= return [EXPRESSION]; -- Ada 95
4591
4592 -- In Ada 2005, we have:
4593
4594 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
4595
4596 -- EXTENDED_RETURN_STATEMENT ::=
4597 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4598 -- [:= EXPRESSION] [do
4599 -- HANDLED_SEQUENCE_OF_STATEMENTS
4600 -- end return];
4601
4602 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
4603
4604 -- So in Ada 2005, RETURN_STATEMENT is no longer a nonterminal, but
4605 -- "return statement" is defined in 6.5 to mean a
4606 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT.
4607
4608 -- N_Return_Statement
4609 -- Sloc points to RETURN
4610 -- Return_Statement_Entity (Node5-Sem)
4611 -- Expression (Node3) (set to Empty if no expression present)
4612 -- Storage_Pool (Node1-Sem)
4613 -- Procedure_To_Call (Node2-Sem)
4614 -- Do_Tag_Check (Flag13-Sem)
4615 -- By_Ref (Flag5-Sem)
4616 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
4617
4618 -- N_Return_Statement represents a simple_return_statement, and is
4619 -- renamed to be N_Simple_Return_Statement below. Clients should refer
4620 -- to N_Simple_Return_Statement. We retain N_Return_Statement because
4621 -- that's how gigi knows it. See also renaming of Make_Return_Statement
4622 -- as Make_Simple_Return_Statement in Sem_Util.
4623
4624 -- Note: Return_Statement_Entity points to an E_Return_Statement
4625
4626 -- If a range check is required, then Do_Range_Check is set on the
4627 -- Expression. The check is against the return subtype of the function.
4628
4629 -- N_Extended_Return_Statement
4630 -- Sloc points to RETURN
4631 -- Return_Statement_Entity (Node5-Sem)
4632 -- Return_Object_Declarations (List3)
4633 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
4634 -- Storage_Pool (Node1-Sem)
4635 -- Procedure_To_Call (Node2-Sem)
4636 -- Do_Tag_Check (Flag13-Sem)
4637 -- By_Ref (Flag5-Sem)
4638
4639 -- Note: Return_Statement_Entity points to an E_Return_Statement.
4640
4641 -- Note that Return_Object_Declarations is a list containing the
4642 -- N_Object_Declaration -- see comment on this field above.
4643
4644 -- The declared object will have Is_Return_Object = True.
4645
4646 -- There is no such syntactic category as return_object_declaration
4647 -- in the RM. Return_Object_Declarations represents this portion of
4648 -- the syntax for EXTENDED_RETURN_STATEMENT:
4649 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4650 -- [:= EXPRESSION]
4651
4652 -- There are two entities associated with an extended_return_statement:
4653 -- the Return_Statement_Entity represents the statement itself, and the
4654 -- Defining_Identifier of the Object_Declaration in
4655 -- Return_Object_Declarations represents the object being
4656 -- returned. N_Simple_Return_Statement has only the former.
4657
4658 ------------------------------
4659 -- 7.1 Package Declaration --
4660 ------------------------------
4661
4662 -- PACKAGE_DECLARATION ::=
4663 -- PACKAGE_SPECIFICATION
4664 -- [ASPECT_SPECIFICATIONS];
4665
4666 -- Note: the activation chain entity for a package spec is used for
4667 -- all tasks declared in the package spec, or in the package body.
4668
4669 -- N_Package_Declaration
4670 -- Sloc points to PACKAGE
4671 -- Specification (Node1)
4672 -- Corresponding_Body (Node5-Sem)
4673 -- Parent_Spec (Node4-Sem)
4674 -- Activation_Chain_Entity (Node3-Sem)
4675
4676 --------------------------------
4677 -- 7.1 Package Specification --
4678 --------------------------------
4679
4680 -- PACKAGE_SPECIFICATION ::=
4681 -- package DEFINING_PROGRAM_UNIT_NAME is
4682 -- {BASIC_DECLARATIVE_ITEM}
4683 -- [private
4684 -- {BASIC_DECLARATIVE_ITEM}]
4685 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
4686
4687 -- N_Package_Specification
4688 -- Sloc points to PACKAGE
4689 -- Defining_Unit_Name (Node1)
4690 -- Visible_Declarations (List2)
4691 -- Private_Declarations (List3) (set to No_List if no private
4692 -- part present)
4693 -- End_Label (Node4)
4694 -- Generic_Parent (Node5-Sem)
4695 -- Limited_View_Installed (Flag18-Sem)
4696
4697 -----------------------
4698 -- 7.1 Package Body --
4699 -----------------------
4700
4701 -- PACKAGE_BODY ::=
4702 -- package body DEFINING_PROGRAM_UNIT_NAME is
4703 -- DECLARATIVE_PART
4704 -- [begin
4705 -- HANDLED_SEQUENCE_OF_STATEMENTS]
4706 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
4707
4708 -- N_Package_Body
4709 -- Sloc points to PACKAGE
4710 -- Defining_Unit_Name (Node1)
4711 -- Declarations (List2)
4712 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
4713 -- Corresponding_Spec (Node5-Sem)
4714 -- Was_Originally_Stub (Flag13-Sem)
4715
4716 -- Note: if a source level package does not contain a handled sequence
4717 -- of statements, then the parser supplies a dummy one with a null
4718 -- sequence of statements. Comes_From_Source will be False in this
4719 -- constructed sequence. The reason we need this is for the End_Label
4720 -- field in the HSS.
4721
4722 -----------------------------------
4723 -- 7.4 Private Type Declaration --
4724 -----------------------------------
4725
4726 -- PRIVATE_TYPE_DECLARATION ::=
4727 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
4728 -- is [[abstract] tagged] [limited] private;
4729
4730 -- Note: TAGGED is not permitted in Ada 83 mode
4731
4732 -- N_Private_Type_Declaration
4733 -- Sloc points to TYPE
4734 -- Defining_Identifier (Node1)
4735 -- Discriminant_Specifications (List4) (set to No_List if no
4736 -- discriminant part)
4737 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4738 -- Abstract_Present (Flag4)
4739 -- Tagged_Present (Flag15)
4740 -- Limited_Present (Flag17)
4741
4742 ----------------------------------------
4743 -- 7.4 Private Extension Declaration --
4744 ----------------------------------------
4745
4746 -- PRIVATE_EXTENSION_DECLARATION ::=
4747 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
4748 -- [abstract] [limited | synchronized]
4749 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
4750 -- with private;
4751
4752 -- Note: LIMITED, and private extension declarations are not allowed
4753 -- in Ada 83 mode.
4754
4755 -- N_Private_Extension_Declaration
4756 -- Sloc points to TYPE
4757 -- Defining_Identifier (Node1)
4758 -- Discriminant_Specifications (List4) (set to No_List if no
4759 -- discriminant part)
4760 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4761 -- Abstract_Present (Flag4)
4762 -- Limited_Present (Flag17)
4763 -- Synchronized_Present (Flag7)
4764 -- Subtype_Indication (Node5)
4765 -- Interface_List (List2) (set to No_List if none)
4766
4767 ---------------------
4768 -- 8.4 Use Clause --
4769 ---------------------
4770
4771 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
4772
4773 -----------------------------
4774 -- 8.4 Use Package Clause --
4775 -----------------------------
4776
4777 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
4778
4779 -- N_Use_Package_Clause
4780 -- Sloc points to USE
4781 -- Names (List2)
4782 -- Next_Use_Clause (Node3-Sem)
4783 -- Hidden_By_Use_Clause (Elist4-Sem)
4784
4785 --------------------------
4786 -- 8.4 Use Type Clause --
4787 --------------------------
4788
4789 -- USE_TYPE_CLAUSE ::= use [ALL] type SUBTYPE_MARK {, SUBTYPE_MARK};
4790
4791 -- Note: use type clause is not permitted in Ada 83 mode
4792
4793 -- Note: the ALL keyword can appear only in Ada 2012 mode
4794
4795 -- N_Use_Type_Clause
4796 -- Sloc points to USE
4797 -- Subtype_Marks (List2)
4798 -- Next_Use_Clause (Node3-Sem)
4799 -- Hidden_By_Use_Clause (Elist4-Sem)
4800 -- All_Present (Flag15)
4801
4802 -------------------------------
4803 -- 8.5 Renaming Declaration --
4804 -------------------------------
4805
4806 -- RENAMING_DECLARATION ::=
4807 -- OBJECT_RENAMING_DECLARATION
4808 -- | EXCEPTION_RENAMING_DECLARATION
4809 -- | PACKAGE_RENAMING_DECLARATION
4810 -- | SUBPROGRAM_RENAMING_DECLARATION
4811 -- | GENERIC_RENAMING_DECLARATION
4812
4813 --------------------------------------
4814 -- 8.5 Object Renaming Declaration --
4815 --------------------------------------
4816
4817 -- OBJECT_RENAMING_DECLARATION ::=
4818 -- DEFINING_IDENTIFIER :
4819 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME;
4820 -- | DEFINING_IDENTIFIER :
4821 -- ACCESS_DEFINITION renames object_NAME;
4822
4823 -- Note: Access_Definition is an optional field that gives support to
4824 -- Ada 2005 (AI-230). The parser generates nodes that have either the
4825 -- Subtype_Indication field or else the Access_Definition field.
4826
4827 -- N_Object_Renaming_Declaration
4828 -- Sloc points to first identifier
4829 -- Defining_Identifier (Node1)
4830 -- Null_Exclusion_Present (Flag11) (set to False if not present)
4831 -- Subtype_Mark (Node4) (set to Empty if not present)
4832 -- Access_Definition (Node3) (set to Empty if not present)
4833 -- Name (Node2)
4834 -- Corresponding_Generic_Association (Node5-Sem)
4835
4836 -----------------------------------------
4837 -- 8.5 Exception Renaming Declaration --
4838 -----------------------------------------
4839
4840 -- EXCEPTION_RENAMING_DECLARATION ::=
4841 -- DEFINING_IDENTIFIER : exception renames exception_NAME;
4842
4843 -- N_Exception_Renaming_Declaration
4844 -- Sloc points to first identifier
4845 -- Defining_Identifier (Node1)
4846 -- Name (Node2)
4847
4848 ---------------------------------------
4849 -- 8.5 Package Renaming Declaration --
4850 ---------------------------------------
4851
4852 -- PACKAGE_RENAMING_DECLARATION ::=
4853 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME;
4854
4855 -- N_Package_Renaming_Declaration
4856 -- Sloc points to PACKAGE
4857 -- Defining_Unit_Name (Node1)
4858 -- Name (Node2)
4859 -- Parent_Spec (Node4-Sem)
4860
4861 ------------------------------------------
4862 -- 8.5 Subprogram Renaming Declaration --
4863 ------------------------------------------
4864
4865 -- SUBPROGRAM_RENAMING_DECLARATION ::=
4866 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
4867
4868 -- N_Subprogram_Renaming_Declaration
4869 -- Sloc points to RENAMES
4870 -- Specification (Node1)
4871 -- Name (Node2)
4872 -- Parent_Spec (Node4-Sem)
4873 -- Corresponding_Spec (Node5-Sem)
4874 -- Corresponding_Formal_Spec (Node3-Sem)
4875 -- From_Default (Flag6-Sem)
4876
4877 -----------------------------------------
4878 -- 8.5.5 Generic Renaming Declaration --
4879 -----------------------------------------
4880
4881 -- GENERIC_RENAMING_DECLARATION ::=
4882 -- generic package DEFINING_PROGRAM_UNIT_NAME
4883 -- renames generic_package_NAME
4884 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
4885 -- renames generic_procedure_NAME
4886 -- | generic function DEFINING_PROGRAM_UNIT_NAME
4887 -- renames generic_function_NAME
4888
4889 -- N_Generic_Package_Renaming_Declaration
4890 -- Sloc points to GENERIC
4891 -- Defining_Unit_Name (Node1)
4892 -- Name (Node2)
4893 -- Parent_Spec (Node4-Sem)
4894
4895 -- N_Generic_Procedure_Renaming_Declaration
4896 -- Sloc points to GENERIC
4897 -- Defining_Unit_Name (Node1)
4898 -- Name (Node2)
4899 -- Parent_Spec (Node4-Sem)
4900
4901 -- N_Generic_Function_Renaming_Declaration
4902 -- Sloc points to GENERIC
4903 -- Defining_Unit_Name (Node1)
4904 -- Name (Node2)
4905 -- Parent_Spec (Node4-Sem)
4906
4907 --------------------------------
4908 -- 9.1 Task Type Declaration --
4909 --------------------------------
4910
4911 -- TASK_TYPE_DECLARATION ::=
4912 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4913 -- [is [new INTERFACE_LIST with] TASK_DEFINITION]
4914 -- [ASPECT_SPECIFICATIONS];
4915
4916 -- N_Task_Type_Declaration
4917 -- Sloc points to TASK
4918 -- Defining_Identifier (Node1)
4919 -- Discriminant_Specifications (List4) (set to No_List if no
4920 -- discriminant part)
4921 -- Interface_List (List2) (set to No_List if none)
4922 -- Task_Definition (Node3) (set to Empty if not present)
4923 -- Corresponding_Body (Node5-Sem)
4924
4925 ----------------------------------
4926 -- 9.1 Single Task Declaration --
4927 ----------------------------------
4928
4929 -- SINGLE_TASK_DECLARATION ::=
4930 -- task DEFINING_IDENTIFIER
4931 -- [is [new INTERFACE_LIST with] TASK_DEFINITION]
4932 -- [ASPECT_SPECIFICATIONS];
4933
4934 -- N_Single_Task_Declaration
4935 -- Sloc points to TASK
4936 -- Defining_Identifier (Node1)
4937 -- Interface_List (List2) (set to No_List if none)
4938 -- Task_Definition (Node3) (set to Empty if not present)
4939
4940 --------------------------
4941 -- 9.1 Task Definition --
4942 --------------------------
4943
4944 -- TASK_DEFINITION ::=
4945 -- {TASK_ITEM}
4946 -- [private
4947 -- {TASK_ITEM}]
4948 -- end [task_IDENTIFIER]
4949
4950 -- Note: as a result of semantic analysis, the list of task items can
4951 -- include implicit type declarations resulting from entry families.
4952
4953 -- N_Task_Definition
4954 -- Sloc points to first token of task definition
4955 -- Visible_Declarations (List2)
4956 -- Private_Declarations (List3) (set to No_List if no private part)
4957 -- End_Label (Node4)
4958 -- Has_Pragma_Priority (Flag6-Sem)
4959 -- Has_Storage_Size_Pragma (Flag5-Sem)
4960 -- Has_Task_Info_Pragma (Flag7-Sem)
4961 -- Has_Task_Name_Pragma (Flag8-Sem)
4962 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
4963
4964 --------------------
4965 -- 9.1 Task Item --
4966 --------------------
4967
4968 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
4969
4970 --------------------
4971 -- 9.1 Task Body --
4972 --------------------
4973
4974 -- TASK_BODY ::=
4975 -- task body task_DEFINING_IDENTIFIER is
4976 -- DECLARATIVE_PART
4977 -- begin
4978 -- HANDLED_SEQUENCE_OF_STATEMENTS
4979 -- end [task_IDENTIFIER];
4980
4981 -- Gigi restriction: This node never appears
4982
4983 -- N_Task_Body
4984 -- Sloc points to TASK
4985 -- Defining_Identifier (Node1)
4986 -- Declarations (List2)
4987 -- Handled_Statement_Sequence (Node4)
4988 -- Is_Task_Master (Flag5-Sem)
4989 -- Activation_Chain_Entity (Node3-Sem)
4990 -- Corresponding_Spec (Node5-Sem)
4991 -- Was_Originally_Stub (Flag13-Sem)
4992
4993 -------------------------------------
4994 -- 9.4 Protected Type Declaration --
4995 -------------------------------------
4996
4997 -- PROTECTED_TYPE_DECLARATION ::=
4998 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4999 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION
5000 -- {ASPECT_SPECIFICATIONS];
5001
5002 -- Note: protected type declarations are not permitted in Ada 83 mode
5003
5004 -- N_Protected_Type_Declaration
5005 -- Sloc points to PROTECTED
5006 -- Defining_Identifier (Node1)
5007 -- Discriminant_Specifications (List4) (set to No_List if no
5008 -- discriminant part)
5009 -- Interface_List (List2) (set to No_List if none)
5010 -- Protected_Definition (Node3)
5011 -- Corresponding_Body (Node5-Sem)
5012
5013 ---------------------------------------
5014 -- 9.4 Single Protected Declaration --
5015 ---------------------------------------
5016
5017 -- SINGLE_PROTECTED_DECLARATION ::=
5018 -- protected DEFINING_IDENTIFIER
5019 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION
5020 -- [ASPECT_SPECIFICATIONS];
5021
5022 -- Note: single protected declarations are not allowed in Ada 83 mode
5023
5024 -- N_Single_Protected_Declaration
5025 -- Sloc points to PROTECTED
5026 -- Defining_Identifier (Node1)
5027 -- Interface_List (List2) (set to No_List if none)
5028 -- Protected_Definition (Node3)
5029
5030 -------------------------------
5031 -- 9.4 Protected Definition --
5032 -------------------------------
5033
5034 -- PROTECTED_DEFINITION ::=
5035 -- {PROTECTED_OPERATION_DECLARATION}
5036 -- [private
5037 -- {PROTECTED_ELEMENT_DECLARATION}]
5038 -- end [protected_IDENTIFIER]
5039
5040 -- N_Protected_Definition
5041 -- Sloc points to first token of protected definition
5042 -- Visible_Declarations (List2)
5043 -- Private_Declarations (List3) (set to No_List if no private part)
5044 -- End_Label (Node4)
5045 -- Has_Pragma_Priority (Flag6-Sem)
5046
5047 ------------------------------------------
5048 -- 9.4 Protected Operation Declaration --
5049 ------------------------------------------
5050
5051 -- PROTECTED_OPERATION_DECLARATION ::=
5052 -- SUBPROGRAM_DECLARATION
5053 -- | ENTRY_DECLARATION
5054 -- | REPRESENTATION_CLAUSE
5055
5056 ----------------------------------------
5057 -- 9.4 Protected Element Declaration --
5058 ----------------------------------------
5059
5060 -- PROTECTED_ELEMENT_DECLARATION ::=
5061 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
5062
5063 -------------------------
5064 -- 9.4 Protected Body --
5065 -------------------------
5066
5067 -- PROTECTED_BODY ::=
5068 -- protected body DEFINING_IDENTIFIER is
5069 -- {PROTECTED_OPERATION_ITEM}
5070 -- end [protected_IDENTIFIER];
5071
5072 -- Note: protected bodies are not allowed in Ada 83 mode
5073
5074 -- Gigi restriction: This node never appears
5075
5076 -- N_Protected_Body
5077 -- Sloc points to PROTECTED
5078 -- Defining_Identifier (Node1)
5079 -- Declarations (List2) protected operation items (and pragmas)
5080 -- End_Label (Node4)
5081 -- Corresponding_Spec (Node5-Sem)
5082 -- Was_Originally_Stub (Flag13-Sem)
5083
5084 -----------------------------------
5085 -- 9.4 Protected Operation Item --
5086 -----------------------------------
5087
5088 -- PROTECTED_OPERATION_ITEM ::=
5089 -- SUBPROGRAM_DECLARATION
5090 -- | SUBPROGRAM_BODY
5091 -- | ENTRY_BODY
5092 -- | REPRESENTATION_CLAUSE
5093
5094 ------------------------------
5095 -- 9.5.2 Entry Declaration --
5096 ------------------------------
5097
5098 -- ENTRY_DECLARATION ::=
5099 -- [[not] overriding]
5100 -- entry DEFINING_IDENTIFIER
5101 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE;
5102
5103 -- N_Entry_Declaration
5104 -- Sloc points to ENTRY
5105 -- Defining_Identifier (Node1)
5106 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
5107 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5108 -- Corresponding_Body (Node5-Sem)
5109 -- Must_Override (Flag14) set if overriding indicator present
5110 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5111
5112 -- Note: overriding indicator is an Ada 2005 feature
5113
5114 -----------------------------
5115 -- 9.5.2 Accept statement --
5116 -----------------------------
5117
5118 -- ACCEPT_STATEMENT ::=
5119 -- accept entry_DIRECT_NAME
5120 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
5121 -- HANDLED_SEQUENCE_OF_STATEMENTS
5122 -- end [entry_IDENTIFIER]];
5123
5124 -- Gigi restriction: This node never appears
5125
5126 -- Note: there are no explicit declarations allowed in an accept
5127 -- statement. However, the implicit declarations for any statement
5128 -- identifiers (labels and block/loop identifiers) are declarations
5129 -- that belong logically to the accept statement, and that is why
5130 -- there is a Declarations field in this node.
5131
5132 -- N_Accept_Statement
5133 -- Sloc points to ACCEPT
5134 -- Entry_Direct_Name (Node1)
5135 -- Entry_Index (Node5) (set to Empty if not present)
5136 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5137 -- Handled_Statement_Sequence (Node4)
5138 -- Declarations (List2) (set to No_List if no declarations)
5139
5140 ------------------------
5141 -- 9.5.2 Entry Index --
5142 ------------------------
5143
5144 -- ENTRY_INDEX ::= EXPRESSION
5145
5146 -----------------------
5147 -- 9.5.2 Entry Body --
5148 -----------------------
5149
5150 -- ENTRY_BODY ::=
5151 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
5152 -- DECLARATIVE_PART
5153 -- begin
5154 -- HANDLED_SEQUENCE_OF_STATEMENTS
5155 -- end [entry_IDENTIFIER];
5156
5157 -- ENTRY_BARRIER ::= when CONDITION
5158
5159 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
5160 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
5161 -- too full (it would otherwise have too many fields)
5162
5163 -- Gigi restriction: This node never appears
5164
5165 -- N_Entry_Body
5166 -- Sloc points to ENTRY
5167 -- Defining_Identifier (Node1)
5168 -- Entry_Body_Formal_Part (Node5)
5169 -- Declarations (List2)
5170 -- Handled_Statement_Sequence (Node4)
5171 -- Activation_Chain_Entity (Node3-Sem)
5172
5173 -----------------------------------
5174 -- 9.5.2 Entry Body Formal Part --
5175 -----------------------------------
5176
5177 -- ENTRY_BODY_FORMAL_PART ::=
5178 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
5179
5180 -- Note that an entry body formal part node is present even if it is
5181 -- empty. This reflects the grammar, in which it is the components of
5182 -- the entry body formal part that are optional, not the entry body
5183 -- formal part itself. Also this means that the barrier condition
5184 -- always has somewhere to be stored.
5185
5186 -- Gigi restriction: This node never appears
5187
5188 -- N_Entry_Body_Formal_Part
5189 -- Sloc points to first token
5190 -- Entry_Index_Specification (Node4) (set to Empty if not present)
5191 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5192 -- Condition (Node1) from entry barrier of entry body
5193
5194 --------------------------
5195 -- 9.5.2 Entry Barrier --
5196 --------------------------
5197
5198 -- ENTRY_BARRIER ::= when CONDITION
5199
5200 --------------------------------------
5201 -- 9.5.2 Entry Index Specification --
5202 --------------------------------------
5203
5204 -- ENTRY_INDEX_SPECIFICATION ::=
5205 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
5206
5207 -- Gigi restriction: This node never appears
5208
5209 -- N_Entry_Index_Specification
5210 -- Sloc points to FOR
5211 -- Defining_Identifier (Node1)
5212 -- Discrete_Subtype_Definition (Node4)
5213
5214 ---------------------------------
5215 -- 9.5.3 Entry Call Statement --
5216 ---------------------------------
5217
5218 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
5219
5220 -- The parser may generate a procedure call for this construct. The
5221 -- semantic pass must correct this misidentification where needed.
5222
5223 -- Gigi restriction: This node never appears
5224
5225 -- N_Entry_Call_Statement
5226 -- Sloc points to first token of name
5227 -- Name (Node2)
5228 -- Parameter_Associations (List3) (set to No_List if no
5229 -- actual parameter part)
5230 -- First_Named_Actual (Node4-Sem)
5231
5232 ------------------------------
5233 -- 9.5.4 Requeue Statement --
5234 ------------------------------
5235
5236 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
5237
5238 -- Note: requeue statements are not permitted in Ada 83 mode
5239
5240 -- Gigi restriction: This node never appears
5241
5242 -- N_Requeue_Statement
5243 -- Sloc points to REQUEUE
5244 -- Name (Node2)
5245 -- Abort_Present (Flag15)
5246
5247 --------------------------
5248 -- 9.6 Delay Statement --
5249 --------------------------
5250
5251 -- DELAY_STATEMENT ::=
5252 -- DELAY_UNTIL_STATEMENT
5253 -- | DELAY_RELATIVE_STATEMENT
5254
5255 --------------------------------
5256 -- 9.6 Delay Until Statement --
5257 --------------------------------
5258
5259 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
5260
5261 -- Note: delay until statements are not permitted in Ada 83 mode
5262
5263 -- Gigi restriction: This node never appears
5264
5265 -- N_Delay_Until_Statement
5266 -- Sloc points to DELAY
5267 -- Expression (Node3)
5268
5269 -----------------------------------
5270 -- 9.6 Delay Relative Statement --
5271 -----------------------------------
5272
5273 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
5274
5275 -- Gigi restriction: This node never appears
5276
5277 -- N_Delay_Relative_Statement
5278 -- Sloc points to DELAY
5279 -- Expression (Node3)
5280
5281 ---------------------------
5282 -- 9.7 Select Statement --
5283 ---------------------------
5284
5285 -- SELECT_STATEMENT ::=
5286 -- SELECTIVE_ACCEPT
5287 -- | TIMED_ENTRY_CALL
5288 -- | CONDITIONAL_ENTRY_CALL
5289 -- | ASYNCHRONOUS_SELECT
5290
5291 -----------------------------
5292 -- 9.7.1 Selective Accept --
5293 -----------------------------
5294
5295 -- SELECTIVE_ACCEPT ::=
5296 -- select
5297 -- [GUARD]
5298 -- SELECT_ALTERNATIVE
5299 -- {or
5300 -- [GUARD]
5301 -- SELECT_ALTERNATIVE}
5302 -- [else
5303 -- SEQUENCE_OF_STATEMENTS]
5304 -- end select;
5305
5306 -- Gigi restriction: This node never appears
5307
5308 -- Note: the guard expression, if present, appears in the node for
5309 -- the select alternative.
5310
5311 -- N_Selective_Accept
5312 -- Sloc points to SELECT
5313 -- Select_Alternatives (List1)
5314 -- Else_Statements (List4) (set to No_List if no else part)
5315
5316 ------------------
5317 -- 9.7.1 Guard --
5318 ------------------
5319
5320 -- GUARD ::= when CONDITION =>
5321
5322 -- As noted above, the CONDITION that is part of a GUARD is included
5323 -- in the node for the select alternative for convenience.
5324
5325 -------------------------------
5326 -- 9.7.1 Select Alternative --
5327 -------------------------------
5328
5329 -- SELECT_ALTERNATIVE ::=
5330 -- ACCEPT_ALTERNATIVE
5331 -- | DELAY_ALTERNATIVE
5332 -- | TERMINATE_ALTERNATIVE
5333
5334 -------------------------------
5335 -- 9.7.1 Accept Alternative --
5336 -------------------------------
5337
5338 -- ACCEPT_ALTERNATIVE ::=
5339 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
5340
5341 -- Gigi restriction: This node never appears
5342
5343 -- N_Accept_Alternative
5344 -- Sloc points to ACCEPT
5345 -- Accept_Statement (Node2)
5346 -- Condition (Node1) from the guard (set to Empty if no guard present)
5347 -- Statements (List3) (set to Empty_List if no statements)
5348 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5349 -- Accept_Handler_Records (List5-Sem)
5350
5351 ------------------------------
5352 -- 9.7.1 Delay Alternative --
5353 ------------------------------
5354
5355 -- DELAY_ALTERNATIVE ::=
5356 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
5357
5358 -- Gigi restriction: This node never appears
5359
5360 -- N_Delay_Alternative
5361 -- Sloc points to DELAY
5362 -- Delay_Statement (Node2)
5363 -- Condition (Node1) from the guard (set to Empty if no guard present)
5364 -- Statements (List3) (set to Empty_List if no statements)
5365 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5366
5367 ----------------------------------
5368 -- 9.7.1 Terminate Alternative --
5369 ----------------------------------
5370
5371 -- TERMINATE_ALTERNATIVE ::= terminate;
5372
5373 -- Gigi restriction: This node never appears
5374
5375 -- N_Terminate_Alternative
5376 -- Sloc points to TERMINATE
5377 -- Condition (Node1) from the guard (set to Empty if no guard present)
5378 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5379 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
5380
5381 -----------------------------
5382 -- 9.7.2 Timed Entry Call --
5383 -----------------------------
5384
5385 -- TIMED_ENTRY_CALL ::=
5386 -- select
5387 -- ENTRY_CALL_ALTERNATIVE
5388 -- or
5389 -- DELAY_ALTERNATIVE
5390 -- end select;
5391
5392 -- Gigi restriction: This node never appears
5393
5394 -- N_Timed_Entry_Call
5395 -- Sloc points to SELECT
5396 -- Entry_Call_Alternative (Node1)
5397 -- Delay_Alternative (Node4)
5398
5399 -----------------------------------
5400 -- 9.7.2 Entry Call Alternative --
5401 -----------------------------------
5402
5403 -- ENTRY_CALL_ALTERNATIVE ::=
5404 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
5405
5406 -- PROCEDURE_OR_ENTRY_CALL ::=
5407 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
5408
5409 -- Gigi restriction: This node never appears
5410
5411 -- N_Entry_Call_Alternative
5412 -- Sloc points to first token of entry call statement
5413 -- Entry_Call_Statement (Node1)
5414 -- Statements (List3) (set to Empty_List if no statements)
5415 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5416
5417 -----------------------------------
5418 -- 9.7.3 Conditional Entry Call --
5419 -----------------------------------
5420
5421 -- CONDITIONAL_ENTRY_CALL ::=
5422 -- select
5423 -- ENTRY_CALL_ALTERNATIVE
5424 -- else
5425 -- SEQUENCE_OF_STATEMENTS
5426 -- end select;
5427
5428 -- Gigi restriction: This node never appears
5429
5430 -- N_Conditional_Entry_Call
5431 -- Sloc points to SELECT
5432 -- Entry_Call_Alternative (Node1)
5433 -- Else_Statements (List4)
5434
5435 --------------------------------
5436 -- 9.7.4 Asynchronous Select --
5437 --------------------------------
5438
5439 -- ASYNCHRONOUS_SELECT ::=
5440 -- select
5441 -- TRIGGERING_ALTERNATIVE
5442 -- then abort
5443 -- ABORTABLE_PART
5444 -- end select;
5445
5446 -- Note: asynchronous select is not permitted in Ada 83 mode
5447
5448 -- Gigi restriction: This node never appears
5449
5450 -- N_Asynchronous_Select
5451 -- Sloc points to SELECT
5452 -- Triggering_Alternative (Node1)
5453 -- Abortable_Part (Node2)
5454
5455 -----------------------------------
5456 -- 9.7.4 Triggering Alternative --
5457 -----------------------------------
5458
5459 -- TRIGGERING_ALTERNATIVE ::=
5460 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
5461
5462 -- Gigi restriction: This node never appears
5463
5464 -- N_Triggering_Alternative
5465 -- Sloc points to first token of triggering statement
5466 -- Triggering_Statement (Node1)
5467 -- Statements (List3) (set to Empty_List if no statements)
5468 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5469
5470 ---------------------------------
5471 -- 9.7.4 Triggering Statement --
5472 ---------------------------------
5473
5474 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
5475
5476 ---------------------------
5477 -- 9.7.4 Abortable Part --
5478 ---------------------------
5479
5480 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
5481
5482 -- Gigi restriction: This node never appears
5483
5484 -- N_Abortable_Part
5485 -- Sloc points to ABORT
5486 -- Statements (List3)
5487
5488 --------------------------
5489 -- 9.8 Abort Statement --
5490 --------------------------
5491
5492 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
5493
5494 -- Gigi restriction: This node never appears
5495
5496 -- N_Abort_Statement
5497 -- Sloc points to ABORT
5498 -- Names (List2)
5499
5500 -------------------------
5501 -- 10.1.1 Compilation --
5502 -------------------------
5503
5504 -- COMPILATION ::= {COMPILATION_UNIT}
5505
5506 -- There is no explicit node in the tree for a compilation, since in
5507 -- general the compiler is processing only a single compilation unit
5508 -- at a time. It is possible to parse multiple units in syntax check
5509 -- only mode, but the trees are discarded in that case.
5510
5511 ------------------------------
5512 -- 10.1.1 Compilation Unit --
5513 ------------------------------
5514
5515 -- COMPILATION_UNIT ::=
5516 -- CONTEXT_CLAUSE LIBRARY_ITEM
5517 -- | CONTEXT_CLAUSE SUBUNIT
5518
5519 -- The N_Compilation_Unit node itself represents the above syntax.
5520 -- However, there are two additional items not reflected in the above
5521 -- syntax. First we have the global declarations that are added by the
5522 -- code generator. These are outer level declarations (so they cannot
5523 -- be represented as being inside the units). An example is the wrapper
5524 -- subprograms that are created to do ABE checking. As always a list of
5525 -- declarations can contain actions as well (i.e. statements), and such
5526 -- statements are executed as part of the elaboration of the unit. Note
5527 -- that all such declarations are elaborated before the library unit.
5528
5529 -- Similarly, certain actions need to be elaborated at the completion
5530 -- of elaboration of the library unit (notably the statement that sets
5531 -- the Boolean flag indicating that elaboration is complete).
5532
5533 -- The third item not reflected in the syntax is pragmas that appear
5534 -- after the compilation unit. As always pragmas are a problem since
5535 -- they are not part of the formal syntax, but can be stuck into the
5536 -- source following a set of ad hoc rules, and we have to find an ad
5537 -- hoc way of sticking them into the tree. For pragmas that appear
5538 -- before the library unit, we just consider them to be part of the
5539 -- context clause, and pragmas can appear in the Context_Items list
5540 -- of the compilation unit. However, pragmas can also appear after
5541 -- the library item.
5542
5543 -- To deal with all these problems, we create an auxiliary node for
5544 -- a compilation unit, referenced from the N_Compilation_Unit node
5545 -- that contains these three items.
5546
5547 -- N_Compilation_Unit
5548 -- Sloc points to first token of defining unit name
5549 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
5550 -- Context_Items (List1) context items and pragmas preceding unit
5551 -- Private_Present (Flag15) set if library unit has private keyword
5552 -- Unit (Node2) library item or subunit
5553 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
5554 -- Has_No_Elaboration_Code (Flag17-Sem)
5555 -- Body_Required (Flag13-Sem) set for spec if body is required
5556 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
5557 -- Context_Pending (Flag16-Sem)
5558 -- First_Inlined_Subprogram (Node3-Sem)
5559 -- Has_Pragma_Suppress_All (Flag14-Sem)
5560
5561 -- N_Compilation_Unit_Aux
5562 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
5563 -- Declarations (List2) (set to No_List if no global declarations)
5564 -- Actions (List1) (set to No_List if no actions)
5565 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
5566 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
5567
5568 --------------------------
5569 -- 10.1.1 Library Item --
5570 --------------------------
5571
5572 -- LIBRARY_ITEM ::=
5573 -- [private] LIBRARY_UNIT_DECLARATION
5574 -- | LIBRARY_UNIT_BODY
5575 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
5576
5577 -- Note: PRIVATE is not allowed in Ada 83 mode
5578
5579 -- There is no explicit node in the tree for library item, instead
5580 -- the declaration or body, and the flag for private if present,
5581 -- appear in the N_Compilation_Unit node.
5582
5583 --------------------------------------
5584 -- 10.1.1 Library Unit Declaration --
5585 --------------------------------------
5586
5587 -- LIBRARY_UNIT_DECLARATION ::=
5588 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
5589 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
5590
5591 -----------------------------------------------
5592 -- 10.1.1 Library Unit Renaming Declaration --
5593 -----------------------------------------------
5594
5595 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
5596 -- PACKAGE_RENAMING_DECLARATION
5597 -- | GENERIC_RENAMING_DECLARATION
5598 -- | SUBPROGRAM_RENAMING_DECLARATION
5599
5600 -------------------------------
5601 -- 10.1.1 Library unit body --
5602 -------------------------------
5603
5604 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
5605
5606 ------------------------------
5607 -- 10.1.1 Parent Unit Name --
5608 ------------------------------
5609
5610 -- PARENT_UNIT_NAME ::= NAME
5611
5612 ----------------------------
5613 -- 10.1.2 Context clause --
5614 ----------------------------
5615
5616 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
5617
5618 -- The context clause can include pragmas, and any pragmas that appear
5619 -- before the context clause proper (i.e. all configuration pragmas,
5620 -- also appear at the front of this list).
5621
5622 --------------------------
5623 -- 10.1.2 Context_Item --
5624 --------------------------
5625
5626 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
5627
5628 -------------------------
5629 -- 10.1.2 With clause --
5630 -------------------------
5631
5632 -- WITH_CLAUSE ::=
5633 -- with library_unit_NAME {,library_unit_NAME};
5634
5635 -- A separate With clause is built for each name, so that we have
5636 -- a Corresponding_Spec field for each with'ed spec. The flags
5637 -- First_Name and Last_Name are used to reconstruct the exact
5638 -- source form. When a list of names appears in one with clause,
5639 -- the first name in the list has First_Name set, and the last
5640 -- has Last_Name set. If the with clause has only one name, then
5641 -- both of the flags First_Name and Last_Name are set in this name.
5642
5643 -- Note: in the case of implicit with's that are installed by the
5644 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
5645 -- set to Standard_Location, but it is incorrect to test the Sloc
5646 -- to find out if a with clause is implicit, test the flag instead.
5647
5648 -- N_With_Clause
5649 -- Sloc points to first token of library unit name
5650 -- Withed_Body (Node1-Sem)
5651 -- Name (Node2)
5652 -- Next_Implicit_With (Node3-Sem)
5653 -- Library_Unit (Node4-Sem)
5654 -- Corresponding_Spec (Node5-Sem)
5655 -- First_Name (Flag5) (set to True if first name or only one name)
5656 -- Last_Name (Flag6) (set to True if last name or only one name)
5657 -- Context_Installed (Flag13-Sem)
5658 -- Elaborate_Present (Flag4-Sem)
5659 -- Elaborate_All_Present (Flag14-Sem)
5660 -- Elaborate_All_Desirable (Flag9-Sem)
5661 -- Elaborate_Desirable (Flag11-Sem)
5662 -- Private_Present (Flag15) set if with_clause has private keyword
5663 -- Implicit_With (Flag16-Sem)
5664 -- Limited_Present (Flag17) set if LIMITED is present
5665 -- Limited_View_Installed (Flag18-Sem)
5666 -- Unreferenced_In_Spec (Flag7-Sem)
5667 -- No_Entities_Ref_In_Spec (Flag8-Sem)
5668
5669 -- Note: Limited_Present and Limited_View_Installed give support to
5670 -- Ada 2005 (AI-50217).
5671 -- Similarly, Private_Present gives support to AI-50262.
5672
5673 ----------------------
5674 -- With_Type clause --
5675 ----------------------
5676
5677 -- This is a GNAT extension, used to implement mutually recursive
5678 -- types declared in different packages.
5679 -- Note: this is now obsolete. The functionality of this construct
5680 -- is now implemented by the Ada 2005 Limited_with_Clause.
5681
5682 ---------------------
5683 -- 10.2 Body stub --
5684 ---------------------
5685
5686 -- BODY_STUB ::=
5687 -- SUBPROGRAM_BODY_STUB
5688 -- | PACKAGE_BODY_STUB
5689 -- | TASK_BODY_STUB
5690 -- | PROTECTED_BODY_STUB
5691
5692 ----------------------------------
5693 -- 10.1.3 Subprogram Body Stub --
5694 ----------------------------------
5695
5696 -- SUBPROGRAM_BODY_STUB ::=
5697 -- SUBPROGRAM_SPECIFICATION is separate;
5698
5699 -- N_Subprogram_Body_Stub
5700 -- Sloc points to FUNCTION or PROCEDURE
5701 -- Specification (Node1)
5702 -- Library_Unit (Node4-Sem) points to the subunit
5703 -- Corresponding_Body (Node5-Sem)
5704
5705 -------------------------------
5706 -- 10.1.3 Package Body Stub --
5707 -------------------------------
5708
5709 -- PACKAGE_BODY_STUB ::=
5710 -- package body DEFINING_IDENTIFIER is separate;
5711
5712 -- N_Package_Body_Stub
5713 -- Sloc points to PACKAGE
5714 -- Defining_Identifier (Node1)
5715 -- Library_Unit (Node4-Sem) points to the subunit
5716 -- Corresponding_Body (Node5-Sem)
5717
5718 ----------------------------
5719 -- 10.1.3 Task Body Stub --
5720 ----------------------------
5721
5722 -- TASK_BODY_STUB ::=
5723 -- task body DEFINING_IDENTIFIER is separate;
5724
5725 -- N_Task_Body_Stub
5726 -- Sloc points to TASK
5727 -- Defining_Identifier (Node1)
5728 -- Library_Unit (Node4-Sem) points to the subunit
5729 -- Corresponding_Body (Node5-Sem)
5730
5731 ---------------------------------
5732 -- 10.1.3 Protected Body Stub --
5733 ---------------------------------
5734
5735 -- PROTECTED_BODY_STUB ::=
5736 -- protected body DEFINING_IDENTIFIER is separate;
5737
5738 -- Note: protected body stubs are not allowed in Ada 83 mode
5739
5740 -- N_Protected_Body_Stub
5741 -- Sloc points to PROTECTED
5742 -- Defining_Identifier (Node1)
5743 -- Library_Unit (Node4-Sem) points to the subunit
5744 -- Corresponding_Body (Node5-Sem)
5745
5746 ---------------------
5747 -- 10.1.3 Subunit --
5748 ---------------------
5749
5750 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
5751
5752 -- N_Subunit
5753 -- Sloc points to SEPARATE
5754 -- Name (Node2) is the name of the parent unit
5755 -- Proper_Body (Node1) is the subunit body
5756 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
5757
5758 ---------------------------------
5759 -- 11.1 Exception Declaration --
5760 ---------------------------------
5761
5762 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception
5763 -- [ASPECT_SPECIFICATIONS];
5764
5765 -- For consistency with object declarations etc., the parser converts
5766 -- the case of multiple identifiers being declared to a series of
5767 -- declarations in which the expression is copied, using the More_Ids
5768 -- and Prev_Ids flags to remember the source form as described in the
5769 -- section on "Handling of Defining Identifier Lists".
5770
5771 -- N_Exception_Declaration
5772 -- Sloc points to EXCEPTION
5773 -- Defining_Identifier (Node1)
5774 -- Expression (Node3-Sem)
5775 -- Renaming_Exception (Node2-Sem)
5776 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5777 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5778
5779 ------------------------------------------
5780 -- 11.2 Handled Sequence Of Statements --
5781 ------------------------------------------
5782
5783 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
5784 -- SEQUENCE_OF_STATEMENTS
5785 -- [exception
5786 -- EXCEPTION_HANDLER
5787 -- {EXCEPTION_HANDLER}]
5788 -- [at end
5789 -- cleanup_procedure_call (param, param, param, ...);]
5790
5791 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
5792 -- used only internally currently, but is considered to be syntactic.
5793 -- At the moment, the only cleanup action allowed is a single call to
5794 -- a parameterless procedure, and the Identifier field of the node is
5795 -- the procedure to be called. Also there is a current restriction
5796 -- that exception handles and a cleanup cannot be present in the same
5797 -- frame, so at least one of Exception_Handlers or the Identifier must
5798 -- be missing.
5799
5800 -- Actually, more accurately, this restriction applies to the original
5801 -- source program. In the expanded tree, if the At_End_Proc field is
5802 -- present, then there will also be an exception handler of the form:
5803
5804 -- when all others =>
5805 -- cleanup;
5806 -- raise;
5807
5808 -- where cleanup is the procedure to be generated. The reason we do
5809 -- this is so that the front end can handle the necessary entries in
5810 -- the exception tables, and other exception handler actions required
5811 -- as part of the normal handling for exception handlers.
5812
5813 -- The AT END cleanup handler protects only the sequence of statements
5814 -- (not the associated declarations of the parent), just like exception
5815 -- handlers. The big difference is that the cleanup procedure is called
5816 -- on either a normal or an abnormal exit from the statement sequence.
5817
5818 -- Note: the list of Exception_Handlers can contain pragmas as well
5819 -- as actual handlers. In practice these pragmas can only occur at
5820 -- the start of the list, since any pragmas occurring later on will
5821 -- be included in the statement list of the corresponding handler.
5822
5823 -- Note: although in the Ada syntax, the sequence of statements in
5824 -- a handled sequence of statements can only contain statements, we
5825 -- allow free mixing of declarations and statements in the resulting
5826 -- expanded tree. This is for example used to deal with the case of
5827 -- a cleanup procedure that must handle declarations as well as the
5828 -- statements of a block.
5829
5830 -- N_Handled_Sequence_Of_Statements
5831 -- Sloc points to first token of first statement
5832 -- Statements (List3)
5833 -- End_Label (Node4) (set to Empty if expander generated)
5834 -- Exception_Handlers (List5) (set to No_List if none present)
5835 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
5836 -- First_Real_Statement (Node2-Sem)
5837 -- Zero_Cost_Handling (Flag5-Sem)
5838
5839 -- Note: the parent always contains a Declarations field which contains
5840 -- declarations associated with the handled sequence of statements. This
5841 -- is true even in the case of an accept statement (see description of
5842 -- the N_Accept_Statement node).
5843
5844 -- End_Label refers to the containing construct
5845
5846 -----------------------------
5847 -- 11.2 Exception Handler --
5848 -----------------------------
5849
5850 -- EXCEPTION_HANDLER ::=
5851 -- when [CHOICE_PARAMETER_SPECIFICATION :]
5852 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
5853 -- SEQUENCE_OF_STATEMENTS
5854
5855 -- Note: choice parameter specification is not allowed in Ada 83 mode
5856
5857 -- N_Exception_Handler
5858 -- Sloc points to WHEN
5859 -- Choice_Parameter (Node2) (set to Empty if not present)
5860 -- Exception_Choices (List4)
5861 -- Statements (List3)
5862 -- Exception_Label (Node5-Sem) (set to Empty of not present)
5863 -- Zero_Cost_Handling (Flag5-Sem)
5864 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
5865 -- Local_Raise_Not_OK (Flag7-Sem)
5866 -- Has_Local_Raise (Flag8-Sem)
5867
5868 ------------------------------------------
5869 -- 11.2 Choice parameter specification --
5870 ------------------------------------------
5871
5872 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
5873
5874 ----------------------------
5875 -- 11.2 Exception Choice --
5876 ----------------------------
5877
5878 -- EXCEPTION_CHOICE ::= exception_NAME | others
5879
5880 -- Except in the case of OTHERS, no explicit node appears in the tree
5881 -- for exception choice. Instead the exception name appears directly.
5882 -- An OTHERS choice is represented by a N_Others_Choice node (see
5883 -- section 3.8.1.
5884
5885 -- Note: for the exception choice created for an at end handler, the
5886 -- exception choice is an N_Others_Choice node with All_Others set.
5887
5888 ---------------------------
5889 -- 11.3 Raise Statement --
5890 ---------------------------
5891
5892 -- RAISE_STATEMENT ::= raise [exception_NAME];
5893
5894 -- In Ada 2005, we have
5895
5896 -- RAISE_STATEMENT ::= raise; | raise exception_NAME [with EXPRESSION];
5897
5898 -- N_Raise_Statement
5899 -- Sloc points to RAISE
5900 -- Name (Node2) (set to Empty if no exception name present)
5901 -- Expression (Node3) (set to Empty if no expression present)
5902 -- From_At_End (Flag4-Sem)
5903
5904 -------------------------------
5905 -- 12.1 Generic Declaration --
5906 -------------------------------
5907
5908 -- GENERIC_DECLARATION ::=
5909 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
5910
5911 ------------------------------------------
5912 -- 12.1 Generic Subprogram Declaration --
5913 ------------------------------------------
5914
5915 -- GENERIC_SUBPROGRAM_DECLARATION ::=
5916 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION;
5917
5918 -- Note: Generic_Formal_Declarations can include pragmas
5919
5920 -- N_Generic_Subprogram_Declaration
5921 -- Sloc points to GENERIC
5922 -- Specification (Node1) subprogram specification
5923 -- Corresponding_Body (Node5-Sem)
5924 -- Generic_Formal_Declarations (List2) from generic formal part
5925 -- Parent_Spec (Node4-Sem)
5926
5927 ---------------------------------------
5928 -- 12.1 Generic Package Declaration --
5929 ---------------------------------------
5930
5931 -- GENERIC_PACKAGE_DECLARATION ::=
5932 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION
5933 -- [ASPECT_SPECIFICATIONS];
5934
5935 -- Note: when we do generics right, the Activation_Chain_Entity entry
5936 -- for this node can be removed (since the expander won't see generic
5937 -- units any more)???.
5938
5939 -- Note: Generic_Formal_Declarations can include pragmas
5940
5941 -- N_Generic_Package_Declaration
5942 -- Sloc points to GENERIC
5943 -- Specification (Node1) package specification
5944 -- Corresponding_Body (Node5-Sem)
5945 -- Generic_Formal_Declarations (List2) from generic formal part
5946 -- Parent_Spec (Node4-Sem)
5947 -- Activation_Chain_Entity (Node3-Sem)
5948
5949 -------------------------------
5950 -- 12.1 Generic Formal Part --
5951 -------------------------------
5952
5953 -- GENERIC_FORMAL_PART ::=
5954 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
5955
5956 ------------------------------------------------
5957 -- 12.1 Generic Formal Parameter Declaration --
5958 ------------------------------------------------
5959
5960 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
5961 -- FORMAL_OBJECT_DECLARATION
5962 -- | FORMAL_TYPE_DECLARATION
5963 -- | FORMAL_SUBPROGRAM_DECLARATION
5964 -- | FORMAL_PACKAGE_DECLARATION
5965
5966 ---------------------------------
5967 -- 12.3 Generic Instantiation --
5968 ---------------------------------
5969
5970 -- GENERIC_INSTANTIATION ::=
5971 -- package DEFINING_PROGRAM_UNIT_NAME is
5972 -- new generic_package_NAME [GENERIC_ACTUAL_PART]
5973 -- [ASPECT_SPECIFICATIONS];
5974 -- | [[not] overriding]
5975 -- procedure DEFINING_PROGRAM_UNIT_NAME is
5976 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART]
5977 -- [ASPECT_SPECIFICATIONS];
5978 -- | [[not] overriding]
5979 -- function DEFINING_DESIGNATOR is
5980 -- new generic_function_NAME [GENERIC_ACTUAL_PART]
5981 -- [ASPECT_SPECIFICATIONS];
5982
5983 -- N_Package_Instantiation
5984 -- Sloc points to PACKAGE
5985 -- Defining_Unit_Name (Node1)
5986 -- Name (Node2)
5987 -- Generic_Associations (List3) (set to No_List if no
5988 -- generic actual part)
5989 -- Parent_Spec (Node4-Sem)
5990 -- Instance_Spec (Node5-Sem)
5991 -- ABE_Is_Certain (Flag18-Sem)
5992
5993 -- N_Procedure_Instantiation
5994 -- Sloc points to PROCEDURE
5995 -- Defining_Unit_Name (Node1)
5996 -- Name (Node2)
5997 -- Parent_Spec (Node4-Sem)
5998 -- Generic_Associations (List3) (set to No_List if no
5999 -- generic actual part)
6000 -- Instance_Spec (Node5-Sem)
6001 -- Must_Override (Flag14) set if overriding indicator present
6002 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6003 -- ABE_Is_Certain (Flag18-Sem)
6004
6005 -- N_Function_Instantiation
6006 -- Sloc points to FUNCTION
6007 -- Defining_Unit_Name (Node1)
6008 -- Name (Node2)
6009 -- Generic_Associations (List3) (set to No_List if no
6010 -- generic actual part)
6011 -- Parent_Spec (Node4-Sem)
6012 -- Instance_Spec (Node5-Sem)
6013 -- Must_Override (Flag14) set if overriding indicator present
6014 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6015 -- ABE_Is_Certain (Flag18-Sem)
6016
6017 -- Note: overriding indicator is an Ada 2005 feature
6018
6019 -------------------------------
6020 -- 12.3 Generic Actual Part --
6021 -------------------------------
6022
6023 -- GENERIC_ACTUAL_PART ::=
6024 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
6025
6026 -------------------------------
6027 -- 12.3 Generic Association --
6028 -------------------------------
6029
6030 -- GENERIC_ASSOCIATION ::=
6031 -- [generic_formal_parameter_SELECTOR_NAME =>]
6032
6033 -- Note: unlike the procedure call case, a generic association node
6034 -- is generated for every association, even if no formal parameter
6035 -- selector name is present. In this case the parser will leave the
6036 -- Selector_Name field set to Empty, to be filled in later by the
6037 -- semantic pass.
6038
6039 -- In Ada 2005, a formal may be associated with a box, if the
6040 -- association is part of the list of actuals for a formal package.
6041 -- If the association is given by OTHERS => <>, the association is
6042 -- an N_Others_Choice.
6043
6044 -- N_Generic_Association
6045 -- Sloc points to first token of generic association
6046 -- Selector_Name (Node2) (set to Empty if no formal
6047 -- parameter selector name)
6048 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
6049 -- Box_Present (Flag15) (for formal_package associations with a box)
6050
6051 ---------------------------------------------
6052 -- 12.3 Explicit Generic Actual Parameter --
6053 ---------------------------------------------
6054
6055 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
6056 -- EXPRESSION | variable_NAME | subprogram_NAME
6057 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
6058
6059 -------------------------------------
6060 -- 12.4 Formal Object Declaration --
6061 -------------------------------------
6062
6063 -- FORMAL_OBJECT_DECLARATION ::=
6064 -- DEFINING_IDENTIFIER_LIST :
6065 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
6066 -- [ASPECT_SPECIFICATIONS];
6067 -- | DEFINING_IDENTIFIER_LIST :
6068 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION]
6069 -- [ASPECT_SPECIFICATIONS];
6070
6071 -- Although the syntax allows multiple identifiers in the list, the
6072 -- semantics is as though successive declarations were given with
6073 -- identical type definition and expression components. To simplify
6074 -- semantic processing, the parser represents a multiple declaration
6075 -- case as a sequence of single declarations, using the More_Ids and
6076 -- Prev_Ids flags to preserve the original source form as described
6077 -- in the section on "Handling of Defining Identifier Lists".
6078
6079 -- N_Formal_Object_Declaration
6080 -- Sloc points to first identifier
6081 -- Defining_Identifier (Node1)
6082 -- In_Present (Flag15)
6083 -- Out_Present (Flag17)
6084 -- Null_Exclusion_Present (Flag11) (set to False if not present)
6085 -- Subtype_Mark (Node4) (set to Empty if not present)
6086 -- Access_Definition (Node3) (set to Empty if not present)
6087 -- Default_Expression (Node5) (set to Empty if no default expression)
6088 -- More_Ids (Flag5) (set to False if no more identifiers in list)
6089 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6090
6091 -----------------------------------
6092 -- 12.5 Formal Type Declaration --
6093 -----------------------------------
6094
6095 -- FORMAL_TYPE_DECLARATION ::=
6096 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
6097 -- is FORMAL_TYPE_DEFINITION
6098 -- [ASPECT_SPECIFICATIONS];
6099
6100 -- N_Formal_Type_Declaration
6101 -- Sloc points to TYPE
6102 -- Defining_Identifier (Node1)
6103 -- Formal_Type_Definition (Node3)
6104 -- Discriminant_Specifications (List4) (set to No_List if no
6105 -- discriminant part)
6106 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
6107
6108 ----------------------------------
6109 -- 12.5 Formal type definition --
6110 ----------------------------------
6111
6112 -- FORMAL_TYPE_DEFINITION ::=
6113 -- FORMAL_PRIVATE_TYPE_DEFINITION
6114 -- | FORMAL_DERIVED_TYPE_DEFINITION
6115 -- | FORMAL_DISCRETE_TYPE_DEFINITION
6116 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
6117 -- | FORMAL_MODULAR_TYPE_DEFINITION
6118 -- | FORMAL_FLOATING_POINT_DEFINITION
6119 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
6120 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
6121 -- | FORMAL_ARRAY_TYPE_DEFINITION
6122 -- | FORMAL_ACCESS_TYPE_DEFINITION
6123 -- | FORMAL_INTERFACE_TYPE_DEFINITION
6124
6125 ---------------------------------------------
6126 -- 12.5.1 Formal Private Type Definition --
6127 ---------------------------------------------
6128
6129 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
6130 -- [[abstract] tagged] [limited] private
6131
6132 -- Note: TAGGED is not allowed in Ada 83 mode
6133
6134 -- N_Formal_Private_Type_Definition
6135 -- Sloc points to PRIVATE
6136 -- Abstract_Present (Flag4)
6137 -- Tagged_Present (Flag15)
6138 -- Limited_Present (Flag17)
6139
6140 --------------------------------------------
6141 -- 12.5.1 Formal Derived Type Definition --
6142 --------------------------------------------
6143
6144 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
6145 -- [abstract] [limited | synchronized]
6146 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
6147 -- Note: this construct is not allowed in Ada 83 mode
6148
6149 -- N_Formal_Derived_Type_Definition
6150 -- Sloc points to NEW
6151 -- Subtype_Mark (Node4)
6152 -- Private_Present (Flag15)
6153 -- Abstract_Present (Flag4)
6154 -- Limited_Present (Flag17)
6155 -- Synchronized_Present (Flag7)
6156 -- Interface_List (List2) (set to No_List if none)
6157
6158 ---------------------------------------------
6159 -- 12.5.2 Formal Discrete Type Definition --
6160 ---------------------------------------------
6161
6162 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
6163
6164 -- N_Formal_Discrete_Type_Definition
6165 -- Sloc points to (
6166
6167 ---------------------------------------------------
6168 -- 12.5.2 Formal Signed Integer Type Definition --
6169 ---------------------------------------------------
6170
6171 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
6172
6173 -- N_Formal_Signed_Integer_Type_Definition
6174 -- Sloc points to RANGE
6175
6176 --------------------------------------------
6177 -- 12.5.2 Formal Modular Type Definition --
6178 --------------------------------------------
6179
6180 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
6181
6182 -- N_Formal_Modular_Type_Definition
6183 -- Sloc points to MOD
6184
6185 ----------------------------------------------
6186 -- 12.5.2 Formal Floating Point Definition --
6187 ----------------------------------------------
6188
6189 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
6190
6191 -- N_Formal_Floating_Point_Definition
6192 -- Sloc points to DIGITS
6193
6194 ----------------------------------------------------
6195 -- 12.5.2 Formal Ordinary Fixed Point Definition --
6196 ----------------------------------------------------
6197
6198 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
6199
6200 -- N_Formal_Ordinary_Fixed_Point_Definition
6201 -- Sloc points to DELTA
6202
6203 ---------------------------------------------------
6204 -- 12.5.2 Formal Decimal Fixed Point Definition --
6205 ---------------------------------------------------
6206
6207 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
6208
6209 -- Note: formal decimal fixed point definition not allowed in Ada 83
6210
6211 -- N_Formal_Decimal_Fixed_Point_Definition
6212 -- Sloc points to DELTA
6213
6214 ------------------------------------------
6215 -- 12.5.3 Formal Array Type Definition --
6216 ------------------------------------------
6217
6218 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
6219
6220 -------------------------------------------
6221 -- 12.5.4 Formal Access Type Definition --
6222 -------------------------------------------
6223
6224 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
6225
6226 ----------------------------------------------
6227 -- 12.5.5 Formal Interface Type Definition --
6228 ----------------------------------------------
6229
6230 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
6231
6232 -----------------------------------------
6233 -- 12.6 Formal Subprogram Declaration --
6234 -----------------------------------------
6235
6236 -- FORMAL_SUBPROGRAM_DECLARATION ::=
6237 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
6238 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
6239
6240 --------------------------------------------------
6241 -- 12.6 Formal Concrete Subprogram Declaration --
6242 --------------------------------------------------
6243
6244 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
6245 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT]
6246 -- [ASPECT_SPECIFICATIONS];
6247
6248 -- N_Formal_Concrete_Subprogram_Declaration
6249 -- Sloc points to WITH
6250 -- Specification (Node1)
6251 -- Default_Name (Node2) (set to Empty if no subprogram default)
6252 -- Box_Present (Flag15)
6253
6254 -- Note: if no subprogram default is present, then Name is set
6255 -- to Empty, and Box_Present is False.
6256
6257 --------------------------------------------------
6258 -- 12.6 Formal Abstract Subprogram Declaration --
6259 --------------------------------------------------
6260
6261 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
6262 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT]
6263 -- [ASPECT_SPECIFICATIONS];
6264
6265 -- N_Formal_Abstract_Subprogram_Declaration
6266 -- Sloc points to WITH
6267 -- Specification (Node1)
6268 -- Default_Name (Node2) (set to Empty if no subprogram default)
6269 -- Box_Present (Flag15)
6270
6271 -- Note: if no subprogram default is present, then Name is set
6272 -- to Empty, and Box_Present is False.
6273
6274 ------------------------------
6275 -- 12.6 Subprogram Default --
6276 ------------------------------
6277
6278 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
6279
6280 -- There is no separate node in the tree for a subprogram default.
6281 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
6282 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
6283 -- default name or box indication, as needed.
6284
6285 ------------------------
6286 -- 12.6 Default Name --
6287 ------------------------
6288
6289 -- DEFAULT_NAME ::= NAME
6290
6291 --------------------------------------
6292 -- 12.7 Formal Package Declaration --
6293 --------------------------------------
6294
6295 -- FORMAL_PACKAGE_DECLARATION ::=
6296 -- with package DEFINING_IDENTIFIER
6297 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART
6298 -- [ASPECT_SPECIFICATIONS];
6299
6300 -- Note: formal package declarations not allowed in Ada 83 mode
6301
6302 -- N_Formal_Package_Declaration
6303 -- Sloc points to WITH
6304 -- Defining_Identifier (Node1)
6305 -- Name (Node2)
6306 -- Generic_Associations (List3) (set to No_List if (<>) case or
6307 -- empty generic actual part)
6308 -- Box_Present (Flag15)
6309 -- Instance_Spec (Node5-Sem)
6310 -- ABE_Is_Certain (Flag18-Sem)
6311
6312 --------------------------------------
6313 -- 12.7 Formal Package Actual Part --
6314 --------------------------------------
6315
6316 -- FORMAL_PACKAGE_ACTUAL_PART ::=
6317 -- ([OTHERS] => <>)
6318 -- | [GENERIC_ACTUAL_PART]
6319 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
6320
6321 -- FORMAL_PACKAGE_ASSOCIATION ::=
6322 -- GENERIC_ASSOCIATION
6323 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
6324
6325 -- There is no explicit node in the tree for a formal package actual
6326 -- part. Instead the information appears in the parent node (i.e. the
6327 -- formal package declaration node itself).
6328
6329 -- There is no explicit node for a formal package association. All of
6330 -- them are represented either by a generic association, possibly with
6331 -- Box_Present, or by an N_Others_Choice.
6332
6333 ---------------------------------
6334 -- 13.1 Representation clause --
6335 ---------------------------------
6336
6337 -- REPRESENTATION_CLAUSE ::=
6338 -- ATTRIBUTE_DEFINITION_CLAUSE
6339 -- | ENUMERATION_REPRESENTATION_CLAUSE
6340 -- | RECORD_REPRESENTATION_CLAUSE
6341 -- | AT_CLAUSE
6342
6343 ----------------------
6344 -- 13.1 Local Name --
6345 ----------------------
6346
6347 -- LOCAL_NAME :=
6348 -- DIRECT_NAME
6349 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
6350 -- | library_unit_NAME
6351
6352 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
6353 -- as an attribute reference, which has essentially the same form.
6354
6355 ---------------------------------------
6356 -- 13.3 Attribute definition clause --
6357 ---------------------------------------
6358
6359 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
6360 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
6361 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
6362
6363 -- In Ada 83, the expression must be a simple expression and the
6364 -- local name must be a direct name.
6365
6366 -- Note: the only attribute definition clause that is processed by
6367 -- gigi is an address clause. For all other cases, the information
6368 -- is extracted by the front end and either results in setting entity
6369 -- information, e.g. Esize for the Size clause, or in appropriate
6370 -- expansion actions (e.g. in the case of Storage_Size).
6371
6372 -- For an address clause, Gigi constructs the appropriate addressing
6373 -- code. It also ensures that no aliasing optimizations are made
6374 -- for the object for which the address clause appears.
6375
6376 -- Note: for an address clause used to achieve an overlay:
6377
6378 -- A : Integer;
6379 -- B : Integer;
6380 -- for B'Address use A'Address;
6381
6382 -- the above rule means that Gigi will ensure that no optimizations
6383 -- will be made for B that would violate the implementation advice
6384 -- of RM 13.3(19). However, this advice applies only to B and not
6385 -- to A, which seems unfortunate. The GNAT front end will mark the
6386 -- object A as volatile to also prevent unwanted optimization
6387 -- assumptions based on no aliasing being made for B.
6388
6389 -- N_Attribute_Definition_Clause
6390 -- Sloc points to FOR
6391 -- Name (Node2) the local name
6392 -- Chars (Name1) the identifier name from the attribute designator
6393 -- Expression (Node3) the expression or name
6394 -- Entity (Node4-Sem)
6395 -- Next_Rep_Item (Node5-Sem)
6396 -- From_At_Mod (Flag4-Sem)
6397 -- Check_Address_Alignment (Flag11-Sem)
6398 -- From_Aspect_Specification (Flag13-Sem)
6399 -- Is_Delayed_Aspect (Flag14-Sem)
6400 -- Address_Warning_Posted (Flag18-Sem)
6401
6402 -- Note: if From_Aspect_Specification is set, then Sloc points to the
6403 -- aspect name, and Entity is resolved already to reference the entity
6404 -- to which the aspect applies.
6405
6406 -----------------------------------
6407 -- 13.3.1 Aspect Specifications --
6408 -----------------------------------
6409
6410 -- We modify the RM grammar here, the RM grammar is:
6411
6412 -- ASPECT_SPECIFICATION ::=
6413 -- with ASPECT_MARK [=> ASPECT_DEFINITION] {.
6414 -- ASPECT_MARK [=> ASPECT_DEFINITION] }
6415
6416 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
6417
6418 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
6419
6420 -- That's inconvenient, since there is no non-terminal name for a single
6421 -- entry in the list of aspects. So we use this grammar instead:
6422
6423 -- ASPECT_SPECIFICATIONS ::=
6424 -- with ASPECT_SPECIFICATION {, ASPECT_SPECIFICATION}
6425
6426 -- ASPECT_SPECIFICATION =>
6427 -- ASPECT_MARK [=> ASPECT_DEFINITION]
6428
6429 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
6430
6431 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
6432
6433 -- See separate package Aspects for details on the incorporation of
6434 -- these nodes into the tree, and how aspect specifications for a given
6435 -- declaration node are associated with that node.
6436
6437 -- N_Aspect_Specification
6438 -- Sloc points to aspect identifier
6439 -- Identifier (Node1) aspect identifier
6440 -- Aspect_Rep_Item (Node2-Sem)
6441 -- Expression (Node3) Aspect_Definition (set to Empty if none)
6442 -- Entity (Node4-Sem) entity to which the aspect applies
6443 -- Class_Present (Flag6) Set if 'Class present
6444 -- Next_Rep_Item (Node5-Sem)
6445
6446 -- Note: Aspect_Specification is an Ada 2012 feature
6447
6448 ---------------------------------------------
6449 -- 13.4 Enumeration representation clause --
6450 ---------------------------------------------
6451
6452 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
6453 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
6454
6455 -- In Ada 83, the name must be a direct name
6456
6457 -- N_Enumeration_Representation_Clause
6458 -- Sloc points to FOR
6459 -- Identifier (Node1) direct name
6460 -- Array_Aggregate (Node3)
6461 -- Next_Rep_Item (Node5-Sem)
6462
6463 ---------------------------------
6464 -- 13.4 Enumeration aggregate --
6465 ---------------------------------
6466
6467 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
6468
6469 ------------------------------------------
6470 -- 13.5.1 Record representation clause --
6471 ------------------------------------------
6472
6473 -- RECORD_REPRESENTATION_CLAUSE ::=
6474 -- for first_subtype_LOCAL_NAME use
6475 -- record [MOD_CLAUSE]
6476 -- {COMPONENT_CLAUSE}
6477 -- end record;
6478
6479 -- Gigi restriction: Mod_Clause is always Empty (if present it is
6480 -- replaced by a corresponding Alignment attribute definition clause).
6481
6482 -- Note: Component_Clauses can include pragmas
6483
6484 -- N_Record_Representation_Clause
6485 -- Sloc points to FOR
6486 -- Identifier (Node1) direct name
6487 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
6488 -- Component_Clauses (List3)
6489 -- Next_Rep_Item (Node5-Sem)
6490
6491 ------------------------------
6492 -- 13.5.1 Component clause --
6493 ------------------------------
6494
6495 -- COMPONENT_CLAUSE ::=
6496 -- component_LOCAL_NAME at POSITION
6497 -- range FIRST_BIT .. LAST_BIT;
6498
6499 -- N_Component_Clause
6500 -- Sloc points to AT
6501 -- Component_Name (Node1) points to Name or Attribute_Reference
6502 -- Position (Node2)
6503 -- First_Bit (Node3)
6504 -- Last_Bit (Node4)
6505
6506 ----------------------
6507 -- 13.5.1 Position --
6508 ----------------------
6509
6510 -- POSITION ::= static_EXPRESSION
6511
6512 -----------------------
6513 -- 13.5.1 First_Bit --
6514 -----------------------
6515
6516 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
6517
6518 ----------------------
6519 -- 13.5.1 Last_Bit --
6520 ----------------------
6521
6522 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
6523
6524 --------------------------
6525 -- 13.8 Code statement --
6526 --------------------------
6527
6528 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
6529
6530 -- Note: in GNAT, the qualified expression has the form
6531
6532 -- Asm_Insn'(Asm (...));
6533
6534 -- See package System.Machine_Code in file s-maccod.ads for details on
6535 -- the allowed parameters to Asm. There are two ways this node can
6536 -- arise, as a code statement, in which case the expression is the
6537 -- qualified expression, or as a result of the expansion of an intrinsic
6538 -- call to the Asm or Asm_Input procedure.
6539
6540 -- N_Code_Statement
6541 -- Sloc points to first token of the expression
6542 -- Expression (Node3)
6543
6544 -- Note: package Exp_Code contains an abstract functional interface
6545 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
6546
6547 ------------------------
6548 -- 13.12 Restriction --
6549 ------------------------
6550
6551 -- RESTRICTION ::=
6552 -- restriction_IDENTIFIER
6553 -- | restriction_parameter_IDENTIFIER => EXPRESSION
6554
6555 -- There is no explicit node for restrictions. Instead the restriction
6556 -- appears in normal pragma syntax as a pragma argument association,
6557 -- which has the same syntactic form.
6558
6559 --------------------------
6560 -- B.2 Shift Operators --
6561 --------------------------
6562
6563 -- Calls to the intrinsic shift functions are converted to one of
6564 -- the following shift nodes, which have the form of normal binary
6565 -- operator names. Note that for a given shift operation, one node
6566 -- covers all possible types, as for normal operators.
6567
6568 -- Note: it is perfectly permissible for the expander to generate
6569 -- shift operation nodes directly, in which case they will be analyzed
6570 -- and parsed in the usual manner.
6571
6572 -- Sprint syntax: shift-function-name!(expr, count)
6573
6574 -- Note: the Left_Opnd field holds the first argument (the value to
6575 -- be shifted). The Right_Opnd field holds the second argument (the
6576 -- shift count). The Chars field is the name of the intrinsic function.
6577
6578 -- N_Op_Rotate_Left
6579 -- Sloc points to the function name
6580 -- plus fields for binary operator
6581 -- plus fields for expression
6582 -- Shift_Count_OK (Flag4-Sem)
6583
6584 -- N_Op_Rotate_Right
6585 -- Sloc points to the function name
6586 -- plus fields for binary operator
6587 -- plus fields for expression
6588 -- Shift_Count_OK (Flag4-Sem)
6589
6590 -- N_Op_Shift_Left
6591 -- Sloc points to the function name
6592 -- plus fields for binary operator
6593 -- plus fields for expression
6594 -- Shift_Count_OK (Flag4-Sem)
6595
6596 -- N_Op_Shift_Right_Arithmetic
6597 -- Sloc points to the function name
6598 -- plus fields for binary operator
6599 -- plus fields for expression
6600 -- Shift_Count_OK (Flag4-Sem)
6601
6602 -- N_Op_Shift_Right
6603 -- Sloc points to the function name
6604 -- plus fields for binary operator
6605 -- plus fields for expression
6606 -- Shift_Count_OK (Flag4-Sem)
6607
6608 --------------------------
6609 -- Obsolescent Features --
6610 --------------------------
6611
6612 -- The syntax descriptions and tree nodes for obsolescent features are
6613 -- grouped together, corresponding to their location in appendix I in
6614 -- the RM. However, parsing and semantic analysis for these constructs
6615 -- is located in an appropriate chapter (see individual notes).
6616
6617 ---------------------------
6618 -- J.3 Delta Constraint --
6619 ---------------------------
6620
6621 -- Note: the parse routine for this construct is located in section
6622 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
6623 -- where delta constraint logically belongs.
6624
6625 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
6626
6627 -- N_Delta_Constraint
6628 -- Sloc points to DELTA
6629 -- Delta_Expression (Node3)
6630 -- Range_Constraint (Node4) (set to Empty if not present)
6631
6632 --------------------
6633 -- J.7 At Clause --
6634 --------------------
6635
6636 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
6637
6638 -- Note: the parse routine for this construct is located in Par-Ch13,
6639 -- and the semantic analysis is in Sem_Ch13, where at clause logically
6640 -- belongs if it were not obsolescent.
6641
6642 -- Note: in Ada 83 the expression must be a simple expression
6643
6644 -- Gigi restriction: This node never appears, it is rewritten as an
6645 -- address attribute definition clause.
6646
6647 -- N_At_Clause
6648 -- Sloc points to FOR
6649 -- Identifier (Node1)
6650 -- Expression (Node3)
6651
6652 ---------------------
6653 -- J.8 Mod clause --
6654 ---------------------
6655
6656 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
6657
6658 -- Note: the parse routine for this construct is located in Par-Ch13,
6659 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
6660 -- belongs if it were not obsolescent.
6661
6662 -- Note: in Ada 83, the expression must be a simple expression
6663
6664 -- Gigi restriction: this node never appears. It is replaced
6665 -- by a corresponding Alignment attribute definition clause.
6666
6667 -- Note: pragmas can appear before and after the MOD_CLAUSE since
6668 -- its name has "clause" in it. This is rather strange, but is quite
6669 -- definitely specified. The pragmas before are collected in the
6670 -- Pragmas_Before field of the mod clause node itself, and pragmas
6671 -- after are simply swallowed up in the list of component clauses.
6672
6673 -- N_Mod_Clause
6674 -- Sloc points to AT
6675 -- Expression (Node3)
6676 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
6677
6678 --------------------
6679 -- Semantic Nodes --
6680 --------------------
6681
6682 -- These semantic nodes are used to hold additional semantic information.
6683 -- They are inserted into the tree as a result of semantic processing.
6684 -- Although there are no legitimate source syntax constructions that
6685 -- correspond directly to these nodes, we need a source syntax for the
6686 -- reconstructed tree printed by Sprint, and the node descriptions here
6687 -- show this syntax.
6688
6689 -- Note: Case_Expression and Conditional_Expression is in this section for
6690 -- now, since they are extensions. We will move them to their appropriate
6691 -- places when they are officially approved as extensions (and then we will
6692 -- know what the exact grammar and place in the Reference Manual is!)
6693
6694 ---------------------
6695 -- Case Expression --
6696 ---------------------
6697
6698 -- CASE_EXPRESSION ::=
6699 -- case EXPRESSION is
6700 -- CASE_EXPRESSION_ALTERNATIVE
6701 -- {CASE_EXPRESSION_ALTERNATIVE}
6702
6703 -- Note that the Alternatives cannot include pragmas (this constrasts
6704 -- with the situation of case statements where pragmas are allowed).
6705
6706 -- N_Case_Expression
6707 -- Sloc points to CASE
6708 -- Expression (Node3)
6709 -- Alternatives (List4)
6710
6711 ---------------------------------
6712 -- Case Expression Alternative --
6713 ---------------------------------
6714
6715 -- CASE_STATEMENT_ALTERNATIVE ::=
6716 -- when DISCRETE_CHOICE_LIST =>
6717 -- EXPRESSION
6718
6719 -- N_Case_Expression_Alternative
6720 -- Sloc points to WHEN
6721 -- Actions (List1)
6722 -- Discrete_Choices (List4)
6723 -- Expression (Node3)
6724
6725 -- Note: The Actions field temporarily holds any actions associated with
6726 -- evaluation of the Expression. During expansion of the case expression
6727 -- these actions are wrapped into the an N_Expressions_With_Actions node
6728 -- replacing the original expression.
6729
6730 ----------------------------
6731 -- Conditional Expression --
6732 ----------------------------
6733
6734 -- This node is used to represent an expression corresponding to the
6735 -- C construct (condition ? then-expression : else_expression), where
6736 -- Expressions is a three element list, whose first expression is the
6737 -- condition, and whose second and third expressions are the then and
6738 -- else expressions respectively.
6739
6740 -- Note: the Then_Actions and Else_Actions fields are always set to
6741 -- No_List in the tree passed to Gigi. These fields are used only
6742 -- for temporary processing purposes in the expander.
6743
6744 -- The Ada language does not permit conditional expressions, however
6745 -- this is under discussion as a possible extension by the ARG, and we
6746 -- have implemented a form of this capability in GNAT under control of
6747 -- the -gnatX switch. The syntax is:
6748
6749 -- CONDITIONAL_EXPRESSION ::=
6750 -- if EXPRESSION then EXPRESSION
6751 -- {elsif EXPRESSION then EXPRESSION}
6752 -- [else EXPRESSION]
6753
6754 -- And we add the additional constructs
6755
6756 -- PRIMARY ::= ( CONDITIONAL_EXPRESION )
6757 -- PRAGMA_ARGUMENT_ASSOCIATION ::= CONDITIONAL_EXPRESSION
6758
6759 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
6760 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
6761 -- the Is_Elsif flag is set on the inner conditional expression.
6762
6763 -- N_Conditional_Expression
6764 -- Sloc points to IF or ELSIF keyword
6765 -- Expressions (List1)
6766 -- Then_Actions (List2-Sem)
6767 -- Else_Actions (List3-Sem)
6768 -- Is_Elsif (Flag13) (set if comes from ELSIF)
6769 -- plus fields for expression
6770
6771 -------------------
6772 -- Expanded_Name --
6773 -------------------
6774
6775 -- The N_Expanded_Name node is used to represent a selected component
6776 -- name that has been resolved to an expanded name. The semantic phase
6777 -- replaces N_Selected_Component nodes that represent names by the use
6778 -- of this node, leaving the N_Selected_Component node used only when
6779 -- the prefix is a record or protected type.
6780
6781 -- The fields of the N_Expanded_Name node are layed out identically
6782 -- to those of the N_Selected_Component node, allowing conversion of
6783 -- an expanded name node to a selected component node to be done
6784 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
6785
6786 -- There is no special sprint syntax for an expanded name
6787
6788 -- N_Expanded_Name
6789 -- Sloc points to the period
6790 -- Chars (Name1) copy of Chars field of selector name
6791 -- Prefix (Node3)
6792 -- Selector_Name (Node2)
6793 -- Entity (Node4-Sem)
6794 -- Associated_Node (Node4-Sem)
6795 -- Redundant_Use (Flag13-Sem)
6796 -- Has_Private_View (Flag11-Sem) set in generic units.
6797 -- plus fields for expression
6798
6799 -----------------------------
6800 -- Expression with Actions --
6801 -----------------------------
6802
6803 -- This node is created by the analyzer/expander to handle some
6804 -- expansion cases, notably short circuit forms where there are
6805 -- actions associated with the right hand operand.
6806
6807 -- The N_Expression_With_Actions node represents an expression with
6808 -- an associated set of actions (which are executable statements and
6809 -- declarations, as might occur in a handled statement sequence).
6810
6811 -- The required semantics is that the set of actions is executed in
6812 -- the order in which it appears just before the expression is
6813 -- evaluated (and these actions must only be executed if the value
6814 -- of the expression is evaluated). The node is considered to be
6815 -- a subexpression, whose value is the value of the Expression after
6816 -- executing all the actions.
6817
6818 -- Note: if the actions contain declarations, then these declarations
6819 -- maybe referenced with in the expression. It is thus appropriate for
6820 -- the back end to create a scope that encompasses the construct (any
6821 -- declarations within the actions will definitely not be referenced
6822 -- once elaboration of the construct is completed).
6823
6824 -- Sprint syntax: do
6825 -- action;
6826 -- action;
6827 -- ...
6828 -- action;
6829 -- in expression end
6830
6831 -- N_Expression_With_Actions
6832 -- Actions (List1)
6833 -- Expression (Node3)
6834 -- plus fields for expression
6835
6836 -- Note: the actions list is always non-null, since we would
6837 -- never have created this node if there weren't some actions.
6838
6839 --------------------
6840 -- Free Statement --
6841 --------------------
6842
6843 -- The N_Free_Statement node is generated as a result of a call to an
6844 -- instantiation of Unchecked_Deallocation. The instantiation of this
6845 -- generic is handled specially and generates this node directly.
6846
6847 -- Sprint syntax: free expression
6848
6849 -- N_Free_Statement
6850 -- Sloc is copied from the unchecked deallocation call
6851 -- Expression (Node3) argument to unchecked deallocation call
6852 -- Storage_Pool (Node1-Sem)
6853 -- Procedure_To_Call (Node2-Sem)
6854 -- Actual_Designated_Subtype (Node4-Sem)
6855
6856 -- Note: in the case where a debug source file is generated, the Sloc
6857 -- for this node points to the FREE keyword in the Sprint file output.
6858
6859 -------------------
6860 -- Freeze Entity --
6861 -------------------
6862
6863 -- This node marks the point in a declarative part at which an entity
6864 -- declared therein becomes frozen. The expander places initialization
6865 -- procedures for types at those points. Gigi uses the freezing point
6866 -- to elaborate entities that may depend on previous private types.
6867
6868 -- See the section in Einfo "Delayed Freezing and Elaboration" for
6869 -- a full description of the use of this node.
6870
6871 -- The Entity field points back to the entity for the type (whose
6872 -- Freeze_Node field points back to this freeze node).
6873
6874 -- The Actions field contains a list of declarations and statements
6875 -- generated by the expander which are associated with the freeze
6876 -- node, and are elaborated as though the freeze node were replaced
6877 -- by this sequence of actions.
6878
6879 -- Note: the Sloc field in the freeze node references a construct
6880 -- associated with the freezing point. This is used for posting
6881 -- messages in some error/warning situations, e.g. the case where
6882 -- a primitive operation of a tagged type is declared too late.
6883
6884 -- Sprint syntax: freeze entity-name [
6885 -- freeze actions
6886 -- ]
6887
6888 -- N_Freeze_Entity
6889 -- Sloc points near freeze point (see above special note)
6890 -- Entity (Node4-Sem)
6891 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
6892 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
6893 -- Actions (List1) (set to No_List if no freeze actions)
6894 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
6895
6896 -- The Actions field holds actions associated with the freeze. These
6897 -- actions are elaborated at the point where the type is frozen.
6898
6899 -- Note: in the case where a debug source file is generated, the Sloc
6900 -- for this node points to the FREEZE keyword in the Sprint file output.
6901
6902 --------------------------------
6903 -- Implicit Label Declaration --
6904 --------------------------------
6905
6906 -- An implicit label declaration is created for every occurrence of a
6907 -- label on a statement or a label on a block or loop. It is chained
6908 -- in the declarations of the innermost enclosing block as specified
6909 -- in RM section 5.1 (3).
6910
6911 -- The Defining_Identifier is the actual identifier for the statement
6912 -- identifier. Note that the occurrence of the label is a reference, NOT
6913 -- the defining occurrence. The defining occurrence occurs at the head
6914 -- of the innermost enclosing block, and is represented by this node.
6915
6916 -- Note: from the grammar, this might better be called an implicit
6917 -- statement identifier declaration, but the term we choose seems
6918 -- friendlier, since at least informally statement identifiers are
6919 -- called labels in both cases (i.e. when used in labels, and when
6920 -- used as the identifiers of blocks and loops).
6921
6922 -- Note: although this is logically a semantic node, since it does not
6923 -- correspond directly to a source syntax construction, these nodes are
6924 -- actually created by the parser in a post pass done just after parsing
6925 -- is complete, before semantic analysis is started (see Par.Labl).
6926
6927 -- Sprint syntax: labelname : label;
6928
6929 -- N_Implicit_Label_Declaration
6930 -- Sloc points to the << of the label
6931 -- Defining_Identifier (Node1)
6932 -- Label_Construct (Node2-Sem)
6933
6934 -- Note: in the case where a debug source file is generated, the Sloc
6935 -- for this node points to the label name in the generated declaration.
6936
6937 ---------------------
6938 -- Itype_Reference --
6939 ---------------------
6940
6941 -- This node is used to create a reference to an Itype. The only purpose
6942 -- is to make sure the Itype is defined if this is the first reference.
6943
6944 -- A typical use of this node is when an Itype is to be referenced in
6945 -- two branches of an IF statement. In this case it is important that
6946 -- the first use of the Itype not be inside the conditional, since then
6947 -- it might not be defined if the other branch of the IF is taken, in
6948 -- the case where the definition generates elaboration code.
6949
6950 -- The Itype field points to the referenced Itype
6951
6952 -- Sprint syntax: reference itype-name
6953
6954 -- N_Itype_Reference
6955 -- Sloc points to the node generating the reference
6956 -- Itype (Node1-Sem)
6957
6958 -- Note: in the case where a debug source file is generated, the Sloc
6959 -- for this node points to the REFERENCE keyword in the file output.
6960
6961 ---------------------
6962 -- Raise_xxx_Error --
6963 ---------------------
6964
6965 -- One of these nodes is created during semantic analysis to replace
6966 -- a node for an expression that is determined to definitely raise
6967 -- the corresponding exception.
6968
6969 -- The N_Raise_xxx_Error node may also stand alone in place
6970 -- of a declaration or statement, in which case it simply causes
6971 -- the exception to be raised (i.e. it is equivalent to a raise
6972 -- statement that raises the corresponding exception). This use
6973 -- is distinguished by the fact that the Etype in this case is
6974 -- Standard_Void_Type, In the subexpression case, the Etype is the
6975 -- same as the type of the subexpression which it replaces.
6976
6977 -- If Condition is empty, then the raise is unconditional. If the
6978 -- Condition field is non-empty, it is a boolean expression which
6979 -- is first evaluated, and the exception is raised only if the
6980 -- value of the expression is True. In the unconditional case, the
6981 -- creation of this node is usually accompanied by a warning message
6982 -- error. The creation of this node will usually be accompanied by a
6983 -- message (unless it appears within the right operand of a short
6984 -- circuit form whose left argument is static and decisively
6985 -- eliminates elaboration of the raise operation. The condition field
6986 -- can ONLY be present when the node is used as a statement form, it
6987 -- may NOT be present in the case where the node appears within an
6988 -- expression.
6989
6990 -- The exception is generated with a message that contains the
6991 -- file name and line number, and then appended text. The Reason
6992 -- code shows the text to be added. The Reason code is an element
6993 -- of the type Types.RT_Exception_Code, and indicates both the
6994 -- message to be added, and the exception to be raised (which must
6995 -- match the node type). The value is stored by storing a Uint which
6996 -- is the Pos value of the enumeration element in this type.
6997
6998 -- Gigi restriction: This expander ensures that the type of the
6999 -- Condition field is always Standard.Boolean, even if the type
7000 -- in the source is some non-standard boolean type.
7001
7002 -- Sprint syntax: [xxx_error "msg"]
7003 -- or: [xxx_error when condition "msg"]
7004
7005 -- N_Raise_Constraint_Error
7006 -- Sloc references related construct
7007 -- Condition (Node1) (set to Empty if no condition)
7008 -- Reason (Uint3)
7009 -- plus fields for expression
7010
7011 -- N_Raise_Program_Error
7012 -- Sloc references related construct
7013 -- Condition (Node1) (set to Empty if no condition)
7014 -- Reason (Uint3)
7015 -- plus fields for expression
7016
7017 -- N_Raise_Storage_Error
7018 -- Sloc references related construct
7019 -- Condition (Node1) (set to Empty if no condition)
7020 -- Reason (Uint3)
7021 -- plus fields for expression
7022
7023 -- Note: Sloc is copied from the expression generating the exception.
7024 -- In the case where a debug source file is generated, the Sloc for
7025 -- this node points to the left bracket in the Sprint file output.
7026
7027 -- Note: the back end may be required to translate these nodes into
7028 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
7029
7030 ---------------------------------------------
7031 -- Optimization of Exception Raise to Goto --
7032 ---------------------------------------------
7033
7034 -- In some cases, the front end will determine that any exception raised
7035 -- by the back end for a certain exception should be transformed into a
7036 -- goto statement.
7037
7038 -- There are three kinds of exceptions raised by the back end (note that
7039 -- for this purpose we consider gigi to be part of the back end in the
7040 -- gcc case):
7041
7042 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
7043 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
7044 -- 3. Other cases not specifically marked by the front end
7045
7046 -- Normally all such exceptions are translated into calls to the proper
7047 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
7048 -- and the exception message.
7049
7050 -- The front end may determine that for a particular sequence of code,
7051 -- exceptions in any of these three categories for a particular builtin
7052 -- exception should result in a goto, rather than a call to Rcheck_xx.
7053 -- The exact sequence to be generated is:
7054
7055 -- Local_Raise (exception'Identity);
7056 -- goto Label
7057
7058 -- The front end marks such a sequence of code by bracketing it with
7059 -- push and pop nodes:
7060
7061 -- N_Push_xxx_Label (referencing the label)
7062 -- ...
7063 -- (code where transformation is expected for exception xxx)
7064 -- ...
7065 -- N_Pop_xxx_Label
7066
7067 -- The use of push/pop reflects the fact that such regions can properly
7068 -- nest, and one special case is a subregion in which no transformation
7069 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
7070 -- Exception_Label field is Empty.
7071
7072 -- N_Push_Constraint_Error_Label
7073 -- Sloc references first statement in region covered
7074 -- Exception_Label (Node5-Sem)
7075
7076 -- N_Push_Program_Error_Label
7077 -- Sloc references first statement in region covered
7078 -- Exception_Label (Node5-Sem)
7079
7080 -- N_Push_Storage_Error_Label
7081 -- Sloc references first statement in region covered
7082 -- Exception_Label (Node5-Sem)
7083
7084 -- N_Pop_Constraint_Error_Label
7085 -- Sloc references last statement in region covered
7086
7087 -- N_Pop_Program_Error_Label
7088 -- Sloc references last statement in region covered
7089
7090 -- N_Pop_Storage_Error_Label
7091 -- Sloc references last statement in region covered
7092
7093 ---------------
7094 -- Reference --
7095 ---------------
7096
7097 -- For a number of purposes, we need to construct references to objects.
7098 -- These references are subsequently treated as normal access values.
7099 -- An example is the construction of the parameter block passed to a
7100 -- task entry. The N_Reference node is provided for this purpose. It is
7101 -- similar in effect to the use of the Unrestricted_Access attribute,
7102 -- and like Unrestricted_Access can be applied to objects which would
7103 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
7104 -- objects which are not aliased, and slices). In addition it can be
7105 -- applied to composite type values as well as objects, including string
7106 -- values and aggregates.
7107
7108 -- Note: we use the Prefix field for this expression so that the
7109 -- resulting node can be treated using common code with the attribute
7110 -- nodes for the 'Access and related attributes. Logically it would make
7111 -- more sense to call it an Expression field, but then we would have to
7112 -- special case the treatment of the N_Reference node.
7113
7114 -- Sprint syntax: prefix'reference
7115
7116 -- N_Reference
7117 -- Sloc is copied from the expression
7118 -- Prefix (Node3)
7119 -- plus fields for expression
7120
7121 -- Note: in the case where a debug source file is generated, the Sloc
7122 -- for this node points to the quote in the Sprint file output.
7123
7124 -----------------
7125 -- SCIL Nodes --
7126 -----------------
7127
7128 -- SCIL nodes are special nodes added to the tree when the CodePeer
7129 -- mode is active. They help the CodePeer backend to locate nodes that
7130 -- require special processing.
7131
7132 -- Major documentation on the general design of the SCIL interface, and
7133 -- in particular detailed description of these nodes is missing and is
7134 -- to be supplied in the future, when the design has finalized ???
7135
7136 -- Meanwhile these nodes should be considered in experimental form, and
7137 -- should be ignored by all code generating back ends. ???
7138
7139 -- N_SCIL_Dispatch_Table_Tag_Init
7140 -- Sloc references a node for a tag initialization
7141 -- SCIL_Entity (Node4-Sem)
7142
7143 -- N_SCIL_Dispatching_Call
7144 -- Sloc references the node of a dispatching call
7145 -- SCIL_Target_Prim (Node2-Sem)
7146 -- SCIL_Entity (Node4-Sem)
7147 -- SCIL_Controlling_Tag (Node5-Sem)
7148
7149 -- N_SCIL_Membership_Test
7150 -- Sloc references the node of a membership test
7151 -- SCIL_Tag_Value (Node5-Sem)
7152 -- SCIL_Entity (Node4-Sem)
7153
7154 ---------------------
7155 -- Subprogram_Info --
7156 ---------------------
7157
7158 -- This node generates the appropriate Subprogram_Info value for a
7159 -- given procedure. See Ada.Exceptions for further details
7160
7161 -- Sprint syntax: subprog'subprogram_info
7162
7163 -- N_Subprogram_Info
7164 -- Sloc points to the entity for the procedure
7165 -- Identifier (Node1) identifier referencing the procedure
7166 -- Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc
7167
7168 -- Note: in the case where a debug source file is generated, the Sloc
7169 -- for this node points to the quote in the Sprint file output.
7170
7171 --------------------------
7172 -- Unchecked Expression --
7173 --------------------------
7174
7175 -- An unchecked expression is one that must be analyzed and resolved
7176 -- with all checks off, regardless of the current setting of scope
7177 -- suppress flags.
7178
7179 -- Sprint syntax: `(expression)
7180
7181 -- Note: this node is always removed from the tree (and replaced by
7182 -- its constituent expression) on completion of analysis, so it only
7183 -- appears in intermediate trees, and will never be seen by Gigi.
7184
7185 -- N_Unchecked_Expression
7186 -- Sloc is a copy of the Sloc of the expression
7187 -- Expression (Node3)
7188 -- plus fields for expression
7189
7190 -- Note: in the case where a debug source file is generated, the Sloc
7191 -- for this node points to the back quote in the Sprint file output.
7192
7193 -------------------------------
7194 -- Unchecked Type Conversion --
7195 -------------------------------
7196
7197 -- An unchecked type conversion node represents the semantic action
7198 -- corresponding to a call to an instantiation of Unchecked_Conversion.
7199 -- It is generated as a result of actual use of Unchecked_Conversion
7200 -- and also the expander generates unchecked type conversion nodes
7201 -- directly for expansion of complex semantic actions.
7202
7203 -- Note: an unchecked type conversion is a variable as far as the
7204 -- semantics are concerned, which is convenient for the expander.
7205 -- This does not change what Ada source programs are legal, since
7206 -- clearly a function call to an instantiation of Unchecked_Conversion
7207 -- is not a variable in any case.
7208
7209 -- Sprint syntax: subtype-mark!(expression)
7210
7211 -- N_Unchecked_Type_Conversion
7212 -- Sloc points to related node in source
7213 -- Subtype_Mark (Node4)
7214 -- Expression (Node3)
7215 -- Kill_Range_Check (Flag11-Sem)
7216 -- No_Truncation (Flag17-Sem)
7217 -- plus fields for expression
7218
7219 -- Note: in the case where a debug source file is generated, the Sloc
7220 -- for this node points to the exclamation in the Sprint file output.
7221
7222 -----------------------------------
7223 -- Validate_Unchecked_Conversion --
7224 -----------------------------------
7225
7226 -- The front end does most of the validation of unchecked conversion,
7227 -- including checking sizes (this is done after the back end is called
7228 -- to take advantage of back-annotation of calculated sizes).
7229
7230 -- The front end also deals with specific cases that are not allowed
7231 -- e.g. involving unconstrained array types.
7232
7233 -- For the case of the standard gigi backend, this means that all
7234 -- checks are done in the front-end.
7235
7236 -- However, in the case of specialized back-ends, notably the JVM
7237 -- backend for JGNAT, additional requirements and restrictions apply
7238 -- to unchecked conversion, and these are most conveniently performed
7239 -- in the specialized back-end.
7240
7241 -- To accommodate this requirement, for such back ends, the following
7242 -- special node is generated recording an unchecked conversion that
7243 -- needs to be validated. The back end should post an appropriate
7244 -- error message if the unchecked conversion is invalid or warrants
7245 -- a special warning message.
7246
7247 -- Source_Type and Target_Type point to the entities for the two
7248 -- types involved in the unchecked conversion instantiation that
7249 -- is to be validated.
7250
7251 -- Sprint syntax: validate Unchecked_Conversion (source, target);
7252
7253 -- N_Validate_Unchecked_Conversion
7254 -- Sloc points to instantiation (location for warning message)
7255 -- Source_Type (Node1-Sem)
7256 -- Target_Type (Node2-Sem)
7257
7258 -- Note: in the case where a debug source file is generated, the Sloc
7259 -- for this node points to the VALIDATE keyword in the file output.
7260
7261 -----------
7262 -- Empty --
7263 -----------
7264
7265 -- Used as the contents of the Nkind field of the dummy Empty node
7266 -- and in some other situations to indicate an uninitialized value.
7267
7268 -- N_Empty
7269 -- Chars (Name1) is set to No_Name
7270
7271 -----------
7272 -- Error --
7273 -----------
7274
7275 -- Used as the contents of the Nkind field of the dummy Error node.
7276 -- Has an Etype field, which gets set to Any_Type later on, to help
7277 -- error recovery (Error_Posted is also set in the Error node).
7278
7279 -- N_Error
7280 -- Chars (Name1) is set to Error_Name
7281 -- Etype (Node5-Sem)
7282
7283 --------------------------
7284 -- Node Type Definition --
7285 --------------------------
7286
7287 -- The following is the definition of the Node_Kind type. As previously
7288 -- discussed, this is separated off to allow rearrangement of the order to
7289 -- facilitate definition of subtype ranges. The comments show the subtype
7290 -- classes which apply to each set of node kinds. The first entry in the
7291 -- comment characterizes the following list of nodes.
7292
7293 type Node_Kind is (
7294 N_Unused_At_Start,
7295
7296 -- N_Representation_Clause
7297
7298 N_At_Clause,
7299 N_Component_Clause,
7300 N_Enumeration_Representation_Clause,
7301 N_Mod_Clause,
7302 N_Record_Representation_Clause,
7303
7304 -- N_Representation_Clause, N_Has_Chars
7305
7306 N_Attribute_Definition_Clause,
7307
7308 -- N_Has_Chars
7309
7310 N_Empty,
7311 N_Pragma_Argument_Association,
7312
7313 -- N_Has_Etype
7314
7315 N_Error,
7316
7317 -- N_Entity, N_Has_Etype, N_Has_Chars
7318
7319 N_Defining_Character_Literal,
7320 N_Defining_Identifier,
7321 N_Defining_Operator_Symbol,
7322
7323 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
7324
7325 N_Expanded_Name,
7326
7327 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
7328 -- N_Has_Chars, N_Has_Entity
7329
7330 N_Identifier,
7331 N_Operator_Symbol,
7332
7333 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
7334 -- N_Has_Chars, N_Has_Entity
7335
7336 N_Character_Literal,
7337
7338 -- N_Binary_Op, N_Op, N_Subexpr,
7339 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
7340
7341 N_Op_Add,
7342 N_Op_Concat,
7343 N_Op_Expon,
7344 N_Op_Subtract,
7345
7346 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
7347 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
7348
7349 N_Op_Divide,
7350 N_Op_Mod,
7351 N_Op_Multiply,
7352 N_Op_Rem,
7353
7354 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7355 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7356
7357 N_Op_And,
7358
7359 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7360 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
7361
7362 N_Op_Eq,
7363 N_Op_Ge,
7364 N_Op_Gt,
7365 N_Op_Le,
7366 N_Op_Lt,
7367 N_Op_Ne,
7368
7369 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7370 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7371
7372 N_Op_Or,
7373 N_Op_Xor,
7374
7375 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
7376 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
7377
7378 N_Op_Rotate_Left,
7379 N_Op_Rotate_Right,
7380 N_Op_Shift_Left,
7381 N_Op_Shift_Right,
7382 N_Op_Shift_Right_Arithmetic,
7383
7384 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
7385 -- N_Has_Chars, N_Has_Entity
7386
7387 N_Op_Abs,
7388 N_Op_Minus,
7389 N_Op_Not,
7390 N_Op_Plus,
7391
7392 -- N_Subexpr, N_Has_Etype, N_Has_Entity
7393
7394 N_Attribute_Reference,
7395
7396 -- N_Subexpr, N_Has_Etype, N_Membership_Test
7397
7398 N_In,
7399 N_Not_In,
7400
7401 -- N_Subexpr, N_Has_Etype, N_Short_Circuit
7402
7403 N_And_Then,
7404 N_Or_Else,
7405
7406 -- N_Subexpr, N_Has_Etype
7407
7408 N_Conditional_Expression,
7409 N_Explicit_Dereference,
7410 N_Expression_With_Actions,
7411 N_Function_Call,
7412 N_Indexed_Component,
7413 N_Integer_Literal,
7414 N_Null,
7415 N_Procedure_Call_Statement,
7416 N_Qualified_Expression,
7417
7418 -- N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
7419
7420 N_Raise_Constraint_Error,
7421 N_Raise_Program_Error,
7422 N_Raise_Storage_Error,
7423
7424 -- N_Subexpr, N_Has_Etype
7425
7426 N_Aggregate,
7427 N_Allocator,
7428 N_Case_Expression,
7429 N_Extension_Aggregate,
7430 N_Range,
7431 N_Real_Literal,
7432 N_Reference,
7433 N_Selected_Component,
7434 N_Slice,
7435 N_String_Literal,
7436 N_Subprogram_Info,
7437 N_Type_Conversion,
7438 N_Unchecked_Expression,
7439 N_Unchecked_Type_Conversion,
7440
7441 -- N_Has_Etype
7442
7443 N_Subtype_Indication,
7444
7445 -- N_Declaration
7446
7447 N_Component_Declaration,
7448 N_Entry_Declaration,
7449 N_Formal_Object_Declaration,
7450 N_Formal_Type_Declaration,
7451 N_Full_Type_Declaration,
7452 N_Incomplete_Type_Declaration,
7453 N_Loop_Parameter_Specification,
7454 N_Object_Declaration,
7455 N_Parameterized_Expression,
7456 N_Protected_Type_Declaration,
7457 N_Private_Extension_Declaration,
7458 N_Private_Type_Declaration,
7459 N_Subtype_Declaration,
7460
7461 -- N_Subprogram_Specification, N_Declaration
7462
7463 N_Function_Specification,
7464 N_Procedure_Specification,
7465
7466 -- N_Access_To_Subprogram_Definition
7467
7468 N_Access_Function_Definition,
7469 N_Access_Procedure_Definition,
7470
7471 -- N_Later_Decl_Item
7472
7473 N_Task_Type_Declaration,
7474
7475 -- N_Body_Stub, N_Later_Decl_Item
7476
7477 N_Package_Body_Stub,
7478 N_Protected_Body_Stub,
7479 N_Subprogram_Body_Stub,
7480 N_Task_Body_Stub,
7481
7482 -- N_Generic_Instantiation, N_Later_Decl_Item
7483 -- N_Subprogram_Instantiation
7484
7485 N_Function_Instantiation,
7486 N_Procedure_Instantiation,
7487
7488 -- N_Generic_Instantiation, N_Later_Decl_Item
7489
7490 N_Package_Instantiation,
7491
7492 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
7493
7494 N_Package_Body,
7495 N_Subprogram_Body,
7496
7497 -- N_Later_Decl_Item, N_Proper_Body
7498
7499 N_Protected_Body,
7500 N_Task_Body,
7501
7502 -- N_Later_Decl_Item
7503
7504 N_Implicit_Label_Declaration,
7505 N_Package_Declaration,
7506 N_Single_Task_Declaration,
7507 N_Subprogram_Declaration,
7508 N_Use_Package_Clause,
7509
7510 -- N_Generic_Declaration, N_Later_Decl_Item
7511
7512 N_Generic_Package_Declaration,
7513 N_Generic_Subprogram_Declaration,
7514
7515 -- N_Array_Type_Definition
7516
7517 N_Constrained_Array_Definition,
7518 N_Unconstrained_Array_Definition,
7519
7520 -- N_Renaming_Declaration
7521
7522 N_Exception_Renaming_Declaration,
7523 N_Object_Renaming_Declaration,
7524 N_Package_Renaming_Declaration,
7525 N_Subprogram_Renaming_Declaration,
7526
7527 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
7528
7529 N_Generic_Function_Renaming_Declaration,
7530 N_Generic_Package_Renaming_Declaration,
7531 N_Generic_Procedure_Renaming_Declaration,
7532
7533 -- N_Statement_Other_Than_Procedure_Call
7534
7535 N_Abort_Statement,
7536 N_Accept_Statement,
7537 N_Assignment_Statement,
7538 N_Asynchronous_Select,
7539 N_Block_Statement,
7540 N_Case_Statement,
7541 N_Code_Statement,
7542 N_Conditional_Entry_Call,
7543
7544 -- N_Statement_Other_Than_Procedure_Call. N_Delay_Statement
7545
7546 N_Delay_Relative_Statement,
7547 N_Delay_Until_Statement,
7548
7549 -- N_Statement_Other_Than_Procedure_Call
7550
7551 N_Entry_Call_Statement,
7552 N_Free_Statement,
7553 N_Goto_Statement,
7554 N_Loop_Statement,
7555 N_Null_Statement,
7556 N_Raise_Statement,
7557 N_Requeue_Statement,
7558 N_Return_Statement, -- renamed as N_Simple_Return_Statement below
7559 N_Extended_Return_Statement,
7560 N_Selective_Accept,
7561 N_Timed_Entry_Call,
7562
7563 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
7564
7565 N_Exit_Statement,
7566 N_If_Statement,
7567
7568 -- N_Has_Condition
7569
7570 N_Accept_Alternative,
7571 N_Delay_Alternative,
7572 N_Elsif_Part,
7573 N_Entry_Body_Formal_Part,
7574 N_Iteration_Scheme,
7575 N_Terminate_Alternative,
7576
7577 -- N_Formal_Subprogram_Declaration
7578
7579 N_Formal_Abstract_Subprogram_Declaration,
7580 N_Formal_Concrete_Subprogram_Declaration,
7581
7582 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
7583
7584 N_Push_Constraint_Error_Label,
7585 N_Push_Program_Error_Label,
7586 N_Push_Storage_Error_Label,
7587
7588 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
7589
7590 N_Pop_Constraint_Error_Label,
7591 N_Pop_Program_Error_Label,
7592 N_Pop_Storage_Error_Label,
7593
7594 -- SCIL nodes
7595
7596 N_SCIL_Dispatch_Table_Tag_Init,
7597 N_SCIL_Dispatching_Call,
7598 N_SCIL_Membership_Test,
7599
7600 -- Other nodes (not part of any subtype class)
7601
7602 N_Abortable_Part,
7603 N_Abstract_Subprogram_Declaration,
7604 N_Access_Definition,
7605 N_Access_To_Object_Definition,
7606 N_Aspect_Specification,
7607 N_Case_Expression_Alternative,
7608 N_Case_Statement_Alternative,
7609 N_Compilation_Unit,
7610 N_Compilation_Unit_Aux,
7611 N_Component_Association,
7612 N_Component_Definition,
7613 N_Component_List,
7614 N_Derived_Type_Definition,
7615 N_Decimal_Fixed_Point_Definition,
7616 N_Defining_Program_Unit_Name,
7617 N_Delta_Constraint,
7618 N_Designator,
7619 N_Digits_Constraint,
7620 N_Discriminant_Association,
7621 N_Discriminant_Specification,
7622 N_Enumeration_Type_Definition,
7623 N_Entry_Body,
7624 N_Entry_Call_Alternative,
7625 N_Entry_Index_Specification,
7626 N_Exception_Declaration,
7627 N_Exception_Handler,
7628 N_Floating_Point_Definition,
7629 N_Formal_Decimal_Fixed_Point_Definition,
7630 N_Formal_Derived_Type_Definition,
7631 N_Formal_Discrete_Type_Definition,
7632 N_Formal_Floating_Point_Definition,
7633 N_Formal_Modular_Type_Definition,
7634 N_Formal_Ordinary_Fixed_Point_Definition,
7635 N_Formal_Package_Declaration,
7636 N_Formal_Private_Type_Definition,
7637 N_Formal_Signed_Integer_Type_Definition,
7638 N_Freeze_Entity,
7639 N_Generic_Association,
7640 N_Handled_Sequence_Of_Statements,
7641 N_Index_Or_Discriminant_Constraint,
7642 N_Itype_Reference,
7643 N_Label,
7644 N_Modular_Type_Definition,
7645 N_Number_Declaration,
7646 N_Ordinary_Fixed_Point_Definition,
7647 N_Others_Choice,
7648 N_Package_Specification,
7649 N_Parameter_Association,
7650 N_Parameter_Specification,
7651 N_Pragma,
7652 N_Protected_Definition,
7653 N_Range_Constraint,
7654 N_Real_Range_Specification,
7655 N_Record_Definition,
7656 N_Signed_Integer_Type_Definition,
7657 N_Single_Protected_Declaration,
7658 N_Subunit,
7659 N_Task_Definition,
7660 N_Triggering_Alternative,
7661 N_Use_Type_Clause,
7662 N_Validate_Unchecked_Conversion,
7663 N_Variant,
7664 N_Variant_Part,
7665 N_With_Clause,
7666 N_Unused_At_End);
7667
7668 for Node_Kind'Size use 8;
7669 -- The data structures in Atree assume this!
7670
7671 ----------------------------
7672 -- Node Class Definitions --
7673 ----------------------------
7674
7675 subtype N_Access_To_Subprogram_Definition is Node_Kind range
7676 N_Access_Function_Definition ..
7677 N_Access_Procedure_Definition;
7678
7679 subtype N_Array_Type_Definition is Node_Kind range
7680 N_Constrained_Array_Definition ..
7681 N_Unconstrained_Array_Definition;
7682
7683 subtype N_Binary_Op is Node_Kind range
7684 N_Op_Add ..
7685 N_Op_Shift_Right_Arithmetic;
7686
7687 subtype N_Body_Stub is Node_Kind range
7688 N_Package_Body_Stub ..
7689 N_Task_Body_Stub;
7690
7691 subtype N_Declaration is Node_Kind range
7692 N_Component_Declaration ..
7693 N_Procedure_Specification;
7694 -- Note: this includes all constructs normally thought of as declarations
7695 -- except those which are separately grouped as later declarations.
7696
7697 subtype N_Delay_Statement is Node_Kind range
7698 N_Delay_Relative_Statement ..
7699 N_Delay_Until_Statement;
7700
7701 subtype N_Direct_Name is Node_Kind range
7702 N_Identifier ..
7703 N_Character_Literal;
7704
7705 subtype N_Entity is Node_Kind range
7706 N_Defining_Character_Literal ..
7707 N_Defining_Operator_Symbol;
7708
7709 subtype N_Formal_Subprogram_Declaration is Node_Kind range
7710 N_Formal_Abstract_Subprogram_Declaration ..
7711 N_Formal_Concrete_Subprogram_Declaration;
7712
7713 subtype N_Generic_Declaration is Node_Kind range
7714 N_Generic_Package_Declaration ..
7715 N_Generic_Subprogram_Declaration;
7716
7717 subtype N_Generic_Instantiation is Node_Kind range
7718 N_Function_Instantiation ..
7719 N_Package_Instantiation;
7720
7721 subtype N_Generic_Renaming_Declaration is Node_Kind range
7722 N_Generic_Function_Renaming_Declaration ..
7723 N_Generic_Procedure_Renaming_Declaration;
7724
7725 subtype N_Has_Chars is Node_Kind range
7726 N_Attribute_Definition_Clause ..
7727 N_Op_Plus;
7728
7729 subtype N_Has_Entity is Node_Kind range
7730 N_Expanded_Name ..
7731 N_Attribute_Reference;
7732 -- Nodes that have Entity fields
7733 -- Warning: DOES NOT INCLUDE N_Freeze_Entity, N_Aspect_Specification,
7734 -- or N_Attribute_Definition_Clause.
7735
7736 subtype N_Has_Etype is Node_Kind range
7737 N_Error ..
7738 N_Subtype_Indication;
7739
7740 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
7741 N_Op_Divide ..
7742 N_Op_Rem;
7743
7744 subtype N_Multiplying_Operator is Node_Kind range
7745 N_Op_Divide ..
7746 N_Op_Rem;
7747
7748 subtype N_Later_Decl_Item is Node_Kind range
7749 N_Task_Type_Declaration ..
7750 N_Generic_Subprogram_Declaration;
7751 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
7752 -- only those items which can appear as later declarative items. This also
7753 -- includes N_Implicit_Label_Declaration which is not specifically in the
7754 -- grammar but may appear as a valid later declarative items. It does NOT
7755 -- include N_Pragma which can also appear among later declarative items.
7756 -- It does however include N_Protected_Body, which is a bit peculiar, but
7757 -- harmless since this cannot appear in Ada 83 mode anyway.
7758
7759 subtype N_Membership_Test is Node_Kind range
7760 N_In ..
7761 N_Not_In;
7762
7763 subtype N_Op is Node_Kind range
7764 N_Op_Add ..
7765 N_Op_Plus;
7766
7767 subtype N_Op_Boolean is Node_Kind range
7768 N_Op_And ..
7769 N_Op_Xor;
7770 -- Binary operators which take operands of a boolean type, and yield
7771 -- a result of a boolean type.
7772
7773 subtype N_Op_Compare is Node_Kind range
7774 N_Op_Eq ..
7775 N_Op_Ne;
7776
7777 subtype N_Op_Shift is Node_Kind range
7778 N_Op_Rotate_Left ..
7779 N_Op_Shift_Right_Arithmetic;
7780
7781 subtype N_Proper_Body is Node_Kind range
7782 N_Package_Body ..
7783 N_Task_Body;
7784
7785 subtype N_Push_xxx_Label is Node_Kind range
7786 N_Push_Constraint_Error_Label ..
7787 N_Push_Storage_Error_Label;
7788
7789 subtype N_Pop_xxx_Label is Node_Kind range
7790 N_Pop_Constraint_Error_Label ..
7791 N_Pop_Storage_Error_Label;
7792
7793 subtype N_Push_Pop_xxx_Label is Node_Kind range
7794 N_Push_Constraint_Error_Label ..
7795 N_Pop_Storage_Error_Label;
7796
7797 subtype N_Raise_xxx_Error is Node_Kind range
7798 N_Raise_Constraint_Error ..
7799 N_Raise_Storage_Error;
7800
7801 subtype N_Renaming_Declaration is Node_Kind range
7802 N_Exception_Renaming_Declaration ..
7803 N_Generic_Procedure_Renaming_Declaration;
7804
7805 subtype N_Representation_Clause is Node_Kind range
7806 N_At_Clause ..
7807 N_Attribute_Definition_Clause;
7808
7809 subtype N_Short_Circuit is Node_Kind range
7810 N_And_Then ..
7811 N_Or_Else;
7812
7813 subtype N_SCIL_Node is Node_Kind range
7814 N_SCIL_Dispatch_Table_Tag_Init ..
7815 N_SCIL_Membership_Test;
7816
7817 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
7818 N_Abort_Statement ..
7819 N_If_Statement;
7820 -- Note that this includes all statement types except for the cases of the
7821 -- N_Procedure_Call_Statement which is considered to be a subexpression
7822 -- (since overloading is possible, so it needs to go through the normal
7823 -- overloading resolution for expressions).
7824
7825 subtype N_Subprogram_Instantiation is Node_Kind range
7826 N_Function_Instantiation ..
7827 N_Procedure_Instantiation;
7828
7829 subtype N_Has_Condition is Node_Kind range
7830 N_Exit_Statement ..
7831 N_Terminate_Alternative;
7832 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
7833
7834 subtype N_Subexpr is Node_Kind range
7835 N_Expanded_Name ..
7836 N_Unchecked_Type_Conversion;
7837 -- Nodes with expression fields
7838
7839 subtype N_Subprogram_Specification is Node_Kind range
7840 N_Function_Specification ..
7841 N_Procedure_Specification;
7842
7843 subtype N_Unary_Op is Node_Kind range
7844 N_Op_Abs ..
7845 N_Op_Plus;
7846
7847 subtype N_Unit_Body is Node_Kind range
7848 N_Package_Body ..
7849 N_Subprogram_Body;
7850
7851 ---------------------------
7852 -- Node Access Functions --
7853 ---------------------------
7854
7855 -- The following functions return the contents of the indicated field of
7856 -- the node referenced by the argument, which is a Node_Id. They provide
7857 -- logical access to fields in the node which could be accessed using the
7858 -- Atree.Unchecked_Access package, but the idea is always to use these
7859 -- higher level routines which preserve strong typing. In debug mode,
7860 -- these routines check that they are being applied to an appropriate
7861 -- node, as well as checking that the node is in range.
7862
7863 function ABE_Is_Certain
7864 (N : Node_Id) return Boolean; -- Flag18
7865
7866 function Abort_Present
7867 (N : Node_Id) return Boolean; -- Flag15
7868
7869 function Abortable_Part
7870 (N : Node_Id) return Node_Id; -- Node2
7871
7872 function Abstract_Present
7873 (N : Node_Id) return Boolean; -- Flag4
7874
7875 function Accept_Handler_Records
7876 (N : Node_Id) return List_Id; -- List5
7877
7878 function Accept_Statement
7879 (N : Node_Id) return Node_Id; -- Node2
7880
7881 function Access_Definition
7882 (N : Node_Id) return Node_Id; -- Node3
7883
7884 function Access_To_Subprogram_Definition
7885 (N : Node_Id) return Node_Id; -- Node3
7886
7887 function Access_Types_To_Process
7888 (N : Node_Id) return Elist_Id; -- Elist2
7889
7890 function Actions
7891 (N : Node_Id) return List_Id; -- List1
7892
7893 function Activation_Chain_Entity
7894 (N : Node_Id) return Node_Id; -- Node3
7895
7896 function Acts_As_Spec
7897 (N : Node_Id) return Boolean; -- Flag4
7898
7899 function Actual_Designated_Subtype
7900 (N : Node_Id) return Node_Id; -- Node4
7901
7902 function Address_Warning_Posted
7903 (N : Node_Id) return Boolean; -- Flag18
7904
7905 function Aggregate_Bounds
7906 (N : Node_Id) return Node_Id; -- Node3
7907
7908 function Aliased_Present
7909 (N : Node_Id) return Boolean; -- Flag4
7910
7911 function All_Others
7912 (N : Node_Id) return Boolean; -- Flag11
7913
7914 function All_Present
7915 (N : Node_Id) return Boolean; -- Flag15
7916
7917 function Alternatives
7918 (N : Node_Id) return List_Id; -- List4
7919
7920 function Ancestor_Part
7921 (N : Node_Id) return Node_Id; -- Node3
7922
7923 function Array_Aggregate
7924 (N : Node_Id) return Node_Id; -- Node3
7925
7926 function Aspect_Cancel
7927 (N : Node_Id) return Boolean; -- Flag11
7928
7929 function Aspect_Rep_Item
7930 (N : Node_Id) return Node_Id; -- Node2
7931
7932 function Assignment_OK
7933 (N : Node_Id) return Boolean; -- Flag15
7934
7935 function Associated_Node
7936 (N : Node_Id) return Node_Id; -- Node4
7937
7938 function At_End_Proc
7939 (N : Node_Id) return Node_Id; -- Node1
7940
7941 function Attribute_Name
7942 (N : Node_Id) return Name_Id; -- Name2
7943
7944 function Aux_Decls_Node
7945 (N : Node_Id) return Node_Id; -- Node5
7946
7947 function Backwards_OK
7948 (N : Node_Id) return Boolean; -- Flag6
7949
7950 function Bad_Is_Detected
7951 (N : Node_Id) return Boolean; -- Flag15
7952
7953 function By_Ref
7954 (N : Node_Id) return Boolean; -- Flag5
7955
7956 function Body_Required
7957 (N : Node_Id) return Boolean; -- Flag13
7958
7959 function Body_To_Inline
7960 (N : Node_Id) return Node_Id; -- Node3
7961
7962 function Box_Present
7963 (N : Node_Id) return Boolean; -- Flag15
7964
7965 function Char_Literal_Value
7966 (N : Node_Id) return Uint; -- Uint2
7967
7968 function Chars
7969 (N : Node_Id) return Name_Id; -- Name1
7970
7971 function Check_Address_Alignment
7972 (N : Node_Id) return Boolean; -- Flag11
7973
7974 function Choice_Parameter
7975 (N : Node_Id) return Node_Id; -- Node2
7976
7977 function Choices
7978 (N : Node_Id) return List_Id; -- List1
7979
7980 function Class_Present
7981 (N : Node_Id) return Boolean; -- Flag6
7982
7983 function Coextensions
7984 (N : Node_Id) return Elist_Id; -- Elist4
7985
7986 function Comes_From_Extended_Return_Statement
7987 (N : Node_Id) return Boolean; -- Flag18
7988
7989 function Compile_Time_Known_Aggregate
7990 (N : Node_Id) return Boolean; -- Flag18
7991
7992 function Component_Associations
7993 (N : Node_Id) return List_Id; -- List2
7994
7995 function Component_Clauses
7996 (N : Node_Id) return List_Id; -- List3
7997
7998 function Component_Definition
7999 (N : Node_Id) return Node_Id; -- Node4
8000
8001 function Component_Items
8002 (N : Node_Id) return List_Id; -- List3
8003
8004 function Component_List
8005 (N : Node_Id) return Node_Id; -- Node1
8006
8007 function Component_Name
8008 (N : Node_Id) return Node_Id; -- Node1
8009
8010 function Componentwise_Assignment
8011 (N : Node_Id) return Boolean; -- Flag14
8012
8013 function Condition
8014 (N : Node_Id) return Node_Id; -- Node1
8015
8016 function Condition_Actions
8017 (N : Node_Id) return List_Id; -- List3
8018
8019 function Config_Pragmas
8020 (N : Node_Id) return List_Id; -- List4
8021
8022 function Constant_Present
8023 (N : Node_Id) return Boolean; -- Flag17
8024
8025 function Constraint
8026 (N : Node_Id) return Node_Id; -- Node3
8027
8028 function Constraints
8029 (N : Node_Id) return List_Id; -- List1
8030
8031 function Context_Installed
8032 (N : Node_Id) return Boolean; -- Flag13
8033
8034 function Context_Pending
8035 (N : Node_Id) return Boolean; -- Flag16
8036
8037 function Context_Items
8038 (N : Node_Id) return List_Id; -- List1
8039
8040 function Controlling_Argument
8041 (N : Node_Id) return Node_Id; -- Node1
8042
8043 function Conversion_OK
8044 (N : Node_Id) return Boolean; -- Flag14
8045
8046 function Corresponding_Body
8047 (N : Node_Id) return Node_Id; -- Node5
8048
8049 function Corresponding_Formal_Spec
8050 (N : Node_Id) return Node_Id; -- Node3
8051
8052 function Corresponding_Generic_Association
8053 (N : Node_Id) return Node_Id; -- Node5
8054
8055 function Corresponding_Integer_Value
8056 (N : Node_Id) return Uint; -- Uint4
8057
8058 function Corresponding_Spec
8059 (N : Node_Id) return Node_Id; -- Node5
8060
8061 function Corresponding_Stub
8062 (N : Node_Id) return Node_Id; -- Node3
8063
8064 function Dcheck_Function
8065 (N : Node_Id) return Entity_Id; -- Node5
8066
8067 function Debug_Statement
8068 (N : Node_Id) return Node_Id; -- Node3
8069
8070 function Declarations
8071 (N : Node_Id) return List_Id; -- List2
8072
8073 function Default_Expression
8074 (N : Node_Id) return Node_Id; -- Node5
8075
8076 function Default_Name
8077 (N : Node_Id) return Node_Id; -- Node2
8078
8079 function Defining_Identifier
8080 (N : Node_Id) return Entity_Id; -- Node1
8081
8082 function Defining_Unit_Name
8083 (N : Node_Id) return Node_Id; -- Node1
8084
8085 function Delay_Alternative
8086 (N : Node_Id) return Node_Id; -- Node4
8087
8088 function Delay_Statement
8089 (N : Node_Id) return Node_Id; -- Node2
8090
8091 function Delta_Expression
8092 (N : Node_Id) return Node_Id; -- Node3
8093
8094 function Digits_Expression
8095 (N : Node_Id) return Node_Id; -- Node2
8096
8097 function Discr_Check_Funcs_Built
8098 (N : Node_Id) return Boolean; -- Flag11
8099
8100 function Discrete_Choices
8101 (N : Node_Id) return List_Id; -- List4
8102
8103 function Discrete_Range
8104 (N : Node_Id) return Node_Id; -- Node4
8105
8106 function Discrete_Subtype_Definition
8107 (N : Node_Id) return Node_Id; -- Node4
8108
8109 function Discrete_Subtype_Definitions
8110 (N : Node_Id) return List_Id; -- List2
8111
8112 function Discriminant_Specifications
8113 (N : Node_Id) return List_Id; -- List4
8114
8115 function Discriminant_Type
8116 (N : Node_Id) return Node_Id; -- Node5
8117
8118 function Do_Accessibility_Check
8119 (N : Node_Id) return Boolean; -- Flag13
8120
8121 function Do_Discriminant_Check
8122 (N : Node_Id) return Boolean; -- Flag13
8123
8124 function Do_Division_Check
8125 (N : Node_Id) return Boolean; -- Flag13
8126
8127 function Do_Length_Check
8128 (N : Node_Id) return Boolean; -- Flag4
8129
8130 function Do_Overflow_Check
8131 (N : Node_Id) return Boolean; -- Flag17
8132
8133 function Do_Range_Check
8134 (N : Node_Id) return Boolean; -- Flag9
8135
8136 function Do_Storage_Check
8137 (N : Node_Id) return Boolean; -- Flag17
8138
8139 function Do_Tag_Check
8140 (N : Node_Id) return Boolean; -- Flag13
8141
8142 function Elaborate_All_Desirable
8143 (N : Node_Id) return Boolean; -- Flag9
8144
8145 function Elaborate_All_Present
8146 (N : Node_Id) return Boolean; -- Flag14
8147
8148 function Elaborate_Desirable
8149 (N : Node_Id) return Boolean; -- Flag11
8150
8151 function Elaborate_Present
8152 (N : Node_Id) return Boolean; -- Flag4
8153
8154 function Elaboration_Boolean
8155 (N : Node_Id) return Node_Id; -- Node2
8156
8157 function Else_Actions
8158 (N : Node_Id) return List_Id; -- List3
8159
8160 function Else_Statements
8161 (N : Node_Id) return List_Id; -- List4
8162
8163 function Elsif_Parts
8164 (N : Node_Id) return List_Id; -- List3
8165
8166 function Enclosing_Variant
8167 (N : Node_Id) return Node_Id; -- Node2
8168
8169 function End_Label
8170 (N : Node_Id) return Node_Id; -- Node4
8171
8172 function End_Span
8173 (N : Node_Id) return Uint; -- Uint5
8174
8175 function Entity
8176 (N : Node_Id) return Node_Id; -- Node4
8177
8178 function Entity_Or_Associated_Node
8179 (N : Node_Id) return Node_Id; -- Node4
8180
8181 function Entry_Body_Formal_Part
8182 (N : Node_Id) return Node_Id; -- Node5
8183
8184 function Entry_Call_Alternative
8185 (N : Node_Id) return Node_Id; -- Node1
8186
8187 function Entry_Call_Statement
8188 (N : Node_Id) return Node_Id; -- Node1
8189
8190 function Entry_Direct_Name
8191 (N : Node_Id) return Node_Id; -- Node1
8192
8193 function Entry_Index
8194 (N : Node_Id) return Node_Id; -- Node5
8195
8196 function Entry_Index_Specification
8197 (N : Node_Id) return Node_Id; -- Node4
8198
8199 function Etype
8200 (N : Node_Id) return Node_Id; -- Node5
8201
8202 function Exception_Choices
8203 (N : Node_Id) return List_Id; -- List4
8204
8205 function Exception_Handlers
8206 (N : Node_Id) return List_Id; -- List5
8207
8208 function Exception_Junk
8209 (N : Node_Id) return Boolean; -- Flag8
8210
8211 function Exception_Label
8212 (N : Node_Id) return Node_Id; -- Node5
8213
8214 function Explicit_Actual_Parameter
8215 (N : Node_Id) return Node_Id; -- Node3
8216
8217 function Expansion_Delayed
8218 (N : Node_Id) return Boolean; -- Flag11
8219
8220 function Explicit_Generic_Actual_Parameter
8221 (N : Node_Id) return Node_Id; -- Node1
8222
8223 function Expression
8224 (N : Node_Id) return Node_Id; -- Node3
8225
8226 function Expressions
8227 (N : Node_Id) return List_Id; -- List1
8228
8229 function First_Bit
8230 (N : Node_Id) return Node_Id; -- Node3
8231
8232 function First_Inlined_Subprogram
8233 (N : Node_Id) return Entity_Id; -- Node3
8234
8235 function First_Name
8236 (N : Node_Id) return Boolean; -- Flag5
8237
8238 function First_Named_Actual
8239 (N : Node_Id) return Node_Id; -- Node4
8240
8241 function First_Real_Statement
8242 (N : Node_Id) return Node_Id; -- Node2
8243
8244 function First_Subtype_Link
8245 (N : Node_Id) return Entity_Id; -- Node5
8246
8247 function Float_Truncate
8248 (N : Node_Id) return Boolean; -- Flag11
8249
8250 function Formal_Type_Definition
8251 (N : Node_Id) return Node_Id; -- Node3
8252
8253 function Forwards_OK
8254 (N : Node_Id) return Boolean; -- Flag5
8255
8256 function From_Aspect_Specification
8257 (N : Node_Id) return Boolean; -- Flag13
8258
8259 function From_At_End
8260 (N : Node_Id) return Boolean; -- Flag4
8261
8262 function From_At_Mod
8263 (N : Node_Id) return Boolean; -- Flag4
8264
8265 function From_Default
8266 (N : Node_Id) return Boolean; -- Flag6
8267
8268 function Generic_Associations
8269 (N : Node_Id) return List_Id; -- List3
8270
8271 function Generic_Formal_Declarations
8272 (N : Node_Id) return List_Id; -- List2
8273
8274 function Generic_Parent
8275 (N : Node_Id) return Node_Id; -- Node5
8276
8277 function Generic_Parent_Type
8278 (N : Node_Id) return Node_Id; -- Node4
8279
8280 function Handled_Statement_Sequence
8281 (N : Node_Id) return Node_Id; -- Node4
8282
8283 function Handler_List_Entry
8284 (N : Node_Id) return Node_Id; -- Node2
8285
8286 function Has_Created_Identifier
8287 (N : Node_Id) return Boolean; -- Flag15
8288
8289 function Has_Dynamic_Length_Check
8290 (N : Node_Id) return Boolean; -- Flag10
8291
8292 function Has_Dynamic_Range_Check
8293 (N : Node_Id) return Boolean; -- Flag12
8294
8295 function Has_Init_Expression
8296 (N : Node_Id) return Boolean; -- Flag14
8297
8298 function Has_Local_Raise
8299 (N : Node_Id) return Boolean; -- Flag8
8300
8301 function Has_No_Elaboration_Code
8302 (N : Node_Id) return Boolean; -- Flag17
8303
8304 function Has_Pragma_Priority
8305 (N : Node_Id) return Boolean; -- Flag6
8306
8307 function Has_Pragma_Suppress_All
8308 (N : Node_Id) return Boolean; -- Flag14
8309
8310 function Has_Private_View
8311 (N : Node_Id) return Boolean; -- Flag11
8312
8313 function Has_Relative_Deadline_Pragma
8314 (N : Node_Id) return Boolean; -- Flag9
8315
8316 function Has_Self_Reference
8317 (N : Node_Id) return Boolean; -- Flag13
8318
8319 function Has_Storage_Size_Pragma
8320 (N : Node_Id) return Boolean; -- Flag5
8321
8322 function Has_Task_Info_Pragma
8323 (N : Node_Id) return Boolean; -- Flag7
8324
8325 function Has_Task_Name_Pragma
8326 (N : Node_Id) return Boolean; -- Flag8
8327
8328 function Has_Wide_Character
8329 (N : Node_Id) return Boolean; -- Flag11
8330
8331 function Has_Wide_Wide_Character
8332 (N : Node_Id) return Boolean; -- Flag13
8333
8334 function Hidden_By_Use_Clause
8335 (N : Node_Id) return Elist_Id; -- Elist4
8336
8337 function High_Bound
8338 (N : Node_Id) return Node_Id; -- Node2
8339
8340 function Identifier
8341 (N : Node_Id) return Node_Id; -- Node1
8342
8343 function Interface_List
8344 (N : Node_Id) return List_Id; -- List2
8345
8346 function Interface_Present
8347 (N : Node_Id) return Boolean; -- Flag16
8348
8349 function Implicit_With
8350 (N : Node_Id) return Boolean; -- Flag16
8351
8352 function Import_Interface_Present
8353 (N : Node_Id) return Boolean; -- Flag16
8354
8355 function In_Present
8356 (N : Node_Id) return Boolean; -- Flag15
8357
8358 function Includes_Infinities
8359 (N : Node_Id) return Boolean; -- Flag11
8360
8361 function Inherited_Discriminant
8362 (N : Node_Id) return Boolean; -- Flag13
8363
8364 function Instance_Spec
8365 (N : Node_Id) return Node_Id; -- Node5
8366
8367 function Intval
8368 (N : Node_Id) return Uint; -- Uint3
8369
8370 function Is_Accessibility_Actual
8371 (N : Node_Id) return Boolean; -- Flag13
8372
8373 function Is_Asynchronous_Call_Block
8374 (N : Node_Id) return Boolean; -- Flag7
8375
8376 function Is_Component_Left_Opnd
8377 (N : Node_Id) return Boolean; -- Flag13
8378
8379 function Is_Component_Right_Opnd
8380 (N : Node_Id) return Boolean; -- Flag14
8381
8382 function Is_Controlling_Actual
8383 (N : Node_Id) return Boolean; -- Flag16
8384
8385 function Is_Delayed_Aspect
8386 (N : Node_Id) return Boolean; -- Flag14
8387
8388 function Is_Dynamic_Coextension
8389 (N : Node_Id) return Boolean; -- Flag18
8390
8391 function Is_Elsif
8392 (N : Node_Id) return Boolean; -- Flag13
8393
8394 function Is_Entry_Barrier_Function
8395 (N : Node_Id) return Boolean; -- Flag8
8396
8397 function Is_Expanded_Build_In_Place_Call
8398 (N : Node_Id) return Boolean; -- Flag11
8399
8400 function Is_Folded_In_Parser
8401 (N : Node_Id) return Boolean; -- Flag4
8402
8403 function Is_In_Discriminant_Check
8404 (N : Node_Id) return Boolean; -- Flag11
8405
8406 function Is_Machine_Number
8407 (N : Node_Id) return Boolean; -- Flag11
8408
8409 function Is_Null_Loop
8410 (N : Node_Id) return Boolean; -- Flag16
8411
8412 function Is_Overloaded
8413 (N : Node_Id) return Boolean; -- Flag5
8414
8415 function Is_Power_Of_2_For_Shift
8416 (N : Node_Id) return Boolean; -- Flag13
8417
8418 function Is_Protected_Subprogram_Body
8419 (N : Node_Id) return Boolean; -- Flag7
8420
8421 function Is_Static_Coextension
8422 (N : Node_Id) return Boolean; -- Flag14
8423
8424 function Is_Static_Expression
8425 (N : Node_Id) return Boolean; -- Flag6
8426
8427 function Is_Subprogram_Descriptor
8428 (N : Node_Id) return Boolean; -- Flag16
8429
8430 function Is_Task_Allocation_Block
8431 (N : Node_Id) return Boolean; -- Flag6
8432
8433 function Is_Task_Master
8434 (N : Node_Id) return Boolean; -- Flag5
8435
8436 function Iteration_Scheme
8437 (N : Node_Id) return Node_Id; -- Node2
8438
8439 function Itype
8440 (N : Node_Id) return Entity_Id; -- Node1
8441
8442 function Kill_Range_Check
8443 (N : Node_Id) return Boolean; -- Flag11
8444
8445 function Label_Construct
8446 (N : Node_Id) return Node_Id; -- Node2
8447
8448 function Left_Opnd
8449 (N : Node_Id) return Node_Id; -- Node2
8450
8451 function Last_Bit
8452 (N : Node_Id) return Node_Id; -- Node4
8453
8454 function Last_Name
8455 (N : Node_Id) return Boolean; -- Flag6
8456
8457 function Library_Unit
8458 (N : Node_Id) return Node_Id; -- Node4
8459
8460 function Limited_View_Installed
8461 (N : Node_Id) return Boolean; -- Flag18
8462
8463 function Limited_Present
8464 (N : Node_Id) return Boolean; -- Flag17
8465
8466 function Literals
8467 (N : Node_Id) return List_Id; -- List1
8468
8469 function Local_Raise_Not_OK
8470 (N : Node_Id) return Boolean; -- Flag7
8471
8472 function Local_Raise_Statements
8473 (N : Node_Id) return Elist_Id; -- Elist1
8474
8475 function Loop_Actions
8476 (N : Node_Id) return List_Id; -- List2
8477
8478 function Loop_Parameter_Specification
8479 (N : Node_Id) return Node_Id; -- Node4
8480
8481 function Low_Bound
8482 (N : Node_Id) return Node_Id; -- Node1
8483
8484 function Mod_Clause
8485 (N : Node_Id) return Node_Id; -- Node2
8486
8487 function More_Ids
8488 (N : Node_Id) return Boolean; -- Flag5
8489
8490 function Must_Be_Byte_Aligned
8491 (N : Node_Id) return Boolean; -- Flag14
8492
8493 function Must_Not_Freeze
8494 (N : Node_Id) return Boolean; -- Flag8
8495
8496 function Must_Not_Override
8497 (N : Node_Id) return Boolean; -- Flag15
8498
8499 function Must_Override
8500 (N : Node_Id) return Boolean; -- Flag14
8501
8502 function Name
8503 (N : Node_Id) return Node_Id; -- Node2
8504
8505 function Names
8506 (N : Node_Id) return List_Id; -- List2
8507
8508 function Next_Entity
8509 (N : Node_Id) return Node_Id; -- Node2
8510
8511 function Next_Exit_Statement
8512 (N : Node_Id) return Node_Id; -- Node3
8513
8514 function Next_Implicit_With
8515 (N : Node_Id) return Node_Id; -- Node3
8516
8517 function Next_Named_Actual
8518 (N : Node_Id) return Node_Id; -- Node4
8519
8520 function Next_Pragma
8521 (N : Node_Id) return Node_Id; -- Node1
8522
8523 function Next_Rep_Item
8524 (N : Node_Id) return Node_Id; -- Node5
8525
8526 function Next_Use_Clause
8527 (N : Node_Id) return Node_Id; -- Node3
8528
8529 function No_Ctrl_Actions
8530 (N : Node_Id) return Boolean; -- Flag7
8531
8532 function No_Elaboration_Check
8533 (N : Node_Id) return Boolean; -- Flag14
8534
8535 function No_Entities_Ref_In_Spec
8536 (N : Node_Id) return Boolean; -- Flag8
8537
8538 function No_Initialization
8539 (N : Node_Id) return Boolean; -- Flag13
8540
8541 function No_Truncation
8542 (N : Node_Id) return Boolean; -- Flag17
8543
8544 function Null_Present
8545 (N : Node_Id) return Boolean; -- Flag13
8546
8547 function Null_Exclusion_Present
8548 (N : Node_Id) return Boolean; -- Flag11
8549
8550 function Null_Exclusion_In_Return_Present
8551 (N : Node_Id) return Boolean; -- Flag14
8552
8553 function Null_Record_Present
8554 (N : Node_Id) return Boolean; -- Flag17
8555
8556 function Object_Definition
8557 (N : Node_Id) return Node_Id; -- Node4
8558
8559 function Original_Discriminant
8560 (N : Node_Id) return Node_Id; -- Node2
8561
8562 function Original_Entity
8563 (N : Node_Id) return Entity_Id; -- Node2
8564
8565 function Others_Discrete_Choices
8566 (N : Node_Id) return List_Id; -- List1
8567
8568 function Out_Present
8569 (N : Node_Id) return Boolean; -- Flag17
8570
8571 function Parameter_Associations
8572 (N : Node_Id) return List_Id; -- List3
8573
8574 function Parameter_List_Truncated
8575 (N : Node_Id) return Boolean; -- Flag17
8576
8577 function Parameter_Specifications
8578 (N : Node_Id) return List_Id; -- List3
8579
8580 function Parameter_Type
8581 (N : Node_Id) return Node_Id; -- Node2
8582
8583 function Parent_Spec
8584 (N : Node_Id) return Node_Id; -- Node4
8585
8586 function Position
8587 (N : Node_Id) return Node_Id; -- Node2
8588
8589 function Pragma_Argument_Associations
8590 (N : Node_Id) return List_Id; -- List2
8591
8592 function Pragma_Enabled
8593 (N : Node_Id) return Boolean; -- Flag5
8594
8595 function Pragma_Identifier
8596 (N : Node_Id) return Node_Id; -- Node4
8597
8598 function Pragmas_After
8599 (N : Node_Id) return List_Id; -- List5
8600
8601 function Pragmas_Before
8602 (N : Node_Id) return List_Id; -- List4
8603
8604 function Prefix
8605 (N : Node_Id) return Node_Id; -- Node3
8606
8607 function Present_Expr
8608 (N : Node_Id) return Uint; -- Uint3
8609
8610 function Prev_Ids
8611 (N : Node_Id) return Boolean; -- Flag6
8612
8613 function Print_In_Hex
8614 (N : Node_Id) return Boolean; -- Flag13
8615
8616 function Private_Declarations
8617 (N : Node_Id) return List_Id; -- List3
8618
8619 function Private_Present
8620 (N : Node_Id) return Boolean; -- Flag15
8621
8622 function Procedure_To_Call
8623 (N : Node_Id) return Node_Id; -- Node2
8624
8625 function Proper_Body
8626 (N : Node_Id) return Node_Id; -- Node1
8627
8628 function Protected_Definition
8629 (N : Node_Id) return Node_Id; -- Node3
8630
8631 function Protected_Present
8632 (N : Node_Id) return Boolean; -- Flag6
8633
8634 function Raises_Constraint_Error
8635 (N : Node_Id) return Boolean; -- Flag7
8636
8637 function Range_Constraint
8638 (N : Node_Id) return Node_Id; -- Node4
8639
8640 function Range_Expression
8641 (N : Node_Id) return Node_Id; -- Node4
8642
8643 function Real_Range_Specification
8644 (N : Node_Id) return Node_Id; -- Node4
8645
8646 function Realval
8647 (N : Node_Id) return Ureal; -- Ureal3
8648
8649 function Reason
8650 (N : Node_Id) return Uint; -- Uint3
8651
8652 function Record_Extension_Part
8653 (N : Node_Id) return Node_Id; -- Node3
8654
8655 function Redundant_Use
8656 (N : Node_Id) return Boolean; -- Flag13
8657
8658 function Renaming_Exception
8659 (N : Node_Id) return Node_Id; -- Node2
8660
8661 function Result_Definition
8662 (N : Node_Id) return Node_Id; -- Node4
8663
8664 function Return_Object_Declarations
8665 (N : Node_Id) return List_Id; -- List3
8666
8667 function Return_Statement_Entity
8668 (N : Node_Id) return Node_Id; -- Node5
8669
8670 function Reverse_Present
8671 (N : Node_Id) return Boolean; -- Flag15
8672
8673 function Right_Opnd
8674 (N : Node_Id) return Node_Id; -- Node3
8675
8676 function Rounded_Result
8677 (N : Node_Id) return Boolean; -- Flag18
8678
8679 function SCIL_Controlling_Tag
8680 (N : Node_Id) return Node_Id; -- Node5
8681
8682 function SCIL_Entity
8683 (N : Node_Id) return Node_Id; -- Node4
8684
8685 function SCIL_Tag_Value
8686 (N : Node_Id) return Node_Id; -- Node5
8687
8688 function SCIL_Target_Prim
8689 (N : Node_Id) return Node_Id; -- Node2
8690
8691 function Scope
8692 (N : Node_Id) return Node_Id; -- Node3
8693
8694 function Select_Alternatives
8695 (N : Node_Id) return List_Id; -- List1
8696
8697 function Selector_Name
8698 (N : Node_Id) return Node_Id; -- Node2
8699
8700 function Selector_Names
8701 (N : Node_Id) return List_Id; -- List1
8702
8703 function Shift_Count_OK
8704 (N : Node_Id) return Boolean; -- Flag4
8705
8706 function Source_Type
8707 (N : Node_Id) return Entity_Id; -- Node1
8708
8709 function Specification
8710 (N : Node_Id) return Node_Id; -- Node1
8711
8712 function Statements
8713 (N : Node_Id) return List_Id; -- List3
8714
8715 function Static_Processing_OK
8716 (N : Node_Id) return Boolean; -- Flag4
8717
8718 function Storage_Pool
8719 (N : Node_Id) return Node_Id; -- Node1
8720
8721 function Strval
8722 (N : Node_Id) return String_Id; -- Str3
8723
8724 function Subtype_Indication
8725 (N : Node_Id) return Node_Id; -- Node5
8726
8727 function Subtype_Mark
8728 (N : Node_Id) return Node_Id; -- Node4
8729
8730 function Subtype_Marks
8731 (N : Node_Id) return List_Id; -- List2
8732
8733 function Suppress_Loop_Warnings
8734 (N : Node_Id) return Boolean; -- Flag17
8735
8736 function Synchronized_Present
8737 (N : Node_Id) return Boolean; -- Flag7
8738
8739 function Tagged_Present
8740 (N : Node_Id) return Boolean; -- Flag15
8741
8742 function Target_Type
8743 (N : Node_Id) return Entity_Id; -- Node2
8744
8745 function Task_Definition
8746 (N : Node_Id) return Node_Id; -- Node3
8747
8748 function Task_Present
8749 (N : Node_Id) return Boolean; -- Flag5
8750
8751 function Then_Actions
8752 (N : Node_Id) return List_Id; -- List2
8753
8754 function Then_Statements
8755 (N : Node_Id) return List_Id; -- List2
8756
8757 function Treat_Fixed_As_Integer
8758 (N : Node_Id) return Boolean; -- Flag14
8759
8760 function Triggering_Alternative
8761 (N : Node_Id) return Node_Id; -- Node1
8762
8763 function Triggering_Statement
8764 (N : Node_Id) return Node_Id; -- Node1
8765
8766 function TSS_Elist
8767 (N : Node_Id) return Elist_Id; -- Elist3
8768
8769 function Type_Definition
8770 (N : Node_Id) return Node_Id; -- Node3
8771
8772 function Unit
8773 (N : Node_Id) return Node_Id; -- Node2
8774
8775 function Unknown_Discriminants_Present
8776 (N : Node_Id) return Boolean; -- Flag13
8777
8778 function Unreferenced_In_Spec
8779 (N : Node_Id) return Boolean; -- Flag7
8780
8781 function Variant_Part
8782 (N : Node_Id) return Node_Id; -- Node4
8783
8784 function Variants
8785 (N : Node_Id) return List_Id; -- List1
8786
8787 function Visible_Declarations
8788 (N : Node_Id) return List_Id; -- List2
8789
8790 function Was_Originally_Stub
8791 (N : Node_Id) return Boolean; -- Flag13
8792
8793 function Withed_Body
8794 (N : Node_Id) return Node_Id; -- Node1
8795
8796 function Zero_Cost_Handling
8797 (N : Node_Id) return Boolean; -- Flag5
8798
8799 -- End functions (note used by xsinfo utility program to end processing)
8800
8801 ----------------------------
8802 -- Node Update Procedures --
8803 ----------------------------
8804
8805 -- These are the corresponding node update routines, which again provide
8806 -- a high level logical access with type checking. In addition to setting
8807 -- the indicated field of the node N to the given Val, in the case of
8808 -- tree pointers (List1-4), the parent pointer of the Val node is set to
8809 -- point back to node N. This automates the setting of the parent pointer.
8810
8811 procedure Set_ABE_Is_Certain
8812 (N : Node_Id; Val : Boolean := True); -- Flag18
8813
8814 procedure Set_Abort_Present
8815 (N : Node_Id; Val : Boolean := True); -- Flag15
8816
8817 procedure Set_Abortable_Part
8818 (N : Node_Id; Val : Node_Id); -- Node2
8819
8820 procedure Set_Abstract_Present
8821 (N : Node_Id; Val : Boolean := True); -- Flag4
8822
8823 procedure Set_Accept_Handler_Records
8824 (N : Node_Id; Val : List_Id); -- List5
8825
8826 procedure Set_Accept_Statement
8827 (N : Node_Id; Val : Node_Id); -- Node2
8828
8829 procedure Set_Access_Definition
8830 (N : Node_Id; Val : Node_Id); -- Node3
8831
8832 procedure Set_Access_To_Subprogram_Definition
8833 (N : Node_Id; Val : Node_Id); -- Node3
8834
8835 procedure Set_Access_Types_To_Process
8836 (N : Node_Id; Val : Elist_Id); -- Elist2
8837
8838 procedure Set_Actions
8839 (N : Node_Id; Val : List_Id); -- List1
8840
8841 procedure Set_Activation_Chain_Entity
8842 (N : Node_Id; Val : Node_Id); -- Node3
8843
8844 procedure Set_Acts_As_Spec
8845 (N : Node_Id; Val : Boolean := True); -- Flag4
8846
8847 procedure Set_Actual_Designated_Subtype
8848 (N : Node_Id; Val : Node_Id); -- Node4
8849
8850 procedure Set_Address_Warning_Posted
8851 (N : Node_Id; Val : Boolean := True); -- Flag18
8852
8853 procedure Set_Aggregate_Bounds
8854 (N : Node_Id; Val : Node_Id); -- Node3
8855
8856 procedure Set_Aliased_Present
8857 (N : Node_Id; Val : Boolean := True); -- Flag4
8858
8859 procedure Set_All_Others
8860 (N : Node_Id; Val : Boolean := True); -- Flag11
8861
8862 procedure Set_All_Present
8863 (N : Node_Id; Val : Boolean := True); -- Flag15
8864
8865 procedure Set_Alternatives
8866 (N : Node_Id; Val : List_Id); -- List4
8867
8868 procedure Set_Ancestor_Part
8869 (N : Node_Id; Val : Node_Id); -- Node3
8870
8871 procedure Set_Array_Aggregate
8872 (N : Node_Id; Val : Node_Id); -- Node3
8873
8874 procedure Set_Aspect_Cancel
8875 (N : Node_Id; Val : Boolean := True); -- Flag11
8876
8877 procedure Set_Aspect_Rep_Item
8878 (N : Node_Id; Val : Node_Id); -- Node2
8879
8880 procedure Set_Assignment_OK
8881 (N : Node_Id; Val : Boolean := True); -- Flag15
8882
8883 procedure Set_Associated_Node
8884 (N : Node_Id; Val : Node_Id); -- Node4
8885
8886 procedure Set_Attribute_Name
8887 (N : Node_Id; Val : Name_Id); -- Name2
8888
8889 procedure Set_At_End_Proc
8890 (N : Node_Id; Val : Node_Id); -- Node1
8891
8892 procedure Set_Aux_Decls_Node
8893 (N : Node_Id; Val : Node_Id); -- Node5
8894
8895 procedure Set_Backwards_OK
8896 (N : Node_Id; Val : Boolean := True); -- Flag6
8897
8898 procedure Set_Bad_Is_Detected
8899 (N : Node_Id; Val : Boolean := True); -- Flag15
8900
8901 procedure Set_Body_Required
8902 (N : Node_Id; Val : Boolean := True); -- Flag13
8903
8904 procedure Set_Body_To_Inline
8905 (N : Node_Id; Val : Node_Id); -- Node3
8906
8907 procedure Set_Box_Present
8908 (N : Node_Id; Val : Boolean := True); -- Flag15
8909
8910 procedure Set_By_Ref
8911 (N : Node_Id; Val : Boolean := True); -- Flag5
8912
8913 procedure Set_Char_Literal_Value
8914 (N : Node_Id; Val : Uint); -- Uint2
8915
8916 procedure Set_Chars
8917 (N : Node_Id; Val : Name_Id); -- Name1
8918
8919 procedure Set_Check_Address_Alignment
8920 (N : Node_Id; Val : Boolean := True); -- Flag11
8921
8922 procedure Set_Choice_Parameter
8923 (N : Node_Id; Val : Node_Id); -- Node2
8924
8925 procedure Set_Choices
8926 (N : Node_Id; Val : List_Id); -- List1
8927
8928 procedure Set_Class_Present
8929 (N : Node_Id; Val : Boolean := True); -- Flag6
8930
8931 procedure Set_Coextensions
8932 (N : Node_Id; Val : Elist_Id); -- Elist4
8933
8934 procedure Set_Comes_From_Extended_Return_Statement
8935 (N : Node_Id; Val : Boolean := True); -- Flag18
8936
8937 procedure Set_Compile_Time_Known_Aggregate
8938 (N : Node_Id; Val : Boolean := True); -- Flag18
8939
8940 procedure Set_Component_Associations
8941 (N : Node_Id; Val : List_Id); -- List2
8942
8943 procedure Set_Component_Clauses
8944 (N : Node_Id; Val : List_Id); -- List3
8945
8946 procedure Set_Component_Definition
8947 (N : Node_Id; Val : Node_Id); -- Node4
8948
8949 procedure Set_Component_Items
8950 (N : Node_Id; Val : List_Id); -- List3
8951
8952 procedure Set_Component_List
8953 (N : Node_Id; Val : Node_Id); -- Node1
8954
8955 procedure Set_Component_Name
8956 (N : Node_Id; Val : Node_Id); -- Node1
8957
8958 procedure Set_Componentwise_Assignment
8959 (N : Node_Id; Val : Boolean := True); -- Flag14
8960
8961 procedure Set_Condition
8962 (N : Node_Id; Val : Node_Id); -- Node1
8963
8964 procedure Set_Condition_Actions
8965 (N : Node_Id; Val : List_Id); -- List3
8966
8967 procedure Set_Config_Pragmas
8968 (N : Node_Id; Val : List_Id); -- List4
8969
8970 procedure Set_Constant_Present
8971 (N : Node_Id; Val : Boolean := True); -- Flag17
8972
8973 procedure Set_Constraint
8974 (N : Node_Id; Val : Node_Id); -- Node3
8975
8976 procedure Set_Constraints
8977 (N : Node_Id; Val : List_Id); -- List1
8978
8979 procedure Set_Context_Installed
8980 (N : Node_Id; Val : Boolean := True); -- Flag13
8981
8982 procedure Set_Context_Items
8983 (N : Node_Id; Val : List_Id); -- List1
8984
8985 procedure Set_Context_Pending
8986 (N : Node_Id; Val : Boolean := True); -- Flag16
8987
8988 procedure Set_Controlling_Argument
8989 (N : Node_Id; Val : Node_Id); -- Node1
8990
8991 procedure Set_Conversion_OK
8992 (N : Node_Id; Val : Boolean := True); -- Flag14
8993
8994 procedure Set_Corresponding_Body
8995 (N : Node_Id; Val : Node_Id); -- Node5
8996
8997 procedure Set_Corresponding_Formal_Spec
8998 (N : Node_Id; Val : Node_Id); -- Node3
8999
9000 procedure Set_Corresponding_Generic_Association
9001 (N : Node_Id; Val : Node_Id); -- Node5
9002
9003 procedure Set_Corresponding_Integer_Value
9004 (N : Node_Id; Val : Uint); -- Uint4
9005
9006 procedure Set_Corresponding_Spec
9007 (N : Node_Id; Val : Node_Id); -- Node5
9008
9009 procedure Set_Corresponding_Stub
9010 (N : Node_Id; Val : Node_Id); -- Node3
9011
9012 procedure Set_Dcheck_Function
9013 (N : Node_Id; Val : Entity_Id); -- Node5
9014
9015 procedure Set_Debug_Statement
9016 (N : Node_Id; Val : Node_Id); -- Node3
9017
9018 procedure Set_Declarations
9019 (N : Node_Id; Val : List_Id); -- List2
9020
9021 procedure Set_Default_Expression
9022 (N : Node_Id; Val : Node_Id); -- Node5
9023
9024 procedure Set_Default_Name
9025 (N : Node_Id; Val : Node_Id); -- Node2
9026
9027 procedure Set_Defining_Identifier
9028 (N : Node_Id; Val : Entity_Id); -- Node1
9029
9030 procedure Set_Defining_Unit_Name
9031 (N : Node_Id; Val : Node_Id); -- Node1
9032
9033 procedure Set_Delay_Alternative
9034 (N : Node_Id; Val : Node_Id); -- Node4
9035
9036 procedure Set_Delay_Statement
9037 (N : Node_Id; Val : Node_Id); -- Node2
9038
9039 procedure Set_Delta_Expression
9040 (N : Node_Id; Val : Node_Id); -- Node3
9041
9042 procedure Set_Digits_Expression
9043 (N : Node_Id; Val : Node_Id); -- Node2
9044
9045 procedure Set_Discr_Check_Funcs_Built
9046 (N : Node_Id; Val : Boolean := True); -- Flag11
9047
9048 procedure Set_Discrete_Choices
9049 (N : Node_Id; Val : List_Id); -- List4
9050
9051 procedure Set_Discrete_Range
9052 (N : Node_Id; Val : Node_Id); -- Node4
9053
9054 procedure Set_Discrete_Subtype_Definition
9055 (N : Node_Id; Val : Node_Id); -- Node4
9056
9057 procedure Set_Discrete_Subtype_Definitions
9058 (N : Node_Id; Val : List_Id); -- List2
9059
9060 procedure Set_Discriminant_Specifications
9061 (N : Node_Id; Val : List_Id); -- List4
9062
9063 procedure Set_Discriminant_Type
9064 (N : Node_Id; Val : Node_Id); -- Node5
9065
9066 procedure Set_Do_Accessibility_Check
9067 (N : Node_Id; Val : Boolean := True); -- Flag13
9068
9069 procedure Set_Do_Discriminant_Check
9070 (N : Node_Id; Val : Boolean := True); -- Flag13
9071
9072 procedure Set_Do_Division_Check
9073 (N : Node_Id; Val : Boolean := True); -- Flag13
9074
9075 procedure Set_Do_Length_Check
9076 (N : Node_Id; Val : Boolean := True); -- Flag4
9077
9078 procedure Set_Do_Overflow_Check
9079 (N : Node_Id; Val : Boolean := True); -- Flag17
9080
9081 procedure Set_Do_Range_Check
9082 (N : Node_Id; Val : Boolean := True); -- Flag9
9083
9084 procedure Set_Do_Storage_Check
9085 (N : Node_Id; Val : Boolean := True); -- Flag17
9086
9087 procedure Set_Do_Tag_Check
9088 (N : Node_Id; Val : Boolean := True); -- Flag13
9089
9090 procedure Set_Elaborate_All_Desirable
9091 (N : Node_Id; Val : Boolean := True); -- Flag9
9092
9093 procedure Set_Elaborate_All_Present
9094 (N : Node_Id; Val : Boolean := True); -- Flag14
9095
9096 procedure Set_Elaborate_Desirable
9097 (N : Node_Id; Val : Boolean := True); -- Flag11
9098
9099 procedure Set_Elaborate_Present
9100 (N : Node_Id; Val : Boolean := True); -- Flag4
9101
9102 procedure Set_Elaboration_Boolean
9103 (N : Node_Id; Val : Node_Id); -- Node2
9104
9105 procedure Set_Else_Actions
9106 (N : Node_Id; Val : List_Id); -- List3
9107
9108 procedure Set_Else_Statements
9109 (N : Node_Id; Val : List_Id); -- List4
9110
9111 procedure Set_Elsif_Parts
9112 (N : Node_Id; Val : List_Id); -- List3
9113
9114 procedure Set_Enclosing_Variant
9115 (N : Node_Id; Val : Node_Id); -- Node2
9116
9117 procedure Set_End_Label
9118 (N : Node_Id; Val : Node_Id); -- Node4
9119
9120 procedure Set_End_Span
9121 (N : Node_Id; Val : Uint); -- Uint5
9122
9123 procedure Set_Entity
9124 (N : Node_Id; Val : Node_Id); -- Node4
9125
9126 procedure Set_Entry_Body_Formal_Part
9127 (N : Node_Id; Val : Node_Id); -- Node5
9128
9129 procedure Set_Entry_Call_Alternative
9130 (N : Node_Id; Val : Node_Id); -- Node1
9131
9132 procedure Set_Entry_Call_Statement
9133 (N : Node_Id; Val : Node_Id); -- Node1
9134
9135 procedure Set_Entry_Direct_Name
9136 (N : Node_Id; Val : Node_Id); -- Node1
9137
9138 procedure Set_Entry_Index
9139 (N : Node_Id; Val : Node_Id); -- Node5
9140
9141 procedure Set_Entry_Index_Specification
9142 (N : Node_Id; Val : Node_Id); -- Node4
9143
9144 procedure Set_Etype
9145 (N : Node_Id; Val : Node_Id); -- Node5
9146
9147 procedure Set_Exception_Choices
9148 (N : Node_Id; Val : List_Id); -- List4
9149
9150 procedure Set_Exception_Handlers
9151 (N : Node_Id; Val : List_Id); -- List5
9152
9153 procedure Set_Exception_Junk
9154 (N : Node_Id; Val : Boolean := True); -- Flag8
9155
9156 procedure Set_Exception_Label
9157 (N : Node_Id; Val : Node_Id); -- Node5
9158
9159 procedure Set_Expansion_Delayed
9160 (N : Node_Id; Val : Boolean := True); -- Flag11
9161
9162 procedure Set_Explicit_Actual_Parameter
9163 (N : Node_Id; Val : Node_Id); -- Node3
9164
9165 procedure Set_Explicit_Generic_Actual_Parameter
9166 (N : Node_Id; Val : Node_Id); -- Node1
9167
9168 procedure Set_Expression
9169 (N : Node_Id; Val : Node_Id); -- Node3
9170
9171 procedure Set_Expressions
9172 (N : Node_Id; Val : List_Id); -- List1
9173
9174 procedure Set_First_Bit
9175 (N : Node_Id; Val : Node_Id); -- Node3
9176
9177 procedure Set_First_Inlined_Subprogram
9178 (N : Node_Id; Val : Entity_Id); -- Node3
9179
9180 procedure Set_First_Name
9181 (N : Node_Id; Val : Boolean := True); -- Flag5
9182
9183 procedure Set_First_Named_Actual
9184 (N : Node_Id; Val : Node_Id); -- Node4
9185
9186 procedure Set_First_Real_Statement
9187 (N : Node_Id; Val : Node_Id); -- Node2
9188
9189 procedure Set_First_Subtype_Link
9190 (N : Node_Id; Val : Entity_Id); -- Node5
9191
9192 procedure Set_Float_Truncate
9193 (N : Node_Id; Val : Boolean := True); -- Flag11
9194
9195 procedure Set_Formal_Type_Definition
9196 (N : Node_Id; Val : Node_Id); -- Node3
9197
9198 procedure Set_Forwards_OK
9199 (N : Node_Id; Val : Boolean := True); -- Flag5
9200
9201 procedure Set_From_At_Mod
9202 (N : Node_Id; Val : Boolean := True); -- Flag4
9203
9204 procedure Set_From_Aspect_Specification
9205 (N : Node_Id; Val : Boolean := True); -- Flag13
9206
9207 procedure Set_From_At_End
9208 (N : Node_Id; Val : Boolean := True); -- Flag4
9209
9210 procedure Set_From_Default
9211 (N : Node_Id; Val : Boolean := True); -- Flag6
9212
9213 procedure Set_Generic_Associations
9214 (N : Node_Id; Val : List_Id); -- List3
9215
9216 procedure Set_Generic_Formal_Declarations
9217 (N : Node_Id; Val : List_Id); -- List2
9218
9219 procedure Set_Generic_Parent
9220 (N : Node_Id; Val : Node_Id); -- Node5
9221
9222 procedure Set_Generic_Parent_Type
9223 (N : Node_Id; Val : Node_Id); -- Node4
9224
9225 procedure Set_Handled_Statement_Sequence
9226 (N : Node_Id; Val : Node_Id); -- Node4
9227
9228 procedure Set_Handler_List_Entry
9229 (N : Node_Id; Val : Node_Id); -- Node2
9230
9231 procedure Set_Has_Created_Identifier
9232 (N : Node_Id; Val : Boolean := True); -- Flag15
9233
9234 procedure Set_Has_Dynamic_Length_Check
9235 (N : Node_Id; Val : Boolean := True); -- Flag10
9236
9237 procedure Set_Has_Dynamic_Range_Check
9238 (N : Node_Id; Val : Boolean := True); -- Flag12
9239
9240 procedure Set_Has_Init_Expression
9241 (N : Node_Id; Val : Boolean := True); -- Flag14
9242
9243 procedure Set_Has_Local_Raise
9244 (N : Node_Id; Val : Boolean := True); -- Flag8
9245
9246 procedure Set_Has_No_Elaboration_Code
9247 (N : Node_Id; Val : Boolean := True); -- Flag17
9248
9249 procedure Set_Has_Pragma_Priority
9250 (N : Node_Id; Val : Boolean := True); -- Flag6
9251
9252 procedure Set_Has_Pragma_Suppress_All
9253 (N : Node_Id; Val : Boolean := True); -- Flag14
9254
9255 procedure Set_Has_Private_View
9256 (N : Node_Id; Val : Boolean := True); -- Flag11
9257
9258 procedure Set_Has_Relative_Deadline_Pragma
9259 (N : Node_Id; Val : Boolean := True); -- Flag9
9260
9261 procedure Set_Has_Self_Reference
9262 (N : Node_Id; Val : Boolean := True); -- Flag13
9263
9264 procedure Set_Has_Storage_Size_Pragma
9265 (N : Node_Id; Val : Boolean := True); -- Flag5
9266
9267 procedure Set_Has_Task_Info_Pragma
9268 (N : Node_Id; Val : Boolean := True); -- Flag7
9269
9270 procedure Set_Has_Task_Name_Pragma
9271 (N : Node_Id; Val : Boolean := True); -- Flag8
9272
9273 procedure Set_Has_Wide_Character
9274 (N : Node_Id; Val : Boolean := True); -- Flag11
9275
9276 procedure Set_Has_Wide_Wide_Character
9277 (N : Node_Id; Val : Boolean := True); -- Flag13
9278
9279 procedure Set_Hidden_By_Use_Clause
9280 (N : Node_Id; Val : Elist_Id); -- Elist4
9281
9282 procedure Set_High_Bound
9283 (N : Node_Id; Val : Node_Id); -- Node2
9284
9285 procedure Set_Identifier
9286 (N : Node_Id; Val : Node_Id); -- Node1
9287
9288 procedure Set_Interface_List
9289 (N : Node_Id; Val : List_Id); -- List2
9290
9291 procedure Set_Interface_Present
9292 (N : Node_Id; Val : Boolean := True); -- Flag16
9293
9294 procedure Set_Implicit_With
9295 (N : Node_Id; Val : Boolean := True); -- Flag16
9296
9297 procedure Set_Import_Interface_Present
9298 (N : Node_Id; Val : Boolean := True); -- Flag16
9299
9300 procedure Set_In_Present
9301 (N : Node_Id; Val : Boolean := True); -- Flag15
9302
9303 procedure Set_Includes_Infinities
9304 (N : Node_Id; Val : Boolean := True); -- Flag11
9305
9306 procedure Set_Inherited_Discriminant
9307 (N : Node_Id; Val : Boolean := True); -- Flag13
9308
9309 procedure Set_Instance_Spec
9310 (N : Node_Id; Val : Node_Id); -- Node5
9311
9312 procedure Set_Intval
9313 (N : Node_Id; Val : Uint); -- Uint3
9314
9315 procedure Set_Is_Accessibility_Actual
9316 (N : Node_Id; Val : Boolean := True); -- Flag13
9317
9318 procedure Set_Is_Asynchronous_Call_Block
9319 (N : Node_Id; Val : Boolean := True); -- Flag7
9320
9321 procedure Set_Is_Component_Left_Opnd
9322 (N : Node_Id; Val : Boolean := True); -- Flag13
9323
9324 procedure Set_Is_Component_Right_Opnd
9325 (N : Node_Id; Val : Boolean := True); -- Flag14
9326
9327 procedure Set_Is_Controlling_Actual
9328 (N : Node_Id; Val : Boolean := True); -- Flag16
9329
9330 procedure Set_Is_Delayed_Aspect
9331 (N : Node_Id; Val : Boolean := True); -- Flag14
9332
9333 procedure Set_Is_Dynamic_Coextension
9334 (N : Node_Id; Val : Boolean := True); -- Flag18
9335
9336 procedure Set_Is_Elsif
9337 (N : Node_Id; Val : Boolean := True); -- Flag13
9338
9339 procedure Set_Is_Entry_Barrier_Function
9340 (N : Node_Id; Val : Boolean := True); -- Flag8
9341
9342 procedure Set_Is_Expanded_Build_In_Place_Call
9343 (N : Node_Id; Val : Boolean := True); -- Flag11
9344
9345 procedure Set_Is_Folded_In_Parser
9346 (N : Node_Id; Val : Boolean := True); -- Flag4
9347
9348 procedure Set_Is_In_Discriminant_Check
9349 (N : Node_Id; Val : Boolean := True); -- Flag11
9350
9351 procedure Set_Is_Machine_Number
9352 (N : Node_Id; Val : Boolean := True); -- Flag11
9353
9354 procedure Set_Is_Null_Loop
9355 (N : Node_Id; Val : Boolean := True); -- Flag16
9356
9357 procedure Set_Is_Overloaded
9358 (N : Node_Id; Val : Boolean := True); -- Flag5
9359
9360 procedure Set_Is_Power_Of_2_For_Shift
9361 (N : Node_Id; Val : Boolean := True); -- Flag13
9362
9363 procedure Set_Is_Protected_Subprogram_Body
9364 (N : Node_Id; Val : Boolean := True); -- Flag7
9365
9366 procedure Set_Is_Static_Coextension
9367 (N : Node_Id; Val : Boolean := True); -- Flag14
9368
9369 procedure Set_Is_Static_Expression
9370 (N : Node_Id; Val : Boolean := True); -- Flag6
9371
9372 procedure Set_Is_Subprogram_Descriptor
9373 (N : Node_Id; Val : Boolean := True); -- Flag16
9374
9375 procedure Set_Is_Task_Allocation_Block
9376 (N : Node_Id; Val : Boolean := True); -- Flag6
9377
9378 procedure Set_Is_Task_Master
9379 (N : Node_Id; Val : Boolean := True); -- Flag5
9380
9381 procedure Set_Iteration_Scheme
9382 (N : Node_Id; Val : Node_Id); -- Node2
9383
9384 procedure Set_Itype
9385 (N : Node_Id; Val : Entity_Id); -- Node1
9386
9387 procedure Set_Kill_Range_Check
9388 (N : Node_Id; Val : Boolean := True); -- Flag11
9389
9390 procedure Set_Last_Bit
9391 (N : Node_Id; Val : Node_Id); -- Node4
9392
9393 procedure Set_Last_Name
9394 (N : Node_Id; Val : Boolean := True); -- Flag6
9395
9396 procedure Set_Library_Unit
9397 (N : Node_Id; Val : Node_Id); -- Node4
9398
9399 procedure Set_Label_Construct
9400 (N : Node_Id; Val : Node_Id); -- Node2
9401
9402 procedure Set_Left_Opnd
9403 (N : Node_Id; Val : Node_Id); -- Node2
9404
9405 procedure Set_Limited_View_Installed
9406 (N : Node_Id; Val : Boolean := True); -- Flag18
9407
9408 procedure Set_Limited_Present
9409 (N : Node_Id; Val : Boolean := True); -- Flag17
9410
9411 procedure Set_Literals
9412 (N : Node_Id; Val : List_Id); -- List1
9413
9414 procedure Set_Local_Raise_Not_OK
9415 (N : Node_Id; Val : Boolean := True); -- Flag7
9416
9417 procedure Set_Local_Raise_Statements
9418 (N : Node_Id; Val : Elist_Id); -- Elist1
9419
9420 procedure Set_Loop_Actions
9421 (N : Node_Id; Val : List_Id); -- List2
9422
9423 procedure Set_Loop_Parameter_Specification
9424 (N : Node_Id; Val : Node_Id); -- Node4
9425
9426 procedure Set_Low_Bound
9427 (N : Node_Id; Val : Node_Id); -- Node1
9428
9429 procedure Set_Mod_Clause
9430 (N : Node_Id; Val : Node_Id); -- Node2
9431
9432 procedure Set_More_Ids
9433 (N : Node_Id; Val : Boolean := True); -- Flag5
9434
9435 procedure Set_Must_Be_Byte_Aligned
9436 (N : Node_Id; Val : Boolean := True); -- Flag14
9437
9438 procedure Set_Must_Not_Freeze
9439 (N : Node_Id; Val : Boolean := True); -- Flag8
9440
9441 procedure Set_Must_Not_Override
9442 (N : Node_Id; Val : Boolean := True); -- Flag15
9443
9444 procedure Set_Must_Override
9445 (N : Node_Id; Val : Boolean := True); -- Flag14
9446
9447 procedure Set_Name
9448 (N : Node_Id; Val : Node_Id); -- Node2
9449
9450 procedure Set_Names
9451 (N : Node_Id; Val : List_Id); -- List2
9452
9453 procedure Set_Next_Entity
9454 (N : Node_Id; Val : Node_Id); -- Node2
9455
9456 procedure Set_Next_Exit_Statement
9457 (N : Node_Id; Val : Node_Id); -- Node3
9458
9459 procedure Set_Next_Implicit_With
9460 (N : Node_Id; Val : Node_Id); -- Node3
9461
9462 procedure Set_Next_Named_Actual
9463 (N : Node_Id; Val : Node_Id); -- Node4
9464
9465 procedure Set_Next_Pragma
9466 (N : Node_Id; Val : Node_Id); -- Node1
9467
9468 procedure Set_Next_Rep_Item
9469 (N : Node_Id; Val : Node_Id); -- Node5
9470
9471 procedure Set_Next_Use_Clause
9472 (N : Node_Id; Val : Node_Id); -- Node3
9473
9474 procedure Set_No_Ctrl_Actions
9475 (N : Node_Id; Val : Boolean := True); -- Flag7
9476
9477 procedure Set_No_Elaboration_Check
9478 (N : Node_Id; Val : Boolean := True); -- Flag14
9479
9480 procedure Set_No_Entities_Ref_In_Spec
9481 (N : Node_Id; Val : Boolean := True); -- Flag8
9482
9483 procedure Set_No_Initialization
9484 (N : Node_Id; Val : Boolean := True); -- Flag13
9485
9486 procedure Set_No_Truncation
9487 (N : Node_Id; Val : Boolean := True); -- Flag17
9488
9489 procedure Set_Null_Present
9490 (N : Node_Id; Val : Boolean := True); -- Flag13
9491
9492 procedure Set_Null_Exclusion_Present
9493 (N : Node_Id; Val : Boolean := True); -- Flag11
9494
9495 procedure Set_Null_Exclusion_In_Return_Present
9496 (N : Node_Id; Val : Boolean := True); -- Flag14
9497
9498 procedure Set_Null_Record_Present
9499 (N : Node_Id; Val : Boolean := True); -- Flag17
9500
9501 procedure Set_Object_Definition
9502 (N : Node_Id; Val : Node_Id); -- Node4
9503
9504 procedure Set_Original_Discriminant
9505 (N : Node_Id; Val : Node_Id); -- Node2
9506
9507 procedure Set_Original_Entity
9508 (N : Node_Id; Val : Entity_Id); -- Node2
9509
9510 procedure Set_Others_Discrete_Choices
9511 (N : Node_Id; Val : List_Id); -- List1
9512
9513 procedure Set_Out_Present
9514 (N : Node_Id; Val : Boolean := True); -- Flag17
9515
9516 procedure Set_Parameter_Associations
9517 (N : Node_Id; Val : List_Id); -- List3
9518
9519 procedure Set_Parameter_List_Truncated
9520 (N : Node_Id; Val : Boolean := True); -- Flag17
9521
9522 procedure Set_Parameter_Specifications
9523 (N : Node_Id; Val : List_Id); -- List3
9524
9525 procedure Set_Parameter_Type
9526 (N : Node_Id; Val : Node_Id); -- Node2
9527
9528 procedure Set_Parent_Spec
9529 (N : Node_Id; Val : Node_Id); -- Node4
9530
9531 procedure Set_Position
9532 (N : Node_Id; Val : Node_Id); -- Node2
9533
9534 procedure Set_Pragma_Argument_Associations
9535 (N : Node_Id; Val : List_Id); -- List2
9536
9537 procedure Set_Pragma_Enabled
9538 (N : Node_Id; Val : Boolean := True); -- Flag5
9539
9540 procedure Set_Pragma_Identifier
9541 (N : Node_Id; Val : Node_Id); -- Node4
9542
9543 procedure Set_Pragmas_After
9544 (N : Node_Id; Val : List_Id); -- List5
9545
9546 procedure Set_Pragmas_Before
9547 (N : Node_Id; Val : List_Id); -- List4
9548
9549 procedure Set_Prefix
9550 (N : Node_Id; Val : Node_Id); -- Node3
9551
9552 procedure Set_Present_Expr
9553 (N : Node_Id; Val : Uint); -- Uint3
9554
9555 procedure Set_Prev_Ids
9556 (N : Node_Id; Val : Boolean := True); -- Flag6
9557
9558 procedure Set_Print_In_Hex
9559 (N : Node_Id; Val : Boolean := True); -- Flag13
9560
9561 procedure Set_Private_Declarations
9562 (N : Node_Id; Val : List_Id); -- List3
9563
9564 procedure Set_Private_Present
9565 (N : Node_Id; Val : Boolean := True); -- Flag15
9566
9567 procedure Set_Procedure_To_Call
9568 (N : Node_Id; Val : Node_Id); -- Node2
9569
9570 procedure Set_Proper_Body
9571 (N : Node_Id; Val : Node_Id); -- Node1
9572
9573 procedure Set_Protected_Definition
9574 (N : Node_Id; Val : Node_Id); -- Node3
9575
9576 procedure Set_Protected_Present
9577 (N : Node_Id; Val : Boolean := True); -- Flag6
9578
9579 procedure Set_Raises_Constraint_Error
9580 (N : Node_Id; Val : Boolean := True); -- Flag7
9581
9582 procedure Set_Range_Constraint
9583 (N : Node_Id; Val : Node_Id); -- Node4
9584
9585 procedure Set_Range_Expression
9586 (N : Node_Id; Val : Node_Id); -- Node4
9587
9588 procedure Set_Real_Range_Specification
9589 (N : Node_Id; Val : Node_Id); -- Node4
9590
9591 procedure Set_Realval
9592 (N : Node_Id; Val : Ureal); -- Ureal3
9593
9594 procedure Set_Reason
9595 (N : Node_Id; Val : Uint); -- Uint3
9596
9597 procedure Set_Record_Extension_Part
9598 (N : Node_Id; Val : Node_Id); -- Node3
9599
9600 procedure Set_Redundant_Use
9601 (N : Node_Id; Val : Boolean := True); -- Flag13
9602
9603 procedure Set_Renaming_Exception
9604 (N : Node_Id; Val : Node_Id); -- Node2
9605
9606 procedure Set_Result_Definition
9607 (N : Node_Id; Val : Node_Id); -- Node4
9608
9609 procedure Set_Return_Object_Declarations
9610 (N : Node_Id; Val : List_Id); -- List3
9611
9612 procedure Set_Return_Statement_Entity
9613 (N : Node_Id; Val : Node_Id); -- Node5
9614
9615 procedure Set_Reverse_Present
9616 (N : Node_Id; Val : Boolean := True); -- Flag15
9617
9618 procedure Set_Right_Opnd
9619 (N : Node_Id; Val : Node_Id); -- Node3
9620
9621 procedure Set_Rounded_Result
9622 (N : Node_Id; Val : Boolean := True); -- Flag18
9623
9624 procedure Set_SCIL_Controlling_Tag
9625 (N : Node_Id; Val : Node_Id); -- Node5
9626
9627 procedure Set_SCIL_Entity
9628 (N : Node_Id; Val : Node_Id); -- Node4
9629
9630 procedure Set_SCIL_Tag_Value
9631 (N : Node_Id; Val : Node_Id); -- Node5
9632
9633 procedure Set_SCIL_Target_Prim
9634 (N : Node_Id; Val : Node_Id); -- Node2
9635
9636 procedure Set_Scope
9637 (N : Node_Id; Val : Node_Id); -- Node3
9638
9639 procedure Set_Select_Alternatives
9640 (N : Node_Id; Val : List_Id); -- List1
9641
9642 procedure Set_Selector_Name
9643 (N : Node_Id; Val : Node_Id); -- Node2
9644
9645 procedure Set_Selector_Names
9646 (N : Node_Id; Val : List_Id); -- List1
9647
9648 procedure Set_Shift_Count_OK
9649 (N : Node_Id; Val : Boolean := True); -- Flag4
9650
9651 procedure Set_Source_Type
9652 (N : Node_Id; Val : Entity_Id); -- Node1
9653
9654 procedure Set_Specification
9655 (N : Node_Id; Val : Node_Id); -- Node1
9656
9657 procedure Set_Statements
9658 (N : Node_Id; Val : List_Id); -- List3
9659
9660 procedure Set_Static_Processing_OK
9661 (N : Node_Id; Val : Boolean); -- Flag4
9662
9663 procedure Set_Storage_Pool
9664 (N : Node_Id; Val : Node_Id); -- Node1
9665
9666 procedure Set_Strval
9667 (N : Node_Id; Val : String_Id); -- Str3
9668
9669 procedure Set_Subtype_Indication
9670 (N : Node_Id; Val : Node_Id); -- Node5
9671
9672 procedure Set_Subtype_Mark
9673 (N : Node_Id; Val : Node_Id); -- Node4
9674
9675 procedure Set_Subtype_Marks
9676 (N : Node_Id; Val : List_Id); -- List2
9677
9678 procedure Set_Suppress_Loop_Warnings
9679 (N : Node_Id; Val : Boolean := True); -- Flag17
9680
9681 procedure Set_Synchronized_Present
9682 (N : Node_Id; Val : Boolean := True); -- Flag7
9683
9684 procedure Set_Tagged_Present
9685 (N : Node_Id; Val : Boolean := True); -- Flag15
9686
9687 procedure Set_Target_Type
9688 (N : Node_Id; Val : Entity_Id); -- Node2
9689
9690 procedure Set_Task_Definition
9691 (N : Node_Id; Val : Node_Id); -- Node3
9692
9693 procedure Set_Task_Present
9694 (N : Node_Id; Val : Boolean := True); -- Flag5
9695
9696 procedure Set_Then_Actions
9697 (N : Node_Id; Val : List_Id); -- List2
9698
9699 procedure Set_Then_Statements
9700 (N : Node_Id; Val : List_Id); -- List2
9701
9702 procedure Set_Treat_Fixed_As_Integer
9703 (N : Node_Id; Val : Boolean := True); -- Flag14
9704
9705 procedure Set_Triggering_Alternative
9706 (N : Node_Id; Val : Node_Id); -- Node1
9707
9708 procedure Set_Triggering_Statement
9709 (N : Node_Id; Val : Node_Id); -- Node1
9710
9711 procedure Set_TSS_Elist
9712 (N : Node_Id; Val : Elist_Id); -- Elist3
9713
9714 procedure Set_Type_Definition
9715 (N : Node_Id; Val : Node_Id); -- Node3
9716
9717 procedure Set_Unit
9718 (N : Node_Id; Val : Node_Id); -- Node2
9719
9720 procedure Set_Unknown_Discriminants_Present
9721 (N : Node_Id; Val : Boolean := True); -- Flag13
9722
9723 procedure Set_Unreferenced_In_Spec
9724 (N : Node_Id; Val : Boolean := True); -- Flag7
9725
9726 procedure Set_Variant_Part
9727 (N : Node_Id; Val : Node_Id); -- Node4
9728
9729 procedure Set_Variants
9730 (N : Node_Id; Val : List_Id); -- List1
9731
9732 procedure Set_Visible_Declarations
9733 (N : Node_Id; Val : List_Id); -- List2
9734
9735 procedure Set_Was_Originally_Stub
9736 (N : Node_Id; Val : Boolean := True); -- Flag13
9737
9738 procedure Set_Withed_Body
9739 (N : Node_Id; Val : Node_Id); -- Node1
9740
9741 procedure Set_Zero_Cost_Handling
9742 (N : Node_Id; Val : Boolean := True); -- Flag5
9743
9744 -------------------------
9745 -- Iterator Procedures --
9746 -------------------------
9747
9748 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
9749
9750 procedure Next_Entity (N : in out Node_Id);
9751 procedure Next_Named_Actual (N : in out Node_Id);
9752 procedure Next_Rep_Item (N : in out Node_Id);
9753 procedure Next_Use_Clause (N : in out Node_Id);
9754
9755 -------------------------------------------
9756 -- Miscellaneous Tree Access Subprograms --
9757 -------------------------------------------
9758
9759 function End_Location (N : Node_Id) return Source_Ptr;
9760 -- N is an N_If_Statement or N_Case_Statement node, and this function
9761 -- returns the location of the IF token in the END IF sequence by
9762 -- translating the value of the End_Span field.
9763
9764 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
9765 -- N is an N_If_Statement or N_Case_Statement node. This procedure sets
9766 -- the End_Span field to correspond to the given value S. In other words,
9767 -- End_Span is set to the difference between S and Sloc (N), the starting
9768 -- location.
9769
9770 function Get_Pragma_Arg (Arg : Node_Id) return Node_Id;
9771 -- Given an argument to a pragma Arg, this function returns the expression
9772 -- for the argument. This is Arg itself, or, in the case where Arg is a
9773 -- pragma argument association node, the expression from this node.
9774
9775 --------------------------------
9776 -- Node_Kind Membership Tests --
9777 --------------------------------
9778
9779 -- The following functions allow a convenient notation for testing whether
9780 -- a Node_Kind value matches any one of a list of possible values. In each
9781 -- case True is returned if the given T argument is equal to any of the V
9782 -- arguments. Note that there is a similar set of functions defined in
9783 -- Atree where the first argument is a Node_Id whose Nkind field is tested.
9784
9785 function Nkind_In
9786 (T : Node_Kind;
9787 V1 : Node_Kind;
9788 V2 : Node_Kind) return Boolean;
9789
9790 function Nkind_In
9791 (T : Node_Kind;
9792 V1 : Node_Kind;
9793 V2 : Node_Kind;
9794 V3 : Node_Kind) return Boolean;
9795
9796 function Nkind_In
9797 (T : Node_Kind;
9798 V1 : Node_Kind;
9799 V2 : Node_Kind;
9800 V3 : Node_Kind;
9801 V4 : Node_Kind) return Boolean;
9802
9803 function Nkind_In
9804 (T : Node_Kind;
9805 V1 : Node_Kind;
9806 V2 : Node_Kind;
9807 V3 : Node_Kind;
9808 V4 : Node_Kind;
9809 V5 : Node_Kind) return Boolean;
9810
9811 function Nkind_In
9812 (T : Node_Kind;
9813 V1 : Node_Kind;
9814 V2 : Node_Kind;
9815 V3 : Node_Kind;
9816 V4 : Node_Kind;
9817 V5 : Node_Kind;
9818 V6 : Node_Kind) return Boolean;
9819
9820 function Nkind_In
9821 (T : Node_Kind;
9822 V1 : Node_Kind;
9823 V2 : Node_Kind;
9824 V3 : Node_Kind;
9825 V4 : Node_Kind;
9826 V5 : Node_Kind;
9827 V6 : Node_Kind;
9828 V7 : Node_Kind) return Boolean;
9829
9830 function Nkind_In
9831 (T : Node_Kind;
9832 V1 : Node_Kind;
9833 V2 : Node_Kind;
9834 V3 : Node_Kind;
9835 V4 : Node_Kind;
9836 V5 : Node_Kind;
9837 V6 : Node_Kind;
9838 V7 : Node_Kind;
9839 V8 : Node_Kind) return Boolean;
9840
9841 function Nkind_In
9842 (T : Node_Kind;
9843 V1 : Node_Kind;
9844 V2 : Node_Kind;
9845 V3 : Node_Kind;
9846 V4 : Node_Kind;
9847 V5 : Node_Kind;
9848 V6 : Node_Kind;
9849 V7 : Node_Kind;
9850 V8 : Node_Kind;
9851 V9 : Node_Kind) return Boolean;
9852
9853 pragma Inline (Nkind_In);
9854 -- Inline all above functions
9855
9856 -----------------------
9857 -- Utility Functions --
9858 -----------------------
9859
9860 function Pragma_Name (N : Node_Id) return Name_Id;
9861 pragma Inline (Pragma_Name);
9862 -- Convenient function to obtain Chars field of Pragma_Identifier
9863
9864 -----------------------------
9865 -- Syntactic Parent Tables --
9866 -----------------------------
9867
9868 -- These tables show for each node, and for each of the five fields,
9869 -- whether the corresponding field is syntactic (True) or semantic (False).
9870 -- Unused entries are also set to False.
9871
9872 subtype Field_Num is Natural range 1 .. 5;
9873
9874 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
9875
9876 -- Following entries can be built automatically from the sinfo sources
9877 -- using the makeisf utility (currently this program is in spitbol).
9878
9879 N_Identifier =>
9880 (1 => True, -- Chars (Name1)
9881 2 => False, -- Original_Discriminant (Node2-Sem)
9882 3 => False, -- unused
9883 4 => False, -- Entity (Node4-Sem)
9884 5 => False), -- Etype (Node5-Sem)
9885
9886 N_Integer_Literal =>
9887 (1 => False, -- unused
9888 2 => False, -- Original_Entity (Node2-Sem)
9889 3 => True, -- Intval (Uint3)
9890 4 => False, -- unused
9891 5 => False), -- Etype (Node5-Sem)
9892
9893 N_Real_Literal =>
9894 (1 => False, -- unused
9895 2 => False, -- Original_Entity (Node2-Sem)
9896 3 => True, -- Realval (Ureal3)
9897 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
9898 5 => False), -- Etype (Node5-Sem)
9899
9900 N_Character_Literal =>
9901 (1 => True, -- Chars (Name1)
9902 2 => True, -- Char_Literal_Value (Uint2)
9903 3 => False, -- unused
9904 4 => False, -- Entity (Node4-Sem)
9905 5 => False), -- Etype (Node5-Sem)
9906
9907 N_String_Literal =>
9908 (1 => False, -- unused
9909 2 => False, -- unused
9910 3 => True, -- Strval (Str3)
9911 4 => False, -- unused
9912 5 => False), -- Etype (Node5-Sem)
9913
9914 N_Pragma =>
9915 (1 => False, -- Next_Pragma (Node1-Sem)
9916 2 => True, -- Pragma_Argument_Associations (List2)
9917 3 => True, -- Debug_Statement (Node3)
9918 4 => True, -- Pragma_Identifier (Node4)
9919 5 => False), -- Next_Rep_Item (Node5-Sem)
9920
9921 N_Pragma_Argument_Association =>
9922 (1 => True, -- Chars (Name1)
9923 2 => False, -- unused
9924 3 => True, -- Expression (Node3)
9925 4 => False, -- unused
9926 5 => False), -- unused
9927
9928 N_Defining_Identifier =>
9929 (1 => True, -- Chars (Name1)
9930 2 => False, -- Next_Entity (Node2-Sem)
9931 3 => False, -- Scope (Node3-Sem)
9932 4 => False, -- unused
9933 5 => False), -- Etype (Node5-Sem)
9934
9935 N_Full_Type_Declaration =>
9936 (1 => True, -- Defining_Identifier (Node1)
9937 2 => False, -- unused
9938 3 => True, -- Type_Definition (Node3)
9939 4 => True, -- Discriminant_Specifications (List4)
9940 5 => False), -- unused
9941
9942 N_Subtype_Declaration =>
9943 (1 => True, -- Defining_Identifier (Node1)
9944 2 => False, -- unused
9945 3 => False, -- unused
9946 4 => False, -- Generic_Parent_Type (Node4-Sem)
9947 5 => True), -- Subtype_Indication (Node5)
9948
9949 N_Subtype_Indication =>
9950 (1 => False, -- unused
9951 2 => False, -- unused
9952 3 => True, -- Constraint (Node3)
9953 4 => True, -- Subtype_Mark (Node4)
9954 5 => False), -- Etype (Node5-Sem)
9955
9956 N_Object_Declaration =>
9957 (1 => True, -- Defining_Identifier (Node1)
9958 2 => False, -- Handler_List_Entry (Node2-Sem)
9959 3 => True, -- Expression (Node3)
9960 4 => True, -- Object_Definition (Node4)
9961 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
9962
9963 N_Number_Declaration =>
9964 (1 => True, -- Defining_Identifier (Node1)
9965 2 => False, -- unused
9966 3 => True, -- Expression (Node3)
9967 4 => False, -- unused
9968 5 => False), -- unused
9969
9970 N_Derived_Type_Definition =>
9971 (1 => False, -- unused
9972 2 => True, -- Interface_List (List2)
9973 3 => True, -- Record_Extension_Part (Node3)
9974 4 => False, -- unused
9975 5 => True), -- Subtype_Indication (Node5)
9976
9977 N_Range_Constraint =>
9978 (1 => False, -- unused
9979 2 => False, -- unused
9980 3 => False, -- unused
9981 4 => True, -- Range_Expression (Node4)
9982 5 => False), -- unused
9983
9984 N_Range =>
9985 (1 => True, -- Low_Bound (Node1)
9986 2 => True, -- High_Bound (Node2)
9987 3 => False, -- unused
9988 4 => False, -- unused
9989 5 => False), -- Etype (Node5-Sem)
9990
9991 N_Enumeration_Type_Definition =>
9992 (1 => True, -- Literals (List1)
9993 2 => False, -- unused
9994 3 => False, -- unused
9995 4 => True, -- End_Label (Node4)
9996 5 => False), -- unused
9997
9998 N_Defining_Character_Literal =>
9999 (1 => True, -- Chars (Name1)
10000 2 => False, -- Next_Entity (Node2-Sem)
10001 3 => False, -- Scope (Node3-Sem)
10002 4 => False, -- unused
10003 5 => False), -- Etype (Node5-Sem)
10004
10005 N_Signed_Integer_Type_Definition =>
10006 (1 => True, -- Low_Bound (Node1)
10007 2 => True, -- High_Bound (Node2)
10008 3 => False, -- unused
10009 4 => False, -- unused
10010 5 => False), -- unused
10011
10012 N_Modular_Type_Definition =>
10013 (1 => False, -- unused
10014 2 => False, -- unused
10015 3 => True, -- Expression (Node3)
10016 4 => False, -- unused
10017 5 => False), -- unused
10018
10019 N_Floating_Point_Definition =>
10020 (1 => False, -- unused
10021 2 => True, -- Digits_Expression (Node2)
10022 3 => False, -- unused
10023 4 => True, -- Real_Range_Specification (Node4)
10024 5 => False), -- unused
10025
10026 N_Real_Range_Specification =>
10027 (1 => True, -- Low_Bound (Node1)
10028 2 => True, -- High_Bound (Node2)
10029 3 => False, -- unused
10030 4 => False, -- unused
10031 5 => False), -- unused
10032
10033 N_Ordinary_Fixed_Point_Definition =>
10034 (1 => False, -- unused
10035 2 => False, -- unused
10036 3 => True, -- Delta_Expression (Node3)
10037 4 => True, -- Real_Range_Specification (Node4)
10038 5 => False), -- unused
10039
10040 N_Decimal_Fixed_Point_Definition =>
10041 (1 => False, -- unused
10042 2 => True, -- Digits_Expression (Node2)
10043 3 => True, -- Delta_Expression (Node3)
10044 4 => True, -- Real_Range_Specification (Node4)
10045 5 => False), -- unused
10046
10047 N_Digits_Constraint =>
10048 (1 => False, -- unused
10049 2 => True, -- Digits_Expression (Node2)
10050 3 => False, -- unused
10051 4 => True, -- Range_Constraint (Node4)
10052 5 => False), -- unused
10053
10054 N_Unconstrained_Array_Definition =>
10055 (1 => False, -- unused
10056 2 => True, -- Subtype_Marks (List2)
10057 3 => False, -- unused
10058 4 => True, -- Component_Definition (Node4)
10059 5 => False), -- unused
10060
10061 N_Constrained_Array_Definition =>
10062 (1 => False, -- unused
10063 2 => True, -- Discrete_Subtype_Definitions (List2)
10064 3 => False, -- unused
10065 4 => True, -- Component_Definition (Node4)
10066 5 => False), -- unused
10067
10068 N_Component_Definition =>
10069 (1 => False, -- unused
10070 2 => False, -- unused
10071 3 => True, -- Access_Definition (Node3)
10072 4 => False, -- unused
10073 5 => True), -- Subtype_Indication (Node5)
10074
10075 N_Discriminant_Specification =>
10076 (1 => True, -- Defining_Identifier (Node1)
10077 2 => False, -- unused
10078 3 => True, -- Expression (Node3)
10079 4 => False, -- unused
10080 5 => True), -- Discriminant_Type (Node5)
10081
10082 N_Index_Or_Discriminant_Constraint =>
10083 (1 => True, -- Constraints (List1)
10084 2 => False, -- unused
10085 3 => False, -- unused
10086 4 => False, -- unused
10087 5 => False), -- unused
10088
10089 N_Discriminant_Association =>
10090 (1 => True, -- Selector_Names (List1)
10091 2 => False, -- unused
10092 3 => True, -- Expression (Node3)
10093 4 => False, -- unused
10094 5 => False), -- unused
10095
10096 N_Record_Definition =>
10097 (1 => True, -- Component_List (Node1)
10098 2 => True, -- Interface_List (List2)
10099 3 => False, -- unused
10100 4 => True, -- End_Label (Node4)
10101 5 => False), -- unused
10102
10103 N_Component_List =>
10104 (1 => False, -- unused
10105 2 => False, -- unused
10106 3 => True, -- Component_Items (List3)
10107 4 => True, -- Variant_Part (Node4)
10108 5 => False), -- unused
10109
10110 N_Component_Declaration =>
10111 (1 => True, -- Defining_Identifier (Node1)
10112 2 => False, -- unused
10113 3 => True, -- Expression (Node3)
10114 4 => True, -- Component_Definition (Node4)
10115 5 => False), -- unused
10116
10117 N_Variant_Part =>
10118 (1 => True, -- Variants (List1)
10119 2 => True, -- Name (Node2)
10120 3 => False, -- unused
10121 4 => False, -- unused
10122 5 => False), -- unused
10123
10124 N_Variant =>
10125 (1 => True, -- Component_List (Node1)
10126 2 => False, -- Enclosing_Variant (Node2-Sem)
10127 3 => False, -- Present_Expr (Uint3-Sem)
10128 4 => True, -- Discrete_Choices (List4)
10129 5 => False), -- Dcheck_Function (Node5-Sem)
10130
10131 N_Others_Choice =>
10132 (1 => False, -- Others_Discrete_Choices (List1-Sem)
10133 2 => False, -- unused
10134 3 => False, -- unused
10135 4 => False, -- unused
10136 5 => False), -- unused
10137
10138 N_Access_To_Object_Definition =>
10139 (1 => False, -- unused
10140 2 => False, -- unused
10141 3 => False, -- unused
10142 4 => False, -- unused
10143 5 => True), -- Subtype_Indication (Node5)
10144
10145 N_Access_Function_Definition =>
10146 (1 => False, -- unused
10147 2 => False, -- unused
10148 3 => True, -- Parameter_Specifications (List3)
10149 4 => True, -- Result_Definition (Node4)
10150 5 => False), -- unused
10151
10152 N_Access_Procedure_Definition =>
10153 (1 => False, -- unused
10154 2 => False, -- unused
10155 3 => True, -- Parameter_Specifications (List3)
10156 4 => False, -- unused
10157 5 => False), -- unused
10158
10159 N_Access_Definition =>
10160 (1 => False, -- unused
10161 2 => False, -- unused
10162 3 => True, -- Access_To_Subprogram_Definition (Node3)
10163 4 => True, -- Subtype_Mark (Node4)
10164 5 => False), -- unused
10165
10166 N_Incomplete_Type_Declaration =>
10167 (1 => True, -- Defining_Identifier (Node1)
10168 2 => False, -- unused
10169 3 => False, -- unused
10170 4 => True, -- Discriminant_Specifications (List4)
10171 5 => False), -- unused
10172
10173 N_Explicit_Dereference =>
10174 (1 => False, -- unused
10175 2 => False, -- unused
10176 3 => True, -- Prefix (Node3)
10177 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
10178 5 => False), -- Etype (Node5-Sem)
10179
10180 N_Indexed_Component =>
10181 (1 => True, -- Expressions (List1)
10182 2 => False, -- unused
10183 3 => True, -- Prefix (Node3)
10184 4 => False, -- unused
10185 5 => False), -- Etype (Node5-Sem)
10186
10187 N_Slice =>
10188 (1 => False, -- unused
10189 2 => False, -- unused
10190 3 => True, -- Prefix (Node3)
10191 4 => True, -- Discrete_Range (Node4)
10192 5 => False), -- Etype (Node5-Sem)
10193
10194 N_Selected_Component =>
10195 (1 => False, -- unused
10196 2 => True, -- Selector_Name (Node2)
10197 3 => True, -- Prefix (Node3)
10198 4 => False, -- unused
10199 5 => False), -- Etype (Node5-Sem)
10200
10201 N_Attribute_Reference =>
10202 (1 => True, -- Expressions (List1)
10203 2 => True, -- Attribute_Name (Name2)
10204 3 => True, -- Prefix (Node3)
10205 4 => False, -- Entity (Node4-Sem)
10206 5 => False), -- Etype (Node5-Sem)
10207
10208 N_Aggregate =>
10209 (1 => True, -- Expressions (List1)
10210 2 => True, -- Component_Associations (List2)
10211 3 => False, -- Aggregate_Bounds (Node3-Sem)
10212 4 => False, -- unused
10213 5 => False), -- Etype (Node5-Sem)
10214
10215 N_Component_Association =>
10216 (1 => True, -- Choices (List1)
10217 2 => False, -- Loop_Actions (List2-Sem)
10218 3 => True, -- Expression (Node3)
10219 4 => False, -- unused
10220 5 => False), -- unused
10221
10222 N_Extension_Aggregate =>
10223 (1 => True, -- Expressions (List1)
10224 2 => True, -- Component_Associations (List2)
10225 3 => True, -- Ancestor_Part (Node3)
10226 4 => False, -- unused
10227 5 => False), -- Etype (Node5-Sem)
10228
10229 N_Null =>
10230 (1 => False, -- unused
10231 2 => False, -- unused
10232 3 => False, -- unused
10233 4 => False, -- unused
10234 5 => False), -- Etype (Node5-Sem)
10235
10236 N_And_Then =>
10237 (1 => False, -- Actions (List1-Sem)
10238 2 => True, -- Left_Opnd (Node2)
10239 3 => True, -- Right_Opnd (Node3)
10240 4 => False, -- unused
10241 5 => False), -- Etype (Node5-Sem)
10242
10243 N_Or_Else =>
10244 (1 => False, -- Actions (List1-Sem)
10245 2 => True, -- Left_Opnd (Node2)
10246 3 => True, -- Right_Opnd (Node3)
10247 4 => False, -- unused
10248 5 => False), -- Etype (Node5-Sem)
10249
10250 N_In =>
10251 (1 => False, -- unused
10252 2 => True, -- Left_Opnd (Node2)
10253 3 => True, -- Right_Opnd (Node3)
10254 4 => True, -- Alternatives (List4)
10255 5 => False), -- Etype (Node5-Sem)
10256
10257 N_Not_In =>
10258 (1 => False, -- unused
10259 2 => True, -- Left_Opnd (Node2)
10260 3 => True, -- Right_Opnd (Node3)
10261 4 => True, -- Alternatives (List4)
10262 5 => False), -- Etype (Node5-Sem)
10263
10264 N_Op_And =>
10265 (1 => True, -- Chars (Name1)
10266 2 => True, -- Left_Opnd (Node2)
10267 3 => True, -- Right_Opnd (Node3)
10268 4 => False, -- Entity (Node4-Sem)
10269 5 => False), -- Etype (Node5-Sem)
10270
10271 N_Op_Or =>
10272 (1 => True, -- Chars (Name1)
10273 2 => True, -- Left_Opnd (Node2)
10274 3 => True, -- Right_Opnd (Node3)
10275 4 => False, -- Entity (Node4-Sem)
10276 5 => False), -- Etype (Node5-Sem)
10277
10278 N_Op_Xor =>
10279 (1 => True, -- Chars (Name1)
10280 2 => True, -- Left_Opnd (Node2)
10281 3 => True, -- Right_Opnd (Node3)
10282 4 => False, -- Entity (Node4-Sem)
10283 5 => False), -- Etype (Node5-Sem)
10284
10285 N_Op_Eq =>
10286 (1 => True, -- Chars (Name1)
10287 2 => True, -- Left_Opnd (Node2)
10288 3 => True, -- Right_Opnd (Node3)
10289 4 => False, -- Entity (Node4-Sem)
10290 5 => False), -- Etype (Node5-Sem)
10291
10292 N_Op_Ne =>
10293 (1 => True, -- Chars (Name1)
10294 2 => True, -- Left_Opnd (Node2)
10295 3 => True, -- Right_Opnd (Node3)
10296 4 => False, -- Entity (Node4-Sem)
10297 5 => False), -- Etype (Node5-Sem)
10298
10299 N_Op_Lt =>
10300 (1 => True, -- Chars (Name1)
10301 2 => True, -- Left_Opnd (Node2)
10302 3 => True, -- Right_Opnd (Node3)
10303 4 => False, -- Entity (Node4-Sem)
10304 5 => False), -- Etype (Node5-Sem)
10305
10306 N_Op_Le =>
10307 (1 => True, -- Chars (Name1)
10308 2 => True, -- Left_Opnd (Node2)
10309 3 => True, -- Right_Opnd (Node3)
10310 4 => False, -- Entity (Node4-Sem)
10311 5 => False), -- Etype (Node5-Sem)
10312
10313 N_Op_Gt =>
10314 (1 => True, -- Chars (Name1)
10315 2 => True, -- Left_Opnd (Node2)
10316 3 => True, -- Right_Opnd (Node3)
10317 4 => False, -- Entity (Node4-Sem)
10318 5 => False), -- Etype (Node5-Sem)
10319
10320 N_Op_Ge =>
10321 (1 => True, -- Chars (Name1)
10322 2 => True, -- Left_Opnd (Node2)
10323 3 => True, -- Right_Opnd (Node3)
10324 4 => False, -- Entity (Node4-Sem)
10325 5 => False), -- Etype (Node5-Sem)
10326
10327 N_Op_Add =>
10328 (1 => True, -- Chars (Name1)
10329 2 => True, -- Left_Opnd (Node2)
10330 3 => True, -- Right_Opnd (Node3)
10331 4 => False, -- Entity (Node4-Sem)
10332 5 => False), -- Etype (Node5-Sem)
10333
10334 N_Op_Subtract =>
10335 (1 => True, -- Chars (Name1)
10336 2 => True, -- Left_Opnd (Node2)
10337 3 => True, -- Right_Opnd (Node3)
10338 4 => False, -- Entity (Node4-Sem)
10339 5 => False), -- Etype (Node5-Sem)
10340
10341 N_Op_Concat =>
10342 (1 => True, -- Chars (Name1)
10343 2 => True, -- Left_Opnd (Node2)
10344 3 => True, -- Right_Opnd (Node3)
10345 4 => False, -- Entity (Node4-Sem)
10346 5 => False), -- Etype (Node5-Sem)
10347
10348 N_Op_Multiply =>
10349 (1 => True, -- Chars (Name1)
10350 2 => True, -- Left_Opnd (Node2)
10351 3 => True, -- Right_Opnd (Node3)
10352 4 => False, -- Entity (Node4-Sem)
10353 5 => False), -- Etype (Node5-Sem)
10354
10355 N_Op_Divide =>
10356 (1 => True, -- Chars (Name1)
10357 2 => True, -- Left_Opnd (Node2)
10358 3 => True, -- Right_Opnd (Node3)
10359 4 => False, -- Entity (Node4-Sem)
10360 5 => False), -- Etype (Node5-Sem)
10361
10362 N_Op_Mod =>
10363 (1 => True, -- Chars (Name1)
10364 2 => True, -- Left_Opnd (Node2)
10365 3 => True, -- Right_Opnd (Node3)
10366 4 => False, -- Entity (Node4-Sem)
10367 5 => False), -- Etype (Node5-Sem)
10368
10369 N_Op_Rem =>
10370 (1 => True, -- Chars (Name1)
10371 2 => True, -- Left_Opnd (Node2)
10372 3 => True, -- Right_Opnd (Node3)
10373 4 => False, -- Entity (Node4-Sem)
10374 5 => False), -- Etype (Node5-Sem)
10375
10376 N_Op_Expon =>
10377 (1 => True, -- Chars (Name1)
10378 2 => True, -- Left_Opnd (Node2)
10379 3 => True, -- Right_Opnd (Node3)
10380 4 => False, -- Entity (Node4-Sem)
10381 5 => False), -- Etype (Node5-Sem)
10382
10383 N_Op_Plus =>
10384 (1 => True, -- Chars (Name1)
10385 2 => False, -- unused
10386 3 => True, -- Right_Opnd (Node3)
10387 4 => False, -- Entity (Node4-Sem)
10388 5 => False), -- Etype (Node5-Sem)
10389
10390 N_Op_Minus =>
10391 (1 => True, -- Chars (Name1)
10392 2 => False, -- unused
10393 3 => True, -- Right_Opnd (Node3)
10394 4 => False, -- Entity (Node4-Sem)
10395 5 => False), -- Etype (Node5-Sem)
10396
10397 N_Op_Abs =>
10398 (1 => True, -- Chars (Name1)
10399 2 => False, -- unused
10400 3 => True, -- Right_Opnd (Node3)
10401 4 => False, -- Entity (Node4-Sem)
10402 5 => False), -- Etype (Node5-Sem)
10403
10404 N_Op_Not =>
10405 (1 => True, -- Chars (Name1)
10406 2 => False, -- unused
10407 3 => True, -- Right_Opnd (Node3)
10408 4 => False, -- Entity (Node4-Sem)
10409 5 => False), -- Etype (Node5-Sem)
10410
10411 N_Type_Conversion =>
10412 (1 => False, -- unused
10413 2 => False, -- unused
10414 3 => True, -- Expression (Node3)
10415 4 => True, -- Subtype_Mark (Node4)
10416 5 => False), -- Etype (Node5-Sem)
10417
10418 N_Qualified_Expression =>
10419 (1 => False, -- unused
10420 2 => False, -- unused
10421 3 => True, -- Expression (Node3)
10422 4 => True, -- Subtype_Mark (Node4)
10423 5 => False), -- Etype (Node5-Sem)
10424
10425 N_Allocator =>
10426 (1 => False, -- Storage_Pool (Node1-Sem)
10427 2 => False, -- Procedure_To_Call (Node2-Sem)
10428 3 => True, -- Expression (Node3)
10429 4 => False, -- Coextensions (Elist4-Sem)
10430 5 => False), -- Etype (Node5-Sem)
10431
10432 N_Null_Statement =>
10433 (1 => False, -- unused
10434 2 => False, -- unused
10435 3 => False, -- unused
10436 4 => False, -- unused
10437 5 => False), -- unused
10438
10439 N_Label =>
10440 (1 => True, -- Identifier (Node1)
10441 2 => False, -- unused
10442 3 => False, -- unused
10443 4 => False, -- unused
10444 5 => False), -- unused
10445
10446 N_Assignment_Statement =>
10447 (1 => False, -- unused
10448 2 => True, -- Name (Node2)
10449 3 => True, -- Expression (Node3)
10450 4 => False, -- unused
10451 5 => False), -- unused
10452
10453 N_If_Statement =>
10454 (1 => True, -- Condition (Node1)
10455 2 => True, -- Then_Statements (List2)
10456 3 => True, -- Elsif_Parts (List3)
10457 4 => True, -- Else_Statements (List4)
10458 5 => True), -- End_Span (Uint5)
10459
10460 N_Elsif_Part =>
10461 (1 => True, -- Condition (Node1)
10462 2 => True, -- Then_Statements (List2)
10463 3 => False, -- Condition_Actions (List3-Sem)
10464 4 => False, -- unused
10465 5 => False), -- unused
10466
10467 N_Case_Expression =>
10468 (1 => False, -- unused
10469 2 => False, -- unused
10470 3 => True, -- Expression (Node3)
10471 4 => True, -- Alternatives (List4)
10472 5 => False), -- unused
10473
10474 N_Case_Expression_Alternative =>
10475 (1 => False, -- Actions (List1-Sem)
10476 2 => False, -- unused
10477 3 => True, -- Statements (List3)
10478 4 => True, -- Expression (Node4)
10479 5 => False), -- unused
10480
10481 N_Case_Statement =>
10482 (1 => False, -- unused
10483 2 => False, -- unused
10484 3 => True, -- Expression (Node3)
10485 4 => True, -- Alternatives (List4)
10486 5 => True), -- End_Span (Uint5)
10487
10488 N_Case_Statement_Alternative =>
10489 (1 => False, -- unused
10490 2 => False, -- unused
10491 3 => True, -- Statements (List3)
10492 4 => True, -- Discrete_Choices (List4)
10493 5 => False), -- unused
10494
10495 N_Loop_Statement =>
10496 (1 => True, -- Identifier (Node1)
10497 2 => True, -- Iteration_Scheme (Node2)
10498 3 => True, -- Statements (List3)
10499 4 => True, -- End_Label (Node4)
10500 5 => False), -- unused
10501
10502 N_Iteration_Scheme =>
10503 (1 => True, -- Condition (Node1)
10504 2 => False, -- unused
10505 3 => False, -- Condition_Actions (List3-Sem)
10506 4 => True, -- Loop_Parameter_Specification (Node4)
10507 5 => False), -- unused
10508
10509 N_Loop_Parameter_Specification =>
10510 (1 => True, -- Defining_Identifier (Node1)
10511 2 => False, -- unused
10512 3 => False, -- unused
10513 4 => True, -- Discrete_Subtype_Definition (Node4)
10514 5 => False), -- unused
10515
10516 N_Block_Statement =>
10517 (1 => True, -- Identifier (Node1)
10518 2 => True, -- Declarations (List2)
10519 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10520 4 => True, -- Handled_Statement_Sequence (Node4)
10521 5 => False), -- unused
10522
10523 N_Exit_Statement =>
10524 (1 => True, -- Condition (Node1)
10525 2 => True, -- Name (Node2)
10526 3 => False, -- unused
10527 4 => False, -- unused
10528 5 => False), -- unused
10529
10530 N_Goto_Statement =>
10531 (1 => False, -- unused
10532 2 => True, -- Name (Node2)
10533 3 => False, -- unused
10534 4 => False, -- unused
10535 5 => False), -- unused
10536
10537 N_Subprogram_Declaration =>
10538 (1 => True, -- Specification (Node1)
10539 2 => False, -- unused
10540 3 => False, -- Body_To_Inline (Node3-Sem)
10541 4 => False, -- Parent_Spec (Node4-Sem)
10542 5 => False), -- Corresponding_Body (Node5-Sem)
10543
10544 N_Abstract_Subprogram_Declaration =>
10545 (1 => True, -- Specification (Node1)
10546 2 => False, -- unused
10547 3 => False, -- unused
10548 4 => False, -- unused
10549 5 => False), -- unused
10550
10551 N_Function_Specification =>
10552 (1 => True, -- Defining_Unit_Name (Node1)
10553 2 => False, -- Elaboration_Boolean (Node2-Sem)
10554 3 => True, -- Parameter_Specifications (List3)
10555 4 => True, -- Result_Definition (Node4)
10556 5 => False), -- Generic_Parent (Node5-Sem)
10557
10558 N_Procedure_Specification =>
10559 (1 => True, -- Defining_Unit_Name (Node1)
10560 2 => False, -- Elaboration_Boolean (Node2-Sem)
10561 3 => True, -- Parameter_Specifications (List3)
10562 4 => False, -- unused
10563 5 => False), -- Generic_Parent (Node5-Sem)
10564
10565 N_Designator =>
10566 (1 => True, -- Identifier (Node1)
10567 2 => True, -- Name (Node2)
10568 3 => False, -- unused
10569 4 => False, -- unused
10570 5 => False), -- unused
10571
10572 N_Defining_Program_Unit_Name =>
10573 (1 => True, -- Defining_Identifier (Node1)
10574 2 => True, -- Name (Node2)
10575 3 => False, -- unused
10576 4 => False, -- unused
10577 5 => False), -- unused
10578
10579 N_Operator_Symbol =>
10580 (1 => True, -- Chars (Name1)
10581 2 => False, -- unused
10582 3 => True, -- Strval (Str3)
10583 4 => False, -- Entity (Node4-Sem)
10584 5 => False), -- Etype (Node5-Sem)
10585
10586 N_Defining_Operator_Symbol =>
10587 (1 => True, -- Chars (Name1)
10588 2 => False, -- Next_Entity (Node2-Sem)
10589 3 => False, -- Scope (Node3-Sem)
10590 4 => False, -- unused
10591 5 => False), -- Etype (Node5-Sem)
10592
10593 N_Parameter_Specification =>
10594 (1 => True, -- Defining_Identifier (Node1)
10595 2 => True, -- Parameter_Type (Node2)
10596 3 => True, -- Expression (Node3)
10597 4 => False, -- unused
10598 5 => False), -- Default_Expression (Node5-Sem)
10599
10600 N_Subprogram_Body =>
10601 (1 => True, -- Specification (Node1)
10602 2 => True, -- Declarations (List2)
10603 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10604 4 => True, -- Handled_Statement_Sequence (Node4)
10605 5 => False), -- Corresponding_Spec (Node5-Sem)
10606
10607 N_Parameterized_Expression =>
10608 (1 => True, -- Specification (Node1)
10609 2 => False, -- unused
10610 3 => True, -- Expression (Node3)
10611 4 => False, -- unused
10612 5 => False), -- unused
10613
10614 N_Procedure_Call_Statement =>
10615 (1 => False, -- Controlling_Argument (Node1-Sem)
10616 2 => True, -- Name (Node2)
10617 3 => True, -- Parameter_Associations (List3)
10618 4 => False, -- First_Named_Actual (Node4-Sem)
10619 5 => False), -- Etype (Node5-Sem)
10620
10621 N_Function_Call =>
10622 (1 => False, -- Controlling_Argument (Node1-Sem)
10623 2 => True, -- Name (Node2)
10624 3 => True, -- Parameter_Associations (List3)
10625 4 => False, -- First_Named_Actual (Node4-Sem)
10626 5 => False), -- Etype (Node5-Sem)
10627
10628 N_Parameter_Association =>
10629 (1 => False, -- unused
10630 2 => True, -- Selector_Name (Node2)
10631 3 => True, -- Explicit_Actual_Parameter (Node3)
10632 4 => False, -- Next_Named_Actual (Node4-Sem)
10633 5 => False), -- unused
10634
10635 N_Return_Statement =>
10636 (1 => False, -- Storage_Pool (Node1-Sem)
10637 2 => False, -- Procedure_To_Call (Node2-Sem)
10638 3 => True, -- Expression (Node3)
10639 4 => False, -- unused
10640 5 => False), -- Return_Statement_Entity (Node5-Sem)
10641
10642 N_Extended_Return_Statement =>
10643 (1 => False, -- Storage_Pool (Node1-Sem)
10644 2 => False, -- Procedure_To_Call (Node2-Sem)
10645 3 => True, -- Return_Object_Declarations (List3)
10646 4 => True, -- Handled_Statement_Sequence (Node4)
10647 5 => False), -- Return_Statement_Entity (Node5-Sem)
10648
10649 N_Package_Declaration =>
10650 (1 => True, -- Specification (Node1)
10651 2 => False, -- unused
10652 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10653 4 => False, -- Parent_Spec (Node4-Sem)
10654 5 => False), -- Corresponding_Body (Node5-Sem)
10655
10656 N_Package_Specification =>
10657 (1 => True, -- Defining_Unit_Name (Node1)
10658 2 => True, -- Visible_Declarations (List2)
10659 3 => True, -- Private_Declarations (List3)
10660 4 => True, -- End_Label (Node4)
10661 5 => False), -- Generic_Parent (Node5-Sem)
10662
10663 N_Package_Body =>
10664 (1 => True, -- Defining_Unit_Name (Node1)
10665 2 => True, -- Declarations (List2)
10666 3 => False, -- unused
10667 4 => True, -- Handled_Statement_Sequence (Node4)
10668 5 => False), -- Corresponding_Spec (Node5-Sem)
10669
10670 N_Private_Type_Declaration =>
10671 (1 => True, -- Defining_Identifier (Node1)
10672 2 => False, -- unused
10673 3 => False, -- unused
10674 4 => True, -- Discriminant_Specifications (List4)
10675 5 => False), -- unused
10676
10677 N_Private_Extension_Declaration =>
10678 (1 => True, -- Defining_Identifier (Node1)
10679 2 => True, -- Interface_List (List2)
10680 3 => False, -- unused
10681 4 => True, -- Discriminant_Specifications (List4)
10682 5 => True), -- Subtype_Indication (Node5)
10683
10684 N_Use_Package_Clause =>
10685 (1 => False, -- unused
10686 2 => True, -- Names (List2)
10687 3 => False, -- Next_Use_Clause (Node3-Sem)
10688 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10689 5 => False), -- unused
10690
10691 N_Use_Type_Clause =>
10692 (1 => False, -- unused
10693 2 => True, -- Subtype_Marks (List2)
10694 3 => False, -- Next_Use_Clause (Node3-Sem)
10695 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10696 5 => False), -- unused
10697
10698 N_Object_Renaming_Declaration =>
10699 (1 => True, -- Defining_Identifier (Node1)
10700 2 => True, -- Name (Node2)
10701 3 => True, -- Access_Definition (Node3)
10702 4 => True, -- Subtype_Mark (Node4)
10703 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
10704
10705 N_Exception_Renaming_Declaration =>
10706 (1 => True, -- Defining_Identifier (Node1)
10707 2 => True, -- Name (Node2)
10708 3 => False, -- unused
10709 4 => False, -- unused
10710 5 => False), -- unused
10711
10712 N_Package_Renaming_Declaration =>
10713 (1 => True, -- Defining_Unit_Name (Node1)
10714 2 => True, -- Name (Node2)
10715 3 => False, -- unused
10716 4 => False, -- Parent_Spec (Node4-Sem)
10717 5 => False), -- unused
10718
10719 N_Subprogram_Renaming_Declaration =>
10720 (1 => True, -- Specification (Node1)
10721 2 => True, -- Name (Node2)
10722 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
10723 4 => False, -- Parent_Spec (Node4-Sem)
10724 5 => False), -- Corresponding_Spec (Node5-Sem)
10725
10726 N_Generic_Package_Renaming_Declaration =>
10727 (1 => True, -- Defining_Unit_Name (Node1)
10728 2 => True, -- Name (Node2)
10729 3 => False, -- unused
10730 4 => False, -- Parent_Spec (Node4-Sem)
10731 5 => False), -- unused
10732
10733 N_Generic_Procedure_Renaming_Declaration =>
10734 (1 => True, -- Defining_Unit_Name (Node1)
10735 2 => True, -- Name (Node2)
10736 3 => False, -- unused
10737 4 => False, -- Parent_Spec (Node4-Sem)
10738 5 => False), -- unused
10739
10740 N_Generic_Function_Renaming_Declaration =>
10741 (1 => True, -- Defining_Unit_Name (Node1)
10742 2 => True, -- Name (Node2)
10743 3 => False, -- unused
10744 4 => False, -- Parent_Spec (Node4-Sem)
10745 5 => False), -- unused
10746
10747 N_Task_Type_Declaration =>
10748 (1 => True, -- Defining_Identifier (Node1)
10749 2 => True, -- Interface_List (List2)
10750 3 => True, -- Task_Definition (Node3)
10751 4 => True, -- Discriminant_Specifications (List4)
10752 5 => False), -- Corresponding_Body (Node5-Sem)
10753
10754 N_Single_Task_Declaration =>
10755 (1 => True, -- Defining_Identifier (Node1)
10756 2 => True, -- Interface_List (List2)
10757 3 => True, -- Task_Definition (Node3)
10758 4 => False, -- unused
10759 5 => False), -- unused
10760
10761 N_Task_Definition =>
10762 (1 => False, -- unused
10763 2 => True, -- Visible_Declarations (List2)
10764 3 => True, -- Private_Declarations (List3)
10765 4 => True, -- End_Label (Node4)
10766 5 => False), -- unused
10767
10768 N_Task_Body =>
10769 (1 => True, -- Defining_Identifier (Node1)
10770 2 => True, -- Declarations (List2)
10771 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10772 4 => True, -- Handled_Statement_Sequence (Node4)
10773 5 => False), -- Corresponding_Spec (Node5-Sem)
10774
10775 N_Protected_Type_Declaration =>
10776 (1 => True, -- Defining_Identifier (Node1)
10777 2 => True, -- Interface_List (List2)
10778 3 => True, -- Protected_Definition (Node3)
10779 4 => True, -- Discriminant_Specifications (List4)
10780 5 => False), -- Corresponding_Body (Node5-Sem)
10781
10782 N_Single_Protected_Declaration =>
10783 (1 => True, -- Defining_Identifier (Node1)
10784 2 => True, -- Interface_List (List2)
10785 3 => True, -- Protected_Definition (Node3)
10786 4 => False, -- unused
10787 5 => False), -- unused
10788
10789 N_Protected_Definition =>
10790 (1 => False, -- unused
10791 2 => True, -- Visible_Declarations (List2)
10792 3 => True, -- Private_Declarations (List3)
10793 4 => True, -- End_Label (Node4)
10794 5 => False), -- unused
10795
10796 N_Protected_Body =>
10797 (1 => True, -- Defining_Identifier (Node1)
10798 2 => True, -- Declarations (List2)
10799 3 => False, -- unused
10800 4 => True, -- End_Label (Node4)
10801 5 => False), -- Corresponding_Spec (Node5-Sem)
10802
10803 N_Entry_Declaration =>
10804 (1 => True, -- Defining_Identifier (Node1)
10805 2 => False, -- unused
10806 3 => True, -- Parameter_Specifications (List3)
10807 4 => True, -- Discrete_Subtype_Definition (Node4)
10808 5 => False), -- Corresponding_Body (Node5-Sem)
10809
10810 N_Accept_Statement =>
10811 (1 => True, -- Entry_Direct_Name (Node1)
10812 2 => True, -- Declarations (List2)
10813 3 => True, -- Parameter_Specifications (List3)
10814 4 => True, -- Handled_Statement_Sequence (Node4)
10815 5 => True), -- Entry_Index (Node5)
10816
10817 N_Entry_Body =>
10818 (1 => True, -- Defining_Identifier (Node1)
10819 2 => True, -- Declarations (List2)
10820 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10821 4 => True, -- Handled_Statement_Sequence (Node4)
10822 5 => True), -- Entry_Body_Formal_Part (Node5)
10823
10824 N_Entry_Body_Formal_Part =>
10825 (1 => True, -- Condition (Node1)
10826 2 => False, -- unused
10827 3 => True, -- Parameter_Specifications (List3)
10828 4 => True, -- Entry_Index_Specification (Node4)
10829 5 => False), -- unused
10830
10831 N_Entry_Index_Specification =>
10832 (1 => True, -- Defining_Identifier (Node1)
10833 2 => False, -- unused
10834 3 => False, -- unused
10835 4 => True, -- Discrete_Subtype_Definition (Node4)
10836 5 => False), -- unused
10837
10838 N_Entry_Call_Statement =>
10839 (1 => False, -- unused
10840 2 => True, -- Name (Node2)
10841 3 => True, -- Parameter_Associations (List3)
10842 4 => False, -- First_Named_Actual (Node4-Sem)
10843 5 => False), -- unused
10844
10845 N_Requeue_Statement =>
10846 (1 => False, -- unused
10847 2 => True, -- Name (Node2)
10848 3 => False, -- unused
10849 4 => False, -- unused
10850 5 => False), -- unused
10851
10852 N_Delay_Until_Statement =>
10853 (1 => False, -- unused
10854 2 => False, -- unused
10855 3 => True, -- Expression (Node3)
10856 4 => False, -- unused
10857 5 => False), -- unused
10858
10859 N_Delay_Relative_Statement =>
10860 (1 => False, -- unused
10861 2 => False, -- unused
10862 3 => True, -- Expression (Node3)
10863 4 => False, -- unused
10864 5 => False), -- unused
10865
10866 N_Selective_Accept =>
10867 (1 => True, -- Select_Alternatives (List1)
10868 2 => False, -- unused
10869 3 => False, -- unused
10870 4 => True, -- Else_Statements (List4)
10871 5 => False), -- unused
10872
10873 N_Accept_Alternative =>
10874 (1 => True, -- Condition (Node1)
10875 2 => True, -- Accept_Statement (Node2)
10876 3 => True, -- Statements (List3)
10877 4 => True, -- Pragmas_Before (List4)
10878 5 => False), -- Accept_Handler_Records (List5-Sem)
10879
10880 N_Delay_Alternative =>
10881 (1 => True, -- Condition (Node1)
10882 2 => True, -- Delay_Statement (Node2)
10883 3 => True, -- Statements (List3)
10884 4 => True, -- Pragmas_Before (List4)
10885 5 => False), -- unused
10886
10887 N_Terminate_Alternative =>
10888 (1 => True, -- Condition (Node1)
10889 2 => False, -- unused
10890 3 => False, -- unused
10891 4 => True, -- Pragmas_Before (List4)
10892 5 => True), -- Pragmas_After (List5)
10893
10894 N_Timed_Entry_Call =>
10895 (1 => True, -- Entry_Call_Alternative (Node1)
10896 2 => False, -- unused
10897 3 => False, -- unused
10898 4 => True, -- Delay_Alternative (Node4)
10899 5 => False), -- unused
10900
10901 N_Entry_Call_Alternative =>
10902 (1 => True, -- Entry_Call_Statement (Node1)
10903 2 => False, -- unused
10904 3 => True, -- Statements (List3)
10905 4 => True, -- Pragmas_Before (List4)
10906 5 => False), -- unused
10907
10908 N_Conditional_Entry_Call =>
10909 (1 => True, -- Entry_Call_Alternative (Node1)
10910 2 => False, -- unused
10911 3 => False, -- unused
10912 4 => True, -- Else_Statements (List4)
10913 5 => False), -- unused
10914
10915 N_Asynchronous_Select =>
10916 (1 => True, -- Triggering_Alternative (Node1)
10917 2 => True, -- Abortable_Part (Node2)
10918 3 => False, -- unused
10919 4 => False, -- unused
10920 5 => False), -- unused
10921
10922 N_Triggering_Alternative =>
10923 (1 => True, -- Triggering_Statement (Node1)
10924 2 => False, -- unused
10925 3 => True, -- Statements (List3)
10926 4 => True, -- Pragmas_Before (List4)
10927 5 => False), -- unused
10928
10929 N_Abortable_Part =>
10930 (1 => False, -- unused
10931 2 => False, -- unused
10932 3 => True, -- Statements (List3)
10933 4 => False, -- unused
10934 5 => False), -- unused
10935
10936 N_Abort_Statement =>
10937 (1 => False, -- unused
10938 2 => True, -- Names (List2)
10939 3 => False, -- unused
10940 4 => False, -- unused
10941 5 => False), -- unused
10942
10943 N_Compilation_Unit =>
10944 (1 => True, -- Context_Items (List1)
10945 2 => True, -- Unit (Node2)
10946 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
10947 4 => False, -- Library_Unit (Node4-Sem)
10948 5 => True), -- Aux_Decls_Node (Node5)
10949
10950 N_Compilation_Unit_Aux =>
10951 (1 => True, -- Actions (List1)
10952 2 => True, -- Declarations (List2)
10953 3 => False, -- unused
10954 4 => True, -- Config_Pragmas (List4)
10955 5 => True), -- Pragmas_After (List5)
10956
10957 N_With_Clause =>
10958 (1 => False, -- unused
10959 2 => True, -- Name (Node2)
10960 3 => False, -- unused
10961 4 => False, -- Library_Unit (Node4-Sem)
10962 5 => False), -- Corresponding_Spec (Node5-Sem)
10963
10964 N_Subprogram_Body_Stub =>
10965 (1 => True, -- Specification (Node1)
10966 2 => False, -- unused
10967 3 => False, -- unused
10968 4 => False, -- Library_Unit (Node4-Sem)
10969 5 => False), -- Corresponding_Body (Node5-Sem)
10970
10971 N_Package_Body_Stub =>
10972 (1 => True, -- Defining_Identifier (Node1)
10973 2 => False, -- unused
10974 3 => False, -- unused
10975 4 => False, -- Library_Unit (Node4-Sem)
10976 5 => False), -- Corresponding_Body (Node5-Sem)
10977
10978 N_Task_Body_Stub =>
10979 (1 => True, -- Defining_Identifier (Node1)
10980 2 => False, -- unused
10981 3 => False, -- unused
10982 4 => False, -- Library_Unit (Node4-Sem)
10983 5 => False), -- Corresponding_Body (Node5-Sem)
10984
10985 N_Protected_Body_Stub =>
10986 (1 => True, -- Defining_Identifier (Node1)
10987 2 => False, -- unused
10988 3 => False, -- unused
10989 4 => False, -- Library_Unit (Node4-Sem)
10990 5 => False), -- Corresponding_Body (Node5-Sem)
10991
10992 N_Subunit =>
10993 (1 => True, -- Proper_Body (Node1)
10994 2 => True, -- Name (Node2)
10995 3 => False, -- Corresponding_Stub (Node3-Sem)
10996 4 => False, -- unused
10997 5 => False), -- unused
10998
10999 N_Exception_Declaration =>
11000 (1 => True, -- Defining_Identifier (Node1)
11001 2 => False, -- unused
11002 3 => False, -- Expression (Node3-Sem)
11003 4 => False, -- unused
11004 5 => False), -- unused
11005
11006 N_Handled_Sequence_Of_Statements =>
11007 (1 => True, -- At_End_Proc (Node1)
11008 2 => False, -- First_Real_Statement (Node2-Sem)
11009 3 => True, -- Statements (List3)
11010 4 => True, -- End_Label (Node4)
11011 5 => True), -- Exception_Handlers (List5)
11012
11013 N_Exception_Handler =>
11014 (1 => False, -- Local_Raise_Statements (Elist1)
11015 2 => True, -- Choice_Parameter (Node2)
11016 3 => True, -- Statements (List3)
11017 4 => True, -- Exception_Choices (List4)
11018 5 => False), -- Exception_Label (Node5)
11019
11020 N_Raise_Statement =>
11021 (1 => False, -- unused
11022 2 => True, -- Name (Node2)
11023 3 => True, -- Expression (Node3)
11024 4 => False, -- unused
11025 5 => False), -- unused
11026
11027 N_Generic_Subprogram_Declaration =>
11028 (1 => True, -- Specification (Node1)
11029 2 => True, -- Generic_Formal_Declarations (List2)
11030 3 => False, -- unused
11031 4 => False, -- Parent_Spec (Node4-Sem)
11032 5 => False), -- Corresponding_Body (Node5-Sem)
11033
11034 N_Generic_Package_Declaration =>
11035 (1 => True, -- Specification (Node1)
11036 2 => True, -- Generic_Formal_Declarations (List2)
11037 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11038 4 => False, -- Parent_Spec (Node4-Sem)
11039 5 => False), -- Corresponding_Body (Node5-Sem)
11040
11041 N_Package_Instantiation =>
11042 (1 => True, -- Defining_Unit_Name (Node1)
11043 2 => True, -- Name (Node2)
11044 3 => True, -- Generic_Associations (List3)
11045 4 => False, -- Parent_Spec (Node4-Sem)
11046 5 => False), -- Instance_Spec (Node5-Sem)
11047
11048 N_Procedure_Instantiation =>
11049 (1 => True, -- Defining_Unit_Name (Node1)
11050 2 => True, -- Name (Node2)
11051 3 => True, -- Generic_Associations (List3)
11052 4 => False, -- Parent_Spec (Node4-Sem)
11053 5 => False), -- Instance_Spec (Node5-Sem)
11054
11055 N_Function_Instantiation =>
11056 (1 => True, -- Defining_Unit_Name (Node1)
11057 2 => True, -- Name (Node2)
11058 3 => True, -- Generic_Associations (List3)
11059 4 => False, -- Parent_Spec (Node4-Sem)
11060 5 => False), -- Instance_Spec (Node5-Sem)
11061
11062 N_Generic_Association =>
11063 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
11064 2 => True, -- Selector_Name (Node2)
11065 3 => False, -- unused
11066 4 => False, -- unused
11067 5 => False), -- unused
11068
11069 N_Formal_Object_Declaration =>
11070 (1 => True, -- Defining_Identifier (Node1)
11071 2 => False, -- unused
11072 3 => True, -- Access_Definition (Node3)
11073 4 => True, -- Subtype_Mark (Node4)
11074 5 => True), -- Default_Expression (Node5)
11075
11076 N_Formal_Type_Declaration =>
11077 (1 => True, -- Defining_Identifier (Node1)
11078 2 => False, -- unused
11079 3 => True, -- Formal_Type_Definition (Node3)
11080 4 => True, -- Discriminant_Specifications (List4)
11081 5 => False), -- unused
11082
11083 N_Formal_Private_Type_Definition =>
11084 (1 => False, -- unused
11085 2 => False, -- unused
11086 3 => False, -- unused
11087 4 => False, -- unused
11088 5 => False), -- unused
11089
11090 N_Formal_Derived_Type_Definition =>
11091 (1 => False, -- unused
11092 2 => True, -- Interface_List (List2)
11093 3 => False, -- unused
11094 4 => True, -- Subtype_Mark (Node4)
11095 5 => False), -- unused
11096
11097 N_Formal_Discrete_Type_Definition =>
11098 (1 => False, -- unused
11099 2 => False, -- unused
11100 3 => False, -- unused
11101 4 => False, -- unused
11102 5 => False), -- unused
11103
11104 N_Formal_Signed_Integer_Type_Definition =>
11105 (1 => False, -- unused
11106 2 => False, -- unused
11107 3 => False, -- unused
11108 4 => False, -- unused
11109 5 => False), -- unused
11110
11111 N_Formal_Modular_Type_Definition =>
11112 (1 => False, -- unused
11113 2 => False, -- unused
11114 3 => False, -- unused
11115 4 => False, -- unused
11116 5 => False), -- unused
11117
11118 N_Formal_Floating_Point_Definition =>
11119 (1 => False, -- unused
11120 2 => False, -- unused
11121 3 => False, -- unused
11122 4 => False, -- unused
11123 5 => False), -- unused
11124
11125 N_Formal_Ordinary_Fixed_Point_Definition =>
11126 (1 => False, -- unused
11127 2 => False, -- unused
11128 3 => False, -- unused
11129 4 => False, -- unused
11130 5 => False), -- unused
11131
11132 N_Formal_Decimal_Fixed_Point_Definition =>
11133 (1 => False, -- unused
11134 2 => False, -- unused
11135 3 => False, -- unused
11136 4 => False, -- unused
11137 5 => False), -- unused
11138
11139 N_Formal_Concrete_Subprogram_Declaration =>
11140 (1 => True, -- Specification (Node1)
11141 2 => True, -- Default_Name (Node2)
11142 3 => False, -- unused
11143 4 => False, -- unused
11144 5 => False), -- unused
11145
11146 N_Formal_Abstract_Subprogram_Declaration =>
11147 (1 => True, -- Specification (Node1)
11148 2 => True, -- Default_Name (Node2)
11149 3 => False, -- unused
11150 4 => False, -- unused
11151 5 => False), -- unused
11152
11153 N_Formal_Package_Declaration =>
11154 (1 => True, -- Defining_Identifier (Node1)
11155 2 => True, -- Name (Node2)
11156 3 => True, -- Generic_Associations (List3)
11157 4 => False, -- unused
11158 5 => False), -- Instance_Spec (Node5-Sem)
11159
11160 N_Attribute_Definition_Clause =>
11161 (1 => True, -- Chars (Name1)
11162 2 => True, -- Name (Node2)
11163 3 => True, -- Expression (Node3)
11164 4 => False, -- unused
11165 5 => False), -- Next_Rep_Item (Node5-Sem)
11166
11167 N_Aspect_Specification =>
11168 (1 => True, -- Identifier (Node1)
11169 2 => False, -- Aspect_Rep_Item (Node2-Sem)
11170 3 => True, -- Expression (Node3)
11171 4 => False, -- Entity (Node4-Sem)
11172 5 => False), -- Next_Rep_Item (Node5-Sem)
11173
11174 N_Enumeration_Representation_Clause =>
11175 (1 => True, -- Identifier (Node1)
11176 2 => False, -- unused
11177 3 => True, -- Array_Aggregate (Node3)
11178 4 => False, -- unused
11179 5 => False), -- Next_Rep_Item (Node5-Sem)
11180
11181 N_Record_Representation_Clause =>
11182 (1 => True, -- Identifier (Node1)
11183 2 => True, -- Mod_Clause (Node2)
11184 3 => True, -- Component_Clauses (List3)
11185 4 => False, -- unused
11186 5 => False), -- Next_Rep_Item (Node5-Sem)
11187
11188 N_Component_Clause =>
11189 (1 => True, -- Component_Name (Node1)
11190 2 => True, -- Position (Node2)
11191 3 => True, -- First_Bit (Node3)
11192 4 => True, -- Last_Bit (Node4)
11193 5 => False), -- unused
11194
11195 N_Code_Statement =>
11196 (1 => False, -- unused
11197 2 => False, -- unused
11198 3 => True, -- Expression (Node3)
11199 4 => False, -- unused
11200 5 => False), -- unused
11201
11202 N_Op_Rotate_Left =>
11203 (1 => True, -- Chars (Name1)
11204 2 => True, -- Left_Opnd (Node2)
11205 3 => True, -- Right_Opnd (Node3)
11206 4 => False, -- Entity (Node4-Sem)
11207 5 => False), -- Etype (Node5-Sem)
11208
11209 N_Op_Rotate_Right =>
11210 (1 => True, -- Chars (Name1)
11211 2 => True, -- Left_Opnd (Node2)
11212 3 => True, -- Right_Opnd (Node3)
11213 4 => False, -- Entity (Node4-Sem)
11214 5 => False), -- Etype (Node5-Sem)
11215
11216 N_Op_Shift_Left =>
11217 (1 => True, -- Chars (Name1)
11218 2 => True, -- Left_Opnd (Node2)
11219 3 => True, -- Right_Opnd (Node3)
11220 4 => False, -- Entity (Node4-Sem)
11221 5 => False), -- Etype (Node5-Sem)
11222
11223 N_Op_Shift_Right_Arithmetic =>
11224 (1 => True, -- Chars (Name1)
11225 2 => True, -- Left_Opnd (Node2)
11226 3 => True, -- Right_Opnd (Node3)
11227 4 => False, -- Entity (Node4-Sem)
11228 5 => False), -- Etype (Node5-Sem)
11229
11230 N_Op_Shift_Right =>
11231 (1 => True, -- Chars (Name1)
11232 2 => True, -- Left_Opnd (Node2)
11233 3 => True, -- Right_Opnd (Node3)
11234 4 => False, -- Entity (Node4-Sem)
11235 5 => False), -- Etype (Node5-Sem)
11236
11237 N_Delta_Constraint =>
11238 (1 => False, -- unused
11239 2 => False, -- unused
11240 3 => True, -- Delta_Expression (Node3)
11241 4 => True, -- Range_Constraint (Node4)
11242 5 => False), -- unused
11243
11244 N_At_Clause =>
11245 (1 => True, -- Identifier (Node1)
11246 2 => False, -- unused
11247 3 => True, -- Expression (Node3)
11248 4 => False, -- unused
11249 5 => False), -- unused
11250
11251 N_Mod_Clause =>
11252 (1 => False, -- unused
11253 2 => False, -- unused
11254 3 => True, -- Expression (Node3)
11255 4 => True, -- Pragmas_Before (List4)
11256 5 => False), -- unused
11257
11258 N_Conditional_Expression =>
11259 (1 => True, -- Expressions (List1)
11260 2 => False, -- Then_Actions (List2-Sem)
11261 3 => False, -- Else_Actions (List3-Sem)
11262 4 => False, -- unused
11263 5 => False), -- Etype (Node5-Sem)
11264
11265 N_Expanded_Name =>
11266 (1 => True, -- Chars (Name1)
11267 2 => True, -- Selector_Name (Node2)
11268 3 => True, -- Prefix (Node3)
11269 4 => False, -- Entity (Node4-Sem)
11270 5 => False), -- Etype (Node5-Sem)
11271
11272 N_Expression_With_Actions =>
11273 (1 => True, -- Actions (List1)
11274 2 => False, -- unused
11275 3 => True, -- Expression (Node3)
11276 4 => False, -- unused
11277 5 => False), -- unused
11278
11279 N_Free_Statement =>
11280 (1 => False, -- Storage_Pool (Node1-Sem)
11281 2 => False, -- Procedure_To_Call (Node2-Sem)
11282 3 => True, -- Expression (Node3)
11283 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
11284 5 => False), -- unused
11285
11286 N_Freeze_Entity =>
11287 (1 => True, -- Actions (List1)
11288 2 => False, -- Access_Types_To_Process (Elist2-Sem)
11289 3 => False, -- TSS_Elist (Elist3-Sem)
11290 4 => False, -- Entity (Node4-Sem)
11291 5 => False), -- First_Subtype_Link (Node5-Sem)
11292
11293 N_Implicit_Label_Declaration =>
11294 (1 => True, -- Defining_Identifier (Node1)
11295 2 => False, -- Label_Construct (Node2-Sem)
11296 3 => False, -- unused
11297 4 => False, -- unused
11298 5 => False), -- unused
11299
11300 N_Itype_Reference =>
11301 (1 => False, -- Itype (Node1-Sem)
11302 2 => False, -- unused
11303 3 => False, -- unused
11304 4 => False, -- unused
11305 5 => False), -- unused
11306
11307 N_Raise_Constraint_Error =>
11308 (1 => True, -- Condition (Node1)
11309 2 => False, -- unused
11310 3 => True, -- Reason (Uint3)
11311 4 => False, -- unused
11312 5 => False), -- Etype (Node5-Sem)
11313
11314 N_Raise_Program_Error =>
11315 (1 => True, -- Condition (Node1)
11316 2 => False, -- unused
11317 3 => True, -- Reason (Uint3)
11318 4 => False, -- unused
11319 5 => False), -- Etype (Node5-Sem)
11320
11321 N_Raise_Storage_Error =>
11322 (1 => True, -- Condition (Node1)
11323 2 => False, -- unused
11324 3 => True, -- Reason (Uint3)
11325 4 => False, -- unused
11326 5 => False), -- Etype (Node5-Sem)
11327
11328 N_Push_Constraint_Error_Label =>
11329 (1 => False, -- unused
11330 2 => False, -- unused
11331 3 => False, -- unused
11332 4 => False, -- unused
11333 5 => False), -- unused
11334
11335 N_Push_Program_Error_Label =>
11336 (1 => False, -- Exception_Label
11337 2 => False, -- unused
11338 3 => False, -- unused
11339 4 => False, -- unused
11340 5 => False), -- Exception_Label
11341
11342 N_Push_Storage_Error_Label =>
11343 (1 => False, -- Exception_Label
11344 2 => False, -- unused
11345 3 => False, -- unused
11346 4 => False, -- unused
11347 5 => False), -- Exception_Label
11348
11349 N_Pop_Constraint_Error_Label =>
11350 (1 => False, -- unused
11351 2 => False, -- unused
11352 3 => False, -- unused
11353 4 => False, -- unused
11354 5 => False), -- unused
11355
11356 N_Pop_Program_Error_Label =>
11357 (1 => False, -- unused
11358 2 => False, -- unused
11359 3 => False, -- unused
11360 4 => False, -- unused
11361 5 => False), -- unused
11362
11363 N_Pop_Storage_Error_Label =>
11364 (1 => False, -- unused
11365 2 => False, -- unused
11366 3 => False, -- unused
11367 4 => False, -- unused
11368 5 => False), -- unused
11369
11370 N_Reference =>
11371 (1 => False, -- unused
11372 2 => False, -- unused
11373 3 => True, -- Prefix (Node3)
11374 4 => False, -- unused
11375 5 => False), -- Etype (Node5-Sem)
11376
11377 N_Subprogram_Info =>
11378 (1 => True, -- Identifier (Node1)
11379 2 => False, -- unused
11380 3 => False, -- unused
11381 4 => False, -- unused
11382 5 => False), -- Etype (Node5-Sem)
11383
11384 N_Unchecked_Expression =>
11385 (1 => False, -- unused
11386 2 => False, -- unused
11387 3 => True, -- Expression (Node3)
11388 4 => False, -- unused
11389 5 => False), -- Etype (Node5-Sem)
11390
11391 N_Unchecked_Type_Conversion =>
11392 (1 => False, -- unused
11393 2 => False, -- unused
11394 3 => True, -- Expression (Node3)
11395 4 => True, -- Subtype_Mark (Node4)
11396 5 => False), -- Etype (Node5-Sem)
11397
11398 N_Validate_Unchecked_Conversion =>
11399 (1 => False, -- Source_Type (Node1-Sem)
11400 2 => False, -- Target_Type (Node2-Sem)
11401 3 => False, -- unused
11402 4 => False, -- unused
11403 5 => False), -- unused
11404
11405 -- Entries for SCIL nodes
11406
11407 N_SCIL_Dispatch_Table_Tag_Init =>
11408 (1 => False, -- unused
11409 2 => False, -- unused
11410 3 => False, -- unused
11411 4 => False, -- SCIL_Entity (Node4-Sem)
11412 5 => False), -- unused
11413
11414 N_SCIL_Dispatching_Call =>
11415 (1 => False, -- unused
11416 2 => False, -- SCIL_Target_Prim (Node2-Sem)
11417 3 => False, -- unused
11418 4 => False, -- SCIL_Entity (Node4-Sem)
11419 5 => False), -- SCIL_Controlling_Tag (Node5-Sem)
11420
11421 N_SCIL_Membership_Test =>
11422 (1 => False, -- unused
11423 2 => False, -- unused
11424 3 => False, -- unused
11425 4 => False, -- SCIL_Entity (Node4-Sem)
11426 5 => False), -- SCIL_Tag_Value (Node5-Sem)
11427
11428 -- Entries for Empty, Error and Unused. Even thought these have a Chars
11429 -- field for debugging purposes, they are not really syntactic fields, so
11430 -- we mark all fields as unused.
11431
11432 N_Empty =>
11433 (1 => False, -- unused
11434 2 => False, -- unused
11435 3 => False, -- unused
11436 4 => False, -- unused
11437 5 => False), -- unused
11438
11439 N_Error =>
11440 (1 => False, -- unused
11441 2 => False, -- unused
11442 3 => False, -- unused
11443 4 => False, -- unused
11444 5 => False), -- unused
11445
11446 N_Unused_At_Start =>
11447 (1 => False, -- unused
11448 2 => False, -- unused
11449 3 => False, -- unused
11450 4 => False, -- unused
11451 5 => False), -- unused
11452
11453 N_Unused_At_End =>
11454 (1 => False, -- unused
11455 2 => False, -- unused
11456 3 => False, -- unused
11457 4 => False, -- unused
11458 5 => False)); -- unused
11459
11460 --------------------
11461 -- Inline Pragmas --
11462 --------------------
11463
11464 pragma Inline (ABE_Is_Certain);
11465 pragma Inline (Abort_Present);
11466 pragma Inline (Abortable_Part);
11467 pragma Inline (Abstract_Present);
11468 pragma Inline (Accept_Handler_Records);
11469 pragma Inline (Accept_Statement);
11470 pragma Inline (Access_Definition);
11471 pragma Inline (Access_To_Subprogram_Definition);
11472 pragma Inline (Access_Types_To_Process);
11473 pragma Inline (Actions);
11474 pragma Inline (Activation_Chain_Entity);
11475 pragma Inline (Acts_As_Spec);
11476 pragma Inline (Actual_Designated_Subtype);
11477 pragma Inline (Address_Warning_Posted);
11478 pragma Inline (Aggregate_Bounds);
11479 pragma Inline (Aliased_Present);
11480 pragma Inline (All_Others);
11481 pragma Inline (All_Present);
11482 pragma Inline (Alternatives);
11483 pragma Inline (Ancestor_Part);
11484 pragma Inline (Array_Aggregate);
11485 pragma Inline (Aspect_Cancel);
11486 pragma Inline (Aspect_Rep_Item);
11487 pragma Inline (Assignment_OK);
11488 pragma Inline (Associated_Node);
11489 pragma Inline (At_End_Proc);
11490 pragma Inline (Attribute_Name);
11491 pragma Inline (Aux_Decls_Node);
11492 pragma Inline (Backwards_OK);
11493 pragma Inline (Bad_Is_Detected);
11494 pragma Inline (Body_To_Inline);
11495 pragma Inline (Body_Required);
11496 pragma Inline (By_Ref);
11497 pragma Inline (Box_Present);
11498 pragma Inline (Char_Literal_Value);
11499 pragma Inline (Chars);
11500 pragma Inline (Check_Address_Alignment);
11501 pragma Inline (Choice_Parameter);
11502 pragma Inline (Choices);
11503 pragma Inline (Class_Present);
11504 pragma Inline (Coextensions);
11505 pragma Inline (Comes_From_Extended_Return_Statement);
11506 pragma Inline (Compile_Time_Known_Aggregate);
11507 pragma Inline (Component_Associations);
11508 pragma Inline (Component_Clauses);
11509 pragma Inline (Component_Definition);
11510 pragma Inline (Component_Items);
11511 pragma Inline (Component_List);
11512 pragma Inline (Component_Name);
11513 pragma Inline (Componentwise_Assignment);
11514 pragma Inline (Condition);
11515 pragma Inline (Condition_Actions);
11516 pragma Inline (Config_Pragmas);
11517 pragma Inline (Constant_Present);
11518 pragma Inline (Constraint);
11519 pragma Inline (Constraints);
11520 pragma Inline (Context_Installed);
11521 pragma Inline (Context_Items);
11522 pragma Inline (Context_Pending);
11523 pragma Inline (Controlling_Argument);
11524 pragma Inline (Conversion_OK);
11525 pragma Inline (Corresponding_Body);
11526 pragma Inline (Corresponding_Formal_Spec);
11527 pragma Inline (Corresponding_Generic_Association);
11528 pragma Inline (Corresponding_Integer_Value);
11529 pragma Inline (Corresponding_Spec);
11530 pragma Inline (Corresponding_Stub);
11531 pragma Inline (Dcheck_Function);
11532 pragma Inline (Debug_Statement);
11533 pragma Inline (Declarations);
11534 pragma Inline (Default_Expression);
11535 pragma Inline (Default_Name);
11536 pragma Inline (Defining_Identifier);
11537 pragma Inline (Defining_Unit_Name);
11538 pragma Inline (Delay_Alternative);
11539 pragma Inline (Delay_Statement);
11540 pragma Inline (Delta_Expression);
11541 pragma Inline (Digits_Expression);
11542 pragma Inline (Discr_Check_Funcs_Built);
11543 pragma Inline (Discrete_Choices);
11544 pragma Inline (Discrete_Range);
11545 pragma Inline (Discrete_Subtype_Definition);
11546 pragma Inline (Discrete_Subtype_Definitions);
11547 pragma Inline (Discriminant_Specifications);
11548 pragma Inline (Discriminant_Type);
11549 pragma Inline (Do_Accessibility_Check);
11550 pragma Inline (Do_Discriminant_Check);
11551 pragma Inline (Do_Length_Check);
11552 pragma Inline (Do_Division_Check);
11553 pragma Inline (Do_Overflow_Check);
11554 pragma Inline (Do_Range_Check);
11555 pragma Inline (Do_Storage_Check);
11556 pragma Inline (Do_Tag_Check);
11557 pragma Inline (Elaborate_Present);
11558 pragma Inline (Elaborate_All_Desirable);
11559 pragma Inline (Elaborate_All_Present);
11560 pragma Inline (Elaborate_Desirable);
11561 pragma Inline (Elaboration_Boolean);
11562 pragma Inline (Else_Actions);
11563 pragma Inline (Else_Statements);
11564 pragma Inline (Elsif_Parts);
11565 pragma Inline (Enclosing_Variant);
11566 pragma Inline (End_Label);
11567 pragma Inline (End_Span);
11568 pragma Inline (Entity);
11569 pragma Inline (Entity_Or_Associated_Node);
11570 pragma Inline (Entry_Body_Formal_Part);
11571 pragma Inline (Entry_Call_Alternative);
11572 pragma Inline (Entry_Call_Statement);
11573 pragma Inline (Entry_Direct_Name);
11574 pragma Inline (Entry_Index);
11575 pragma Inline (Entry_Index_Specification);
11576 pragma Inline (Etype);
11577 pragma Inline (Exception_Choices);
11578 pragma Inline (Exception_Handlers);
11579 pragma Inline (Exception_Junk);
11580 pragma Inline (Exception_Label);
11581 pragma Inline (Expansion_Delayed);
11582 pragma Inline (Explicit_Actual_Parameter);
11583 pragma Inline (Explicit_Generic_Actual_Parameter);
11584 pragma Inline (Expression);
11585 pragma Inline (Expressions);
11586 pragma Inline (First_Bit);
11587 pragma Inline (First_Inlined_Subprogram);
11588 pragma Inline (First_Name);
11589 pragma Inline (First_Named_Actual);
11590 pragma Inline (First_Real_Statement);
11591 pragma Inline (First_Subtype_Link);
11592 pragma Inline (Float_Truncate);
11593 pragma Inline (Formal_Type_Definition);
11594 pragma Inline (Forwards_OK);
11595 pragma Inline (From_Aspect_Specification);
11596 pragma Inline (From_At_End);
11597 pragma Inline (From_At_Mod);
11598 pragma Inline (From_Default);
11599 pragma Inline (Generic_Associations);
11600 pragma Inline (Generic_Formal_Declarations);
11601 pragma Inline (Generic_Parent);
11602 pragma Inline (Generic_Parent_Type);
11603 pragma Inline (Handled_Statement_Sequence);
11604 pragma Inline (Handler_List_Entry);
11605 pragma Inline (Has_Created_Identifier);
11606 pragma Inline (Has_Dynamic_Length_Check);
11607 pragma Inline (Has_Dynamic_Range_Check);
11608 pragma Inline (Has_Init_Expression);
11609 pragma Inline (Has_Local_Raise);
11610 pragma Inline (Has_Self_Reference);
11611 pragma Inline (Has_No_Elaboration_Code);
11612 pragma Inline (Has_Pragma_Priority);
11613 pragma Inline (Has_Pragma_Suppress_All);
11614 pragma Inline (Has_Private_View);
11615 pragma Inline (Has_Relative_Deadline_Pragma);
11616 pragma Inline (Has_Storage_Size_Pragma);
11617 pragma Inline (Has_Task_Info_Pragma);
11618 pragma Inline (Has_Task_Name_Pragma);
11619 pragma Inline (Has_Wide_Character);
11620 pragma Inline (Has_Wide_Wide_Character);
11621 pragma Inline (Hidden_By_Use_Clause);
11622 pragma Inline (High_Bound);
11623 pragma Inline (Identifier);
11624 pragma Inline (Implicit_With);
11625 pragma Inline (Interface_List);
11626 pragma Inline (Interface_Present);
11627 pragma Inline (Includes_Infinities);
11628 pragma Inline (Import_Interface_Present);
11629 pragma Inline (In_Present);
11630 pragma Inline (Inherited_Discriminant);
11631 pragma Inline (Instance_Spec);
11632 pragma Inline (Intval);
11633 pragma Inline (Is_Accessibility_Actual);
11634 pragma Inline (Is_Asynchronous_Call_Block);
11635 pragma Inline (Is_Component_Left_Opnd);
11636 pragma Inline (Is_Component_Right_Opnd);
11637 pragma Inline (Is_Controlling_Actual);
11638 pragma Inline (Is_Delayed_Aspect);
11639 pragma Inline (Is_Dynamic_Coextension);
11640 pragma Inline (Is_Elsif);
11641 pragma Inline (Is_Entry_Barrier_Function);
11642 pragma Inline (Is_Expanded_Build_In_Place_Call);
11643 pragma Inline (Is_Folded_In_Parser);
11644 pragma Inline (Is_In_Discriminant_Check);
11645 pragma Inline (Is_Machine_Number);
11646 pragma Inline (Is_Null_Loop);
11647 pragma Inline (Is_Overloaded);
11648 pragma Inline (Is_Power_Of_2_For_Shift);
11649 pragma Inline (Is_Protected_Subprogram_Body);
11650 pragma Inline (Is_Static_Coextension);
11651 pragma Inline (Is_Static_Expression);
11652 pragma Inline (Is_Subprogram_Descriptor);
11653 pragma Inline (Is_Task_Allocation_Block);
11654 pragma Inline (Is_Task_Master);
11655 pragma Inline (Iteration_Scheme);
11656 pragma Inline (Itype);
11657 pragma Inline (Kill_Range_Check);
11658 pragma Inline (Last_Bit);
11659 pragma Inline (Last_Name);
11660 pragma Inline (Library_Unit);
11661 pragma Inline (Label_Construct);
11662 pragma Inline (Left_Opnd);
11663 pragma Inline (Limited_View_Installed);
11664 pragma Inline (Limited_Present);
11665 pragma Inline (Literals);
11666 pragma Inline (Local_Raise_Not_OK);
11667 pragma Inline (Local_Raise_Statements);
11668 pragma Inline (Loop_Actions);
11669 pragma Inline (Loop_Parameter_Specification);
11670 pragma Inline (Low_Bound);
11671 pragma Inline (Mod_Clause);
11672 pragma Inline (More_Ids);
11673 pragma Inline (Must_Be_Byte_Aligned);
11674 pragma Inline (Must_Not_Freeze);
11675 pragma Inline (Must_Not_Override);
11676 pragma Inline (Must_Override);
11677 pragma Inline (Name);
11678 pragma Inline (Names);
11679 pragma Inline (Next_Entity);
11680 pragma Inline (Next_Exit_Statement);
11681 pragma Inline (Next_Implicit_With);
11682 pragma Inline (Next_Named_Actual);
11683 pragma Inline (Next_Pragma);
11684 pragma Inline (Next_Rep_Item);
11685 pragma Inline (Next_Use_Clause);
11686 pragma Inline (No_Ctrl_Actions);
11687 pragma Inline (No_Elaboration_Check);
11688 pragma Inline (No_Entities_Ref_In_Spec);
11689 pragma Inline (No_Initialization);
11690 pragma Inline (No_Truncation);
11691 pragma Inline (Null_Present);
11692 pragma Inline (Null_Exclusion_Present);
11693 pragma Inline (Null_Exclusion_In_Return_Present);
11694 pragma Inline (Null_Record_Present);
11695 pragma Inline (Object_Definition);
11696 pragma Inline (Original_Discriminant);
11697 pragma Inline (Original_Entity);
11698 pragma Inline (Others_Discrete_Choices);
11699 pragma Inline (Out_Present);
11700 pragma Inline (Parameter_Associations);
11701 pragma Inline (Parameter_Specifications);
11702 pragma Inline (Parameter_List_Truncated);
11703 pragma Inline (Parameter_Type);
11704 pragma Inline (Parent_Spec);
11705 pragma Inline (Position);
11706 pragma Inline (Pragma_Argument_Associations);
11707 pragma Inline (Pragma_Enabled);
11708 pragma Inline (Pragma_Identifier);
11709 pragma Inline (Pragmas_After);
11710 pragma Inline (Pragmas_Before);
11711 pragma Inline (Prefix);
11712 pragma Inline (Present_Expr);
11713 pragma Inline (Prev_Ids);
11714 pragma Inline (Print_In_Hex);
11715 pragma Inline (Private_Declarations);
11716 pragma Inline (Private_Present);
11717 pragma Inline (Procedure_To_Call);
11718 pragma Inline (Proper_Body);
11719 pragma Inline (Protected_Definition);
11720 pragma Inline (Protected_Present);
11721 pragma Inline (Raises_Constraint_Error);
11722 pragma Inline (Range_Constraint);
11723 pragma Inline (Range_Expression);
11724 pragma Inline (Real_Range_Specification);
11725 pragma Inline (Realval);
11726 pragma Inline (Reason);
11727 pragma Inline (Record_Extension_Part);
11728 pragma Inline (Redundant_Use);
11729 pragma Inline (Renaming_Exception);
11730 pragma Inline (Result_Definition);
11731 pragma Inline (Return_Object_Declarations);
11732 pragma Inline (Return_Statement_Entity);
11733 pragma Inline (Reverse_Present);
11734 pragma Inline (Right_Opnd);
11735 pragma Inline (Rounded_Result);
11736 pragma Inline (SCIL_Controlling_Tag);
11737 pragma Inline (SCIL_Entity);
11738 pragma Inline (SCIL_Tag_Value);
11739 pragma Inline (SCIL_Target_Prim);
11740 pragma Inline (Scope);
11741 pragma Inline (Select_Alternatives);
11742 pragma Inline (Selector_Name);
11743 pragma Inline (Selector_Names);
11744 pragma Inline (Shift_Count_OK);
11745 pragma Inline (Source_Type);
11746 pragma Inline (Specification);
11747 pragma Inline (Statements);
11748 pragma Inline (Static_Processing_OK);
11749 pragma Inline (Storage_Pool);
11750 pragma Inline (Strval);
11751 pragma Inline (Subtype_Indication);
11752 pragma Inline (Subtype_Mark);
11753 pragma Inline (Subtype_Marks);
11754 pragma Inline (Suppress_Loop_Warnings);
11755 pragma Inline (Synchronized_Present);
11756 pragma Inline (Tagged_Present);
11757 pragma Inline (Target_Type);
11758 pragma Inline (Task_Definition);
11759 pragma Inline (Task_Present);
11760 pragma Inline (Then_Actions);
11761 pragma Inline (Then_Statements);
11762 pragma Inline (Triggering_Alternative);
11763 pragma Inline (Triggering_Statement);
11764 pragma Inline (Treat_Fixed_As_Integer);
11765 pragma Inline (TSS_Elist);
11766 pragma Inline (Type_Definition);
11767 pragma Inline (Unit);
11768 pragma Inline (Unknown_Discriminants_Present);
11769 pragma Inline (Unreferenced_In_Spec);
11770 pragma Inline (Variant_Part);
11771 pragma Inline (Variants);
11772 pragma Inline (Visible_Declarations);
11773 pragma Inline (Was_Originally_Stub);
11774 pragma Inline (Withed_Body);
11775 pragma Inline (Zero_Cost_Handling);
11776
11777 pragma Inline (Set_ABE_Is_Certain);
11778 pragma Inline (Set_Abort_Present);
11779 pragma Inline (Set_Abortable_Part);
11780 pragma Inline (Set_Abstract_Present);
11781 pragma Inline (Set_Accept_Handler_Records);
11782 pragma Inline (Set_Accept_Statement);
11783 pragma Inline (Set_Access_Definition);
11784 pragma Inline (Set_Access_To_Subprogram_Definition);
11785 pragma Inline (Set_Access_Types_To_Process);
11786 pragma Inline (Set_Actions);
11787 pragma Inline (Set_Activation_Chain_Entity);
11788 pragma Inline (Set_Acts_As_Spec);
11789 pragma Inline (Set_Actual_Designated_Subtype);
11790 pragma Inline (Set_Address_Warning_Posted);
11791 pragma Inline (Set_Aggregate_Bounds);
11792 pragma Inline (Set_Aliased_Present);
11793 pragma Inline (Set_All_Others);
11794 pragma Inline (Set_All_Present);
11795 pragma Inline (Set_Alternatives);
11796 pragma Inline (Set_Ancestor_Part);
11797 pragma Inline (Set_Array_Aggregate);
11798 pragma Inline (Set_Aspect_Cancel);
11799 pragma Inline (Set_Aspect_Rep_Item);
11800 pragma Inline (Set_Assignment_OK);
11801 pragma Inline (Set_Associated_Node);
11802 pragma Inline (Set_At_End_Proc);
11803 pragma Inline (Set_Attribute_Name);
11804 pragma Inline (Set_Aux_Decls_Node);
11805 pragma Inline (Set_Backwards_OK);
11806 pragma Inline (Set_Bad_Is_Detected);
11807 pragma Inline (Set_Body_To_Inline);
11808 pragma Inline (Set_Body_Required);
11809 pragma Inline (Set_By_Ref);
11810 pragma Inline (Set_Box_Present);
11811 pragma Inline (Set_Char_Literal_Value);
11812 pragma Inline (Set_Chars);
11813 pragma Inline (Set_Check_Address_Alignment);
11814 pragma Inline (Set_Choice_Parameter);
11815 pragma Inline (Set_Choices);
11816 pragma Inline (Set_Class_Present);
11817 pragma Inline (Set_Coextensions);
11818 pragma Inline (Set_Comes_From_Extended_Return_Statement);
11819 pragma Inline (Set_Compile_Time_Known_Aggregate);
11820 pragma Inline (Set_Component_Associations);
11821 pragma Inline (Set_Component_Clauses);
11822 pragma Inline (Set_Component_Definition);
11823 pragma Inline (Set_Component_Items);
11824 pragma Inline (Set_Component_List);
11825 pragma Inline (Set_Component_Name);
11826 pragma Inline (Set_Componentwise_Assignment);
11827 pragma Inline (Set_Condition);
11828 pragma Inline (Set_Condition_Actions);
11829 pragma Inline (Set_Config_Pragmas);
11830 pragma Inline (Set_Constant_Present);
11831 pragma Inline (Set_Constraint);
11832 pragma Inline (Set_Constraints);
11833 pragma Inline (Set_Context_Installed);
11834 pragma Inline (Set_Context_Items);
11835 pragma Inline (Set_Context_Pending);
11836 pragma Inline (Set_Controlling_Argument);
11837 pragma Inline (Set_Conversion_OK);
11838 pragma Inline (Set_Corresponding_Body);
11839 pragma Inline (Set_Corresponding_Formal_Spec);
11840 pragma Inline (Set_Corresponding_Generic_Association);
11841 pragma Inline (Set_Corresponding_Integer_Value);
11842 pragma Inline (Set_Corresponding_Spec);
11843 pragma Inline (Set_Corresponding_Stub);
11844 pragma Inline (Set_Dcheck_Function);
11845 pragma Inline (Set_Debug_Statement);
11846 pragma Inline (Set_Declarations);
11847 pragma Inline (Set_Default_Expression);
11848 pragma Inline (Set_Default_Name);
11849 pragma Inline (Set_Defining_Identifier);
11850 pragma Inline (Set_Defining_Unit_Name);
11851 pragma Inline (Set_Delay_Alternative);
11852 pragma Inline (Set_Delay_Statement);
11853 pragma Inline (Set_Delta_Expression);
11854 pragma Inline (Set_Digits_Expression);
11855 pragma Inline (Set_Discr_Check_Funcs_Built);
11856 pragma Inline (Set_Discrete_Choices);
11857 pragma Inline (Set_Discrete_Range);
11858 pragma Inline (Set_Discrete_Subtype_Definition);
11859 pragma Inline (Set_Discrete_Subtype_Definitions);
11860 pragma Inline (Set_Discriminant_Specifications);
11861 pragma Inline (Set_Discriminant_Type);
11862 pragma Inline (Set_Do_Accessibility_Check);
11863 pragma Inline (Set_Do_Discriminant_Check);
11864 pragma Inline (Set_Do_Length_Check);
11865 pragma Inline (Set_Do_Division_Check);
11866 pragma Inline (Set_Do_Overflow_Check);
11867 pragma Inline (Set_Do_Range_Check);
11868 pragma Inline (Set_Do_Storage_Check);
11869 pragma Inline (Set_Do_Tag_Check);
11870 pragma Inline (Set_Elaborate_Present);
11871 pragma Inline (Set_Elaborate_All_Desirable);
11872 pragma Inline (Set_Elaborate_All_Present);
11873 pragma Inline (Set_Elaborate_Desirable);
11874 pragma Inline (Set_Elaboration_Boolean);
11875 pragma Inline (Set_Else_Actions);
11876 pragma Inline (Set_Else_Statements);
11877 pragma Inline (Set_Elsif_Parts);
11878 pragma Inline (Set_Enclosing_Variant);
11879 pragma Inline (Set_End_Label);
11880 pragma Inline (Set_End_Span);
11881 pragma Inline (Set_Entity);
11882 pragma Inline (Set_Entry_Body_Formal_Part);
11883 pragma Inline (Set_Entry_Call_Alternative);
11884 pragma Inline (Set_Entry_Call_Statement);
11885 pragma Inline (Set_Entry_Direct_Name);
11886 pragma Inline (Set_Entry_Index);
11887 pragma Inline (Set_Entry_Index_Specification);
11888 pragma Inline (Set_Etype);
11889 pragma Inline (Set_Exception_Choices);
11890 pragma Inline (Set_Exception_Handlers);
11891 pragma Inline (Set_Exception_Junk);
11892 pragma Inline (Set_Exception_Label);
11893 pragma Inline (Set_Expansion_Delayed);
11894 pragma Inline (Set_Explicit_Actual_Parameter);
11895 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
11896 pragma Inline (Set_Expression);
11897 pragma Inline (Set_Expressions);
11898 pragma Inline (Set_First_Bit);
11899 pragma Inline (Set_First_Inlined_Subprogram);
11900 pragma Inline (Set_First_Name);
11901 pragma Inline (Set_First_Named_Actual);
11902 pragma Inline (Set_First_Real_Statement);
11903 pragma Inline (Set_First_Subtype_Link);
11904 pragma Inline (Set_Float_Truncate);
11905 pragma Inline (Set_Formal_Type_Definition);
11906 pragma Inline (Set_Forwards_OK);
11907 pragma Inline (Set_From_Aspect_Specification);
11908 pragma Inline (Set_From_At_End);
11909 pragma Inline (Set_From_At_Mod);
11910 pragma Inline (Set_From_Default);
11911 pragma Inline (Set_Generic_Associations);
11912 pragma Inline (Set_Generic_Formal_Declarations);
11913 pragma Inline (Set_Generic_Parent);
11914 pragma Inline (Set_Generic_Parent_Type);
11915 pragma Inline (Set_Handled_Statement_Sequence);
11916 pragma Inline (Set_Handler_List_Entry);
11917 pragma Inline (Set_Has_Created_Identifier);
11918 pragma Inline (Set_Has_Dynamic_Length_Check);
11919 pragma Inline (Set_Has_Init_Expression);
11920 pragma Inline (Set_Has_Local_Raise);
11921 pragma Inline (Set_Has_Dynamic_Range_Check);
11922 pragma Inline (Set_Has_No_Elaboration_Code);
11923 pragma Inline (Set_Has_Pragma_Priority);
11924 pragma Inline (Set_Has_Pragma_Suppress_All);
11925 pragma Inline (Set_Has_Private_View);
11926 pragma Inline (Set_Has_Relative_Deadline_Pragma);
11927 pragma Inline (Set_Has_Storage_Size_Pragma);
11928 pragma Inline (Set_Has_Task_Info_Pragma);
11929 pragma Inline (Set_Has_Task_Name_Pragma);
11930 pragma Inline (Set_Has_Wide_Character);
11931 pragma Inline (Set_Has_Wide_Wide_Character);
11932 pragma Inline (Set_Hidden_By_Use_Clause);
11933 pragma Inline (Set_High_Bound);
11934 pragma Inline (Set_Identifier);
11935 pragma Inline (Set_Implicit_With);
11936 pragma Inline (Set_Includes_Infinities);
11937 pragma Inline (Set_Interface_List);
11938 pragma Inline (Set_Interface_Present);
11939 pragma Inline (Set_Import_Interface_Present);
11940 pragma Inline (Set_In_Present);
11941 pragma Inline (Set_Inherited_Discriminant);
11942 pragma Inline (Set_Instance_Spec);
11943 pragma Inline (Set_Intval);
11944 pragma Inline (Set_Is_Accessibility_Actual);
11945 pragma Inline (Set_Is_Asynchronous_Call_Block);
11946 pragma Inline (Set_Is_Component_Left_Opnd);
11947 pragma Inline (Set_Is_Component_Right_Opnd);
11948 pragma Inline (Set_Is_Controlling_Actual);
11949 pragma Inline (Set_Is_Delayed_Aspect);
11950 pragma Inline (Set_Is_Dynamic_Coextension);
11951 pragma Inline (Set_Is_Elsif);
11952 pragma Inline (Set_Is_Entry_Barrier_Function);
11953 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
11954 pragma Inline (Set_Is_Folded_In_Parser);
11955 pragma Inline (Set_Is_In_Discriminant_Check);
11956 pragma Inline (Set_Is_Machine_Number);
11957 pragma Inline (Set_Is_Null_Loop);
11958 pragma Inline (Set_Is_Overloaded);
11959 pragma Inline (Set_Is_Power_Of_2_For_Shift);
11960 pragma Inline (Set_Is_Protected_Subprogram_Body);
11961 pragma Inline (Set_Has_Self_Reference);
11962 pragma Inline (Set_Is_Static_Coextension);
11963 pragma Inline (Set_Is_Static_Expression);
11964 pragma Inline (Set_Is_Subprogram_Descriptor);
11965 pragma Inline (Set_Is_Task_Allocation_Block);
11966 pragma Inline (Set_Is_Task_Master);
11967 pragma Inline (Set_Iteration_Scheme);
11968 pragma Inline (Set_Itype);
11969 pragma Inline (Set_Kill_Range_Check);
11970 pragma Inline (Set_Last_Bit);
11971 pragma Inline (Set_Last_Name);
11972 pragma Inline (Set_Library_Unit);
11973 pragma Inline (Set_Label_Construct);
11974 pragma Inline (Set_Left_Opnd);
11975 pragma Inline (Set_Limited_View_Installed);
11976 pragma Inline (Set_Limited_Present);
11977 pragma Inline (Set_Literals);
11978 pragma Inline (Set_Local_Raise_Not_OK);
11979 pragma Inline (Set_Local_Raise_Statements);
11980 pragma Inline (Set_Loop_Actions);
11981 pragma Inline (Set_Loop_Parameter_Specification);
11982 pragma Inline (Set_Low_Bound);
11983 pragma Inline (Set_Mod_Clause);
11984 pragma Inline (Set_More_Ids);
11985 pragma Inline (Set_Must_Be_Byte_Aligned);
11986 pragma Inline (Set_Must_Not_Freeze);
11987 pragma Inline (Set_Must_Not_Override);
11988 pragma Inline (Set_Must_Override);
11989 pragma Inline (Set_Name);
11990 pragma Inline (Set_Names);
11991 pragma Inline (Set_Next_Entity);
11992 pragma Inline (Set_Next_Exit_Statement);
11993 pragma Inline (Set_Next_Implicit_With);
11994 pragma Inline (Set_Next_Named_Actual);
11995 pragma Inline (Set_Next_Pragma);
11996 pragma Inline (Set_Next_Rep_Item);
11997 pragma Inline (Set_Next_Use_Clause);
11998 pragma Inline (Set_No_Ctrl_Actions);
11999 pragma Inline (Set_No_Elaboration_Check);
12000 pragma Inline (Set_No_Entities_Ref_In_Spec);
12001 pragma Inline (Set_No_Initialization);
12002 pragma Inline (Set_No_Truncation);
12003 pragma Inline (Set_Null_Present);
12004 pragma Inline (Set_Null_Exclusion_Present);
12005 pragma Inline (Set_Null_Exclusion_In_Return_Present);
12006 pragma Inline (Set_Null_Record_Present);
12007 pragma Inline (Set_Object_Definition);
12008 pragma Inline (Set_Original_Discriminant);
12009 pragma Inline (Set_Original_Entity);
12010 pragma Inline (Set_Others_Discrete_Choices);
12011 pragma Inline (Set_Out_Present);
12012 pragma Inline (Set_Parameter_Associations);
12013 pragma Inline (Set_Parameter_Specifications);
12014 pragma Inline (Set_Parameter_List_Truncated);
12015 pragma Inline (Set_Parameter_Type);
12016 pragma Inline (Set_Parent_Spec);
12017 pragma Inline (Set_Position);
12018 pragma Inline (Set_Pragma_Argument_Associations);
12019 pragma Inline (Set_Pragma_Enabled);
12020 pragma Inline (Set_Pragma_Identifier);
12021 pragma Inline (Set_Pragmas_After);
12022 pragma Inline (Set_Pragmas_Before);
12023 pragma Inline (Set_Prefix);
12024 pragma Inline (Set_Present_Expr);
12025 pragma Inline (Set_Prev_Ids);
12026 pragma Inline (Set_Print_In_Hex);
12027 pragma Inline (Set_Private_Declarations);
12028 pragma Inline (Set_Private_Present);
12029 pragma Inline (Set_Procedure_To_Call);
12030 pragma Inline (Set_Proper_Body);
12031 pragma Inline (Set_Protected_Definition);
12032 pragma Inline (Set_Protected_Present);
12033 pragma Inline (Set_Raises_Constraint_Error);
12034 pragma Inline (Set_Range_Constraint);
12035 pragma Inline (Set_Range_Expression);
12036 pragma Inline (Set_Real_Range_Specification);
12037 pragma Inline (Set_Realval);
12038 pragma Inline (Set_Reason);
12039 pragma Inline (Set_Record_Extension_Part);
12040 pragma Inline (Set_Redundant_Use);
12041 pragma Inline (Set_Renaming_Exception);
12042 pragma Inline (Set_Result_Definition);
12043 pragma Inline (Set_Return_Object_Declarations);
12044 pragma Inline (Set_Reverse_Present);
12045 pragma Inline (Set_Right_Opnd);
12046 pragma Inline (Set_Rounded_Result);
12047 pragma Inline (Set_SCIL_Controlling_Tag);
12048 pragma Inline (Set_SCIL_Entity);
12049 pragma Inline (Set_SCIL_Tag_Value);
12050 pragma Inline (Set_SCIL_Target_Prim);
12051 pragma Inline (Set_Scope);
12052 pragma Inline (Set_Select_Alternatives);
12053 pragma Inline (Set_Selector_Name);
12054 pragma Inline (Set_Selector_Names);
12055 pragma Inline (Set_Shift_Count_OK);
12056 pragma Inline (Set_Source_Type);
12057 pragma Inline (Set_Specification);
12058 pragma Inline (Set_Statements);
12059 pragma Inline (Set_Static_Processing_OK);
12060 pragma Inline (Set_Storage_Pool);
12061 pragma Inline (Set_Strval);
12062 pragma Inline (Set_Subtype_Indication);
12063 pragma Inline (Set_Subtype_Mark);
12064 pragma Inline (Set_Subtype_Marks);
12065 pragma Inline (Set_Suppress_Loop_Warnings);
12066 pragma Inline (Set_Synchronized_Present);
12067 pragma Inline (Set_Tagged_Present);
12068 pragma Inline (Set_Target_Type);
12069 pragma Inline (Set_Task_Definition);
12070 pragma Inline (Set_Task_Present);
12071 pragma Inline (Set_Then_Actions);
12072 pragma Inline (Set_Then_Statements);
12073 pragma Inline (Set_Triggering_Alternative);
12074 pragma Inline (Set_Triggering_Statement);
12075 pragma Inline (Set_Treat_Fixed_As_Integer);
12076 pragma Inline (Set_TSS_Elist);
12077 pragma Inline (Set_Type_Definition);
12078 pragma Inline (Set_Unit);
12079 pragma Inline (Set_Unknown_Discriminants_Present);
12080 pragma Inline (Set_Unreferenced_In_Spec);
12081 pragma Inline (Set_Variant_Part);
12082 pragma Inline (Set_Variants);
12083 pragma Inline (Set_Visible_Declarations);
12084 pragma Inline (Set_Was_Originally_Stub);
12085 pragma Inline (Set_Withed_Body);
12086 pragma Inline (Set_Zero_Cost_Handling);
12087
12088 N_Simple_Return_Statement : constant Node_Kind := N_Return_Statement;
12089 -- Rename N_Return_Statement to be N_Simple_Return_Statement. Clients
12090 -- should refer to N_Simple_Return_Statement.
12091
12092 end Sinfo;