[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 these places:
63
64 -- In sinfo.ads:
65 -- The documentation associated with the field (if semantic)
66 -- The documentation associated with the node
67 -- The spec of the access function
68 -- The spec of the set procedure
69 -- The entries in Is_Syntactic_Field
70 -- The pragma Inline for the access function
71 -- The pragma Inline for the set procedure
72 -- In sinfo.adb:
73 -- The body of the access function
74 -- The body of the set procedure
75
76 -- The field chosen must be consistent in all places, and, for a node that
77 -- is a subexpression, must not overlap any of the standard expression
78 -- fields.
79
80 -- In addition, if any of the standard expression fields is changed, then
81 -- the utility program which creates the Treeprs spec (in file treeprs.ads)
82 -- must be updated appropriately, since it special cases expression fields.
83
84 -- If a new tree node is added, then the following changes are made
85
86 -- Add it to the documentation in the appropriate place
87 -- Add its fields to this documentation section
88 -- Define it in the appropriate classification in Node_Kind
89 -- In the body (sinfo), add entries to the access functions for all
90 -- its fields (except standard expression fields) to include the new
91 -- node in the checks.
92 -- Add an appropriate section to the case statement in sprint.adb
93 -- Add an appropriate section to the case statement in sem.adb
94 -- Add an appropriate section to the case statement in exp_util.adb
95 -- (Insert_Actions procedure)
96 -- For a subexpression, add an appropriate section to the case
97 -- statement in sem_eval.adb
98 -- For a subexpression, add an appropriate section to the case
99 -- statement in sem_res.adb
100
101 -- Finally, four utility programs must be run:
102
103 -- Run CSinfo to check that you have made the changes consistently. It
104 -- checks most of the rules given above, with clear error messages. This
105 -- utility reads sinfo.ads and sinfo.adb and generates a report to
106 -- standard output.
107
108 -- Run XSinfo to create sinfo.h, the corresponding C header. This
109 -- utility reads sinfo.ads and generates sinfo.h. Note that it does
110 -- not need to read sinfo.adb, since the contents of the body are
111 -- algorithmically determinable from the spec.
112
113 -- Run XTreeprs to create treeprs.ads, an updated version of the module
114 -- that is used to drive the tree print routine. This utility reads (but
115 -- does not modify) treeprs.adt, the template that provides the basic
116 -- structure of the file, and then fills in the data from the comments
117 -- in sinfo.ads.
118
119 -- Run XNmake to create nmake.ads and nmake.adb, the package body and
120 -- spec of the Nmake package which contains functions for constructing
121 -- nodes.
122
123 -- All of the above steps except CSinfo are done automatically by the
124 -- build scripts when you do a full bootstrap.
125
126 -- Note: sometime we could write a utility that actually generated the body
127 -- of sinfo from the spec instead of simply checking it, since, as noted
128 -- above, the contents of the body can be determined from the spec.
129
130 --------------------------------
131 -- Implicit Nodes in the Tree --
132 --------------------------------
133
134 -- Generally the structure of the tree very closely follows the grammar as
135 -- defined in the RM. However, certain nodes are omitted to save space and
136 -- simplify semantic processing. Two general classes of such omitted nodes
137 -- are as follows:
138
139 -- If the only possibilities for a non-terminal are one or more other
140 -- non-terminals (i.e. the rule is a "skinny" rule), then usually the
141 -- corresponding node is omitted from the tree, and the target construct
142 -- appears directly. For example, a real type definition is either
143 -- floating point definition or a fixed point definition. No explicit node
144 -- appears for real type definition. Instead either the floating point
145 -- definition or fixed point definition appears directly.
146
147 -- If a non-terminal corresponds to a list of some other non-terminal
148 -- (possibly with separating punctuation), then usually it is omitted from
149 -- the tree, and a list of components appears instead. For example,
150 -- sequence of statements does not appear explicitly in the tree. Instead
151 -- a list of statements appears directly.
152
153 -- Some additional cases of omitted nodes occur and are documented
154 -- individually. In particular, many nodes are omitted in the tree
155 -- generated for an expression.
156
157 -------------------------------------------
158 -- Handling of Defining Identifier Lists --
159 -------------------------------------------
160
161 -- In several declarative forms in the syntax, lists of defining
162 -- identifiers appear (object declarations, component declarations, number
163 -- declarations etc.)
164
165 -- The semantics of such statements are equivalent to a series of identical
166 -- declarations of single defining identifiers (except that conformance
167 -- checks require the same grouping of identifiers in the parameter case).
168
169 -- To simplify semantic processing, the parser breaks down such multiple
170 -- declaration cases into sequences of single declarations, duplicating
171 -- type and initialization information as required. The flags More_Ids and
172 -- Prev_Ids are used to record the original form of the source in the case
173 -- where the original source used a list of names, More_Ids being set on
174 -- all but the last name and Prev_Ids being set on all but the first name.
175 -- These flags are used to reconstruct the original source (e.g. in the
176 -- Sprint package), and also are included in the conformance checks, but
177 -- otherwise have no semantic significance.
178
179 -- Note: the reason that we use More_Ids and Prev_Ids rather than
180 -- First_Name and Last_Name flags is so that the flags are off in the
181 -- normal one identifier case, which minimizes tree print output.
182
183 -----------------------
184 -- Use of Node Lists --
185 -----------------------
186
187 -- With a few exceptions, if a construction of the form {non-terminal}
188 -- appears in the tree, lists are used in the corresponding tree node (see
189 -- package Nlists for handling of node lists). In this case a field of the
190 -- parent node points to a list of nodes for the non-terminal. The field
191 -- name for such fields has a plural name which always ends in "s". For
192 -- example, a case statement has a field Alternatives pointing to list of
193 -- case statement alternative nodes.
194
195 -- Only fields pointing to lists have names ending in "s", so generally the
196 -- structure is strongly typed, fields not ending in s point to single
197 -- nodes, and fields ending in s point to lists.
198
199 -- The following example shows how a traversal of a list is written. We
200 -- suppose here that Stmt points to a N_Case_Statement node which has a
201 -- list field called Alternatives:
202
203 -- Alt := First (Alternatives (Stmt));
204 -- while Present (Alt) loop
205 -- ..
206 -- -- processing for case statement alternative Alt
207 -- ..
208 -- Alt := Next (Alt);
209 -- end loop;
210
211 -- The Present function tests for Empty, which in this case signals the end
212 -- of the list. First returns Empty immediately if the list is empty.
213 -- Present is defined in Atree, First and Next are defined in Nlists.
214
215 -- The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
216 -- contexts, which is handled as described in the previous section, and
217 -- with {,library_unit_NAME} in the N_With_Clause mode, which is handled
218 -- using the First_Name and Last_Name flags, as further detailed in the
219 -- description of the N_With_Clause node.
220
221 -------------
222 -- Pragmas --
223 -------------
224
225 -- Pragmas can appear in many different context, but are not included in
226 -- the grammar. Still they must appear in the tree, so they can be properly
227 -- processed.
228
229 -- Two approaches are used. In some cases, an extra field is defined in an
230 -- appropriate node that contains a list of pragmas appearing in the
231 -- expected context. For example pragmas can appear before an
232 -- Accept_Alternative in a Selective_Accept_Statement, and these pragmas
233 -- appear in the Pragmas_Before field of the N_Accept_Alternative node.
234
235 -- The other approach is to simply allow pragmas to appear in syntactic
236 -- lists where the grammar (of course) does not include the possibility.
237 -- For example, the Variants field of an N_Variant_Part node points to a
238 -- list that can contain both N_Pragma and N_Variant nodes.
239
240 -- To make processing easier in the latter case, the Nlists package
241 -- provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
242 -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be handled
243 -- ignoring all pragmas.
244
245 -- In the case of the variants list, we can either write:
246
247 -- Variant := First (Variants (N));
248 -- while Present (Variant) loop
249 -- ...
250 -- Variant := Next (Variant);
251 -- end loop;
252
253 -- or
254
255 -- Variant := First_Non_Pragma (Variants (N));
256 -- while Present (Variant) loop
257 -- ...
258 -- Variant := Next_Non_Pragma (Variant);
259 -- end loop;
260
261 -- In the first form of the loop, Variant can either be an N_Pragma or an
262 -- N_Variant node. In the second form, Variant can only be N_Variant since
263 -- all pragmas are skipped.
264
265 ---------------------
266 -- Optional Fields --
267 ---------------------
268
269 -- Fields which correspond to a section of the syntax enclosed in square
270 -- brackets are generally omitted (and the corresponding field set to Empty
271 -- for a node, or No_List for a list). The documentation of such fields
272 -- notes these cases. One exception to this rule occurs in the case of
273 -- possibly empty statement sequences (such as the sequence of statements
274 -- in an entry call alternative). Such cases appear in the syntax rules as
275 -- [SEQUENCE_OF_STATEMENTS] and the fields corresponding to such optional
276 -- statement sequences always contain an empty list (not No_List) if no
277 -- statements are present.
278
279 -- Note: the utility program that constructs the body and spec of the Nmake
280 -- package relies on the format of the comments to determine if a field
281 -- should have a default value in the corresponding make routine. The rule
282 -- is that if the first line of the description of the field contains the
283 -- string "(set to xxx if", then a default value of xxx is provided for
284 -- this field in the corresponding Make_yyy routine.
285
286 -----------------------------------
287 -- Note on Body/Spec Terminology --
288 -----------------------------------
289
290 -- In informal discussions about Ada, it is customary to refer to package
291 -- and subprogram specs and bodies. However, this is not technically
292 -- correct, what is normally referred to as a spec or specification is in
293 -- fact a package declaration or subprogram declaration. We are careful in
294 -- GNAT to use the correct terminology and in particular, the full word
295 -- specification is never used as an incorrect substitute for declaration.
296 -- The structure and terminology used in the tree also reflects the grammar
297 -- and thus uses declaration and specification in the technically correct
298 -- manner.
299
300 -- However, there are contexts in which the informal terminology is useful.
301 -- We have the word "body" to refer to the Interp_Etype declared by the
302 -- declaration of a unit body, and in some contexts we need similar term to
303 -- refer to the entity declared by the package or subprogram declaration,
304 -- and simply using declaration can be confusing since the body also has a
305 -- declaration.
306
307 -- An example of such a context is the link between the package body and
308 -- its declaration. With_Declaration is confusing, since the package body
309 -- itself is a declaration.
310
311 -- To deal with this problem, we reserve the informal term Spec, i.e. the
312 -- popular abbreviation used in this context, to refer to the entity
313 -- declared by the package or subprogram declaration. So in the above
314 -- example case, the field in the body is called With_Spec.
315
316 -- Another important context for the use of the word Spec is in error
317 -- messages, where a hyper-correct use of declaration would be confusing to
318 -- a typical Ada programmer, and even for an expert programmer can cause
319 -- confusion since the body has a declaration as well.
320
321 -- So, to summarize:
322
323 -- Declaration always refers to the syntactic entity that is called
324 -- a declaration. In particular, subprogram declaration
325 -- and package declaration are used to describe the
326 -- syntactic entity that includes the semicolon.
327
328 -- Specification always refers to the syntactic entity that is called
329 -- a specification. In particular, the terms procedure
330 -- specification, function specification, package
331 -- specification, subprogram specification always refer
332 -- to the syntactic entity that has no semicolon.
333
334 -- Spec is an informal term, used to refer to the entity
335 -- that is declared by a task declaration, protected
336 -- declaration, generic declaration, subprogram
337 -- declaration or package declaration.
338
339 -- This convention is followed throughout the GNAT documentation
340 -- both internal and external, and in all error message text.
341
342 ------------------------
343 -- Internal Use Nodes --
344 ------------------------
345
346 -- These are Node_Kind settings used in the internal implementation which
347 -- are not logically part of the specification.
348
349 -- N_Unused_At_Start
350 -- Completely unused entry at the start of the enumeration type. This
351 -- is inserted so that no legitimate value is zero, which helps to get
352 -- better debugging behavior, since zero is a likely uninitialized value).
353
354 -- N_Unused_At_End
355 -- Completely unused entry at the end of the enumeration type. This is
356 -- handy so that arrays with Node_Kind as the index type have an extra
357 -- entry at the end (see for example the use of the Pchar_Pos_Array in
358 -- Treepr, where the extra entry provides the limit value when dealing with
359 -- the last used entry in the array).
360
361 -----------------------------------------
362 -- Note on the settings of Sloc fields --
363 -----------------------------------------
364
365 -- The Sloc field of nodes that come from the source is set by the parser.
366 -- For internal nodes, and nodes generated during expansion the Sloc is
367 -- usually set in the call to the constructor for the node. In general the
368 -- Sloc value chosen for an internal node is the Sloc of the source node
369 -- whose processing is responsible for the expansion. For example, the Sloc
370 -- of an inherited primitive operation is the Sloc of the corresponding
371 -- derived type declaration.
372
373 -- For the nodes of a generic instantiation, the Sloc value is encoded to
374 -- represent both the original Sloc in the generic unit, and the Sloc of
375 -- the instantiation itself. See Sinput.ads for details.
376
377 -- Subprogram instances create two callable entities: one is the visible
378 -- subprogram instance, and the other is an anonymous subprogram nested
379 -- within a wrapper package that contains the renamings for the actuals.
380 -- Both of these entities have the Sloc of the defining entity in the
381 -- instantiation node. This simplifies some ASIS queries.
382
383 -----------------------
384 -- Field Definitions --
385 -----------------------
386
387 -- In the following node definitions, all fields, both syntactic and
388 -- semantic, are documented. The one exception is in the case of entities
389 -- (defining identifiers, character literals and operator symbols), where
390 -- the usage of the fields depends on the entity kind. Entity fields are
391 -- fully documented in the separate package Einfo.
392
393 -- In the node definitions, three common sets of fields are abbreviated to
394 -- save both space in the documentation, and also space in the string
395 -- (defined in Tree_Print_Strings) used to print trees. The following
396 -- abbreviations are used:
397
398 -- Note: the utility program that creates the Treeprs spec (in the file
399 -- xtreeprs.adb) knows about the special fields here, so it must be
400 -- modified if any change is made to these fields.
401
402 -- "plus fields for binary operator"
403 -- Chars (Name1) Name_Id for the operator
404 -- Left_Opnd (Node2) left operand expression
405 -- Right_Opnd (Node3) right operand expression
406 -- Entity (Node4-Sem) defining entity for operator
407 -- Associated_Node (Node4-Sem) for generic processing
408 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
409 -- Has_Private_View (Flag11-Sem) set in generic units.
410
411 -- "plus fields for unary operator"
412 -- Chars (Name1) Name_Id for the operator
413 -- Right_Opnd (Node3) right operand expression
414 -- Entity (Node4-Sem) defining entity for operator
415 -- Associated_Node (Node4-Sem) for generic processing
416 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
417 -- Has_Private_View (Flag11-Sem) set in generic units.
418
419 -- "plus fields for expression"
420 -- Paren_Count number of parentheses levels
421 -- Etype (Node5-Sem) type of the expression
422 -- Is_Overloaded (Flag5-Sem) >1 type interpretation exists
423 -- Is_Static_Expression (Flag6-Sem) set for static expression
424 -- Raises_Constraint_Error (Flag7-Sem) evaluation raises CE
425 -- Must_Not_Freeze (Flag8-Sem) set if must not freeze
426 -- Do_Range_Check (Flag9-Sem) set if a range check needed
427 -- Assignment_OK (Flag15-Sem) set if modification is OK
428 -- Is_Controlling_Actual (Flag16-Sem) set for controlling argument
429
430 -- Note: see under (EXPRESSION) for further details on the use of
431 -- the Paren_Count field to record the number of parentheses levels.
432
433 -- Node_Kind is the type used in the Nkind field to indicate the node kind.
434 -- The actual definition of this type is given later (the reason for this
435 -- is that we want the descriptions ordered by logical chapter in the RM,
436 -- but the type definition is reordered to facilitate the definition of
437 -- some subtype ranges. The individual descriptions of the nodes show how
438 -- the various fields are used in each node kind, as well as providing
439 -- logical names for the fields. Functions and procedures are provided for
440 -- accessing and setting these fields using these logical names.
441
442 -----------------------
443 -- Gigi Restrictions --
444 -----------------------
445
446 -- The tree passed to Gigi is more restricted than the general tree form.
447 -- For example, as a result of expansion, most of the tasking nodes can
448 -- never appear. For each node to which either a complete or partial
449 -- restriction applies, a note entitled "Gigi restriction" appears which
450 -- documents the restriction.
451
452 -- Note that most of these restrictions apply only to trees generated when
453 -- code is being generated, since they involved expander actions that
454 -- destroy the tree.
455
456 ------------------------
457 -- Common Flag Fields --
458 ------------------------
459
460 -- The following flag fields appear in all nodes
461
462 -- Analyzed
463 -- This flag is used to indicate that a node (and all its children have
464 -- been analyzed. It is used to avoid reanalysis of a node that has
465 -- already been analyzed, both for efficiency and functional correctness
466 -- reasons.
467
468 -- Comes_From_Source
469 -- This flag is set if the node comes directly from an explicit construct
470 -- in the source. It is normally on for any nodes built by the scanner or
471 -- parser from the source program, with the exception that in a few cases
472 -- the parser adds nodes to normalize the representation (in particular
473 -- a null statement is added to a package body if there is no begin/end
474 -- initialization section.
475 --
476 -- Most nodes inserted by the analyzer or expander are not considered
477 -- as coming from source, so the flag is off for such nodes. In a few
478 -- cases, the expander constructs nodes closely equivalent to nodes
479 -- from the source program (e.g. the allocator built for build-in-place
480 -- case), and the Comes_From_Source flag is deliberately set.
481
482 -- Error_Posted
483 -- This flag is used to avoid multiple error messages being posted on or
484 -- referring to the same node. This flag is set if an error message
485 -- refers to a node or is posted on its source location, and has the
486 -- effect of inhibiting further messages involving this same node.
487
488 -- Has_Dynamic_Length_Check (Flag10-Sem)
489 -- This flag is present on all nodes. It is set to indicate that one of
490 -- the routines in unit Checks has generated a length check action which
491 -- has been inserted at the flagged node. This is used to avoid the
492 -- generation of duplicate checks.
493
494 -- Has_Dynamic_Range_Check (Flag12-Sem)
495 -- This flag is present on all nodes. It is set to indicate that one of
496 -- the routines in unit Checks has generated a range check action which
497 -- has been inserted at the flagged node. This is used to avoid the
498 -- generation of duplicate checks.
499
500 -- Has_Local_Raise (Flag8-Sem)
501 -- Present in exception handler nodes. Set if the handler can be entered
502 -- via a local raise that gets transformed to a goto statement. This will
503 -- always be set if Local_Raise_Statements is non-empty, but can also be
504 -- set as a result of generation of N_Raise_xxx nodes, or flags set in
505 -- nodes requiring generation of back end checks.
506
507 ------------------------------------
508 -- Description of Semantic Fields --
509 ------------------------------------
510
511 -- The meaning of the syntactic fields is generally clear from their names
512 -- without any further description, since the names are chosen to
513 -- correspond very closely to the syntax in the reference manual. This
514 -- section describes the usage of the semantic fields, which are used to
515 -- contain additional information determined during semantic analysis.
516
517 -- ABE_Is_Certain (Flag18-Sem)
518 -- This flag is set in an instantiation node or a call node is determined
519 -- to be sure to raise an ABE. This is used to trigger special handling
520 -- of such cases, particularly in the instantiation case where we avoid
521 -- instantiating the body if this flag is set. This flag is also present
522 -- in an N_Formal_Package_Declaration_Node since formal package
523 -- declarations are treated like instantiations, but it is always set to
524 -- False in this context.
525
526 -- Accept_Handler_Records (List5-Sem)
527 -- This field is present only in an N_Accept_Alternative node. It is used
528 -- to temporarily hold the exception handler records from an accept
529 -- statement in a selective accept. These exception handlers will
530 -- eventually be placed in the Handler_Records list of the procedure
531 -- built for this accept (see Expand_N_Selective_Accept procedure in
532 -- Exp_Ch9 for further details).
533
534 -- Access_Types_To_Process (Elist2-Sem)
535 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
536 -- Contains the list of access types which may require specific treatment
537 -- when the nature of the type completion is completely known. An example
538 -- of such treatment is the generation of the associated_final_chain.
539
540 -- Actions (List1-Sem)
541 -- This field contains a sequence of actions that are associated with the
542 -- node holding the field. See the individual node types for details of
543 -- how this field is used, as well as the description of the specific use
544 -- for a particular node type.
545
546 -- Activation_Chain_Entity (Node3-Sem)
547 -- This is used in tree nodes representing task activators (blocks,
548 -- subprogram bodies, package declarations, and task bodies). It is
549 -- initially Empty, and then gets set to point to the entity for the
550 -- declared Activation_Chain variable when the first task is declared.
551 -- When tasks are declared in the corresponding declarative region this
552 -- entity is located by name (its name is always _Chain) and the declared
553 -- tasks are added to the chain. Note that N_Extended_Return_Statement
554 -- does not have this attribute, although it does have an activation
555 -- chain. This chain is used to store the tasks temporarily, and is not
556 -- used for activating them. On successful completion of the return
557 -- statement, the tasks are moved to the caller's chain, and the caller
558 -- activates them.
559
560 -- Acts_As_Spec (Flag4-Sem)
561 -- A flag set in the N_Subprogram_Body node for a subprogram body which
562 -- is acting as its own spec, except in the case of a library level
563 -- subprogram, in which case the flag is set on the parent compilation
564 -- unit node instead (see further description in spec of Lib package).
565 -- ??? Above note about Lib is dubious since lib.ads does not mention
566 -- Acts_As_Spec at all.
567
568 -- Actual_Designated_Subtype (Node4-Sem)
569 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
570 -- needs to known the dynamic constrained subtype of the designated
571 -- object, this attribute is set to that type. This is done for
572 -- N_Free_Statements for access-to-classwide types and access to
573 -- unconstrained packed array types, and for N_Explicit_Dereference when
574 -- the designated type is an unconstrained packed array and the
575 -- dereference is the prefix of a 'Size attribute reference.
576
577 -- Address_Warning_Posted (Flag18-Sem)
578 -- Present in N_Attribute_Definition nodes. Set to indicate that we have
579 -- posted a warning for the address clause regarding size or alignment
580 -- issues. Used to inhibit multiple redundant messages.
581
582 -- Aggregate_Bounds (Node3-Sem)
583 -- Present in array N_Aggregate nodes. If the bounds of the aggregate are
584 -- known at compile time, this field points to an N_Range node with those
585 -- bounds. Otherwise Empty.
586
587 -- All_Others (Flag11-Sem)
588 -- Present in an N_Others_Choice node. This flag is set for an others
589 -- exception where all exceptions are to be caught, even those that are
590 -- not normally handled (in particular the tasking abort signal). This
591 -- is used for translation of the at end handler into a normal exception
592 -- handler.
593
594 -- Aspect_Cancel (Flag11-Sem)
595 -- Processing of aspect specifications typically generates pragmas and
596 -- attribute definition clauses that are inserted into the tree after
597 -- the declaration node to get the desired aspect effect. In the case
598 -- of Boolean aspects that use "=> False" to cancel the effect of an
599 -- aspect (i.e. turn if off), the generated pragma has the Aspect_Cancel
600 -- flag set to indicate that the pragma operates in the opposite sense.
601
602 -- Aspect_Rep_Item (Node2-Sem)
603 -- Present in N_Aspect_Specification nodes. Points to the corresponding
604 -- pragma/attribute definition node used to process the aspect.
605
606 -- Assignment_OK (Flag15-Sem)
607 -- This flag is set in a subexpression node for an object, indicating
608 -- that the associated object can be modified, even if this would not
609 -- normally be permissible (either by direct assignment, or by being
610 -- passed as an out or in-out parameter). This is used by the expander
611 -- for a number of purposes, including initialization of constants and
612 -- limited type objects (such as tasks), setting discriminant fields,
613 -- setting tag values, etc. N_Object_Declaration nodes also have this
614 -- flag defined. Here it is used to indicate that an initialization
615 -- expression is valid, even where it would normally not be allowed
616 -- (e.g. where the type involved is limited).
617
618 -- Associated_Node (Node4-Sem)
619 -- Present in nodes that can denote an entity: identifiers, character
620 -- literals, operator symbols, expanded names, operator nodes, and
621 -- attribute reference nodes (all these nodes have an Entity field).
622 -- This field is also present in N_Aggregate, N_Selected_Component, and
623 -- N_Extension_Aggregate nodes. This field is used in generic processing
624 -- to create links between the generic template and the generic copy.
625 -- See Sem_Ch12.Get_Associated_Node for full details. Note that this
626 -- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
627 -- the normal function of Entity is not required at the point where the
628 -- Associated_Node is set. Note also, that in generic templates, this
629 -- means that the Entity field does not necessarily point to an Entity.
630 -- Since the back end is expected to ignore generic templates, this is
631 -- harmless.
632
633 -- At_End_Proc (Node1)
634 -- This field is present in an N_Handled_Sequence_Of_Statements node.
635 -- It contains an identifier reference for the cleanup procedure to be
636 -- called. See description of this node for further details.
637
638 -- Backwards_OK (Flag6-Sem)
639 -- A flag present in the N_Assignment_Statement node. It is used only
640 -- if the type being assigned is an array type, and is set if analysis
641 -- determines that it is definitely safe to do the copy backwards, i.e.
642 -- starting at the highest addressed element. This is the case if either
643 -- the operands do not overlap, or they may overlap, but if they do,
644 -- then the left operand is at a higher address than the right operand.
645 --
646 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
647 -- means that the front end could not determine that either direction is
648 -- definitely safe, and a runtime check may be required if the backend
649 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
650 -- set, it means that the front end can assure no overlap of operands.
651
652 -- Body_To_Inline (Node3-Sem)
653 -- present in subprogram declarations. Denotes analyzed but unexpanded
654 -- body of subprogram, to be used when inlining calls. Present when the
655 -- subprogram has an Inline pragma and inlining is enabled. If the
656 -- declaration is completed by a renaming_as_body, and the renamed en-
657 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
658 -- which is used directly in later calls to the original subprogram.
659
660 -- Body_Required (Flag13-Sem)
661 -- A flag that appears in the N_Compilation_Unit node indicating that
662 -- the corresponding unit requires a body. For the package case, this
663 -- indicates that a completion is required. In Ada 95, if the flag is not
664 -- set for the package case, then a body may not be present. In Ada 83,
665 -- if the flag is not set for the package case, then body is optional.
666 -- For a subprogram declaration, the flag is set except in the case where
667 -- a pragma Import or Interface applies, in which case no body is
668 -- permitted (in Ada 83 or Ada 95).
669
670 -- By_Ref (Flag5-Sem)
671 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
672 -- this flag is set when the returned expression is already allocated on
673 -- the secondary stack and thus the result is passed by reference rather
674 -- than copied another time.
675
676 -- Check_Address_Alignment (Flag11-Sem)
677 -- A flag present in N_Attribute_Definition clause for a 'Address
678 -- attribute definition. This flag is set if a dynamic check should be
679 -- generated at the freeze point for the entity to which this address
680 -- clause applies. The reason that we need this flag is that we want to
681 -- check for range checks being suppressed at the point where the
682 -- attribute definition clause is given, rather than testing this at the
683 -- freeze point.
684
685 -- Coextensions (Elist4-Sem)
686 -- Present in allocators nodes. Points to list of allocators for the
687 -- access discriminants of the allocated object.
688
689 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
690 -- Present in N_Simple_Return_Statement nodes. True if this node was
691 -- constructed as part of the N_Extended_Return_Statement expansion.
692
693 -- Compile_Time_Known_Aggregate (Flag18-Sem)
694 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
695 -- evaluated at compile time without raising constraint error. Such
696 -- aggregates can be passed as is to Gigi without any expansion. See
697 -- Sem_Aggr for the specific conditions under which an aggregate has this
698 -- flag set. See also the flag Static_Processing_OK.
699
700 -- Componentwise_Assignment (Flag14-Sem)
701 -- Present in N_Assignment_Statement nodes. Set for a record assignment
702 -- where all that needs doing is to expand it into component-by-component
703 -- assignments. This is used internally for the case of tagged types with
704 -- rep clauses, where we need to avoid recursion (we don't want to try to
705 -- generate a call to the primitive operation, because this is the case
706 -- where we are compiling the primitive operation). Note that when we are
707 -- expanding component assignments in this case, we never assign the _tag
708 -- field, but we recursively assign components of the parent type.
709
710 -- Condition_Actions (List3-Sem)
711 -- This field appears in else-if nodes and in the iteration scheme node
712 -- for while loops. This field is only used during semantic processing to
713 -- temporarily hold actions inserted into the tree. In the tree passed
714 -- to gigi, the condition actions field is always set to No_List. For
715 -- details on how this field is used, see the routine Insert_Actions in
716 -- package Exp_Util, and also the expansion routines for the relevant
717 -- nodes.
718
719 -- Context_Pending (Flag16-Sem)
720 -- This field appears in Compilation_Unit nodes, to indicate that the
721 -- context of the unit is being compiled. Used to detect circularities
722 -- that are not otherwise detected by the loading mechanism. Such
723 -- circularities can occur in the presence of limited and non-limited
724 -- with_clauses that mention the same units.
725
726 -- Controlling_Argument (Node1-Sem)
727 -- This field is set in procedure and function call nodes if the call
728 -- is a dispatching call (it is Empty for a non-dispatching call). It
729 -- indicates the source of the call's controlling tag. For procedure
730 -- calls, the Controlling_Argument is one of the actuals. For function
731 -- that has a dispatching result, it is an entity in the context of the
732 -- call that can provide a tag, or else it is the tag of the root type
733 -- of the class. It can also specify a tag directly rather than being a
734 -- tagged object. The latter is needed by the implementations of AI-239
735 -- and AI-260.
736
737 -- Conversion_OK (Flag14-Sem)
738 -- A flag set on type conversion nodes to indicate that the conversion
739 -- is to be considered as being valid, even though it is the case that
740 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
741 -- Fixed_Value and Integer_Value, for internal conversions done for
742 -- fixed-point operations, and for certain conversions for calls to
743 -- initialization procedures. If Conversion_OK is set, then Etype must be
744 -- set (the analyzer assumes that Etype has been set). For the case of
745 -- fixed-point operands, it also indicates that the conversion is to be
746 -- direct conversion of the underlying integer result, with no regard to
747 -- the small operand.
748
749 -- Corresponding_Body (Node5-Sem)
750 -- This field is set in subprogram declarations, package declarations,
751 -- entry declarations of protected types, and in generic units. It
752 -- points to the defining entity for the corresponding body (NOT the
753 -- node for the body itself).
754
755 -- Corresponding_Formal_Spec (Node3-Sem)
756 -- This field is set in subprogram renaming declarations, where it points
757 -- to the defining entity for a formal subprogram in the case where the
758 -- renaming corresponds to a generic formal subprogram association in an
759 -- instantiation. The field is Empty if the renaming does not correspond
760 -- to such a formal association.
761
762 -- Corresponding_Generic_Association (Node5-Sem)
763 -- This field is defined for object declarations and object renaming
764 -- declarations. It is set for the declarations within an instance that
765 -- map generic formals to their actuals. If set, the field points to
766 -- a generic_association which is the original parent of the expression
767 -- or name appearing in the declaration. This simplifies ASIS queries.
768
769 -- Corresponding_Integer_Value (Uint4-Sem)
770 -- This field is set in real literals of fixed-point types (it is not
771 -- used for floating-point types). It contains the integer value used
772 -- to represent the fixed-point value. It is also set on the universal
773 -- real literals used to represent bounds of fixed-point base types
774 -- and their first named subtypes.
775
776 -- Corresponding_Spec (Node5-Sem)
777 -- This field is set in subprogram, package, task, and protected body
778 -- nodes, where it points to the defining entity in the corresponding
779 -- spec. The attribute is also set in N_With_Clause nodes where it points
780 -- to the defining entity for the with'ed spec, and in a subprogram
781 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
782 -- if there is no corresponding spec, as in the case of a subprogram body
783 -- that serves as its own spec.
784
785 -- Corresponding_Stub (Node3-Sem)
786 -- This field is present in an N_Subunit node. It holds the node in
787 -- the parent unit that is the stub declaration for the subunit. It is
788 -- set when analysis of the stub forces loading of the proper body. If
789 -- expansion of the proper body creates new declarative nodes, they are
790 -- inserted at the point of the corresponding_stub.
791
792 -- Dcheck_Function (Node5-Sem)
793 -- This field is present in an N_Variant node, It references the entity
794 -- for the discriminant checking function for the variant.
795
796 -- Debug_Statement (Node3)
797 -- This field is present in an N_Pragma node. It is used only for a Debug
798 -- pragma. The parameter is of the form of an expression, as required by
799 -- the pragma syntax, but is actually a procedure call. To simplify
800 -- semantic processing, the parser creates a copy of the argument
801 -- rearranged into a procedure call statement and places it in the
802 -- Debug_Statement field. Note that this field is considered syntactic
803 -- field, since it is created by the parser.
804
805 -- Default_Expression (Node5-Sem)
806 -- This field is Empty if there is no default expression. If there is a
807 -- simple default expression (one with no side effects), then this field
808 -- simply contains a copy of the Expression field (both point to the tree
809 -- for the default expression). Default_Expression is used for
810 -- conformance checking.
811
812 -- Default_Storage_Pool (Node3-Sem)
813 -- This field is present in N_Compilation_Unit_Aux nodes. It is set to a
814 -- copy of Opt.Default_Pool at the end of the compilation unit. See
815 -- package Opt for details. This is used for inheriting the
816 -- Default_Storage_Pool in child units.
817
818 -- Discr_Check_Funcs_Built (Flag11-Sem)
819 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
820 -- discriminant checking functions are constructed. The purpose is to
821 -- avoid attempting to set these functions more than once.
822
823 -- Do_Accessibility_Check (Flag13-Sem)
824 -- This flag is set on N_Parameter_Specification nodes to indicate
825 -- that an accessibility check is required for the parameter. It is
826 -- not yet decided who takes care of this check (TBD ???).
827
828 -- Do_Discriminant_Check (Flag13-Sem)
829 -- This flag is set on N_Selected_Component nodes to indicate that a
830 -- discriminant check is required using the discriminant check routine
831 -- associated with the selector. The actual check is generated by the
832 -- expander when processing selected components.
833
834 -- Do_Division_Check (Flag13-Sem)
835 -- This flag is set on a division operator (/ mod rem) to indicate
836 -- that a zero divide check is required. The actual check is dealt
837 -- with by the backend (all the front end does is to set the flag).
838
839 -- Do_Length_Check (Flag4-Sem)
840 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
841 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
842 -- is required. It is not determined who deals with this flag (???).
843
844 -- Do_Overflow_Check (Flag17-Sem)
845 -- This flag is set on an operator where an overflow check is required on
846 -- the operation. The actual check is dealt with by the backend (all the
847 -- front end does is to set the flag). The other cases where this flag is
848 -- used is on a Type_Conversion node and for attribute reference nodes.
849 -- For a type conversion, it means that the conversion is from one base
850 -- type to another, and the value may not fit in the target base type.
851 -- See also the description of Do_Range_Check for this case. The only
852 -- attribute references which use this flag are Pred and Succ, where it
853 -- means that the result should be checked for going outside the base
854 -- range. Note that this flag is not set for modular types.
855
856 -- Do_Range_Check (Flag9-Sem)
857 -- This flag is set on an expression which appears in a context where a
858 -- range check is required. The target type is clear from the context.
859 -- The contexts in which this flag can appear are the following:
860
861 -- Right side of an assignment. In this case the target type is
862 -- taken from the left side of the assignment, which is referenced
863 -- by the Name of the N_Assignment_Statement node.
864
865 -- Subscript expressions in an indexed component. In this case the
866 -- target type is determined from the type of the array, which is
867 -- referenced by the Prefix of the N_Indexed_Component node.
868
869 -- Argument expression for a parameter, appearing either directly in
870 -- the Parameter_Associations list of a call or as the Expression of an
871 -- N_Parameter_Association node that appears in this list. In either
872 -- case, the check is against the type of the formal. Note that the
873 -- flag is relevant only in IN and IN OUT parameters, and will be
874 -- ignored for OUT parameters, where no check is required in the call,
875 -- and if a check is required on the return, it is generated explicitly
876 -- with a type conversion.
877
878 -- Initialization expression for the initial value in an object
879 -- declaration. In this case the Do_Range_Check flag is set on
880 -- the initialization expression, and the check is against the
881 -- range of the type of the object being declared.
882
883 -- The expression of a type conversion. In this case the range check is
884 -- against the target type of the conversion. See also the use of
885 -- Do_Overflow_Check on a type conversion. The distinction is that the
886 -- overflow check protects against a value that is outside the range of
887 -- the target base type, whereas a range check checks that the
888 -- resulting value (which is a value of the base type of the target
889 -- type), satisfies the range constraint of the target type.
890
891 -- Note: when a range check is required in contexts other than those
892 -- listed above (e.g. in a return statement), an additional type
893 -- conversion node is introduced to represent the required check.
894
895 -- Do_Storage_Check (Flag17-Sem)
896 -- This flag is set in an N_Allocator node to indicate that a storage
897 -- check is required for the allocation, or in an N_Subprogram_Body node
898 -- to indicate that a stack check is required in the subprogram prolog.
899 -- The N_Allocator case is handled by the routine that expands the call
900 -- to the runtime routine. The N_Subprogram_Body case is handled by the
901 -- backend, and all the semantics does is set the flag.
902
903 -- Do_Tag_Check (Flag13-Sem)
904 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
905 -- N_Procedure_Call_Statement, N_Type_Conversion,
906 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
907 -- node to indicate that the tag check can be suppressed. It is not
908 -- yet decided how this flag is used (TBD ???).
909
910 -- Elaborate_Present (Flag4-Sem)
911 -- This flag is set in the N_With_Clause node to indicate that pragma
912 -- Elaborate pragma appears for the with'ed units.
913
914 -- Elaborate_All_Desirable (Flag9-Sem)
915 -- This flag is set in the N_With_Clause mode to indicate that the static
916 -- elaboration processing has determined that an Elaborate_All pragma is
917 -- desirable for correct elaboration for this unit.
918
919 -- Elaborate_All_Present (Flag14-Sem)
920 -- This flag is set in the N_With_Clause node to indicate that a
921 -- pragma Elaborate_All pragma appears for the with'ed units.
922
923 -- Elaborate_Desirable (Flag11-Sem)
924 -- This flag is set in the N_With_Clause mode to indicate that the static
925 -- elaboration processing has determined that an Elaborate pragma is
926 -- desirable for correct elaboration for this unit.
927
928 -- Elaboration_Boolean (Node2-Sem)
929 -- This field is present in function and procedure specification nodes.
930 -- If set, it points to the entity for a Boolean flag that must be tested
931 -- for certain calls to check for access before elaboration. See body of
932 -- Sem_Elab for further details. This field is Empty if no elaboration
933 -- boolean is required.
934
935 -- Else_Actions (List3-Sem)
936 -- This field is present in conditional expression nodes. During code
937 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
938 -- actions at an appropriate place in the tree to get elaborated at the
939 -- right time. For conditional expressions, we have to be sure that the
940 -- actions for the Else branch are only elaborated if the condition is
941 -- False. The Else_Actions field is used as a temporary parking place for
942 -- these actions. The final tree is always rewritten to eliminate the
943 -- need for this field, so in the tree passed to Gigi, this field is
944 -- always set to No_List.
945
946 -- Enclosing_Variant (Node2-Sem)
947 -- This field is present in the N_Variant node and identifies the Node_Id
948 -- corresponding to the immediately enclosing variant when the variant is
949 -- nested, and N_Empty otherwise. Set during semantic processing of the
950 -- variant part of a record type.
951
952 -- Entity (Node4-Sem)
953 -- Appears in all direct names (identifiers, character literals, and
954 -- operator symbols), as well as expanded names, and attributes that
955 -- denote entities, such as 'Class. Points to entity for corresponding
956 -- defining occurrence. Set after name resolution. For identifiers in a
957 -- WITH list, the corresponding defining occurrence is in a separately
958 -- compiled file, and Entity must be set by the library Load procedure.
959 --
960 -- Note: During name resolution, the value in Entity may be temporarily
961 -- incorrect (e.g. during overload resolution, Entity is initially set to
962 -- the first possible correct interpretation, and then later modified if
963 -- necessary to contain the correct value after resolution).
964 --
965 -- Note: This field overlaps Associated_Node, which is used during
966 -- generic processing (see Sem_Ch12 for details). Note also that in
967 -- generic templates, this means that the Entity field does not always
968 -- point to an Entity. Since the back end is expected to ignore generic
969 -- templates, this is harmless.
970 --
971 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
972 -- It is used only for stream attributes definition clauses. In this
973 -- case, it denotes a (possibly dummy) subprogram entity that is declared
974 -- conceptually at the point of the clause. Thus the visibility of the
975 -- attribute definition clause (in the sense of 8.3(23) as amended by
976 -- AI-195) can be checked by testing the visibility of that subprogram.
977 --
978 -- Note: Normally the Entity field of an identifier points to the entity
979 -- for the corresponding defining identifier, and hence the Chars field
980 -- of an identifier will match the Chars field of the entity. However,
981 -- there is no requirement that these match, and there are obscure cases
982 -- of generated code where they do not match.
983
984 -- Entity_Or_Associated_Node (Node4-Sem)
985 -- A synonym for both Entity and Associated_Node. Used by convention in
986 -- the code when referencing this field in cases where it is not known
987 -- whether the field contains an Entity or an Associated_Node.
988
989 -- Etype (Node5-Sem)
990 -- Appears in all expression nodes, all direct names, and all entities.
991 -- Points to the entity for the related type. Set after type resolution.
992 -- Normally this is the actual subtype of the expression. However, in
993 -- certain contexts such as the right side of an assignment, subscripts,
994 -- arguments to calls, returned value in a function, initial value etc.
995 -- it is the desired target type. In the event that this is different
996 -- from the actual type, the Do_Range_Check flag will be set if a range
997 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
998 -- points to an essentially arbitrary choice from the possible set of
999 -- types.
1000
1001 -- Exception_Junk (Flag8-Sem)
1002 -- This flag is set in a various nodes appearing in a statement sequence
1003 -- to indicate that the corresponding node is an artifact of the
1004 -- generated code for exception handling, and should be ignored when
1005 -- analyzing the control flow of the relevant sequence of statements
1006 -- (e.g. to check that it does not end with a bad return statement).
1007
1008 -- Exception_Label (Node5-Sem)
1009 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
1010 -- to be used for transforming the corresponding exception into a goto,
1011 -- or contains Empty, if this exception is not to be transformed. Also
1012 -- appears in N_Exception_Handler nodes, where, if set, it indicates
1013 -- that there may be a local raise for the handler, so that expansion
1014 -- to allow a goto is required (and this field contains the label for
1015 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
1016
1017 -- Expansion_Delayed (Flag11-Sem)
1018 -- Set on aggregates and extension aggregates that need a top-down rather
1019 -- than bottom-up expansion. Typically aggregate expansion happens bottom
1020 -- up. For nested aggregates the expansion is delayed until the enclosing
1021 -- aggregate itself is expanded, e.g. in the context of a declaration. To
1022 -- delay it we set this flag. This is done to avoid creating a temporary
1023 -- for each level of a nested aggregates, and also to prevent the
1024 -- premature generation of constraint checks. This is also a requirement
1025 -- if we want to generate the proper attachment to the internal
1026 -- finalization lists (for record with controlled components). Top down
1027 -- expansion of aggregates is also used for in-place array aggregate
1028 -- assignment or initialization. When the full context is known, the
1029 -- target of the assignment or initialization is used to generate the
1030 -- left-hand side of individual assignment to each sub-component.
1031
1032 -- First_Inlined_Subprogram (Node3-Sem)
1033 -- Present in the N_Compilation_Unit node for the main program. Points
1034 -- to a chain of entities for subprograms that are to be inlined. The
1035 -- Next_Inlined_Subprogram field of these entities is used as a link
1036 -- pointer with Empty marking the end of the list. This field is Empty
1037 -- if there are no inlined subprograms or inlining is not active.
1038
1039 -- First_Named_Actual (Node4-Sem)
1040 -- Present in procedure call statement and function call nodes, and also
1041 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1042 -- named parameter where parameters are ordered by declaration order (as
1043 -- opposed to the actual order in the call which may be different due to
1044 -- named associations). Note: this field points to the explicit actual
1045 -- parameter itself, not the N_Parameter_Association node (its parent).
1046
1047 -- First_Real_Statement (Node2-Sem)
1048 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
1049 -- Empty. Used only when declarations are moved into the statement part
1050 -- of a construct as a result of wrapping an AT END handler that is
1051 -- required to cover the declarations. In this case, this field is used
1052 -- to remember the location in the statements list of the first real
1053 -- statement, i.e. the statement that used to be first in the statement
1054 -- list before the declarations were prepended.
1055
1056 -- First_Subtype_Link (Node5-Sem)
1057 -- Present in N_Freeze_Entity node for an anonymous base type that is
1058 -- implicitly created by the declaration of a first subtype. It points
1059 -- to the entity for the first subtype.
1060
1061 -- Float_Truncate (Flag11-Sem)
1062 -- A flag present in type conversion nodes. This is used for float to
1063 -- integer conversions where truncation is required rather than rounding.
1064 -- Note that Gigi does not handle type conversions from real to integer
1065 -- with rounding (see Expand_N_Type_Conversion).
1066
1067 -- Forwards_OK (Flag5-Sem)
1068 -- A flag present in the N_Assignment_Statement node. It is used only
1069 -- if the type being assigned is an array type, and is set if analysis
1070 -- determines that it is definitely safe to do the copy forwards, i.e.
1071 -- starting at the lowest addressed element. This is the case if either
1072 -- the operands do not overlap, or they may overlap, but if they do,
1073 -- then the left operand is at a lower address than the right operand.
1074 --
1075 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1076 -- means that the front end could not determine that either direction is
1077 -- definitely safe, and a runtime check may be required if the backend
1078 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1079 -- set, it means that the front end can assure no overlap of operands.
1080
1081 -- From_Aspect_Specification (Flag13-Sem)
1082 -- Processing of aspect specifications typically results in insertion in
1083 -- the tree of corresponding pragma or attribute definition clause nodes.
1084 -- These generated nodes have the From_Aspect_Specification flag set to
1085 -- indicate that they came from aspect specifications originally.
1086
1087 -- From_At_End (Flag4-Sem)
1088 -- This flag is set on an N_Raise_Statement node if it corresponds to
1089 -- the reraise statement generated as the last statement of an AT END
1090 -- handler when SJLJ exception handling is active. It is used to stop
1091 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1092 -- because if the restriction is set, the reraise is not generated.
1093
1094 -- From_At_Mod (Flag4-Sem)
1095 -- This flag is set on the attribute definition clause node that is
1096 -- generated by a transformation of an at mod phrase in a record
1097 -- representation clause. This is used to give slightly different (Ada 83
1098 -- compatible) semantics to such a clause, namely it is used to specify a
1099 -- minimum acceptable alignment for the base type and all subtypes. In
1100 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1101 -- must be a multiple of the given value, and the representation clause
1102 -- is considered to be type specific instead of subtype specific.
1103
1104 -- From_Default (Flag6-Sem)
1105 -- This flag is set on the subprogram renaming declaration created in an
1106 -- instance for a formal subprogram, when the formal is declared with a
1107 -- box, and there is no explicit actual. If the flag is present, the
1108 -- declaration is treated as an implicit reference to the formal in the
1109 -- ali file.
1110
1111 -- Generic_Parent (Node5-Sem)
1112 -- Generic_Parent is defined on declaration nodes that are instances. The
1113 -- value of Generic_Parent is the generic entity from which the instance
1114 -- is obtained. Generic_Parent is also defined for the renaming
1115 -- declarations and object declarations created for the actuals in an
1116 -- instantiation. The generic parent of such a declaration is the
1117 -- corresponding generic association in the Instantiation node.
1118
1119 -- Generic_Parent_Type (Node4-Sem)
1120 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1121 -- actuals of formal private and derived types. Within the instance, the
1122 -- operations on the actual are those inherited from the parent. For a
1123 -- formal private type, the parent type is the generic type itself. The
1124 -- Generic_Parent_Type is also used in an instance to determine whether a
1125 -- private operation overrides an inherited one.
1126
1127 -- Handler_List_Entry (Node2-Sem)
1128 -- This field is present in N_Object_Declaration nodes. It is set only
1129 -- for the Handler_Record entry generated for an exception in zero cost
1130 -- exception handling mode. It references the corresponding item in the
1131 -- handler list, and is used to delete this entry if the corresponding
1132 -- handler is deleted during optimization. For further details on why
1133 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1134
1135 -- Has_No_Elaboration_Code (Flag17-Sem)
1136 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1137 -- or not elaboration code is present for this unit. It is initially set
1138 -- true for subprogram specs and bodies and for all generic units and
1139 -- false for non-generic package specs and bodies. Gigi may set the flag
1140 -- in the non-generic package case if it determines that no elaboration
1141 -- code is generated. Note that this flag is not related to the
1142 -- Is_Preelaborated status, there can be preelaborated packages that
1143 -- generate elaboration code, and non-preelaborated packages which do
1144 -- not generate elaboration code.
1145
1146 -- Has_Pragma_CPU (Flag14-Sem)
1147 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1148 -- flag the presence of a CPU pragma in the declaration sequence (public
1149 -- or private in the task case).
1150
1151 -- Has_Pragma_Suppress_All (Flag14-Sem)
1152 -- This flag is set in an N_Compilation_Unit node if the Suppress_All
1153 -- pragma appears anywhere in the unit. This accomodates the rather
1154 -- strange placement rules of other compilers (DEC permits it at the
1155 -- end of a unit, and Rational allows it as a program unit pragma). We
1156 -- allow it anywhere at all, and consider it equivalent to a pragma
1157 -- Suppress (All_Checks) appearing at the start of the configuration
1158 -- pragmas for the unit.
1159
1160 -- Has_Pragma_Priority (Flag6-Sem)
1161 -- A flag present in N_Subprogram_Body, N_Task_Definition and
1162 -- N_Protected_Definition nodes to flag the presence of either a Priority
1163 -- or Interrupt_Priority pragma in the declaration sequence (public or
1164 -- private in the task and protected cases)
1165
1166 -- Has_Private_View (Flag11-Sem)
1167 -- A flag present in generic nodes that have an entity, to indicate that
1168 -- the node has a private type. Used to exchange private and full
1169 -- declarations if the visibility at instantiation is different from the
1170 -- visibility at generic definition.
1171
1172 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1173 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1174 -- flag the presence of a pragma Relative_Deadline.
1175
1176 -- Has_Self_Reference (Flag13-Sem)
1177 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1178 -- of the expressions contains an access attribute reference to the
1179 -- enclosing type. Such a self-reference can only appear in default-
1180 -- initialized aggregate for a record type.
1181
1182 -- Has_Storage_Size_Pragma (Flag5-Sem)
1183 -- A flag present in an N_Task_Definition node to flag the presence of a
1184 -- Storage_Size pragma.
1185
1186 -- Has_Task_Info_Pragma (Flag7-Sem)
1187 -- A flag present in an N_Task_Definition node to flag the presence of a
1188 -- Task_Info pragma. Used to detect duplicate pragmas.
1189
1190 -- Has_Task_Name_Pragma (Flag8-Sem)
1191 -- A flag present in N_Task_Definition nodes to flag the presence of a
1192 -- Task_Name pragma in the declaration sequence for the task.
1193
1194 -- Has_Wide_Character (Flag11-Sem)
1195 -- Present in string literals, set if any wide character (i.e. character
1196 -- code outside the Character range but within Wide_Character range)
1197 -- appears in the string. Used to implement pragma preference rules.
1198
1199 -- Has_Wide_Wide_Character (Flag13-Sem)
1200 -- Present in string literals, set if any wide character (i.e. character
1201 -- code outside the Wide_Character range) appears in the string. Used to
1202 -- implement pragma preference rules.
1203
1204 -- Hidden_By_Use_Clause (Elist4-Sem)
1205 -- An entity list present in use clauses that appear within
1206 -- instantiations. For the resolution of local entities, entities
1207 -- introduced by these use clauses have priority over global ones, and
1208 -- outer entities must be explicitly hidden/restored on exit.
1209
1210 -- Implicit_With (Flag16-Sem)
1211 -- This flag is set in the N_With_Clause node that is implicitly
1212 -- generated for runtime units that are loaded by the expander, and also
1213 -- for package System, if it is loaded implicitly by a use of the
1214 -- 'Address or 'Tag attribute. ???There are other implicit with clauses
1215 -- as well.
1216
1217 -- Import_Interface_Present (Flag16-Sem)
1218 -- This flag is set in an Interface or Import pragma if a matching
1219 -- pragma of the other kind is also present. This is used to avoid
1220 -- generating some unwanted error messages.
1221
1222 -- Includes_Infinities (Flag11-Sem)
1223 -- This flag is present in N_Range nodes. It is set for the range of
1224 -- unconstrained float types defined in Standard, which include not only
1225 -- the given range of values, but also legitimately can include infinite
1226 -- values. This flag is false for any float type for which an explicit
1227 -- range is given by the programmer, even if that range is identical to
1228 -- the range for Float.
1229
1230 -- Inherited_Discriminant (Flag13-Sem)
1231 -- This flag is present in N_Component_Association nodes. It indicates
1232 -- that a given component association in an extension aggregate is the
1233 -- value obtained from a constraint on an ancestor. Used to prevent
1234 -- double expansion when the aggregate has expansion delayed.
1235
1236 -- Instance_Spec (Node5-Sem)
1237 -- This field is present in generic instantiation nodes, and also in
1238 -- formal package declaration nodes (formal package declarations are
1239 -- treated in a manner very similar to package instantiations). It points
1240 -- to the node for the spec of the instance, inserted as part of the
1241 -- semantic processing for instantiations in Sem_Ch12.
1242
1243 -- Is_Accessibility_Actual (Flag12-Sem)
1244 -- Present in N_Parameter_Association nodes. True if the parameter is
1245 -- an extra actual that carries the accessibility level of the actual
1246 -- for an access parameter, in a function that dispatches on result and
1247 -- is called in a dispatching context. Used to prevent a formal/actual
1248 -- mismatch when the call is rewritten as a dispatching call.
1249
1250 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1251 -- A flag set in a Block_Statement node to indicate that it is the
1252 -- expansion of an asynchronous entry call. Such a block needs cleanup
1253 -- handler to assure that the call is cancelled.
1254
1255 -- Is_Component_Left_Opnd (Flag13-Sem)
1256 -- Is_Component_Right_Opnd (Flag14-Sem)
1257 -- Present in concatenation nodes, to indicate that the corresponding
1258 -- operand is of the component type of the result. Used in resolving
1259 -- concatenation nodes in instances.
1260
1261 -- Is_Delayed_Aspect (Flag14-Sem)
1262 -- Present in N_Pragma and N_Attribute_Definition_Clause nodes which
1263 -- come from aspect specifications, where the evaluation of the aspect
1264 -- must be delayed to the freeze point.
1265
1266 -- Is_Controlling_Actual (Flag16-Sem)
1267 -- This flag is set on in an expression that is a controlling argument in
1268 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1269 -- details of its use.
1270
1271 -- Is_Dynamic_Coextension (Flag18-Sem)
1272 -- Present in allocator nodes, to indicate that this is an allocator
1273 -- for an access discriminant of a dynamically allocated object. The
1274 -- coextension must be deallocated and finalized at the same time as
1275 -- the enclosing object.
1276
1277 -- Is_Entry_Barrier_Function (Flag8-Sem)
1278 -- This flag is set in an N_Subprogram_Body node which is the expansion
1279 -- of an entry barrier from a protected entry body. It is used for the
1280 -- circuitry checking for incorrect use of Current_Task.
1281
1282 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1283 -- This flag is set in an N_Function_Call node to indicate that the extra
1284 -- actuals to support a build-in-place style of call have been added to
1285 -- the call.
1286
1287 -- Is_In_Discriminant_Check (Flag11-Sem)
1288 -- This flag is present in a selected component, and is used to indicate
1289 -- that the reference occurs within a discriminant check. The
1290 -- significance is that optimizations based on assuming that the
1291 -- discriminant check has a correct value cannot be performed in this
1292 -- case (or the discriminant check may be optimized away!)
1293
1294 -- Is_Machine_Number (Flag11-Sem)
1295 -- This flag is set in an N_Real_Literal node to indicate that the value
1296 -- is a machine number. This avoids some unnecessary cases of converting
1297 -- real literals to machine numbers.
1298
1299 -- Is_Null_Loop (Flag16-Sem)
1300 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1301 -- can be determined to be null at compile time. This is used to remove
1302 -- the loop entirely at expansion time.
1303
1304 -- Is_Overloaded (Flag5-Sem)
1305 -- A flag present in all expression nodes. Used temporarily during
1306 -- overloading determination. The setting of this flag is not relevant
1307 -- once overloading analysis is complete.
1308
1309 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1310 -- A flag present only in N_Op_Expon nodes. It is set when the
1311 -- exponentiation is of the form 2 ** N, where the type of N is an
1312 -- unsigned integral subtype whose size does not exceed the size of
1313 -- Standard_Integer (i.e. a type that can be safely converted to
1314 -- Natural), and the exponentiation appears as the right operand of an
1315 -- integer multiplication or an integer division where the dividend is
1316 -- unsigned. It is also required that overflow checking is off for both
1317 -- the exponentiation and the multiply/divide node. If this set of
1318 -- conditions holds, and the flag is set, then the division or
1319 -- multiplication can be (and is) converted to a shift.
1320
1321 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1322 -- A flag set in a Subprogram_Body block to indicate that it is the
1323 -- implementation of a protected subprogram. Such a body needs cleanup
1324 -- handler to make sure that the associated protected object is unlocked
1325 -- when the subprogram completes.
1326
1327 -- Is_Static_Coextension (Flag14-Sem)
1328 -- Present in N_Allocator nodes. Set if the allocator is a coextension
1329 -- of an object allocated on the stack rather than the heap.
1330
1331 -- Is_Static_Expression (Flag6-Sem)
1332 -- Indicates that an expression is a static expression (RM 4.9). See spec
1333 -- of package Sem_Eval for full details on the use of this flag.
1334
1335 -- Is_Subprogram_Descriptor (Flag16-Sem)
1336 -- Present in N_Object_Declaration, and set only for the object
1337 -- declaration generated for a subprogram descriptor in fast exception
1338 -- mode. See Exp_Ch11 for details of use.
1339
1340 -- Is_Task_Allocation_Block (Flag6-Sem)
1341 -- A flag set in a Block_Statement node to indicate that it is the
1342 -- expansion of a task allocator, or the allocator of an object
1343 -- containing tasks. Such a block requires a cleanup handler to call
1344 -- Expunge_Unactivated_Tasks to complete any tasks that have been
1345 -- allocated but not activated when the allocator completes abnormally.
1346
1347 -- Is_Task_Master (Flag5-Sem)
1348 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1349 -- indicate that the construct is a task master (i.e. has declared tasks
1350 -- or declares an access to a task type).
1351
1352 -- Itype (Node1-Sem)
1353 -- Used in N_Itype_Reference node to reference an itype for which it is
1354 -- important to ensure that it is defined. See description of this node
1355 -- for further details.
1356
1357 -- Kill_Range_Check (Flag11-Sem)
1358 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1359 -- result should not be subjected to range checks. This is used for the
1360 -- implementation of Normalize_Scalars.
1361
1362 -- Label_Construct (Node2-Sem)
1363 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1364 -- N_Block_Statement or N_Loop_Statement node to which the label
1365 -- declaration applies. This is not currently used in the compiler
1366 -- itself, but it is useful in the implementation of ASIS queries.
1367 -- This field is left empty for the special labels generated as part
1368 -- of expanding raise statements with a local exception handler.
1369
1370 -- Library_Unit (Node4-Sem)
1371 -- In a stub node, Library_Unit points to the compilation unit node of
1372 -- the corresponding subunit.
1373 --
1374 -- In a with clause node, Library_Unit points to the spec of the with'ed
1375 -- unit.
1376 --
1377 -- In a compilation unit node, the usage depends on the unit type:
1378 --
1379 -- For a library unit body, Library_Unit points to the compilation unit
1380 -- node of the corresponding spec, unless it's a subprogram body with
1381 -- Acts_As_Spec set, in which case it points to itself.
1382 --
1383 -- For a spec, Library_Unit points to the compilation unit node of the
1384 -- corresponding body, if present. The body will be present if the spec
1385 -- is or contains generics that we needed to instantiate. Similarly, the
1386 -- body will be present if we needed it for inlining purposes. Thus, if
1387 -- we have a spec/body pair, both of which are present, they point to
1388 -- each other via Library_Unit.
1389 --
1390 -- For a subunit, Library_Unit points to the compilation unit node of
1391 -- the parent body.
1392 --
1393 -- Note that this field is not used to hold the parent pointer for child
1394 -- unit (which might in any case need to use it for some other purpose as
1395 -- described above). Instead for a child unit, implicit with's are
1396 -- generated for all parents.
1397
1398 -- Local_Raise_Statements (Elist1)
1399 -- This field is present in exception handler nodes. It is set to
1400 -- No_Elist in the normal case. If there is at least one raise statement
1401 -- which can potentially be handled as a local raise, then this field
1402 -- points to a list of raise nodes, which are calls to a routine to raise
1403 -- an exception. These are raise nodes which can be optimized into gotos
1404 -- if the handler turns out to meet the conditions which permit this
1405 -- transformation. Note that this does NOT include instances of the
1406 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
1407 -- handled by the back end (using the N_Push/N_Pop mechanism).
1408
1409 -- Loop_Actions (List2-Sem)
1410 -- A list present in Component_Association nodes in array aggregates.
1411 -- Used to collect actions that must be executed within the loop because
1412 -- they may need to be evaluated anew each time through.
1413
1414 -- Limited_View_Installed (Flag18-Sem)
1415 -- Present in With_Clauses and in package specifications. If set on
1416 -- with_clause, it indicates that this clause has created the current
1417 -- limited view of the designated package. On a package specification, it
1418 -- indicates that the limited view has already been created because the
1419 -- package is mentioned in a limited_with_clause in the closure of the
1420 -- unit being compiled.
1421
1422 -- Local_Raise_Not_OK (Flag7-Sem)
1423 -- Present in N_Exception_Handler nodes. Set if the handler contains
1424 -- a construct (reraise statement, or call to subprogram in package
1425 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
1426 -- for a local raise (one that could otherwise be converted to a goto).
1427
1428 -- Must_Be_Byte_Aligned (Flag14-Sem)
1429 -- This flag is present in N_Attribute_Reference nodes. It can be set
1430 -- only for the Address and Unrestricted_Access attributes. If set it
1431 -- means that the object for which the address/access is given must be on
1432 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
1433 -- of the object is to be made before taking the address (this copy is in
1434 -- the current scope on the stack frame). This is used for certain cases
1435 -- of code generated by the expander that passes parameters by address.
1436 --
1437 -- The reason the copy is not made by the front end is that the back end
1438 -- has more information about type layout and may be able to (but is not
1439 -- guaranteed to) prevent making unnecessary copies.
1440
1441 -- Must_Not_Freeze (Flag8-Sem)
1442 -- A flag present in all expression nodes. Normally expressions cause
1443 -- freezing as described in the RM. If this flag is set, then this is
1444 -- inhibited. This is used by the analyzer and expander to label nodes
1445 -- that are created by semantic analysis or expansion and which must not
1446 -- cause freezing even though they normally would. This flag is also
1447 -- present in an N_Subtype_Indication node, since we also use these in
1448 -- calls to Freeze_Expression.
1449
1450 -- Next_Entity (Node2-Sem)
1451 -- Present in defining identifiers, defining character literals and
1452 -- defining operator symbols (i.e. in all entities). The entities of a
1453 -- scope are chained, and this field is used as the forward pointer for
1454 -- this list. See Einfo for further details.
1455
1456 -- Next_Exit_Statement (Node3-Sem)
1457 -- Present in N_Exit_Statement nodes. The exit statements for a loop are
1458 -- chained (in reverse order of appearence) from the First_Exit_Statement
1459 -- field of the E_Loop entity for the loop. Next_Exit_Statement points to
1460 -- the next entry on this chain (Empty = end of list).
1461
1462 -- Next_Implicit_With (Node3-Sem)
1463 -- Present in N_With_Clause. Part of a chain of with_clauses generated
1464 -- in rtsfind to indicate implicit dependencies on predefined units. Used
1465 -- to prevent multiple with_clauses for the same unit in a given context.
1466 -- A postorder traversal of the tree whose nodes are units and whose
1467 -- links are with_clauses defines the order in which Inspector must
1468 -- examine a compiled unit and its full context. This ordering ensures
1469 -- that any subprogram call is examined after the subprogram declartion
1470 -- has been seen.
1471
1472 -- Next_Named_Actual (Node4-Sem)
1473 -- Present in parameter association node. Set during semantic analysis to
1474 -- point to the next named parameter, where parameters are ordered by
1475 -- declaration order (as opposed to the actual order in the call, which
1476 -- may be different due to named associations). Not that this field
1477 -- points to the explicit actual parameter itself, not to the
1478 -- N_Parameter_Association node (its parent).
1479
1480 -- Next_Pragma (Node1-Sem)
1481 -- Present in N_Pragma nodes. Used to create a linked list of pragma
1482 -- nodes. Currently used for two purposes:
1483 --
1484 -- Create a list of linked Check_Policy pragmas. The head of this list
1485 -- is stored in Opt.Check_Policy_List (which has further details).
1486 --
1487 -- Used by processing for Pre/Postcondition pragmas to store a list of
1488 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
1489 -- details).
1490
1491 -- Next_Rep_Item (Node5-Sem)
1492 -- Present in pragma nodes, attribute definition nodes, enumeration rep
1493 -- clauses, record rep clauses, aspect specification nodes. Used to link
1494 -- representation items that apply to an entity. See full description of
1495 -- First_Rep_Item field in Einfo for further details.
1496
1497 -- Next_Use_Clause (Node3-Sem)
1498 -- While use clauses are active during semantic processing, they are
1499 -- chained from the scope stack entry, using Next_Use_Clause as a link
1500 -- pointer, with Empty marking the end of the list. The head pointer is
1501 -- in the scope stack entry (First_Use_Clause). At the end of semantic
1502 -- processing (i.e. when Gigi sees the tree, the contents of this field
1503 -- is undefined and should not be read).
1504
1505 -- No_Ctrl_Actions (Flag7-Sem)
1506 -- Present in N_Assignment_Statement to indicate that no finalize nor
1507 -- adjust should take place on this assignment even though the rhs is
1508 -- controlled. This is used in init procs and aggregate expansions where
1509 -- the generated assignments are more initialisations than real
1510 -- assignments.
1511
1512 -- No_Elaboration_Check (Flag14-Sem)
1513 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1514 -- that no elaboration check is needed on the call, because it appears in
1515 -- the context of a local Suppress pragma. This is used on calls within
1516 -- task bodies, where the actual elaboration checks are applied after
1517 -- analysis, when the local scope stack is not present.
1518
1519 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1520 -- Present in N_With_Clause nodes. Set if the with clause is on the
1521 -- package or subprogram spec where the main unit is the corresponding
1522 -- body, and no entities of the with'ed unit are referenced by the spec
1523 -- (an entity may still be referenced in the body, so this flag is used
1524 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1525 -- full details)
1526
1527 -- No_Initialization (Flag13-Sem)
1528 -- Present in N_Object_Declaration and N_Allocator to indicate that the
1529 -- object must not be initialized (by Initialize or call to an init
1530 -- proc). This is needed for controlled aggregates. When the Object
1531 -- declaration has an expression, this flag means that this expression
1532 -- should not be taken into account (needed for in place initialization
1533 -- with aggregates).
1534
1535 -- No_Truncation (Flag17-Sem)
1536 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
1537 -- only if the RM_Size of the source is greater than the RM_Size of the
1538 -- target for scalar operands. Normally in such a case we truncate some
1539 -- higher order bits of the source, and then sign/zero extend the result
1540 -- to form the output value. But if this flag is set, then we do not do
1541 -- any truncation, so for example, if an 8 bit input is converted to 5
1542 -- bit result which is in fact stored in 8 bits, then the high order
1543 -- three bits of the target result will be copied from the source. This
1544 -- is used for properly setting out of range values for use by pragmas
1545 -- Initialize_Scalars and Normalize_Scalars.
1546
1547 -- Original_Discriminant (Node2-Sem)
1548 -- Present in identifiers. Used in references to discriminants that
1549 -- appear in generic units. Because the names of the discriminants may be
1550 -- different in an instance, we use this field to recover the position of
1551 -- the discriminant in the original type, and replace it with the
1552 -- discriminant at the same position in the instantiated type.
1553
1554 -- Original_Entity (Node2-Sem)
1555 -- Present in numeric literals. Used to denote the named number that has
1556 -- been constant-folded into the given literal. If literal is from
1557 -- source, or the result of some other constant-folding operation, then
1558 -- Original_Entity is empty. This field is needed to handle properly
1559 -- named numbers in generic units, where the Associated_Node field
1560 -- interferes with the Entity field, making it impossible to preserve the
1561 -- original entity at the point of instantiation (ASIS problem).
1562
1563 -- Others_Discrete_Choices (List1-Sem)
1564 -- When a case statement or variant is analyzed, the semantic checks
1565 -- determine the actual list of choices that correspond to an others
1566 -- choice. This list is materialized for later use by the expander and
1567 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
1568 -- this materialized list of choices, which is in standard format for a
1569 -- list of discrete choices, except that of course it cannot contain an
1570 -- N_Others_Choice entry.
1571
1572 -- Parameter_List_Truncated (Flag17-Sem)
1573 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. Set
1574 -- (for OpenVMS ports of GNAT only) if the parameter list is truncated as
1575 -- a result of a First_Optional_Parameter specification in an
1576 -- Import_Function, Import_Procedure, or Import_Valued_Procedure pragma.
1577 -- The truncation is done by the expander by removing trailing parameters
1578 -- from the argument list, in accordance with the set of rules allowing
1579 -- such parameter removal. In particular, parameters can be removed
1580 -- working from the end of the parameter list backwards up to and
1581 -- including the entry designated by First_Optional_Parameter in the
1582 -- Import pragma. Parameters can be removed if they are implicit and the
1583 -- default value is a known-at-compile-time value, including the use of
1584 -- the Null_Parameter attribute, or if explicit parameter values are
1585 -- present that match the corresponding defaults.
1586
1587 -- Parent_Spec (Node4-Sem)
1588 -- For a library unit that is a child unit spec (package or subprogram
1589 -- declaration, generic declaration or instantiation, or library level
1590 -- rename, this field points to the compilation unit node for the parent
1591 -- package specification. This field is Empty for library bodies (the
1592 -- parent spec in this case can be found from the corresponding spec).
1593
1594 -- Pragma_Enabled (Flag5-Sem)
1595 -- Present in N_Pragma nodes. This flag is relevant only for pragmas
1596 -- Assert, Check, Precondition, and Postcondition. It is true if the
1597 -- check corresponding to the pragma type is enabled at the point where
1598 -- the pragma appears.
1599
1600 -- Present_Expr (Uint3-Sem)
1601 -- Present in an N_Variant node. This has a meaningful value only after
1602 -- Gigi has back annotated the tree with representation information. At
1603 -- this point, it contains a reference to a gcc expression that depends
1604 -- on the values of one or more discriminants. Give a set of discriminant
1605 -- values, this expression evaluates to False (zero) if variant is not
1606 -- present, and True (non-zero) if it is present. See unit Repinfo for
1607 -- further details on gigi back annotation. This field is used during
1608 -- ASIS processing (data decomposition annex) to determine if a field is
1609 -- present or not.
1610
1611 -- Print_In_Hex (Flag13-Sem)
1612 -- Set on an N_Integer_Literal node to indicate that the value should be
1613 -- printed in hexadecimal in the sprint listing. Has no effect on
1614 -- legality or semantics of program, only on the displayed output. This
1615 -- is used to clarify output from the packed array cases.
1616
1617 -- Procedure_To_Call (Node2-Sem)
1618 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1619 -- and N_Extended_Return_Statement nodes. References the entity for the
1620 -- declaration of the procedure to be called to accomplish the required
1621 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
1622 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
1623 -- allocating the return value), and for the Deallocate procedure in the
1624 -- case of N_Free_Statement.
1625
1626 -- Raises_Constraint_Error (Flag7-Sem)
1627 -- Set on an expression whose evaluation will definitely fail constraint
1628 -- error check. In the case of static expressions, this flag must be set
1629 -- accurately (and if it is set, the expression is typically illegal
1630 -- unless it appears as a non-elaborated branch of a short-circuit form).
1631 -- For a non-static expression, this flag may be set whenever an
1632 -- expression (e.g. an aggregate) is known to raise constraint error. If
1633 -- set, the expression definitely will raise CE if elaborated at runtime.
1634 -- If not set, the expression may or may not raise CE. In other words, on
1635 -- static expressions, the flag is set accurately, on non-static
1636 -- expressions it is set conservatively.
1637
1638 -- Redundant_Use (Flag13-Sem)
1639 -- Present in nodes that can appear as an operand in a use clause or use
1640 -- type clause (identifiers, expanded names, attribute references). Set
1641 -- to indicate that a use is redundant (and therefore need not be undone
1642 -- on scope exit).
1643
1644 -- Renaming_Exception (Node2-Sem)
1645 -- Present in N_Exception_Declaration node. Used to point back to the
1646 -- exception renaming for an exception declared within a subprogram.
1647 -- What happens is that an exception declared in a subprogram is moved
1648 -- to the library level with a unique name, and the original exception
1649 -- becomes a renaming. This link from the library level exception to the
1650 -- renaming declaration allows registering of the proper exception name.
1651
1652 -- Return_Statement_Entity (Node5-Sem)
1653 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
1654 -- Points to an E_Return_Statement representing the return statement.
1655
1656 -- Return_Object_Declarations (List3)
1657 -- Present in N_Extended_Return_Statement.
1658 -- Points to a list initially containing a single
1659 -- N_Object_Declaration representing the return object.
1660 -- We use a list (instead of just a pointer to the object decl)
1661 -- because Analyze wants to insert extra actions on this list.
1662
1663 -- Rounded_Result (Flag18-Sem)
1664 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1665 -- Used in the fixed-point cases to indicate that the result must be
1666 -- rounded as a result of the use of the 'Round attribute. Also used for
1667 -- integer N_Op_Divide nodes to indicate that the result should be
1668 -- rounded to the nearest integer (breaking ties away from zero), rather
1669 -- than truncated towards zero as usual. These rounded integer operations
1670 -- are the result of expansion of rounded fixed-point divide, conversion
1671 -- and multiplication operations.
1672
1673 -- SCIL_Entity (Node4-Sem)
1674 -- Present in SCIL nodes. Used to reference the tagged type associated
1675 -- with the SCIL node.
1676
1677 -- SCIL_Controlling_Tag (Node5-Sem)
1678 -- Present in N_SCIL_Dispatching_Call nodes. Used to reference the
1679 -- controlling tag of a dispatching call.
1680
1681 -- SCIL_Tag_Value (Node5-Sem)
1682 -- Present in N_SCIL_Membership_Test nodes. Used to reference the tag
1683 -- value that is being tested.
1684
1685 -- SCIL_Target_Prim (Node2-Sem)
1686 -- Present in N_SCIL_Dispatching_Call nodes. Used to reference the tagged
1687 -- type primitive associated with the SCIL node.
1688
1689 -- Scope (Node3-Sem)
1690 -- Present in defining identifiers, defining character literals and
1691 -- defining operator symbols (i.e. in all entities). The entities of a
1692 -- scope all use this field to reference the corresponding scope entity.
1693 -- See Einfo for further details.
1694
1695 -- Shift_Count_OK (Flag4-Sem)
1696 -- A flag present in shift nodes to indicate that the shift count is
1697 -- known to be in range, i.e. is in the range from zero to word length
1698 -- minus one. If this flag is not set, then the shift count may be
1699 -- outside this range, i.e. larger than the word length, and the code
1700 -- must ensure that such shift counts give the appropriate result.
1701
1702 -- Source_Type (Node1-Sem)
1703 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1704 -- source type entity for the unchecked conversion instantiation
1705 -- which gigi must do size validation for.
1706
1707 -- Split_PPC (Flag17)
1708 -- When a Pre or Postaspect specification is processed, it is broken
1709 -- into AND THEN sections. The left most section has Split_PPC set to
1710 -- False, indicating that it is the original specification (e.g. for
1711 -- posting errors). For other sections, Split_PPC is set to True.
1712 -- This flag is set in both the N_Aspect_Specification node itself,
1713 -- and in the pragma which is generated from this node.
1714
1715 -- Static_Processing_OK (Flag4-Sem)
1716 -- Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate
1717 -- flag is set, the full value of the aggregate can be determined at
1718 -- compile time and the aggregate can be passed as is to the back-end.
1719 -- In this event it is irrelevant whether this flag is set or not.
1720 -- However, if the flag Compile_Time_Known_Aggregate is not set but
1721 -- Static_Processing_OK is set, the aggregate can (but need not) be
1722 -- converted into a compile time known aggregate by the expander. See
1723 -- Sem_Aggr for the specific conditions under which an aggregate has its
1724 -- Static_Processing_OK flag set.
1725
1726 -- Storage_Pool (Node1-Sem)
1727 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1728 -- and N_Extended_Return_Statement nodes. References the entity for the
1729 -- storage pool to be used for the allocate or free call or for the
1730 -- allocation of the returned value from function. Empty indicates that
1731 -- the global default pool is to be used. Note that in the case
1732 -- of a return statement, this field is set only if the function returns
1733 -- value of a type whose size is not known at compile time on the
1734 -- secondary stack.
1735
1736 -- Suppress_Loop_Warnings (Flag17-Sem)
1737 -- Used in N_Loop_Statement node to indicate that warnings within the
1738 -- body of the loop should be suppressed. This is set when the range
1739 -- of a FOR loop is known to be null, or is probably null (loop would
1740 -- only execute if invalid values are present).
1741
1742 -- Target_Type (Node2-Sem)
1743 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
1744 -- type entity for the unchecked conversion instantiation which gigi must
1745 -- do size validation for.
1746
1747 -- Then_Actions (List3-Sem)
1748 -- This field is present in conditional expression nodes. During code
1749 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1750 -- actions at an appropriate place in the tree to get elaborated at the
1751 -- right time. For conditional expressions, we have to be sure that the
1752 -- actions for the Then branch are only elaborated if the condition is
1753 -- True. The Then_Actions field is used as a temporary parking place for
1754 -- these actions. The final tree is always rewritten to eliminate the
1755 -- need for this field, so in the tree passed to Gigi, this field is
1756 -- always set to No_List.
1757
1758 -- Treat_Fixed_As_Integer (Flag14-Sem)
1759 -- This flag appears in operator nodes for divide, multiply, mod and rem
1760 -- on fixed-point operands. It indicates that the operands are to be
1761 -- treated as integer values, ignoring small values. This flag is only
1762 -- set as a result of expansion of fixed-point operations. Typically a
1763 -- fixed-point multiplication in the source generates subsidiary
1764 -- multiplication and division operations that work with the underlying
1765 -- integer values and have this flag set. Note that this flag is not
1766 -- needed on other arithmetic operations (add, neg, subtract etc.) since
1767 -- in these cases it is always the case that fixed is treated as integer.
1768 -- The Etype field MUST be set if this flag is set. The analyzer knows to
1769 -- leave such nodes alone, and whoever makes them must set the correct
1770 -- Etype value.
1771
1772 -- TSS_Elist (Elist3-Sem)
1773 -- Present in N_Freeze_Entity nodes. Holds an element list containing
1774 -- entries for each TSS (type support subprogram) associated with the
1775 -- frozen type. The elements of the list are the entities for the
1776 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
1777 -- if there are no type support subprograms for the type or if the freeze
1778 -- node is not for a type.
1779
1780 -- Unreferenced_In_Spec (Flag7-Sem)
1781 -- Present in N_With_Clause nodes. Set if the with clause is on the
1782 -- package or subprogram spec where the main unit is the corresponding
1783 -- body, and is not referenced by the spec (it may still be referenced by
1784 -- the body, so this flag is used to generate the proper message (see
1785 -- Sem_Util.Check_Unused_Withs for details)
1786
1787 -- Was_Originally_Stub (Flag13-Sem)
1788 -- This flag is set in the node for a proper body that replaces stub.
1789 -- During the analysis procedure, stubs in some situations get rewritten
1790 -- by the corresponding bodies, and we set this flag to remember that
1791 -- this happened. Note that it is not good enough to rely on the use of
1792 -- Original_Node here because of the case of nested instantiations where
1793 -- the substituted node can be copied.
1794
1795 -- Withed_Body (Node1-Sem)
1796 -- Present in N_With_Clause nodes. Set if the unit in whose context
1797 -- the with_clause appears instantiates a generic contained in the
1798 -- library unit of the with_clause and as a result loads its body.
1799 -- Used for a more precise unit traversal for CodePeer.
1800
1801 -- Zero_Cost_Handling (Flag5-Sem)
1802 -- This flag is set in all handled sequence of statement and exception
1803 -- handler nodes if exceptions are to be handled using the zero-cost
1804 -- mechanism (see Ada.Exceptions and System.Exceptions in files
1805 -- a-except.ads/adb and s-except.ads for full details). What gigi needs
1806 -- to do for such a handler is simply to put the code in the handler
1807 -- somewhere. The front end has generated all necessary labels.
1808
1809 --------------------------------------------------
1810 -- Note on Use of End_Label and End_Span Fields --
1811 --------------------------------------------------
1812
1813 -- Several constructs have end lines:
1814
1815 -- Loop Statement end loop [loop_IDENTIFIER];
1816 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
1817 -- Task Definition end [task_IDENTIFIER]
1818 -- Protected Definition end [protected_IDENTIFIER]
1819 -- Protected Body end [protected_IDENTIFIER]
1820
1821 -- Block Statement end [block_IDENTIFIER];
1822 -- Subprogram Body end [DESIGNATOR];
1823 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
1824 -- Task Body end [task_IDENTIFIER];
1825 -- Accept Statement end [entry_IDENTIFIER]];
1826 -- Entry Body end [entry_IDENTIFIER];
1827
1828 -- If Statement end if;
1829 -- Case Statement end case;
1830
1831 -- Record Definition end record;
1832 -- Enumeration Definition );
1833
1834 -- The End_Label and End_Span fields are used to mark the locations of
1835 -- these lines, and also keep track of the label in the case where a label
1836 -- is present.
1837
1838 -- For the first group above, the End_Label field of the corresponding node
1839 -- is used to point to the label identifier. In the case where there is no
1840 -- label in the source, the parser supplies a dummy identifier (with
1841 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
1842 -- marks the location of the token following the END token.
1843
1844 -- For the second group, the use of End_Label is similar, but the End_Label
1845 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
1846 -- simply because in some cases there is no room in the parent node.
1847
1848 -- For the third group, there is never any label, and instead of using
1849 -- End_Label, we use the End_Span field which gives the location of the
1850 -- token following END, relative to the starting Sloc of the construct,
1851 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
1852 -- following the End_Label.
1853
1854 -- The record definition case is handled specially, we treat it as though
1855 -- it required an optional label which is never present, and so the parser
1856 -- always builds a dummy identifier with Comes From Source set False. The
1857 -- reason we do this, rather than using End_Span in this case, is that we
1858 -- want to generate a cross-ref entry for the end of a record, since it
1859 -- represents a scope for name declaration purposes.
1860
1861 -- The enumeration definition case is handled in an exactly similar manner,
1862 -- building a dummy identifier to get a cross-reference.
1863
1864 -- Note: the reason we store the difference as a Uint, instead of storing
1865 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
1866 -- distinguished from other types of values, and we count on all general
1867 -- use fields being self describing. To make things easier for clients,
1868 -- note that we provide function End_Location, and procedure
1869 -- Set_End_Location to allow access to the logical value (which is the
1870 -- Source_Ptr value for the end token).
1871
1872 ---------------------
1873 -- Syntactic Nodes --
1874 ---------------------
1875
1876 ---------------------
1877 -- 2.3 Identifier --
1878 ---------------------
1879
1880 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
1881 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
1882
1883 -- An IDENTIFIER shall not be a reserved word
1884
1885 -- In the Ada grammar identifiers are the bottom level tokens which have
1886 -- very few semantics. Actual program identifiers are direct names. If
1887 -- we were being 100% honest with the grammar, then we would have a node
1888 -- called N_Direct_Name which would point to an identifier. However,
1889 -- that's too many extra nodes, so we just use the N_Identifier node
1890 -- directly as a direct name, and it contains the expression fields and
1891 -- Entity field that correspond to its use as a direct name. In those
1892 -- few cases where identifiers appear in contexts where they are not
1893 -- direct names (pragmas, pragma argument associations, attribute
1894 -- references and attribute definition clauses), the Chars field of the
1895 -- node contains the Name_Id for the identifier name.
1896
1897 -- Note: in GNAT, a reserved word can be treated as an identifier in two
1898 -- cases. First, an incorrect use of a reserved word as an identifier is
1899 -- diagnosed and then treated as a normal identifier. Second, an
1900 -- attribute designator of the form of a reserved word (access, delta,
1901 -- digits, range) is treated as an identifier.
1902
1903 -- Note: The set of letters that is permitted in an identifier depends
1904 -- on the character set in use. See package Csets for full details.
1905
1906 -- N_Identifier
1907 -- Sloc points to identifier
1908 -- Chars (Name1) contains the Name_Id for the identifier
1909 -- Entity (Node4-Sem)
1910 -- Associated_Node (Node4-Sem)
1911 -- Original_Discriminant (Node2-Sem)
1912 -- Redundant_Use (Flag13-Sem)
1913 -- Has_Private_View (Flag11-Sem) (set in generic units)
1914 -- plus fields for expression
1915
1916 --------------------------
1917 -- 2.4 Numeric Literal --
1918 --------------------------
1919
1920 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
1921
1922 ----------------------------
1923 -- 2.4.1 Decimal Literal --
1924 ----------------------------
1925
1926 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
1927
1928 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
1929
1930 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
1931
1932 -- Decimal literals appear in the tree as either integer literal nodes
1933 -- or real literal nodes, depending on whether a period is present.
1934
1935 -- Note: literal nodes appear as a result of direct use of literals
1936 -- in the source program, and also as the result of evaluating
1937 -- expressions at compile time. In the latter case, it is possible
1938 -- to construct real literals that have no syntactic representation
1939 -- using the standard literal format. Such literals are listed by
1940 -- Sprint using the notation [numerator / denominator].
1941
1942 -- Note: the value of an integer literal node created by the front end
1943 -- is never outside the range of values of the base type. However, it
1944 -- can be the case that the value is outside the range of the
1945 -- particular subtype. This happens in the case of integer overflows
1946 -- with checks suppressed.
1947
1948 -- N_Integer_Literal
1949 -- Sloc points to literal
1950 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1951 -- has been constant-folded into its literal value.
1952 -- Intval (Uint3) contains integer value of literal
1953 -- plus fields for expression
1954 -- Print_In_Hex (Flag13-Sem)
1955
1956 -- N_Real_Literal
1957 -- Sloc points to literal
1958 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1959 -- has been constant-folded into its literal value.
1960 -- Realval (Ureal3) contains real value of literal
1961 -- Corresponding_Integer_Value (Uint4-Sem)
1962 -- Is_Machine_Number (Flag11-Sem)
1963 -- plus fields for expression
1964
1965 --------------------------
1966 -- 2.4.2 Based Literal --
1967 --------------------------
1968
1969 -- BASED_LITERAL ::=
1970 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
1971
1972 -- BASE ::= NUMERAL
1973
1974 -- BASED_NUMERAL ::=
1975 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
1976
1977 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
1978
1979 -- Based literals appear in the tree as either integer literal nodes
1980 -- or real literal nodes, depending on whether a period is present.
1981
1982 ----------------------------
1983 -- 2.5 Character Literal --
1984 ----------------------------
1985
1986 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
1987
1988 -- N_Character_Literal
1989 -- Sloc points to literal
1990 -- Chars (Name1) contains the Name_Id for the identifier
1991 -- Char_Literal_Value (Uint2) contains the literal value
1992 -- Entity (Node4-Sem)
1993 -- Associated_Node (Node4-Sem)
1994 -- Has_Private_View (Flag11-Sem) set in generic units.
1995 -- plus fields for expression
1996
1997 -- Note: the Entity field will be missing (set to Empty) for character
1998 -- literals whose type is Standard.Wide_Character or Standard.Character
1999 -- or a type derived from one of these two. In this case the character
2000 -- literal stands for its own coding. The reason we take this irregular
2001 -- short cut is to avoid the need to build lots of junk defining
2002 -- character literal nodes.
2003
2004 -------------------------
2005 -- 2.6 String Literal --
2006 -------------------------
2007
2008 -- STRING LITERAL ::= "{STRING_ELEMENT}"
2009
2010 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
2011 -- single GRAPHIC_CHARACTER other than a quotation mark.
2012 --
2013 -- Is_Folded_In_Parser is True if the parser created this literal by
2014 -- folding a sequence of "&" operators. For example, if the source code
2015 -- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
2016 -- is set. This flag is needed because the parser doesn't know about
2017 -- visibility, so the folded result might be wrong, and semantic
2018 -- analysis needs to check for that.
2019
2020 -- N_String_Literal
2021 -- Sloc points to literal
2022 -- Strval (Str3) contains Id of string value
2023 -- Has_Wide_Character (Flag11-Sem)
2024 -- Has_Wide_Wide_Character (Flag13-Sem)
2025 -- Is_Folded_In_Parser (Flag4)
2026 -- plus fields for expression
2027
2028 ------------------
2029 -- 2.7 Comment --
2030 ------------------
2031
2032 -- A COMMENT starts with two adjacent hyphens and extends up to the
2033 -- end of the line. A COMMENT may appear on any line of a program.
2034
2035 -- Comments are skipped by the scanner and do not appear in the tree.
2036 -- It is possible to reconstruct the position of comments with respect
2037 -- to the elements of the tree by using the source position (Sloc)
2038 -- pointers that appear in every tree node.
2039
2040 -----------------
2041 -- 2.8 Pragma --
2042 -----------------
2043
2044 -- PRAGMA ::= pragma IDENTIFIER
2045 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
2046
2047 -- Note that a pragma may appear in the tree anywhere a declaration
2048 -- or a statement may appear, as well as in some other situations
2049 -- which are explicitly documented.
2050
2051 -- N_Pragma
2052 -- Sloc points to PRAGMA
2053 -- Next_Pragma (Node1-Sem)
2054 -- Pragma_Argument_Associations (List2) (set to No_List if none)
2055 -- Debug_Statement (Node3) (set to Empty if not Debug)
2056 -- Pragma_Identifier (Node4)
2057 -- Next_Rep_Item (Node5-Sem)
2058 -- Pragma_Enabled (Flag5-Sem)
2059 -- From_Aspect_Specification (Flag13-Sem)
2060 -- Is_Delayed_Aspect (Flag14-Sem)
2061 -- Import_Interface_Present (Flag16-Sem)
2062 -- Aspect_Cancel (Flag11-Sem)
2063 -- Split_PPC (Flag17) set if corresponding aspect had Split_PPC set
2064 -- Class_Present (Flag6) set if from Aspect with 'Class
2065
2066 -- Note: we should have a section on what pragmas are passed on to
2067 -- the back end to be processed. This section should note that pragma
2068 -- Psect_Object is always converted to Common_Object, but there are
2069 -- undoubtedly many other similar notes required ???
2070
2071 -- Note: a utility function Pragma_Name may be applied to pragma nodes
2072 -- to conveniently obtain the Chars field of the Pragma_Identifier.
2073
2074 -- Note: if From_Aspect_Specification is set, then Sloc points to the
2075 -- aspect name, as does the Pragma_Identifier. In this case if the
2076 -- pragma has a local name argument (such as pragma Inline), it is
2077 -- resolved to point to the specific entity affected by the pragma.
2078
2079 --------------------------------------
2080 -- 2.8 Pragma Argument Association --
2081 --------------------------------------
2082
2083 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2084 -- [pragma_argument_IDENTIFIER =>] NAME
2085 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
2086
2087 -- N_Pragma_Argument_Association
2088 -- Sloc points to first token in association
2089 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
2090 -- Expression (Node3)
2091
2092 ------------------------
2093 -- 2.9 Reserved Word --
2094 ------------------------
2095
2096 -- Reserved words are parsed by the scanner, and returned as the
2097 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
2098
2099 ----------------------------
2100 -- 3.1 Basic Declaration --
2101 ----------------------------
2102
2103 -- BASIC_DECLARATION ::=
2104 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
2105 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
2106 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
2107 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
2108 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
2109 -- | GENERIC_INSTANTIATION
2110
2111 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
2112 -- see further description in section on semantic nodes.
2113
2114 -- Also, in the tree that is constructed, a pragma may appear
2115 -- anywhere that a declaration may appear.
2116
2117 ------------------------------
2118 -- 3.1 Defining Identifier --
2119 ------------------------------
2120
2121 -- DEFINING_IDENTIFIER ::= IDENTIFIER
2122
2123 -- A defining identifier is an entity, which has additional fields
2124 -- depending on the setting of the Ekind field. These additional
2125 -- fields are defined (and access subprograms declared) in package
2126 -- Einfo.
2127
2128 -- Note: N_Defining_Identifier is an extended node whose fields are
2129 -- deliberate layed out to match the layout of fields in an ordinary
2130 -- N_Identifier node allowing for easy alteration of an identifier
2131 -- node into a defining identifier node. For details, see procedure
2132 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
2133
2134 -- N_Defining_Identifier
2135 -- Sloc points to identifier
2136 -- Chars (Name1) contains the Name_Id for the identifier
2137 -- Next_Entity (Node2-Sem)
2138 -- Scope (Node3-Sem)
2139 -- Etype (Node5-Sem)
2140
2141 -----------------------------
2142 -- 3.2.1 Type Declaration --
2143 -----------------------------
2144
2145 -- TYPE_DECLARATION ::=
2146 -- FULL_TYPE_DECLARATION
2147 -- | INCOMPLETE_TYPE_DECLARATION
2148 -- | PRIVATE_TYPE_DECLARATION
2149 -- | PRIVATE_EXTENSION_DECLARATION
2150
2151 ----------------------------------
2152 -- 3.2.1 Full Type Declaration --
2153 ----------------------------------
2154
2155 -- FULL_TYPE_DECLARATION ::=
2156 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2157 -- is TYPE_DEFINITION
2158 -- [ASPECT_SPECIFICATIONS];
2159
2160 -- | TASK_TYPE_DECLARATION
2161 -- | PROTECTED_TYPE_DECLARATION
2162
2163 -- The full type declaration node is used only for the first case. The
2164 -- second case (concurrent type declaration), is represented directly
2165 -- by a task type declaration or a protected type declaration.
2166
2167 -- N_Full_Type_Declaration
2168 -- Sloc points to TYPE
2169 -- Defining_Identifier (Node1)
2170 -- Discriminant_Specifications (List4) (set to No_List if none)
2171 -- Type_Definition (Node3)
2172 -- Discr_Check_Funcs_Built (Flag11-Sem)
2173
2174 ----------------------------
2175 -- 3.2.1 Type Definition --
2176 ----------------------------
2177
2178 -- TYPE_DEFINITION ::=
2179 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2180 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2181 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
2182 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
2183
2184 --------------------------------
2185 -- 3.2.2 Subtype Declaration --
2186 --------------------------------
2187
2188 -- SUBTYPE_DECLARATION ::=
2189 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION;
2190
2191 -- The subtype indication field is set to Empty for subtypes
2192 -- declared in package Standard (Positive, Natural).
2193
2194 -- N_Subtype_Declaration
2195 -- Sloc points to SUBTYPE
2196 -- Defining_Identifier (Node1)
2197 -- Null_Exclusion_Present (Flag11)
2198 -- Subtype_Indication (Node5)
2199 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2200 -- Exception_Junk (Flag8-Sem)
2201
2202 -------------------------------
2203 -- 3.2.2 Subtype Indication --
2204 -------------------------------
2205
2206 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2207
2208 -- Note: if no constraint is present, the subtype indication appears
2209 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2210 -- node is used only if a constraint is present.
2211
2212 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2213 -- with the null-exclusion part (see AI-231), we had to introduce a new
2214 -- attribute in all the parents of subtype_indication nodes to indicate
2215 -- if the null-exclusion is present.
2216
2217 -- Note: the reason that this node has expression fields is that a
2218 -- subtype indication can appear as an operand of a membership test.
2219
2220 -- N_Subtype_Indication
2221 -- Sloc points to first token of subtype mark
2222 -- Subtype_Mark (Node4)
2223 -- Constraint (Node3)
2224 -- Etype (Node5-Sem)
2225 -- Must_Not_Freeze (Flag8-Sem)
2226
2227 -- Note: Etype is a copy of the Etype field of the Subtype_Mark. The
2228 -- reason for this redundancy is so that in a list of array index types,
2229 -- the Etype can be uniformly accessed to determine the subscript type.
2230 -- This means that no Itype is constructed for the actual subtype that
2231 -- is created by the subtype indication. If such an Itype is required,
2232 -- it is constructed in the context in which the indication appears.
2233
2234 -------------------------
2235 -- 3.2.2 Subtype Mark --
2236 -------------------------
2237
2238 -- SUBTYPE_MARK ::= subtype_NAME
2239
2240 -----------------------
2241 -- 3.2.2 Constraint --
2242 -----------------------
2243
2244 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2245
2246 ------------------------------
2247 -- 3.2.2 Scalar Constraint --
2248 ------------------------------
2249
2250 -- SCALAR_CONSTRAINT ::=
2251 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2252
2253 ---------------------------------
2254 -- 3.2.2 Composite Constraint --
2255 ---------------------------------
2256
2257 -- COMPOSITE_CONSTRAINT ::=
2258 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2259
2260 -------------------------------
2261 -- 3.3.1 Object Declaration --
2262 -------------------------------
2263
2264 -- OBJECT_DECLARATION ::=
2265 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2266 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION]
2267 -- [ASPECT_SPECIFICATIONS];
2268 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2269 -- ACCESS_DEFINITION [:= EXPRESSION]
2270 -- [ASPECT_SPECIFICATIONS];
2271 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2272 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION]
2273 -- [ASPECT_SPECIFICATIONS];
2274 -- | SINGLE_TASK_DECLARATION
2275 -- | SINGLE_PROTECTED_DECLARATION
2276
2277 -- Note: aliased is not permitted in Ada 83 mode
2278
2279 -- The N_Object_Declaration node is only for the first two cases.
2280 -- Single task declaration is handled by P_Task (9.1)
2281 -- Single protected declaration is handled by P_protected (9.5)
2282
2283 -- Although the syntax allows multiple identifiers in the list, the
2284 -- semantics is as though successive declarations were given with
2285 -- identical type definition and expression components. To simplify
2286 -- semantic processing, the parser represents a multiple declaration
2287 -- case as a sequence of single declarations, using the More_Ids and
2288 -- Prev_Ids flags to preserve the original source form as described
2289 -- in the section on "Handling of Defining Identifier Lists".
2290
2291 -- The flag Has_Init_Expression is set if an initializing expression
2292 -- is present. Normally it is set if and only if Expression contains
2293 -- a non-empty value, but there is an exception to this. When the
2294 -- initializing expression is an aggregate which requires explicit
2295 -- assignments, the Expression field gets set to Empty, but this flag
2296 -- is still set, so we don't forget we had an initializing expression.
2297
2298 -- Note: if a range check is required for the initialization
2299 -- expression then the Do_Range_Check flag is set in the Expression,
2300 -- with the check being done against the type given by the object
2301 -- definition, which is also the Etype of the defining identifier.
2302
2303 -- Note: the contents of the Expression field must be ignored (i.e.
2304 -- treated as though it were Empty) if No_Initialization is set True.
2305
2306 -- Note: the back end places some restrictions on the form of the
2307 -- Expression field. If the object being declared is Atomic, then
2308 -- the Expression may not have the form of an aggregate (since this
2309 -- might cause the back end to generate separate assignments). In this
2310 -- case the front end must generate an extra temporary and initialize
2311 -- this temporary as required (the temporary itself is not atomic).
2312
2313 -- Note: there is not node kind for object definition. Instead, the
2314 -- corresponding field holds a subtype indication, an array type
2315 -- definition, or (Ada 2005, AI-406) an access definition.
2316
2317 -- N_Object_Declaration
2318 -- Sloc points to first identifier
2319 -- Defining_Identifier (Node1)
2320 -- Aliased_Present (Flag4) set if ALIASED appears
2321 -- Constant_Present (Flag17) set if CONSTANT appears
2322 -- Null_Exclusion_Present (Flag11)
2323 -- Object_Definition (Node4) subtype indic./array type def./access def.
2324 -- Expression (Node3) (set to Empty if not present)
2325 -- Handler_List_Entry (Node2-Sem)
2326 -- Corresponding_Generic_Association (Node5-Sem)
2327 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2328 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2329 -- No_Initialization (Flag13-Sem)
2330 -- Assignment_OK (Flag15-Sem)
2331 -- Exception_Junk (Flag8-Sem)
2332 -- Is_Subprogram_Descriptor (Flag16-Sem)
2333 -- Has_Init_Expression (Flag14)
2334
2335 -------------------------------------
2336 -- 3.3.1 Defining Identifier List --
2337 -------------------------------------
2338
2339 -- DEFINING_IDENTIFIER_LIST ::=
2340 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2341
2342 -------------------------------
2343 -- 3.3.2 Number Declaration --
2344 -------------------------------
2345
2346 -- NUMBER_DECLARATION ::=
2347 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2348
2349 -- Although the syntax allows multiple identifiers in the list, the
2350 -- semantics is as though successive declarations were given with
2351 -- identical expressions. To simplify semantic processing, the parser
2352 -- represents a multiple declaration case as a sequence of single
2353 -- declarations, using the More_Ids and Prev_Ids flags to preserve
2354 -- the original source form as described in the section on "Handling
2355 -- of Defining Identifier Lists".
2356
2357 -- N_Number_Declaration
2358 -- Sloc points to first identifier
2359 -- Defining_Identifier (Node1)
2360 -- Expression (Node3)
2361 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2362 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2363
2364 ----------------------------------
2365 -- 3.4 Derived Type Definition --
2366 ----------------------------------
2367
2368 -- DERIVED_TYPE_DEFINITION ::=
2369 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2370 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2371
2372 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
2373 -- in Ada 83 mode
2374
2375 -- Note: a record extension part is required if ABSTRACT is present
2376
2377 -- N_Derived_Type_Definition
2378 -- Sloc points to NEW
2379 -- Abstract_Present (Flag4)
2380 -- Null_Exclusion_Present (Flag11) (set to False if not present)
2381 -- Subtype_Indication (Node5)
2382 -- Record_Extension_Part (Node3) (set to Empty if not present)
2383 -- Limited_Present (Flag17)
2384 -- Task_Present (Flag5) set in task interfaces
2385 -- Protected_Present (Flag6) set in protected interfaces
2386 -- Synchronized_Present (Flag7) set in interfaces
2387 -- Interface_List (List2) (set to No_List if none)
2388 -- Interface_Present (Flag16) set in abstract interfaces
2389
2390 -- Note: Task_Present, Protected_Present, Synchronized_Present,
2391 -- Interface_List, and Interface_Present are used for abstract
2392 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2393
2394 ---------------------------
2395 -- 3.5 Range Constraint --
2396 ---------------------------
2397
2398 -- RANGE_CONSTRAINT ::= range RANGE
2399
2400 -- N_Range_Constraint
2401 -- Sloc points to RANGE
2402 -- Range_Expression (Node4)
2403
2404 ----------------
2405 -- 3.5 Range --
2406 ----------------
2407
2408 -- RANGE ::=
2409 -- RANGE_ATTRIBUTE_REFERENCE
2410 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2411
2412 -- Note: the case of a range given as a range attribute reference
2413 -- appears directly in the tree as an attribute reference.
2414
2415 -- Note: the field name for a reference to a range is Range_Expression
2416 -- rather than Range, because range is a reserved keyword in Ada!
2417
2418 -- Note: the reason that this node has expression fields is that a
2419 -- range can appear as an operand of a membership test. The Etype
2420 -- field is the type of the range (we do NOT construct an implicit
2421 -- subtype to represent the range exactly).
2422
2423 -- N_Range
2424 -- Sloc points to ..
2425 -- Low_Bound (Node1)
2426 -- High_Bound (Node2)
2427 -- Includes_Infinities (Flag11)
2428 -- plus fields for expression
2429
2430 -- Note: if the range appears in a context, such as a subtype
2431 -- declaration, where range checks are required on one or both of
2432 -- the expression fields, then type conversion nodes are inserted
2433 -- to represent the required checks.
2434
2435 ----------------------------------------
2436 -- 3.5.1 Enumeration Type Definition --
2437 ----------------------------------------
2438
2439 -- ENUMERATION_TYPE_DEFINITION ::=
2440 -- (ENUMERATION_LITERAL_SPECIFICATION
2441 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2442
2443 -- Note: the Literals field in the node described below is null for
2444 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2445 -- which special processing handles these types as special cases.
2446
2447 -- N_Enumeration_Type_Definition
2448 -- Sloc points to left parenthesis
2449 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2450 -- End_Label (Node4) (set to Empty if internally generated record)
2451
2452 ----------------------------------------------
2453 -- 3.5.1 Enumeration Literal Specification --
2454 ----------------------------------------------
2455
2456 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2457 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2458
2459 ---------------------------------------
2460 -- 3.5.1 Defining Character Literal --
2461 ---------------------------------------
2462
2463 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2464
2465 -- A defining character literal is an entity, which has additional
2466 -- fields depending on the setting of the Ekind field. These
2467 -- additional fields are defined (and access subprograms declared)
2468 -- in package Einfo.
2469
2470 -- Note: N_Defining_Character_Literal is an extended node whose fields
2471 -- are deliberate layed out to match the layout of fields in an ordinary
2472 -- N_Character_Literal node allowing for easy alteration of a character
2473 -- literal node into a defining character literal node. For details, see
2474 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2475
2476 -- N_Defining_Character_Literal
2477 -- Sloc points to literal
2478 -- Chars (Name1) contains the Name_Id for the identifier
2479 -- Next_Entity (Node2-Sem)
2480 -- Scope (Node3-Sem)
2481 -- Etype (Node5-Sem)
2482
2483 ------------------------------------
2484 -- 3.5.4 Integer Type Definition --
2485 ------------------------------------
2486
2487 -- Note: there is an error in this rule in the latest version of the
2488 -- grammar, so we have retained the old rule pending clarification.
2489
2490 -- INTEGER_TYPE_DEFINITION ::=
2491 -- SIGNED_INTEGER_TYPE_DEFINITION
2492 -- | MODULAR_TYPE_DEFINITION
2493
2494 -------------------------------------------
2495 -- 3.5.4 Signed Integer Type Definition --
2496 -------------------------------------------
2497
2498 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2499 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2500
2501 -- Note: the Low_Bound and High_Bound fields are set to Empty
2502 -- for integer types defined in package Standard.
2503
2504 -- N_Signed_Integer_Type_Definition
2505 -- Sloc points to RANGE
2506 -- Low_Bound (Node1)
2507 -- High_Bound (Node2)
2508
2509 ------------------------------------
2510 -- 3.5.4 Modular Type Definition --
2511 ------------------------------------
2512
2513 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2514
2515 -- N_Modular_Type_Definition
2516 -- Sloc points to MOD
2517 -- Expression (Node3)
2518
2519 ---------------------------------
2520 -- 3.5.6 Real Type Definition --
2521 ---------------------------------
2522
2523 -- REAL_TYPE_DEFINITION ::=
2524 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2525
2526 --------------------------------------
2527 -- 3.5.7 Floating Point Definition --
2528 --------------------------------------
2529
2530 -- FLOATING_POINT_DEFINITION ::=
2531 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2532
2533 -- Note: The Digits_Expression and Real_Range_Specifications fields
2534 -- are set to Empty for floating-point types declared in Standard.
2535
2536 -- N_Floating_Point_Definition
2537 -- Sloc points to DIGITS
2538 -- Digits_Expression (Node2)
2539 -- Real_Range_Specification (Node4) (set to Empty if not present)
2540
2541 -------------------------------------
2542 -- 3.5.7 Real Range Specification --
2543 -------------------------------------
2544
2545 -- REAL_RANGE_SPECIFICATION ::=
2546 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2547
2548 -- N_Real_Range_Specification
2549 -- Sloc points to RANGE
2550 -- Low_Bound (Node1)
2551 -- High_Bound (Node2)
2552
2553 -----------------------------------
2554 -- 3.5.9 Fixed Point Definition --
2555 -----------------------------------
2556
2557 -- FIXED_POINT_DEFINITION ::=
2558 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2559
2560 --------------------------------------------
2561 -- 3.5.9 Ordinary Fixed Point Definition --
2562 --------------------------------------------
2563
2564 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2565 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2566
2567 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2568
2569 -- N_Ordinary_Fixed_Point_Definition
2570 -- Sloc points to DELTA
2571 -- Delta_Expression (Node3)
2572 -- Real_Range_Specification (Node4)
2573
2574 -------------------------------------------
2575 -- 3.5.9 Decimal Fixed Point Definition --
2576 -------------------------------------------
2577
2578 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2579 -- delta static_EXPRESSION
2580 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2581
2582 -- Note: decimal types are not permitted in Ada 83 mode
2583
2584 -- N_Decimal_Fixed_Point_Definition
2585 -- Sloc points to DELTA
2586 -- Delta_Expression (Node3)
2587 -- Digits_Expression (Node2)
2588 -- Real_Range_Specification (Node4) (set to Empty if not present)
2589
2590 ------------------------------
2591 -- 3.5.9 Digits Constraint --
2592 ------------------------------
2593
2594 -- DIGITS_CONSTRAINT ::=
2595 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2596
2597 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2598 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2599
2600 -- N_Digits_Constraint
2601 -- Sloc points to DIGITS
2602 -- Digits_Expression (Node2)
2603 -- Range_Constraint (Node4) (set to Empty if not present)
2604
2605 --------------------------------
2606 -- 3.6 Array Type Definition --
2607 --------------------------------
2608
2609 -- ARRAY_TYPE_DEFINITION ::=
2610 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2611
2612 -----------------------------------------
2613 -- 3.6 Unconstrained Array Definition --
2614 -----------------------------------------
2615
2616 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2617 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2618 -- COMPONENT_DEFINITION
2619
2620 -- Note: dimensionality of array is indicated by number of entries in
2621 -- the Subtype_Marks list, which has one entry for each dimension.
2622
2623 -- N_Unconstrained_Array_Definition
2624 -- Sloc points to ARRAY
2625 -- Subtype_Marks (List2)
2626 -- Component_Definition (Node4)
2627
2628 -----------------------------------
2629 -- 3.6 Index Subtype Definition --
2630 -----------------------------------
2631
2632 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2633
2634 -- There is no explicit node in the tree for an index subtype
2635 -- definition since the N_Unconstrained_Array_Definition node
2636 -- incorporates the type marks which appear in this context.
2637
2638 ---------------------------------------
2639 -- 3.6 Constrained Array Definition --
2640 ---------------------------------------
2641
2642 -- CONSTRAINED_ARRAY_DEFINITION ::=
2643 -- array (DISCRETE_SUBTYPE_DEFINITION
2644 -- {, DISCRETE_SUBTYPE_DEFINITION})
2645 -- of COMPONENT_DEFINITION
2646
2647 -- Note: dimensionality of array is indicated by number of entries
2648 -- in the Discrete_Subtype_Definitions list, which has one entry
2649 -- for each dimension.
2650
2651 -- N_Constrained_Array_Definition
2652 -- Sloc points to ARRAY
2653 -- Discrete_Subtype_Definitions (List2)
2654 -- Component_Definition (Node4)
2655
2656 --------------------------------------
2657 -- 3.6 Discrete Subtype Definition --
2658 --------------------------------------
2659
2660 -- DISCRETE_SUBTYPE_DEFINITION ::=
2661 -- discrete_SUBTYPE_INDICATION | RANGE
2662
2663 -------------------------------
2664 -- 3.6 Component Definition --
2665 -------------------------------
2666
2667 -- COMPONENT_DEFINITION ::=
2668 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
2669
2670 -- Note: although the syntax does not permit a component definition to
2671 -- be an anonymous array (and the parser will diagnose such an attempt
2672 -- with an appropriate message), it is possible for anonymous arrays
2673 -- to appear as component definitions. The semantics and back end handle
2674 -- this case properly, and the expander in fact generates such cases.
2675 -- Access_Definition is an optional field that gives support to
2676 -- Ada 2005 (AI-230). The parser generates nodes that have either the
2677 -- Subtype_Indication field or else the Access_Definition field.
2678
2679 -- N_Component_Definition
2680 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
2681 -- Aliased_Present (Flag4)
2682 -- Null_Exclusion_Present (Flag11)
2683 -- Subtype_Indication (Node5) (set to Empty if not present)
2684 -- Access_Definition (Node3) (set to Empty if not present)
2685
2686 -----------------------------
2687 -- 3.6.1 Index Constraint --
2688 -----------------------------
2689
2690 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
2691
2692 -- It is not in general possible to distinguish between discriminant
2693 -- constraints and index constraints at parse time, since a simple
2694 -- name could be either the subtype mark of a discrete range, or an
2695 -- expression in a discriminant association with no name. Either
2696 -- entry appears simply as the name, and the semantic parse must
2697 -- distinguish between the two cases. Thus we use a common tree
2698 -- node format for both of these constraint types.
2699
2700 -- See Discriminant_Constraint for format of node
2701
2702 ---------------------------
2703 -- 3.6.1 Discrete Range --
2704 ---------------------------
2705
2706 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
2707
2708 ----------------------------
2709 -- 3.7 Discriminant Part --
2710 ----------------------------
2711
2712 -- DISCRIMINANT_PART ::=
2713 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
2714
2715 ------------------------------------
2716 -- 3.7 Unknown Discriminant Part --
2717 ------------------------------------
2718
2719 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
2720
2721 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
2722
2723 -- There is no explicit node in the tree for an unknown discriminant
2724 -- part. Instead the Unknown_Discriminants_Present flag is set in the
2725 -- parent node.
2726
2727 ----------------------------------
2728 -- 3.7 Known Discriminant Part --
2729 ----------------------------------
2730
2731 -- KNOWN_DISCRIMINANT_PART ::=
2732 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
2733
2734 -------------------------------------
2735 -- 3.7 Discriminant Specification --
2736 -------------------------------------
2737
2738 -- DISCRIMINANT_SPECIFICATION ::=
2739 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
2740 -- [:= DEFAULT_EXPRESSION]
2741 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
2742 -- [:= DEFAULT_EXPRESSION]
2743
2744 -- Although the syntax allows multiple identifiers in the list, the
2745 -- semantics is as though successive specifications were given with
2746 -- identical type definition and expression components. To simplify
2747 -- semantic processing, the parser represents a multiple declaration
2748 -- case as a sequence of single specifications, using the More_Ids and
2749 -- Prev_Ids flags to preserve the original source form as described
2750 -- in the section on "Handling of Defining Identifier Lists".
2751
2752 -- N_Discriminant_Specification
2753 -- Sloc points to first identifier
2754 -- Defining_Identifier (Node1)
2755 -- Null_Exclusion_Present (Flag11)
2756 -- Discriminant_Type (Node5) subtype mark or access parameter definition
2757 -- Expression (Node3) (set to Empty if no default expression)
2758 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2759 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2760
2761 -----------------------------
2762 -- 3.7 Default Expression --
2763 -----------------------------
2764
2765 -- DEFAULT_EXPRESSION ::= EXPRESSION
2766
2767 ------------------------------------
2768 -- 3.7.1 Discriminant Constraint --
2769 ------------------------------------
2770
2771 -- DISCRIMINANT_CONSTRAINT ::=
2772 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
2773
2774 -- It is not in general possible to distinguish between discriminant
2775 -- constraints and index constraints at parse time, since a simple
2776 -- name could be either the subtype mark of a discrete range, or an
2777 -- expression in a discriminant association with no name. Either
2778 -- entry appears simply as the name, and the semantic parse must
2779 -- distinguish between the two cases. Thus we use a common tree
2780 -- node format for both of these constraint types.
2781
2782 -- N_Index_Or_Discriminant_Constraint
2783 -- Sloc points to left paren
2784 -- Constraints (List1) points to list of discrete ranges or
2785 -- discriminant associations
2786
2787 -------------------------------------
2788 -- 3.7.1 Discriminant Association --
2789 -------------------------------------
2790
2791 -- DISCRIMINANT_ASSOCIATION ::=
2792 -- [discriminant_SELECTOR_NAME
2793 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
2794
2795 -- Note: a discriminant association that has no selector name list
2796 -- appears directly as an expression in the tree.
2797
2798 -- N_Discriminant_Association
2799 -- Sloc points to first token of discriminant association
2800 -- Selector_Names (List1) (always non-empty, since if no selector
2801 -- names are present, this node is not used, see comment above)
2802 -- Expression (Node3)
2803
2804 ---------------------------------
2805 -- 3.8 Record Type Definition --
2806 ---------------------------------
2807
2808 -- RECORD_TYPE_DEFINITION ::=
2809 -- [[abstract] tagged] [limited] RECORD_DEFINITION
2810
2811 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
2812
2813 -- There is no explicit node in the tree for a record type definition.
2814 -- Instead the flags for Tagged_Present and Limited_Present appear in
2815 -- the N_Record_Definition node for a record definition appearing in
2816 -- the context of a record type definition.
2817
2818 ----------------------------
2819 -- 3.8 Record Definition --
2820 ----------------------------
2821
2822 -- RECORD_DEFINITION ::=
2823 -- record
2824 -- COMPONENT_LIST
2825 -- end record
2826 -- | null record
2827
2828 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
2829 -- flags appear only for a record definition appearing in a record
2830 -- type definition.
2831
2832 -- Note: the NULL RECORD case is not permitted in Ada 83
2833
2834 -- N_Record_Definition
2835 -- Sloc points to RECORD or NULL
2836 -- End_Label (Node4) (set to Empty if internally generated record)
2837 -- Abstract_Present (Flag4)
2838 -- Tagged_Present (Flag15)
2839 -- Limited_Present (Flag17)
2840 -- Component_List (Node1) empty in null record case
2841 -- Null_Present (Flag13) set in null record case
2842 -- Task_Present (Flag5) set in task interfaces
2843 -- Protected_Present (Flag6) set in protected interfaces
2844 -- Synchronized_Present (Flag7) set in interfaces
2845 -- Interface_Present (Flag16) set in abstract interfaces
2846 -- Interface_List (List2) (set to No_List if none)
2847
2848 -- Note: Task_Present, Protected_Present, Synchronized _Present,
2849 -- Interface_List and Interface_Present are used for abstract
2850 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2851
2852 -------------------------
2853 -- 3.8 Component List --
2854 -------------------------
2855
2856 -- COMPONENT_LIST ::=
2857 -- COMPONENT_ITEM {COMPONENT_ITEM}
2858 -- | {COMPONENT_ITEM} VARIANT_PART
2859 -- | null;
2860
2861 -- N_Component_List
2862 -- Sloc points to first token of component list
2863 -- Component_Items (List3)
2864 -- Variant_Part (Node4) (set to Empty if no variant part)
2865 -- Null_Present (Flag13)
2866
2867 -------------------------
2868 -- 3.8 Component Item --
2869 -------------------------
2870
2871 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
2872
2873 -- Note: A component item can also be a pragma, and in the tree
2874 -- that is obtained after semantic processing, a component item
2875 -- can be an N_Null node resulting from a non-recognized pragma.
2876
2877 --------------------------------
2878 -- 3.8 Component Declaration --
2879 --------------------------------
2880
2881 -- COMPONENT_DECLARATION ::=
2882 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
2883 -- [:= DEFAULT_EXPRESSION]
2884 -- [ASPECT_SPECIFICATIONS];
2885
2886 -- Note: although the syntax does not permit a component definition to
2887 -- be an anonymous array (and the parser will diagnose such an attempt
2888 -- with an appropriate message), it is possible for anonymous arrays
2889 -- to appear as component definitions. The semantics and back end handle
2890 -- this case properly, and the expander in fact generates such cases.
2891
2892 -- Although the syntax allows multiple identifiers in the list, the
2893 -- semantics is as though successive declarations were given with the
2894 -- same component definition and expression components. To simplify
2895 -- semantic processing, the parser represents a multiple declaration
2896 -- case as a sequence of single declarations, using the More_Ids and
2897 -- Prev_Ids flags to preserve the original source form as described
2898 -- in the section on "Handling of Defining Identifier Lists".
2899
2900 -- N_Component_Declaration
2901 -- Sloc points to first identifier
2902 -- Defining_Identifier (Node1)
2903 -- Component_Definition (Node4)
2904 -- Expression (Node3) (set to Empty if no default expression)
2905 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2906 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2907
2908 -------------------------
2909 -- 3.8.1 Variant Part --
2910 -------------------------
2911
2912 -- VARIANT_PART ::=
2913 -- case discriminant_DIRECT_NAME is
2914 -- VARIANT
2915 -- {VARIANT}
2916 -- end case;
2917
2918 -- Note: the variants list can contain pragmas as well as variants.
2919 -- In a properly formed program there is at least one variant.
2920
2921 -- N_Variant_Part
2922 -- Sloc points to CASE
2923 -- Name (Node2)
2924 -- Variants (List1)
2925
2926 --------------------
2927 -- 3.8.1 Variant --
2928 --------------------
2929
2930 -- VARIANT ::=
2931 -- when DISCRETE_CHOICE_LIST =>
2932 -- COMPONENT_LIST
2933
2934 -- N_Variant
2935 -- Sloc points to WHEN
2936 -- Discrete_Choices (List4)
2937 -- Component_List (Node1)
2938 -- Enclosing_Variant (Node2-Sem)
2939 -- Present_Expr (Uint3-Sem)
2940 -- Dcheck_Function (Node5-Sem)
2941
2942 ---------------------------------
2943 -- 3.8.1 Discrete Choice List --
2944 ---------------------------------
2945
2946 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
2947
2948 ----------------------------
2949 -- 3.8.1 Discrete Choice --
2950 ----------------------------
2951
2952 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
2953
2954 -- Note: in Ada 83 mode, the expression must be a simple expression
2955
2956 -- The only choice that appears explicitly is the OTHERS choice, as
2957 -- defined here. Other cases of discrete choice (expression and
2958 -- discrete range) appear directly. This production is also used
2959 -- for the OTHERS possibility of an exception choice.
2960
2961 -- Note: in accordance with the syntax, the parser does not check that
2962 -- OTHERS appears at the end on its own in a choice list context. This
2963 -- is a semantic check.
2964
2965 -- N_Others_Choice
2966 -- Sloc points to OTHERS
2967 -- Others_Discrete_Choices (List1-Sem)
2968 -- All_Others (Flag11-Sem)
2969
2970 ----------------------------------
2971 -- 3.9.1 Record Extension Part --
2972 ----------------------------------
2973
2974 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
2975
2976 -- Note: record extension parts are not permitted in Ada 83 mode
2977
2978 --------------------------------------
2979 -- 3.9.4 Interface Type Definition --
2980 --------------------------------------
2981
2982 -- INTERFACE_TYPE_DEFINITION ::=
2983 -- [limited | task | protected | synchronized]
2984 -- interface [interface_list]
2985
2986 -- Note: Interfaces are implemented with N_Record_Definition and
2987 -- N_Derived_Type_Definition nodes because most of the support
2988 -- for the analysis of abstract types has been reused to
2989 -- analyze abstract interfaces.
2990
2991 ----------------------------------
2992 -- 3.10 Access Type Definition --
2993 ----------------------------------
2994
2995 -- ACCESS_TYPE_DEFINITION ::=
2996 -- ACCESS_TO_OBJECT_DEFINITION
2997 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2998
2999 --------------------------
3000 -- 3.10 Null Exclusion --
3001 --------------------------
3002
3003 -- NULL_EXCLUSION ::= not null
3004
3005 ---------------------------------------
3006 -- 3.10 Access To Object Definition --
3007 ---------------------------------------
3008
3009 -- ACCESS_TO_OBJECT_DEFINITION ::=
3010 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
3011 -- SUBTYPE_INDICATION
3012
3013 -- N_Access_To_Object_Definition
3014 -- Sloc points to ACCESS
3015 -- All_Present (Flag15)
3016 -- Null_Exclusion_Present (Flag11)
3017 -- Subtype_Indication (Node5)
3018 -- Constant_Present (Flag17)
3019
3020 -----------------------------------
3021 -- 3.10 General Access Modifier --
3022 -----------------------------------
3023
3024 -- GENERAL_ACCESS_MODIFIER ::= all | constant
3025
3026 -- Note: general access modifiers are not permitted in Ada 83 mode
3027
3028 -- There is no explicit node in the tree for general access modifier.
3029 -- Instead the All_Present or Constant_Present flags are set in the
3030 -- parent node.
3031
3032 -------------------------------------------
3033 -- 3.10 Access To Subprogram Definition --
3034 -------------------------------------------
3035
3036 -- ACCESS_TO_SUBPROGRAM_DEFINITION
3037 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
3038 -- | [NULL_EXCLUSION] access [protected] function
3039 -- PARAMETER_AND_RESULT_PROFILE
3040
3041 -- Note: access to subprograms are not permitted in Ada 83 mode
3042
3043 -- N_Access_Function_Definition
3044 -- Sloc points to ACCESS
3045 -- Null_Exclusion_Present (Flag11)
3046 -- Null_Exclusion_In_Return_Present (Flag14)
3047 -- Protected_Present (Flag6)
3048 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3049 -- Result_Definition (Node4) result subtype (subtype mark or access def)
3050
3051 -- N_Access_Procedure_Definition
3052 -- Sloc points to ACCESS
3053 -- Null_Exclusion_Present (Flag11)
3054 -- Protected_Present (Flag6)
3055 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3056
3057 -----------------------------
3058 -- 3.10 Access Definition --
3059 -----------------------------
3060
3061 -- ACCESS_DEFINITION ::=
3062 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
3063 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3064
3065 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
3066
3067 -- N_Access_Definition
3068 -- Sloc points to ACCESS
3069 -- Null_Exclusion_Present (Flag11)
3070 -- All_Present (Flag15)
3071 -- Constant_Present (Flag17)
3072 -- Subtype_Mark (Node4)
3073 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
3074
3075 -----------------------------------------
3076 -- 3.10.1 Incomplete Type Declaration --
3077 -----------------------------------------
3078
3079 -- INCOMPLETE_TYPE_DECLARATION ::=
3080 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
3081
3082 -- N_Incomplete_Type_Declaration
3083 -- Sloc points to TYPE
3084 -- Defining_Identifier (Node1)
3085 -- Discriminant_Specifications (List4) (set to No_List if no
3086 -- discriminant part, or if the discriminant part is an
3087 -- unknown discriminant part)
3088 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
3089 -- Tagged_Present (Flag15)
3090
3091 ----------------------------
3092 -- 3.11 Declarative Part --
3093 ----------------------------
3094
3095 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
3096
3097 -- Note: although the parser enforces the syntactic requirement that
3098 -- a declarative part can contain only declarations, the semantic
3099 -- processing may add statements to the list of actions in a
3100 -- declarative part, so the code generator should be prepared
3101 -- to accept a statement in this position.
3102
3103 ----------------------------
3104 -- 3.11 Declarative Item --
3105 ----------------------------
3106
3107 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
3108
3109 ----------------------------------
3110 -- 3.11 Basic Declarative Item --
3111 ----------------------------------
3112
3113 -- BASIC_DECLARATIVE_ITEM ::=
3114 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
3115
3116 ----------------
3117 -- 3.11 Body --
3118 ----------------
3119
3120 -- BODY ::= PROPER_BODY | BODY_STUB
3121
3122 -----------------------
3123 -- 3.11 Proper Body --
3124 -----------------------
3125
3126 -- PROPER_BODY ::=
3127 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
3128
3129 ---------------
3130 -- 4.1 Name --
3131 ---------------
3132
3133 -- NAME ::=
3134 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
3135 -- | INDEXED_COMPONENT | SLICE
3136 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
3137 -- | TYPE_CONVERSION | FUNCTION_CALL
3138 -- | CHARACTER_LITERAL
3139
3140 ----------------------
3141 -- 4.1 Direct Name --
3142 ----------------------
3143
3144 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3145
3146 -----------------
3147 -- 4.1 Prefix --
3148 -----------------
3149
3150 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3151
3152 -------------------------------
3153 -- 4.1 Explicit Dereference --
3154 -------------------------------
3155
3156 -- EXPLICIT_DEREFERENCE ::= NAME . all
3157
3158 -- N_Explicit_Dereference
3159 -- Sloc points to ALL
3160 -- Prefix (Node3)
3161 -- Actual_Designated_Subtype (Node4-Sem)
3162 -- plus fields for expression
3163
3164 -------------------------------
3165 -- 4.1 Implicit Dereference --
3166 -------------------------------
3167
3168 -- IMPLICIT_DEREFERENCE ::= NAME
3169
3170 ------------------------------
3171 -- 4.1.1 Indexed Component --
3172 ------------------------------
3173
3174 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3175
3176 -- Note: the parser may generate this node in some situations where it
3177 -- should be a function call. The semantic pass must correct this
3178 -- misidentification (which is inevitable at the parser level).
3179
3180 -- N_Indexed_Component
3181 -- Sloc contains a copy of the Sloc value of the Prefix
3182 -- Prefix (Node3)
3183 -- Expressions (List1)
3184 -- plus fields for expression
3185
3186 -- Note: if any of the subscripts requires a range check, then the
3187 -- Do_Range_Check flag is set on the corresponding expression, with
3188 -- the index type being determined from the type of the Prefix, which
3189 -- references the array being indexed.
3190
3191 -- Note: in a fully analyzed and expanded indexed component node, and
3192 -- hence in any such node that gigi sees, if the prefix is an access
3193 -- type, then an explicit dereference operation has been inserted.
3194
3195 ------------------
3196 -- 4.1.2 Slice --
3197 ------------------
3198
3199 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3200
3201 -- Note: an implicit subtype is created to describe the resulting
3202 -- type, so that the bounds of this type are the bounds of the slice.
3203
3204 -- N_Slice
3205 -- Sloc points to first token of prefix
3206 -- Prefix (Node3)
3207 -- Discrete_Range (Node4)
3208 -- plus fields for expression
3209
3210 -------------------------------
3211 -- 4.1.3 Selected Component --
3212 -------------------------------
3213
3214 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3215
3216 -- Note: selected components that are semantically expanded names get
3217 -- changed during semantic processing into the separate N_Expanded_Name
3218 -- node. See description of this node in the section on semantic nodes.
3219
3220 -- N_Selected_Component
3221 -- Sloc points to period
3222 -- Prefix (Node3)
3223 -- Selector_Name (Node2)
3224 -- Associated_Node (Node4-Sem)
3225 -- Do_Discriminant_Check (Flag13-Sem)
3226 -- Is_In_Discriminant_Check (Flag11-Sem)
3227 -- plus fields for expression
3228
3229 --------------------------
3230 -- 4.1.3 Selector Name --
3231 --------------------------
3232
3233 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3234
3235 --------------------------------
3236 -- 4.1.4 Attribute Reference --
3237 --------------------------------
3238
3239 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3240
3241 -- Note: the syntax is quite ambiguous at this point. Consider:
3242
3243 -- A'Length (X) X is part of the attribute designator
3244 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
3245 -- A'Class (X) X is the expression of a type conversion
3246
3247 -- It would be possible for the parser to distinguish these cases
3248 -- by looking at the attribute identifier. However, that would mean
3249 -- more work in introducing new implementation defined attributes,
3250 -- and also it would mean that special processing for attributes
3251 -- would be scattered around, instead of being centralized in the
3252 -- semantic routine that handles an N_Attribute_Reference node.
3253 -- Consequently, the parser in all the above cases stores the
3254 -- expression (X in these examples) as a single element list in
3255 -- in the Expressions field of the N_Attribute_Reference node.
3256
3257 -- Similarly, for attributes like Max which take two arguments,
3258 -- we store the two arguments as a two element list in the
3259 -- Expressions field. Of course it is clear at parse time that
3260 -- this case is really a function call with an attribute as the
3261 -- prefix, but it turns out to be convenient to handle the two
3262 -- argument case in a similar manner to the one argument case,
3263 -- and indeed in general the parser will accept any number of
3264 -- expressions in this position and store them as a list in the
3265 -- attribute reference node. This allows for future addition of
3266 -- attributes that take more than two arguments.
3267
3268 -- Note: named associates are not permitted in function calls where
3269 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
3270 -- to skip the normal subprogram argument processing.
3271
3272 -- Note: for the attributes whose designators are technically keywords,
3273 -- i.e. digits, access, delta, range, the Attribute_Name field contains
3274 -- the corresponding name, even though no identifier is involved.
3275
3276 -- Note: the generated code may contain stream attributes applied to
3277 -- limited types for which no stream routines exist officially. In such
3278 -- case, the result is to use the stream attribute for the underlying
3279 -- full type, or in the case of a protected type, the components
3280 -- (including any discriminants) are merely streamed in order.
3281
3282 -- See Exp_Attr for a complete description of which attributes are
3283 -- passed onto Gigi, and which are handled entirely by the front end.
3284
3285 -- Gigi restriction: For the Pos attribute, the prefix cannot be
3286 -- a non-standard enumeration type or a nonzero/zero semantics
3287 -- boolean type, so the value is simply the stored representation.
3288
3289 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
3290 -- references a subprogram that is a renaming, then the front end must
3291 -- rewrite the attribute to refer directly to the renamed entity.
3292
3293 -- Note: In generated code, the Address and Unrestricted_Access
3294 -- attributes can be applied to any expression, and the meaning is
3295 -- to create an object containing the value (the object is in the
3296 -- current stack frame), and pass the address of this value. If the
3297 -- Must_Be_Byte_Aligned flag is set, then the object whose address
3298 -- is taken must be on a byte (storage unit) boundary, and if it is
3299 -- not (or may not be), then the generated code must create a copy
3300 -- that is byte aligned, and pass the address of this copy.
3301
3302 -- N_Attribute_Reference
3303 -- Sloc points to apostrophe
3304 -- Prefix (Node3)
3305 -- Attribute_Name (Name2) identifier name from attribute designator
3306 -- Expressions (List1) (set to No_List if no associated expressions)
3307 -- Entity (Node4-Sem) used if the attribute yields a type
3308 -- Associated_Node (Node4-Sem)
3309 -- Do_Overflow_Check (Flag17-Sem)
3310 -- Redundant_Use (Flag13-Sem)
3311 -- Must_Be_Byte_Aligned (Flag14)
3312 -- plus fields for expression
3313
3314 ---------------------------------
3315 -- 4.1.4 Attribute Designator --
3316 ---------------------------------
3317
3318 -- ATTRIBUTE_DESIGNATOR ::=
3319 -- IDENTIFIER [(static_EXPRESSION)]
3320 -- | access | delta | digits
3321
3322 -- There is no explicit node in the tree for an attribute designator.
3323 -- Instead the Attribute_Name and Expressions fields of the parent
3324 -- node (N_Attribute_Reference node) hold the information.
3325
3326 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
3327 -- designator, then they are treated as identifiers internally
3328 -- rather than the keywords of the same name.
3329
3330 --------------------------------------
3331 -- 4.1.4 Range Attribute Reference --
3332 --------------------------------------
3333
3334 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3335
3336 -- A range attribute reference is represented in the tree using the
3337 -- normal N_Attribute_Reference node.
3338
3339 ---------------------------------------
3340 -- 4.1.4 Range Attribute Designator --
3341 ---------------------------------------
3342
3343 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3344
3345 -- A range attribute designator is represented in the tree using the
3346 -- normal N_Attribute_Reference node.
3347
3348 --------------------
3349 -- 4.3 Aggregate --
3350 --------------------
3351
3352 -- AGGREGATE ::=
3353 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3354
3355 -----------------------------
3356 -- 4.3.1 Record Aggregate --
3357 -----------------------------
3358
3359 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3360
3361 -- N_Aggregate
3362 -- Sloc points to left parenthesis
3363 -- Expressions (List1) (set to No_List if none or null record case)
3364 -- Component_Associations (List2) (set to No_List if none)
3365 -- Null_Record_Present (Flag17)
3366 -- Aggregate_Bounds (Node3-Sem)
3367 -- Associated_Node (Node4-Sem)
3368 -- Static_Processing_OK (Flag4-Sem)
3369 -- Compile_Time_Known_Aggregate (Flag18-Sem)
3370 -- Expansion_Delayed (Flag11-Sem)
3371 -- Has_Self_Reference (Flag13-Sem)
3372 -- plus fields for expression
3373
3374 -- Note: this structure is used for both record and array aggregates
3375 -- since the two cases are not separable by the parser. The parser
3376 -- makes no attempt to enforce consistency here, so it is up to the
3377 -- semantic phase to make sure that the aggregate is consistent (i.e.
3378 -- that it is not a "half-and-half" case that mixes record and array
3379 -- syntax. In particular, for a record aggregate, the expressions
3380 -- field will be set if there are positional associations.
3381
3382 -- Note: N_Aggregate is not used for all aggregates; in particular,
3383 -- there is a separate node kind for extension aggregates.
3384
3385 -- Note: gigi/gcc can handle array aggregates correctly providing that
3386 -- they are entirely positional, and the array subtype involved has a
3387 -- known at compile time length and is not bit packed, or a convention
3388 -- Fortran array with more than one dimension. If these conditions
3389 -- are not met, then the front end must translate the aggregate into
3390 -- an appropriate set of assignments into a temporary.
3391
3392 -- Note: for the record aggregate case, gigi/gcc can handle all cases of
3393 -- record aggregates, including those for packed, and rep-claused
3394 -- records, and also variant records, providing that there are no
3395 -- variable length fields whose size is not known at compile time, and
3396 -- providing that the aggregate is presented in fully named form.
3397
3398 ----------------------------------------------
3399 -- 4.3.1 Record Component Association List --
3400 ----------------------------------------------
3401
3402 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
3403 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3404 -- | null record
3405
3406 -- There is no explicit node in the tree for a record component
3407 -- association list. Instead the Null_Record_Present flag is set in
3408 -- the parent node for the NULL RECORD case.
3409
3410 ------------------------------------------------------
3411 -- 4.3.1 Record Component Association (also 4.3.3) --
3412 ------------------------------------------------------
3413
3414 -- RECORD_COMPONENT_ASSOCIATION ::=
3415 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
3416
3417 -- N_Component_Association
3418 -- Sloc points to first selector name
3419 -- Choices (List1)
3420 -- Loop_Actions (List2-Sem)
3421 -- Expression (Node3)
3422 -- Box_Present (Flag15)
3423 -- Inherited_Discriminant (Flag13)
3424
3425 -- Note: this structure is used for both record component associations
3426 -- and array component associations, since the two cases aren't always
3427 -- separable by the parser. The choices list may represent either a
3428 -- list of selector names in the record aggregate case, or a list of
3429 -- discrete choices in the array aggregate case or an N_Others_Choice
3430 -- node (which appears as a singleton list). Box_Present gives support
3431 -- to Ada 2005 (AI-287).
3432
3433 ----------------------------------
3434 -- 4.3.1 Component Choice List --
3435 ----------------------------------
3436
3437 -- COMPONENT_CHOICE_LIST ::=
3438 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
3439 -- | others
3440
3441 -- The entries of a component choice list appear in the Choices list of
3442 -- the associated N_Component_Association, as either selector names, or
3443 -- as an N_Others_Choice node.
3444
3445 --------------------------------
3446 -- 4.3.2 Extension Aggregate --
3447 --------------------------------
3448
3449 -- EXTENSION_AGGREGATE ::=
3450 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3451
3452 -- Note: extension aggregates are not permitted in Ada 83 mode
3453
3454 -- N_Extension_Aggregate
3455 -- Sloc points to left parenthesis
3456 -- Ancestor_Part (Node3)
3457 -- Associated_Node (Node4-Sem)
3458 -- Expressions (List1) (set to No_List if none or null record case)
3459 -- Component_Associations (List2) (set to No_List if none)
3460 -- Null_Record_Present (Flag17)
3461 -- Expansion_Delayed (Flag11-Sem)
3462 -- Has_Self_Reference (Flag13-Sem)
3463 -- plus fields for expression
3464
3465 --------------------------
3466 -- 4.3.2 Ancestor Part --
3467 --------------------------
3468
3469 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3470
3471 ----------------------------
3472 -- 4.3.3 Array Aggregate --
3473 ----------------------------
3474
3475 -- ARRAY_AGGREGATE ::=
3476 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3477
3478 ---------------------------------------
3479 -- 4.3.3 Positional Array Aggregate --
3480 ---------------------------------------
3481
3482 -- POSITIONAL_ARRAY_AGGREGATE ::=
3483 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3484 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3485
3486 -- See Record_Aggregate (4.3.1) for node structure
3487
3488 ----------------------------------
3489 -- 4.3.3 Named Array Aggregate --
3490 ----------------------------------
3491
3492 -- NAMED_ARRAY_AGGREGATE ::=
3493 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3494
3495 -- See Record_Aggregate (4.3.1) for node structure
3496
3497 ----------------------------------------
3498 -- 4.3.3 Array Component Association --
3499 ----------------------------------------
3500
3501 -- ARRAY_COMPONENT_ASSOCIATION ::=
3502 -- DISCRETE_CHOICE_LIST => EXPRESSION
3503
3504 -- See Record_Component_Association (4.3.1) for node structure
3505
3506 --------------------------------------------------
3507 -- 4.4 Expression/Relation/Term/Factor/Primary --
3508 --------------------------------------------------
3509
3510 -- EXPRESSION ::=
3511 -- RELATION {and RELATION} | RELATION {and then RELATION}
3512 -- | RELATION {or RELATION} | RELATION {or else RELATION}
3513 -- | RELATION {xor RELATION}
3514
3515 -- RELATION ::=
3516 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3517 -- | SIMPLE_EXPRESSION [not] in RANGE
3518 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3519
3520 -- SIMPLE_EXPRESSION ::=
3521 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3522
3523 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3524
3525 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3526
3527 -- No nodes are generated for any of these constructs. Instead, the
3528 -- node for the operator appears directly. When we refer to an
3529 -- expression in this description, we mean any of the possible
3530 -- constituent components of an expression (e.g. identifier is
3531 -- an example of an expression).
3532
3533 ------------------
3534 -- 4.4 Primary --
3535 ------------------
3536
3537 -- PRIMARY ::=
3538 -- NUMERIC_LITERAL | null
3539 -- | STRING_LITERAL | AGGREGATE
3540 -- | NAME | QUALIFIED_EXPRESSION
3541 -- | ALLOCATOR | (EXPRESSION)
3542
3543 -- Usually there is no explicit node in the tree for primary. Instead
3544 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3545 -- exceptions. First, there is an explicit node for a null primary.
3546
3547 -- N_Null
3548 -- Sloc points to NULL
3549 -- plus fields for expression
3550
3551 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3552 -- that the parser keep track of which subexpressions are enclosed
3553 -- in parentheses, and how many levels of parentheses are used. This
3554 -- information is required for optimization purposes, and also for
3555 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3556 -- conform with ((((1)))) in the body).
3557
3558 -- The parentheses are recorded by keeping a Paren_Count field in every
3559 -- subexpression node (it is actually present in all nodes, but only
3560 -- used in subexpression nodes). This count records the number of
3561 -- levels of parentheses. If the number of levels in the source exceeds
3562 -- the maximum accommodated by this count, then the count is simply left
3563 -- at the maximum value. This means that there are some pathological
3564 -- cases of failure to detect conformance failures (e.g. an expression
3565 -- with 500 levels of parens will conform with one with 501 levels),
3566 -- but we do not need to lose sleep over this.
3567
3568 -- Historical note: in versions of GNAT prior to 1.75, there was a node
3569 -- type N_Parenthesized_Expression used to accurately record unlimited
3570 -- numbers of levels of parentheses. However, it turned out to be a
3571 -- real nuisance to have to take into account the possible presence of
3572 -- this node during semantic analysis, since basically parentheses have
3573 -- zero relevance to semantic analysis.
3574
3575 -- Note: the level of parentheses always present in things like
3576 -- aggregates does not count, only the parentheses in the primary
3577 -- (EXPRESSION) affect the setting of the Paren_Count field.
3578
3579 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
3580 -- treated as though it were Empty) if No_Initialization is set True.
3581
3582 --------------------------------------
3583 -- 4.5 Short Circuit Control Forms --
3584 --------------------------------------
3585
3586 -- EXPRESSION ::=
3587 -- RELATION {and then RELATION} | RELATION {or else RELATION}
3588
3589 -- Gigi restriction: For both these control forms, the operand and
3590 -- result types are always Standard.Boolean. The expander inserts the
3591 -- required conversion operations where needed to ensure this is the
3592 -- case.
3593
3594 -- N_And_Then
3595 -- Sloc points to AND of AND THEN
3596 -- Left_Opnd (Node2)
3597 -- Right_Opnd (Node3)
3598 -- Actions (List1-Sem)
3599 -- plus fields for expression
3600
3601 -- N_Or_Else
3602 -- Sloc points to OR of OR ELSE
3603 -- Left_Opnd (Node2)
3604 -- Right_Opnd (Node3)
3605 -- Actions (List1-Sem)
3606 -- plus fields for expression
3607
3608 -- Note: The Actions field is used to hold actions associated with
3609 -- the right hand operand. These have to be treated specially since
3610 -- they are not unconditionally executed. See Insert_Actions for a
3611 -- more detailed description of how these actions are handled.
3612
3613 ---------------------------
3614 -- 4.5 Membership Tests --
3615 ---------------------------
3616
3617 -- RELATION ::=
3618 -- SIMPLE_EXPRESSION [not] in RANGE
3619 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3620
3621 -- Note: although the grammar above allows only a range or a subtype
3622 -- mark, the parser in fact will accept any simple expression in place
3623 -- of a subtype mark. This means that the semantic analyzer must be able
3624 -- to deal with, and diagnose a simple expression other than a name for
3625 -- the right operand. This simplifies error recovery in the parser.
3626
3627 -- If extensions are enabled, the grammar is as follows:
3628
3629 -- RELATION ::=
3630 -- SIMPLE_EXPRESSION [not] in SET_ALTERNATIVE {| SET_ALTERNATIVE}
3631
3632 -- SET_ALTERNATIVE ::= RANGE | SUBTYPE_MARK
3633
3634 -- The Alternatives field below is present only if there is more than
3635 -- one Set_Alternative present, in which case Right_Opnd is set to
3636 -- Empty, and Alternatives contains the list of alternatives. In the
3637 -- tree passed to the back end, Alternatives is always No_List, and
3638 -- Right_Opnd is set (i.e. the expansion circuitry expands out the
3639 -- complex set membership case using simple membership operations).
3640
3641 -- N_In
3642 -- Sloc points to IN
3643 -- Left_Opnd (Node2)
3644 -- Right_Opnd (Node3)
3645 -- Alternatives (List4) (set to No_List if only one set alternative)
3646 -- plus fields for expression
3647
3648 -- N_Not_In
3649 -- Sloc points to NOT of NOT IN
3650 -- Left_Opnd (Node2)
3651 -- Right_Opnd (Node3)
3652 -- Alternatives (List4) (set to No_List if only one set alternative)
3653 -- plus fields for expression
3654
3655 --------------------
3656 -- 4.5 Operators --
3657 --------------------
3658
3659 -- LOGICAL_OPERATOR ::= and | or | xor
3660
3661 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
3662
3663 -- BINARY_ADDING_OPERATOR ::= + | - | &
3664
3665 -- UNARY_ADDING_OPERATOR ::= + | -
3666
3667 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
3668
3669 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
3670
3671 -- Sprint syntax if Treat_Fixed_As_Integer is set:
3672
3673 -- x #* y
3674 -- x #/ y
3675 -- x #mod y
3676 -- x #rem y
3677
3678 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
3679 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
3680 -- All handling of smalls for multiplication and division is handled
3681 -- by the front end (mod and rem result only from expansion). Gigi
3682 -- thus never needs to worry about small values (for other operators
3683 -- operating on fixed-point, e.g. addition, the small value does not
3684 -- have any semantic effect anyway, these are always integer operations.
3685
3686 -- Gigi restriction: For all operators taking Boolean operands, the
3687 -- type is always Standard.Boolean. The expander inserts the required
3688 -- conversion operations where needed to ensure this is the case.
3689
3690 -- N_Op_And
3691 -- Sloc points to AND
3692 -- Do_Length_Check (Flag4-Sem)
3693 -- plus fields for binary operator
3694 -- plus fields for expression
3695
3696 -- N_Op_Or
3697 -- Sloc points to OR
3698 -- Do_Length_Check (Flag4-Sem)
3699 -- plus fields for binary operator
3700 -- plus fields for expression
3701
3702 -- N_Op_Xor
3703 -- Sloc points to XOR
3704 -- Do_Length_Check (Flag4-Sem)
3705 -- plus fields for binary operator
3706 -- plus fields for expression
3707
3708 -- N_Op_Eq
3709 -- Sloc points to =
3710 -- plus fields for binary operator
3711 -- plus fields for expression
3712
3713 -- N_Op_Ne
3714 -- Sloc points to /=
3715 -- plus fields for binary operator
3716 -- plus fields for expression
3717
3718 -- N_Op_Lt
3719 -- Sloc points to <
3720 -- plus fields for binary operator
3721 -- plus fields for expression
3722
3723 -- N_Op_Le
3724 -- Sloc points to <=
3725 -- plus fields for binary operator
3726 -- plus fields for expression
3727
3728 -- N_Op_Gt
3729 -- Sloc points to >
3730 -- plus fields for binary operator
3731 -- plus fields for expression
3732
3733 -- N_Op_Ge
3734 -- Sloc points to >=
3735 -- plus fields for binary operator
3736 -- plus fields for expression
3737
3738 -- N_Op_Add
3739 -- Sloc points to + (binary)
3740 -- plus fields for binary operator
3741 -- plus fields for expression
3742
3743 -- N_Op_Subtract
3744 -- Sloc points to - (binary)
3745 -- plus fields for binary operator
3746 -- plus fields for expression
3747
3748 -- N_Op_Concat
3749 -- Sloc points to &
3750 -- Is_Component_Left_Opnd (Flag13-Sem)
3751 -- Is_Component_Right_Opnd (Flag14-Sem)
3752 -- plus fields for binary operator
3753 -- plus fields for expression
3754
3755 -- N_Op_Multiply
3756 -- Sloc points to *
3757 -- Treat_Fixed_As_Integer (Flag14-Sem)
3758 -- Rounded_Result (Flag18-Sem)
3759 -- plus fields for binary operator
3760 -- plus fields for expression
3761
3762 -- N_Op_Divide
3763 -- Sloc points to /
3764 -- Treat_Fixed_As_Integer (Flag14-Sem)
3765 -- Do_Division_Check (Flag13-Sem)
3766 -- Rounded_Result (Flag18-Sem)
3767 -- plus fields for binary operator
3768 -- plus fields for expression
3769
3770 -- N_Op_Mod
3771 -- Sloc points to MOD
3772 -- Treat_Fixed_As_Integer (Flag14-Sem)
3773 -- Do_Division_Check (Flag13-Sem)
3774 -- plus fields for binary operator
3775 -- plus fields for expression
3776
3777 -- N_Op_Rem
3778 -- Sloc points to REM
3779 -- Treat_Fixed_As_Integer (Flag14-Sem)
3780 -- Do_Division_Check (Flag13-Sem)
3781 -- plus fields for binary operator
3782 -- plus fields for expression
3783
3784 -- N_Op_Expon
3785 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
3786 -- Sloc points to **
3787 -- plus fields for binary operator
3788 -- plus fields for expression
3789
3790 -- N_Op_Plus
3791 -- Sloc points to + (unary)
3792 -- plus fields for unary operator
3793 -- plus fields for expression
3794
3795 -- N_Op_Minus
3796 -- Sloc points to - (unary)
3797 -- plus fields for unary operator
3798 -- plus fields for expression
3799
3800 -- N_Op_Abs
3801 -- Sloc points to ABS
3802 -- plus fields for unary operator
3803 -- plus fields for expression
3804
3805 -- N_Op_Not
3806 -- Sloc points to NOT
3807 -- plus fields for unary operator
3808 -- plus fields for expression
3809
3810 -- See also shift operators in section B.2
3811
3812 -- Note on fixed-point operations passed to Gigi: For adding operators,
3813 -- the semantics is to treat these simply as integer operations, with
3814 -- the small values being ignored (the bounds are already stored in
3815 -- units of small, so that constraint checking works as usual). For the
3816 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
3817 -- point operands if the Treat_Fixed_As_Integer flag is set and will
3818 -- thus treat these nodes in identical manner, ignoring small values.
3819
3820 ---------------------------------
3821 -- 4.5.9 Quantified Expression --
3822 ---------------------------------
3823
3824 -- QUANTIFIED_EXPRESSION ::=
3825 -- for QUANTIFIER LOOP_PARAMETER_SPECIFICATION => PREDICATE |
3826 -- for QUANTIFIER ITERATOR_SPECIFICATION => PREDICATE
3827 --
3828 -- QUANTIFIER ::= all | some
3829
3830 -- N_Quantified_Expression
3831 -- Sloc points to token for
3832 -- Loop_Parameter_Specification (Node4)
3833 -- Condition (Node1)
3834 -- All_Present (Flag15)
3835
3836 --------------------------
3837 -- 4.6 Type Conversion --
3838 --------------------------
3839
3840 -- TYPE_CONVERSION ::=
3841 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
3842
3843 -- In the (NAME) case, the name is stored as the expression
3844
3845 -- Note: the parser never generates a type conversion node, since it
3846 -- looks like an indexed component which is generated by preference.
3847 -- The semantic pass must correct this misidentification.
3848
3849 -- Gigi handles conversions that involve no change in the root type,
3850 -- and also all conversions from integer to floating-point types.
3851 -- Conversions from floating-point to integer are only handled in
3852 -- the case where Float_Truncate flag set. Other conversions from
3853 -- floating-point to integer (involving rounding) and all conversions
3854 -- involving fixed-point types are handled by the expander.
3855
3856 -- Sprint syntax if Float_Truncate set: X^(Y)
3857 -- Sprint syntax if Conversion_OK set X?(Y)
3858 -- Sprint syntax if both flags set X?^(Y)
3859
3860 -- Note: If either the operand or result type is fixed-point, Gigi will
3861 -- only see a type conversion node with Conversion_OK set. The front end
3862 -- takes care of all handling of small's for fixed-point conversions.
3863
3864 -- N_Type_Conversion
3865 -- Sloc points to first token of subtype mark
3866 -- Subtype_Mark (Node4)
3867 -- Expression (Node3)
3868 -- Do_Tag_Check (Flag13-Sem)
3869 -- Do_Length_Check (Flag4-Sem)
3870 -- Do_Overflow_Check (Flag17-Sem)
3871 -- Float_Truncate (Flag11-Sem)
3872 -- Rounded_Result (Flag18-Sem)
3873 -- Conversion_OK (Flag14-Sem)
3874 -- plus fields for expression
3875
3876 -- Note: if a range check is required, then the Do_Range_Check flag
3877 -- is set in the Expression with the check being done against the
3878 -- target type range (after the base type conversion, if any).
3879
3880 -------------------------------
3881 -- 4.7 Qualified Expression --
3882 -------------------------------
3883
3884 -- QUALIFIED_EXPRESSION ::=
3885 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
3886
3887 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
3888 -- the expression, so the Expression field of this node always points
3889 -- to a parenthesized expression in this case (i.e. Paren_Count will
3890 -- always be non-zero for the referenced expression if it is not an
3891 -- aggregate).
3892
3893 -- N_Qualified_Expression
3894 -- Sloc points to apostrophe
3895 -- Subtype_Mark (Node4)
3896 -- Expression (Node3) expression or aggregate
3897 -- plus fields for expression
3898
3899 --------------------
3900 -- 4.8 Allocator --
3901 --------------------
3902
3903 -- ALLOCATOR ::=
3904 -- new [NULL_EXCLUSION] SUBTYPE_INDICATION | new QUALIFIED_EXPRESSION
3905
3906 -- Sprint syntax (when storage pool present)
3907 -- new xxx (storage_pool = pool)
3908
3909 -- N_Allocator
3910 -- Sloc points to NEW
3911 -- Expression (Node3) subtype indication or qualified expression
3912 -- Storage_Pool (Node1-Sem)
3913 -- Procedure_To_Call (Node2-Sem)
3914 -- Coextensions (Elist4-Sem)
3915 -- Null_Exclusion_Present (Flag11)
3916 -- No_Initialization (Flag13-Sem)
3917 -- Is_Static_Coextension (Flag14-Sem)
3918 -- Do_Storage_Check (Flag17-Sem)
3919 -- Is_Dynamic_Coextension (Flag18-Sem)
3920 -- plus fields for expression
3921
3922 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
3923 -- This flag has a special function in conjunction with the restriction
3924 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
3925 -- is not set. This means that if a source allocator is replaced with
3926 -- a constructed allocator, the Comes_From_Source flag should be copied
3927 -- to the newly created allocator.
3928
3929 ---------------------------------
3930 -- 5.1 Sequence Of Statements --
3931 ---------------------------------
3932
3933 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
3934
3935 -- Note: Although the parser will not accept a declaration as a
3936 -- statement, the semantic analyzer may insert declarations (e.g.
3937 -- declarations of implicit types needed for execution of other
3938 -- statements) into a sequence of statements, so the code generator
3939 -- should be prepared to accept a declaration where a statement is
3940 -- expected. Note also that pragmas can appear as statements.
3941
3942 --------------------
3943 -- 5.1 Statement --
3944 --------------------
3945
3946 -- STATEMENT ::=
3947 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
3948
3949 -- There is no explicit node in the tree for a statement. Instead, the
3950 -- individual statement appears directly. Labels are treated as a
3951 -- kind of statement, i.e. they are linked into a statement list at
3952 -- the point they appear, so the labeled statement appears following
3953 -- the label or labels in the statement list.
3954
3955 ---------------------------
3956 -- 5.1 Simple Statement --
3957 ---------------------------
3958
3959 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
3960 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
3961 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
3962 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
3963 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
3964 -- | ABORT_STATEMENT | RAISE_STATEMENT
3965 -- | CODE_STATEMENT
3966
3967 -----------------------------
3968 -- 5.1 Compound Statement --
3969 -----------------------------
3970
3971 -- COMPOUND_STATEMENT ::=
3972 -- IF_STATEMENT | CASE_STATEMENT
3973 -- | LOOP_STATEMENT | BLOCK_STATEMENT
3974 -- | EXTENDED_RETURN_STATEMENT
3975 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
3976
3977 -------------------------
3978 -- 5.1 Null Statement --
3979 -------------------------
3980
3981 -- NULL_STATEMENT ::= null;
3982
3983 -- N_Null_Statement
3984 -- Sloc points to NULL
3985
3986 ----------------
3987 -- 5.1 Label --
3988 ----------------
3989
3990 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
3991
3992 -- Note that the occurrence of a label is not a defining identifier,
3993 -- but rather a referencing occurrence. The defining occurrence is
3994 -- in the implicit label declaration which occurs in the innermost
3995 -- enclosing block.
3996
3997 -- N_Label
3998 -- Sloc points to <<
3999 -- Identifier (Node1) direct name of statement identifier
4000 -- Exception_Junk (Flag8-Sem)
4001
4002 -- Note: Before Ada 2012, a label is always followed by a statement,
4003 -- and this is true in the tree even in Ada 2012 mode (the parser
4004 -- inserts a null statement marked with Comes_From_Source False).
4005
4006 -------------------------------
4007 -- 5.1 Statement Identifier --
4008 -------------------------------
4009
4010 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
4011
4012 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
4013 -- (not an OPERATOR_SYMBOL)
4014
4015 -------------------------------
4016 -- 5.2 Assignment Statement --
4017 -------------------------------
4018
4019 -- ASSIGNMENT_STATEMENT ::=
4020 -- variable_NAME := EXPRESSION;
4021
4022 -- N_Assignment_Statement
4023 -- Sloc points to :=
4024 -- Name (Node2)
4025 -- Expression (Node3)
4026 -- Do_Tag_Check (Flag13-Sem)
4027 -- Do_Length_Check (Flag4-Sem)
4028 -- Forwards_OK (Flag5-Sem)
4029 -- Backwards_OK (Flag6-Sem)
4030 -- No_Ctrl_Actions (Flag7-Sem)
4031 -- Componentwise_Assignment (Flag14-Sem)
4032
4033 -- Note: if a range check is required, then the Do_Range_Check flag
4034 -- is set in the Expression (right hand side), with the check being
4035 -- done against the type of the Name (left hand side).
4036
4037 -- Note: the back end places some restrictions on the form of the
4038 -- Expression field. If the object being assigned to is Atomic, then
4039 -- the Expression may not have the form of an aggregate (since this
4040 -- might cause the back end to generate separate assignments). In this
4041 -- case the front end must generate an extra temporary and initialize
4042 -- this temporary as required (the temporary itself is not atomic).
4043
4044 -----------------------
4045 -- 5.3 If Statement --
4046 -----------------------
4047
4048 -- IF_STATEMENT ::=
4049 -- if CONDITION then
4050 -- SEQUENCE_OF_STATEMENTS
4051 -- {elsif CONDITION then
4052 -- SEQUENCE_OF_STATEMENTS}
4053 -- [else
4054 -- SEQUENCE_OF_STATEMENTS]
4055 -- end if;
4056
4057 -- Gigi restriction: This expander ensures that the type of the
4058 -- Condition fields is always Standard.Boolean, even if the type
4059 -- in the source is some non-standard boolean type.
4060
4061 -- N_If_Statement
4062 -- Sloc points to IF
4063 -- Condition (Node1)
4064 -- Then_Statements (List2)
4065 -- Elsif_Parts (List3) (set to No_List if none present)
4066 -- Else_Statements (List4) (set to No_List if no else part present)
4067 -- End_Span (Uint5) (set to No_Uint if expander generated)
4068
4069 -- N_Elsif_Part
4070 -- Sloc points to ELSIF
4071 -- Condition (Node1)
4072 -- Then_Statements (List2)
4073 -- Condition_Actions (List3-Sem)
4074
4075 --------------------
4076 -- 5.3 Condition --
4077 --------------------
4078
4079 -- CONDITION ::= boolean_EXPRESSION
4080
4081 -------------------------
4082 -- 5.4 Case Statement --
4083 -------------------------
4084
4085 -- CASE_STATEMENT ::=
4086 -- case EXPRESSION is
4087 -- CASE_STATEMENT_ALTERNATIVE
4088 -- {CASE_STATEMENT_ALTERNATIVE}
4089 -- end case;
4090
4091 -- Note: the Alternatives can contain pragmas. These only occur at
4092 -- the start of the list, since any pragmas occurring after the first
4093 -- alternative are absorbed into the corresponding statement sequence.
4094
4095 -- N_Case_Statement
4096 -- Sloc points to CASE
4097 -- Expression (Node3)
4098 -- Alternatives (List4)
4099 -- End_Span (Uint5) (set to No_Uint if expander generated)
4100
4101 -- Note: Before Ada 2012, a pragma in a statement sequence is always
4102 -- followed by a statement, and this is true in the tree even in Ada
4103 -- 2012 mode (the parser inserts a null statement marked with the flag
4104 -- Comes_From_Source False).
4105
4106 -------------------------------------
4107 -- 5.4 Case Statement Alternative --
4108 -------------------------------------
4109
4110 -- CASE_STATEMENT_ALTERNATIVE ::=
4111 -- when DISCRETE_CHOICE_LIST =>
4112 -- SEQUENCE_OF_STATEMENTS
4113
4114 -- N_Case_Statement_Alternative
4115 -- Sloc points to WHEN
4116 -- Discrete_Choices (List4)
4117 -- Statements (List3)
4118
4119 -------------------------
4120 -- 5.5 Loop Statement --
4121 -------------------------
4122
4123 -- LOOP_STATEMENT ::=
4124 -- [loop_STATEMENT_IDENTIFIER :]
4125 -- [ITERATION_SCHEME] loop
4126 -- SEQUENCE_OF_STATEMENTS
4127 -- end loop [loop_IDENTIFIER];
4128
4129 -- Note: The occurrence of a loop label is not a defining identifier
4130 -- but rather a referencing occurrence. The defining occurrence is in
4131 -- the implicit label declaration which occurs in the innermost
4132 -- enclosing block.
4133
4134 -- Note: there is always a loop statement identifier present in
4135 -- the tree, even if none was given in the source. In the case where
4136 -- no loop identifier is given in the source, the parser creates
4137 -- a name of the form _Loop_n, where n is a decimal integer (the
4138 -- two underlines ensure that the loop names created in this manner
4139 -- do not conflict with any user defined identifiers), and the flag
4140 -- Has_Created_Identifier is set to True. The only exception to the
4141 -- rule that all loop statement nodes have identifiers occurs for
4142 -- loops constructed by the expander, and the semantic analyzer will
4143 -- create and supply dummy loop identifiers in these cases.
4144
4145 -- N_Loop_Statement
4146 -- Sloc points to LOOP
4147 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
4148 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
4149 -- Statements (List3)
4150 -- End_Label (Node4)
4151 -- Has_Created_Identifier (Flag15)
4152 -- Is_Null_Loop (Flag16)
4153 -- Suppress_Loop_Warnings (Flag17)
4154
4155 -- Note: the parser fills in the Identifier field if there is an
4156 -- explicit loop identifier. Otherwise the parser leaves this field
4157 -- set to Empty, and then the semantic processing for a loop statement
4158 -- creates an identifier, setting the Has_Created_Identifier flag to
4159 -- True. So after semantic anlaysis, the Identifier is always set,
4160 -- referencing an identifier whose entity has an Ekind of E_Loop.
4161
4162 --------------------------
4163 -- 5.5 Iteration Scheme --
4164 --------------------------
4165
4166 -- ITERATION_SCHEME ::=
4167 -- while CONDITION | for LOOP_PARAMETER_SPECIFICATION
4168
4169 -- Gigi restriction: This expander ensures that the type of the
4170 -- Condition field is always Standard.Boolean, even if the type
4171 -- in the source is some non-standard boolean type.
4172
4173 -- N_Iteration_Scheme
4174 -- Sloc points to WHILE or FOR
4175 -- Condition (Node1) (set to Empty if FOR case)
4176 -- Condition_Actions (List3-Sem)
4177 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
4178
4179 ---------------------------------------
4180 -- 5.5 Loop parameter specification --
4181 ---------------------------------------
4182
4183 -- LOOP_PARAMETER_SPECIFICATION ::=
4184 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
4185
4186 -- N_Loop_Parameter_Specification
4187 -- Sloc points to first identifier
4188 -- Defining_Identifier (Node1)
4189 -- Reverse_Present (Flag15)
4190 -- Discrete_Subtype_Definition (Node4)
4191
4192 --------------------------
4193 -- 5.6 Block Statement --
4194 --------------------------
4195
4196 -- BLOCK_STATEMENT ::=
4197 -- [block_STATEMENT_IDENTIFIER:]
4198 -- [declare
4199 -- DECLARATIVE_PART]
4200 -- begin
4201 -- HANDLED_SEQUENCE_OF_STATEMENTS
4202 -- end [block_IDENTIFIER];
4203
4204 -- Note that the occurrence of a block identifier is not a defining
4205 -- identifier, but rather a referencing occurrence. The defining
4206 -- occurrence is an E_Block entity declared by the implicit label
4207 -- declaration which occurs in the innermost enclosing block statement
4208 -- or body; the block identifier denotes that E_Block.
4209
4210 -- For block statements that come from source code, there is always a
4211 -- block statement identifier present in the tree, denoting an
4212 -- E_Block. In the case where no block identifier is given in the
4213 -- source, the parser creates a name of the form B_n, where n is a
4214 -- decimal integer, and the flag Has_Created_Identifier is set to
4215 -- True. Blocks constructed by the expander usually have no identifier,
4216 -- and no corresponding entity.
4217
4218 -- Note: the block statement created for an extended return statement
4219 -- has an entity, and this entity is an E_Return_Statement, rather than
4220 -- the usual E_Block.
4221
4222 -- Note: Exception_Junk is set for the wrapping blocks created during
4223 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
4224
4225 -- N_Block_Statement
4226 -- Sloc points to DECLARE or BEGIN
4227 -- Identifier (Node1) block direct name (set to Empty if not present)
4228 -- Declarations (List2) (set to No_List if no DECLARE part)
4229 -- Handled_Statement_Sequence (Node4)
4230 -- Is_Task_Master (Flag5-Sem)
4231 -- Activation_Chain_Entity (Node3-Sem)
4232 -- Has_Created_Identifier (Flag15)
4233 -- Is_Task_Allocation_Block (Flag6)
4234 -- Is_Asynchronous_Call_Block (Flag7)
4235 -- Exception_Junk (Flag8-Sem)
4236
4237 -------------------------
4238 -- 5.7 Exit Statement --
4239 -------------------------
4240
4241 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
4242
4243 -- Gigi restriction: This expander ensures that the type of the
4244 -- Condition field is always Standard.Boolean, even if the type
4245 -- in the source is some non-standard boolean type.
4246
4247 -- N_Exit_Statement
4248 -- Sloc points to EXIT
4249 -- Name (Node2) (set to Empty if no loop name present)
4250 -- Condition (Node1) (set to Empty if no WHEN part present)
4251 -- Next_Exit_Statement (Node3-Sem): Next exit on chain
4252
4253 -------------------------
4254 -- 5.9 Goto Statement --
4255 -------------------------
4256
4257 -- GOTO_STATEMENT ::= goto label_NAME;
4258
4259 -- N_Goto_Statement
4260 -- Sloc points to GOTO
4261 -- Name (Node2)
4262 -- Exception_Junk (Flag8-Sem)
4263
4264 ---------------------------------
4265 -- 6.1 Subprogram Declaration --
4266 ---------------------------------
4267
4268 -- SUBPROGRAM_DECLARATION ::=
4269 -- SUBPROGRAM_SPECIFICATION
4270 -- [ASPECT_SPECIFICATIONS];
4271
4272 -- N_Subprogram_Declaration
4273 -- Sloc points to FUNCTION or PROCEDURE
4274 -- Specification (Node1)
4275 -- Body_To_Inline (Node3-Sem)
4276 -- Corresponding_Body (Node5-Sem)
4277 -- Parent_Spec (Node4-Sem)
4278
4279 ------------------------------------------
4280 -- 6.1 Abstract Subprogram Declaration --
4281 ------------------------------------------
4282
4283 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
4284 -- SUBPROGRAM_SPECIFICATION is abstract
4285 -- [ASPECT_SPECIFICATIONS];
4286
4287 -- N_Abstract_Subprogram_Declaration
4288 -- Sloc points to ABSTRACT
4289 -- Specification (Node1)
4290
4291 -----------------------------------
4292 -- 6.1 Subprogram Specification --
4293 -----------------------------------
4294
4295 -- SUBPROGRAM_SPECIFICATION ::=
4296 -- [[not] overriding]
4297 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
4298 -- | [[not] overriding]
4299 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
4300
4301 -- Note: there are no separate nodes for the profiles, instead the
4302 -- information appears directly in the following nodes.
4303
4304 -- N_Function_Specification
4305 -- Sloc points to FUNCTION
4306 -- Defining_Unit_Name (Node1) (the designator)
4307 -- Elaboration_Boolean (Node2-Sem)
4308 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4309 -- Null_Exclusion_Present (Flag11)
4310 -- Result_Definition (Node4) for result subtype
4311 -- Generic_Parent (Node5-Sem)
4312 -- Must_Override (Flag14) set if overriding indicator present
4313 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4314
4315 -- N_Procedure_Specification
4316 -- Sloc points to PROCEDURE
4317 -- Defining_Unit_Name (Node1)
4318 -- Elaboration_Boolean (Node2-Sem)
4319 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4320 -- Generic_Parent (Node5-Sem)
4321 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
4322 -- Must_Override (Flag14) set if overriding indicator present
4323 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4324
4325 -- Note: overriding indicator is an Ada 2005 feature
4326
4327 ---------------------
4328 -- 6.1 Designator --
4329 ---------------------
4330
4331 -- DESIGNATOR ::=
4332 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
4333
4334 -- Designators that are simply identifiers or operator symbols appear
4335 -- directly in the tree in this form. The following node is used only
4336 -- in the case where the designator has a parent unit name component.
4337
4338 -- N_Designator
4339 -- Sloc points to period
4340 -- Name (Node2) holds the parent unit name. Note that this is always
4341 -- non-Empty, since this node is only used for the case where a
4342 -- parent library unit package name is present.
4343 -- Identifier (Node1)
4344
4345 -- Note that the identifier can also be an operator symbol here
4346
4347 ------------------------------
4348 -- 6.1 Defining Designator --
4349 ------------------------------
4350
4351 -- DEFINING_DESIGNATOR ::=
4352 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
4353
4354 -------------------------------------
4355 -- 6.1 Defining Program Unit Name --
4356 -------------------------------------
4357
4358 -- DEFINING_PROGRAM_UNIT_NAME ::=
4359 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
4360
4361 -- The parent unit name is present only in the case of a child unit
4362 -- name (permissible only for Ada 95 for a library level unit, i.e.
4363 -- a unit at scope level one). If no such name is present, the defining
4364 -- program unit name is represented simply as the defining identifier.
4365 -- In the child unit case, the following node is used to represent the
4366 -- child unit name.
4367
4368 -- N_Defining_Program_Unit_Name
4369 -- Sloc points to period
4370 -- Name (Node2) holds the parent unit name. Note that this is always
4371 -- non-Empty, since this node is only used for the case where a
4372 -- parent unit name is present.
4373 -- Defining_Identifier (Node1)
4374
4375 --------------------------
4376 -- 6.1 Operator Symbol --
4377 --------------------------
4378
4379 -- OPERATOR_SYMBOL ::= STRING_LITERAL
4380
4381 -- Note: the fields of the N_Operator_Symbol node are laid out to
4382 -- match the corresponding fields of an N_Character_Literal node. This
4383 -- allows easy conversion of the operator symbol node into a character
4384 -- literal node in the case where a string constant of the form of an
4385 -- operator symbol is scanned out as such, but turns out semantically
4386 -- to be a string literal that is not an operator. For details see
4387 -- Sinfo.CN.Change_Operator_Symbol_To_String_Literal.
4388
4389 -- N_Operator_Symbol
4390 -- Sloc points to literal
4391 -- Chars (Name1) contains the Name_Id for the operator symbol
4392 -- Strval (Str3) Id of string value. This is used if the operator
4393 -- symbol turns out to be a normal string after all.
4394 -- Entity (Node4-Sem)
4395 -- Associated_Node (Node4-Sem)
4396 -- Has_Private_View (Flag11-Sem) set in generic units.
4397 -- Etype (Node5-Sem)
4398
4399 -- Note: the Strval field may be set to No_String for generated
4400 -- operator symbols that are known not to be string literals
4401 -- semantically.
4402
4403 -----------------------------------
4404 -- 6.1 Defining Operator Symbol --
4405 -----------------------------------
4406
4407 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
4408
4409 -- A defining operator symbol is an entity, which has additional
4410 -- fields depending on the setting of the Ekind field. These
4411 -- additional fields are defined (and access subprograms declared)
4412 -- in package Einfo.
4413
4414 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
4415 -- are deliberately layed out to match the layout of fields in an
4416 -- ordinary N_Operator_Symbol node allowing for easy alteration of
4417 -- an operator symbol node into a defining operator symbol node.
4418 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
4419 -- for further details.
4420
4421 -- N_Defining_Operator_Symbol
4422 -- Sloc points to literal
4423 -- Chars (Name1) contains the Name_Id for the operator symbol
4424 -- Next_Entity (Node2-Sem)
4425 -- Scope (Node3-Sem)
4426 -- Etype (Node5-Sem)
4427
4428 ----------------------------
4429 -- 6.1 Parameter Profile --
4430 ----------------------------
4431
4432 -- PARAMETER_PROFILE ::= [FORMAL_PART]
4433
4434 ---------------------------------------
4435 -- 6.1 Parameter and Result Profile --
4436 ---------------------------------------
4437
4438 -- PARAMETER_AND_RESULT_PROFILE ::=
4439 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
4440 -- | [FORMAL_PART] return ACCESS_DEFINITION
4441
4442 -- There is no explicit node in the tree for a parameter and result
4443 -- profile. Instead the information appears directly in the parent.
4444
4445 ----------------------
4446 -- 6.1 Formal part --
4447 ----------------------
4448
4449 -- FORMAL_PART ::=
4450 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
4451
4452 ----------------------------------
4453 -- 6.1 Parameter specification --
4454 ----------------------------------
4455
4456 -- PARAMETER_SPECIFICATION ::=
4457 -- DEFINING_IDENTIFIER_LIST : MODE [NULL_EXCLUSION] SUBTYPE_MARK
4458 -- [:= DEFAULT_EXPRESSION]
4459 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
4460 -- [:= DEFAULT_EXPRESSION]
4461
4462 -- Although the syntax allows multiple identifiers in the list, the
4463 -- semantics is as though successive specifications were given with
4464 -- identical type definition and expression components. To simplify
4465 -- semantic processing, the parser represents a multiple declaration
4466 -- case as a sequence of single Specifications, using the More_Ids and
4467 -- Prev_Ids flags to preserve the original source form as described
4468 -- in the section on "Handling of Defining Identifier Lists".
4469
4470 -- N_Parameter_Specification
4471 -- Sloc points to first identifier
4472 -- Defining_Identifier (Node1)
4473 -- In_Present (Flag15)
4474 -- Out_Present (Flag17)
4475 -- Null_Exclusion_Present (Flag11)
4476 -- Parameter_Type (Node2) subtype mark or access definition
4477 -- Expression (Node3) (set to Empty if no default expression present)
4478 -- Do_Accessibility_Check (Flag13-Sem)
4479 -- More_Ids (Flag5) (set to False if no more identifiers in list)
4480 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
4481 -- Default_Expression (Node5-Sem)
4482
4483 ---------------
4484 -- 6.1 Mode --
4485 ---------------
4486
4487 -- MODE ::= [in] | in out | out
4488
4489 -- There is no explicit node in the tree for the Mode. Instead the
4490 -- In_Present and Out_Present flags are set in the parent node to
4491 -- record the presence of keywords specifying the mode.
4492
4493 --------------------------
4494 -- 6.3 Subprogram Body --
4495 --------------------------
4496
4497 -- SUBPROGRAM_BODY ::=
4498 -- SUBPROGRAM_SPECIFICATION is
4499 -- DECLARATIVE_PART
4500 -- begin
4501 -- HANDLED_SEQUENCE_OF_STATEMENTS
4502 -- end [DESIGNATOR];
4503
4504 -- N_Subprogram_Body
4505 -- Sloc points to FUNCTION or PROCEDURE
4506 -- Specification (Node1)
4507 -- Declarations (List2)
4508 -- Handled_Statement_Sequence (Node4)
4509 -- Activation_Chain_Entity (Node3-Sem)
4510 -- Corresponding_Spec (Node5-Sem)
4511 -- Acts_As_Spec (Flag4-Sem)
4512 -- Bad_Is_Detected (Flag15) used only by parser
4513 -- Do_Storage_Check (Flag17-Sem)
4514 -- Has_Pragma_Priority (Flag6-Sem)
4515 -- Is_Protected_Subprogram_Body (Flag7-Sem)
4516 -- Is_Entry_Barrier_Function (Flag8-Sem)
4517 -- Is_Task_Master (Flag5-Sem)
4518 -- Was_Originally_Stub (Flag13-Sem)
4519 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
4520 -- Has_Pragma_CPU (Flag14-Sem)
4521
4522 ------------------------------
4523 -- Parameterized Expression --
4524 ------------------------------
4525
4526 -- This is an Ada 2012 extension, we put it here for now, to be labeled
4527 -- and put in its proper section when we know exactly where that is!
4528
4529 -- PARAMETERIZED_EXPRESSION ::=
4530 -- FUNCTION SPECIFICATION IS (EXPRESSION);
4531
4532 -- N_Parameterized_Expression
4533 -- Sloc points to FUNCTION
4534 -- Specification (Node1)
4535 -- Expression (Node3)
4536
4537 -----------------------------------
4538 -- 6.4 Procedure Call Statement --
4539 -----------------------------------
4540
4541 -- PROCEDURE_CALL_STATEMENT ::=
4542 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
4543
4544 -- Note: the reason that a procedure call has expression fields is
4545 -- that it semantically resembles an expression, e.g. overloading is
4546 -- allowed and a type is concocted for semantic processing purposes.
4547 -- Certain of these fields, such as Parens are not relevant, but it
4548 -- is easier to just supply all of them together!
4549
4550 -- N_Procedure_Call_Statement
4551 -- Sloc points to first token of name or prefix
4552 -- Name (Node2) stores name or prefix
4553 -- Parameter_Associations (List3) (set to No_List if no
4554 -- actual parameter part)
4555 -- First_Named_Actual (Node4-Sem)
4556 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4557 -- Do_Tag_Check (Flag13-Sem)
4558 -- No_Elaboration_Check (Flag14-Sem)
4559 -- Parameter_List_Truncated (Flag17-Sem)
4560 -- ABE_Is_Certain (Flag18-Sem)
4561 -- plus fields for expression
4562
4563 -- If any IN parameter requires a range check, then the corresponding
4564 -- argument expression has the Do_Range_Check flag set, and the range
4565 -- check is done against the formal type. Note that this argument
4566 -- expression may appear directly in the Parameter_Associations list,
4567 -- or may be a descendent of an N_Parameter_Association node that
4568 -- appears in this list.
4569
4570 ------------------------
4571 -- 6.4 Function Call --
4572 ------------------------
4573
4574 -- FUNCTION_CALL ::=
4575 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
4576
4577 -- Note: the parser may generate an indexed component node or simply
4578 -- a name node instead of a function call node. The semantic pass must
4579 -- correct this misidentification.
4580
4581 -- N_Function_Call
4582 -- Sloc points to first token of name or prefix
4583 -- Name (Node2) stores name or prefix
4584 -- Parameter_Associations (List3) (set to No_List if no
4585 -- actual parameter part)
4586 -- First_Named_Actual (Node4-Sem)
4587 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4588 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
4589 -- Do_Tag_Check (Flag13-Sem)
4590 -- No_Elaboration_Check (Flag14-Sem)
4591 -- Parameter_List_Truncated (Flag17-Sem)
4592 -- ABE_Is_Certain (Flag18-Sem)
4593 -- plus fields for expression
4594
4595 --------------------------------
4596 -- 6.4 Actual Parameter Part --
4597 --------------------------------
4598
4599 -- ACTUAL_PARAMETER_PART ::=
4600 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
4601
4602 --------------------------------
4603 -- 6.4 Parameter Association --
4604 --------------------------------
4605
4606 -- PARAMETER_ASSOCIATION ::=
4607 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
4608
4609 -- Note: the N_Parameter_Association node is built only if a formal
4610 -- parameter selector name is present, otherwise the parameter
4611 -- association appears in the tree simply as the node for the
4612 -- explicit actual parameter.
4613
4614 -- N_Parameter_Association
4615 -- Sloc points to formal parameter
4616 -- Selector_Name (Node2) (always non-Empty)
4617 -- Explicit_Actual_Parameter (Node3)
4618 -- Next_Named_Actual (Node4-Sem)
4619 -- Is_Accessibility_Actual (Flag13-Sem)
4620
4621 ---------------------------
4622 -- 6.4 Actual Parameter --
4623 ---------------------------
4624
4625 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
4626
4627 ---------------------------
4628 -- 6.5 Return Statement --
4629 ---------------------------
4630
4631 -- RETURN_STATEMENT ::= return [EXPRESSION]; -- Ada 95
4632
4633 -- In Ada 2005, we have:
4634
4635 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
4636
4637 -- EXTENDED_RETURN_STATEMENT ::=
4638 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4639 -- [:= EXPRESSION] [do
4640 -- HANDLED_SEQUENCE_OF_STATEMENTS
4641 -- end return];
4642
4643 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
4644
4645 -- So in Ada 2005, RETURN_STATEMENT is no longer a nonterminal, but
4646 -- "return statement" is defined in 6.5 to mean a
4647 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT.
4648
4649 -- N_Return_Statement
4650 -- Sloc points to RETURN
4651 -- Return_Statement_Entity (Node5-Sem)
4652 -- Expression (Node3) (set to Empty if no expression present)
4653 -- Storage_Pool (Node1-Sem)
4654 -- Procedure_To_Call (Node2-Sem)
4655 -- Do_Tag_Check (Flag13-Sem)
4656 -- By_Ref (Flag5-Sem)
4657 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
4658
4659 -- N_Return_Statement represents a simple_return_statement, and is
4660 -- renamed to be N_Simple_Return_Statement below. Clients should refer
4661 -- to N_Simple_Return_Statement. We retain N_Return_Statement because
4662 -- that's how gigi knows it. See also renaming of Make_Return_Statement
4663 -- as Make_Simple_Return_Statement in Sem_Util.
4664
4665 -- Note: Return_Statement_Entity points to an E_Return_Statement
4666
4667 -- If a range check is required, then Do_Range_Check is set on the
4668 -- Expression. The check is against the return subtype of the function.
4669
4670 -- N_Extended_Return_Statement
4671 -- Sloc points to RETURN
4672 -- Return_Statement_Entity (Node5-Sem)
4673 -- Return_Object_Declarations (List3)
4674 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
4675 -- Storage_Pool (Node1-Sem)
4676 -- Procedure_To_Call (Node2-Sem)
4677 -- Do_Tag_Check (Flag13-Sem)
4678 -- By_Ref (Flag5-Sem)
4679
4680 -- Note: Return_Statement_Entity points to an E_Return_Statement.
4681
4682 -- Note that Return_Object_Declarations is a list containing the
4683 -- N_Object_Declaration -- see comment on this field above.
4684
4685 -- The declared object will have Is_Return_Object = True.
4686
4687 -- There is no such syntactic category as return_object_declaration
4688 -- in the RM. Return_Object_Declarations represents this portion of
4689 -- the syntax for EXTENDED_RETURN_STATEMENT:
4690 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4691 -- [:= EXPRESSION]
4692
4693 -- There are two entities associated with an extended_return_statement:
4694 -- the Return_Statement_Entity represents the statement itself, and the
4695 -- Defining_Identifier of the Object_Declaration in
4696 -- Return_Object_Declarations represents the object being
4697 -- returned. N_Simple_Return_Statement has only the former.
4698
4699 ------------------------------
4700 -- 7.1 Package Declaration --
4701 ------------------------------
4702
4703 -- PACKAGE_DECLARATION ::=
4704 -- PACKAGE_SPECIFICATION
4705 -- [ASPECT_SPECIFICATIONS];
4706
4707 -- Note: the activation chain entity for a package spec is used for
4708 -- all tasks declared in the package spec, or in the package body.
4709
4710 -- N_Package_Declaration
4711 -- Sloc points to PACKAGE
4712 -- Specification (Node1)
4713 -- Corresponding_Body (Node5-Sem)
4714 -- Parent_Spec (Node4-Sem)
4715 -- Activation_Chain_Entity (Node3-Sem)
4716
4717 --------------------------------
4718 -- 7.1 Package Specification --
4719 --------------------------------
4720
4721 -- PACKAGE_SPECIFICATION ::=
4722 -- package DEFINING_PROGRAM_UNIT_NAME is
4723 -- {BASIC_DECLARATIVE_ITEM}
4724 -- [private
4725 -- {BASIC_DECLARATIVE_ITEM}]
4726 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
4727
4728 -- N_Package_Specification
4729 -- Sloc points to PACKAGE
4730 -- Defining_Unit_Name (Node1)
4731 -- Visible_Declarations (List2)
4732 -- Private_Declarations (List3) (set to No_List if no private
4733 -- part present)
4734 -- End_Label (Node4)
4735 -- Generic_Parent (Node5-Sem)
4736 -- Limited_View_Installed (Flag18-Sem)
4737
4738 -----------------------
4739 -- 7.1 Package Body --
4740 -----------------------
4741
4742 -- PACKAGE_BODY ::=
4743 -- package body DEFINING_PROGRAM_UNIT_NAME is
4744 -- DECLARATIVE_PART
4745 -- [begin
4746 -- HANDLED_SEQUENCE_OF_STATEMENTS]
4747 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
4748
4749 -- N_Package_Body
4750 -- Sloc points to PACKAGE
4751 -- Defining_Unit_Name (Node1)
4752 -- Declarations (List2)
4753 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
4754 -- Corresponding_Spec (Node5-Sem)
4755 -- Was_Originally_Stub (Flag13-Sem)
4756
4757 -- Note: if a source level package does not contain a handled sequence
4758 -- of statements, then the parser supplies a dummy one with a null
4759 -- sequence of statements. Comes_From_Source will be False in this
4760 -- constructed sequence. The reason we need this is for the End_Label
4761 -- field in the HSS.
4762
4763 -----------------------------------
4764 -- 7.4 Private Type Declaration --
4765 -----------------------------------
4766
4767 -- PRIVATE_TYPE_DECLARATION ::=
4768 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
4769 -- is [[abstract] tagged] [limited] private;
4770
4771 -- Note: TAGGED is not permitted in Ada 83 mode
4772
4773 -- N_Private_Type_Declaration
4774 -- Sloc points to TYPE
4775 -- Defining_Identifier (Node1)
4776 -- Discriminant_Specifications (List4) (set to No_List if no
4777 -- discriminant part)
4778 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4779 -- Abstract_Present (Flag4)
4780 -- Tagged_Present (Flag15)
4781 -- Limited_Present (Flag17)
4782
4783 ----------------------------------------
4784 -- 7.4 Private Extension Declaration --
4785 ----------------------------------------
4786
4787 -- PRIVATE_EXTENSION_DECLARATION ::=
4788 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
4789 -- [abstract] [limited | synchronized]
4790 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
4791 -- with private;
4792
4793 -- Note: LIMITED, and private extension declarations are not allowed
4794 -- in Ada 83 mode.
4795
4796 -- N_Private_Extension_Declaration
4797 -- Sloc points to TYPE
4798 -- Defining_Identifier (Node1)
4799 -- Discriminant_Specifications (List4) (set to No_List if no
4800 -- discriminant part)
4801 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4802 -- Abstract_Present (Flag4)
4803 -- Limited_Present (Flag17)
4804 -- Synchronized_Present (Flag7)
4805 -- Subtype_Indication (Node5)
4806 -- Interface_List (List2) (set to No_List if none)
4807
4808 ---------------------
4809 -- 8.4 Use Clause --
4810 ---------------------
4811
4812 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
4813
4814 -----------------------------
4815 -- 8.4 Use Package Clause --
4816 -----------------------------
4817
4818 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
4819
4820 -- N_Use_Package_Clause
4821 -- Sloc points to USE
4822 -- Names (List2)
4823 -- Next_Use_Clause (Node3-Sem)
4824 -- Hidden_By_Use_Clause (Elist4-Sem)
4825
4826 --------------------------
4827 -- 8.4 Use Type Clause --
4828 --------------------------
4829
4830 -- USE_TYPE_CLAUSE ::= use [ALL] type SUBTYPE_MARK {, SUBTYPE_MARK};
4831
4832 -- Note: use type clause is not permitted in Ada 83 mode
4833
4834 -- Note: the ALL keyword can appear only in Ada 2012 mode
4835
4836 -- N_Use_Type_Clause
4837 -- Sloc points to USE
4838 -- Subtype_Marks (List2)
4839 -- Next_Use_Clause (Node3-Sem)
4840 -- Hidden_By_Use_Clause (Elist4-Sem)
4841 -- All_Present (Flag15)
4842
4843 -------------------------------
4844 -- 8.5 Renaming Declaration --
4845 -------------------------------
4846
4847 -- RENAMING_DECLARATION ::=
4848 -- OBJECT_RENAMING_DECLARATION
4849 -- | EXCEPTION_RENAMING_DECLARATION
4850 -- | PACKAGE_RENAMING_DECLARATION
4851 -- | SUBPROGRAM_RENAMING_DECLARATION
4852 -- | GENERIC_RENAMING_DECLARATION
4853
4854 --------------------------------------
4855 -- 8.5 Object Renaming Declaration --
4856 --------------------------------------
4857
4858 -- OBJECT_RENAMING_DECLARATION ::=
4859 -- DEFINING_IDENTIFIER :
4860 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME;
4861 -- | DEFINING_IDENTIFIER :
4862 -- ACCESS_DEFINITION renames object_NAME;
4863
4864 -- Note: Access_Definition is an optional field that gives support to
4865 -- Ada 2005 (AI-230). The parser generates nodes that have either the
4866 -- Subtype_Indication field or else the Access_Definition field.
4867
4868 -- N_Object_Renaming_Declaration
4869 -- Sloc points to first identifier
4870 -- Defining_Identifier (Node1)
4871 -- Null_Exclusion_Present (Flag11) (set to False if not present)
4872 -- Subtype_Mark (Node4) (set to Empty if not present)
4873 -- Access_Definition (Node3) (set to Empty if not present)
4874 -- Name (Node2)
4875 -- Corresponding_Generic_Association (Node5-Sem)
4876
4877 -----------------------------------------
4878 -- 8.5 Exception Renaming Declaration --
4879 -----------------------------------------
4880
4881 -- EXCEPTION_RENAMING_DECLARATION ::=
4882 -- DEFINING_IDENTIFIER : exception renames exception_NAME;
4883
4884 -- N_Exception_Renaming_Declaration
4885 -- Sloc points to first identifier
4886 -- Defining_Identifier (Node1)
4887 -- Name (Node2)
4888
4889 ---------------------------------------
4890 -- 8.5 Package Renaming Declaration --
4891 ---------------------------------------
4892
4893 -- PACKAGE_RENAMING_DECLARATION ::=
4894 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME;
4895
4896 -- N_Package_Renaming_Declaration
4897 -- Sloc points to PACKAGE
4898 -- Defining_Unit_Name (Node1)
4899 -- Name (Node2)
4900 -- Parent_Spec (Node4-Sem)
4901
4902 ------------------------------------------
4903 -- 8.5 Subprogram Renaming Declaration --
4904 ------------------------------------------
4905
4906 -- SUBPROGRAM_RENAMING_DECLARATION ::=
4907 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
4908
4909 -- N_Subprogram_Renaming_Declaration
4910 -- Sloc points to RENAMES
4911 -- Specification (Node1)
4912 -- Name (Node2)
4913 -- Parent_Spec (Node4-Sem)
4914 -- Corresponding_Spec (Node5-Sem)
4915 -- Corresponding_Formal_Spec (Node3-Sem)
4916 -- From_Default (Flag6-Sem)
4917
4918 -----------------------------------------
4919 -- 8.5.5 Generic Renaming Declaration --
4920 -----------------------------------------
4921
4922 -- GENERIC_RENAMING_DECLARATION ::=
4923 -- generic package DEFINING_PROGRAM_UNIT_NAME
4924 -- renames generic_package_NAME
4925 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
4926 -- renames generic_procedure_NAME
4927 -- | generic function DEFINING_PROGRAM_UNIT_NAME
4928 -- renames generic_function_NAME
4929
4930 -- N_Generic_Package_Renaming_Declaration
4931 -- Sloc points to GENERIC
4932 -- Defining_Unit_Name (Node1)
4933 -- Name (Node2)
4934 -- Parent_Spec (Node4-Sem)
4935
4936 -- N_Generic_Procedure_Renaming_Declaration
4937 -- Sloc points to GENERIC
4938 -- Defining_Unit_Name (Node1)
4939 -- Name (Node2)
4940 -- Parent_Spec (Node4-Sem)
4941
4942 -- N_Generic_Function_Renaming_Declaration
4943 -- Sloc points to GENERIC
4944 -- Defining_Unit_Name (Node1)
4945 -- Name (Node2)
4946 -- Parent_Spec (Node4-Sem)
4947
4948 --------------------------------
4949 -- 9.1 Task Type Declaration --
4950 --------------------------------
4951
4952 -- TASK_TYPE_DECLARATION ::=
4953 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4954 -- [is [new INTERFACE_LIST with] TASK_DEFINITION]
4955 -- [ASPECT_SPECIFICATIONS];
4956
4957 -- N_Task_Type_Declaration
4958 -- Sloc points to TASK
4959 -- Defining_Identifier (Node1)
4960 -- Discriminant_Specifications (List4) (set to No_List if no
4961 -- discriminant part)
4962 -- Interface_List (List2) (set to No_List if none)
4963 -- Task_Definition (Node3) (set to Empty if not present)
4964 -- Corresponding_Body (Node5-Sem)
4965
4966 ----------------------------------
4967 -- 9.1 Single Task Declaration --
4968 ----------------------------------
4969
4970 -- SINGLE_TASK_DECLARATION ::=
4971 -- task DEFINING_IDENTIFIER
4972 -- [is [new INTERFACE_LIST with] TASK_DEFINITION]
4973 -- [ASPECT_SPECIFICATIONS];
4974
4975 -- N_Single_Task_Declaration
4976 -- Sloc points to TASK
4977 -- Defining_Identifier (Node1)
4978 -- Interface_List (List2) (set to No_List if none)
4979 -- Task_Definition (Node3) (set to Empty if not present)
4980
4981 --------------------------
4982 -- 9.1 Task Definition --
4983 --------------------------
4984
4985 -- TASK_DEFINITION ::=
4986 -- {TASK_ITEM}
4987 -- [private
4988 -- {TASK_ITEM}]
4989 -- end [task_IDENTIFIER]
4990
4991 -- Note: as a result of semantic analysis, the list of task items can
4992 -- include implicit type declarations resulting from entry families.
4993
4994 -- N_Task_Definition
4995 -- Sloc points to first token of task definition
4996 -- Visible_Declarations (List2)
4997 -- Private_Declarations (List3) (set to No_List if no private part)
4998 -- End_Label (Node4)
4999 -- Has_Pragma_Priority (Flag6-Sem)
5000 -- Has_Storage_Size_Pragma (Flag5-Sem)
5001 -- Has_Task_Info_Pragma (Flag7-Sem)
5002 -- Has_Task_Name_Pragma (Flag8-Sem)
5003 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
5004 -- Has_Pragma_CPU (Flag14-Sem)
5005
5006 --------------------
5007 -- 9.1 Task Item --
5008 --------------------
5009
5010 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
5011
5012 --------------------
5013 -- 9.1 Task Body --
5014 --------------------
5015
5016 -- TASK_BODY ::=
5017 -- task body task_DEFINING_IDENTIFIER is
5018 -- DECLARATIVE_PART
5019 -- begin
5020 -- HANDLED_SEQUENCE_OF_STATEMENTS
5021 -- end [task_IDENTIFIER];
5022
5023 -- Gigi restriction: This node never appears
5024
5025 -- N_Task_Body
5026 -- Sloc points to TASK
5027 -- Defining_Identifier (Node1)
5028 -- Declarations (List2)
5029 -- Handled_Statement_Sequence (Node4)
5030 -- Is_Task_Master (Flag5-Sem)
5031 -- Activation_Chain_Entity (Node3-Sem)
5032 -- Corresponding_Spec (Node5-Sem)
5033 -- Was_Originally_Stub (Flag13-Sem)
5034
5035 -------------------------------------
5036 -- 9.4 Protected Type Declaration --
5037 -------------------------------------
5038
5039 -- PROTECTED_TYPE_DECLARATION ::=
5040 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5041 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION
5042 -- {ASPECT_SPECIFICATIONS];
5043
5044 -- Note: protected type declarations are not permitted in Ada 83 mode
5045
5046 -- N_Protected_Type_Declaration
5047 -- Sloc points to PROTECTED
5048 -- Defining_Identifier (Node1)
5049 -- Discriminant_Specifications (List4) (set to No_List if no
5050 -- discriminant part)
5051 -- Interface_List (List2) (set to No_List if none)
5052 -- Protected_Definition (Node3)
5053 -- Corresponding_Body (Node5-Sem)
5054
5055 ---------------------------------------
5056 -- 9.4 Single Protected Declaration --
5057 ---------------------------------------
5058
5059 -- SINGLE_PROTECTED_DECLARATION ::=
5060 -- protected DEFINING_IDENTIFIER
5061 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION
5062 -- [ASPECT_SPECIFICATIONS];
5063
5064 -- Note: single protected declarations are not allowed in Ada 83 mode
5065
5066 -- N_Single_Protected_Declaration
5067 -- Sloc points to PROTECTED
5068 -- Defining_Identifier (Node1)
5069 -- Interface_List (List2) (set to No_List if none)
5070 -- Protected_Definition (Node3)
5071
5072 -------------------------------
5073 -- 9.4 Protected Definition --
5074 -------------------------------
5075
5076 -- PROTECTED_DEFINITION ::=
5077 -- {PROTECTED_OPERATION_DECLARATION}
5078 -- [private
5079 -- {PROTECTED_ELEMENT_DECLARATION}]
5080 -- end [protected_IDENTIFIER]
5081
5082 -- N_Protected_Definition
5083 -- Sloc points to first token of protected definition
5084 -- Visible_Declarations (List2)
5085 -- Private_Declarations (List3) (set to No_List if no private part)
5086 -- End_Label (Node4)
5087 -- Has_Pragma_Priority (Flag6-Sem)
5088
5089 ------------------------------------------
5090 -- 9.4 Protected Operation Declaration --
5091 ------------------------------------------
5092
5093 -- PROTECTED_OPERATION_DECLARATION ::=
5094 -- SUBPROGRAM_DECLARATION
5095 -- | ENTRY_DECLARATION
5096 -- | REPRESENTATION_CLAUSE
5097
5098 ----------------------------------------
5099 -- 9.4 Protected Element Declaration --
5100 ----------------------------------------
5101
5102 -- PROTECTED_ELEMENT_DECLARATION ::=
5103 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
5104
5105 -------------------------
5106 -- 9.4 Protected Body --
5107 -------------------------
5108
5109 -- PROTECTED_BODY ::=
5110 -- protected body DEFINING_IDENTIFIER is
5111 -- {PROTECTED_OPERATION_ITEM}
5112 -- end [protected_IDENTIFIER];
5113
5114 -- Note: protected bodies are not allowed in Ada 83 mode
5115
5116 -- Gigi restriction: This node never appears
5117
5118 -- N_Protected_Body
5119 -- Sloc points to PROTECTED
5120 -- Defining_Identifier (Node1)
5121 -- Declarations (List2) protected operation items (and pragmas)
5122 -- End_Label (Node4)
5123 -- Corresponding_Spec (Node5-Sem)
5124 -- Was_Originally_Stub (Flag13-Sem)
5125
5126 -----------------------------------
5127 -- 9.4 Protected Operation Item --
5128 -----------------------------------
5129
5130 -- PROTECTED_OPERATION_ITEM ::=
5131 -- SUBPROGRAM_DECLARATION
5132 -- | SUBPROGRAM_BODY
5133 -- | ENTRY_BODY
5134 -- | REPRESENTATION_CLAUSE
5135
5136 ------------------------------
5137 -- 9.5.2 Entry Declaration --
5138 ------------------------------
5139
5140 -- ENTRY_DECLARATION ::=
5141 -- [[not] overriding]
5142 -- entry DEFINING_IDENTIFIER
5143 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE;
5144
5145 -- N_Entry_Declaration
5146 -- Sloc points to ENTRY
5147 -- Defining_Identifier (Node1)
5148 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
5149 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5150 -- Corresponding_Body (Node5-Sem)
5151 -- Must_Override (Flag14) set if overriding indicator present
5152 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5153
5154 -- Note: overriding indicator is an Ada 2005 feature
5155
5156 -----------------------------
5157 -- 9.5.2 Accept statement --
5158 -----------------------------
5159
5160 -- ACCEPT_STATEMENT ::=
5161 -- accept entry_DIRECT_NAME
5162 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
5163 -- HANDLED_SEQUENCE_OF_STATEMENTS
5164 -- end [entry_IDENTIFIER]];
5165
5166 -- Gigi restriction: This node never appears
5167
5168 -- Note: there are no explicit declarations allowed in an accept
5169 -- statement. However, the implicit declarations for any statement
5170 -- identifiers (labels and block/loop identifiers) are declarations
5171 -- that belong logically to the accept statement, and that is why
5172 -- there is a Declarations field in this node.
5173
5174 -- N_Accept_Statement
5175 -- Sloc points to ACCEPT
5176 -- Entry_Direct_Name (Node1)
5177 -- Entry_Index (Node5) (set to Empty if not present)
5178 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5179 -- Handled_Statement_Sequence (Node4)
5180 -- Declarations (List2) (set to No_List if no declarations)
5181
5182 ------------------------
5183 -- 9.5.2 Entry Index --
5184 ------------------------
5185
5186 -- ENTRY_INDEX ::= EXPRESSION
5187
5188 -----------------------
5189 -- 9.5.2 Entry Body --
5190 -----------------------
5191
5192 -- ENTRY_BODY ::=
5193 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
5194 -- DECLARATIVE_PART
5195 -- begin
5196 -- HANDLED_SEQUENCE_OF_STATEMENTS
5197 -- end [entry_IDENTIFIER];
5198
5199 -- ENTRY_BARRIER ::= when CONDITION
5200
5201 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
5202 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
5203 -- too full (it would otherwise have too many fields)
5204
5205 -- Gigi restriction: This node never appears
5206
5207 -- N_Entry_Body
5208 -- Sloc points to ENTRY
5209 -- Defining_Identifier (Node1)
5210 -- Entry_Body_Formal_Part (Node5)
5211 -- Declarations (List2)
5212 -- Handled_Statement_Sequence (Node4)
5213 -- Activation_Chain_Entity (Node3-Sem)
5214
5215 -----------------------------------
5216 -- 9.5.2 Entry Body Formal Part --
5217 -----------------------------------
5218
5219 -- ENTRY_BODY_FORMAL_PART ::=
5220 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
5221
5222 -- Note that an entry body formal part node is present even if it is
5223 -- empty. This reflects the grammar, in which it is the components of
5224 -- the entry body formal part that are optional, not the entry body
5225 -- formal part itself. Also this means that the barrier condition
5226 -- always has somewhere to be stored.
5227
5228 -- Gigi restriction: This node never appears
5229
5230 -- N_Entry_Body_Formal_Part
5231 -- Sloc points to first token
5232 -- Entry_Index_Specification (Node4) (set to Empty if not present)
5233 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5234 -- Condition (Node1) from entry barrier of entry body
5235
5236 --------------------------
5237 -- 9.5.2 Entry Barrier --
5238 --------------------------
5239
5240 -- ENTRY_BARRIER ::= when CONDITION
5241
5242 --------------------------------------
5243 -- 9.5.2 Entry Index Specification --
5244 --------------------------------------
5245
5246 -- ENTRY_INDEX_SPECIFICATION ::=
5247 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
5248
5249 -- Gigi restriction: This node never appears
5250
5251 -- N_Entry_Index_Specification
5252 -- Sloc points to FOR
5253 -- Defining_Identifier (Node1)
5254 -- Discrete_Subtype_Definition (Node4)
5255
5256 ---------------------------------
5257 -- 9.5.3 Entry Call Statement --
5258 ---------------------------------
5259
5260 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
5261
5262 -- The parser may generate a procedure call for this construct. The
5263 -- semantic pass must correct this misidentification where needed.
5264
5265 -- Gigi restriction: This node never appears
5266
5267 -- N_Entry_Call_Statement
5268 -- Sloc points to first token of name
5269 -- Name (Node2)
5270 -- Parameter_Associations (List3) (set to No_List if no
5271 -- actual parameter part)
5272 -- First_Named_Actual (Node4-Sem)
5273
5274 ------------------------------
5275 -- 9.5.4 Requeue Statement --
5276 ------------------------------
5277
5278 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
5279
5280 -- Note: requeue statements are not permitted in Ada 83 mode
5281
5282 -- Gigi restriction: This node never appears
5283
5284 -- N_Requeue_Statement
5285 -- Sloc points to REQUEUE
5286 -- Name (Node2)
5287 -- Abort_Present (Flag15)
5288
5289 --------------------------
5290 -- 9.6 Delay Statement --
5291 --------------------------
5292
5293 -- DELAY_STATEMENT ::=
5294 -- DELAY_UNTIL_STATEMENT
5295 -- | DELAY_RELATIVE_STATEMENT
5296
5297 --------------------------------
5298 -- 9.6 Delay Until Statement --
5299 --------------------------------
5300
5301 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
5302
5303 -- Note: delay until statements are not permitted in Ada 83 mode
5304
5305 -- Gigi restriction: This node never appears
5306
5307 -- N_Delay_Until_Statement
5308 -- Sloc points to DELAY
5309 -- Expression (Node3)
5310
5311 -----------------------------------
5312 -- 9.6 Delay Relative Statement --
5313 -----------------------------------
5314
5315 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
5316
5317 -- Gigi restriction: This node never appears
5318
5319 -- N_Delay_Relative_Statement
5320 -- Sloc points to DELAY
5321 -- Expression (Node3)
5322
5323 ---------------------------
5324 -- 9.7 Select Statement --
5325 ---------------------------
5326
5327 -- SELECT_STATEMENT ::=
5328 -- SELECTIVE_ACCEPT
5329 -- | TIMED_ENTRY_CALL
5330 -- | CONDITIONAL_ENTRY_CALL
5331 -- | ASYNCHRONOUS_SELECT
5332
5333 -----------------------------
5334 -- 9.7.1 Selective Accept --
5335 -----------------------------
5336
5337 -- SELECTIVE_ACCEPT ::=
5338 -- select
5339 -- [GUARD]
5340 -- SELECT_ALTERNATIVE
5341 -- {or
5342 -- [GUARD]
5343 -- SELECT_ALTERNATIVE}
5344 -- [else
5345 -- SEQUENCE_OF_STATEMENTS]
5346 -- end select;
5347
5348 -- Gigi restriction: This node never appears
5349
5350 -- Note: the guard expression, if present, appears in the node for
5351 -- the select alternative.
5352
5353 -- N_Selective_Accept
5354 -- Sloc points to SELECT
5355 -- Select_Alternatives (List1)
5356 -- Else_Statements (List4) (set to No_List if no else part)
5357
5358 ------------------
5359 -- 9.7.1 Guard --
5360 ------------------
5361
5362 -- GUARD ::= when CONDITION =>
5363
5364 -- As noted above, the CONDITION that is part of a GUARD is included
5365 -- in the node for the select alternative for convenience.
5366
5367 -------------------------------
5368 -- 9.7.1 Select Alternative --
5369 -------------------------------
5370
5371 -- SELECT_ALTERNATIVE ::=
5372 -- ACCEPT_ALTERNATIVE
5373 -- | DELAY_ALTERNATIVE
5374 -- | TERMINATE_ALTERNATIVE
5375
5376 -------------------------------
5377 -- 9.7.1 Accept Alternative --
5378 -------------------------------
5379
5380 -- ACCEPT_ALTERNATIVE ::=
5381 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
5382
5383 -- Gigi restriction: This node never appears
5384
5385 -- N_Accept_Alternative
5386 -- Sloc points to ACCEPT
5387 -- Accept_Statement (Node2)
5388 -- Condition (Node1) from the guard (set to Empty if no guard present)
5389 -- Statements (List3) (set to Empty_List if no statements)
5390 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5391 -- Accept_Handler_Records (List5-Sem)
5392
5393 ------------------------------
5394 -- 9.7.1 Delay Alternative --
5395 ------------------------------
5396
5397 -- DELAY_ALTERNATIVE ::=
5398 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
5399
5400 -- Gigi restriction: This node never appears
5401
5402 -- N_Delay_Alternative
5403 -- Sloc points to DELAY
5404 -- Delay_Statement (Node2)
5405 -- Condition (Node1) from the guard (set to Empty if no guard present)
5406 -- Statements (List3) (set to Empty_List if no statements)
5407 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5408
5409 ----------------------------------
5410 -- 9.7.1 Terminate Alternative --
5411 ----------------------------------
5412
5413 -- TERMINATE_ALTERNATIVE ::= terminate;
5414
5415 -- Gigi restriction: This node never appears
5416
5417 -- N_Terminate_Alternative
5418 -- Sloc points to TERMINATE
5419 -- Condition (Node1) from the guard (set to Empty if no guard present)
5420 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5421 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
5422
5423 -----------------------------
5424 -- 9.7.2 Timed Entry Call --
5425 -----------------------------
5426
5427 -- TIMED_ENTRY_CALL ::=
5428 -- select
5429 -- ENTRY_CALL_ALTERNATIVE
5430 -- or
5431 -- DELAY_ALTERNATIVE
5432 -- end select;
5433
5434 -- Gigi restriction: This node never appears
5435
5436 -- N_Timed_Entry_Call
5437 -- Sloc points to SELECT
5438 -- Entry_Call_Alternative (Node1)
5439 -- Delay_Alternative (Node4)
5440
5441 -----------------------------------
5442 -- 9.7.2 Entry Call Alternative --
5443 -----------------------------------
5444
5445 -- ENTRY_CALL_ALTERNATIVE ::=
5446 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
5447
5448 -- PROCEDURE_OR_ENTRY_CALL ::=
5449 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
5450
5451 -- Gigi restriction: This node never appears
5452
5453 -- N_Entry_Call_Alternative
5454 -- Sloc points to first token of entry call statement
5455 -- Entry_Call_Statement (Node1)
5456 -- Statements (List3) (set to Empty_List if no statements)
5457 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5458
5459 -----------------------------------
5460 -- 9.7.3 Conditional Entry Call --
5461 -----------------------------------
5462
5463 -- CONDITIONAL_ENTRY_CALL ::=
5464 -- select
5465 -- ENTRY_CALL_ALTERNATIVE
5466 -- else
5467 -- SEQUENCE_OF_STATEMENTS
5468 -- end select;
5469
5470 -- Gigi restriction: This node never appears
5471
5472 -- N_Conditional_Entry_Call
5473 -- Sloc points to SELECT
5474 -- Entry_Call_Alternative (Node1)
5475 -- Else_Statements (List4)
5476
5477 --------------------------------
5478 -- 9.7.4 Asynchronous Select --
5479 --------------------------------
5480
5481 -- ASYNCHRONOUS_SELECT ::=
5482 -- select
5483 -- TRIGGERING_ALTERNATIVE
5484 -- then abort
5485 -- ABORTABLE_PART
5486 -- end select;
5487
5488 -- Note: asynchronous select is not permitted in Ada 83 mode
5489
5490 -- Gigi restriction: This node never appears
5491
5492 -- N_Asynchronous_Select
5493 -- Sloc points to SELECT
5494 -- Triggering_Alternative (Node1)
5495 -- Abortable_Part (Node2)
5496
5497 -----------------------------------
5498 -- 9.7.4 Triggering Alternative --
5499 -----------------------------------
5500
5501 -- TRIGGERING_ALTERNATIVE ::=
5502 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
5503
5504 -- Gigi restriction: This node never appears
5505
5506 -- N_Triggering_Alternative
5507 -- Sloc points to first token of triggering statement
5508 -- Triggering_Statement (Node1)
5509 -- Statements (List3) (set to Empty_List if no statements)
5510 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5511
5512 ---------------------------------
5513 -- 9.7.4 Triggering Statement --
5514 ---------------------------------
5515
5516 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
5517
5518 ---------------------------
5519 -- 9.7.4 Abortable Part --
5520 ---------------------------
5521
5522 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
5523
5524 -- Gigi restriction: This node never appears
5525
5526 -- N_Abortable_Part
5527 -- Sloc points to ABORT
5528 -- Statements (List3)
5529
5530 --------------------------
5531 -- 9.8 Abort Statement --
5532 --------------------------
5533
5534 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
5535
5536 -- Gigi restriction: This node never appears
5537
5538 -- N_Abort_Statement
5539 -- Sloc points to ABORT
5540 -- Names (List2)
5541
5542 -------------------------
5543 -- 10.1.1 Compilation --
5544 -------------------------
5545
5546 -- COMPILATION ::= {COMPILATION_UNIT}
5547
5548 -- There is no explicit node in the tree for a compilation, since in
5549 -- general the compiler is processing only a single compilation unit
5550 -- at a time. It is possible to parse multiple units in syntax check
5551 -- only mode, but the trees are discarded in that case.
5552
5553 ------------------------------
5554 -- 10.1.1 Compilation Unit --
5555 ------------------------------
5556
5557 -- COMPILATION_UNIT ::=
5558 -- CONTEXT_CLAUSE LIBRARY_ITEM
5559 -- | CONTEXT_CLAUSE SUBUNIT
5560
5561 -- The N_Compilation_Unit node itself represents the above syntax.
5562 -- However, there are two additional items not reflected in the above
5563 -- syntax. First we have the global declarations that are added by the
5564 -- code generator. These are outer level declarations (so they cannot
5565 -- be represented as being inside the units). An example is the wrapper
5566 -- subprograms that are created to do ABE checking. As always a list of
5567 -- declarations can contain actions as well (i.e. statements), and such
5568 -- statements are executed as part of the elaboration of the unit. Note
5569 -- that all such declarations are elaborated before the library unit.
5570
5571 -- Similarly, certain actions need to be elaborated at the completion
5572 -- of elaboration of the library unit (notably the statement that sets
5573 -- the Boolean flag indicating that elaboration is complete).
5574
5575 -- The third item not reflected in the syntax is pragmas that appear
5576 -- after the compilation unit. As always pragmas are a problem since
5577 -- they are not part of the formal syntax, but can be stuck into the
5578 -- source following a set of ad hoc rules, and we have to find an ad
5579 -- hoc way of sticking them into the tree. For pragmas that appear
5580 -- before the library unit, we just consider them to be part of the
5581 -- context clause, and pragmas can appear in the Context_Items list
5582 -- of the compilation unit. However, pragmas can also appear after
5583 -- the library item.
5584
5585 -- To deal with all these problems, we create an auxiliary node for
5586 -- a compilation unit, referenced from the N_Compilation_Unit node,
5587 -- that contains these items.
5588
5589 -- N_Compilation_Unit
5590 -- Sloc points to first token of defining unit name
5591 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
5592 -- Context_Items (List1) context items and pragmas preceding unit
5593 -- Private_Present (Flag15) set if library unit has private keyword
5594 -- Unit (Node2) library item or subunit
5595 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
5596 -- Has_No_Elaboration_Code (Flag17-Sem)
5597 -- Body_Required (Flag13-Sem) set for spec if body is required
5598 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
5599 -- Context_Pending (Flag16-Sem)
5600 -- First_Inlined_Subprogram (Node3-Sem)
5601 -- Has_Pragma_Suppress_All (Flag14-Sem)
5602
5603 -- N_Compilation_Unit_Aux
5604 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
5605 -- Declarations (List2) (set to No_List if no global declarations)
5606 -- Actions (List1) (set to No_List if no actions)
5607 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
5608 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
5609 -- Default_Storage_Pool (Node3-Sem)
5610
5611 --------------------------
5612 -- 10.1.1 Library Item --
5613 --------------------------
5614
5615 -- LIBRARY_ITEM ::=
5616 -- [private] LIBRARY_UNIT_DECLARATION
5617 -- | LIBRARY_UNIT_BODY
5618 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
5619
5620 -- Note: PRIVATE is not allowed in Ada 83 mode
5621
5622 -- There is no explicit node in the tree for library item, instead
5623 -- the declaration or body, and the flag for private if present,
5624 -- appear in the N_Compilation_Unit node.
5625
5626 --------------------------------------
5627 -- 10.1.1 Library Unit Declaration --
5628 --------------------------------------
5629
5630 -- LIBRARY_UNIT_DECLARATION ::=
5631 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
5632 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
5633
5634 -----------------------------------------------
5635 -- 10.1.1 Library Unit Renaming Declaration --
5636 -----------------------------------------------
5637
5638 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
5639 -- PACKAGE_RENAMING_DECLARATION
5640 -- | GENERIC_RENAMING_DECLARATION
5641 -- | SUBPROGRAM_RENAMING_DECLARATION
5642
5643 -------------------------------
5644 -- 10.1.1 Library unit body --
5645 -------------------------------
5646
5647 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
5648
5649 ------------------------------
5650 -- 10.1.1 Parent Unit Name --
5651 ------------------------------
5652
5653 -- PARENT_UNIT_NAME ::= NAME
5654
5655 ----------------------------
5656 -- 10.1.2 Context clause --
5657 ----------------------------
5658
5659 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
5660
5661 -- The context clause can include pragmas, and any pragmas that appear
5662 -- before the context clause proper (i.e. all configuration pragmas,
5663 -- also appear at the front of this list).
5664
5665 --------------------------
5666 -- 10.1.2 Context_Item --
5667 --------------------------
5668
5669 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
5670
5671 -------------------------
5672 -- 10.1.2 With clause --
5673 -------------------------
5674
5675 -- WITH_CLAUSE ::=
5676 -- with library_unit_NAME {,library_unit_NAME};
5677
5678 -- A separate With clause is built for each name, so that we have
5679 -- a Corresponding_Spec field for each with'ed spec. The flags
5680 -- First_Name and Last_Name are used to reconstruct the exact
5681 -- source form. When a list of names appears in one with clause,
5682 -- the first name in the list has First_Name set, and the last
5683 -- has Last_Name set. If the with clause has only one name, then
5684 -- both of the flags First_Name and Last_Name are set in this name.
5685
5686 -- Note: in the case of implicit with's that are installed by the
5687 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
5688 -- set to Standard_Location, but it is incorrect to test the Sloc
5689 -- to find out if a with clause is implicit, test the flag instead.
5690
5691 -- N_With_Clause
5692 -- Sloc points to first token of library unit name
5693 -- Withed_Body (Node1-Sem)
5694 -- Name (Node2)
5695 -- Next_Implicit_With (Node3-Sem)
5696 -- Library_Unit (Node4-Sem)
5697 -- Corresponding_Spec (Node5-Sem)
5698 -- First_Name (Flag5) (set to True if first name or only one name)
5699 -- Last_Name (Flag6) (set to True if last name or only one name)
5700 -- Context_Installed (Flag13-Sem)
5701 -- Elaborate_Present (Flag4-Sem)
5702 -- Elaborate_All_Present (Flag14-Sem)
5703 -- Elaborate_All_Desirable (Flag9-Sem)
5704 -- Elaborate_Desirable (Flag11-Sem)
5705 -- Private_Present (Flag15) set if with_clause has private keyword
5706 -- Implicit_With (Flag16-Sem)
5707 -- Limited_Present (Flag17) set if LIMITED is present
5708 -- Limited_View_Installed (Flag18-Sem)
5709 -- Unreferenced_In_Spec (Flag7-Sem)
5710 -- No_Entities_Ref_In_Spec (Flag8-Sem)
5711
5712 -- Note: Limited_Present and Limited_View_Installed give support to
5713 -- Ada 2005 (AI-50217).
5714 -- Similarly, Private_Present gives support to AI-50262.
5715
5716 ----------------------
5717 -- With_Type clause --
5718 ----------------------
5719
5720 -- This is a GNAT extension, used to implement mutually recursive
5721 -- types declared in different packages.
5722 -- Note: this is now obsolete. The functionality of this construct
5723 -- is now implemented by the Ada 2005 Limited_with_Clause.
5724
5725 ---------------------
5726 -- 10.2 Body stub --
5727 ---------------------
5728
5729 -- BODY_STUB ::=
5730 -- SUBPROGRAM_BODY_STUB
5731 -- | PACKAGE_BODY_STUB
5732 -- | TASK_BODY_STUB
5733 -- | PROTECTED_BODY_STUB
5734
5735 ----------------------------------
5736 -- 10.1.3 Subprogram Body Stub --
5737 ----------------------------------
5738
5739 -- SUBPROGRAM_BODY_STUB ::=
5740 -- SUBPROGRAM_SPECIFICATION is separate;
5741
5742 -- N_Subprogram_Body_Stub
5743 -- Sloc points to FUNCTION or PROCEDURE
5744 -- Specification (Node1)
5745 -- Library_Unit (Node4-Sem) points to the subunit
5746 -- Corresponding_Body (Node5-Sem)
5747
5748 -------------------------------
5749 -- 10.1.3 Package Body Stub --
5750 -------------------------------
5751
5752 -- PACKAGE_BODY_STUB ::=
5753 -- package body DEFINING_IDENTIFIER is separate;
5754
5755 -- N_Package_Body_Stub
5756 -- Sloc points to PACKAGE
5757 -- Defining_Identifier (Node1)
5758 -- Library_Unit (Node4-Sem) points to the subunit
5759 -- Corresponding_Body (Node5-Sem)
5760
5761 ----------------------------
5762 -- 10.1.3 Task Body Stub --
5763 ----------------------------
5764
5765 -- TASK_BODY_STUB ::=
5766 -- task body DEFINING_IDENTIFIER is separate;
5767
5768 -- N_Task_Body_Stub
5769 -- Sloc points to TASK
5770 -- Defining_Identifier (Node1)
5771 -- Library_Unit (Node4-Sem) points to the subunit
5772 -- Corresponding_Body (Node5-Sem)
5773
5774 ---------------------------------
5775 -- 10.1.3 Protected Body Stub --
5776 ---------------------------------
5777
5778 -- PROTECTED_BODY_STUB ::=
5779 -- protected body DEFINING_IDENTIFIER is separate;
5780
5781 -- Note: protected body stubs are not allowed in Ada 83 mode
5782
5783 -- N_Protected_Body_Stub
5784 -- Sloc points to PROTECTED
5785 -- Defining_Identifier (Node1)
5786 -- Library_Unit (Node4-Sem) points to the subunit
5787 -- Corresponding_Body (Node5-Sem)
5788
5789 ---------------------
5790 -- 10.1.3 Subunit --
5791 ---------------------
5792
5793 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
5794
5795 -- N_Subunit
5796 -- Sloc points to SEPARATE
5797 -- Name (Node2) is the name of the parent unit
5798 -- Proper_Body (Node1) is the subunit body
5799 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
5800
5801 ---------------------------------
5802 -- 11.1 Exception Declaration --
5803 ---------------------------------
5804
5805 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception
5806 -- [ASPECT_SPECIFICATIONS];
5807
5808 -- For consistency with object declarations etc., the parser converts
5809 -- the case of multiple identifiers being declared to a series of
5810 -- declarations in which the expression is copied, using the More_Ids
5811 -- and Prev_Ids flags to remember the source form as described in the
5812 -- section on "Handling of Defining Identifier Lists".
5813
5814 -- N_Exception_Declaration
5815 -- Sloc points to EXCEPTION
5816 -- Defining_Identifier (Node1)
5817 -- Expression (Node3-Sem)
5818 -- Renaming_Exception (Node2-Sem)
5819 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5820 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5821
5822 ------------------------------------------
5823 -- 11.2 Handled Sequence Of Statements --
5824 ------------------------------------------
5825
5826 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
5827 -- SEQUENCE_OF_STATEMENTS
5828 -- [exception
5829 -- EXCEPTION_HANDLER
5830 -- {EXCEPTION_HANDLER}]
5831 -- [at end
5832 -- cleanup_procedure_call (param, param, param, ...);]
5833
5834 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
5835 -- used only internally currently, but is considered to be syntactic.
5836 -- At the moment, the only cleanup action allowed is a single call to
5837 -- a parameterless procedure, and the Identifier field of the node is
5838 -- the procedure to be called. Also there is a current restriction
5839 -- that exception handles and a cleanup cannot be present in the same
5840 -- frame, so at least one of Exception_Handlers or the Identifier must
5841 -- be missing.
5842
5843 -- Actually, more accurately, this restriction applies to the original
5844 -- source program. In the expanded tree, if the At_End_Proc field is
5845 -- present, then there will also be an exception handler of the form:
5846
5847 -- when all others =>
5848 -- cleanup;
5849 -- raise;
5850
5851 -- where cleanup is the procedure to be generated. The reason we do
5852 -- this is so that the front end can handle the necessary entries in
5853 -- the exception tables, and other exception handler actions required
5854 -- as part of the normal handling for exception handlers.
5855
5856 -- The AT END cleanup handler protects only the sequence of statements
5857 -- (not the associated declarations of the parent), just like exception
5858 -- handlers. The big difference is that the cleanup procedure is called
5859 -- on either a normal or an abnormal exit from the statement sequence.
5860
5861 -- Note: the list of Exception_Handlers can contain pragmas as well
5862 -- as actual handlers. In practice these pragmas can only occur at
5863 -- the start of the list, since any pragmas occurring later on will
5864 -- be included in the statement list of the corresponding handler.
5865
5866 -- Note: although in the Ada syntax, the sequence of statements in
5867 -- a handled sequence of statements can only contain statements, we
5868 -- allow free mixing of declarations and statements in the resulting
5869 -- expanded tree. This is for example used to deal with the case of
5870 -- a cleanup procedure that must handle declarations as well as the
5871 -- statements of a block.
5872
5873 -- N_Handled_Sequence_Of_Statements
5874 -- Sloc points to first token of first statement
5875 -- Statements (List3)
5876 -- End_Label (Node4) (set to Empty if expander generated)
5877 -- Exception_Handlers (List5) (set to No_List if none present)
5878 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
5879 -- First_Real_Statement (Node2-Sem)
5880 -- Zero_Cost_Handling (Flag5-Sem)
5881
5882 -- Note: the parent always contains a Declarations field which contains
5883 -- declarations associated with the handled sequence of statements. This
5884 -- is true even in the case of an accept statement (see description of
5885 -- the N_Accept_Statement node).
5886
5887 -- End_Label refers to the containing construct
5888
5889 -----------------------------
5890 -- 11.2 Exception Handler --
5891 -----------------------------
5892
5893 -- EXCEPTION_HANDLER ::=
5894 -- when [CHOICE_PARAMETER_SPECIFICATION :]
5895 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
5896 -- SEQUENCE_OF_STATEMENTS
5897
5898 -- Note: choice parameter specification is not allowed in Ada 83 mode
5899
5900 -- N_Exception_Handler
5901 -- Sloc points to WHEN
5902 -- Choice_Parameter (Node2) (set to Empty if not present)
5903 -- Exception_Choices (List4)
5904 -- Statements (List3)
5905 -- Exception_Label (Node5-Sem) (set to Empty of not present)
5906 -- Zero_Cost_Handling (Flag5-Sem)
5907 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
5908 -- Local_Raise_Not_OK (Flag7-Sem)
5909 -- Has_Local_Raise (Flag8-Sem)
5910
5911 ------------------------------------------
5912 -- 11.2 Choice parameter specification --
5913 ------------------------------------------
5914
5915 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
5916
5917 ----------------------------
5918 -- 11.2 Exception Choice --
5919 ----------------------------
5920
5921 -- EXCEPTION_CHOICE ::= exception_NAME | others
5922
5923 -- Except in the case of OTHERS, no explicit node appears in the tree
5924 -- for exception choice. Instead the exception name appears directly.
5925 -- An OTHERS choice is represented by a N_Others_Choice node (see
5926 -- section 3.8.1.
5927
5928 -- Note: for the exception choice created for an at end handler, the
5929 -- exception choice is an N_Others_Choice node with All_Others set.
5930
5931 ---------------------------
5932 -- 11.3 Raise Statement --
5933 ---------------------------
5934
5935 -- RAISE_STATEMENT ::= raise [exception_NAME];
5936
5937 -- In Ada 2005, we have
5938
5939 -- RAISE_STATEMENT ::= raise; | raise exception_NAME [with EXPRESSION];
5940
5941 -- N_Raise_Statement
5942 -- Sloc points to RAISE
5943 -- Name (Node2) (set to Empty if no exception name present)
5944 -- Expression (Node3) (set to Empty if no expression present)
5945 -- From_At_End (Flag4-Sem)
5946
5947 -------------------------------
5948 -- 12.1 Generic Declaration --
5949 -------------------------------
5950
5951 -- GENERIC_DECLARATION ::=
5952 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
5953
5954 ------------------------------------------
5955 -- 12.1 Generic Subprogram Declaration --
5956 ------------------------------------------
5957
5958 -- GENERIC_SUBPROGRAM_DECLARATION ::=
5959 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION;
5960
5961 -- Note: Generic_Formal_Declarations can include pragmas
5962
5963 -- N_Generic_Subprogram_Declaration
5964 -- Sloc points to GENERIC
5965 -- Specification (Node1) subprogram specification
5966 -- Corresponding_Body (Node5-Sem)
5967 -- Generic_Formal_Declarations (List2) from generic formal part
5968 -- Parent_Spec (Node4-Sem)
5969
5970 ---------------------------------------
5971 -- 12.1 Generic Package Declaration --
5972 ---------------------------------------
5973
5974 -- GENERIC_PACKAGE_DECLARATION ::=
5975 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION
5976 -- [ASPECT_SPECIFICATIONS];
5977
5978 -- Note: when we do generics right, the Activation_Chain_Entity entry
5979 -- for this node can be removed (since the expander won't see generic
5980 -- units any more)???.
5981
5982 -- Note: Generic_Formal_Declarations can include pragmas
5983
5984 -- N_Generic_Package_Declaration
5985 -- Sloc points to GENERIC
5986 -- Specification (Node1) package specification
5987 -- Corresponding_Body (Node5-Sem)
5988 -- Generic_Formal_Declarations (List2) from generic formal part
5989 -- Parent_Spec (Node4-Sem)
5990 -- Activation_Chain_Entity (Node3-Sem)
5991
5992 -------------------------------
5993 -- 12.1 Generic Formal Part --
5994 -------------------------------
5995
5996 -- GENERIC_FORMAL_PART ::=
5997 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
5998
5999 ------------------------------------------------
6000 -- 12.1 Generic Formal Parameter Declaration --
6001 ------------------------------------------------
6002
6003 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
6004 -- FORMAL_OBJECT_DECLARATION
6005 -- | FORMAL_TYPE_DECLARATION
6006 -- | FORMAL_SUBPROGRAM_DECLARATION
6007 -- | FORMAL_PACKAGE_DECLARATION
6008
6009 ---------------------------------
6010 -- 12.3 Generic Instantiation --
6011 ---------------------------------
6012
6013 -- GENERIC_INSTANTIATION ::=
6014 -- package DEFINING_PROGRAM_UNIT_NAME is
6015 -- new generic_package_NAME [GENERIC_ACTUAL_PART]
6016 -- [ASPECT_SPECIFICATIONS];
6017 -- | [[not] overriding]
6018 -- procedure DEFINING_PROGRAM_UNIT_NAME is
6019 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART]
6020 -- [ASPECT_SPECIFICATIONS];
6021 -- | [[not] overriding]
6022 -- function DEFINING_DESIGNATOR is
6023 -- new generic_function_NAME [GENERIC_ACTUAL_PART]
6024 -- [ASPECT_SPECIFICATIONS];
6025
6026 -- N_Package_Instantiation
6027 -- Sloc points to PACKAGE
6028 -- Defining_Unit_Name (Node1)
6029 -- Name (Node2)
6030 -- Generic_Associations (List3) (set to No_List if no
6031 -- generic actual part)
6032 -- Parent_Spec (Node4-Sem)
6033 -- Instance_Spec (Node5-Sem)
6034 -- ABE_Is_Certain (Flag18-Sem)
6035
6036 -- N_Procedure_Instantiation
6037 -- Sloc points to PROCEDURE
6038 -- Defining_Unit_Name (Node1)
6039 -- Name (Node2)
6040 -- Parent_Spec (Node4-Sem)
6041 -- Generic_Associations (List3) (set to No_List if no
6042 -- generic actual part)
6043 -- Instance_Spec (Node5-Sem)
6044 -- Must_Override (Flag14) set if overriding indicator present
6045 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6046 -- ABE_Is_Certain (Flag18-Sem)
6047
6048 -- N_Function_Instantiation
6049 -- Sloc points to FUNCTION
6050 -- Defining_Unit_Name (Node1)
6051 -- Name (Node2)
6052 -- Generic_Associations (List3) (set to No_List if no
6053 -- generic actual part)
6054 -- Parent_Spec (Node4-Sem)
6055 -- Instance_Spec (Node5-Sem)
6056 -- Must_Override (Flag14) set if overriding indicator present
6057 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6058 -- ABE_Is_Certain (Flag18-Sem)
6059
6060 -- Note: overriding indicator is an Ada 2005 feature
6061
6062 -------------------------------
6063 -- 12.3 Generic Actual Part --
6064 -------------------------------
6065
6066 -- GENERIC_ACTUAL_PART ::=
6067 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
6068
6069 -------------------------------
6070 -- 12.3 Generic Association --
6071 -------------------------------
6072
6073 -- GENERIC_ASSOCIATION ::=
6074 -- [generic_formal_parameter_SELECTOR_NAME =>]
6075
6076 -- Note: unlike the procedure call case, a generic association node
6077 -- is generated for every association, even if no formal parameter
6078 -- selector name is present. In this case the parser will leave the
6079 -- Selector_Name field set to Empty, to be filled in later by the
6080 -- semantic pass.
6081
6082 -- In Ada 2005, a formal may be associated with a box, if the
6083 -- association is part of the list of actuals for a formal package.
6084 -- If the association is given by OTHERS => <>, the association is
6085 -- an N_Others_Choice.
6086
6087 -- N_Generic_Association
6088 -- Sloc points to first token of generic association
6089 -- Selector_Name (Node2) (set to Empty if no formal
6090 -- parameter selector name)
6091 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
6092 -- Box_Present (Flag15) (for formal_package associations with a box)
6093
6094 ---------------------------------------------
6095 -- 12.3 Explicit Generic Actual Parameter --
6096 ---------------------------------------------
6097
6098 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
6099 -- EXPRESSION | variable_NAME | subprogram_NAME
6100 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
6101
6102 -------------------------------------
6103 -- 12.4 Formal Object Declaration --
6104 -------------------------------------
6105
6106 -- FORMAL_OBJECT_DECLARATION ::=
6107 -- DEFINING_IDENTIFIER_LIST :
6108 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
6109 -- [ASPECT_SPECIFICATIONS];
6110 -- | DEFINING_IDENTIFIER_LIST :
6111 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION]
6112 -- [ASPECT_SPECIFICATIONS];
6113
6114 -- Although the syntax allows multiple identifiers in the list, the
6115 -- semantics is as though successive declarations were given with
6116 -- identical type definition and expression components. To simplify
6117 -- semantic processing, the parser represents a multiple declaration
6118 -- case as a sequence of single declarations, using the More_Ids and
6119 -- Prev_Ids flags to preserve the original source form as described
6120 -- in the section on "Handling of Defining Identifier Lists".
6121
6122 -- N_Formal_Object_Declaration
6123 -- Sloc points to first identifier
6124 -- Defining_Identifier (Node1)
6125 -- In_Present (Flag15)
6126 -- Out_Present (Flag17)
6127 -- Null_Exclusion_Present (Flag11) (set to False if not present)
6128 -- Subtype_Mark (Node4) (set to Empty if not present)
6129 -- Access_Definition (Node3) (set to Empty if not present)
6130 -- Default_Expression (Node5) (set to Empty if no default expression)
6131 -- More_Ids (Flag5) (set to False if no more identifiers in list)
6132 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6133
6134 -----------------------------------
6135 -- 12.5 Formal Type Declaration --
6136 -----------------------------------
6137
6138 -- FORMAL_TYPE_DECLARATION ::=
6139 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
6140 -- is FORMAL_TYPE_DEFINITION
6141 -- [ASPECT_SPECIFICATIONS];
6142
6143 -- N_Formal_Type_Declaration
6144 -- Sloc points to TYPE
6145 -- Defining_Identifier (Node1)
6146 -- Formal_Type_Definition (Node3)
6147 -- Discriminant_Specifications (List4) (set to No_List if no
6148 -- discriminant part)
6149 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
6150
6151 ----------------------------------
6152 -- 12.5 Formal type definition --
6153 ----------------------------------
6154
6155 -- FORMAL_TYPE_DEFINITION ::=
6156 -- FORMAL_PRIVATE_TYPE_DEFINITION
6157 -- | FORMAL_DERIVED_TYPE_DEFINITION
6158 -- | FORMAL_DISCRETE_TYPE_DEFINITION
6159 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
6160 -- | FORMAL_MODULAR_TYPE_DEFINITION
6161 -- | FORMAL_FLOATING_POINT_DEFINITION
6162 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
6163 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
6164 -- | FORMAL_ARRAY_TYPE_DEFINITION
6165 -- | FORMAL_ACCESS_TYPE_DEFINITION
6166 -- | FORMAL_INTERFACE_TYPE_DEFINITION
6167
6168 ---------------------------------------------
6169 -- 12.5.1 Formal Private Type Definition --
6170 ---------------------------------------------
6171
6172 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
6173 -- [[abstract] tagged] [limited] private
6174
6175 -- Note: TAGGED is not allowed in Ada 83 mode
6176
6177 -- N_Formal_Private_Type_Definition
6178 -- Sloc points to PRIVATE
6179 -- Abstract_Present (Flag4)
6180 -- Tagged_Present (Flag15)
6181 -- Limited_Present (Flag17)
6182
6183 --------------------------------------------
6184 -- 12.5.1 Formal Derived Type Definition --
6185 --------------------------------------------
6186
6187 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
6188 -- [abstract] [limited | synchronized]
6189 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
6190 -- Note: this construct is not allowed in Ada 83 mode
6191
6192 -- N_Formal_Derived_Type_Definition
6193 -- Sloc points to NEW
6194 -- Subtype_Mark (Node4)
6195 -- Private_Present (Flag15)
6196 -- Abstract_Present (Flag4)
6197 -- Limited_Present (Flag17)
6198 -- Synchronized_Present (Flag7)
6199 -- Interface_List (List2) (set to No_List if none)
6200
6201 ---------------------------------------------
6202 -- 12.5.2 Formal Discrete Type Definition --
6203 ---------------------------------------------
6204
6205 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
6206
6207 -- N_Formal_Discrete_Type_Definition
6208 -- Sloc points to (
6209
6210 ---------------------------------------------------
6211 -- 12.5.2 Formal Signed Integer Type Definition --
6212 ---------------------------------------------------
6213
6214 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
6215
6216 -- N_Formal_Signed_Integer_Type_Definition
6217 -- Sloc points to RANGE
6218
6219 --------------------------------------------
6220 -- 12.5.2 Formal Modular Type Definition --
6221 --------------------------------------------
6222
6223 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
6224
6225 -- N_Formal_Modular_Type_Definition
6226 -- Sloc points to MOD
6227
6228 ----------------------------------------------
6229 -- 12.5.2 Formal Floating Point Definition --
6230 ----------------------------------------------
6231
6232 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
6233
6234 -- N_Formal_Floating_Point_Definition
6235 -- Sloc points to DIGITS
6236
6237 ----------------------------------------------------
6238 -- 12.5.2 Formal Ordinary Fixed Point Definition --
6239 ----------------------------------------------------
6240
6241 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
6242
6243 -- N_Formal_Ordinary_Fixed_Point_Definition
6244 -- Sloc points to DELTA
6245
6246 ---------------------------------------------------
6247 -- 12.5.2 Formal Decimal Fixed Point Definition --
6248 ---------------------------------------------------
6249
6250 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
6251
6252 -- Note: formal decimal fixed point definition not allowed in Ada 83
6253
6254 -- N_Formal_Decimal_Fixed_Point_Definition
6255 -- Sloc points to DELTA
6256
6257 ------------------------------------------
6258 -- 12.5.3 Formal Array Type Definition --
6259 ------------------------------------------
6260
6261 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
6262
6263 -------------------------------------------
6264 -- 12.5.4 Formal Access Type Definition --
6265 -------------------------------------------
6266
6267 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
6268
6269 ----------------------------------------------
6270 -- 12.5.5 Formal Interface Type Definition --
6271 ----------------------------------------------
6272
6273 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
6274
6275 -----------------------------------------
6276 -- 12.6 Formal Subprogram Declaration --
6277 -----------------------------------------
6278
6279 -- FORMAL_SUBPROGRAM_DECLARATION ::=
6280 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
6281 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
6282
6283 --------------------------------------------------
6284 -- 12.6 Formal Concrete Subprogram Declaration --
6285 --------------------------------------------------
6286
6287 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
6288 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT]
6289 -- [ASPECT_SPECIFICATIONS];
6290
6291 -- N_Formal_Concrete_Subprogram_Declaration
6292 -- Sloc points to WITH
6293 -- Specification (Node1)
6294 -- Default_Name (Node2) (set to Empty if no subprogram default)
6295 -- Box_Present (Flag15)
6296
6297 -- Note: if no subprogram default is present, then Name is set
6298 -- to Empty, and Box_Present is False.
6299
6300 --------------------------------------------------
6301 -- 12.6 Formal Abstract Subprogram Declaration --
6302 --------------------------------------------------
6303
6304 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
6305 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT]
6306 -- [ASPECT_SPECIFICATIONS];
6307
6308 -- N_Formal_Abstract_Subprogram_Declaration
6309 -- Sloc points to WITH
6310 -- Specification (Node1)
6311 -- Default_Name (Node2) (set to Empty if no subprogram default)
6312 -- Box_Present (Flag15)
6313
6314 -- Note: if no subprogram default is present, then Name is set
6315 -- to Empty, and Box_Present is False.
6316
6317 ------------------------------
6318 -- 12.6 Subprogram Default --
6319 ------------------------------
6320
6321 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
6322
6323 -- There is no separate node in the tree for a subprogram default.
6324 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
6325 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
6326 -- default name or box indication, as needed.
6327
6328 ------------------------
6329 -- 12.6 Default Name --
6330 ------------------------
6331
6332 -- DEFAULT_NAME ::= NAME
6333
6334 --------------------------------------
6335 -- 12.7 Formal Package Declaration --
6336 --------------------------------------
6337
6338 -- FORMAL_PACKAGE_DECLARATION ::=
6339 -- with package DEFINING_IDENTIFIER
6340 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART
6341 -- [ASPECT_SPECIFICATIONS];
6342
6343 -- Note: formal package declarations not allowed in Ada 83 mode
6344
6345 -- N_Formal_Package_Declaration
6346 -- Sloc points to WITH
6347 -- Defining_Identifier (Node1)
6348 -- Name (Node2)
6349 -- Generic_Associations (List3) (set to No_List if (<>) case or
6350 -- empty generic actual part)
6351 -- Box_Present (Flag15)
6352 -- Instance_Spec (Node5-Sem)
6353 -- ABE_Is_Certain (Flag18-Sem)
6354
6355 --------------------------------------
6356 -- 12.7 Formal Package Actual Part --
6357 --------------------------------------
6358
6359 -- FORMAL_PACKAGE_ACTUAL_PART ::=
6360 -- ([OTHERS] => <>)
6361 -- | [GENERIC_ACTUAL_PART]
6362 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
6363
6364 -- FORMAL_PACKAGE_ASSOCIATION ::=
6365 -- GENERIC_ASSOCIATION
6366 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
6367
6368 -- There is no explicit node in the tree for a formal package actual
6369 -- part. Instead the information appears in the parent node (i.e. the
6370 -- formal package declaration node itself).
6371
6372 -- There is no explicit node for a formal package association. All of
6373 -- them are represented either by a generic association, possibly with
6374 -- Box_Present, or by an N_Others_Choice.
6375
6376 ---------------------------------
6377 -- 13.1 Representation clause --
6378 ---------------------------------
6379
6380 -- REPRESENTATION_CLAUSE ::=
6381 -- ATTRIBUTE_DEFINITION_CLAUSE
6382 -- | ENUMERATION_REPRESENTATION_CLAUSE
6383 -- | RECORD_REPRESENTATION_CLAUSE
6384 -- | AT_CLAUSE
6385
6386 ----------------------
6387 -- 13.1 Local Name --
6388 ----------------------
6389
6390 -- LOCAL_NAME :=
6391 -- DIRECT_NAME
6392 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
6393 -- | library_unit_NAME
6394
6395 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
6396 -- as an attribute reference, which has essentially the same form.
6397
6398 ---------------------------------------
6399 -- 13.3 Attribute definition clause --
6400 ---------------------------------------
6401
6402 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
6403 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
6404 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
6405
6406 -- In Ada 83, the expression must be a simple expression and the
6407 -- local name must be a direct name.
6408
6409 -- Note: the only attribute definition clause that is processed by
6410 -- gigi is an address clause. For all other cases, the information
6411 -- is extracted by the front end and either results in setting entity
6412 -- information, e.g. Esize for the Size clause, or in appropriate
6413 -- expansion actions (e.g. in the case of Storage_Size).
6414
6415 -- For an address clause, Gigi constructs the appropriate addressing
6416 -- code. It also ensures that no aliasing optimizations are made
6417 -- for the object for which the address clause appears.
6418
6419 -- Note: for an address clause used to achieve an overlay:
6420
6421 -- A : Integer;
6422 -- B : Integer;
6423 -- for B'Address use A'Address;
6424
6425 -- the above rule means that Gigi will ensure that no optimizations
6426 -- will be made for B that would violate the implementation advice
6427 -- of RM 13.3(19). However, this advice applies only to B and not
6428 -- to A, which seems unfortunate. The GNAT front end will mark the
6429 -- object A as volatile to also prevent unwanted optimization
6430 -- assumptions based on no aliasing being made for B.
6431
6432 -- N_Attribute_Definition_Clause
6433 -- Sloc points to FOR
6434 -- Name (Node2) the local name
6435 -- Chars (Name1) the identifier name from the attribute designator
6436 -- Expression (Node3) the expression or name
6437 -- Entity (Node4-Sem)
6438 -- Next_Rep_Item (Node5-Sem)
6439 -- From_At_Mod (Flag4-Sem)
6440 -- Check_Address_Alignment (Flag11-Sem)
6441 -- From_Aspect_Specification (Flag13-Sem)
6442 -- Is_Delayed_Aspect (Flag14-Sem)
6443 -- Address_Warning_Posted (Flag18-Sem)
6444
6445 -- Note: if From_Aspect_Specification is set, then Sloc points to the
6446 -- aspect name, and Entity is resolved already to reference the entity
6447 -- to which the aspect applies.
6448
6449 -----------------------------------
6450 -- 13.3.1 Aspect Specifications --
6451 -----------------------------------
6452
6453 -- We modify the RM grammar here, the RM grammar is:
6454
6455 -- ASPECT_SPECIFICATION ::=
6456 -- with ASPECT_MARK [=> ASPECT_DEFINITION] {.
6457 -- ASPECT_MARK [=> ASPECT_DEFINITION] }
6458
6459 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
6460
6461 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
6462
6463 -- That's inconvenient, since there is no non-terminal name for a single
6464 -- entry in the list of aspects. So we use this grammar instead:
6465
6466 -- ASPECT_SPECIFICATIONS ::=
6467 -- with ASPECT_SPECIFICATION {, ASPECT_SPECIFICATION}
6468
6469 -- ASPECT_SPECIFICATION =>
6470 -- ASPECT_MARK [=> ASPECT_DEFINITION]
6471
6472 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
6473
6474 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
6475
6476 -- See separate package Aspects for details on the incorporation of
6477 -- these nodes into the tree, and how aspect specifications for a given
6478 -- declaration node are associated with that node.
6479
6480 -- N_Aspect_Specification
6481 -- Sloc points to aspect identifier
6482 -- Identifier (Node1) aspect identifier
6483 -- Aspect_Rep_Item (Node2-Sem)
6484 -- Expression (Node3) Aspect_Definition (set to Empty if none)
6485 -- Entity (Node4-Sem) entity to which the aspect applies
6486 -- Class_Present (Flag6) Set if 'Class present
6487 -- Next_Rep_Item (Node5-Sem)
6488 -- Split_PPC (Flag17) Set if split pre/post attribute
6489
6490 -- Note: Aspect_Specification is an Ada 2012 feature
6491
6492 -- Note: When a Pre or Post aspect specification is processed, it is
6493 -- broken into AND THEN sections. The left most section has Split_PPC
6494 -- set to False, indicating that it is the original specification (e.g.
6495 -- for posting errors). For the other sections, Split_PPC is set True.
6496
6497 ---------------------------------------------
6498 -- 13.4 Enumeration representation clause --
6499 ---------------------------------------------
6500
6501 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
6502 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
6503
6504 -- In Ada 83, the name must be a direct name
6505
6506 -- N_Enumeration_Representation_Clause
6507 -- Sloc points to FOR
6508 -- Identifier (Node1) direct name
6509 -- Array_Aggregate (Node3)
6510 -- Next_Rep_Item (Node5-Sem)
6511
6512 ---------------------------------
6513 -- 13.4 Enumeration aggregate --
6514 ---------------------------------
6515
6516 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
6517
6518 ------------------------------------------
6519 -- 13.5.1 Record representation clause --
6520 ------------------------------------------
6521
6522 -- RECORD_REPRESENTATION_CLAUSE ::=
6523 -- for first_subtype_LOCAL_NAME use
6524 -- record [MOD_CLAUSE]
6525 -- {COMPONENT_CLAUSE}
6526 -- end record;
6527
6528 -- Gigi restriction: Mod_Clause is always Empty (if present it is
6529 -- replaced by a corresponding Alignment attribute definition clause).
6530
6531 -- Note: Component_Clauses can include pragmas
6532
6533 -- N_Record_Representation_Clause
6534 -- Sloc points to FOR
6535 -- Identifier (Node1) direct name
6536 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
6537 -- Component_Clauses (List3)
6538 -- Next_Rep_Item (Node5-Sem)
6539
6540 ------------------------------
6541 -- 13.5.1 Component clause --
6542 ------------------------------
6543
6544 -- COMPONENT_CLAUSE ::=
6545 -- component_LOCAL_NAME at POSITION
6546 -- range FIRST_BIT .. LAST_BIT;
6547
6548 -- N_Component_Clause
6549 -- Sloc points to AT
6550 -- Component_Name (Node1) points to Name or Attribute_Reference
6551 -- Position (Node2)
6552 -- First_Bit (Node3)
6553 -- Last_Bit (Node4)
6554
6555 ----------------------
6556 -- 13.5.1 Position --
6557 ----------------------
6558
6559 -- POSITION ::= static_EXPRESSION
6560
6561 -----------------------
6562 -- 13.5.1 First_Bit --
6563 -----------------------
6564
6565 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
6566
6567 ----------------------
6568 -- 13.5.1 Last_Bit --
6569 ----------------------
6570
6571 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
6572
6573 --------------------------
6574 -- 13.8 Code statement --
6575 --------------------------
6576
6577 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
6578
6579 -- Note: in GNAT, the qualified expression has the form
6580
6581 -- Asm_Insn'(Asm (...));
6582
6583 -- See package System.Machine_Code in file s-maccod.ads for details on
6584 -- the allowed parameters to Asm. There are two ways this node can
6585 -- arise, as a code statement, in which case the expression is the
6586 -- qualified expression, or as a result of the expansion of an intrinsic
6587 -- call to the Asm or Asm_Input procedure.
6588
6589 -- N_Code_Statement
6590 -- Sloc points to first token of the expression
6591 -- Expression (Node3)
6592
6593 -- Note: package Exp_Code contains an abstract functional interface
6594 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
6595
6596 ------------------------
6597 -- 13.12 Restriction --
6598 ------------------------
6599
6600 -- RESTRICTION ::=
6601 -- restriction_IDENTIFIER
6602 -- | restriction_parameter_IDENTIFIER => EXPRESSION
6603
6604 -- There is no explicit node for restrictions. Instead the restriction
6605 -- appears in normal pragma syntax as a pragma argument association,
6606 -- which has the same syntactic form.
6607
6608 --------------------------
6609 -- B.2 Shift Operators --
6610 --------------------------
6611
6612 -- Calls to the intrinsic shift functions are converted to one of
6613 -- the following shift nodes, which have the form of normal binary
6614 -- operator names. Note that for a given shift operation, one node
6615 -- covers all possible types, as for normal operators.
6616
6617 -- Note: it is perfectly permissible for the expander to generate
6618 -- shift operation nodes directly, in which case they will be analyzed
6619 -- and parsed in the usual manner.
6620
6621 -- Sprint syntax: shift-function-name!(expr, count)
6622
6623 -- Note: the Left_Opnd field holds the first argument (the value to
6624 -- be shifted). The Right_Opnd field holds the second argument (the
6625 -- shift count). The Chars field is the name of the intrinsic function.
6626
6627 -- N_Op_Rotate_Left
6628 -- Sloc points to the function name
6629 -- plus fields for binary operator
6630 -- plus fields for expression
6631 -- Shift_Count_OK (Flag4-Sem)
6632
6633 -- N_Op_Rotate_Right
6634 -- Sloc points to the function name
6635 -- plus fields for binary operator
6636 -- plus fields for expression
6637 -- Shift_Count_OK (Flag4-Sem)
6638
6639 -- N_Op_Shift_Left
6640 -- Sloc points to the function name
6641 -- plus fields for binary operator
6642 -- plus fields for expression
6643 -- Shift_Count_OK (Flag4-Sem)
6644
6645 -- N_Op_Shift_Right_Arithmetic
6646 -- Sloc points to the function name
6647 -- plus fields for binary operator
6648 -- plus fields for expression
6649 -- Shift_Count_OK (Flag4-Sem)
6650
6651 -- N_Op_Shift_Right
6652 -- Sloc points to the function name
6653 -- plus fields for binary operator
6654 -- plus fields for expression
6655 -- Shift_Count_OK (Flag4-Sem)
6656
6657 --------------------------
6658 -- Obsolescent Features --
6659 --------------------------
6660
6661 -- The syntax descriptions and tree nodes for obsolescent features are
6662 -- grouped together, corresponding to their location in appendix I in
6663 -- the RM. However, parsing and semantic analysis for these constructs
6664 -- is located in an appropriate chapter (see individual notes).
6665
6666 ---------------------------
6667 -- J.3 Delta Constraint --
6668 ---------------------------
6669
6670 -- Note: the parse routine for this construct is located in section
6671 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
6672 -- where delta constraint logically belongs.
6673
6674 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
6675
6676 -- N_Delta_Constraint
6677 -- Sloc points to DELTA
6678 -- Delta_Expression (Node3)
6679 -- Range_Constraint (Node4) (set to Empty if not present)
6680
6681 --------------------
6682 -- J.7 At Clause --
6683 --------------------
6684
6685 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
6686
6687 -- Note: the parse routine for this construct is located in Par-Ch13,
6688 -- and the semantic analysis is in Sem_Ch13, where at clause logically
6689 -- belongs if it were not obsolescent.
6690
6691 -- Note: in Ada 83 the expression must be a simple expression
6692
6693 -- Gigi restriction: This node never appears, it is rewritten as an
6694 -- address attribute definition clause.
6695
6696 -- N_At_Clause
6697 -- Sloc points to FOR
6698 -- Identifier (Node1)
6699 -- Expression (Node3)
6700
6701 ---------------------
6702 -- J.8 Mod clause --
6703 ---------------------
6704
6705 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
6706
6707 -- Note: the parse routine for this construct is located in Par-Ch13,
6708 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
6709 -- belongs if it were not obsolescent.
6710
6711 -- Note: in Ada 83, the expression must be a simple expression
6712
6713 -- Gigi restriction: this node never appears. It is replaced
6714 -- by a corresponding Alignment attribute definition clause.
6715
6716 -- Note: pragmas can appear before and after the MOD_CLAUSE since
6717 -- its name has "clause" in it. This is rather strange, but is quite
6718 -- definitely specified. The pragmas before are collected in the
6719 -- Pragmas_Before field of the mod clause node itself, and pragmas
6720 -- after are simply swallowed up in the list of component clauses.
6721
6722 -- N_Mod_Clause
6723 -- Sloc points to AT
6724 -- Expression (Node3)
6725 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
6726
6727 --------------------
6728 -- Semantic Nodes --
6729 --------------------
6730
6731 -- These semantic nodes are used to hold additional semantic information.
6732 -- They are inserted into the tree as a result of semantic processing.
6733 -- Although there are no legitimate source syntax constructions that
6734 -- correspond directly to these nodes, we need a source syntax for the
6735 -- reconstructed tree printed by Sprint, and the node descriptions here
6736 -- show this syntax.
6737
6738 -- Note: Case_Expression and Conditional_Expression is in this section for
6739 -- now, since they are extensions. We will move them to their appropriate
6740 -- places when they are officially approved as extensions (and then we will
6741 -- know what the exact grammar and place in the Reference Manual is!)
6742
6743 ---------------------
6744 -- Case Expression --
6745 ---------------------
6746
6747 -- CASE_EXPRESSION ::=
6748 -- case EXPRESSION is
6749 -- CASE_EXPRESSION_ALTERNATIVE
6750 -- {CASE_EXPRESSION_ALTERNATIVE}
6751
6752 -- Note that the Alternatives cannot include pragmas (this constrasts
6753 -- with the situation of case statements where pragmas are allowed).
6754
6755 -- N_Case_Expression
6756 -- Sloc points to CASE
6757 -- Expression (Node3)
6758 -- Alternatives (List4)
6759
6760 ---------------------------------
6761 -- Case Expression Alternative --
6762 ---------------------------------
6763
6764 -- CASE_STATEMENT_ALTERNATIVE ::=
6765 -- when DISCRETE_CHOICE_LIST =>
6766 -- EXPRESSION
6767
6768 -- N_Case_Expression_Alternative
6769 -- Sloc points to WHEN
6770 -- Actions (List1)
6771 -- Discrete_Choices (List4)
6772 -- Expression (Node3)
6773
6774 -- Note: The Actions field temporarily holds any actions associated with
6775 -- evaluation of the Expression. During expansion of the case expression
6776 -- these actions are wrapped into the an N_Expressions_With_Actions node
6777 -- replacing the original expression.
6778
6779 ----------------------------
6780 -- Conditional Expression --
6781 ----------------------------
6782
6783 -- This node is used to represent an expression corresponding to the
6784 -- C construct (condition ? then-expression : else_expression), where
6785 -- Expressions is a three element list, whose first expression is the
6786 -- condition, and whose second and third expressions are the then and
6787 -- else expressions respectively.
6788
6789 -- Note: the Then_Actions and Else_Actions fields are always set to
6790 -- No_List in the tree passed to Gigi. These fields are used only
6791 -- for temporary processing purposes in the expander.
6792
6793 -- The Ada language does not permit conditional expressions, however
6794 -- this is under discussion as a possible extension by the ARG, and we
6795 -- have implemented a form of this capability in GNAT under control of
6796 -- the -gnatX switch. The syntax is:
6797
6798 -- CONDITIONAL_EXPRESSION ::=
6799 -- if EXPRESSION then EXPRESSION
6800 -- {elsif EXPRESSION then EXPRESSION}
6801 -- [else EXPRESSION]
6802
6803 -- And we add the additional constructs
6804
6805 -- PRIMARY ::= ( CONDITIONAL_EXPRESION )
6806 -- PRAGMA_ARGUMENT_ASSOCIATION ::= CONDITIONAL_EXPRESSION
6807
6808 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
6809 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
6810 -- the Is_Elsif flag is set on the inner conditional expression.
6811
6812 -- N_Conditional_Expression
6813 -- Sloc points to IF or ELSIF keyword
6814 -- Expressions (List1)
6815 -- Then_Actions (List2-Sem)
6816 -- Else_Actions (List3-Sem)
6817 -- Is_Elsif (Flag13) (set if comes from ELSIF)
6818 -- plus fields for expression
6819
6820 -------------------
6821 -- Expanded_Name --
6822 -------------------
6823
6824 -- The N_Expanded_Name node is used to represent a selected component
6825 -- name that has been resolved to an expanded name. The semantic phase
6826 -- replaces N_Selected_Component nodes that represent names by the use
6827 -- of this node, leaving the N_Selected_Component node used only when
6828 -- the prefix is a record or protected type.
6829
6830 -- The fields of the N_Expanded_Name node are layed out identically
6831 -- to those of the N_Selected_Component node, allowing conversion of
6832 -- an expanded name node to a selected component node to be done
6833 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
6834
6835 -- There is no special sprint syntax for an expanded name
6836
6837 -- N_Expanded_Name
6838 -- Sloc points to the period
6839 -- Chars (Name1) copy of Chars field of selector name
6840 -- Prefix (Node3)
6841 -- Selector_Name (Node2)
6842 -- Entity (Node4-Sem)
6843 -- Associated_Node (Node4-Sem)
6844 -- Redundant_Use (Flag13-Sem)
6845 -- Has_Private_View (Flag11-Sem) set in generic units.
6846 -- plus fields for expression
6847
6848 -----------------------------
6849 -- Expression with Actions --
6850 -----------------------------
6851
6852 -- This node is created by the analyzer/expander to handle some
6853 -- expansion cases, notably short circuit forms where there are
6854 -- actions associated with the right hand operand.
6855
6856 -- The N_Expression_With_Actions node represents an expression with
6857 -- an associated set of actions (which are executable statements and
6858 -- declarations, as might occur in a handled statement sequence).
6859
6860 -- The required semantics is that the set of actions is executed in
6861 -- the order in which it appears just before the expression is
6862 -- evaluated (and these actions must only be executed if the value
6863 -- of the expression is evaluated). The node is considered to be
6864 -- a subexpression, whose value is the value of the Expression after
6865 -- executing all the actions.
6866
6867 -- Note: if the actions contain declarations, then these declarations
6868 -- maybe referenced with in the expression. It is thus appropriate for
6869 -- the back end to create a scope that encompasses the construct (any
6870 -- declarations within the actions will definitely not be referenced
6871 -- once elaboration of the construct is completed).
6872
6873 -- Sprint syntax: do
6874 -- action;
6875 -- action;
6876 -- ...
6877 -- action;
6878 -- in expression end
6879
6880 -- N_Expression_With_Actions
6881 -- Actions (List1)
6882 -- Expression (Node3)
6883 -- plus fields for expression
6884
6885 -- Note: the actions list is always non-null, since we would
6886 -- never have created this node if there weren't some actions.
6887
6888 --------------------
6889 -- Free Statement --
6890 --------------------
6891
6892 -- The N_Free_Statement node is generated as a result of a call to an
6893 -- instantiation of Unchecked_Deallocation. The instantiation of this
6894 -- generic is handled specially and generates this node directly.
6895
6896 -- Sprint syntax: free expression
6897
6898 -- N_Free_Statement
6899 -- Sloc is copied from the unchecked deallocation call
6900 -- Expression (Node3) argument to unchecked deallocation call
6901 -- Storage_Pool (Node1-Sem)
6902 -- Procedure_To_Call (Node2-Sem)
6903 -- Actual_Designated_Subtype (Node4-Sem)
6904
6905 -- Note: in the case where a debug source file is generated, the Sloc
6906 -- for this node points to the FREE keyword in the Sprint file output.
6907
6908 -------------------
6909 -- Freeze Entity --
6910 -------------------
6911
6912 -- This node marks the point in a declarative part at which an entity
6913 -- declared therein becomes frozen. The expander places initialization
6914 -- procedures for types at those points. Gigi uses the freezing point
6915 -- to elaborate entities that may depend on previous private types.
6916
6917 -- See the section in Einfo "Delayed Freezing and Elaboration" for
6918 -- a full description of the use of this node.
6919
6920 -- The Entity field points back to the entity for the type (whose
6921 -- Freeze_Node field points back to this freeze node).
6922
6923 -- The Actions field contains a list of declarations and statements
6924 -- generated by the expander which are associated with the freeze
6925 -- node, and are elaborated as though the freeze node were replaced
6926 -- by this sequence of actions.
6927
6928 -- Note: the Sloc field in the freeze node references a construct
6929 -- associated with the freezing point. This is used for posting
6930 -- messages in some error/warning situations, e.g. the case where
6931 -- a primitive operation of a tagged type is declared too late.
6932
6933 -- Sprint syntax: freeze entity-name [
6934 -- freeze actions
6935 -- ]
6936
6937 -- N_Freeze_Entity
6938 -- Sloc points near freeze point (see above special note)
6939 -- Entity (Node4-Sem)
6940 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
6941 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
6942 -- Actions (List1) (set to No_List if no freeze actions)
6943 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
6944
6945 -- The Actions field holds actions associated with the freeze. These
6946 -- actions are elaborated at the point where the type is frozen.
6947
6948 -- Note: in the case where a debug source file is generated, the Sloc
6949 -- for this node points to the FREEZE keyword in the Sprint file output.
6950
6951 --------------------------------
6952 -- Implicit Label Declaration --
6953 --------------------------------
6954
6955 -- An implicit label declaration is created for every occurrence of a
6956 -- label on a statement or a label on a block or loop. It is chained
6957 -- in the declarations of the innermost enclosing block as specified
6958 -- in RM section 5.1 (3).
6959
6960 -- The Defining_Identifier is the actual identifier for the statement
6961 -- identifier. Note that the occurrence of the label is a reference, NOT
6962 -- the defining occurrence. The defining occurrence occurs at the head
6963 -- of the innermost enclosing block, and is represented by this node.
6964
6965 -- Note: from the grammar, this might better be called an implicit
6966 -- statement identifier declaration, but the term we choose seems
6967 -- friendlier, since at least informally statement identifiers are
6968 -- called labels in both cases (i.e. when used in labels, and when
6969 -- used as the identifiers of blocks and loops).
6970
6971 -- Note: although this is logically a semantic node, since it does not
6972 -- correspond directly to a source syntax construction, these nodes are
6973 -- actually created by the parser in a post pass done just after parsing
6974 -- is complete, before semantic analysis is started (see Par.Labl).
6975
6976 -- Sprint syntax: labelname : label;
6977
6978 -- N_Implicit_Label_Declaration
6979 -- Sloc points to the << of the label
6980 -- Defining_Identifier (Node1)
6981 -- Label_Construct (Node2-Sem)
6982
6983 -- Note: in the case where a debug source file is generated, the Sloc
6984 -- for this node points to the label name in the generated declaration.
6985
6986 ---------------------
6987 -- Itype_Reference --
6988 ---------------------
6989
6990 -- This node is used to create a reference to an Itype. The only purpose
6991 -- is to make sure the Itype is defined if this is the first reference.
6992
6993 -- A typical use of this node is when an Itype is to be referenced in
6994 -- two branches of an IF statement. In this case it is important that
6995 -- the first use of the Itype not be inside the conditional, since then
6996 -- it might not be defined if the other branch of the IF is taken, in
6997 -- the case where the definition generates elaboration code.
6998
6999 -- The Itype field points to the referenced Itype
7000
7001 -- Sprint syntax: reference itype-name
7002
7003 -- N_Itype_Reference
7004 -- Sloc points to the node generating the reference
7005 -- Itype (Node1-Sem)
7006
7007 -- Note: in the case where a debug source file is generated, the Sloc
7008 -- for this node points to the REFERENCE keyword in the file output.
7009
7010 ---------------------
7011 -- Raise_xxx_Error --
7012 ---------------------
7013
7014 -- One of these nodes is created during semantic analysis to replace
7015 -- a node for an expression that is determined to definitely raise
7016 -- the corresponding exception.
7017
7018 -- The N_Raise_xxx_Error node may also stand alone in place
7019 -- of a declaration or statement, in which case it simply causes
7020 -- the exception to be raised (i.e. it is equivalent to a raise
7021 -- statement that raises the corresponding exception). This use
7022 -- is distinguished by the fact that the Etype in this case is
7023 -- Standard_Void_Type, In the subexpression case, the Etype is the
7024 -- same as the type of the subexpression which it replaces.
7025
7026 -- If Condition is empty, then the raise is unconditional. If the
7027 -- Condition field is non-empty, it is a boolean expression which
7028 -- is first evaluated, and the exception is raised only if the
7029 -- value of the expression is True. In the unconditional case, the
7030 -- creation of this node is usually accompanied by a warning message
7031 -- error. The creation of this node will usually be accompanied by a
7032 -- message (unless it appears within the right operand of a short
7033 -- circuit form whose left argument is static and decisively
7034 -- eliminates elaboration of the raise operation. The condition field
7035 -- can ONLY be present when the node is used as a statement form, it
7036 -- may NOT be present in the case where the node appears within an
7037 -- expression.
7038
7039 -- The exception is generated with a message that contains the
7040 -- file name and line number, and then appended text. The Reason
7041 -- code shows the text to be added. The Reason code is an element
7042 -- of the type Types.RT_Exception_Code, and indicates both the
7043 -- message to be added, and the exception to be raised (which must
7044 -- match the node type). The value is stored by storing a Uint which
7045 -- is the Pos value of the enumeration element in this type.
7046
7047 -- Gigi restriction: This expander ensures that the type of the
7048 -- Condition field is always Standard.Boolean, even if the type
7049 -- in the source is some non-standard boolean type.
7050
7051 -- Sprint syntax: [xxx_error "msg"]
7052 -- or: [xxx_error when condition "msg"]
7053
7054 -- N_Raise_Constraint_Error
7055 -- Sloc references related construct
7056 -- Condition (Node1) (set to Empty if no condition)
7057 -- Reason (Uint3)
7058 -- plus fields for expression
7059
7060 -- N_Raise_Program_Error
7061 -- Sloc references related construct
7062 -- Condition (Node1) (set to Empty if no condition)
7063 -- Reason (Uint3)
7064 -- plus fields for expression
7065
7066 -- N_Raise_Storage_Error
7067 -- Sloc references related construct
7068 -- Condition (Node1) (set to Empty if no condition)
7069 -- Reason (Uint3)
7070 -- plus fields for expression
7071
7072 -- Note: Sloc is copied from the expression generating the exception.
7073 -- In the case where a debug source file is generated, the Sloc for
7074 -- this node points to the left bracket in the Sprint file output.
7075
7076 -- Note: the back end may be required to translate these nodes into
7077 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
7078
7079 ---------------------------------------------
7080 -- Optimization of Exception Raise to Goto --
7081 ---------------------------------------------
7082
7083 -- In some cases, the front end will determine that any exception raised
7084 -- by the back end for a certain exception should be transformed into a
7085 -- goto statement.
7086
7087 -- There are three kinds of exceptions raised by the back end (note that
7088 -- for this purpose we consider gigi to be part of the back end in the
7089 -- gcc case):
7090
7091 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
7092 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
7093 -- 3. Other cases not specifically marked by the front end
7094
7095 -- Normally all such exceptions are translated into calls to the proper
7096 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
7097 -- and the exception message.
7098
7099 -- The front end may determine that for a particular sequence of code,
7100 -- exceptions in any of these three categories for a particular builtin
7101 -- exception should result in a goto, rather than a call to Rcheck_xx.
7102 -- The exact sequence to be generated is:
7103
7104 -- Local_Raise (exception'Identity);
7105 -- goto Label
7106
7107 -- The front end marks such a sequence of code by bracketing it with
7108 -- push and pop nodes:
7109
7110 -- N_Push_xxx_Label (referencing the label)
7111 -- ...
7112 -- (code where transformation is expected for exception xxx)
7113 -- ...
7114 -- N_Pop_xxx_Label
7115
7116 -- The use of push/pop reflects the fact that such regions can properly
7117 -- nest, and one special case is a subregion in which no transformation
7118 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
7119 -- Exception_Label field is Empty.
7120
7121 -- N_Push_Constraint_Error_Label
7122 -- Sloc references first statement in region covered
7123 -- Exception_Label (Node5-Sem)
7124
7125 -- N_Push_Program_Error_Label
7126 -- Sloc references first statement in region covered
7127 -- Exception_Label (Node5-Sem)
7128
7129 -- N_Push_Storage_Error_Label
7130 -- Sloc references first statement in region covered
7131 -- Exception_Label (Node5-Sem)
7132
7133 -- N_Pop_Constraint_Error_Label
7134 -- Sloc references last statement in region covered
7135
7136 -- N_Pop_Program_Error_Label
7137 -- Sloc references last statement in region covered
7138
7139 -- N_Pop_Storage_Error_Label
7140 -- Sloc references last statement in region covered
7141
7142 ---------------
7143 -- Reference --
7144 ---------------
7145
7146 -- For a number of purposes, we need to construct references to objects.
7147 -- These references are subsequently treated as normal access values.
7148 -- An example is the construction of the parameter block passed to a
7149 -- task entry. The N_Reference node is provided for this purpose. It is
7150 -- similar in effect to the use of the Unrestricted_Access attribute,
7151 -- and like Unrestricted_Access can be applied to objects which would
7152 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
7153 -- objects which are not aliased, and slices). In addition it can be
7154 -- applied to composite type values as well as objects, including string
7155 -- values and aggregates.
7156
7157 -- Note: we use the Prefix field for this expression so that the
7158 -- resulting node can be treated using common code with the attribute
7159 -- nodes for the 'Access and related attributes. Logically it would make
7160 -- more sense to call it an Expression field, but then we would have to
7161 -- special case the treatment of the N_Reference node.
7162
7163 -- Sprint syntax: prefix'reference
7164
7165 -- N_Reference
7166 -- Sloc is copied from the expression
7167 -- Prefix (Node3)
7168 -- plus fields for expression
7169
7170 -- Note: in the case where a debug source file is generated, the Sloc
7171 -- for this node points to the quote in the Sprint file output.
7172
7173 -----------------
7174 -- SCIL Nodes --
7175 -----------------
7176
7177 -- SCIL nodes are special nodes added to the tree when the CodePeer
7178 -- mode is active. They help the CodePeer backend to locate nodes that
7179 -- require special processing.
7180
7181 -- Major documentation on the general design of the SCIL interface, and
7182 -- in particular detailed description of these nodes is missing and is
7183 -- to be supplied in the future, when the design has finalized ???
7184
7185 -- Meanwhile these nodes should be considered in experimental form, and
7186 -- should be ignored by all code generating back ends. ???
7187
7188 -- N_SCIL_Dispatch_Table_Tag_Init
7189 -- Sloc references a node for a tag initialization
7190 -- SCIL_Entity (Node4-Sem)
7191
7192 -- N_SCIL_Dispatching_Call
7193 -- Sloc references the node of a dispatching call
7194 -- SCIL_Target_Prim (Node2-Sem)
7195 -- SCIL_Entity (Node4-Sem)
7196 -- SCIL_Controlling_Tag (Node5-Sem)
7197
7198 -- N_SCIL_Membership_Test
7199 -- Sloc references the node of a membership test
7200 -- SCIL_Tag_Value (Node5-Sem)
7201 -- SCIL_Entity (Node4-Sem)
7202
7203 ---------------------
7204 -- Subprogram_Info --
7205 ---------------------
7206
7207 -- This node generates the appropriate Subprogram_Info value for a
7208 -- given procedure. See Ada.Exceptions for further details
7209
7210 -- Sprint syntax: subprog'subprogram_info
7211
7212 -- N_Subprogram_Info
7213 -- Sloc points to the entity for the procedure
7214 -- Identifier (Node1) identifier referencing the procedure
7215 -- Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc
7216
7217 -- Note: in the case where a debug source file is generated, the Sloc
7218 -- for this node points to the quote in the Sprint file output.
7219
7220 --------------------------
7221 -- Unchecked Expression --
7222 --------------------------
7223
7224 -- An unchecked expression is one that must be analyzed and resolved
7225 -- with all checks off, regardless of the current setting of scope
7226 -- suppress flags.
7227
7228 -- Sprint syntax: `(expression)
7229
7230 -- Note: this node is always removed from the tree (and replaced by
7231 -- its constituent expression) on completion of analysis, so it only
7232 -- appears in intermediate trees, and will never be seen by Gigi.
7233
7234 -- N_Unchecked_Expression
7235 -- Sloc is a copy of the Sloc of the expression
7236 -- Expression (Node3)
7237 -- plus fields for expression
7238
7239 -- Note: in the case where a debug source file is generated, the Sloc
7240 -- for this node points to the back quote in the Sprint file output.
7241
7242 -------------------------------
7243 -- Unchecked Type Conversion --
7244 -------------------------------
7245
7246 -- An unchecked type conversion node represents the semantic action
7247 -- corresponding to a call to an instantiation of Unchecked_Conversion.
7248 -- It is generated as a result of actual use of Unchecked_Conversion
7249 -- and also the expander generates unchecked type conversion nodes
7250 -- directly for expansion of complex semantic actions.
7251
7252 -- Note: an unchecked type conversion is a variable as far as the
7253 -- semantics are concerned, which is convenient for the expander.
7254 -- This does not change what Ada source programs are legal, since
7255 -- clearly a function call to an instantiation of Unchecked_Conversion
7256 -- is not a variable in any case.
7257
7258 -- Sprint syntax: subtype-mark!(expression)
7259
7260 -- N_Unchecked_Type_Conversion
7261 -- Sloc points to related node in source
7262 -- Subtype_Mark (Node4)
7263 -- Expression (Node3)
7264 -- Kill_Range_Check (Flag11-Sem)
7265 -- No_Truncation (Flag17-Sem)
7266 -- plus fields for expression
7267
7268 -- Note: in the case where a debug source file is generated, the Sloc
7269 -- for this node points to the exclamation in the Sprint file output.
7270
7271 -----------------------------------
7272 -- Validate_Unchecked_Conversion --
7273 -----------------------------------
7274
7275 -- The front end does most of the validation of unchecked conversion,
7276 -- including checking sizes (this is done after the back end is called
7277 -- to take advantage of back-annotation of calculated sizes).
7278
7279 -- The front end also deals with specific cases that are not allowed
7280 -- e.g. involving unconstrained array types.
7281
7282 -- For the case of the standard gigi backend, this means that all
7283 -- checks are done in the front-end.
7284
7285 -- However, in the case of specialized back-ends, notably the JVM
7286 -- backend for JGNAT, additional requirements and restrictions apply
7287 -- to unchecked conversion, and these are most conveniently performed
7288 -- in the specialized back-end.
7289
7290 -- To accommodate this requirement, for such back ends, the following
7291 -- special node is generated recording an unchecked conversion that
7292 -- needs to be validated. The back end should post an appropriate
7293 -- error message if the unchecked conversion is invalid or warrants
7294 -- a special warning message.
7295
7296 -- Source_Type and Target_Type point to the entities for the two
7297 -- types involved in the unchecked conversion instantiation that
7298 -- is to be validated.
7299
7300 -- Sprint syntax: validate Unchecked_Conversion (source, target);
7301
7302 -- N_Validate_Unchecked_Conversion
7303 -- Sloc points to instantiation (location for warning message)
7304 -- Source_Type (Node1-Sem)
7305 -- Target_Type (Node2-Sem)
7306
7307 -- Note: in the case where a debug source file is generated, the Sloc
7308 -- for this node points to the VALIDATE keyword in the file output.
7309
7310 -----------
7311 -- Empty --
7312 -----------
7313
7314 -- Used as the contents of the Nkind field of the dummy Empty node
7315 -- and in some other situations to indicate an uninitialized value.
7316
7317 -- N_Empty
7318 -- Chars (Name1) is set to No_Name
7319
7320 -----------
7321 -- Error --
7322 -----------
7323
7324 -- Used as the contents of the Nkind field of the dummy Error node.
7325 -- Has an Etype field, which gets set to Any_Type later on, to help
7326 -- error recovery (Error_Posted is also set in the Error node).
7327
7328 -- N_Error
7329 -- Chars (Name1) is set to Error_Name
7330 -- Etype (Node5-Sem)
7331
7332 --------------------------
7333 -- Node Type Definition --
7334 --------------------------
7335
7336 -- The following is the definition of the Node_Kind type. As previously
7337 -- discussed, this is separated off to allow rearrangement of the order to
7338 -- facilitate definition of subtype ranges. The comments show the subtype
7339 -- classes which apply to each set of node kinds. The first entry in the
7340 -- comment characterizes the following list of nodes.
7341
7342 type Node_Kind is (
7343 N_Unused_At_Start,
7344
7345 -- N_Representation_Clause
7346
7347 N_At_Clause,
7348 N_Component_Clause,
7349 N_Enumeration_Representation_Clause,
7350 N_Mod_Clause,
7351 N_Record_Representation_Clause,
7352
7353 -- N_Representation_Clause, N_Has_Chars
7354
7355 N_Attribute_Definition_Clause,
7356
7357 -- N_Has_Chars
7358
7359 N_Empty,
7360 N_Pragma_Argument_Association,
7361
7362 -- N_Has_Etype
7363
7364 N_Error,
7365
7366 -- N_Entity, N_Has_Etype, N_Has_Chars
7367
7368 N_Defining_Character_Literal,
7369 N_Defining_Identifier,
7370 N_Defining_Operator_Symbol,
7371
7372 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
7373
7374 N_Expanded_Name,
7375
7376 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
7377 -- N_Has_Chars, N_Has_Entity
7378
7379 N_Identifier,
7380 N_Operator_Symbol,
7381
7382 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
7383 -- N_Has_Chars, N_Has_Entity
7384
7385 N_Character_Literal,
7386
7387 -- N_Binary_Op, N_Op, N_Subexpr,
7388 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
7389
7390 N_Op_Add,
7391 N_Op_Concat,
7392 N_Op_Expon,
7393 N_Op_Subtract,
7394
7395 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
7396 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
7397
7398 N_Op_Divide,
7399 N_Op_Mod,
7400 N_Op_Multiply,
7401 N_Op_Rem,
7402
7403 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7404 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7405
7406 N_Op_And,
7407
7408 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7409 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
7410
7411 N_Op_Eq,
7412 N_Op_Ge,
7413 N_Op_Gt,
7414 N_Op_Le,
7415 N_Op_Lt,
7416 N_Op_Ne,
7417
7418 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7419 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7420
7421 N_Op_Or,
7422 N_Op_Xor,
7423
7424 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
7425 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
7426
7427 N_Op_Rotate_Left,
7428 N_Op_Rotate_Right,
7429 N_Op_Shift_Left,
7430 N_Op_Shift_Right,
7431 N_Op_Shift_Right_Arithmetic,
7432
7433 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
7434 -- N_Has_Chars, N_Has_Entity
7435
7436 N_Op_Abs,
7437 N_Op_Minus,
7438 N_Op_Not,
7439 N_Op_Plus,
7440
7441 -- N_Subexpr, N_Has_Etype, N_Has_Entity
7442
7443 N_Attribute_Reference,
7444
7445 -- N_Subexpr, N_Has_Etype, N_Membership_Test
7446
7447 N_In,
7448 N_Not_In,
7449
7450 -- N_Subexpr, N_Has_Etype, N_Short_Circuit
7451
7452 N_And_Then,
7453 N_Or_Else,
7454
7455 -- N_Subexpr, N_Has_Etype
7456
7457 N_Conditional_Expression,
7458 N_Explicit_Dereference,
7459 N_Expression_With_Actions,
7460 N_Function_Call,
7461 N_Indexed_Component,
7462 N_Integer_Literal,
7463 N_Null,
7464 N_Procedure_Call_Statement,
7465 N_Qualified_Expression,
7466 N_Quantified_Expression,
7467
7468 -- N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
7469
7470 N_Raise_Constraint_Error,
7471 N_Raise_Program_Error,
7472 N_Raise_Storage_Error,
7473
7474 -- N_Subexpr, N_Has_Etype
7475
7476 N_Aggregate,
7477 N_Allocator,
7478 N_Case_Expression,
7479 N_Extension_Aggregate,
7480 N_Range,
7481 N_Real_Literal,
7482 N_Reference,
7483 N_Selected_Component,
7484 N_Slice,
7485 N_String_Literal,
7486 N_Subprogram_Info,
7487 N_Type_Conversion,
7488 N_Unchecked_Expression,
7489 N_Unchecked_Type_Conversion,
7490
7491 -- N_Has_Etype
7492
7493 N_Subtype_Indication,
7494
7495 -- N_Declaration
7496
7497 N_Component_Declaration,
7498 N_Entry_Declaration,
7499 N_Formal_Object_Declaration,
7500 N_Formal_Type_Declaration,
7501 N_Full_Type_Declaration,
7502 N_Incomplete_Type_Declaration,
7503 N_Loop_Parameter_Specification,
7504 N_Object_Declaration,
7505 N_Parameterized_Expression,
7506 N_Protected_Type_Declaration,
7507 N_Private_Extension_Declaration,
7508 N_Private_Type_Declaration,
7509 N_Subtype_Declaration,
7510
7511 -- N_Subprogram_Specification, N_Declaration
7512
7513 N_Function_Specification,
7514 N_Procedure_Specification,
7515
7516 -- N_Access_To_Subprogram_Definition
7517
7518 N_Access_Function_Definition,
7519 N_Access_Procedure_Definition,
7520
7521 -- N_Later_Decl_Item
7522
7523 N_Task_Type_Declaration,
7524
7525 -- N_Body_Stub, N_Later_Decl_Item
7526
7527 N_Package_Body_Stub,
7528 N_Protected_Body_Stub,
7529 N_Subprogram_Body_Stub,
7530 N_Task_Body_Stub,
7531
7532 -- N_Generic_Instantiation, N_Later_Decl_Item
7533 -- N_Subprogram_Instantiation
7534
7535 N_Function_Instantiation,
7536 N_Procedure_Instantiation,
7537
7538 -- N_Generic_Instantiation, N_Later_Decl_Item
7539
7540 N_Package_Instantiation,
7541
7542 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
7543
7544 N_Package_Body,
7545 N_Subprogram_Body,
7546
7547 -- N_Later_Decl_Item, N_Proper_Body
7548
7549 N_Protected_Body,
7550 N_Task_Body,
7551
7552 -- N_Later_Decl_Item
7553
7554 N_Implicit_Label_Declaration,
7555 N_Package_Declaration,
7556 N_Single_Task_Declaration,
7557 N_Subprogram_Declaration,
7558 N_Use_Package_Clause,
7559
7560 -- N_Generic_Declaration, N_Later_Decl_Item
7561
7562 N_Generic_Package_Declaration,
7563 N_Generic_Subprogram_Declaration,
7564
7565 -- N_Array_Type_Definition
7566
7567 N_Constrained_Array_Definition,
7568 N_Unconstrained_Array_Definition,
7569
7570 -- N_Renaming_Declaration
7571
7572 N_Exception_Renaming_Declaration,
7573 N_Object_Renaming_Declaration,
7574 N_Package_Renaming_Declaration,
7575 N_Subprogram_Renaming_Declaration,
7576
7577 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
7578
7579 N_Generic_Function_Renaming_Declaration,
7580 N_Generic_Package_Renaming_Declaration,
7581 N_Generic_Procedure_Renaming_Declaration,
7582
7583 -- N_Statement_Other_Than_Procedure_Call
7584
7585 N_Abort_Statement,
7586 N_Accept_Statement,
7587 N_Assignment_Statement,
7588 N_Asynchronous_Select,
7589 N_Block_Statement,
7590 N_Case_Statement,
7591 N_Code_Statement,
7592 N_Conditional_Entry_Call,
7593
7594 -- N_Statement_Other_Than_Procedure_Call. N_Delay_Statement
7595
7596 N_Delay_Relative_Statement,
7597 N_Delay_Until_Statement,
7598
7599 -- N_Statement_Other_Than_Procedure_Call
7600
7601 N_Entry_Call_Statement,
7602 N_Free_Statement,
7603 N_Goto_Statement,
7604 N_Loop_Statement,
7605 N_Null_Statement,
7606 N_Raise_Statement,
7607 N_Requeue_Statement,
7608 N_Return_Statement, -- renamed as N_Simple_Return_Statement below
7609 N_Extended_Return_Statement,
7610 N_Selective_Accept,
7611 N_Timed_Entry_Call,
7612
7613 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
7614
7615 N_Exit_Statement,
7616 N_If_Statement,
7617
7618 -- N_Has_Condition
7619
7620 N_Accept_Alternative,
7621 N_Delay_Alternative,
7622 N_Elsif_Part,
7623 N_Entry_Body_Formal_Part,
7624 N_Iteration_Scheme,
7625 N_Terminate_Alternative,
7626
7627 -- N_Formal_Subprogram_Declaration
7628
7629 N_Formal_Abstract_Subprogram_Declaration,
7630 N_Formal_Concrete_Subprogram_Declaration,
7631
7632 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
7633
7634 N_Push_Constraint_Error_Label,
7635 N_Push_Program_Error_Label,
7636 N_Push_Storage_Error_Label,
7637
7638 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
7639
7640 N_Pop_Constraint_Error_Label,
7641 N_Pop_Program_Error_Label,
7642 N_Pop_Storage_Error_Label,
7643
7644 -- SCIL nodes
7645
7646 N_SCIL_Dispatch_Table_Tag_Init,
7647 N_SCIL_Dispatching_Call,
7648 N_SCIL_Membership_Test,
7649
7650 -- Other nodes (not part of any subtype class)
7651
7652 N_Abortable_Part,
7653 N_Abstract_Subprogram_Declaration,
7654 N_Access_Definition,
7655 N_Access_To_Object_Definition,
7656 N_Aspect_Specification,
7657 N_Case_Expression_Alternative,
7658 N_Case_Statement_Alternative,
7659 N_Compilation_Unit,
7660 N_Compilation_Unit_Aux,
7661 N_Component_Association,
7662 N_Component_Definition,
7663 N_Component_List,
7664 N_Derived_Type_Definition,
7665 N_Decimal_Fixed_Point_Definition,
7666 N_Defining_Program_Unit_Name,
7667 N_Delta_Constraint,
7668 N_Designator,
7669 N_Digits_Constraint,
7670 N_Discriminant_Association,
7671 N_Discriminant_Specification,
7672 N_Enumeration_Type_Definition,
7673 N_Entry_Body,
7674 N_Entry_Call_Alternative,
7675 N_Entry_Index_Specification,
7676 N_Exception_Declaration,
7677 N_Exception_Handler,
7678 N_Floating_Point_Definition,
7679 N_Formal_Decimal_Fixed_Point_Definition,
7680 N_Formal_Derived_Type_Definition,
7681 N_Formal_Discrete_Type_Definition,
7682 N_Formal_Floating_Point_Definition,
7683 N_Formal_Modular_Type_Definition,
7684 N_Formal_Ordinary_Fixed_Point_Definition,
7685 N_Formal_Package_Declaration,
7686 N_Formal_Private_Type_Definition,
7687 N_Formal_Signed_Integer_Type_Definition,
7688 N_Freeze_Entity,
7689 N_Generic_Association,
7690 N_Handled_Sequence_Of_Statements,
7691 N_Index_Or_Discriminant_Constraint,
7692 N_Itype_Reference,
7693 N_Label,
7694 N_Modular_Type_Definition,
7695 N_Number_Declaration,
7696 N_Ordinary_Fixed_Point_Definition,
7697 N_Others_Choice,
7698 N_Package_Specification,
7699 N_Parameter_Association,
7700 N_Parameter_Specification,
7701 N_Pragma,
7702 N_Protected_Definition,
7703 N_Range_Constraint,
7704 N_Real_Range_Specification,
7705 N_Record_Definition,
7706 N_Signed_Integer_Type_Definition,
7707 N_Single_Protected_Declaration,
7708 N_Subunit,
7709 N_Task_Definition,
7710 N_Triggering_Alternative,
7711 N_Use_Type_Clause,
7712 N_Validate_Unchecked_Conversion,
7713 N_Variant,
7714 N_Variant_Part,
7715 N_With_Clause,
7716 N_Unused_At_End);
7717
7718 for Node_Kind'Size use 8;
7719 -- The data structures in Atree assume this!
7720
7721 ----------------------------
7722 -- Node Class Definitions --
7723 ----------------------------
7724
7725 subtype N_Access_To_Subprogram_Definition is Node_Kind range
7726 N_Access_Function_Definition ..
7727 N_Access_Procedure_Definition;
7728
7729 subtype N_Array_Type_Definition is Node_Kind range
7730 N_Constrained_Array_Definition ..
7731 N_Unconstrained_Array_Definition;
7732
7733 subtype N_Binary_Op is Node_Kind range
7734 N_Op_Add ..
7735 N_Op_Shift_Right_Arithmetic;
7736
7737 subtype N_Body_Stub is Node_Kind range
7738 N_Package_Body_Stub ..
7739 N_Task_Body_Stub;
7740
7741 subtype N_Declaration is Node_Kind range
7742 N_Component_Declaration ..
7743 N_Procedure_Specification;
7744 -- Note: this includes all constructs normally thought of as declarations
7745 -- except those which are separately grouped as later declarations.
7746
7747 subtype N_Delay_Statement is Node_Kind range
7748 N_Delay_Relative_Statement ..
7749 N_Delay_Until_Statement;
7750
7751 subtype N_Direct_Name is Node_Kind range
7752 N_Identifier ..
7753 N_Character_Literal;
7754
7755 subtype N_Entity is Node_Kind range
7756 N_Defining_Character_Literal ..
7757 N_Defining_Operator_Symbol;
7758
7759 subtype N_Formal_Subprogram_Declaration is Node_Kind range
7760 N_Formal_Abstract_Subprogram_Declaration ..
7761 N_Formal_Concrete_Subprogram_Declaration;
7762
7763 subtype N_Generic_Declaration is Node_Kind range
7764 N_Generic_Package_Declaration ..
7765 N_Generic_Subprogram_Declaration;
7766
7767 subtype N_Generic_Instantiation is Node_Kind range
7768 N_Function_Instantiation ..
7769 N_Package_Instantiation;
7770
7771 subtype N_Generic_Renaming_Declaration is Node_Kind range
7772 N_Generic_Function_Renaming_Declaration ..
7773 N_Generic_Procedure_Renaming_Declaration;
7774
7775 subtype N_Has_Chars is Node_Kind range
7776 N_Attribute_Definition_Clause ..
7777 N_Op_Plus;
7778
7779 subtype N_Has_Entity is Node_Kind range
7780 N_Expanded_Name ..
7781 N_Attribute_Reference;
7782 -- Nodes that have Entity fields
7783 -- Warning: DOES NOT INCLUDE N_Freeze_Entity, N_Aspect_Specification,
7784 -- or N_Attribute_Definition_Clause.
7785
7786 subtype N_Has_Etype is Node_Kind range
7787 N_Error ..
7788 N_Subtype_Indication;
7789
7790 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
7791 N_Op_Divide ..
7792 N_Op_Rem;
7793
7794 subtype N_Multiplying_Operator is Node_Kind range
7795 N_Op_Divide ..
7796 N_Op_Rem;
7797
7798 subtype N_Later_Decl_Item is Node_Kind range
7799 N_Task_Type_Declaration ..
7800 N_Generic_Subprogram_Declaration;
7801 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
7802 -- only those items which can appear as later declarative items. This also
7803 -- includes N_Implicit_Label_Declaration which is not specifically in the
7804 -- grammar but may appear as a valid later declarative items. It does NOT
7805 -- include N_Pragma which can also appear among later declarative items.
7806 -- It does however include N_Protected_Body, which is a bit peculiar, but
7807 -- harmless since this cannot appear in Ada 83 mode anyway.
7808
7809 subtype N_Membership_Test is Node_Kind range
7810 N_In ..
7811 N_Not_In;
7812
7813 subtype N_Op is Node_Kind range
7814 N_Op_Add ..
7815 N_Op_Plus;
7816
7817 subtype N_Op_Boolean is Node_Kind range
7818 N_Op_And ..
7819 N_Op_Xor;
7820 -- Binary operators which take operands of a boolean type, and yield
7821 -- a result of a boolean type.
7822
7823 subtype N_Op_Compare is Node_Kind range
7824 N_Op_Eq ..
7825 N_Op_Ne;
7826
7827 subtype N_Op_Shift is Node_Kind range
7828 N_Op_Rotate_Left ..
7829 N_Op_Shift_Right_Arithmetic;
7830
7831 subtype N_Proper_Body is Node_Kind range
7832 N_Package_Body ..
7833 N_Task_Body;
7834
7835 subtype N_Push_xxx_Label is Node_Kind range
7836 N_Push_Constraint_Error_Label ..
7837 N_Push_Storage_Error_Label;
7838
7839 subtype N_Pop_xxx_Label is Node_Kind range
7840 N_Pop_Constraint_Error_Label ..
7841 N_Pop_Storage_Error_Label;
7842
7843 subtype N_Push_Pop_xxx_Label is Node_Kind range
7844 N_Push_Constraint_Error_Label ..
7845 N_Pop_Storage_Error_Label;
7846
7847 subtype N_Raise_xxx_Error is Node_Kind range
7848 N_Raise_Constraint_Error ..
7849 N_Raise_Storage_Error;
7850
7851 subtype N_Renaming_Declaration is Node_Kind range
7852 N_Exception_Renaming_Declaration ..
7853 N_Generic_Procedure_Renaming_Declaration;
7854
7855 subtype N_Representation_Clause is Node_Kind range
7856 N_At_Clause ..
7857 N_Attribute_Definition_Clause;
7858
7859 subtype N_Short_Circuit is Node_Kind range
7860 N_And_Then ..
7861 N_Or_Else;
7862
7863 subtype N_SCIL_Node is Node_Kind range
7864 N_SCIL_Dispatch_Table_Tag_Init ..
7865 N_SCIL_Membership_Test;
7866
7867 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
7868 N_Abort_Statement ..
7869 N_If_Statement;
7870 -- Note that this includes all statement types except for the cases of the
7871 -- N_Procedure_Call_Statement which is considered to be a subexpression
7872 -- (since overloading is possible, so it needs to go through the normal
7873 -- overloading resolution for expressions).
7874
7875 subtype N_Subprogram_Instantiation is Node_Kind range
7876 N_Function_Instantiation ..
7877 N_Procedure_Instantiation;
7878
7879 subtype N_Has_Condition is Node_Kind range
7880 N_Exit_Statement ..
7881 N_Terminate_Alternative;
7882 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
7883
7884 subtype N_Subexpr is Node_Kind range
7885 N_Expanded_Name ..
7886 N_Unchecked_Type_Conversion;
7887 -- Nodes with expression fields
7888
7889 subtype N_Subprogram_Specification is Node_Kind range
7890 N_Function_Specification ..
7891 N_Procedure_Specification;
7892
7893 subtype N_Unary_Op is Node_Kind range
7894 N_Op_Abs ..
7895 N_Op_Plus;
7896
7897 subtype N_Unit_Body is Node_Kind range
7898 N_Package_Body ..
7899 N_Subprogram_Body;
7900
7901 ---------------------------
7902 -- Node Access Functions --
7903 ---------------------------
7904
7905 -- The following functions return the contents of the indicated field of
7906 -- the node referenced by the argument, which is a Node_Id. They provide
7907 -- logical access to fields in the node which could be accessed using the
7908 -- Atree.Unchecked_Access package, but the idea is always to use these
7909 -- higher level routines which preserve strong typing. In debug mode,
7910 -- these routines check that they are being applied to an appropriate
7911 -- node, as well as checking that the node is in range.
7912
7913 function ABE_Is_Certain
7914 (N : Node_Id) return Boolean; -- Flag18
7915
7916 function Abort_Present
7917 (N : Node_Id) return Boolean; -- Flag15
7918
7919 function Abortable_Part
7920 (N : Node_Id) return Node_Id; -- Node2
7921
7922 function Abstract_Present
7923 (N : Node_Id) return Boolean; -- Flag4
7924
7925 function Accept_Handler_Records
7926 (N : Node_Id) return List_Id; -- List5
7927
7928 function Accept_Statement
7929 (N : Node_Id) return Node_Id; -- Node2
7930
7931 function Access_Definition
7932 (N : Node_Id) return Node_Id; -- Node3
7933
7934 function Access_To_Subprogram_Definition
7935 (N : Node_Id) return Node_Id; -- Node3
7936
7937 function Access_Types_To_Process
7938 (N : Node_Id) return Elist_Id; -- Elist2
7939
7940 function Actions
7941 (N : Node_Id) return List_Id; -- List1
7942
7943 function Activation_Chain_Entity
7944 (N : Node_Id) return Node_Id; -- Node3
7945
7946 function Acts_As_Spec
7947 (N : Node_Id) return Boolean; -- Flag4
7948
7949 function Actual_Designated_Subtype
7950 (N : Node_Id) return Node_Id; -- Node4
7951
7952 function Address_Warning_Posted
7953 (N : Node_Id) return Boolean; -- Flag18
7954
7955 function Aggregate_Bounds
7956 (N : Node_Id) return Node_Id; -- Node3
7957
7958 function Aliased_Present
7959 (N : Node_Id) return Boolean; -- Flag4
7960
7961 function All_Others
7962 (N : Node_Id) return Boolean; -- Flag11
7963
7964 function All_Present
7965 (N : Node_Id) return Boolean; -- Flag15
7966
7967 function Alternatives
7968 (N : Node_Id) return List_Id; -- List4
7969
7970 function Ancestor_Part
7971 (N : Node_Id) return Node_Id; -- Node3
7972
7973 function Array_Aggregate
7974 (N : Node_Id) return Node_Id; -- Node3
7975
7976 function Aspect_Cancel
7977 (N : Node_Id) return Boolean; -- Flag11
7978
7979 function Aspect_Rep_Item
7980 (N : Node_Id) return Node_Id; -- Node2
7981
7982 function Assignment_OK
7983 (N : Node_Id) return Boolean; -- Flag15
7984
7985 function Associated_Node
7986 (N : Node_Id) return Node_Id; -- Node4
7987
7988 function At_End_Proc
7989 (N : Node_Id) return Node_Id; -- Node1
7990
7991 function Attribute_Name
7992 (N : Node_Id) return Name_Id; -- Name2
7993
7994 function Aux_Decls_Node
7995 (N : Node_Id) return Node_Id; -- Node5
7996
7997 function Backwards_OK
7998 (N : Node_Id) return Boolean; -- Flag6
7999
8000 function Bad_Is_Detected
8001 (N : Node_Id) return Boolean; -- Flag15
8002
8003 function By_Ref
8004 (N : Node_Id) return Boolean; -- Flag5
8005
8006 function Body_Required
8007 (N : Node_Id) return Boolean; -- Flag13
8008
8009 function Body_To_Inline
8010 (N : Node_Id) return Node_Id; -- Node3
8011
8012 function Box_Present
8013 (N : Node_Id) return Boolean; -- Flag15
8014
8015 function Char_Literal_Value
8016 (N : Node_Id) return Uint; -- Uint2
8017
8018 function Chars
8019 (N : Node_Id) return Name_Id; -- Name1
8020
8021 function Check_Address_Alignment
8022 (N : Node_Id) return Boolean; -- Flag11
8023
8024 function Choice_Parameter
8025 (N : Node_Id) return Node_Id; -- Node2
8026
8027 function Choices
8028 (N : Node_Id) return List_Id; -- List1
8029
8030 function Class_Present
8031 (N : Node_Id) return Boolean; -- Flag6
8032
8033 function Coextensions
8034 (N : Node_Id) return Elist_Id; -- Elist4
8035
8036 function Comes_From_Extended_Return_Statement
8037 (N : Node_Id) return Boolean; -- Flag18
8038
8039 function Compile_Time_Known_Aggregate
8040 (N : Node_Id) return Boolean; -- Flag18
8041
8042 function Component_Associations
8043 (N : Node_Id) return List_Id; -- List2
8044
8045 function Component_Clauses
8046 (N : Node_Id) return List_Id; -- List3
8047
8048 function Component_Definition
8049 (N : Node_Id) return Node_Id; -- Node4
8050
8051 function Component_Items
8052 (N : Node_Id) return List_Id; -- List3
8053
8054 function Component_List
8055 (N : Node_Id) return Node_Id; -- Node1
8056
8057 function Component_Name
8058 (N : Node_Id) return Node_Id; -- Node1
8059
8060 function Componentwise_Assignment
8061 (N : Node_Id) return Boolean; -- Flag14
8062
8063 function Condition
8064 (N : Node_Id) return Node_Id; -- Node1
8065
8066 function Condition_Actions
8067 (N : Node_Id) return List_Id; -- List3
8068
8069 function Config_Pragmas
8070 (N : Node_Id) return List_Id; -- List4
8071
8072 function Constant_Present
8073 (N : Node_Id) return Boolean; -- Flag17
8074
8075 function Constraint
8076 (N : Node_Id) return Node_Id; -- Node3
8077
8078 function Constraints
8079 (N : Node_Id) return List_Id; -- List1
8080
8081 function Context_Installed
8082 (N : Node_Id) return Boolean; -- Flag13
8083
8084 function Context_Pending
8085 (N : Node_Id) return Boolean; -- Flag16
8086
8087 function Context_Items
8088 (N : Node_Id) return List_Id; -- List1
8089
8090 function Controlling_Argument
8091 (N : Node_Id) return Node_Id; -- Node1
8092
8093 function Conversion_OK
8094 (N : Node_Id) return Boolean; -- Flag14
8095
8096 function Corresponding_Body
8097 (N : Node_Id) return Node_Id; -- Node5
8098
8099 function Corresponding_Formal_Spec
8100 (N : Node_Id) return Node_Id; -- Node3
8101
8102 function Corresponding_Generic_Association
8103 (N : Node_Id) return Node_Id; -- Node5
8104
8105 function Corresponding_Integer_Value
8106 (N : Node_Id) return Uint; -- Uint4
8107
8108 function Corresponding_Spec
8109 (N : Node_Id) return Node_Id; -- Node5
8110
8111 function Corresponding_Stub
8112 (N : Node_Id) return Node_Id; -- Node3
8113
8114 function Dcheck_Function
8115 (N : Node_Id) return Entity_Id; -- Node5
8116
8117 function Debug_Statement
8118 (N : Node_Id) return Node_Id; -- Node3
8119
8120 function Declarations
8121 (N : Node_Id) return List_Id; -- List2
8122
8123 function Default_Expression
8124 (N : Node_Id) return Node_Id; -- Node5
8125
8126 function Default_Storage_Pool
8127 (N : Node_Id) return Node_Id; -- Node3
8128
8129 function Default_Name
8130 (N : Node_Id) return Node_Id; -- Node2
8131
8132 function Defining_Identifier
8133 (N : Node_Id) return Entity_Id; -- Node1
8134
8135 function Defining_Unit_Name
8136 (N : Node_Id) return Node_Id; -- Node1
8137
8138 function Delay_Alternative
8139 (N : Node_Id) return Node_Id; -- Node4
8140
8141 function Delay_Statement
8142 (N : Node_Id) return Node_Id; -- Node2
8143
8144 function Delta_Expression
8145 (N : Node_Id) return Node_Id; -- Node3
8146
8147 function Digits_Expression
8148 (N : Node_Id) return Node_Id; -- Node2
8149
8150 function Discr_Check_Funcs_Built
8151 (N : Node_Id) return Boolean; -- Flag11
8152
8153 function Discrete_Choices
8154 (N : Node_Id) return List_Id; -- List4
8155
8156 function Discrete_Range
8157 (N : Node_Id) return Node_Id; -- Node4
8158
8159 function Discrete_Subtype_Definition
8160 (N : Node_Id) return Node_Id; -- Node4
8161
8162 function Discrete_Subtype_Definitions
8163 (N : Node_Id) return List_Id; -- List2
8164
8165 function Discriminant_Specifications
8166 (N : Node_Id) return List_Id; -- List4
8167
8168 function Discriminant_Type
8169 (N : Node_Id) return Node_Id; -- Node5
8170
8171 function Do_Accessibility_Check
8172 (N : Node_Id) return Boolean; -- Flag13
8173
8174 function Do_Discriminant_Check
8175 (N : Node_Id) return Boolean; -- Flag13
8176
8177 function Do_Division_Check
8178 (N : Node_Id) return Boolean; -- Flag13
8179
8180 function Do_Length_Check
8181 (N : Node_Id) return Boolean; -- Flag4
8182
8183 function Do_Overflow_Check
8184 (N : Node_Id) return Boolean; -- Flag17
8185
8186 function Do_Range_Check
8187 (N : Node_Id) return Boolean; -- Flag9
8188
8189 function Do_Storage_Check
8190 (N : Node_Id) return Boolean; -- Flag17
8191
8192 function Do_Tag_Check
8193 (N : Node_Id) return Boolean; -- Flag13
8194
8195 function Elaborate_All_Desirable
8196 (N : Node_Id) return Boolean; -- Flag9
8197
8198 function Elaborate_All_Present
8199 (N : Node_Id) return Boolean; -- Flag14
8200
8201 function Elaborate_Desirable
8202 (N : Node_Id) return Boolean; -- Flag11
8203
8204 function Elaborate_Present
8205 (N : Node_Id) return Boolean; -- Flag4
8206
8207 function Elaboration_Boolean
8208 (N : Node_Id) return Node_Id; -- Node2
8209
8210 function Else_Actions
8211 (N : Node_Id) return List_Id; -- List3
8212
8213 function Else_Statements
8214 (N : Node_Id) return List_Id; -- List4
8215
8216 function Elsif_Parts
8217 (N : Node_Id) return List_Id; -- List3
8218
8219 function Enclosing_Variant
8220 (N : Node_Id) return Node_Id; -- Node2
8221
8222 function End_Label
8223 (N : Node_Id) return Node_Id; -- Node4
8224
8225 function End_Span
8226 (N : Node_Id) return Uint; -- Uint5
8227
8228 function Entity
8229 (N : Node_Id) return Node_Id; -- Node4
8230
8231 function Entity_Or_Associated_Node
8232 (N : Node_Id) return Node_Id; -- Node4
8233
8234 function Entry_Body_Formal_Part
8235 (N : Node_Id) return Node_Id; -- Node5
8236
8237 function Entry_Call_Alternative
8238 (N : Node_Id) return Node_Id; -- Node1
8239
8240 function Entry_Call_Statement
8241 (N : Node_Id) return Node_Id; -- Node1
8242
8243 function Entry_Direct_Name
8244 (N : Node_Id) return Node_Id; -- Node1
8245
8246 function Entry_Index
8247 (N : Node_Id) return Node_Id; -- Node5
8248
8249 function Entry_Index_Specification
8250 (N : Node_Id) return Node_Id; -- Node4
8251
8252 function Etype
8253 (N : Node_Id) return Node_Id; -- Node5
8254
8255 function Exception_Choices
8256 (N : Node_Id) return List_Id; -- List4
8257
8258 function Exception_Handlers
8259 (N : Node_Id) return List_Id; -- List5
8260
8261 function Exception_Junk
8262 (N : Node_Id) return Boolean; -- Flag8
8263
8264 function Exception_Label
8265 (N : Node_Id) return Node_Id; -- Node5
8266
8267 function Explicit_Actual_Parameter
8268 (N : Node_Id) return Node_Id; -- Node3
8269
8270 function Expansion_Delayed
8271 (N : Node_Id) return Boolean; -- Flag11
8272
8273 function Explicit_Generic_Actual_Parameter
8274 (N : Node_Id) return Node_Id; -- Node1
8275
8276 function Expression
8277 (N : Node_Id) return Node_Id; -- Node3
8278
8279 function Expressions
8280 (N : Node_Id) return List_Id; -- List1
8281
8282 function First_Bit
8283 (N : Node_Id) return Node_Id; -- Node3
8284
8285 function First_Inlined_Subprogram
8286 (N : Node_Id) return Entity_Id; -- Node3
8287
8288 function First_Name
8289 (N : Node_Id) return Boolean; -- Flag5
8290
8291 function First_Named_Actual
8292 (N : Node_Id) return Node_Id; -- Node4
8293
8294 function First_Real_Statement
8295 (N : Node_Id) return Node_Id; -- Node2
8296
8297 function First_Subtype_Link
8298 (N : Node_Id) return Entity_Id; -- Node5
8299
8300 function Float_Truncate
8301 (N : Node_Id) return Boolean; -- Flag11
8302
8303 function Formal_Type_Definition
8304 (N : Node_Id) return Node_Id; -- Node3
8305
8306 function Forwards_OK
8307 (N : Node_Id) return Boolean; -- Flag5
8308
8309 function From_Aspect_Specification
8310 (N : Node_Id) return Boolean; -- Flag13
8311
8312 function From_At_End
8313 (N : Node_Id) return Boolean; -- Flag4
8314
8315 function From_At_Mod
8316 (N : Node_Id) return Boolean; -- Flag4
8317
8318 function From_Default
8319 (N : Node_Id) return Boolean; -- Flag6
8320
8321 function Generic_Associations
8322 (N : Node_Id) return List_Id; -- List3
8323
8324 function Generic_Formal_Declarations
8325 (N : Node_Id) return List_Id; -- List2
8326
8327 function Generic_Parent
8328 (N : Node_Id) return Node_Id; -- Node5
8329
8330 function Generic_Parent_Type
8331 (N : Node_Id) return Node_Id; -- Node4
8332
8333 function Handled_Statement_Sequence
8334 (N : Node_Id) return Node_Id; -- Node4
8335
8336 function Handler_List_Entry
8337 (N : Node_Id) return Node_Id; -- Node2
8338
8339 function Has_Created_Identifier
8340 (N : Node_Id) return Boolean; -- Flag15
8341
8342 function Has_Dynamic_Length_Check
8343 (N : Node_Id) return Boolean; -- Flag10
8344
8345 function Has_Dynamic_Range_Check
8346 (N : Node_Id) return Boolean; -- Flag12
8347
8348 function Has_Init_Expression
8349 (N : Node_Id) return Boolean; -- Flag14
8350
8351 function Has_Local_Raise
8352 (N : Node_Id) return Boolean; -- Flag8
8353
8354 function Has_No_Elaboration_Code
8355 (N : Node_Id) return Boolean; -- Flag17
8356
8357 function Has_Pragma_CPU
8358 (N : Node_Id) return Boolean; -- Flag14
8359
8360 function Has_Pragma_Priority
8361 (N : Node_Id) return Boolean; -- Flag6
8362
8363 function Has_Pragma_Suppress_All
8364 (N : Node_Id) return Boolean; -- Flag14
8365
8366 function Has_Private_View
8367 (N : Node_Id) return Boolean; -- Flag11
8368
8369 function Has_Relative_Deadline_Pragma
8370 (N : Node_Id) return Boolean; -- Flag9
8371
8372 function Has_Self_Reference
8373 (N : Node_Id) return Boolean; -- Flag13
8374
8375 function Has_Storage_Size_Pragma
8376 (N : Node_Id) return Boolean; -- Flag5
8377
8378 function Has_Task_Info_Pragma
8379 (N : Node_Id) return Boolean; -- Flag7
8380
8381 function Has_Task_Name_Pragma
8382 (N : Node_Id) return Boolean; -- Flag8
8383
8384 function Has_Wide_Character
8385 (N : Node_Id) return Boolean; -- Flag11
8386
8387 function Has_Wide_Wide_Character
8388 (N : Node_Id) return Boolean; -- Flag13
8389
8390 function Hidden_By_Use_Clause
8391 (N : Node_Id) return Elist_Id; -- Elist4
8392
8393 function High_Bound
8394 (N : Node_Id) return Node_Id; -- Node2
8395
8396 function Identifier
8397 (N : Node_Id) return Node_Id; -- Node1
8398
8399 function Interface_List
8400 (N : Node_Id) return List_Id; -- List2
8401
8402 function Interface_Present
8403 (N : Node_Id) return Boolean; -- Flag16
8404
8405 function Implicit_With
8406 (N : Node_Id) return Boolean; -- Flag16
8407
8408 function Import_Interface_Present
8409 (N : Node_Id) return Boolean; -- Flag16
8410
8411 function In_Present
8412 (N : Node_Id) return Boolean; -- Flag15
8413
8414 function Includes_Infinities
8415 (N : Node_Id) return Boolean; -- Flag11
8416
8417 function Inherited_Discriminant
8418 (N : Node_Id) return Boolean; -- Flag13
8419
8420 function Instance_Spec
8421 (N : Node_Id) return Node_Id; -- Node5
8422
8423 function Intval
8424 (N : Node_Id) return Uint; -- Uint3
8425
8426 function Is_Accessibility_Actual
8427 (N : Node_Id) return Boolean; -- Flag13
8428
8429 function Is_Asynchronous_Call_Block
8430 (N : Node_Id) return Boolean; -- Flag7
8431
8432 function Is_Component_Left_Opnd
8433 (N : Node_Id) return Boolean; -- Flag13
8434
8435 function Is_Component_Right_Opnd
8436 (N : Node_Id) return Boolean; -- Flag14
8437
8438 function Is_Controlling_Actual
8439 (N : Node_Id) return Boolean; -- Flag16
8440
8441 function Is_Delayed_Aspect
8442 (N : Node_Id) return Boolean; -- Flag14
8443
8444 function Is_Dynamic_Coextension
8445 (N : Node_Id) return Boolean; -- Flag18
8446
8447 function Is_Elsif
8448 (N : Node_Id) return Boolean; -- Flag13
8449
8450 function Is_Entry_Barrier_Function
8451 (N : Node_Id) return Boolean; -- Flag8
8452
8453 function Is_Expanded_Build_In_Place_Call
8454 (N : Node_Id) return Boolean; -- Flag11
8455
8456 function Is_Folded_In_Parser
8457 (N : Node_Id) return Boolean; -- Flag4
8458
8459 function Is_In_Discriminant_Check
8460 (N : Node_Id) return Boolean; -- Flag11
8461
8462 function Is_Machine_Number
8463 (N : Node_Id) return Boolean; -- Flag11
8464
8465 function Is_Null_Loop
8466 (N : Node_Id) return Boolean; -- Flag16
8467
8468 function Is_Overloaded
8469 (N : Node_Id) return Boolean; -- Flag5
8470
8471 function Is_Power_Of_2_For_Shift
8472 (N : Node_Id) return Boolean; -- Flag13
8473
8474 function Is_Protected_Subprogram_Body
8475 (N : Node_Id) return Boolean; -- Flag7
8476
8477 function Is_Static_Coextension
8478 (N : Node_Id) return Boolean; -- Flag14
8479
8480 function Is_Static_Expression
8481 (N : Node_Id) return Boolean; -- Flag6
8482
8483 function Is_Subprogram_Descriptor
8484 (N : Node_Id) return Boolean; -- Flag16
8485
8486 function Is_Task_Allocation_Block
8487 (N : Node_Id) return Boolean; -- Flag6
8488
8489 function Is_Task_Master
8490 (N : Node_Id) return Boolean; -- Flag5
8491
8492 function Iteration_Scheme
8493 (N : Node_Id) return Node_Id; -- Node2
8494
8495 function Itype
8496 (N : Node_Id) return Entity_Id; -- Node1
8497
8498 function Kill_Range_Check
8499 (N : Node_Id) return Boolean; -- Flag11
8500
8501 function Label_Construct
8502 (N : Node_Id) return Node_Id; -- Node2
8503
8504 function Left_Opnd
8505 (N : Node_Id) return Node_Id; -- Node2
8506
8507 function Last_Bit
8508 (N : Node_Id) return Node_Id; -- Node4
8509
8510 function Last_Name
8511 (N : Node_Id) return Boolean; -- Flag6
8512
8513 function Library_Unit
8514 (N : Node_Id) return Node_Id; -- Node4
8515
8516 function Limited_View_Installed
8517 (N : Node_Id) return Boolean; -- Flag18
8518
8519 function Limited_Present
8520 (N : Node_Id) return Boolean; -- Flag17
8521
8522 function Literals
8523 (N : Node_Id) return List_Id; -- List1
8524
8525 function Local_Raise_Not_OK
8526 (N : Node_Id) return Boolean; -- Flag7
8527
8528 function Local_Raise_Statements
8529 (N : Node_Id) return Elist_Id; -- Elist1
8530
8531 function Loop_Actions
8532 (N : Node_Id) return List_Id; -- List2
8533
8534 function Loop_Parameter_Specification
8535 (N : Node_Id) return Node_Id; -- Node4
8536
8537 function Low_Bound
8538 (N : Node_Id) return Node_Id; -- Node1
8539
8540 function Mod_Clause
8541 (N : Node_Id) return Node_Id; -- Node2
8542
8543 function More_Ids
8544 (N : Node_Id) return Boolean; -- Flag5
8545
8546 function Must_Be_Byte_Aligned
8547 (N : Node_Id) return Boolean; -- Flag14
8548
8549 function Must_Not_Freeze
8550 (N : Node_Id) return Boolean; -- Flag8
8551
8552 function Must_Not_Override
8553 (N : Node_Id) return Boolean; -- Flag15
8554
8555 function Must_Override
8556 (N : Node_Id) return Boolean; -- Flag14
8557
8558 function Name
8559 (N : Node_Id) return Node_Id; -- Node2
8560
8561 function Names
8562 (N : Node_Id) return List_Id; -- List2
8563
8564 function Next_Entity
8565 (N : Node_Id) return Node_Id; -- Node2
8566
8567 function Next_Exit_Statement
8568 (N : Node_Id) return Node_Id; -- Node3
8569
8570 function Next_Implicit_With
8571 (N : Node_Id) return Node_Id; -- Node3
8572
8573 function Next_Named_Actual
8574 (N : Node_Id) return Node_Id; -- Node4
8575
8576 function Next_Pragma
8577 (N : Node_Id) return Node_Id; -- Node1
8578
8579 function Next_Rep_Item
8580 (N : Node_Id) return Node_Id; -- Node5
8581
8582 function Next_Use_Clause
8583 (N : Node_Id) return Node_Id; -- Node3
8584
8585 function No_Ctrl_Actions
8586 (N : Node_Id) return Boolean; -- Flag7
8587
8588 function No_Elaboration_Check
8589 (N : Node_Id) return Boolean; -- Flag14
8590
8591 function No_Entities_Ref_In_Spec
8592 (N : Node_Id) return Boolean; -- Flag8
8593
8594 function No_Initialization
8595 (N : Node_Id) return Boolean; -- Flag13
8596
8597 function No_Truncation
8598 (N : Node_Id) return Boolean; -- Flag17
8599
8600 function Null_Present
8601 (N : Node_Id) return Boolean; -- Flag13
8602
8603 function Null_Exclusion_Present
8604 (N : Node_Id) return Boolean; -- Flag11
8605
8606 function Null_Exclusion_In_Return_Present
8607 (N : Node_Id) return Boolean; -- Flag14
8608
8609 function Null_Record_Present
8610 (N : Node_Id) return Boolean; -- Flag17
8611
8612 function Object_Definition
8613 (N : Node_Id) return Node_Id; -- Node4
8614
8615 function Original_Discriminant
8616 (N : Node_Id) return Node_Id; -- Node2
8617
8618 function Original_Entity
8619 (N : Node_Id) return Entity_Id; -- Node2
8620
8621 function Others_Discrete_Choices
8622 (N : Node_Id) return List_Id; -- List1
8623
8624 function Out_Present
8625 (N : Node_Id) return Boolean; -- Flag17
8626
8627 function Parameter_Associations
8628 (N : Node_Id) return List_Id; -- List3
8629
8630 function Parameter_List_Truncated
8631 (N : Node_Id) return Boolean; -- Flag17
8632
8633 function Parameter_Specifications
8634 (N : Node_Id) return List_Id; -- List3
8635
8636 function Parameter_Type
8637 (N : Node_Id) return Node_Id; -- Node2
8638
8639 function Parent_Spec
8640 (N : Node_Id) return Node_Id; -- Node4
8641
8642 function Position
8643 (N : Node_Id) return Node_Id; -- Node2
8644
8645 function Pragma_Argument_Associations
8646 (N : Node_Id) return List_Id; -- List2
8647
8648 function Pragma_Enabled
8649 (N : Node_Id) return Boolean; -- Flag5
8650
8651 function Pragma_Identifier
8652 (N : Node_Id) return Node_Id; -- Node4
8653
8654 function Pragmas_After
8655 (N : Node_Id) return List_Id; -- List5
8656
8657 function Pragmas_Before
8658 (N : Node_Id) return List_Id; -- List4
8659
8660 function Prefix
8661 (N : Node_Id) return Node_Id; -- Node3
8662
8663 function Present_Expr
8664 (N : Node_Id) return Uint; -- Uint3
8665
8666 function Prev_Ids
8667 (N : Node_Id) return Boolean; -- Flag6
8668
8669 function Print_In_Hex
8670 (N : Node_Id) return Boolean; -- Flag13
8671
8672 function Private_Declarations
8673 (N : Node_Id) return List_Id; -- List3
8674
8675 function Private_Present
8676 (N : Node_Id) return Boolean; -- Flag15
8677
8678 function Procedure_To_Call
8679 (N : Node_Id) return Node_Id; -- Node2
8680
8681 function Proper_Body
8682 (N : Node_Id) return Node_Id; -- Node1
8683
8684 function Protected_Definition
8685 (N : Node_Id) return Node_Id; -- Node3
8686
8687 function Protected_Present
8688 (N : Node_Id) return Boolean; -- Flag6
8689
8690 function Raises_Constraint_Error
8691 (N : Node_Id) return Boolean; -- Flag7
8692
8693 function Range_Constraint
8694 (N : Node_Id) return Node_Id; -- Node4
8695
8696 function Range_Expression
8697 (N : Node_Id) return Node_Id; -- Node4
8698
8699 function Real_Range_Specification
8700 (N : Node_Id) return Node_Id; -- Node4
8701
8702 function Realval
8703 (N : Node_Id) return Ureal; -- Ureal3
8704
8705 function Reason
8706 (N : Node_Id) return Uint; -- Uint3
8707
8708 function Record_Extension_Part
8709 (N : Node_Id) return Node_Id; -- Node3
8710
8711 function Redundant_Use
8712 (N : Node_Id) return Boolean; -- Flag13
8713
8714 function Renaming_Exception
8715 (N : Node_Id) return Node_Id; -- Node2
8716
8717 function Result_Definition
8718 (N : Node_Id) return Node_Id; -- Node4
8719
8720 function Return_Object_Declarations
8721 (N : Node_Id) return List_Id; -- List3
8722
8723 function Return_Statement_Entity
8724 (N : Node_Id) return Node_Id; -- Node5
8725
8726 function Reverse_Present
8727 (N : Node_Id) return Boolean; -- Flag15
8728
8729 function Right_Opnd
8730 (N : Node_Id) return Node_Id; -- Node3
8731
8732 function Rounded_Result
8733 (N : Node_Id) return Boolean; -- Flag18
8734
8735 function SCIL_Controlling_Tag
8736 (N : Node_Id) return Node_Id; -- Node5
8737
8738 function SCIL_Entity
8739 (N : Node_Id) return Node_Id; -- Node4
8740
8741 function SCIL_Tag_Value
8742 (N : Node_Id) return Node_Id; -- Node5
8743
8744 function SCIL_Target_Prim
8745 (N : Node_Id) return Node_Id; -- Node2
8746
8747 function Scope
8748 (N : Node_Id) return Node_Id; -- Node3
8749
8750 function Select_Alternatives
8751 (N : Node_Id) return List_Id; -- List1
8752
8753 function Selector_Name
8754 (N : Node_Id) return Node_Id; -- Node2
8755
8756 function Selector_Names
8757 (N : Node_Id) return List_Id; -- List1
8758
8759 function Shift_Count_OK
8760 (N : Node_Id) return Boolean; -- Flag4
8761
8762 function Source_Type
8763 (N : Node_Id) return Entity_Id; -- Node1
8764
8765 function Specification
8766 (N : Node_Id) return Node_Id; -- Node1
8767
8768 function Split_PPC
8769 (N : Node_Id) return Boolean; -- Flag17
8770
8771 function Statements
8772 (N : Node_Id) return List_Id; -- List3
8773
8774 function Static_Processing_OK
8775 (N : Node_Id) return Boolean; -- Flag4
8776
8777 function Storage_Pool
8778 (N : Node_Id) return Node_Id; -- Node1
8779
8780 function Strval
8781 (N : Node_Id) return String_Id; -- Str3
8782
8783 function Subtype_Indication
8784 (N : Node_Id) return Node_Id; -- Node5
8785
8786 function Subtype_Mark
8787 (N : Node_Id) return Node_Id; -- Node4
8788
8789 function Subtype_Marks
8790 (N : Node_Id) return List_Id; -- List2
8791
8792 function Suppress_Loop_Warnings
8793 (N : Node_Id) return Boolean; -- Flag17
8794
8795 function Synchronized_Present
8796 (N : Node_Id) return Boolean; -- Flag7
8797
8798 function Tagged_Present
8799 (N : Node_Id) return Boolean; -- Flag15
8800
8801 function Target_Type
8802 (N : Node_Id) return Entity_Id; -- Node2
8803
8804 function Task_Definition
8805 (N : Node_Id) return Node_Id; -- Node3
8806
8807 function Task_Present
8808 (N : Node_Id) return Boolean; -- Flag5
8809
8810 function Then_Actions
8811 (N : Node_Id) return List_Id; -- List2
8812
8813 function Then_Statements
8814 (N : Node_Id) return List_Id; -- List2
8815
8816 function Treat_Fixed_As_Integer
8817 (N : Node_Id) return Boolean; -- Flag14
8818
8819 function Triggering_Alternative
8820 (N : Node_Id) return Node_Id; -- Node1
8821
8822 function Triggering_Statement
8823 (N : Node_Id) return Node_Id; -- Node1
8824
8825 function TSS_Elist
8826 (N : Node_Id) return Elist_Id; -- Elist3
8827
8828 function Type_Definition
8829 (N : Node_Id) return Node_Id; -- Node3
8830
8831 function Unit
8832 (N : Node_Id) return Node_Id; -- Node2
8833
8834 function Unknown_Discriminants_Present
8835 (N : Node_Id) return Boolean; -- Flag13
8836
8837 function Unreferenced_In_Spec
8838 (N : Node_Id) return Boolean; -- Flag7
8839
8840 function Variant_Part
8841 (N : Node_Id) return Node_Id; -- Node4
8842
8843 function Variants
8844 (N : Node_Id) return List_Id; -- List1
8845
8846 function Visible_Declarations
8847 (N : Node_Id) return List_Id; -- List2
8848
8849 function Was_Originally_Stub
8850 (N : Node_Id) return Boolean; -- Flag13
8851
8852 function Withed_Body
8853 (N : Node_Id) return Node_Id; -- Node1
8854
8855 function Zero_Cost_Handling
8856 (N : Node_Id) return Boolean; -- Flag5
8857
8858 -- End functions (note used by xsinfo utility program to end processing)
8859
8860 ----------------------------
8861 -- Node Update Procedures --
8862 ----------------------------
8863
8864 -- These are the corresponding node update routines, which again provide
8865 -- a high level logical access with type checking. In addition to setting
8866 -- the indicated field of the node N to the given Val, in the case of
8867 -- tree pointers (List1-4), the parent pointer of the Val node is set to
8868 -- point back to node N. This automates the setting of the parent pointer.
8869
8870 procedure Set_ABE_Is_Certain
8871 (N : Node_Id; Val : Boolean := True); -- Flag18
8872
8873 procedure Set_Abort_Present
8874 (N : Node_Id; Val : Boolean := True); -- Flag15
8875
8876 procedure Set_Abortable_Part
8877 (N : Node_Id; Val : Node_Id); -- Node2
8878
8879 procedure Set_Abstract_Present
8880 (N : Node_Id; Val : Boolean := True); -- Flag4
8881
8882 procedure Set_Accept_Handler_Records
8883 (N : Node_Id; Val : List_Id); -- List5
8884
8885 procedure Set_Accept_Statement
8886 (N : Node_Id; Val : Node_Id); -- Node2
8887
8888 procedure Set_Access_Definition
8889 (N : Node_Id; Val : Node_Id); -- Node3
8890
8891 procedure Set_Access_To_Subprogram_Definition
8892 (N : Node_Id; Val : Node_Id); -- Node3
8893
8894 procedure Set_Access_Types_To_Process
8895 (N : Node_Id; Val : Elist_Id); -- Elist2
8896
8897 procedure Set_Actions
8898 (N : Node_Id; Val : List_Id); -- List1
8899
8900 procedure Set_Activation_Chain_Entity
8901 (N : Node_Id; Val : Node_Id); -- Node3
8902
8903 procedure Set_Acts_As_Spec
8904 (N : Node_Id; Val : Boolean := True); -- Flag4
8905
8906 procedure Set_Actual_Designated_Subtype
8907 (N : Node_Id; Val : Node_Id); -- Node4
8908
8909 procedure Set_Address_Warning_Posted
8910 (N : Node_Id; Val : Boolean := True); -- Flag18
8911
8912 procedure Set_Aggregate_Bounds
8913 (N : Node_Id; Val : Node_Id); -- Node3
8914
8915 procedure Set_Aliased_Present
8916 (N : Node_Id; Val : Boolean := True); -- Flag4
8917
8918 procedure Set_All_Others
8919 (N : Node_Id; Val : Boolean := True); -- Flag11
8920
8921 procedure Set_All_Present
8922 (N : Node_Id; Val : Boolean := True); -- Flag15
8923
8924 procedure Set_Alternatives
8925 (N : Node_Id; Val : List_Id); -- List4
8926
8927 procedure Set_Ancestor_Part
8928 (N : Node_Id; Val : Node_Id); -- Node3
8929
8930 procedure Set_Array_Aggregate
8931 (N : Node_Id; Val : Node_Id); -- Node3
8932
8933 procedure Set_Aspect_Cancel
8934 (N : Node_Id; Val : Boolean := True); -- Flag11
8935
8936 procedure Set_Aspect_Rep_Item
8937 (N : Node_Id; Val : Node_Id); -- Node2
8938
8939 procedure Set_Assignment_OK
8940 (N : Node_Id; Val : Boolean := True); -- Flag15
8941
8942 procedure Set_Associated_Node
8943 (N : Node_Id; Val : Node_Id); -- Node4
8944
8945 procedure Set_Attribute_Name
8946 (N : Node_Id; Val : Name_Id); -- Name2
8947
8948 procedure Set_At_End_Proc
8949 (N : Node_Id; Val : Node_Id); -- Node1
8950
8951 procedure Set_Aux_Decls_Node
8952 (N : Node_Id; Val : Node_Id); -- Node5
8953
8954 procedure Set_Backwards_OK
8955 (N : Node_Id; Val : Boolean := True); -- Flag6
8956
8957 procedure Set_Bad_Is_Detected
8958 (N : Node_Id; Val : Boolean := True); -- Flag15
8959
8960 procedure Set_Body_Required
8961 (N : Node_Id; Val : Boolean := True); -- Flag13
8962
8963 procedure Set_Body_To_Inline
8964 (N : Node_Id; Val : Node_Id); -- Node3
8965
8966 procedure Set_Box_Present
8967 (N : Node_Id; Val : Boolean := True); -- Flag15
8968
8969 procedure Set_By_Ref
8970 (N : Node_Id; Val : Boolean := True); -- Flag5
8971
8972 procedure Set_Char_Literal_Value
8973 (N : Node_Id; Val : Uint); -- Uint2
8974
8975 procedure Set_Chars
8976 (N : Node_Id; Val : Name_Id); -- Name1
8977
8978 procedure Set_Check_Address_Alignment
8979 (N : Node_Id; Val : Boolean := True); -- Flag11
8980
8981 procedure Set_Choice_Parameter
8982 (N : Node_Id; Val : Node_Id); -- Node2
8983
8984 procedure Set_Choices
8985 (N : Node_Id; Val : List_Id); -- List1
8986
8987 procedure Set_Class_Present
8988 (N : Node_Id; Val : Boolean := True); -- Flag6
8989
8990 procedure Set_Coextensions
8991 (N : Node_Id; Val : Elist_Id); -- Elist4
8992
8993 procedure Set_Comes_From_Extended_Return_Statement
8994 (N : Node_Id; Val : Boolean := True); -- Flag18
8995
8996 procedure Set_Compile_Time_Known_Aggregate
8997 (N : Node_Id; Val : Boolean := True); -- Flag18
8998
8999 procedure Set_Component_Associations
9000 (N : Node_Id; Val : List_Id); -- List2
9001
9002 procedure Set_Component_Clauses
9003 (N : Node_Id; Val : List_Id); -- List3
9004
9005 procedure Set_Component_Definition
9006 (N : Node_Id; Val : Node_Id); -- Node4
9007
9008 procedure Set_Component_Items
9009 (N : Node_Id; Val : List_Id); -- List3
9010
9011 procedure Set_Component_List
9012 (N : Node_Id; Val : Node_Id); -- Node1
9013
9014 procedure Set_Component_Name
9015 (N : Node_Id; Val : Node_Id); -- Node1
9016
9017 procedure Set_Componentwise_Assignment
9018 (N : Node_Id; Val : Boolean := True); -- Flag14
9019
9020 procedure Set_Condition
9021 (N : Node_Id; Val : Node_Id); -- Node1
9022
9023 procedure Set_Condition_Actions
9024 (N : Node_Id; Val : List_Id); -- List3
9025
9026 procedure Set_Config_Pragmas
9027 (N : Node_Id; Val : List_Id); -- List4
9028
9029 procedure Set_Constant_Present
9030 (N : Node_Id; Val : Boolean := True); -- Flag17
9031
9032 procedure Set_Constraint
9033 (N : Node_Id; Val : Node_Id); -- Node3
9034
9035 procedure Set_Constraints
9036 (N : Node_Id; Val : List_Id); -- List1
9037
9038 procedure Set_Context_Installed
9039 (N : Node_Id; Val : Boolean := True); -- Flag13
9040
9041 procedure Set_Context_Items
9042 (N : Node_Id; Val : List_Id); -- List1
9043
9044 procedure Set_Context_Pending
9045 (N : Node_Id; Val : Boolean := True); -- Flag16
9046
9047 procedure Set_Controlling_Argument
9048 (N : Node_Id; Val : Node_Id); -- Node1
9049
9050 procedure Set_Conversion_OK
9051 (N : Node_Id; Val : Boolean := True); -- Flag14
9052
9053 procedure Set_Corresponding_Body
9054 (N : Node_Id; Val : Node_Id); -- Node5
9055
9056 procedure Set_Corresponding_Formal_Spec
9057 (N : Node_Id; Val : Node_Id); -- Node3
9058
9059 procedure Set_Corresponding_Generic_Association
9060 (N : Node_Id; Val : Node_Id); -- Node5
9061
9062 procedure Set_Corresponding_Integer_Value
9063 (N : Node_Id; Val : Uint); -- Uint4
9064
9065 procedure Set_Corresponding_Spec
9066 (N : Node_Id; Val : Node_Id); -- Node5
9067
9068 procedure Set_Corresponding_Stub
9069 (N : Node_Id; Val : Node_Id); -- Node3
9070
9071 procedure Set_Dcheck_Function
9072 (N : Node_Id; Val : Entity_Id); -- Node5
9073
9074 procedure Set_Debug_Statement
9075 (N : Node_Id; Val : Node_Id); -- Node3
9076
9077 procedure Set_Declarations
9078 (N : Node_Id; Val : List_Id); -- List2
9079
9080 procedure Set_Default_Expression
9081 (N : Node_Id; Val : Node_Id); -- Node5
9082
9083 procedure Set_Default_Storage_Pool
9084 (N : Node_Id; Val : Node_Id); -- Node3
9085
9086 procedure Set_Default_Name
9087 (N : Node_Id; Val : Node_Id); -- Node2
9088
9089 procedure Set_Defining_Identifier
9090 (N : Node_Id; Val : Entity_Id); -- Node1
9091
9092 procedure Set_Defining_Unit_Name
9093 (N : Node_Id; Val : Node_Id); -- Node1
9094
9095 procedure Set_Delay_Alternative
9096 (N : Node_Id; Val : Node_Id); -- Node4
9097
9098 procedure Set_Delay_Statement
9099 (N : Node_Id; Val : Node_Id); -- Node2
9100
9101 procedure Set_Delta_Expression
9102 (N : Node_Id; Val : Node_Id); -- Node3
9103
9104 procedure Set_Digits_Expression
9105 (N : Node_Id; Val : Node_Id); -- Node2
9106
9107 procedure Set_Discr_Check_Funcs_Built
9108 (N : Node_Id; Val : Boolean := True); -- Flag11
9109
9110 procedure Set_Discrete_Choices
9111 (N : Node_Id; Val : List_Id); -- List4
9112
9113 procedure Set_Discrete_Range
9114 (N : Node_Id; Val : Node_Id); -- Node4
9115
9116 procedure Set_Discrete_Subtype_Definition
9117 (N : Node_Id; Val : Node_Id); -- Node4
9118
9119 procedure Set_Discrete_Subtype_Definitions
9120 (N : Node_Id; Val : List_Id); -- List2
9121
9122 procedure Set_Discriminant_Specifications
9123 (N : Node_Id; Val : List_Id); -- List4
9124
9125 procedure Set_Discriminant_Type
9126 (N : Node_Id; Val : Node_Id); -- Node5
9127
9128 procedure Set_Do_Accessibility_Check
9129 (N : Node_Id; Val : Boolean := True); -- Flag13
9130
9131 procedure Set_Do_Discriminant_Check
9132 (N : Node_Id; Val : Boolean := True); -- Flag13
9133
9134 procedure Set_Do_Division_Check
9135 (N : Node_Id; Val : Boolean := True); -- Flag13
9136
9137 procedure Set_Do_Length_Check
9138 (N : Node_Id; Val : Boolean := True); -- Flag4
9139
9140 procedure Set_Do_Overflow_Check
9141 (N : Node_Id; Val : Boolean := True); -- Flag17
9142
9143 procedure Set_Do_Range_Check
9144 (N : Node_Id; Val : Boolean := True); -- Flag9
9145
9146 procedure Set_Do_Storage_Check
9147 (N : Node_Id; Val : Boolean := True); -- Flag17
9148
9149 procedure Set_Do_Tag_Check
9150 (N : Node_Id; Val : Boolean := True); -- Flag13
9151
9152 procedure Set_Elaborate_All_Desirable
9153 (N : Node_Id; Val : Boolean := True); -- Flag9
9154
9155 procedure Set_Elaborate_All_Present
9156 (N : Node_Id; Val : Boolean := True); -- Flag14
9157
9158 procedure Set_Elaborate_Desirable
9159 (N : Node_Id; Val : Boolean := True); -- Flag11
9160
9161 procedure Set_Elaborate_Present
9162 (N : Node_Id; Val : Boolean := True); -- Flag4
9163
9164 procedure Set_Elaboration_Boolean
9165 (N : Node_Id; Val : Node_Id); -- Node2
9166
9167 procedure Set_Else_Actions
9168 (N : Node_Id; Val : List_Id); -- List3
9169
9170 procedure Set_Else_Statements
9171 (N : Node_Id; Val : List_Id); -- List4
9172
9173 procedure Set_Elsif_Parts
9174 (N : Node_Id; Val : List_Id); -- List3
9175
9176 procedure Set_Enclosing_Variant
9177 (N : Node_Id; Val : Node_Id); -- Node2
9178
9179 procedure Set_End_Label
9180 (N : Node_Id; Val : Node_Id); -- Node4
9181
9182 procedure Set_End_Span
9183 (N : Node_Id; Val : Uint); -- Uint5
9184
9185 procedure Set_Entity
9186 (N : Node_Id; Val : Node_Id); -- Node4
9187
9188 procedure Set_Entry_Body_Formal_Part
9189 (N : Node_Id; Val : Node_Id); -- Node5
9190
9191 procedure Set_Entry_Call_Alternative
9192 (N : Node_Id; Val : Node_Id); -- Node1
9193
9194 procedure Set_Entry_Call_Statement
9195 (N : Node_Id; Val : Node_Id); -- Node1
9196
9197 procedure Set_Entry_Direct_Name
9198 (N : Node_Id; Val : Node_Id); -- Node1
9199
9200 procedure Set_Entry_Index
9201 (N : Node_Id; Val : Node_Id); -- Node5
9202
9203 procedure Set_Entry_Index_Specification
9204 (N : Node_Id; Val : Node_Id); -- Node4
9205
9206 procedure Set_Etype
9207 (N : Node_Id; Val : Node_Id); -- Node5
9208
9209 procedure Set_Exception_Choices
9210 (N : Node_Id; Val : List_Id); -- List4
9211
9212 procedure Set_Exception_Handlers
9213 (N : Node_Id; Val : List_Id); -- List5
9214
9215 procedure Set_Exception_Junk
9216 (N : Node_Id; Val : Boolean := True); -- Flag8
9217
9218 procedure Set_Exception_Label
9219 (N : Node_Id; Val : Node_Id); -- Node5
9220
9221 procedure Set_Expansion_Delayed
9222 (N : Node_Id; Val : Boolean := True); -- Flag11
9223
9224 procedure Set_Explicit_Actual_Parameter
9225 (N : Node_Id; Val : Node_Id); -- Node3
9226
9227 procedure Set_Explicit_Generic_Actual_Parameter
9228 (N : Node_Id; Val : Node_Id); -- Node1
9229
9230 procedure Set_Expression
9231 (N : Node_Id; Val : Node_Id); -- Node3
9232
9233 procedure Set_Expressions
9234 (N : Node_Id; Val : List_Id); -- List1
9235
9236 procedure Set_First_Bit
9237 (N : Node_Id; Val : Node_Id); -- Node3
9238
9239 procedure Set_First_Inlined_Subprogram
9240 (N : Node_Id; Val : Entity_Id); -- Node3
9241
9242 procedure Set_First_Name
9243 (N : Node_Id; Val : Boolean := True); -- Flag5
9244
9245 procedure Set_First_Named_Actual
9246 (N : Node_Id; Val : Node_Id); -- Node4
9247
9248 procedure Set_First_Real_Statement
9249 (N : Node_Id; Val : Node_Id); -- Node2
9250
9251 procedure Set_First_Subtype_Link
9252 (N : Node_Id; Val : Entity_Id); -- Node5
9253
9254 procedure Set_Float_Truncate
9255 (N : Node_Id; Val : Boolean := True); -- Flag11
9256
9257 procedure Set_Formal_Type_Definition
9258 (N : Node_Id; Val : Node_Id); -- Node3
9259
9260 procedure Set_Forwards_OK
9261 (N : Node_Id; Val : Boolean := True); -- Flag5
9262
9263 procedure Set_From_At_Mod
9264 (N : Node_Id; Val : Boolean := True); -- Flag4
9265
9266 procedure Set_From_Aspect_Specification
9267 (N : Node_Id; Val : Boolean := True); -- Flag13
9268
9269 procedure Set_From_At_End
9270 (N : Node_Id; Val : Boolean := True); -- Flag4
9271
9272 procedure Set_From_Default
9273 (N : Node_Id; Val : Boolean := True); -- Flag6
9274
9275 procedure Set_Generic_Associations
9276 (N : Node_Id; Val : List_Id); -- List3
9277
9278 procedure Set_Generic_Formal_Declarations
9279 (N : Node_Id; Val : List_Id); -- List2
9280
9281 procedure Set_Generic_Parent
9282 (N : Node_Id; Val : Node_Id); -- Node5
9283
9284 procedure Set_Generic_Parent_Type
9285 (N : Node_Id; Val : Node_Id); -- Node4
9286
9287 procedure Set_Handled_Statement_Sequence
9288 (N : Node_Id; Val : Node_Id); -- Node4
9289
9290 procedure Set_Handler_List_Entry
9291 (N : Node_Id; Val : Node_Id); -- Node2
9292
9293 procedure Set_Has_Created_Identifier
9294 (N : Node_Id; Val : Boolean := True); -- Flag15
9295
9296 procedure Set_Has_Dynamic_Length_Check
9297 (N : Node_Id; Val : Boolean := True); -- Flag10
9298
9299 procedure Set_Has_Dynamic_Range_Check
9300 (N : Node_Id; Val : Boolean := True); -- Flag12
9301
9302 procedure Set_Has_Init_Expression
9303 (N : Node_Id; Val : Boolean := True); -- Flag14
9304
9305 procedure Set_Has_Local_Raise
9306 (N : Node_Id; Val : Boolean := True); -- Flag8
9307
9308 procedure Set_Has_No_Elaboration_Code
9309 (N : Node_Id; Val : Boolean := True); -- Flag17
9310
9311 procedure Set_Has_Pragma_CPU
9312 (N : Node_Id; Val : Boolean := True); -- Flag14
9313
9314 procedure Set_Has_Pragma_Priority
9315 (N : Node_Id; Val : Boolean := True); -- Flag6
9316
9317 procedure Set_Has_Pragma_Suppress_All
9318 (N : Node_Id; Val : Boolean := True); -- Flag14
9319
9320 procedure Set_Has_Private_View
9321 (N : Node_Id; Val : Boolean := True); -- Flag11
9322
9323 procedure Set_Has_Relative_Deadline_Pragma
9324 (N : Node_Id; Val : Boolean := True); -- Flag9
9325
9326 procedure Set_Has_Self_Reference
9327 (N : Node_Id; Val : Boolean := True); -- Flag13
9328
9329 procedure Set_Has_Storage_Size_Pragma
9330 (N : Node_Id; Val : Boolean := True); -- Flag5
9331
9332 procedure Set_Has_Task_Info_Pragma
9333 (N : Node_Id; Val : Boolean := True); -- Flag7
9334
9335 procedure Set_Has_Task_Name_Pragma
9336 (N : Node_Id; Val : Boolean := True); -- Flag8
9337
9338 procedure Set_Has_Wide_Character
9339 (N : Node_Id; Val : Boolean := True); -- Flag11
9340
9341 procedure Set_Has_Wide_Wide_Character
9342 (N : Node_Id; Val : Boolean := True); -- Flag13
9343
9344 procedure Set_Hidden_By_Use_Clause
9345 (N : Node_Id; Val : Elist_Id); -- Elist4
9346
9347 procedure Set_High_Bound
9348 (N : Node_Id; Val : Node_Id); -- Node2
9349
9350 procedure Set_Identifier
9351 (N : Node_Id; Val : Node_Id); -- Node1
9352
9353 procedure Set_Interface_List
9354 (N : Node_Id; Val : List_Id); -- List2
9355
9356 procedure Set_Interface_Present
9357 (N : Node_Id; Val : Boolean := True); -- Flag16
9358
9359 procedure Set_Implicit_With
9360 (N : Node_Id; Val : Boolean := True); -- Flag16
9361
9362 procedure Set_Import_Interface_Present
9363 (N : Node_Id; Val : Boolean := True); -- Flag16
9364
9365 procedure Set_In_Present
9366 (N : Node_Id; Val : Boolean := True); -- Flag15
9367
9368 procedure Set_Includes_Infinities
9369 (N : Node_Id; Val : Boolean := True); -- Flag11
9370
9371 procedure Set_Inherited_Discriminant
9372 (N : Node_Id; Val : Boolean := True); -- Flag13
9373
9374 procedure Set_Instance_Spec
9375 (N : Node_Id; Val : Node_Id); -- Node5
9376
9377 procedure Set_Intval
9378 (N : Node_Id; Val : Uint); -- Uint3
9379
9380 procedure Set_Is_Accessibility_Actual
9381 (N : Node_Id; Val : Boolean := True); -- Flag13
9382
9383 procedure Set_Is_Asynchronous_Call_Block
9384 (N : Node_Id; Val : Boolean := True); -- Flag7
9385
9386 procedure Set_Is_Component_Left_Opnd
9387 (N : Node_Id; Val : Boolean := True); -- Flag13
9388
9389 procedure Set_Is_Component_Right_Opnd
9390 (N : Node_Id; Val : Boolean := True); -- Flag14
9391
9392 procedure Set_Is_Controlling_Actual
9393 (N : Node_Id; Val : Boolean := True); -- Flag16
9394
9395 procedure Set_Is_Delayed_Aspect
9396 (N : Node_Id; Val : Boolean := True); -- Flag14
9397
9398 procedure Set_Is_Dynamic_Coextension
9399 (N : Node_Id; Val : Boolean := True); -- Flag18
9400
9401 procedure Set_Is_Elsif
9402 (N : Node_Id; Val : Boolean := True); -- Flag13
9403
9404 procedure Set_Is_Entry_Barrier_Function
9405 (N : Node_Id; Val : Boolean := True); -- Flag8
9406
9407 procedure Set_Is_Expanded_Build_In_Place_Call
9408 (N : Node_Id; Val : Boolean := True); -- Flag11
9409
9410 procedure Set_Is_Folded_In_Parser
9411 (N : Node_Id; Val : Boolean := True); -- Flag4
9412
9413 procedure Set_Is_In_Discriminant_Check
9414 (N : Node_Id; Val : Boolean := True); -- Flag11
9415
9416 procedure Set_Is_Machine_Number
9417 (N : Node_Id; Val : Boolean := True); -- Flag11
9418
9419 procedure Set_Is_Null_Loop
9420 (N : Node_Id; Val : Boolean := True); -- Flag16
9421
9422 procedure Set_Is_Overloaded
9423 (N : Node_Id; Val : Boolean := True); -- Flag5
9424
9425 procedure Set_Is_Power_Of_2_For_Shift
9426 (N : Node_Id; Val : Boolean := True); -- Flag13
9427
9428 procedure Set_Is_Protected_Subprogram_Body
9429 (N : Node_Id; Val : Boolean := True); -- Flag7
9430
9431 procedure Set_Is_Static_Coextension
9432 (N : Node_Id; Val : Boolean := True); -- Flag14
9433
9434 procedure Set_Is_Static_Expression
9435 (N : Node_Id; Val : Boolean := True); -- Flag6
9436
9437 procedure Set_Is_Subprogram_Descriptor
9438 (N : Node_Id; Val : Boolean := True); -- Flag16
9439
9440 procedure Set_Is_Task_Allocation_Block
9441 (N : Node_Id; Val : Boolean := True); -- Flag6
9442
9443 procedure Set_Is_Task_Master
9444 (N : Node_Id; Val : Boolean := True); -- Flag5
9445
9446 procedure Set_Iteration_Scheme
9447 (N : Node_Id; Val : Node_Id); -- Node2
9448
9449 procedure Set_Itype
9450 (N : Node_Id; Val : Entity_Id); -- Node1
9451
9452 procedure Set_Kill_Range_Check
9453 (N : Node_Id; Val : Boolean := True); -- Flag11
9454
9455 procedure Set_Last_Bit
9456 (N : Node_Id; Val : Node_Id); -- Node4
9457
9458 procedure Set_Last_Name
9459 (N : Node_Id; Val : Boolean := True); -- Flag6
9460
9461 procedure Set_Library_Unit
9462 (N : Node_Id; Val : Node_Id); -- Node4
9463
9464 procedure Set_Label_Construct
9465 (N : Node_Id; Val : Node_Id); -- Node2
9466
9467 procedure Set_Left_Opnd
9468 (N : Node_Id; Val : Node_Id); -- Node2
9469
9470 procedure Set_Limited_View_Installed
9471 (N : Node_Id; Val : Boolean := True); -- Flag18
9472
9473 procedure Set_Limited_Present
9474 (N : Node_Id; Val : Boolean := True); -- Flag17
9475
9476 procedure Set_Literals
9477 (N : Node_Id; Val : List_Id); -- List1
9478
9479 procedure Set_Local_Raise_Not_OK
9480 (N : Node_Id; Val : Boolean := True); -- Flag7
9481
9482 procedure Set_Local_Raise_Statements
9483 (N : Node_Id; Val : Elist_Id); -- Elist1
9484
9485 procedure Set_Loop_Actions
9486 (N : Node_Id; Val : List_Id); -- List2
9487
9488 procedure Set_Loop_Parameter_Specification
9489 (N : Node_Id; Val : Node_Id); -- Node4
9490
9491 procedure Set_Low_Bound
9492 (N : Node_Id; Val : Node_Id); -- Node1
9493
9494 procedure Set_Mod_Clause
9495 (N : Node_Id; Val : Node_Id); -- Node2
9496
9497 procedure Set_More_Ids
9498 (N : Node_Id; Val : Boolean := True); -- Flag5
9499
9500 procedure Set_Must_Be_Byte_Aligned
9501 (N : Node_Id; Val : Boolean := True); -- Flag14
9502
9503 procedure Set_Must_Not_Freeze
9504 (N : Node_Id; Val : Boolean := True); -- Flag8
9505
9506 procedure Set_Must_Not_Override
9507 (N : Node_Id; Val : Boolean := True); -- Flag15
9508
9509 procedure Set_Must_Override
9510 (N : Node_Id; Val : Boolean := True); -- Flag14
9511
9512 procedure Set_Name
9513 (N : Node_Id; Val : Node_Id); -- Node2
9514
9515 procedure Set_Names
9516 (N : Node_Id; Val : List_Id); -- List2
9517
9518 procedure Set_Next_Entity
9519 (N : Node_Id; Val : Node_Id); -- Node2
9520
9521 procedure Set_Next_Exit_Statement
9522 (N : Node_Id; Val : Node_Id); -- Node3
9523
9524 procedure Set_Next_Implicit_With
9525 (N : Node_Id; Val : Node_Id); -- Node3
9526
9527 procedure Set_Next_Named_Actual
9528 (N : Node_Id; Val : Node_Id); -- Node4
9529
9530 procedure Set_Next_Pragma
9531 (N : Node_Id; Val : Node_Id); -- Node1
9532
9533 procedure Set_Next_Rep_Item
9534 (N : Node_Id; Val : Node_Id); -- Node5
9535
9536 procedure Set_Next_Use_Clause
9537 (N : Node_Id; Val : Node_Id); -- Node3
9538
9539 procedure Set_No_Ctrl_Actions
9540 (N : Node_Id; Val : Boolean := True); -- Flag7
9541
9542 procedure Set_No_Elaboration_Check
9543 (N : Node_Id; Val : Boolean := True); -- Flag14
9544
9545 procedure Set_No_Entities_Ref_In_Spec
9546 (N : Node_Id; Val : Boolean := True); -- Flag8
9547
9548 procedure Set_No_Initialization
9549 (N : Node_Id; Val : Boolean := True); -- Flag13
9550
9551 procedure Set_No_Truncation
9552 (N : Node_Id; Val : Boolean := True); -- Flag17
9553
9554 procedure Set_Null_Present
9555 (N : Node_Id; Val : Boolean := True); -- Flag13
9556
9557 procedure Set_Null_Exclusion_Present
9558 (N : Node_Id; Val : Boolean := True); -- Flag11
9559
9560 procedure Set_Null_Exclusion_In_Return_Present
9561 (N : Node_Id; Val : Boolean := True); -- Flag14
9562
9563 procedure Set_Null_Record_Present
9564 (N : Node_Id; Val : Boolean := True); -- Flag17
9565
9566 procedure Set_Object_Definition
9567 (N : Node_Id; Val : Node_Id); -- Node4
9568
9569 procedure Set_Original_Discriminant
9570 (N : Node_Id; Val : Node_Id); -- Node2
9571
9572 procedure Set_Original_Entity
9573 (N : Node_Id; Val : Entity_Id); -- Node2
9574
9575 procedure Set_Others_Discrete_Choices
9576 (N : Node_Id; Val : List_Id); -- List1
9577
9578 procedure Set_Out_Present
9579 (N : Node_Id; Val : Boolean := True); -- Flag17
9580
9581 procedure Set_Parameter_Associations
9582 (N : Node_Id; Val : List_Id); -- List3
9583
9584 procedure Set_Parameter_List_Truncated
9585 (N : Node_Id; Val : Boolean := True); -- Flag17
9586
9587 procedure Set_Parameter_Specifications
9588 (N : Node_Id; Val : List_Id); -- List3
9589
9590 procedure Set_Parameter_Type
9591 (N : Node_Id; Val : Node_Id); -- Node2
9592
9593 procedure Set_Parent_Spec
9594 (N : Node_Id; Val : Node_Id); -- Node4
9595
9596 procedure Set_Position
9597 (N : Node_Id; Val : Node_Id); -- Node2
9598
9599 procedure Set_Pragma_Argument_Associations
9600 (N : Node_Id; Val : List_Id); -- List2
9601
9602 procedure Set_Pragma_Enabled
9603 (N : Node_Id; Val : Boolean := True); -- Flag5
9604
9605 procedure Set_Pragma_Identifier
9606 (N : Node_Id; Val : Node_Id); -- Node4
9607
9608 procedure Set_Pragmas_After
9609 (N : Node_Id; Val : List_Id); -- List5
9610
9611 procedure Set_Pragmas_Before
9612 (N : Node_Id; Val : List_Id); -- List4
9613
9614 procedure Set_Prefix
9615 (N : Node_Id; Val : Node_Id); -- Node3
9616
9617 procedure Set_Present_Expr
9618 (N : Node_Id; Val : Uint); -- Uint3
9619
9620 procedure Set_Prev_Ids
9621 (N : Node_Id; Val : Boolean := True); -- Flag6
9622
9623 procedure Set_Print_In_Hex
9624 (N : Node_Id; Val : Boolean := True); -- Flag13
9625
9626 procedure Set_Private_Declarations
9627 (N : Node_Id; Val : List_Id); -- List3
9628
9629 procedure Set_Private_Present
9630 (N : Node_Id; Val : Boolean := True); -- Flag15
9631
9632 procedure Set_Procedure_To_Call
9633 (N : Node_Id; Val : Node_Id); -- Node2
9634
9635 procedure Set_Proper_Body
9636 (N : Node_Id; Val : Node_Id); -- Node1
9637
9638 procedure Set_Protected_Definition
9639 (N : Node_Id; Val : Node_Id); -- Node3
9640
9641 procedure Set_Protected_Present
9642 (N : Node_Id; Val : Boolean := True); -- Flag6
9643
9644 procedure Set_Raises_Constraint_Error
9645 (N : Node_Id; Val : Boolean := True); -- Flag7
9646
9647 procedure Set_Range_Constraint
9648 (N : Node_Id; Val : Node_Id); -- Node4
9649
9650 procedure Set_Range_Expression
9651 (N : Node_Id; Val : Node_Id); -- Node4
9652
9653 procedure Set_Real_Range_Specification
9654 (N : Node_Id; Val : Node_Id); -- Node4
9655
9656 procedure Set_Realval
9657 (N : Node_Id; Val : Ureal); -- Ureal3
9658
9659 procedure Set_Reason
9660 (N : Node_Id; Val : Uint); -- Uint3
9661
9662 procedure Set_Record_Extension_Part
9663 (N : Node_Id; Val : Node_Id); -- Node3
9664
9665 procedure Set_Redundant_Use
9666 (N : Node_Id; Val : Boolean := True); -- Flag13
9667
9668 procedure Set_Renaming_Exception
9669 (N : Node_Id; Val : Node_Id); -- Node2
9670
9671 procedure Set_Result_Definition
9672 (N : Node_Id; Val : Node_Id); -- Node4
9673
9674 procedure Set_Return_Object_Declarations
9675 (N : Node_Id; Val : List_Id); -- List3
9676
9677 procedure Set_Return_Statement_Entity
9678 (N : Node_Id; Val : Node_Id); -- Node5
9679
9680 procedure Set_Reverse_Present
9681 (N : Node_Id; Val : Boolean := True); -- Flag15
9682
9683 procedure Set_Right_Opnd
9684 (N : Node_Id; Val : Node_Id); -- Node3
9685
9686 procedure Set_Rounded_Result
9687 (N : Node_Id; Val : Boolean := True); -- Flag18
9688
9689 procedure Set_SCIL_Controlling_Tag
9690 (N : Node_Id; Val : Node_Id); -- Node5
9691
9692 procedure Set_SCIL_Entity
9693 (N : Node_Id; Val : Node_Id); -- Node4
9694
9695 procedure Set_SCIL_Tag_Value
9696 (N : Node_Id; Val : Node_Id); -- Node5
9697
9698 procedure Set_SCIL_Target_Prim
9699 (N : Node_Id; Val : Node_Id); -- Node2
9700
9701 procedure Set_Scope
9702 (N : Node_Id; Val : Node_Id); -- Node3
9703
9704 procedure Set_Select_Alternatives
9705 (N : Node_Id; Val : List_Id); -- List1
9706
9707 procedure Set_Selector_Name
9708 (N : Node_Id; Val : Node_Id); -- Node2
9709
9710 procedure Set_Selector_Names
9711 (N : Node_Id; Val : List_Id); -- List1
9712
9713 procedure Set_Shift_Count_OK
9714 (N : Node_Id; Val : Boolean := True); -- Flag4
9715
9716 procedure Set_Source_Type
9717 (N : Node_Id; Val : Entity_Id); -- Node1
9718
9719 procedure Set_Specification
9720 (N : Node_Id; Val : Node_Id); -- Node1
9721
9722 procedure Set_Split_PPC
9723 (N : Node_Id; Val : Boolean); -- Flag17
9724
9725 procedure Set_Statements
9726 (N : Node_Id; Val : List_Id); -- List3
9727
9728 procedure Set_Static_Processing_OK
9729 (N : Node_Id; Val : Boolean); -- Flag4
9730
9731 procedure Set_Storage_Pool
9732 (N : Node_Id; Val : Node_Id); -- Node1
9733
9734 procedure Set_Strval
9735 (N : Node_Id; Val : String_Id); -- Str3
9736
9737 procedure Set_Subtype_Indication
9738 (N : Node_Id; Val : Node_Id); -- Node5
9739
9740 procedure Set_Subtype_Mark
9741 (N : Node_Id; Val : Node_Id); -- Node4
9742
9743 procedure Set_Subtype_Marks
9744 (N : Node_Id; Val : List_Id); -- List2
9745
9746 procedure Set_Suppress_Loop_Warnings
9747 (N : Node_Id; Val : Boolean := True); -- Flag17
9748
9749 procedure Set_Synchronized_Present
9750 (N : Node_Id; Val : Boolean := True); -- Flag7
9751
9752 procedure Set_Tagged_Present
9753 (N : Node_Id; Val : Boolean := True); -- Flag15
9754
9755 procedure Set_Target_Type
9756 (N : Node_Id; Val : Entity_Id); -- Node2
9757
9758 procedure Set_Task_Definition
9759 (N : Node_Id; Val : Node_Id); -- Node3
9760
9761 procedure Set_Task_Present
9762 (N : Node_Id; Val : Boolean := True); -- Flag5
9763
9764 procedure Set_Then_Actions
9765 (N : Node_Id; Val : List_Id); -- List2
9766
9767 procedure Set_Then_Statements
9768 (N : Node_Id; Val : List_Id); -- List2
9769
9770 procedure Set_Treat_Fixed_As_Integer
9771 (N : Node_Id; Val : Boolean := True); -- Flag14
9772
9773 procedure Set_Triggering_Alternative
9774 (N : Node_Id; Val : Node_Id); -- Node1
9775
9776 procedure Set_Triggering_Statement
9777 (N : Node_Id; Val : Node_Id); -- Node1
9778
9779 procedure Set_TSS_Elist
9780 (N : Node_Id; Val : Elist_Id); -- Elist3
9781
9782 procedure Set_Type_Definition
9783 (N : Node_Id; Val : Node_Id); -- Node3
9784
9785 procedure Set_Unit
9786 (N : Node_Id; Val : Node_Id); -- Node2
9787
9788 procedure Set_Unknown_Discriminants_Present
9789 (N : Node_Id; Val : Boolean := True); -- Flag13
9790
9791 procedure Set_Unreferenced_In_Spec
9792 (N : Node_Id; Val : Boolean := True); -- Flag7
9793
9794 procedure Set_Variant_Part
9795 (N : Node_Id; Val : Node_Id); -- Node4
9796
9797 procedure Set_Variants
9798 (N : Node_Id; Val : List_Id); -- List1
9799
9800 procedure Set_Visible_Declarations
9801 (N : Node_Id; Val : List_Id); -- List2
9802
9803 procedure Set_Was_Originally_Stub
9804 (N : Node_Id; Val : Boolean := True); -- Flag13
9805
9806 procedure Set_Withed_Body
9807 (N : Node_Id; Val : Node_Id); -- Node1
9808
9809 procedure Set_Zero_Cost_Handling
9810 (N : Node_Id; Val : Boolean := True); -- Flag5
9811
9812 -------------------------
9813 -- Iterator Procedures --
9814 -------------------------
9815
9816 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
9817
9818 procedure Next_Entity (N : in out Node_Id);
9819 procedure Next_Named_Actual (N : in out Node_Id);
9820 procedure Next_Rep_Item (N : in out Node_Id);
9821 procedure Next_Use_Clause (N : in out Node_Id);
9822
9823 -------------------------------------------
9824 -- Miscellaneous Tree Access Subprograms --
9825 -------------------------------------------
9826
9827 function End_Location (N : Node_Id) return Source_Ptr;
9828 -- N is an N_If_Statement or N_Case_Statement node, and this function
9829 -- returns the location of the IF token in the END IF sequence by
9830 -- translating the value of the End_Span field.
9831
9832 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
9833 -- N is an N_If_Statement or N_Case_Statement node. This procedure sets
9834 -- the End_Span field to correspond to the given value S. In other words,
9835 -- End_Span is set to the difference between S and Sloc (N), the starting
9836 -- location.
9837
9838 function Get_Pragma_Arg (Arg : Node_Id) return Node_Id;
9839 -- Given an argument to a pragma Arg, this function returns the expression
9840 -- for the argument. This is Arg itself, or, in the case where Arg is a
9841 -- pragma argument association node, the expression from this node.
9842
9843 --------------------------------
9844 -- Node_Kind Membership Tests --
9845 --------------------------------
9846
9847 -- The following functions allow a convenient notation for testing whether
9848 -- a Node_Kind value matches any one of a list of possible values. In each
9849 -- case True is returned if the given T argument is equal to any of the V
9850 -- arguments. Note that there is a similar set of functions defined in
9851 -- Atree where the first argument is a Node_Id whose Nkind field is tested.
9852
9853 function Nkind_In
9854 (T : Node_Kind;
9855 V1 : Node_Kind;
9856 V2 : Node_Kind) return Boolean;
9857
9858 function Nkind_In
9859 (T : Node_Kind;
9860 V1 : Node_Kind;
9861 V2 : Node_Kind;
9862 V3 : Node_Kind) return Boolean;
9863
9864 function Nkind_In
9865 (T : Node_Kind;
9866 V1 : Node_Kind;
9867 V2 : Node_Kind;
9868 V3 : Node_Kind;
9869 V4 : Node_Kind) return Boolean;
9870
9871 function Nkind_In
9872 (T : Node_Kind;
9873 V1 : Node_Kind;
9874 V2 : Node_Kind;
9875 V3 : Node_Kind;
9876 V4 : Node_Kind;
9877 V5 : Node_Kind) return Boolean;
9878
9879 function Nkind_In
9880 (T : Node_Kind;
9881 V1 : Node_Kind;
9882 V2 : Node_Kind;
9883 V3 : Node_Kind;
9884 V4 : Node_Kind;
9885 V5 : Node_Kind;
9886 V6 : Node_Kind) return Boolean;
9887
9888 function Nkind_In
9889 (T : Node_Kind;
9890 V1 : Node_Kind;
9891 V2 : Node_Kind;
9892 V3 : Node_Kind;
9893 V4 : Node_Kind;
9894 V5 : Node_Kind;
9895 V6 : Node_Kind;
9896 V7 : Node_Kind) return Boolean;
9897
9898 function Nkind_In
9899 (T : Node_Kind;
9900 V1 : Node_Kind;
9901 V2 : Node_Kind;
9902 V3 : Node_Kind;
9903 V4 : Node_Kind;
9904 V5 : Node_Kind;
9905 V6 : Node_Kind;
9906 V7 : Node_Kind;
9907 V8 : Node_Kind) return Boolean;
9908
9909 function Nkind_In
9910 (T : Node_Kind;
9911 V1 : Node_Kind;
9912 V2 : Node_Kind;
9913 V3 : Node_Kind;
9914 V4 : Node_Kind;
9915 V5 : Node_Kind;
9916 V6 : Node_Kind;
9917 V7 : Node_Kind;
9918 V8 : Node_Kind;
9919 V9 : Node_Kind) return Boolean;
9920
9921 pragma Inline (Nkind_In);
9922 -- Inline all above functions
9923
9924 -----------------------
9925 -- Utility Functions --
9926 -----------------------
9927
9928 function Pragma_Name (N : Node_Id) return Name_Id;
9929 pragma Inline (Pragma_Name);
9930 -- Convenient function to obtain Chars field of Pragma_Identifier
9931
9932 -----------------------------
9933 -- Syntactic Parent Tables --
9934 -----------------------------
9935
9936 -- These tables show for each node, and for each of the five fields,
9937 -- whether the corresponding field is syntactic (True) or semantic (False).
9938 -- Unused entries are also set to False.
9939
9940 subtype Field_Num is Natural range 1 .. 5;
9941
9942 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
9943
9944 -- Following entries can be built automatically from the sinfo sources
9945 -- using the makeisf utility (currently this program is in spitbol).
9946
9947 N_Identifier =>
9948 (1 => True, -- Chars (Name1)
9949 2 => False, -- Original_Discriminant (Node2-Sem)
9950 3 => False, -- unused
9951 4 => False, -- Entity (Node4-Sem)
9952 5 => False), -- Etype (Node5-Sem)
9953
9954 N_Integer_Literal =>
9955 (1 => False, -- unused
9956 2 => False, -- Original_Entity (Node2-Sem)
9957 3 => True, -- Intval (Uint3)
9958 4 => False, -- unused
9959 5 => False), -- Etype (Node5-Sem)
9960
9961 N_Real_Literal =>
9962 (1 => False, -- unused
9963 2 => False, -- Original_Entity (Node2-Sem)
9964 3 => True, -- Realval (Ureal3)
9965 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
9966 5 => False), -- Etype (Node5-Sem)
9967
9968 N_Character_Literal =>
9969 (1 => True, -- Chars (Name1)
9970 2 => True, -- Char_Literal_Value (Uint2)
9971 3 => False, -- unused
9972 4 => False, -- Entity (Node4-Sem)
9973 5 => False), -- Etype (Node5-Sem)
9974
9975 N_String_Literal =>
9976 (1 => False, -- unused
9977 2 => False, -- unused
9978 3 => True, -- Strval (Str3)
9979 4 => False, -- unused
9980 5 => False), -- Etype (Node5-Sem)
9981
9982 N_Pragma =>
9983 (1 => False, -- Next_Pragma (Node1-Sem)
9984 2 => True, -- Pragma_Argument_Associations (List2)
9985 3 => True, -- Debug_Statement (Node3)
9986 4 => True, -- Pragma_Identifier (Node4)
9987 5 => False), -- Next_Rep_Item (Node5-Sem)
9988
9989 N_Pragma_Argument_Association =>
9990 (1 => True, -- Chars (Name1)
9991 2 => False, -- unused
9992 3 => True, -- Expression (Node3)
9993 4 => False, -- unused
9994 5 => False), -- unused
9995
9996 N_Defining_Identifier =>
9997 (1 => True, -- Chars (Name1)
9998 2 => False, -- Next_Entity (Node2-Sem)
9999 3 => False, -- Scope (Node3-Sem)
10000 4 => False, -- unused
10001 5 => False), -- Etype (Node5-Sem)
10002
10003 N_Full_Type_Declaration =>
10004 (1 => True, -- Defining_Identifier (Node1)
10005 2 => False, -- unused
10006 3 => True, -- Type_Definition (Node3)
10007 4 => True, -- Discriminant_Specifications (List4)
10008 5 => False), -- unused
10009
10010 N_Subtype_Declaration =>
10011 (1 => True, -- Defining_Identifier (Node1)
10012 2 => False, -- unused
10013 3 => False, -- unused
10014 4 => False, -- Generic_Parent_Type (Node4-Sem)
10015 5 => True), -- Subtype_Indication (Node5)
10016
10017 N_Subtype_Indication =>
10018 (1 => False, -- unused
10019 2 => False, -- unused
10020 3 => True, -- Constraint (Node3)
10021 4 => True, -- Subtype_Mark (Node4)
10022 5 => False), -- Etype (Node5-Sem)
10023
10024 N_Object_Declaration =>
10025 (1 => True, -- Defining_Identifier (Node1)
10026 2 => False, -- Handler_List_Entry (Node2-Sem)
10027 3 => True, -- Expression (Node3)
10028 4 => True, -- Object_Definition (Node4)
10029 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
10030
10031 N_Number_Declaration =>
10032 (1 => True, -- Defining_Identifier (Node1)
10033 2 => False, -- unused
10034 3 => True, -- Expression (Node3)
10035 4 => False, -- unused
10036 5 => False), -- unused
10037
10038 N_Derived_Type_Definition =>
10039 (1 => False, -- unused
10040 2 => True, -- Interface_List (List2)
10041 3 => True, -- Record_Extension_Part (Node3)
10042 4 => False, -- unused
10043 5 => True), -- Subtype_Indication (Node5)
10044
10045 N_Range_Constraint =>
10046 (1 => False, -- unused
10047 2 => False, -- unused
10048 3 => False, -- unused
10049 4 => True, -- Range_Expression (Node4)
10050 5 => False), -- unused
10051
10052 N_Range =>
10053 (1 => True, -- Low_Bound (Node1)
10054 2 => True, -- High_Bound (Node2)
10055 3 => False, -- unused
10056 4 => False, -- unused
10057 5 => False), -- Etype (Node5-Sem)
10058
10059 N_Enumeration_Type_Definition =>
10060 (1 => True, -- Literals (List1)
10061 2 => False, -- unused
10062 3 => False, -- unused
10063 4 => True, -- End_Label (Node4)
10064 5 => False), -- unused
10065
10066 N_Defining_Character_Literal =>
10067 (1 => True, -- Chars (Name1)
10068 2 => False, -- Next_Entity (Node2-Sem)
10069 3 => False, -- Scope (Node3-Sem)
10070 4 => False, -- unused
10071 5 => False), -- Etype (Node5-Sem)
10072
10073 N_Signed_Integer_Type_Definition =>
10074 (1 => True, -- Low_Bound (Node1)
10075 2 => True, -- High_Bound (Node2)
10076 3 => False, -- unused
10077 4 => False, -- unused
10078 5 => False), -- unused
10079
10080 N_Modular_Type_Definition =>
10081 (1 => False, -- unused
10082 2 => False, -- unused
10083 3 => True, -- Expression (Node3)
10084 4 => False, -- unused
10085 5 => False), -- unused
10086
10087 N_Floating_Point_Definition =>
10088 (1 => False, -- unused
10089 2 => True, -- Digits_Expression (Node2)
10090 3 => False, -- unused
10091 4 => True, -- Real_Range_Specification (Node4)
10092 5 => False), -- unused
10093
10094 N_Real_Range_Specification =>
10095 (1 => True, -- Low_Bound (Node1)
10096 2 => True, -- High_Bound (Node2)
10097 3 => False, -- unused
10098 4 => False, -- unused
10099 5 => False), -- unused
10100
10101 N_Ordinary_Fixed_Point_Definition =>
10102 (1 => False, -- unused
10103 2 => False, -- unused
10104 3 => True, -- Delta_Expression (Node3)
10105 4 => True, -- Real_Range_Specification (Node4)
10106 5 => False), -- unused
10107
10108 N_Decimal_Fixed_Point_Definition =>
10109 (1 => False, -- unused
10110 2 => True, -- Digits_Expression (Node2)
10111 3 => True, -- Delta_Expression (Node3)
10112 4 => True, -- Real_Range_Specification (Node4)
10113 5 => False), -- unused
10114
10115 N_Digits_Constraint =>
10116 (1 => False, -- unused
10117 2 => True, -- Digits_Expression (Node2)
10118 3 => False, -- unused
10119 4 => True, -- Range_Constraint (Node4)
10120 5 => False), -- unused
10121
10122 N_Unconstrained_Array_Definition =>
10123 (1 => False, -- unused
10124 2 => True, -- Subtype_Marks (List2)
10125 3 => False, -- unused
10126 4 => True, -- Component_Definition (Node4)
10127 5 => False), -- unused
10128
10129 N_Constrained_Array_Definition =>
10130 (1 => False, -- unused
10131 2 => True, -- Discrete_Subtype_Definitions (List2)
10132 3 => False, -- unused
10133 4 => True, -- Component_Definition (Node4)
10134 5 => False), -- unused
10135
10136 N_Component_Definition =>
10137 (1 => False, -- unused
10138 2 => False, -- unused
10139 3 => True, -- Access_Definition (Node3)
10140 4 => False, -- unused
10141 5 => True), -- Subtype_Indication (Node5)
10142
10143 N_Discriminant_Specification =>
10144 (1 => True, -- Defining_Identifier (Node1)
10145 2 => False, -- unused
10146 3 => True, -- Expression (Node3)
10147 4 => False, -- unused
10148 5 => True), -- Discriminant_Type (Node5)
10149
10150 N_Index_Or_Discriminant_Constraint =>
10151 (1 => True, -- Constraints (List1)
10152 2 => False, -- unused
10153 3 => False, -- unused
10154 4 => False, -- unused
10155 5 => False), -- unused
10156
10157 N_Discriminant_Association =>
10158 (1 => True, -- Selector_Names (List1)
10159 2 => False, -- unused
10160 3 => True, -- Expression (Node3)
10161 4 => False, -- unused
10162 5 => False), -- unused
10163
10164 N_Record_Definition =>
10165 (1 => True, -- Component_List (Node1)
10166 2 => True, -- Interface_List (List2)
10167 3 => False, -- unused
10168 4 => True, -- End_Label (Node4)
10169 5 => False), -- unused
10170
10171 N_Component_List =>
10172 (1 => False, -- unused
10173 2 => False, -- unused
10174 3 => True, -- Component_Items (List3)
10175 4 => True, -- Variant_Part (Node4)
10176 5 => False), -- unused
10177
10178 N_Component_Declaration =>
10179 (1 => True, -- Defining_Identifier (Node1)
10180 2 => False, -- unused
10181 3 => True, -- Expression (Node3)
10182 4 => True, -- Component_Definition (Node4)
10183 5 => False), -- unused
10184
10185 N_Variant_Part =>
10186 (1 => True, -- Variants (List1)
10187 2 => True, -- Name (Node2)
10188 3 => False, -- unused
10189 4 => False, -- unused
10190 5 => False), -- unused
10191
10192 N_Variant =>
10193 (1 => True, -- Component_List (Node1)
10194 2 => False, -- Enclosing_Variant (Node2-Sem)
10195 3 => False, -- Present_Expr (Uint3-Sem)
10196 4 => True, -- Discrete_Choices (List4)
10197 5 => False), -- Dcheck_Function (Node5-Sem)
10198
10199 N_Others_Choice =>
10200 (1 => False, -- Others_Discrete_Choices (List1-Sem)
10201 2 => False, -- unused
10202 3 => False, -- unused
10203 4 => False, -- unused
10204 5 => False), -- unused
10205
10206 N_Access_To_Object_Definition =>
10207 (1 => False, -- unused
10208 2 => False, -- unused
10209 3 => False, -- unused
10210 4 => False, -- unused
10211 5 => True), -- Subtype_Indication (Node5)
10212
10213 N_Access_Function_Definition =>
10214 (1 => False, -- unused
10215 2 => False, -- unused
10216 3 => True, -- Parameter_Specifications (List3)
10217 4 => True, -- Result_Definition (Node4)
10218 5 => False), -- unused
10219
10220 N_Access_Procedure_Definition =>
10221 (1 => False, -- unused
10222 2 => False, -- unused
10223 3 => True, -- Parameter_Specifications (List3)
10224 4 => False, -- unused
10225 5 => False), -- unused
10226
10227 N_Access_Definition =>
10228 (1 => False, -- unused
10229 2 => False, -- unused
10230 3 => True, -- Access_To_Subprogram_Definition (Node3)
10231 4 => True, -- Subtype_Mark (Node4)
10232 5 => False), -- unused
10233
10234 N_Incomplete_Type_Declaration =>
10235 (1 => True, -- Defining_Identifier (Node1)
10236 2 => False, -- unused
10237 3 => False, -- unused
10238 4 => True, -- Discriminant_Specifications (List4)
10239 5 => False), -- unused
10240
10241 N_Explicit_Dereference =>
10242 (1 => False, -- unused
10243 2 => False, -- unused
10244 3 => True, -- Prefix (Node3)
10245 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
10246 5 => False), -- Etype (Node5-Sem)
10247
10248 N_Indexed_Component =>
10249 (1 => True, -- Expressions (List1)
10250 2 => False, -- unused
10251 3 => True, -- Prefix (Node3)
10252 4 => False, -- unused
10253 5 => False), -- Etype (Node5-Sem)
10254
10255 N_Slice =>
10256 (1 => False, -- unused
10257 2 => False, -- unused
10258 3 => True, -- Prefix (Node3)
10259 4 => True, -- Discrete_Range (Node4)
10260 5 => False), -- Etype (Node5-Sem)
10261
10262 N_Selected_Component =>
10263 (1 => False, -- unused
10264 2 => True, -- Selector_Name (Node2)
10265 3 => True, -- Prefix (Node3)
10266 4 => False, -- unused
10267 5 => False), -- Etype (Node5-Sem)
10268
10269 N_Attribute_Reference =>
10270 (1 => True, -- Expressions (List1)
10271 2 => True, -- Attribute_Name (Name2)
10272 3 => True, -- Prefix (Node3)
10273 4 => False, -- Entity (Node4-Sem)
10274 5 => False), -- Etype (Node5-Sem)
10275
10276 N_Aggregate =>
10277 (1 => True, -- Expressions (List1)
10278 2 => True, -- Component_Associations (List2)
10279 3 => False, -- Aggregate_Bounds (Node3-Sem)
10280 4 => False, -- unused
10281 5 => False), -- Etype (Node5-Sem)
10282
10283 N_Component_Association =>
10284 (1 => True, -- Choices (List1)
10285 2 => False, -- Loop_Actions (List2-Sem)
10286 3 => True, -- Expression (Node3)
10287 4 => False, -- unused
10288 5 => False), -- unused
10289
10290 N_Extension_Aggregate =>
10291 (1 => True, -- Expressions (List1)
10292 2 => True, -- Component_Associations (List2)
10293 3 => True, -- Ancestor_Part (Node3)
10294 4 => False, -- unused
10295 5 => False), -- Etype (Node5-Sem)
10296
10297 N_Null =>
10298 (1 => False, -- unused
10299 2 => False, -- unused
10300 3 => False, -- unused
10301 4 => False, -- unused
10302 5 => False), -- Etype (Node5-Sem)
10303
10304 N_And_Then =>
10305 (1 => False, -- Actions (List1-Sem)
10306 2 => True, -- Left_Opnd (Node2)
10307 3 => True, -- Right_Opnd (Node3)
10308 4 => False, -- unused
10309 5 => False), -- Etype (Node5-Sem)
10310
10311 N_Or_Else =>
10312 (1 => False, -- Actions (List1-Sem)
10313 2 => True, -- Left_Opnd (Node2)
10314 3 => True, -- Right_Opnd (Node3)
10315 4 => False, -- unused
10316 5 => False), -- Etype (Node5-Sem)
10317
10318 N_In =>
10319 (1 => False, -- unused
10320 2 => True, -- Left_Opnd (Node2)
10321 3 => True, -- Right_Opnd (Node3)
10322 4 => True, -- Alternatives (List4)
10323 5 => False), -- Etype (Node5-Sem)
10324
10325 N_Not_In =>
10326 (1 => False, -- unused
10327 2 => True, -- Left_Opnd (Node2)
10328 3 => True, -- Right_Opnd (Node3)
10329 4 => True, -- Alternatives (List4)
10330 5 => False), -- Etype (Node5-Sem)
10331
10332 N_Op_And =>
10333 (1 => True, -- Chars (Name1)
10334 2 => True, -- Left_Opnd (Node2)
10335 3 => True, -- Right_Opnd (Node3)
10336 4 => False, -- Entity (Node4-Sem)
10337 5 => False), -- Etype (Node5-Sem)
10338
10339 N_Op_Or =>
10340 (1 => True, -- Chars (Name1)
10341 2 => True, -- Left_Opnd (Node2)
10342 3 => True, -- Right_Opnd (Node3)
10343 4 => False, -- Entity (Node4-Sem)
10344 5 => False), -- Etype (Node5-Sem)
10345
10346 N_Op_Xor =>
10347 (1 => True, -- Chars (Name1)
10348 2 => True, -- Left_Opnd (Node2)
10349 3 => True, -- Right_Opnd (Node3)
10350 4 => False, -- Entity (Node4-Sem)
10351 5 => False), -- Etype (Node5-Sem)
10352
10353 N_Op_Eq =>
10354 (1 => True, -- Chars (Name1)
10355 2 => True, -- Left_Opnd (Node2)
10356 3 => True, -- Right_Opnd (Node3)
10357 4 => False, -- Entity (Node4-Sem)
10358 5 => False), -- Etype (Node5-Sem)
10359
10360 N_Op_Ne =>
10361 (1 => True, -- Chars (Name1)
10362 2 => True, -- Left_Opnd (Node2)
10363 3 => True, -- Right_Opnd (Node3)
10364 4 => False, -- Entity (Node4-Sem)
10365 5 => False), -- Etype (Node5-Sem)
10366
10367 N_Op_Lt =>
10368 (1 => True, -- Chars (Name1)
10369 2 => True, -- Left_Opnd (Node2)
10370 3 => True, -- Right_Opnd (Node3)
10371 4 => False, -- Entity (Node4-Sem)
10372 5 => False), -- Etype (Node5-Sem)
10373
10374 N_Op_Le =>
10375 (1 => True, -- Chars (Name1)
10376 2 => True, -- Left_Opnd (Node2)
10377 3 => True, -- Right_Opnd (Node3)
10378 4 => False, -- Entity (Node4-Sem)
10379 5 => False), -- Etype (Node5-Sem)
10380
10381 N_Op_Gt =>
10382 (1 => True, -- Chars (Name1)
10383 2 => True, -- Left_Opnd (Node2)
10384 3 => True, -- Right_Opnd (Node3)
10385 4 => False, -- Entity (Node4-Sem)
10386 5 => False), -- Etype (Node5-Sem)
10387
10388 N_Op_Ge =>
10389 (1 => True, -- Chars (Name1)
10390 2 => True, -- Left_Opnd (Node2)
10391 3 => True, -- Right_Opnd (Node3)
10392 4 => False, -- Entity (Node4-Sem)
10393 5 => False), -- Etype (Node5-Sem)
10394
10395 N_Op_Add =>
10396 (1 => True, -- Chars (Name1)
10397 2 => True, -- Left_Opnd (Node2)
10398 3 => True, -- Right_Opnd (Node3)
10399 4 => False, -- Entity (Node4-Sem)
10400 5 => False), -- Etype (Node5-Sem)
10401
10402 N_Op_Subtract =>
10403 (1 => True, -- Chars (Name1)
10404 2 => True, -- Left_Opnd (Node2)
10405 3 => True, -- Right_Opnd (Node3)
10406 4 => False, -- Entity (Node4-Sem)
10407 5 => False), -- Etype (Node5-Sem)
10408
10409 N_Op_Concat =>
10410 (1 => True, -- Chars (Name1)
10411 2 => True, -- Left_Opnd (Node2)
10412 3 => True, -- Right_Opnd (Node3)
10413 4 => False, -- Entity (Node4-Sem)
10414 5 => False), -- Etype (Node5-Sem)
10415
10416 N_Op_Multiply =>
10417 (1 => True, -- Chars (Name1)
10418 2 => True, -- Left_Opnd (Node2)
10419 3 => True, -- Right_Opnd (Node3)
10420 4 => False, -- Entity (Node4-Sem)
10421 5 => False), -- Etype (Node5-Sem)
10422
10423 N_Op_Divide =>
10424 (1 => True, -- Chars (Name1)
10425 2 => True, -- Left_Opnd (Node2)
10426 3 => True, -- Right_Opnd (Node3)
10427 4 => False, -- Entity (Node4-Sem)
10428 5 => False), -- Etype (Node5-Sem)
10429
10430 N_Op_Mod =>
10431 (1 => True, -- Chars (Name1)
10432 2 => True, -- Left_Opnd (Node2)
10433 3 => True, -- Right_Opnd (Node3)
10434 4 => False, -- Entity (Node4-Sem)
10435 5 => False), -- Etype (Node5-Sem)
10436
10437 N_Op_Rem =>
10438 (1 => True, -- Chars (Name1)
10439 2 => True, -- Left_Opnd (Node2)
10440 3 => True, -- Right_Opnd (Node3)
10441 4 => False, -- Entity (Node4-Sem)
10442 5 => False), -- Etype (Node5-Sem)
10443
10444 N_Op_Expon =>
10445 (1 => True, -- Chars (Name1)
10446 2 => True, -- Left_Opnd (Node2)
10447 3 => True, -- Right_Opnd (Node3)
10448 4 => False, -- Entity (Node4-Sem)
10449 5 => False), -- Etype (Node5-Sem)
10450
10451 N_Op_Plus =>
10452 (1 => True, -- Chars (Name1)
10453 2 => False, -- unused
10454 3 => True, -- Right_Opnd (Node3)
10455 4 => False, -- Entity (Node4-Sem)
10456 5 => False), -- Etype (Node5-Sem)
10457
10458 N_Op_Minus =>
10459 (1 => True, -- Chars (Name1)
10460 2 => False, -- unused
10461 3 => True, -- Right_Opnd (Node3)
10462 4 => False, -- Entity (Node4-Sem)
10463 5 => False), -- Etype (Node5-Sem)
10464
10465 N_Op_Abs =>
10466 (1 => True, -- Chars (Name1)
10467 2 => False, -- unused
10468 3 => True, -- Right_Opnd (Node3)
10469 4 => False, -- Entity (Node4-Sem)
10470 5 => False), -- Etype (Node5-Sem)
10471
10472 N_Op_Not =>
10473 (1 => True, -- Chars (Name1)
10474 2 => False, -- unused
10475 3 => True, -- Right_Opnd (Node3)
10476 4 => False, -- Entity (Node4-Sem)
10477 5 => False), -- Etype (Node5-Sem)
10478
10479 N_Type_Conversion =>
10480 (1 => False, -- unused
10481 2 => False, -- unused
10482 3 => True, -- Expression (Node3)
10483 4 => True, -- Subtype_Mark (Node4)
10484 5 => False), -- Etype (Node5-Sem)
10485
10486 N_Qualified_Expression =>
10487 (1 => False, -- unused
10488 2 => False, -- unused
10489 3 => True, -- Expression (Node3)
10490 4 => True, -- Subtype_Mark (Node4)
10491 5 => False), -- Etype (Node5-Sem)
10492
10493 N_Quantified_Expression =>
10494 (1 => True, -- Condition (Node1)
10495 2 => False, -- unused
10496 3 => False, -- unused
10497 4 => True, -- Loop_Parameter_Specification (Node4)
10498 5 => False), -- Etype (Node5-Sem)
10499
10500 N_Allocator =>
10501 (1 => False, -- Storage_Pool (Node1-Sem)
10502 2 => False, -- Procedure_To_Call (Node2-Sem)
10503 3 => True, -- Expression (Node3)
10504 4 => False, -- Coextensions (Elist4-Sem)
10505 5 => False), -- Etype (Node5-Sem)
10506
10507 N_Null_Statement =>
10508 (1 => False, -- unused
10509 2 => False, -- unused
10510 3 => False, -- unused
10511 4 => False, -- unused
10512 5 => False), -- unused
10513
10514 N_Label =>
10515 (1 => True, -- Identifier (Node1)
10516 2 => False, -- unused
10517 3 => False, -- unused
10518 4 => False, -- unused
10519 5 => False), -- unused
10520
10521 N_Assignment_Statement =>
10522 (1 => False, -- unused
10523 2 => True, -- Name (Node2)
10524 3 => True, -- Expression (Node3)
10525 4 => False, -- unused
10526 5 => False), -- unused
10527
10528 N_If_Statement =>
10529 (1 => True, -- Condition (Node1)
10530 2 => True, -- Then_Statements (List2)
10531 3 => True, -- Elsif_Parts (List3)
10532 4 => True, -- Else_Statements (List4)
10533 5 => True), -- End_Span (Uint5)
10534
10535 N_Elsif_Part =>
10536 (1 => True, -- Condition (Node1)
10537 2 => True, -- Then_Statements (List2)
10538 3 => False, -- Condition_Actions (List3-Sem)
10539 4 => False, -- unused
10540 5 => False), -- unused
10541
10542 N_Case_Expression =>
10543 (1 => False, -- unused
10544 2 => False, -- unused
10545 3 => True, -- Expression (Node3)
10546 4 => True, -- Alternatives (List4)
10547 5 => False), -- unused
10548
10549 N_Case_Expression_Alternative =>
10550 (1 => False, -- Actions (List1-Sem)
10551 2 => False, -- unused
10552 3 => True, -- Statements (List3)
10553 4 => True, -- Expression (Node4)
10554 5 => False), -- unused
10555
10556 N_Case_Statement =>
10557 (1 => False, -- unused
10558 2 => False, -- unused
10559 3 => True, -- Expression (Node3)
10560 4 => True, -- Alternatives (List4)
10561 5 => True), -- End_Span (Uint5)
10562
10563 N_Case_Statement_Alternative =>
10564 (1 => False, -- unused
10565 2 => False, -- unused
10566 3 => True, -- Statements (List3)
10567 4 => True, -- Discrete_Choices (List4)
10568 5 => False), -- unused
10569
10570 N_Loop_Statement =>
10571 (1 => True, -- Identifier (Node1)
10572 2 => True, -- Iteration_Scheme (Node2)
10573 3 => True, -- Statements (List3)
10574 4 => True, -- End_Label (Node4)
10575 5 => False), -- unused
10576
10577 N_Iteration_Scheme =>
10578 (1 => True, -- Condition (Node1)
10579 2 => False, -- unused
10580 3 => False, -- Condition_Actions (List3-Sem)
10581 4 => True, -- Loop_Parameter_Specification (Node4)
10582 5 => False), -- unused
10583
10584 N_Loop_Parameter_Specification =>
10585 (1 => True, -- Defining_Identifier (Node1)
10586 2 => False, -- unused
10587 3 => False, -- unused
10588 4 => True, -- Discrete_Subtype_Definition (Node4)
10589 5 => False), -- unused
10590
10591 N_Block_Statement =>
10592 (1 => True, -- Identifier (Node1)
10593 2 => True, -- Declarations (List2)
10594 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10595 4 => True, -- Handled_Statement_Sequence (Node4)
10596 5 => False), -- unused
10597
10598 N_Exit_Statement =>
10599 (1 => True, -- Condition (Node1)
10600 2 => True, -- Name (Node2)
10601 3 => False, -- unused
10602 4 => False, -- unused
10603 5 => False), -- unused
10604
10605 N_Goto_Statement =>
10606 (1 => False, -- unused
10607 2 => True, -- Name (Node2)
10608 3 => False, -- unused
10609 4 => False, -- unused
10610 5 => False), -- unused
10611
10612 N_Subprogram_Declaration =>
10613 (1 => True, -- Specification (Node1)
10614 2 => False, -- unused
10615 3 => False, -- Body_To_Inline (Node3-Sem)
10616 4 => False, -- Parent_Spec (Node4-Sem)
10617 5 => False), -- Corresponding_Body (Node5-Sem)
10618
10619 N_Abstract_Subprogram_Declaration =>
10620 (1 => True, -- Specification (Node1)
10621 2 => False, -- unused
10622 3 => False, -- unused
10623 4 => False, -- unused
10624 5 => False), -- unused
10625
10626 N_Function_Specification =>
10627 (1 => True, -- Defining_Unit_Name (Node1)
10628 2 => False, -- Elaboration_Boolean (Node2-Sem)
10629 3 => True, -- Parameter_Specifications (List3)
10630 4 => True, -- Result_Definition (Node4)
10631 5 => False), -- Generic_Parent (Node5-Sem)
10632
10633 N_Procedure_Specification =>
10634 (1 => True, -- Defining_Unit_Name (Node1)
10635 2 => False, -- Elaboration_Boolean (Node2-Sem)
10636 3 => True, -- Parameter_Specifications (List3)
10637 4 => False, -- unused
10638 5 => False), -- Generic_Parent (Node5-Sem)
10639
10640 N_Designator =>
10641 (1 => True, -- Identifier (Node1)
10642 2 => True, -- Name (Node2)
10643 3 => False, -- unused
10644 4 => False, -- unused
10645 5 => False), -- unused
10646
10647 N_Defining_Program_Unit_Name =>
10648 (1 => True, -- Defining_Identifier (Node1)
10649 2 => True, -- Name (Node2)
10650 3 => False, -- unused
10651 4 => False, -- unused
10652 5 => False), -- unused
10653
10654 N_Operator_Symbol =>
10655 (1 => True, -- Chars (Name1)
10656 2 => False, -- unused
10657 3 => True, -- Strval (Str3)
10658 4 => False, -- Entity (Node4-Sem)
10659 5 => False), -- Etype (Node5-Sem)
10660
10661 N_Defining_Operator_Symbol =>
10662 (1 => True, -- Chars (Name1)
10663 2 => False, -- Next_Entity (Node2-Sem)
10664 3 => False, -- Scope (Node3-Sem)
10665 4 => False, -- unused
10666 5 => False), -- Etype (Node5-Sem)
10667
10668 N_Parameter_Specification =>
10669 (1 => True, -- Defining_Identifier (Node1)
10670 2 => True, -- Parameter_Type (Node2)
10671 3 => True, -- Expression (Node3)
10672 4 => False, -- unused
10673 5 => False), -- Default_Expression (Node5-Sem)
10674
10675 N_Subprogram_Body =>
10676 (1 => True, -- Specification (Node1)
10677 2 => True, -- Declarations (List2)
10678 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10679 4 => True, -- Handled_Statement_Sequence (Node4)
10680 5 => False), -- Corresponding_Spec (Node5-Sem)
10681
10682 N_Parameterized_Expression =>
10683 (1 => True, -- Specification (Node1)
10684 2 => False, -- unused
10685 3 => True, -- Expression (Node3)
10686 4 => False, -- unused
10687 5 => False), -- unused
10688
10689 N_Procedure_Call_Statement =>
10690 (1 => False, -- Controlling_Argument (Node1-Sem)
10691 2 => True, -- Name (Node2)
10692 3 => True, -- Parameter_Associations (List3)
10693 4 => False, -- First_Named_Actual (Node4-Sem)
10694 5 => False), -- Etype (Node5-Sem)
10695
10696 N_Function_Call =>
10697 (1 => False, -- Controlling_Argument (Node1-Sem)
10698 2 => True, -- Name (Node2)
10699 3 => True, -- Parameter_Associations (List3)
10700 4 => False, -- First_Named_Actual (Node4-Sem)
10701 5 => False), -- Etype (Node5-Sem)
10702
10703 N_Parameter_Association =>
10704 (1 => False, -- unused
10705 2 => True, -- Selector_Name (Node2)
10706 3 => True, -- Explicit_Actual_Parameter (Node3)
10707 4 => False, -- Next_Named_Actual (Node4-Sem)
10708 5 => False), -- unused
10709
10710 N_Return_Statement =>
10711 (1 => False, -- Storage_Pool (Node1-Sem)
10712 2 => False, -- Procedure_To_Call (Node2-Sem)
10713 3 => True, -- Expression (Node3)
10714 4 => False, -- unused
10715 5 => False), -- Return_Statement_Entity (Node5-Sem)
10716
10717 N_Extended_Return_Statement =>
10718 (1 => False, -- Storage_Pool (Node1-Sem)
10719 2 => False, -- Procedure_To_Call (Node2-Sem)
10720 3 => True, -- Return_Object_Declarations (List3)
10721 4 => True, -- Handled_Statement_Sequence (Node4)
10722 5 => False), -- Return_Statement_Entity (Node5-Sem)
10723
10724 N_Package_Declaration =>
10725 (1 => True, -- Specification (Node1)
10726 2 => False, -- unused
10727 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10728 4 => False, -- Parent_Spec (Node4-Sem)
10729 5 => False), -- Corresponding_Body (Node5-Sem)
10730
10731 N_Package_Specification =>
10732 (1 => True, -- Defining_Unit_Name (Node1)
10733 2 => True, -- Visible_Declarations (List2)
10734 3 => True, -- Private_Declarations (List3)
10735 4 => True, -- End_Label (Node4)
10736 5 => False), -- Generic_Parent (Node5-Sem)
10737
10738 N_Package_Body =>
10739 (1 => True, -- Defining_Unit_Name (Node1)
10740 2 => True, -- Declarations (List2)
10741 3 => False, -- unused
10742 4 => True, -- Handled_Statement_Sequence (Node4)
10743 5 => False), -- Corresponding_Spec (Node5-Sem)
10744
10745 N_Private_Type_Declaration =>
10746 (1 => True, -- Defining_Identifier (Node1)
10747 2 => False, -- unused
10748 3 => False, -- unused
10749 4 => True, -- Discriminant_Specifications (List4)
10750 5 => False), -- unused
10751
10752 N_Private_Extension_Declaration =>
10753 (1 => True, -- Defining_Identifier (Node1)
10754 2 => True, -- Interface_List (List2)
10755 3 => False, -- unused
10756 4 => True, -- Discriminant_Specifications (List4)
10757 5 => True), -- Subtype_Indication (Node5)
10758
10759 N_Use_Package_Clause =>
10760 (1 => False, -- unused
10761 2 => True, -- Names (List2)
10762 3 => False, -- Next_Use_Clause (Node3-Sem)
10763 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10764 5 => False), -- unused
10765
10766 N_Use_Type_Clause =>
10767 (1 => False, -- unused
10768 2 => True, -- Subtype_Marks (List2)
10769 3 => False, -- Next_Use_Clause (Node3-Sem)
10770 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10771 5 => False), -- unused
10772
10773 N_Object_Renaming_Declaration =>
10774 (1 => True, -- Defining_Identifier (Node1)
10775 2 => True, -- Name (Node2)
10776 3 => True, -- Access_Definition (Node3)
10777 4 => True, -- Subtype_Mark (Node4)
10778 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
10779
10780 N_Exception_Renaming_Declaration =>
10781 (1 => True, -- Defining_Identifier (Node1)
10782 2 => True, -- Name (Node2)
10783 3 => False, -- unused
10784 4 => False, -- unused
10785 5 => False), -- unused
10786
10787 N_Package_Renaming_Declaration =>
10788 (1 => True, -- Defining_Unit_Name (Node1)
10789 2 => True, -- Name (Node2)
10790 3 => False, -- unused
10791 4 => False, -- Parent_Spec (Node4-Sem)
10792 5 => False), -- unused
10793
10794 N_Subprogram_Renaming_Declaration =>
10795 (1 => True, -- Specification (Node1)
10796 2 => True, -- Name (Node2)
10797 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
10798 4 => False, -- Parent_Spec (Node4-Sem)
10799 5 => False), -- Corresponding_Spec (Node5-Sem)
10800
10801 N_Generic_Package_Renaming_Declaration =>
10802 (1 => True, -- Defining_Unit_Name (Node1)
10803 2 => True, -- Name (Node2)
10804 3 => False, -- unused
10805 4 => False, -- Parent_Spec (Node4-Sem)
10806 5 => False), -- unused
10807
10808 N_Generic_Procedure_Renaming_Declaration =>
10809 (1 => True, -- Defining_Unit_Name (Node1)
10810 2 => True, -- Name (Node2)
10811 3 => False, -- unused
10812 4 => False, -- Parent_Spec (Node4-Sem)
10813 5 => False), -- unused
10814
10815 N_Generic_Function_Renaming_Declaration =>
10816 (1 => True, -- Defining_Unit_Name (Node1)
10817 2 => True, -- Name (Node2)
10818 3 => False, -- unused
10819 4 => False, -- Parent_Spec (Node4-Sem)
10820 5 => False), -- unused
10821
10822 N_Task_Type_Declaration =>
10823 (1 => True, -- Defining_Identifier (Node1)
10824 2 => True, -- Interface_List (List2)
10825 3 => True, -- Task_Definition (Node3)
10826 4 => True, -- Discriminant_Specifications (List4)
10827 5 => False), -- Corresponding_Body (Node5-Sem)
10828
10829 N_Single_Task_Declaration =>
10830 (1 => True, -- Defining_Identifier (Node1)
10831 2 => True, -- Interface_List (List2)
10832 3 => True, -- Task_Definition (Node3)
10833 4 => False, -- unused
10834 5 => False), -- unused
10835
10836 N_Task_Definition =>
10837 (1 => False, -- unused
10838 2 => True, -- Visible_Declarations (List2)
10839 3 => True, -- Private_Declarations (List3)
10840 4 => True, -- End_Label (Node4)
10841 5 => False), -- unused
10842
10843 N_Task_Body =>
10844 (1 => True, -- Defining_Identifier (Node1)
10845 2 => True, -- Declarations (List2)
10846 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10847 4 => True, -- Handled_Statement_Sequence (Node4)
10848 5 => False), -- Corresponding_Spec (Node5-Sem)
10849
10850 N_Protected_Type_Declaration =>
10851 (1 => True, -- Defining_Identifier (Node1)
10852 2 => True, -- Interface_List (List2)
10853 3 => True, -- Protected_Definition (Node3)
10854 4 => True, -- Discriminant_Specifications (List4)
10855 5 => False), -- Corresponding_Body (Node5-Sem)
10856
10857 N_Single_Protected_Declaration =>
10858 (1 => True, -- Defining_Identifier (Node1)
10859 2 => True, -- Interface_List (List2)
10860 3 => True, -- Protected_Definition (Node3)
10861 4 => False, -- unused
10862 5 => False), -- unused
10863
10864 N_Protected_Definition =>
10865 (1 => False, -- unused
10866 2 => True, -- Visible_Declarations (List2)
10867 3 => True, -- Private_Declarations (List3)
10868 4 => True, -- End_Label (Node4)
10869 5 => False), -- unused
10870
10871 N_Protected_Body =>
10872 (1 => True, -- Defining_Identifier (Node1)
10873 2 => True, -- Declarations (List2)
10874 3 => False, -- unused
10875 4 => True, -- End_Label (Node4)
10876 5 => False), -- Corresponding_Spec (Node5-Sem)
10877
10878 N_Entry_Declaration =>
10879 (1 => True, -- Defining_Identifier (Node1)
10880 2 => False, -- unused
10881 3 => True, -- Parameter_Specifications (List3)
10882 4 => True, -- Discrete_Subtype_Definition (Node4)
10883 5 => False), -- Corresponding_Body (Node5-Sem)
10884
10885 N_Accept_Statement =>
10886 (1 => True, -- Entry_Direct_Name (Node1)
10887 2 => True, -- Declarations (List2)
10888 3 => True, -- Parameter_Specifications (List3)
10889 4 => True, -- Handled_Statement_Sequence (Node4)
10890 5 => True), -- Entry_Index (Node5)
10891
10892 N_Entry_Body =>
10893 (1 => True, -- Defining_Identifier (Node1)
10894 2 => True, -- Declarations (List2)
10895 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10896 4 => True, -- Handled_Statement_Sequence (Node4)
10897 5 => True), -- Entry_Body_Formal_Part (Node5)
10898
10899 N_Entry_Body_Formal_Part =>
10900 (1 => True, -- Condition (Node1)
10901 2 => False, -- unused
10902 3 => True, -- Parameter_Specifications (List3)
10903 4 => True, -- Entry_Index_Specification (Node4)
10904 5 => False), -- unused
10905
10906 N_Entry_Index_Specification =>
10907 (1 => True, -- Defining_Identifier (Node1)
10908 2 => False, -- unused
10909 3 => False, -- unused
10910 4 => True, -- Discrete_Subtype_Definition (Node4)
10911 5 => False), -- unused
10912
10913 N_Entry_Call_Statement =>
10914 (1 => False, -- unused
10915 2 => True, -- Name (Node2)
10916 3 => True, -- Parameter_Associations (List3)
10917 4 => False, -- First_Named_Actual (Node4-Sem)
10918 5 => False), -- unused
10919
10920 N_Requeue_Statement =>
10921 (1 => False, -- unused
10922 2 => True, -- Name (Node2)
10923 3 => False, -- unused
10924 4 => False, -- unused
10925 5 => False), -- unused
10926
10927 N_Delay_Until_Statement =>
10928 (1 => False, -- unused
10929 2 => False, -- unused
10930 3 => True, -- Expression (Node3)
10931 4 => False, -- unused
10932 5 => False), -- unused
10933
10934 N_Delay_Relative_Statement =>
10935 (1 => False, -- unused
10936 2 => False, -- unused
10937 3 => True, -- Expression (Node3)
10938 4 => False, -- unused
10939 5 => False), -- unused
10940
10941 N_Selective_Accept =>
10942 (1 => True, -- Select_Alternatives (List1)
10943 2 => False, -- unused
10944 3 => False, -- unused
10945 4 => True, -- Else_Statements (List4)
10946 5 => False), -- unused
10947
10948 N_Accept_Alternative =>
10949 (1 => True, -- Condition (Node1)
10950 2 => True, -- Accept_Statement (Node2)
10951 3 => True, -- Statements (List3)
10952 4 => True, -- Pragmas_Before (List4)
10953 5 => False), -- Accept_Handler_Records (List5-Sem)
10954
10955 N_Delay_Alternative =>
10956 (1 => True, -- Condition (Node1)
10957 2 => True, -- Delay_Statement (Node2)
10958 3 => True, -- Statements (List3)
10959 4 => True, -- Pragmas_Before (List4)
10960 5 => False), -- unused
10961
10962 N_Terminate_Alternative =>
10963 (1 => True, -- Condition (Node1)
10964 2 => False, -- unused
10965 3 => False, -- unused
10966 4 => True, -- Pragmas_Before (List4)
10967 5 => True), -- Pragmas_After (List5)
10968
10969 N_Timed_Entry_Call =>
10970 (1 => True, -- Entry_Call_Alternative (Node1)
10971 2 => False, -- unused
10972 3 => False, -- unused
10973 4 => True, -- Delay_Alternative (Node4)
10974 5 => False), -- unused
10975
10976 N_Entry_Call_Alternative =>
10977 (1 => True, -- Entry_Call_Statement (Node1)
10978 2 => False, -- unused
10979 3 => True, -- Statements (List3)
10980 4 => True, -- Pragmas_Before (List4)
10981 5 => False), -- unused
10982
10983 N_Conditional_Entry_Call =>
10984 (1 => True, -- Entry_Call_Alternative (Node1)
10985 2 => False, -- unused
10986 3 => False, -- unused
10987 4 => True, -- Else_Statements (List4)
10988 5 => False), -- unused
10989
10990 N_Asynchronous_Select =>
10991 (1 => True, -- Triggering_Alternative (Node1)
10992 2 => True, -- Abortable_Part (Node2)
10993 3 => False, -- unused
10994 4 => False, -- unused
10995 5 => False), -- unused
10996
10997 N_Triggering_Alternative =>
10998 (1 => True, -- Triggering_Statement (Node1)
10999 2 => False, -- unused
11000 3 => True, -- Statements (List3)
11001 4 => True, -- Pragmas_Before (List4)
11002 5 => False), -- unused
11003
11004 N_Abortable_Part =>
11005 (1 => False, -- unused
11006 2 => False, -- unused
11007 3 => True, -- Statements (List3)
11008 4 => False, -- unused
11009 5 => False), -- unused
11010
11011 N_Abort_Statement =>
11012 (1 => False, -- unused
11013 2 => True, -- Names (List2)
11014 3 => False, -- unused
11015 4 => False, -- unused
11016 5 => False), -- unused
11017
11018 N_Compilation_Unit =>
11019 (1 => True, -- Context_Items (List1)
11020 2 => True, -- Unit (Node2)
11021 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
11022 4 => False, -- Library_Unit (Node4-Sem)
11023 5 => True), -- Aux_Decls_Node (Node5)
11024
11025 N_Compilation_Unit_Aux =>
11026 (1 => True, -- Actions (List1)
11027 2 => True, -- Declarations (List2)
11028 3 => False, -- Default_Storage_Pool (Node3)
11029 4 => True, -- Config_Pragmas (List4)
11030 5 => True), -- Pragmas_After (List5)
11031
11032 N_With_Clause =>
11033 (1 => False, -- unused
11034 2 => True, -- Name (Node2)
11035 3 => False, -- unused
11036 4 => False, -- Library_Unit (Node4-Sem)
11037 5 => False), -- Corresponding_Spec (Node5-Sem)
11038
11039 N_Subprogram_Body_Stub =>
11040 (1 => True, -- Specification (Node1)
11041 2 => False, -- unused
11042 3 => False, -- unused
11043 4 => False, -- Library_Unit (Node4-Sem)
11044 5 => False), -- Corresponding_Body (Node5-Sem)
11045
11046 N_Package_Body_Stub =>
11047 (1 => True, -- Defining_Identifier (Node1)
11048 2 => False, -- unused
11049 3 => False, -- unused
11050 4 => False, -- Library_Unit (Node4-Sem)
11051 5 => False), -- Corresponding_Body (Node5-Sem)
11052
11053 N_Task_Body_Stub =>
11054 (1 => True, -- Defining_Identifier (Node1)
11055 2 => False, -- unused
11056 3 => False, -- unused
11057 4 => False, -- Library_Unit (Node4-Sem)
11058 5 => False), -- Corresponding_Body (Node5-Sem)
11059
11060 N_Protected_Body_Stub =>
11061 (1 => True, -- Defining_Identifier (Node1)
11062 2 => False, -- unused
11063 3 => False, -- unused
11064 4 => False, -- Library_Unit (Node4-Sem)
11065 5 => False), -- Corresponding_Body (Node5-Sem)
11066
11067 N_Subunit =>
11068 (1 => True, -- Proper_Body (Node1)
11069 2 => True, -- Name (Node2)
11070 3 => False, -- Corresponding_Stub (Node3-Sem)
11071 4 => False, -- unused
11072 5 => False), -- unused
11073
11074 N_Exception_Declaration =>
11075 (1 => True, -- Defining_Identifier (Node1)
11076 2 => False, -- unused
11077 3 => False, -- Expression (Node3-Sem)
11078 4 => False, -- unused
11079 5 => False), -- unused
11080
11081 N_Handled_Sequence_Of_Statements =>
11082 (1 => True, -- At_End_Proc (Node1)
11083 2 => False, -- First_Real_Statement (Node2-Sem)
11084 3 => True, -- Statements (List3)
11085 4 => True, -- End_Label (Node4)
11086 5 => True), -- Exception_Handlers (List5)
11087
11088 N_Exception_Handler =>
11089 (1 => False, -- Local_Raise_Statements (Elist1)
11090 2 => True, -- Choice_Parameter (Node2)
11091 3 => True, -- Statements (List3)
11092 4 => True, -- Exception_Choices (List4)
11093 5 => False), -- Exception_Label (Node5)
11094
11095 N_Raise_Statement =>
11096 (1 => False, -- unused
11097 2 => True, -- Name (Node2)
11098 3 => True, -- Expression (Node3)
11099 4 => False, -- unused
11100 5 => False), -- unused
11101
11102 N_Generic_Subprogram_Declaration =>
11103 (1 => True, -- Specification (Node1)
11104 2 => True, -- Generic_Formal_Declarations (List2)
11105 3 => False, -- unused
11106 4 => False, -- Parent_Spec (Node4-Sem)
11107 5 => False), -- Corresponding_Body (Node5-Sem)
11108
11109 N_Generic_Package_Declaration =>
11110 (1 => True, -- Specification (Node1)
11111 2 => True, -- Generic_Formal_Declarations (List2)
11112 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11113 4 => False, -- Parent_Spec (Node4-Sem)
11114 5 => False), -- Corresponding_Body (Node5-Sem)
11115
11116 N_Package_Instantiation =>
11117 (1 => True, -- Defining_Unit_Name (Node1)
11118 2 => True, -- Name (Node2)
11119 3 => True, -- Generic_Associations (List3)
11120 4 => False, -- Parent_Spec (Node4-Sem)
11121 5 => False), -- Instance_Spec (Node5-Sem)
11122
11123 N_Procedure_Instantiation =>
11124 (1 => True, -- Defining_Unit_Name (Node1)
11125 2 => True, -- Name (Node2)
11126 3 => True, -- Generic_Associations (List3)
11127 4 => False, -- Parent_Spec (Node4-Sem)
11128 5 => False), -- Instance_Spec (Node5-Sem)
11129
11130 N_Function_Instantiation =>
11131 (1 => True, -- Defining_Unit_Name (Node1)
11132 2 => True, -- Name (Node2)
11133 3 => True, -- Generic_Associations (List3)
11134 4 => False, -- Parent_Spec (Node4-Sem)
11135 5 => False), -- Instance_Spec (Node5-Sem)
11136
11137 N_Generic_Association =>
11138 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
11139 2 => True, -- Selector_Name (Node2)
11140 3 => False, -- unused
11141 4 => False, -- unused
11142 5 => False), -- unused
11143
11144 N_Formal_Object_Declaration =>
11145 (1 => True, -- Defining_Identifier (Node1)
11146 2 => False, -- unused
11147 3 => True, -- Access_Definition (Node3)
11148 4 => True, -- Subtype_Mark (Node4)
11149 5 => True), -- Default_Expression (Node5)
11150
11151 N_Formal_Type_Declaration =>
11152 (1 => True, -- Defining_Identifier (Node1)
11153 2 => False, -- unused
11154 3 => True, -- Formal_Type_Definition (Node3)
11155 4 => True, -- Discriminant_Specifications (List4)
11156 5 => False), -- unused
11157
11158 N_Formal_Private_Type_Definition =>
11159 (1 => False, -- unused
11160 2 => False, -- unused
11161 3 => False, -- unused
11162 4 => False, -- unused
11163 5 => False), -- unused
11164
11165 N_Formal_Derived_Type_Definition =>
11166 (1 => False, -- unused
11167 2 => True, -- Interface_List (List2)
11168 3 => False, -- unused
11169 4 => True, -- Subtype_Mark (Node4)
11170 5 => False), -- unused
11171
11172 N_Formal_Discrete_Type_Definition =>
11173 (1 => False, -- unused
11174 2 => False, -- unused
11175 3 => False, -- unused
11176 4 => False, -- unused
11177 5 => False), -- unused
11178
11179 N_Formal_Signed_Integer_Type_Definition =>
11180 (1 => False, -- unused
11181 2 => False, -- unused
11182 3 => False, -- unused
11183 4 => False, -- unused
11184 5 => False), -- unused
11185
11186 N_Formal_Modular_Type_Definition =>
11187 (1 => False, -- unused
11188 2 => False, -- unused
11189 3 => False, -- unused
11190 4 => False, -- unused
11191 5 => False), -- unused
11192
11193 N_Formal_Floating_Point_Definition =>
11194 (1 => False, -- unused
11195 2 => False, -- unused
11196 3 => False, -- unused
11197 4 => False, -- unused
11198 5 => False), -- unused
11199
11200 N_Formal_Ordinary_Fixed_Point_Definition =>
11201 (1 => False, -- unused
11202 2 => False, -- unused
11203 3 => False, -- unused
11204 4 => False, -- unused
11205 5 => False), -- unused
11206
11207 N_Formal_Decimal_Fixed_Point_Definition =>
11208 (1 => False, -- unused
11209 2 => False, -- unused
11210 3 => False, -- unused
11211 4 => False, -- unused
11212 5 => False), -- unused
11213
11214 N_Formal_Concrete_Subprogram_Declaration =>
11215 (1 => True, -- Specification (Node1)
11216 2 => True, -- Default_Name (Node2)
11217 3 => False, -- unused
11218 4 => False, -- unused
11219 5 => False), -- unused
11220
11221 N_Formal_Abstract_Subprogram_Declaration =>
11222 (1 => True, -- Specification (Node1)
11223 2 => True, -- Default_Name (Node2)
11224 3 => False, -- unused
11225 4 => False, -- unused
11226 5 => False), -- unused
11227
11228 N_Formal_Package_Declaration =>
11229 (1 => True, -- Defining_Identifier (Node1)
11230 2 => True, -- Name (Node2)
11231 3 => True, -- Generic_Associations (List3)
11232 4 => False, -- unused
11233 5 => False), -- Instance_Spec (Node5-Sem)
11234
11235 N_Attribute_Definition_Clause =>
11236 (1 => True, -- Chars (Name1)
11237 2 => True, -- Name (Node2)
11238 3 => True, -- Expression (Node3)
11239 4 => False, -- unused
11240 5 => False), -- Next_Rep_Item (Node5-Sem)
11241
11242 N_Aspect_Specification =>
11243 (1 => True, -- Identifier (Node1)
11244 2 => False, -- Aspect_Rep_Item (Node2-Sem)
11245 3 => True, -- Expression (Node3)
11246 4 => False, -- Entity (Node4-Sem)
11247 5 => False), -- Next_Rep_Item (Node5-Sem)
11248
11249 N_Enumeration_Representation_Clause =>
11250 (1 => True, -- Identifier (Node1)
11251 2 => False, -- unused
11252 3 => True, -- Array_Aggregate (Node3)
11253 4 => False, -- unused
11254 5 => False), -- Next_Rep_Item (Node5-Sem)
11255
11256 N_Record_Representation_Clause =>
11257 (1 => True, -- Identifier (Node1)
11258 2 => True, -- Mod_Clause (Node2)
11259 3 => True, -- Component_Clauses (List3)
11260 4 => False, -- unused
11261 5 => False), -- Next_Rep_Item (Node5-Sem)
11262
11263 N_Component_Clause =>
11264 (1 => True, -- Component_Name (Node1)
11265 2 => True, -- Position (Node2)
11266 3 => True, -- First_Bit (Node3)
11267 4 => True, -- Last_Bit (Node4)
11268 5 => False), -- unused
11269
11270 N_Code_Statement =>
11271 (1 => False, -- unused
11272 2 => False, -- unused
11273 3 => True, -- Expression (Node3)
11274 4 => False, -- unused
11275 5 => False), -- unused
11276
11277 N_Op_Rotate_Left =>
11278 (1 => True, -- Chars (Name1)
11279 2 => True, -- Left_Opnd (Node2)
11280 3 => True, -- Right_Opnd (Node3)
11281 4 => False, -- Entity (Node4-Sem)
11282 5 => False), -- Etype (Node5-Sem)
11283
11284 N_Op_Rotate_Right =>
11285 (1 => True, -- Chars (Name1)
11286 2 => True, -- Left_Opnd (Node2)
11287 3 => True, -- Right_Opnd (Node3)
11288 4 => False, -- Entity (Node4-Sem)
11289 5 => False), -- Etype (Node5-Sem)
11290
11291 N_Op_Shift_Left =>
11292 (1 => True, -- Chars (Name1)
11293 2 => True, -- Left_Opnd (Node2)
11294 3 => True, -- Right_Opnd (Node3)
11295 4 => False, -- Entity (Node4-Sem)
11296 5 => False), -- Etype (Node5-Sem)
11297
11298 N_Op_Shift_Right_Arithmetic =>
11299 (1 => True, -- Chars (Name1)
11300 2 => True, -- Left_Opnd (Node2)
11301 3 => True, -- Right_Opnd (Node3)
11302 4 => False, -- Entity (Node4-Sem)
11303 5 => False), -- Etype (Node5-Sem)
11304
11305 N_Op_Shift_Right =>
11306 (1 => True, -- Chars (Name1)
11307 2 => True, -- Left_Opnd (Node2)
11308 3 => True, -- Right_Opnd (Node3)
11309 4 => False, -- Entity (Node4-Sem)
11310 5 => False), -- Etype (Node5-Sem)
11311
11312 N_Delta_Constraint =>
11313 (1 => False, -- unused
11314 2 => False, -- unused
11315 3 => True, -- Delta_Expression (Node3)
11316 4 => True, -- Range_Constraint (Node4)
11317 5 => False), -- unused
11318
11319 N_At_Clause =>
11320 (1 => True, -- Identifier (Node1)
11321 2 => False, -- unused
11322 3 => True, -- Expression (Node3)
11323 4 => False, -- unused
11324 5 => False), -- unused
11325
11326 N_Mod_Clause =>
11327 (1 => False, -- unused
11328 2 => False, -- unused
11329 3 => True, -- Expression (Node3)
11330 4 => True, -- Pragmas_Before (List4)
11331 5 => False), -- unused
11332
11333 N_Conditional_Expression =>
11334 (1 => True, -- Expressions (List1)
11335 2 => False, -- Then_Actions (List2-Sem)
11336 3 => False, -- Else_Actions (List3-Sem)
11337 4 => False, -- unused
11338 5 => False), -- Etype (Node5-Sem)
11339
11340 N_Expanded_Name =>
11341 (1 => True, -- Chars (Name1)
11342 2 => True, -- Selector_Name (Node2)
11343 3 => True, -- Prefix (Node3)
11344 4 => False, -- Entity (Node4-Sem)
11345 5 => False), -- Etype (Node5-Sem)
11346
11347 N_Expression_With_Actions =>
11348 (1 => True, -- Actions (List1)
11349 2 => False, -- unused
11350 3 => True, -- Expression (Node3)
11351 4 => False, -- unused
11352 5 => False), -- unused
11353
11354 N_Free_Statement =>
11355 (1 => False, -- Storage_Pool (Node1-Sem)
11356 2 => False, -- Procedure_To_Call (Node2-Sem)
11357 3 => True, -- Expression (Node3)
11358 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
11359 5 => False), -- unused
11360
11361 N_Freeze_Entity =>
11362 (1 => True, -- Actions (List1)
11363 2 => False, -- Access_Types_To_Process (Elist2-Sem)
11364 3 => False, -- TSS_Elist (Elist3-Sem)
11365 4 => False, -- Entity (Node4-Sem)
11366 5 => False), -- First_Subtype_Link (Node5-Sem)
11367
11368 N_Implicit_Label_Declaration =>
11369 (1 => True, -- Defining_Identifier (Node1)
11370 2 => False, -- Label_Construct (Node2-Sem)
11371 3 => False, -- unused
11372 4 => False, -- unused
11373 5 => False), -- unused
11374
11375 N_Itype_Reference =>
11376 (1 => False, -- Itype (Node1-Sem)
11377 2 => False, -- unused
11378 3 => False, -- unused
11379 4 => False, -- unused
11380 5 => False), -- unused
11381
11382 N_Raise_Constraint_Error =>
11383 (1 => True, -- Condition (Node1)
11384 2 => False, -- unused
11385 3 => True, -- Reason (Uint3)
11386 4 => False, -- unused
11387 5 => False), -- Etype (Node5-Sem)
11388
11389 N_Raise_Program_Error =>
11390 (1 => True, -- Condition (Node1)
11391 2 => False, -- unused
11392 3 => True, -- Reason (Uint3)
11393 4 => False, -- unused
11394 5 => False), -- Etype (Node5-Sem)
11395
11396 N_Raise_Storage_Error =>
11397 (1 => True, -- Condition (Node1)
11398 2 => False, -- unused
11399 3 => True, -- Reason (Uint3)
11400 4 => False, -- unused
11401 5 => False), -- Etype (Node5-Sem)
11402
11403 N_Push_Constraint_Error_Label =>
11404 (1 => False, -- unused
11405 2 => False, -- unused
11406 3 => False, -- unused
11407 4 => False, -- unused
11408 5 => False), -- unused
11409
11410 N_Push_Program_Error_Label =>
11411 (1 => False, -- Exception_Label
11412 2 => False, -- unused
11413 3 => False, -- unused
11414 4 => False, -- unused
11415 5 => False), -- Exception_Label
11416
11417 N_Push_Storage_Error_Label =>
11418 (1 => False, -- Exception_Label
11419 2 => False, -- unused
11420 3 => False, -- unused
11421 4 => False, -- unused
11422 5 => False), -- Exception_Label
11423
11424 N_Pop_Constraint_Error_Label =>
11425 (1 => False, -- unused
11426 2 => False, -- unused
11427 3 => False, -- unused
11428 4 => False, -- unused
11429 5 => False), -- unused
11430
11431 N_Pop_Program_Error_Label =>
11432 (1 => False, -- unused
11433 2 => False, -- unused
11434 3 => False, -- unused
11435 4 => False, -- unused
11436 5 => False), -- unused
11437
11438 N_Pop_Storage_Error_Label =>
11439 (1 => False, -- unused
11440 2 => False, -- unused
11441 3 => False, -- unused
11442 4 => False, -- unused
11443 5 => False), -- unused
11444
11445 N_Reference =>
11446 (1 => False, -- unused
11447 2 => False, -- unused
11448 3 => True, -- Prefix (Node3)
11449 4 => False, -- unused
11450 5 => False), -- Etype (Node5-Sem)
11451
11452 N_Subprogram_Info =>
11453 (1 => True, -- Identifier (Node1)
11454 2 => False, -- unused
11455 3 => False, -- unused
11456 4 => False, -- unused
11457 5 => False), -- Etype (Node5-Sem)
11458
11459 N_Unchecked_Expression =>
11460 (1 => False, -- unused
11461 2 => False, -- unused
11462 3 => True, -- Expression (Node3)
11463 4 => False, -- unused
11464 5 => False), -- Etype (Node5-Sem)
11465
11466 N_Unchecked_Type_Conversion =>
11467 (1 => False, -- unused
11468 2 => False, -- unused
11469 3 => True, -- Expression (Node3)
11470 4 => True, -- Subtype_Mark (Node4)
11471 5 => False), -- Etype (Node5-Sem)
11472
11473 N_Validate_Unchecked_Conversion =>
11474 (1 => False, -- Source_Type (Node1-Sem)
11475 2 => False, -- Target_Type (Node2-Sem)
11476 3 => False, -- unused
11477 4 => False, -- unused
11478 5 => False), -- unused
11479
11480 -- Entries for SCIL nodes
11481
11482 N_SCIL_Dispatch_Table_Tag_Init =>
11483 (1 => False, -- unused
11484 2 => False, -- unused
11485 3 => False, -- unused
11486 4 => False, -- SCIL_Entity (Node4-Sem)
11487 5 => False), -- unused
11488
11489 N_SCIL_Dispatching_Call =>
11490 (1 => False, -- unused
11491 2 => False, -- SCIL_Target_Prim (Node2-Sem)
11492 3 => False, -- unused
11493 4 => False, -- SCIL_Entity (Node4-Sem)
11494 5 => False), -- SCIL_Controlling_Tag (Node5-Sem)
11495
11496 N_SCIL_Membership_Test =>
11497 (1 => False, -- unused
11498 2 => False, -- unused
11499 3 => False, -- unused
11500 4 => False, -- SCIL_Entity (Node4-Sem)
11501 5 => False), -- SCIL_Tag_Value (Node5-Sem)
11502
11503 -- Entries for Empty, Error and Unused. Even thought these have a Chars
11504 -- field for debugging purposes, they are not really syntactic fields, so
11505 -- we mark all fields as unused.
11506
11507 N_Empty =>
11508 (1 => False, -- unused
11509 2 => False, -- unused
11510 3 => False, -- unused
11511 4 => False, -- unused
11512 5 => False), -- unused
11513
11514 N_Error =>
11515 (1 => False, -- unused
11516 2 => False, -- unused
11517 3 => False, -- unused
11518 4 => False, -- unused
11519 5 => False), -- unused
11520
11521 N_Unused_At_Start =>
11522 (1 => False, -- unused
11523 2 => False, -- unused
11524 3 => False, -- unused
11525 4 => False, -- unused
11526 5 => False), -- unused
11527
11528 N_Unused_At_End =>
11529 (1 => False, -- unused
11530 2 => False, -- unused
11531 3 => False, -- unused
11532 4 => False, -- unused
11533 5 => False)); -- unused
11534
11535 --------------------
11536 -- Inline Pragmas --
11537 --------------------
11538
11539 pragma Inline (ABE_Is_Certain);
11540 pragma Inline (Abort_Present);
11541 pragma Inline (Abortable_Part);
11542 pragma Inline (Abstract_Present);
11543 pragma Inline (Accept_Handler_Records);
11544 pragma Inline (Accept_Statement);
11545 pragma Inline (Access_Definition);
11546 pragma Inline (Access_To_Subprogram_Definition);
11547 pragma Inline (Access_Types_To_Process);
11548 pragma Inline (Actions);
11549 pragma Inline (Activation_Chain_Entity);
11550 pragma Inline (Acts_As_Spec);
11551 pragma Inline (Actual_Designated_Subtype);
11552 pragma Inline (Address_Warning_Posted);
11553 pragma Inline (Aggregate_Bounds);
11554 pragma Inline (Aliased_Present);
11555 pragma Inline (All_Others);
11556 pragma Inline (All_Present);
11557 pragma Inline (Alternatives);
11558 pragma Inline (Ancestor_Part);
11559 pragma Inline (Array_Aggregate);
11560 pragma Inline (Aspect_Cancel);
11561 pragma Inline (Aspect_Rep_Item);
11562 pragma Inline (Assignment_OK);
11563 pragma Inline (Associated_Node);
11564 pragma Inline (At_End_Proc);
11565 pragma Inline (Attribute_Name);
11566 pragma Inline (Aux_Decls_Node);
11567 pragma Inline (Backwards_OK);
11568 pragma Inline (Bad_Is_Detected);
11569 pragma Inline (Body_To_Inline);
11570 pragma Inline (Body_Required);
11571 pragma Inline (By_Ref);
11572 pragma Inline (Box_Present);
11573 pragma Inline (Char_Literal_Value);
11574 pragma Inline (Chars);
11575 pragma Inline (Check_Address_Alignment);
11576 pragma Inline (Choice_Parameter);
11577 pragma Inline (Choices);
11578 pragma Inline (Class_Present);
11579 pragma Inline (Coextensions);
11580 pragma Inline (Comes_From_Extended_Return_Statement);
11581 pragma Inline (Compile_Time_Known_Aggregate);
11582 pragma Inline (Component_Associations);
11583 pragma Inline (Component_Clauses);
11584 pragma Inline (Component_Definition);
11585 pragma Inline (Component_Items);
11586 pragma Inline (Component_List);
11587 pragma Inline (Component_Name);
11588 pragma Inline (Componentwise_Assignment);
11589 pragma Inline (Condition);
11590 pragma Inline (Condition_Actions);
11591 pragma Inline (Config_Pragmas);
11592 pragma Inline (Constant_Present);
11593 pragma Inline (Constraint);
11594 pragma Inline (Constraints);
11595 pragma Inline (Context_Installed);
11596 pragma Inline (Context_Items);
11597 pragma Inline (Context_Pending);
11598 pragma Inline (Controlling_Argument);
11599 pragma Inline (Conversion_OK);
11600 pragma Inline (Corresponding_Body);
11601 pragma Inline (Corresponding_Formal_Spec);
11602 pragma Inline (Corresponding_Generic_Association);
11603 pragma Inline (Corresponding_Integer_Value);
11604 pragma Inline (Corresponding_Spec);
11605 pragma Inline (Corresponding_Stub);
11606 pragma Inline (Dcheck_Function);
11607 pragma Inline (Debug_Statement);
11608 pragma Inline (Declarations);
11609 pragma Inline (Default_Expression);
11610 pragma Inline (Default_Storage_Pool);
11611 pragma Inline (Default_Name);
11612 pragma Inline (Defining_Identifier);
11613 pragma Inline (Defining_Unit_Name);
11614 pragma Inline (Delay_Alternative);
11615 pragma Inline (Delay_Statement);
11616 pragma Inline (Delta_Expression);
11617 pragma Inline (Digits_Expression);
11618 pragma Inline (Discr_Check_Funcs_Built);
11619 pragma Inline (Discrete_Choices);
11620 pragma Inline (Discrete_Range);
11621 pragma Inline (Discrete_Subtype_Definition);
11622 pragma Inline (Discrete_Subtype_Definitions);
11623 pragma Inline (Discriminant_Specifications);
11624 pragma Inline (Discriminant_Type);
11625 pragma Inline (Do_Accessibility_Check);
11626 pragma Inline (Do_Discriminant_Check);
11627 pragma Inline (Do_Length_Check);
11628 pragma Inline (Do_Division_Check);
11629 pragma Inline (Do_Overflow_Check);
11630 pragma Inline (Do_Range_Check);
11631 pragma Inline (Do_Storage_Check);
11632 pragma Inline (Do_Tag_Check);
11633 pragma Inline (Elaborate_Present);
11634 pragma Inline (Elaborate_All_Desirable);
11635 pragma Inline (Elaborate_All_Present);
11636 pragma Inline (Elaborate_Desirable);
11637 pragma Inline (Elaboration_Boolean);
11638 pragma Inline (Else_Actions);
11639 pragma Inline (Else_Statements);
11640 pragma Inline (Elsif_Parts);
11641 pragma Inline (Enclosing_Variant);
11642 pragma Inline (End_Label);
11643 pragma Inline (End_Span);
11644 pragma Inline (Entity);
11645 pragma Inline (Entity_Or_Associated_Node);
11646 pragma Inline (Entry_Body_Formal_Part);
11647 pragma Inline (Entry_Call_Alternative);
11648 pragma Inline (Entry_Call_Statement);
11649 pragma Inline (Entry_Direct_Name);
11650 pragma Inline (Entry_Index);
11651 pragma Inline (Entry_Index_Specification);
11652 pragma Inline (Etype);
11653 pragma Inline (Exception_Choices);
11654 pragma Inline (Exception_Handlers);
11655 pragma Inline (Exception_Junk);
11656 pragma Inline (Exception_Label);
11657 pragma Inline (Expansion_Delayed);
11658 pragma Inline (Explicit_Actual_Parameter);
11659 pragma Inline (Explicit_Generic_Actual_Parameter);
11660 pragma Inline (Expression);
11661 pragma Inline (Expressions);
11662 pragma Inline (First_Bit);
11663 pragma Inline (First_Inlined_Subprogram);
11664 pragma Inline (First_Name);
11665 pragma Inline (First_Named_Actual);
11666 pragma Inline (First_Real_Statement);
11667 pragma Inline (First_Subtype_Link);
11668 pragma Inline (Float_Truncate);
11669 pragma Inline (Formal_Type_Definition);
11670 pragma Inline (Forwards_OK);
11671 pragma Inline (From_Aspect_Specification);
11672 pragma Inline (From_At_End);
11673 pragma Inline (From_At_Mod);
11674 pragma Inline (From_Default);
11675 pragma Inline (Generic_Associations);
11676 pragma Inline (Generic_Formal_Declarations);
11677 pragma Inline (Generic_Parent);
11678 pragma Inline (Generic_Parent_Type);
11679 pragma Inline (Handled_Statement_Sequence);
11680 pragma Inline (Handler_List_Entry);
11681 pragma Inline (Has_Created_Identifier);
11682 pragma Inline (Has_Dynamic_Length_Check);
11683 pragma Inline (Has_Dynamic_Range_Check);
11684 pragma Inline (Has_Init_Expression);
11685 pragma Inline (Has_Local_Raise);
11686 pragma Inline (Has_Self_Reference);
11687 pragma Inline (Has_No_Elaboration_Code);
11688 pragma Inline (Has_Pragma_CPU);
11689 pragma Inline (Has_Pragma_Priority);
11690 pragma Inline (Has_Pragma_Suppress_All);
11691 pragma Inline (Has_Private_View);
11692 pragma Inline (Has_Relative_Deadline_Pragma);
11693 pragma Inline (Has_Storage_Size_Pragma);
11694 pragma Inline (Has_Task_Info_Pragma);
11695 pragma Inline (Has_Task_Name_Pragma);
11696 pragma Inline (Has_Wide_Character);
11697 pragma Inline (Has_Wide_Wide_Character);
11698 pragma Inline (Hidden_By_Use_Clause);
11699 pragma Inline (High_Bound);
11700 pragma Inline (Identifier);
11701 pragma Inline (Implicit_With);
11702 pragma Inline (Interface_List);
11703 pragma Inline (Interface_Present);
11704 pragma Inline (Includes_Infinities);
11705 pragma Inline (Import_Interface_Present);
11706 pragma Inline (In_Present);
11707 pragma Inline (Inherited_Discriminant);
11708 pragma Inline (Instance_Spec);
11709 pragma Inline (Intval);
11710 pragma Inline (Is_Accessibility_Actual);
11711 pragma Inline (Is_Asynchronous_Call_Block);
11712 pragma Inline (Is_Component_Left_Opnd);
11713 pragma Inline (Is_Component_Right_Opnd);
11714 pragma Inline (Is_Controlling_Actual);
11715 pragma Inline (Is_Delayed_Aspect);
11716 pragma Inline (Is_Dynamic_Coextension);
11717 pragma Inline (Is_Elsif);
11718 pragma Inline (Is_Entry_Barrier_Function);
11719 pragma Inline (Is_Expanded_Build_In_Place_Call);
11720 pragma Inline (Is_Folded_In_Parser);
11721 pragma Inline (Is_In_Discriminant_Check);
11722 pragma Inline (Is_Machine_Number);
11723 pragma Inline (Is_Null_Loop);
11724 pragma Inline (Is_Overloaded);
11725 pragma Inline (Is_Power_Of_2_For_Shift);
11726 pragma Inline (Is_Protected_Subprogram_Body);
11727 pragma Inline (Is_Static_Coextension);
11728 pragma Inline (Is_Static_Expression);
11729 pragma Inline (Is_Subprogram_Descriptor);
11730 pragma Inline (Is_Task_Allocation_Block);
11731 pragma Inline (Is_Task_Master);
11732 pragma Inline (Iteration_Scheme);
11733 pragma Inline (Itype);
11734 pragma Inline (Kill_Range_Check);
11735 pragma Inline (Last_Bit);
11736 pragma Inline (Last_Name);
11737 pragma Inline (Library_Unit);
11738 pragma Inline (Label_Construct);
11739 pragma Inline (Left_Opnd);
11740 pragma Inline (Limited_View_Installed);
11741 pragma Inline (Limited_Present);
11742 pragma Inline (Literals);
11743 pragma Inline (Local_Raise_Not_OK);
11744 pragma Inline (Local_Raise_Statements);
11745 pragma Inline (Loop_Actions);
11746 pragma Inline (Loop_Parameter_Specification);
11747 pragma Inline (Low_Bound);
11748 pragma Inline (Mod_Clause);
11749 pragma Inline (More_Ids);
11750 pragma Inline (Must_Be_Byte_Aligned);
11751 pragma Inline (Must_Not_Freeze);
11752 pragma Inline (Must_Not_Override);
11753 pragma Inline (Must_Override);
11754 pragma Inline (Name);
11755 pragma Inline (Names);
11756 pragma Inline (Next_Entity);
11757 pragma Inline (Next_Exit_Statement);
11758 pragma Inline (Next_Implicit_With);
11759 pragma Inline (Next_Named_Actual);
11760 pragma Inline (Next_Pragma);
11761 pragma Inline (Next_Rep_Item);
11762 pragma Inline (Next_Use_Clause);
11763 pragma Inline (No_Ctrl_Actions);
11764 pragma Inline (No_Elaboration_Check);
11765 pragma Inline (No_Entities_Ref_In_Spec);
11766 pragma Inline (No_Initialization);
11767 pragma Inline (No_Truncation);
11768 pragma Inline (Null_Present);
11769 pragma Inline (Null_Exclusion_Present);
11770 pragma Inline (Null_Exclusion_In_Return_Present);
11771 pragma Inline (Null_Record_Present);
11772 pragma Inline (Object_Definition);
11773 pragma Inline (Original_Discriminant);
11774 pragma Inline (Original_Entity);
11775 pragma Inline (Others_Discrete_Choices);
11776 pragma Inline (Out_Present);
11777 pragma Inline (Parameter_Associations);
11778 pragma Inline (Parameter_Specifications);
11779 pragma Inline (Parameter_List_Truncated);
11780 pragma Inline (Parameter_Type);
11781 pragma Inline (Parent_Spec);
11782 pragma Inline (Position);
11783 pragma Inline (Pragma_Argument_Associations);
11784 pragma Inline (Pragma_Enabled);
11785 pragma Inline (Pragma_Identifier);
11786 pragma Inline (Pragmas_After);
11787 pragma Inline (Pragmas_Before);
11788 pragma Inline (Prefix);
11789 pragma Inline (Present_Expr);
11790 pragma Inline (Prev_Ids);
11791 pragma Inline (Print_In_Hex);
11792 pragma Inline (Private_Declarations);
11793 pragma Inline (Private_Present);
11794 pragma Inline (Procedure_To_Call);
11795 pragma Inline (Proper_Body);
11796 pragma Inline (Protected_Definition);
11797 pragma Inline (Protected_Present);
11798 pragma Inline (Raises_Constraint_Error);
11799 pragma Inline (Range_Constraint);
11800 pragma Inline (Range_Expression);
11801 pragma Inline (Real_Range_Specification);
11802 pragma Inline (Realval);
11803 pragma Inline (Reason);
11804 pragma Inline (Record_Extension_Part);
11805 pragma Inline (Redundant_Use);
11806 pragma Inline (Renaming_Exception);
11807 pragma Inline (Result_Definition);
11808 pragma Inline (Return_Object_Declarations);
11809 pragma Inline (Return_Statement_Entity);
11810 pragma Inline (Reverse_Present);
11811 pragma Inline (Right_Opnd);
11812 pragma Inline (Rounded_Result);
11813 pragma Inline (SCIL_Controlling_Tag);
11814 pragma Inline (SCIL_Entity);
11815 pragma Inline (SCIL_Tag_Value);
11816 pragma Inline (SCIL_Target_Prim);
11817 pragma Inline (Scope);
11818 pragma Inline (Select_Alternatives);
11819 pragma Inline (Selector_Name);
11820 pragma Inline (Selector_Names);
11821 pragma Inline (Shift_Count_OK);
11822 pragma Inline (Source_Type);
11823 pragma Inline (Specification);
11824 pragma Inline (Split_PPC);
11825 pragma Inline (Statements);
11826 pragma Inline (Static_Processing_OK);
11827 pragma Inline (Storage_Pool);
11828 pragma Inline (Strval);
11829 pragma Inline (Subtype_Indication);
11830 pragma Inline (Subtype_Mark);
11831 pragma Inline (Subtype_Marks);
11832 pragma Inline (Suppress_Loop_Warnings);
11833 pragma Inline (Synchronized_Present);
11834 pragma Inline (Tagged_Present);
11835 pragma Inline (Target_Type);
11836 pragma Inline (Task_Definition);
11837 pragma Inline (Task_Present);
11838 pragma Inline (Then_Actions);
11839 pragma Inline (Then_Statements);
11840 pragma Inline (Triggering_Alternative);
11841 pragma Inline (Triggering_Statement);
11842 pragma Inline (Treat_Fixed_As_Integer);
11843 pragma Inline (TSS_Elist);
11844 pragma Inline (Type_Definition);
11845 pragma Inline (Unit);
11846 pragma Inline (Unknown_Discriminants_Present);
11847 pragma Inline (Unreferenced_In_Spec);
11848 pragma Inline (Variant_Part);
11849 pragma Inline (Variants);
11850 pragma Inline (Visible_Declarations);
11851 pragma Inline (Was_Originally_Stub);
11852 pragma Inline (Withed_Body);
11853 pragma Inline (Zero_Cost_Handling);
11854
11855 pragma Inline (Set_ABE_Is_Certain);
11856 pragma Inline (Set_Abort_Present);
11857 pragma Inline (Set_Abortable_Part);
11858 pragma Inline (Set_Abstract_Present);
11859 pragma Inline (Set_Accept_Handler_Records);
11860 pragma Inline (Set_Accept_Statement);
11861 pragma Inline (Set_Access_Definition);
11862 pragma Inline (Set_Access_To_Subprogram_Definition);
11863 pragma Inline (Set_Access_Types_To_Process);
11864 pragma Inline (Set_Actions);
11865 pragma Inline (Set_Activation_Chain_Entity);
11866 pragma Inline (Set_Acts_As_Spec);
11867 pragma Inline (Set_Actual_Designated_Subtype);
11868 pragma Inline (Set_Address_Warning_Posted);
11869 pragma Inline (Set_Aggregate_Bounds);
11870 pragma Inline (Set_Aliased_Present);
11871 pragma Inline (Set_All_Others);
11872 pragma Inline (Set_All_Present);
11873 pragma Inline (Set_Alternatives);
11874 pragma Inline (Set_Ancestor_Part);
11875 pragma Inline (Set_Array_Aggregate);
11876 pragma Inline (Set_Aspect_Cancel);
11877 pragma Inline (Set_Aspect_Rep_Item);
11878 pragma Inline (Set_Assignment_OK);
11879 pragma Inline (Set_Associated_Node);
11880 pragma Inline (Set_At_End_Proc);
11881 pragma Inline (Set_Attribute_Name);
11882 pragma Inline (Set_Aux_Decls_Node);
11883 pragma Inline (Set_Backwards_OK);
11884 pragma Inline (Set_Bad_Is_Detected);
11885 pragma Inline (Set_Body_To_Inline);
11886 pragma Inline (Set_Body_Required);
11887 pragma Inline (Set_By_Ref);
11888 pragma Inline (Set_Box_Present);
11889 pragma Inline (Set_Char_Literal_Value);
11890 pragma Inline (Set_Chars);
11891 pragma Inline (Set_Check_Address_Alignment);
11892 pragma Inline (Set_Choice_Parameter);
11893 pragma Inline (Set_Choices);
11894 pragma Inline (Set_Class_Present);
11895 pragma Inline (Set_Coextensions);
11896 pragma Inline (Set_Comes_From_Extended_Return_Statement);
11897 pragma Inline (Set_Compile_Time_Known_Aggregate);
11898 pragma Inline (Set_Component_Associations);
11899 pragma Inline (Set_Component_Clauses);
11900 pragma Inline (Set_Component_Definition);
11901 pragma Inline (Set_Component_Items);
11902 pragma Inline (Set_Component_List);
11903 pragma Inline (Set_Component_Name);
11904 pragma Inline (Set_Componentwise_Assignment);
11905 pragma Inline (Set_Condition);
11906 pragma Inline (Set_Condition_Actions);
11907 pragma Inline (Set_Config_Pragmas);
11908 pragma Inline (Set_Constant_Present);
11909 pragma Inline (Set_Constraint);
11910 pragma Inline (Set_Constraints);
11911 pragma Inline (Set_Context_Installed);
11912 pragma Inline (Set_Context_Items);
11913 pragma Inline (Set_Context_Pending);
11914 pragma Inline (Set_Controlling_Argument);
11915 pragma Inline (Set_Conversion_OK);
11916 pragma Inline (Set_Corresponding_Body);
11917 pragma Inline (Set_Corresponding_Formal_Spec);
11918 pragma Inline (Set_Corresponding_Generic_Association);
11919 pragma Inline (Set_Corresponding_Integer_Value);
11920 pragma Inline (Set_Corresponding_Spec);
11921 pragma Inline (Set_Corresponding_Stub);
11922 pragma Inline (Set_Dcheck_Function);
11923 pragma Inline (Set_Debug_Statement);
11924 pragma Inline (Set_Declarations);
11925 pragma Inline (Set_Default_Expression);
11926 pragma Inline (Set_Default_Storage_Pool);
11927 pragma Inline (Set_Default_Name);
11928 pragma Inline (Set_Defining_Identifier);
11929 pragma Inline (Set_Defining_Unit_Name);
11930 pragma Inline (Set_Delay_Alternative);
11931 pragma Inline (Set_Delay_Statement);
11932 pragma Inline (Set_Delta_Expression);
11933 pragma Inline (Set_Digits_Expression);
11934 pragma Inline (Set_Discr_Check_Funcs_Built);
11935 pragma Inline (Set_Discrete_Choices);
11936 pragma Inline (Set_Discrete_Range);
11937 pragma Inline (Set_Discrete_Subtype_Definition);
11938 pragma Inline (Set_Discrete_Subtype_Definitions);
11939 pragma Inline (Set_Discriminant_Specifications);
11940 pragma Inline (Set_Discriminant_Type);
11941 pragma Inline (Set_Do_Accessibility_Check);
11942 pragma Inline (Set_Do_Discriminant_Check);
11943 pragma Inline (Set_Do_Length_Check);
11944 pragma Inline (Set_Do_Division_Check);
11945 pragma Inline (Set_Do_Overflow_Check);
11946 pragma Inline (Set_Do_Range_Check);
11947 pragma Inline (Set_Do_Storage_Check);
11948 pragma Inline (Set_Do_Tag_Check);
11949 pragma Inline (Set_Elaborate_Present);
11950 pragma Inline (Set_Elaborate_All_Desirable);
11951 pragma Inline (Set_Elaborate_All_Present);
11952 pragma Inline (Set_Elaborate_Desirable);
11953 pragma Inline (Set_Elaboration_Boolean);
11954 pragma Inline (Set_Else_Actions);
11955 pragma Inline (Set_Else_Statements);
11956 pragma Inline (Set_Elsif_Parts);
11957 pragma Inline (Set_Enclosing_Variant);
11958 pragma Inline (Set_End_Label);
11959 pragma Inline (Set_End_Span);
11960 pragma Inline (Set_Entity);
11961 pragma Inline (Set_Entry_Body_Formal_Part);
11962 pragma Inline (Set_Entry_Call_Alternative);
11963 pragma Inline (Set_Entry_Call_Statement);
11964 pragma Inline (Set_Entry_Direct_Name);
11965 pragma Inline (Set_Entry_Index);
11966 pragma Inline (Set_Entry_Index_Specification);
11967 pragma Inline (Set_Etype);
11968 pragma Inline (Set_Exception_Choices);
11969 pragma Inline (Set_Exception_Handlers);
11970 pragma Inline (Set_Exception_Junk);
11971 pragma Inline (Set_Exception_Label);
11972 pragma Inline (Set_Expansion_Delayed);
11973 pragma Inline (Set_Explicit_Actual_Parameter);
11974 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
11975 pragma Inline (Set_Expression);
11976 pragma Inline (Set_Expressions);
11977 pragma Inline (Set_First_Bit);
11978 pragma Inline (Set_First_Inlined_Subprogram);
11979 pragma Inline (Set_First_Name);
11980 pragma Inline (Set_First_Named_Actual);
11981 pragma Inline (Set_First_Real_Statement);
11982 pragma Inline (Set_First_Subtype_Link);
11983 pragma Inline (Set_Float_Truncate);
11984 pragma Inline (Set_Formal_Type_Definition);
11985 pragma Inline (Set_Forwards_OK);
11986 pragma Inline (Set_From_Aspect_Specification);
11987 pragma Inline (Set_From_At_End);
11988 pragma Inline (Set_From_At_Mod);
11989 pragma Inline (Set_From_Default);
11990 pragma Inline (Set_Generic_Associations);
11991 pragma Inline (Set_Generic_Formal_Declarations);
11992 pragma Inline (Set_Generic_Parent);
11993 pragma Inline (Set_Generic_Parent_Type);
11994 pragma Inline (Set_Handled_Statement_Sequence);
11995 pragma Inline (Set_Handler_List_Entry);
11996 pragma Inline (Set_Has_Created_Identifier);
11997 pragma Inline (Set_Has_Dynamic_Length_Check);
11998 pragma Inline (Set_Has_Init_Expression);
11999 pragma Inline (Set_Has_Local_Raise);
12000 pragma Inline (Set_Has_Dynamic_Range_Check);
12001 pragma Inline (Set_Has_No_Elaboration_Code);
12002 pragma Inline (Set_Has_Pragma_CPU);
12003 pragma Inline (Set_Has_Pragma_Priority);
12004 pragma Inline (Set_Has_Pragma_Suppress_All);
12005 pragma Inline (Set_Has_Private_View);
12006 pragma Inline (Set_Has_Relative_Deadline_Pragma);
12007 pragma Inline (Set_Has_Storage_Size_Pragma);
12008 pragma Inline (Set_Has_Task_Info_Pragma);
12009 pragma Inline (Set_Has_Task_Name_Pragma);
12010 pragma Inline (Set_Has_Wide_Character);
12011 pragma Inline (Set_Has_Wide_Wide_Character);
12012 pragma Inline (Set_Hidden_By_Use_Clause);
12013 pragma Inline (Set_High_Bound);
12014 pragma Inline (Set_Identifier);
12015 pragma Inline (Set_Implicit_With);
12016 pragma Inline (Set_Includes_Infinities);
12017 pragma Inline (Set_Interface_List);
12018 pragma Inline (Set_Interface_Present);
12019 pragma Inline (Set_Import_Interface_Present);
12020 pragma Inline (Set_In_Present);
12021 pragma Inline (Set_Inherited_Discriminant);
12022 pragma Inline (Set_Instance_Spec);
12023 pragma Inline (Set_Intval);
12024 pragma Inline (Set_Is_Accessibility_Actual);
12025 pragma Inline (Set_Is_Asynchronous_Call_Block);
12026 pragma Inline (Set_Is_Component_Left_Opnd);
12027 pragma Inline (Set_Is_Component_Right_Opnd);
12028 pragma Inline (Set_Is_Controlling_Actual);
12029 pragma Inline (Set_Is_Delayed_Aspect);
12030 pragma Inline (Set_Is_Dynamic_Coextension);
12031 pragma Inline (Set_Is_Elsif);
12032 pragma Inline (Set_Is_Entry_Barrier_Function);
12033 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
12034 pragma Inline (Set_Is_Folded_In_Parser);
12035 pragma Inline (Set_Is_In_Discriminant_Check);
12036 pragma Inline (Set_Is_Machine_Number);
12037 pragma Inline (Set_Is_Null_Loop);
12038 pragma Inline (Set_Is_Overloaded);
12039 pragma Inline (Set_Is_Power_Of_2_For_Shift);
12040 pragma Inline (Set_Is_Protected_Subprogram_Body);
12041 pragma Inline (Set_Has_Self_Reference);
12042 pragma Inline (Set_Is_Static_Coextension);
12043 pragma Inline (Set_Is_Static_Expression);
12044 pragma Inline (Set_Is_Subprogram_Descriptor);
12045 pragma Inline (Set_Is_Task_Allocation_Block);
12046 pragma Inline (Set_Is_Task_Master);
12047 pragma Inline (Set_Iteration_Scheme);
12048 pragma Inline (Set_Itype);
12049 pragma Inline (Set_Kill_Range_Check);
12050 pragma Inline (Set_Last_Bit);
12051 pragma Inline (Set_Last_Name);
12052 pragma Inline (Set_Library_Unit);
12053 pragma Inline (Set_Label_Construct);
12054 pragma Inline (Set_Left_Opnd);
12055 pragma Inline (Set_Limited_View_Installed);
12056 pragma Inline (Set_Limited_Present);
12057 pragma Inline (Set_Literals);
12058 pragma Inline (Set_Local_Raise_Not_OK);
12059 pragma Inline (Set_Local_Raise_Statements);
12060 pragma Inline (Set_Loop_Actions);
12061 pragma Inline (Set_Loop_Parameter_Specification);
12062 pragma Inline (Set_Low_Bound);
12063 pragma Inline (Set_Mod_Clause);
12064 pragma Inline (Set_More_Ids);
12065 pragma Inline (Set_Must_Be_Byte_Aligned);
12066 pragma Inline (Set_Must_Not_Freeze);
12067 pragma Inline (Set_Must_Not_Override);
12068 pragma Inline (Set_Must_Override);
12069 pragma Inline (Set_Name);
12070 pragma Inline (Set_Names);
12071 pragma Inline (Set_Next_Entity);
12072 pragma Inline (Set_Next_Exit_Statement);
12073 pragma Inline (Set_Next_Implicit_With);
12074 pragma Inline (Set_Next_Named_Actual);
12075 pragma Inline (Set_Next_Pragma);
12076 pragma Inline (Set_Next_Rep_Item);
12077 pragma Inline (Set_Next_Use_Clause);
12078 pragma Inline (Set_No_Ctrl_Actions);
12079 pragma Inline (Set_No_Elaboration_Check);
12080 pragma Inline (Set_No_Entities_Ref_In_Spec);
12081 pragma Inline (Set_No_Initialization);
12082 pragma Inline (Set_No_Truncation);
12083 pragma Inline (Set_Null_Present);
12084 pragma Inline (Set_Null_Exclusion_Present);
12085 pragma Inline (Set_Null_Exclusion_In_Return_Present);
12086 pragma Inline (Set_Null_Record_Present);
12087 pragma Inline (Set_Object_Definition);
12088 pragma Inline (Set_Original_Discriminant);
12089 pragma Inline (Set_Original_Entity);
12090 pragma Inline (Set_Others_Discrete_Choices);
12091 pragma Inline (Set_Out_Present);
12092 pragma Inline (Set_Parameter_Associations);
12093 pragma Inline (Set_Parameter_Specifications);
12094 pragma Inline (Set_Parameter_List_Truncated);
12095 pragma Inline (Set_Parameter_Type);
12096 pragma Inline (Set_Parent_Spec);
12097 pragma Inline (Set_Position);
12098 pragma Inline (Set_Pragma_Argument_Associations);
12099 pragma Inline (Set_Pragma_Enabled);
12100 pragma Inline (Set_Pragma_Identifier);
12101 pragma Inline (Set_Pragmas_After);
12102 pragma Inline (Set_Pragmas_Before);
12103 pragma Inline (Set_Prefix);
12104 pragma Inline (Set_Present_Expr);
12105 pragma Inline (Set_Prev_Ids);
12106 pragma Inline (Set_Print_In_Hex);
12107 pragma Inline (Set_Private_Declarations);
12108 pragma Inline (Set_Private_Present);
12109 pragma Inline (Set_Procedure_To_Call);
12110 pragma Inline (Set_Proper_Body);
12111 pragma Inline (Set_Protected_Definition);
12112 pragma Inline (Set_Protected_Present);
12113 pragma Inline (Set_Raises_Constraint_Error);
12114 pragma Inline (Set_Range_Constraint);
12115 pragma Inline (Set_Range_Expression);
12116 pragma Inline (Set_Real_Range_Specification);
12117 pragma Inline (Set_Realval);
12118 pragma Inline (Set_Reason);
12119 pragma Inline (Set_Record_Extension_Part);
12120 pragma Inline (Set_Redundant_Use);
12121 pragma Inline (Set_Renaming_Exception);
12122 pragma Inline (Set_Result_Definition);
12123 pragma Inline (Set_Return_Object_Declarations);
12124 pragma Inline (Set_Reverse_Present);
12125 pragma Inline (Set_Right_Opnd);
12126 pragma Inline (Set_Rounded_Result);
12127 pragma Inline (Set_SCIL_Controlling_Tag);
12128 pragma Inline (Set_SCIL_Entity);
12129 pragma Inline (Set_SCIL_Tag_Value);
12130 pragma Inline (Set_SCIL_Target_Prim);
12131 pragma Inline (Set_Scope);
12132 pragma Inline (Set_Select_Alternatives);
12133 pragma Inline (Set_Selector_Name);
12134 pragma Inline (Set_Selector_Names);
12135 pragma Inline (Set_Shift_Count_OK);
12136 pragma Inline (Set_Source_Type);
12137 pragma Inline (Set_Specification);
12138 pragma Inline (Set_Split_PPC);
12139 pragma Inline (Set_Statements);
12140 pragma Inline (Set_Static_Processing_OK);
12141 pragma Inline (Set_Storage_Pool);
12142 pragma Inline (Set_Strval);
12143 pragma Inline (Set_Subtype_Indication);
12144 pragma Inline (Set_Subtype_Mark);
12145 pragma Inline (Set_Subtype_Marks);
12146 pragma Inline (Set_Suppress_Loop_Warnings);
12147 pragma Inline (Set_Synchronized_Present);
12148 pragma Inline (Set_Tagged_Present);
12149 pragma Inline (Set_Target_Type);
12150 pragma Inline (Set_Task_Definition);
12151 pragma Inline (Set_Task_Present);
12152 pragma Inline (Set_Then_Actions);
12153 pragma Inline (Set_Then_Statements);
12154 pragma Inline (Set_Triggering_Alternative);
12155 pragma Inline (Set_Triggering_Statement);
12156 pragma Inline (Set_Treat_Fixed_As_Integer);
12157 pragma Inline (Set_TSS_Elist);
12158 pragma Inline (Set_Type_Definition);
12159 pragma Inline (Set_Unit);
12160 pragma Inline (Set_Unknown_Discriminants_Present);
12161 pragma Inline (Set_Unreferenced_In_Spec);
12162 pragma Inline (Set_Variant_Part);
12163 pragma Inline (Set_Variants);
12164 pragma Inline (Set_Visible_Declarations);
12165 pragma Inline (Set_Was_Originally_Stub);
12166 pragma Inline (Set_Withed_Body);
12167 pragma Inline (Set_Zero_Cost_Handling);
12168
12169 N_Simple_Return_Statement : constant Node_Kind := N_Return_Statement;
12170 -- Rename N_Return_Statement to be N_Simple_Return_Statement. Clients
12171 -- should refer to N_Simple_Return_Statement.
12172
12173 end Sinfo;