osint.adb, [...]: Minor reformatting.
[gcc.git] / gcc / ada / sinfo.ads
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S I N F O --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
30 ------------------------------------------------------------------------------
31
32 -- This package defines the structure of the abstract syntax tree. The Tree
33 -- package provides a basic tree structure. Sinfo describes how this structure
34 -- is used to represent the syntax of an Ada program.
35
36 -- The grammar in the RM is followed very closely in the tree design, and is
37 -- repeated as part of this source file.
38
39 -- The tree contains not only the full syntactic representation of the
40 -- program, but also the results of semantic analysis. In particular, the
41 -- nodes for defining identifiers, defining character literals and defining
42 -- operator symbols, collectively referred to as entities, represent what
43 -- would normally be regarded as the symbol table information. In addition a
44 -- number of the tree nodes contain semantic information.
45
46 -- WARNING: Several files are automatically generated from this package.
47 -- See below for details.
48
49 with Namet; use Namet;
50 with Types; use Types;
51 with Uintp; use Uintp;
52 with Urealp; use Urealp;
53
54 package Sinfo is
55
56 ---------------------------------
57 -- Making Changes to This File --
58 ---------------------------------
59
60 -- If changes are made to this file, a number of related steps must be
61 -- carried out to ensure consistency. First, if a field access function is
62 -- added, it appears in seven places:
63
64 -- The documentation associated with the node
65 -- The spec of the access function in sinfo.ads
66 -- The body of the access function in sinfo.adb
67 -- The pragma Inline at the end of sinfo.ads for the access function
68 -- The spec of the set procedure in sinfo.ads
69 -- The body of the set procedure in sinfo.adb
70 -- The pragma Inline at the end of sinfo.ads for the set procedure
71
72 -- The field chosen must be consistent in all places, and, for a node that
73 -- is a subexpression, must not overlap any of the standard expression
74 -- fields.
75
76 -- In addition, if any of the standard expression fields is changed, then
77 -- the utility program which creates the Treeprs spec (in file treeprs.ads)
78 -- must be updated appropriately, since it special cases expression fields.
79
80 -- If a new tree node is added, then the following changes are made
81
82 -- Add it to the documentation in the appropriate place
83 -- Add its fields to this documentation section
84 -- Define it in the appropriate classification in Node_Kind
85 -- In the body (sinfo), add entries to the access functions for all
86 -- its fields (except standard expression fields) to include the new
87 -- node in the checks.
88 -- Add an appropriate section to the case statement in sprint.adb
89 -- Add an appropriate section to the case statement in sem.adb
90 -- Add an appropriate section to the case statement in exp_util.adb
91 -- (Insert_Actions procedure)
92 -- For a subexpression, add an appropriate section to the case
93 -- statement in sem_eval.adb
94 -- For a subexpression, add an appropriate section to the case
95 -- statement in sem_res.adb
96
97 -- Finally, four utility programs must be run:
98
99 -- Run CSinfo to check that you have made the changes consistently. It
100 -- checks most of the rules given above, with clear error messages. This
101 -- utility reads sinfo.ads and sinfo.adb and generates a report to
102 -- standard output.
103
104 -- Run XSinfo to create sinfo.h, the corresponding C header. This
105 -- utility reads sinfo.ads and generates sinfo.h. Note that it does
106 -- not need to read sinfo.adb, since the contents of the body are
107 -- algorithmically determinable from the spec.
108
109 -- Run XTreeprs to create treeprs.ads, an updated version of the module
110 -- that is used to drive the tree print routine. This utility reads (but
111 -- does not modify) treeprs.adt, the template that provides the basic
112 -- structure of the file, and then fills in the data from the comments
113 -- in sinfo.ads.
114
115 -- Run XNmake to create nmake.ads and nmake.adb, the package body and
116 -- spec of the Nmake package which contains functions for constructing
117 -- nodes.
118
119 -- All of the above steps except CSinfo are done automatically by the
120 -- build scripts when you do a full bootstrap.
121
122 -- Note: sometime we could write a utility that actually generated the body
123 -- of sinfo from the spec instead of simply checking it, since, as noted
124 -- above, the contents of the body can be determined from the spec.
125
126 --------------------------------
127 -- Implicit Nodes in the Tree --
128 --------------------------------
129
130 -- Generally the structure of the tree very closely follows the grammar as
131 -- defined in the RM. However, certain nodes are omitted to save space and
132 -- simplify semantic processing. Two general classes of such omitted nodes
133 -- are as follows:
134
135 -- If the only possibilities for a non-terminal are one or more other
136 -- non-terminals (i.e. the rule is a "skinny" rule), then usually the
137 -- corresponding node is omitted from the tree, and the target construct
138 -- appears directly. For example, a real type definition is either
139 -- floating point definition or a fixed point definition. No explicit node
140 -- appears for real type definition. Instead either the floating point
141 -- definition or fixed point definition appears directly.
142
143 -- If a non-terminal corresponds to a list of some other non-terminal
144 -- (possibly with separating punctuation), then usually it is omitted from
145 -- the tree, and a list of components appears instead. For example,
146 -- sequence of statements does not appear explicitly in the tree. Instead
147 -- a list of statements appears directly.
148
149 -- Some additional cases of omitted nodes occur and are documented
150 -- individually. In particular, many nodes are omitted in the tree
151 -- generated for an expression.
152
153 -------------------------------------------
154 -- Handling of Defining Identifier Lists --
155 -------------------------------------------
156
157 -- In several declarative forms in the syntax, lists of defining
158 -- identifiers appear (object declarations, component declarations, number
159 -- declarations etc.)
160
161 -- The semantics of such statements are equivalent to a series of identical
162 -- declarations of single defining identifiers (except that conformance
163 -- checks require the same grouping of identifiers in the parameter case).
164
165 -- To simplify semantic processing, the parser breaks down such multiple
166 -- declaration cases into sequences of single declarations, duplicating
167 -- type and initialization information as required. The flags More_Ids and
168 -- Prev_Ids are used to record the original form of the source in the case
169 -- where the original source used a list of names, More_Ids being set on
170 -- all but the last name and Prev_Ids being set on all but the first name.
171 -- These flags are used to reconstruct the original source (e.g. in the
172 -- Sprint package), and also are included in the conformance checks, but
173 -- otherwise have no semantic significance.
174
175 -- Note: the reason that we use More_Ids and Prev_Ids rather than
176 -- First_Name and Last_Name flags is so that the flags are off in the
177 -- normal one identifier case, which minimizes tree print output.
178
179 -----------------------
180 -- Use of Node Lists --
181 -----------------------
182
183 -- With a few exceptions, if a construction of the form {non-terminal}
184 -- appears in the tree, lists are used in the corresponding tree node (see
185 -- package Nlists for handling of node lists). In this case a field of the
186 -- parent node points to a list of nodes for the non-terminal. The field
187 -- name for such fields has a plural name which always ends in "s". For
188 -- example, a case statement has a field Alternatives pointing to list of
189 -- case statement alternative nodes.
190
191 -- Only fields pointing to lists have names ending in "s", so generally the
192 -- structure is strongly typed, fields not ending in s point to single
193 -- nodes, and fields ending in s point to lists.
194
195 -- The following example shows how a traversal of a list is written. We
196 -- suppose here that Stmt points to a N_Case_Statement node which has a
197 -- list field called Alternatives:
198
199 -- Alt := First (Alternatives (Stmt));
200 -- while Present (Alt) loop
201 -- ..
202 -- -- processing for case statement alternative Alt
203 -- ..
204 -- Alt := Next (Alt);
205 -- end loop;
206
207 -- The Present function tests for Empty, which in this case signals the end
208 -- of the list. First returns Empty immediately if the list is empty.
209 -- Present is defined in Atree, First and Next are defined in Nlists.
210
211 -- The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
212 -- contexts, which is handled as described in the previous section, and
213 -- with {,library_unit_NAME} in the N_With_Clause mode, which is handled
214 -- using the First_Name and Last_Name flags, as further detailed in the
215 -- description of the N_With_Clause node.
216
217 -------------
218 -- Pragmas --
219 -------------
220
221 -- Pragmas can appear in many different context, but are not included in
222 -- the grammar. Still they must appear in the tree, so they can be properly
223 -- processed.
224
225 -- Two approaches are used. In some cases, an extra field is defined in an
226 -- appropriate node that contains a list of pragmas appearing in the
227 -- expected context. For example pragmas can appear before an
228 -- Accept_Alternative in a Selective_Accept_Statement, and these pragmas
229 -- appear in the Pragmas_Before field of the N_Accept_Alternative node.
230
231 -- The other approach is to simply allow pragmas to appear in syntactic
232 -- lists where the grammar (of course) does not include the possibility.
233 -- For example, the Variants field of an N_Variant_Part node points to a
234 -- list that can contain both N_Pragma and N_Variant nodes.
235
236 -- To make processing easier in the latter case, the Nlists package
237 -- provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
238 -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be handled
239 -- ignoring all pragmas.
240
241 -- In the case of the variants list, we can either write:
242
243 -- Variant := First (Variants (N));
244 -- while Present (Variant) loop
245 -- ...
246 -- Variant := Next (Variant);
247 -- end loop;
248
249 -- or
250
251 -- Variant := First_Non_Pragma (Variants (N));
252 -- while Present (Variant) loop
253 -- ...
254 -- Variant := Next_Non_Pragma (Variant);
255 -- end loop;
256
257 -- In the first form of the loop, Variant can either be an N_Pragma or an
258 -- N_Variant node. In the second form, Variant can only be N_Variant since
259 -- all pragmas are skipped.
260
261 ---------------------
262 -- Optional Fields --
263 ---------------------
264
265 -- Fields which correspond to a section of the syntax enclosed in square
266 -- brackets are generally omitted (and the corresponding field set to Empty
267 -- for a node, or No_List for a list). The documentation of such fields
268 -- notes these cases. One exception to this rule occurs in the case of
269 -- possibly empty statement sequences (such as the sequence of statements
270 -- in an entry call alternative). Such cases appear in the syntax rules as
271 -- [SEQUENCE_OF_STATEMENTS] and the fields corresponding to such optional
272 -- statement sequences always contain an empty list (not No_List) if no
273 -- statements are present.
274
275 -- Note: the utility program that constructs the body and spec of the Nmake
276 -- package relies on the format of the comments to determine if a field
277 -- should have a default value in the corresponding make routine. The rule
278 -- is that if the first line of the description of the field contains the
279 -- string "(set to xxx if", then a default value of xxx is provided for
280 -- this field in the corresponding Make_yyy routine.
281
282 -----------------------------------
283 -- Note on Body/Spec Terminology --
284 -----------------------------------
285
286 -- In informal discussions about Ada, it is customary to refer to package
287 -- and subprogram specs and bodies. However, this is not technically
288 -- correct, what is normally referred to as a spec or specification is in
289 -- fact a package declaration or subprogram declaration. We are careful in
290 -- GNAT to use the correct terminology and in particular, the full word
291 -- specification is never used as an incorrect substitute for declaration.
292 -- The structure and terminology used in the tree also reflects the grammar
293 -- and thus uses declaration and specification in the technically correct
294 -- manner.
295
296 -- However, there are contexts in which the informal terminology is useful.
297 -- We have the word "body" to refer to the Interp_Etype declared by the
298 -- declaration of a unit body, and in some contexts we need similar term to
299 -- refer to the entity declared by the package or subprogram declaration,
300 -- and simply using declaration can be confusing since the body also has a
301 -- declaration.
302
303 -- An example of such a context is the link between the package body and
304 -- its declaration. With_Declaration is confusing, since the package body
305 -- itself is a declaration.
306
307 -- To deal with this problem, we reserve the informal term Spec, i.e. the
308 -- popular abbreviation used in this context, to refer to the entity
309 -- declared by the package or subprogram declaration. So in the above
310 -- example case, the field in the body is called With_Spec.
311
312 -- Another important context for the use of the word Spec is in error
313 -- messages, where a hyper-correct use of declaration would be confusing to
314 -- a typical Ada programmer, and even for an expert programmer can cause
315 -- confusion since the body has a declaration as well.
316
317 -- So, to summarize:
318
319 -- Declaration always refers to the syntactic entity that is called
320 -- a declaration. In particular, subprogram declaration
321 -- and package declaration are used to describe the
322 -- syntactic entity that includes the semicolon.
323
324 -- Specification always refers to the syntactic entity that is called
325 -- a specification. In particular, the terms procedure
326 -- specification, function specification, package
327 -- specification, subprogram specification always refer
328 -- to the syntactic entity that has no semicolon.
329
330 -- Spec is an informal term, used to refer to the entity
331 -- that is declared by a task declaration, protected
332 -- declaration, generic declaration, subprogram
333 -- declaration or package declaration.
334
335 -- This convention is followed throughout the GNAT documentation
336 -- both internal and external, and in all error message text.
337
338 ------------------------
339 -- Internal Use Nodes --
340 ------------------------
341
342 -- These are Node_Kind settings used in the internal implementation which
343 -- are not logically part of the specification.
344
345 -- N_Unused_At_Start
346 -- Completely unused entry at the start of the enumeration type. This
347 -- is inserted so that no legitimate value is zero, which helps to get
348 -- better debugging behavior, since zero is a likely uninitialized value).
349
350 -- N_Unused_At_End
351 -- Completely unused entry at the end of the enumeration type. This is
352 -- handy so that arrays with Node_Kind as the index type have an extra
353 -- entry at the end (see for example the use of the Pchar_Pos_Array in
354 -- Treepr, where the extra entry provides the limit value when dealing with
355 -- the last used entry in the array).
356
357 -----------------------------------------
358 -- Note on the settings of Sloc fields --
359 -----------------------------------------
360
361 -- The Sloc field of nodes that come from the source is set by the parser.
362 -- For internal nodes, and nodes generated during expansion the Sloc is
363 -- usually set in the call to the constructor for the node. In general the
364 -- Sloc value chosen for an internal node is the Sloc of the source node
365 -- whose processing is responsible for the expansion. For example, the Sloc
366 -- of an inherited primitive operation is the Sloc of the corresponding
367 -- derived type declaration.
368
369 -- For the nodes of a generic instantiation, the Sloc value is encoded to
370 -- represent both the original Sloc in the generic unit, and the Sloc of
371 -- the instantiation itself. See Sinput.ads for details.
372
373 -- Subprogram instances create two callable entities: one is the visible
374 -- subprogram instance, and the other is an anonymous subprogram nested
375 -- within a wrapper package that contains the renamings for the actuals.
376 -- Both of these entities have the Sloc of the defining entity in the
377 -- instantiation node. This simplifies some ASIS queries.
378
379 -----------------------
380 -- Field Definitions --
381 -----------------------
382
383 -- In the following node definitions, all fields, both syntactic and
384 -- semantic, are documented. The one exception is in the case of entities
385 -- (defining identifiers, character literals and operator symbols), where
386 -- the usage of the fields depends on the entity kind. Entity fields are
387 -- fully documented in the separate package Einfo.
388
389 -- In the node definitions, three common sets of fields are abbreviated to
390 -- save both space in the documentation, and also space in the string
391 -- (defined in Tree_Print_Strings) used to print trees. The following
392 -- abbreviations are used:
393
394 -- Note: the utility program that creates the Treeprs spec (in the file
395 -- xtreeprs.adb) knows about the special fields here, so it must be
396 -- modified if any change is made to these fields.
397
398 -- "plus fields for binary operator"
399 -- Chars (Name1) Name_Id for the operator
400 -- Left_Opnd (Node2) left operand expression
401 -- Right_Opnd (Node3) right operand expression
402 -- Entity (Node4-Sem) defining entity for operator
403 -- Associated_Node (Node4-Sem) for generic processing
404 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
405 -- Has_Private_View (Flag11-Sem) set in generic units.
406
407 -- "plus fields for unary operator"
408 -- Chars (Name1) Name_Id for the operator
409 -- Right_Opnd (Node3) right operand expression
410 -- Entity (Node4-Sem) defining entity for operator
411 -- Associated_Node (Node4-Sem) for generic processing
412 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
413 -- Has_Private_View (Flag11-Sem) set in generic units.
414
415 -- "plus fields for expression"
416 -- Paren_Count number of parentheses levels
417 -- Etype (Node5-Sem) type of the expression
418 -- Is_Overloaded (Flag5-Sem) >1 type interpretation exists
419 -- Is_Static_Expression (Flag6-Sem) set for static expression
420 -- Raises_Constraint_Error (Flag7-Sem) evaluation raises CE
421 -- Must_Not_Freeze (Flag8-Sem) set if must not freeze
422 -- Do_Range_Check (Flag9-Sem) set if a range check needed
423 -- Assignment_OK (Flag15-Sem) set if modification is OK
424 -- Is_Controlling_Actual (Flag16-Sem) set for controlling argument
425
426 -- Note: see under (EXPRESSION) for further details on the use of
427 -- the Paren_Count field to record the number of parentheses levels.
428
429 -- Node_Kind is the type used in the Nkind field to indicate the node kind.
430 -- The actual definition of this type is given later (the reason for this
431 -- is that we want the descriptions ordered by logical chapter in the RM,
432 -- but the type definition is reordered to facilitate the definition of
433 -- some subtype ranges. The individual descriptions of the nodes show how
434 -- the various fields are used in each node kind, as well as providing
435 -- logical names for the fields. Functions and procedures are provided for
436 -- accessing and setting these fields using these logical names.
437
438 -----------------------
439 -- Gigi Restrictions --
440 -----------------------
441
442 -- The tree passed to Gigi is more restricted than the general tree form.
443 -- For example, as a result of expansion, most of the tasking nodes can
444 -- never appear. For each node to which either a complete or partial
445 -- restriction applies, a note entitled "Gigi restriction" appears which
446 -- documents the restriction.
447
448 -- Note that most of these restrictions apply only to trees generated when
449 -- code is being generated, since they involved expander actions that
450 -- destroy the tree.
451
452 ------------------------
453 -- Common Flag Fields --
454 ------------------------
455
456 -- The following flag fields appear in all nodes
457
458 -- Analyzed (Flag1)
459 -- This flag is used to indicate that a node (and all its children have
460 -- been analyzed. It is used to avoid reanalysis of a node that has
461 -- already been analyzed, both for efficiency and functional correctness
462 -- reasons.
463
464 -- Comes_From_Source (Flag2)
465 -- This flag is on for any nodes built by the scanner or parser from the
466 -- source program, and off for any nodes built by the analyzer or
467 -- expander. It indicates that a node comes from the original source.
468 -- This flag is defined in Atree.
469
470 -- Error_Posted (Flag3)
471 -- This flag is used to avoid multiple error messages being posted on or
472 -- referring to the same node. This flag is set if an error message
473 -- refers to a node or is posted on its source location, and has the
474 -- effect of inhibiting further messages involving this same node.
475
476 -- Has_Dynamic_Length_Check (Flag10-Sem)
477 -- This flag is present on all nodes. It is set to indicate that one of
478 -- the routines in unit Checks has generated a length check action which
479 -- has been inserted at the flagged node. This is used to avoid the
480 -- generation of duplicate checks.
481
482 -- Has_Dynamic_Range_Check (Flag12-Sem)
483 -- This flag is present on all nodes. It is set to indicate that one of
484 -- the routines in unit Checks has generated a range check action which
485 -- has been inserted at the flagged node. This is used to avoid the
486 -- generation of duplicate checks.
487
488 -- Has_Local_Raise (Flag8-Sem)
489 -- Present in exception handler nodes. Set if the handler can be entered
490 -- via a local raise that gets transformed to a goto statement. This will
491 -- always be set if Local_Raise_Statements is non-empty, but can also be
492 -- set as a result of generation of N_Raise_xxx nodes, or flags set in
493 -- nodes requiring generation of back end checks.
494
495 ------------------------------------
496 -- Description of Semantic Fields --
497 ------------------------------------
498
499 -- The meaning of the syntactic fields is generally clear from their names
500 -- without any further description, since the names are chosen to
501 -- correspond very closely to the syntax in the reference manual. This
502 -- section describes the usage of the semantic fields, which are used to
503 -- contain additional information determined during semantic analysis.
504
505 -- ABE_Is_Certain (Flag18-Sem)
506 -- This flag is set in an instantiation node or a call node is determined
507 -- to be sure to raise an ABE. This is used to trigger special handling
508 -- of such cases, particularly in the instantiation case where we avoid
509 -- instantiating the body if this flag is set. This flag is also present
510 -- in an N_Formal_Package_Declaration_Node since formal package
511 -- declarations are treated like instantiations, but it is always set to
512 -- False in this context.
513
514 -- Accept_Handler_Records (List5-Sem)
515 -- This field is present only in an N_Accept_Alternative node. It is used
516 -- to temporarily hold the exception handler records from an accept
517 -- statement in a selective accept. These exception handlers will
518 -- eventually be placed in the Handler_Records list of the procedure
519 -- built for this accept (see Expand_N_Selective_Accept procedure in
520 -- Exp_Ch9 for further details).
521
522 -- Access_Types_To_Process (Elist2-Sem)
523 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
524 -- Contains the list of access types which may require specific treatment
525 -- when the nature of the type completion is completely known. An example
526 -- of such treatment is the generation of the associated_final_chain.
527
528 -- Actions (List1-Sem)
529 -- This field contains a sequence of actions that are associated with the
530 -- node holding the field. See the individual node types for details of
531 -- how this field is used, as well as the description of the specific use
532 -- for a particular node type.
533
534 -- Activation_Chain_Entity (Node3-Sem)
535 -- This is used in tree nodes representing task activators (blocks,
536 -- subprogram bodies, package declarations, and task bodies). It is
537 -- initially Empty, and then gets set to point to the entity for the
538 -- declared Activation_Chain variable when the first task is declared.
539 -- When tasks are declared in the corresponding declarative region this
540 -- entity is located by name (its name is always _Chain) and the declared
541 -- tasks are added to the chain. Note that N_Extended_Return_Statement
542 -- does not have this attribute, although it does have an activation
543 -- chain. This chain is used to store the tasks temporarily, and is not
544 -- used for activating them. On successful completion of the return
545 -- statement, the tasks are moved to the caller's chain, and the caller
546 -- activates them.
547
548 -- Acts_As_Spec (Flag4-Sem)
549 -- A flag set in the N_Subprogram_Body node for a subprogram body which
550 -- is acting as its own spec, except in the case of a library level
551 -- subprogram, in which case the flag is set on the parent compilation
552 -- unit node instead (see further description in spec of Lib package).
553 -- ??? Above note about Lib is dubious since lib.ads does not mention
554 -- Acts_As_Spec at all.
555
556 -- Actual_Designated_Subtype (Node4-Sem)
557 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
558 -- needs to known the dynamic constrained subtype of the designated
559 -- object, this attribute is set to that type. This is done for
560 -- N_Free_Statements for access-to-classwide types and access to
561 -- unconstrained packed array types, and for N_Explicit_Dereference when
562 -- the designated type is an unconstrained packed array and the
563 -- dereference is the prefix of a 'Size attribute reference.
564
565 -- Address_Warning_Posted (Flag18-Sem)
566 -- Present in N_Attribute_Definition nodes. Set to indicate that we have
567 -- posted a warning for the address clause regarding size or alignment
568 -- issues. Used to inhibit multiple redundant messages.
569
570 -- Aggregate_Bounds (Node3-Sem)
571 -- Present in array N_Aggregate nodes. If the aggregate contains
572 -- component associations this field points to an N_Range node whose
573 -- bounds give the lowest and highest discrete choice values. If the
574 -- named aggregate contains a dynamic or null choice this field is empty.
575 -- If the aggregate contains positional elements this field points to an
576 -- N_Integer_Literal node giving the number of positional elements. Note
577 -- that if the aggregate contains positional elements and an other choice
578 -- the N_Integer_Literal only accounts for the number of positional
579 -- elements.
580
581 -- All_Others (Flag11-Sem)
582 -- Present in an N_Others_Choice node. This flag is set for an others
583 -- exception where all exceptions are to be caught, even those that are
584 -- not normally handled (in particular the tasking abort signal). This
585 -- is used for translation of the at end handler into a normal exception
586 -- handler.
587
588 -- Assignment_OK (Flag15-Sem)
589 -- This flag is set in a subexpression node for an object, indicating
590 -- that the associated object can be modified, even if this would not
591 -- normally be permissible (either by direct assignment, or by being
592 -- passed as an out or in-out parameter). This is used by the expander
593 -- for a number of purposes, including initialization of constants and
594 -- limited type objects (such as tasks), setting discriminant fields,
595 -- setting tag values, etc. N_Object_Declaration nodes also have this
596 -- flag defined. Here it is used to indicate that an initialization
597 -- expression is valid, even where it would normally not be allowed
598 -- (e.g. where the type involved is limited).
599
600 -- Associated_Node (Node4-Sem)
601 -- Present in nodes that can denote an entity: identifiers, character
602 -- literals, operator symbols, expanded names, operator nodes, and
603 -- attribute reference nodes (all these nodes have an Entity field).
604 -- This field is also present in N_Aggregate, N_Selected_Component, and
605 -- N_Extension_Aggregate nodes. This field is used in generic processing
606 -- to create links between the generic template and the generic copy.
607 -- See Sem_Ch12.Get_Associated_Node for full details. Note that this
608 -- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
609 -- the normal function of Entity is not required at the point where the
610 -- Associated_Node is set. Note also, that in generic templates, this
611 -- means that the Entity field does not necessarily point to an Entity.
612 -- Since the back end is expected to ignore generic templates, this is
613 -- harmless.
614
615 -- At_End_Proc (Node1)
616 -- This field is present in an N_Handled_Sequence_Of_Statements node.
617 -- It contains an identifier reference for the cleanup procedure to be
618 -- called. See description of this node for further details.
619
620 -- Backwards_OK (Flag6-Sem)
621 -- A flag present in the N_Assignment_Statement node. It is used only
622 -- if the type being assigned is an array type, and is set if analysis
623 -- determines that it is definitely safe to do the copy backwards, i.e.
624 -- starting at the highest addressed element. This is the case if either
625 -- the operands do not overlap, or they may overlap, but if they do,
626 -- then the left operand is at a higher address than the right operand.
627 --
628 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
629 -- means that the front end could not determine that either direction is
630 -- definitely safe, and a runtime check may be required if the backend
631 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
632 -- set, it means that the front end can assure no overlap of operands.
633
634 -- Body_To_Inline (Node3-Sem)
635 -- present in subprogram declarations. Denotes analyzed but unexpanded
636 -- body of subprogram, to be used when inlining calls. Present when the
637 -- subprogram has an Inline pragma and inlining is enabled. If the
638 -- declaration is completed by a renaming_as_body, and the renamed en-
639 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
640 -- which is used directly in later calls to the original subprogram.
641
642 -- Body_Required (Flag13-Sem)
643 -- A flag that appears in the N_Compilation_Unit node indicating that
644 -- the corresponding unit requires a body. For the package case, this
645 -- indicates that a completion is required. In Ada 95, if the flag is not
646 -- set for the package case, then a body may not be present. In Ada 83,
647 -- if the flag is not set for the package case, then body is optional.
648 -- For a subprogram declaration, the flag is set except in the case where
649 -- a pragma Import or Interface applies, in which case no body is
650 -- permitted (in Ada 83 or Ada 95).
651
652 -- By_Ref (Flag5-Sem)
653 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
654 -- this flag is set when the returned expression is already allocated on
655 -- the secondary stack and thus the result is passed by reference rather
656 -- than copied another time.
657
658 -- Check_Address_Alignment (Flag11-Sem)
659 -- A flag present in N_Attribute_Definition clause for a 'Address
660 -- attribute definition. This flag is set if a dynamic check should be
661 -- generated at the freeze point for the entity to which this address
662 -- clause applies. The reason that we need this flag is that we want to
663 -- check for range checks being suppressed at the point where the
664 -- attribute definition clause is given, rather than testing this at the
665 -- freeze point.
666
667 -- Coextensions (Elist4-Sem)
668 -- Present in allocators nodes. Points to list of allocators for the
669 -- access discriminants of the allocated object.
670
671 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
672 -- Present in N_Simple_Return_Statement nodes. True if this node was
673 -- constructed as part of the N_Extended_Return_Statement expansion.
674
675 -- Compile_Time_Known_Aggregate (Flag18-Sem)
676 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
677 -- evaluated at compile time without raising constraint error. Such
678 -- aggregates can be passed as is to Gigi without any expansion. See
679 -- Sem_Aggr for the specific conditions under which an aggregate has this
680 -- flag set. See also the flag Static_Processing_OK.
681
682 -- Componentwise_Assignment (Flag14-Sem)
683 -- Present in N_Assignment_Statement nodes. Set for a record assignment
684 -- where all that needs doing is to expand it into component-by-component
685 -- assignments. This is used internally for the case of tagged types with
686 -- rep clauses, where we need to avoid recursion (we don't want to try to
687 -- generate a call to the primitive operation, because this is the case
688 -- where we are compiling the primitive operation). Note that when we are
689 -- expanding component assignments in this case, we never assign the _tag
690 -- field, but we recursively assign components of the parent type.
691
692 -- Condition_Actions (List3-Sem)
693 -- This field appears in else-if nodes and in the iteration scheme node
694 -- for while loops. This field is only used during semantic processing to
695 -- temporarily hold actions inserted into the tree. In the tree passed
696 -- to gigi, the condition actions field is always set to No_List. For
697 -- details on how this field is used, see the routine Insert_Actions in
698 -- package Exp_Util, and also the expansion routines for the relevant
699 -- nodes.
700
701 -- Context_Pending (Flag16-Sem)
702 -- This field appears in Compilation_Unit nodes, to indicate that the
703 -- context of the unit is being compiled. Used to detect circularities
704 -- that are not otherwise detected by the loading mechanism. Such
705 -- circularities can occur in the presence of limited and non-limited
706 -- with_clauses that mention the same units.
707
708 -- Controlling_Argument (Node1-Sem)
709 -- This field is set in procedure and function call nodes if the call
710 -- is a dispatching call (it is Empty for a non-dispatching call). It
711 -- indicates the source of the call's controlling tag. For procedure
712 -- calls, the Controlling_Argument is one of the actuals. For function
713 -- that has a dispatching result, it is an entity in the context of the
714 -- call that can provide a tag, or else it is the tag of the root type
715 -- of the class. It can also specify a tag directly rather than being a
716 -- tagged object. The latter is needed by the implementations of AI-239
717 -- and AI-260.
718
719 -- Conversion_OK (Flag14-Sem)
720 -- A flag set on type conversion nodes to indicate that the conversion
721 -- is to be considered as being valid, even though it is the case that
722 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
723 -- Fixed_Value and Integer_Value, for internal conversions done for
724 -- fixed-point operations, and for certain conversions for calls to
725 -- initialization procedures. If Conversion_OK is set, then Etype must be
726 -- set (the analyzer assumes that Etype has been set). For the case of
727 -- fixed-point operands, it also indicates that the conversion is to be
728 -- direct conversion of the underlying integer result, with no regard to
729 -- the small operand.
730
731 -- Corresponding_Body (Node5-Sem)
732 -- This field is set in subprogram declarations, package declarations,
733 -- entry declarations of protected types, and in generic units. It
734 -- points to the defining entity for the corresponding body (NOT the
735 -- node for the body itself).
736
737 -- Corresponding_Formal_Spec (Node3-Sem)
738 -- This field is set in subprogram renaming declarations, where it points
739 -- to the defining entity for a formal subprogram in the case where the
740 -- renaming corresponds to a generic formal subprogram association in an
741 -- instantiation. The field is Empty if the renaming does not correspond
742 -- to such a formal association.
743
744 -- Corresponding_Generic_Association (Node5-Sem)
745 -- This field is defined for object declarations and object renaming
746 -- declarations. It is set for the declarations within an instance that
747 -- map generic formals to their actuals. If set, the field points to
748 -- a generic_association which is the original parent of the expression
749 -- or name appearing in the declaration. This simplifies ASIS queries.
750
751 -- Corresponding_Integer_Value (Uint4-Sem)
752 -- This field is set in real literals of fixed-point types (it is not
753 -- used for floating-point types). It contains the integer value used
754 -- to represent the fixed-point value. It is also set on the universal
755 -- real literals used to represent bounds of fixed-point base types
756 -- and their first named subtypes.
757
758 -- Corresponding_Spec (Node5-Sem)
759 -- This field is set in subprogram, package, task, and protected body
760 -- nodes, where it points to the defining entity in the corresponding
761 -- spec. The attribute is also set in N_With_Clause nodes where it points
762 -- to the defining entity for the with'ed spec, and in a subprogram
763 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
764 -- if there is no corresponding spec, as in the case of a subprogram body
765 -- that serves as its own spec.
766
767 -- Corresponding_Stub (Node3-Sem)
768 -- This field is present in an N_Subunit node. It holds the node in
769 -- the parent unit that is the stub declaration for the subunit. It is
770 -- set when analysis of the stub forces loading of the proper body. If
771 -- expansion of the proper body creates new declarative nodes, they are
772 -- inserted at the point of the corresponding_stub.
773
774 -- Dcheck_Function (Node5-Sem)
775 -- This field is present in an N_Variant node, It references the entity
776 -- for the discriminant checking function for the variant.
777
778 -- Debug_Statement (Node3)
779 -- This field is present in an N_Pragma node. It is used only for a Debug
780 -- pragma. The parameter is of the form of an expression, as required by
781 -- the pragma syntax, but is actually a procedure call. To simplify
782 -- semantic processing, the parser creates a copy of the argument
783 -- rearranged into a procedure call statement and places it in the
784 -- Debug_Statement field. Note that this field is considered syntactic
785 -- field, since it is created by the parser.
786
787 -- Default_Expression (Node5-Sem)
788 -- This field is Empty if there is no default expression. If there is a
789 -- simple default expression (one with no side effects), then this field
790 -- simply contains a copy of the Expression field (both point to the tree
791 -- for the default expression). Default_Expression is used for
792 -- conformance checking.
793
794 -- Discr_Check_Funcs_Built (Flag11-Sem)
795 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
796 -- discriminant checking functions are constructed. The purpose is to
797 -- avoid attempting to set these functions more than once.
798
799 -- Do_Accessibility_Check (Flag13-Sem)
800 -- This flag is set on N_Parameter_Specification nodes to indicate
801 -- that an accessibility check is required for the parameter. It is
802 -- not yet decided who takes care of this check (TBD ???).
803
804 -- Do_Discriminant_Check (Flag13-Sem)
805 -- This flag is set on N_Selected_Component nodes to indicate that a
806 -- discriminant check is required using the discriminant check routine
807 -- associated with the selector. The actual check is generated by the
808 -- expander when processing selected components.
809
810 -- Do_Division_Check (Flag13-Sem)
811 -- This flag is set on a division operator (/ mod rem) to indicate
812 -- that a zero divide check is required. The actual check is dealt
813 -- with by the backend (all the front end does is to set the flag).
814
815 -- Do_Length_Check (Flag4-Sem)
816 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
817 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
818 -- is required. It is not determined who deals with this flag (???).
819
820 -- Do_Overflow_Check (Flag17-Sem)
821 -- This flag is set on an operator where an overflow check is required on
822 -- the operation. The actual check is dealt with by the backend (all the
823 -- front end does is to set the flag). The other cases where this flag is
824 -- used is on a Type_Conversion node and for attribute reference nodes.
825 -- For a type conversion, it means that the conversion is from one base
826 -- type to another, and the value may not fit in the target base type.
827 -- See also the description of Do_Range_Check for this case. The only
828 -- attribute references which use this flag are Pred and Succ, where it
829 -- means that the result should be checked for going outside the base
830 -- range. Note that this flag is not set for modular types.
831
832 -- Do_Range_Check (Flag9-Sem)
833 -- This flag is set on an expression which appears in a context where a
834 -- range check is required. The target type is clear from the context.
835 -- The contexts in which this flag can appear are the following:
836
837 -- Right side of an assignment. In this case the target type is
838 -- taken from the left side of the assignment, which is referenced
839 -- by the Name of the N_Assignment_Statement node.
840
841 -- Subscript expressions in an indexed component. In this case the
842 -- target type is determined from the type of the array, which is
843 -- referenced by the Prefix of the N_Indexed_Component node.
844
845 -- Argument expression for a parameter, appearing either directly in
846 -- the Parameter_Associations list of a call or as the Expression of an
847 -- N_Parameter_Association node that appears in this list. In either
848 -- case, the check is against the type of the formal. Note that the
849 -- flag is relevant only in IN and IN OUT parameters, and will be
850 -- ignored for OUT parameters, where no check is required in the call,
851 -- and if a check is required on the return, it is generated explicitly
852 -- with a type conversion.
853
854 -- Initialization expression for the initial value in an object
855 -- declaration. In this case the Do_Range_Check flag is set on
856 -- the initialization expression, and the check is against the
857 -- range of the type of the object being declared.
858
859 -- The expression of a type conversion. In this case the range check is
860 -- against the target type of the conversion. See also the use of
861 -- Do_Overflow_Check on a type conversion. The distinction is that the
862 -- overflow check protects against a value that is outside the range of
863 -- the target base type, whereas a range check checks that the
864 -- resulting value (which is a value of the base type of the target
865 -- type), satisfies the range constraint of the target type.
866
867 -- Note: when a range check is required in contexts other than those
868 -- listed above (e.g. in a return statement), an additional type
869 -- conversion node is introduced to represent the required check.
870
871 -- Do_Storage_Check (Flag17-Sem)
872 -- This flag is set in an N_Allocator node to indicate that a storage
873 -- check is required for the allocation, or in an N_Subprogram_Body node
874 -- to indicate that a stack check is required in the subprogram prolog.
875 -- The N_Allocator case is handled by the routine that expands the call
876 -- to the runtime routine. The N_Subprogram_Body case is handled by the
877 -- backend, and all the semantics does is set the flag.
878
879 -- Do_Tag_Check (Flag13-Sem)
880 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
881 -- N_Procedure_Call_Statement, N_Type_Conversion,
882 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
883 -- node to indicate that the tag check can be suppressed. It is not
884 -- yet decided how this flag is used (TBD ???).
885
886 -- Elaborate_Present (Flag4-Sem)
887 -- This flag is set in the N_With_Clause node to indicate that pragma
888 -- Elaborate pragma appears for the with'ed units.
889
890 -- Elaborate_All_Desirable (Flag9-Sem)
891 -- This flag is set in the N_With_Clause mode to indicate that the static
892 -- elaboration processing has determined that an Elaborate_All pragma is
893 -- desirable for correct elaboration for this unit.
894
895 -- Elaborate_All_Present (Flag14-Sem)
896 -- This flag is set in the N_With_Clause node to indicate that a
897 -- pragma Elaborate_All pragma appears for the with'ed units.
898
899 -- Elaborate_Desirable (Flag11-Sem)
900 -- This flag is set in the N_With_Clause mode to indicate that the static
901 -- elaboration processing has determined that an Elaborate pragma is
902 -- desirable for correct elaboration for this unit.
903
904 -- Elaboration_Boolean (Node2-Sem)
905 -- This field is present in function and procedure specification nodes.
906 -- If set, it points to the entity for a Boolean flag that must be tested
907 -- for certain calls to check for access before elaboration. See body of
908 -- Sem_Elab for further details. This field is Empty if no elaboration
909 -- boolean is required.
910
911 -- Else_Actions (List3-Sem)
912 -- This field is present in conditional expression nodes. During code
913 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
914 -- actions at an appropriate place in the tree to get elaborated at the
915 -- right time. For conditional expressions, we have to be sure that the
916 -- actions for the Else branch are only elaborated if the condition is
917 -- False. The Else_Actions field is used as a temporary parking place for
918 -- these actions. The final tree is always rewritten to eliminate the
919 -- need for this field, so in the tree passed to Gigi, this field is
920 -- always set to No_List.
921
922 -- Enclosing_Variant (Node2-Sem)
923 -- This field is present in the N_Variant node and identifies the Node_Id
924 -- corresponding to the immediately enclosing variant when the variant is
925 -- nested, and N_Empty otherwise. Set during semantic processing of the
926 -- variant part of a record type.
927
928 -- Entity (Node4-Sem)
929 -- Appears in all direct names (identifiers, character literals, and
930 -- operator symbols), as well as expanded names, and attributes that
931 -- denote entities, such as 'Class. Points to entity for corresponding
932 -- defining occurrence. Set after name resolution. For identifiers in a
933 -- WITH list, the corresponding defining occurrence is in a separately
934 -- compiled file, and Entity must be set by the library Load procedure.
935 --
936 -- Note: During name resolution, the value in Entity may be temporarily
937 -- incorrect (e.g. during overload resolution, Entity is initially set to
938 -- the first possible correct interpretation, and then later modified if
939 -- necessary to contain the correct value after resolution).
940 --
941 -- Note: This field overlaps Associated_Node, which is used during
942 -- generic processing (see Sem_Ch12 for details). Note also that in
943 -- generic templates, this means that the Entity field does not always
944 -- point to an Entity. Since the back end is expected to ignore generic
945 -- templates, this is harmless.
946 --
947 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
948 -- It is used only for stream attributes definition clauses. In this
949 -- case, it denotes a (possibly dummy) subprogram entity that is declared
950 -- conceptually at the point of the clause. Thus the visibility of the
951 -- attribute definition clause (in the sense of 8.3(23) as amended by
952 -- AI-195) can be checked by testing the visibility of that subprogram.
953 --
954 -- Note: Normally the Entity field of an identifier points to the entity
955 -- for the corresponding defining identifier, and hence the Chars field
956 -- of an identifier will match the Chars field of the entity. However,
957 -- there is no requirement that these match, and there are obscure cases
958 -- of generated code where they do not match.
959
960 -- Entity_Or_Associated_Node (Node4-Sem)
961 -- A synonym for both Entity and Associated_Node. Used by convention in
962 -- the code when referencing this field in cases where it is not known
963 -- whether the field contains an Entity or an Associated_Node.
964
965 -- Etype (Node5-Sem)
966 -- Appears in all expression nodes, all direct names, and all entities.
967 -- Points to the entity for the related type. Set after type resolution.
968 -- Normally this is the actual subtype of the expression. However, in
969 -- certain contexts such as the right side of an assignment, subscripts,
970 -- arguments to calls, returned value in a function, initial value etc.
971 -- it is the desired target type. In the event that this is different
972 -- from the actual type, the Do_Range_Check flag will be set if a range
973 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
974 -- points to an essentially arbitrary choice from the possible set of
975 -- types.
976
977 -- Exception_Junk (Flag8-Sem)
978 -- This flag is set in a various nodes appearing in a statement sequence
979 -- to indicate that the corresponding node is an artifact of the
980 -- generated code for exception handling, and should be ignored when
981 -- analyzing the control flow of the relevant sequence of statements
982 -- (e.g. to check that it does not end with a bad return statement).
983
984 -- Exception_Label (Node5-Sem)
985 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
986 -- to be used for transforming the corresponding exception into a goto,
987 -- or contains Empty, if this exception is not to be transformed. Also
988 -- appears in N_Exception_Handler nodes, where, if set, it indicates
989 -- that there may be a local raise for the handler, so that expansion
990 -- to allow a goto is required (and this field contains the label for
991 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
992
993 -- Expansion_Delayed (Flag11-Sem)
994 -- Set on aggregates and extension aggregates that need a top-down rather
995 -- than bottom-up expansion. Typically aggregate expansion happens bottom
996 -- up. For nested aggregates the expansion is delayed until the enclosing
997 -- aggregate itself is expanded, e.g. in the context of a declaration. To
998 -- delay it we set this flag. This is done to avoid creating a temporary
999 -- for each level of a nested aggregates, and also to prevent the
1000 -- premature generation of constraint checks. This is also a requirement
1001 -- if we want to generate the proper attachment to the internal
1002 -- finalization lists (for record with controlled components). Top down
1003 -- expansion of aggregates is also used for in-place array aggregate
1004 -- assignment or initialization. When the full context is known, the
1005 -- target of the assignment or initialization is used to generate the
1006 -- left-hand side of individual assignment to each sub-component.
1007
1008 -- First_Inlined_Subprogram (Node3-Sem)
1009 -- Present in the N_Compilation_Unit node for the main program. Points
1010 -- to a chain of entities for subprograms that are to be inlined. The
1011 -- Next_Inlined_Subprogram field of these entities is used as a link
1012 -- pointer with Empty marking the end of the list. This field is Empty
1013 -- if there are no inlined subprograms or inlining is not active.
1014
1015 -- First_Named_Actual (Node4-Sem)
1016 -- Present in procedure call statement and function call nodes, and also
1017 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1018 -- named parameter where parameters are ordered by declaration order (as
1019 -- opposed to the actual order in the call which may be different due to
1020 -- named associations). Note: this field points to the explicit actual
1021 -- parameter itself, not the N_Parameter_Association node (its parent).
1022
1023 -- First_Real_Statement (Node2-Sem)
1024 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
1025 -- Empty. Used only when declarations are moved into the statement part
1026 -- of a construct as a result of wrapping an AT END handler that is
1027 -- required to cover the declarations. In this case, this field is used
1028 -- to remember the location in the statements list of the first real
1029 -- statement, i.e. the statement that used to be first in the statement
1030 -- list before the declarations were prepended.
1031
1032 -- First_Subtype_Link (Node5-Sem)
1033 -- Present in N_Freeze_Entity node for an anonymous base type that is
1034 -- implicitly created by the declaration of a first subtype. It points
1035 -- to the entity for the first subtype.
1036
1037 -- Float_Truncate (Flag11-Sem)
1038 -- A flag present in type conversion nodes. This is used for float to
1039 -- integer conversions where truncation is required rather than rounding.
1040 -- Note that Gigi does not handle type conversions from real to integer
1041 -- with rounding (see Expand_N_Type_Conversion).
1042
1043 -- Forwards_OK (Flag5-Sem)
1044 -- A flag present in the N_Assignment_Statement node. It is used only
1045 -- if the type being assigned is an array type, and is set if analysis
1046 -- determines that it is definitely safe to do the copy forwards, i.e.
1047 -- starting at the lowest addressed element. This is the case if either
1048 -- the operands do not overlap, or they may overlap, but if they do,
1049 -- then the left operand is at a lower address than the right operand.
1050 --
1051 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1052 -- means that the front end could not determine that either direction is
1053 -- definitely safe, and a runtime check may be required if the backend
1054 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1055 -- set, it means that the front end can assure no overlap of operands.
1056
1057 -- From_At_End (Flag4-Sem)
1058 -- This flag is set on an N_Raise_Statement node if it corresponds to
1059 -- the reraise statement generated as the last statement of an AT END
1060 -- handler when SJLJ exception handling is active. It is used to stop
1061 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1062 -- because if the restriction is set, the reraise is not generated.
1063
1064 -- From_At_Mod (Flag4-Sem)
1065 -- This flag is set on the attribute definition clause node that is
1066 -- generated by a transformation of an at mod phrase in a record
1067 -- representation clause. This is used to give slightly different (Ada 83
1068 -- compatible) semantics to such a clause, namely it is used to specify a
1069 -- minimum acceptable alignment for the base type and all subtypes. In
1070 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1071 -- must be a multiple of the given value, and the representation clause
1072 -- is considered to be type specific instead of subtype specific.
1073
1074 -- From_Default (Flag6-Sem)
1075 -- This flag is set on the subprogram renaming declaration created in an
1076 -- instance for a formal subprogram, when the formal is declared with a
1077 -- box, and there is no explicit actual. If the flag is present, the
1078 -- declaration is treated as an implicit reference to the formal in the
1079 -- ali file.
1080
1081 -- Generic_Parent (Node5-Sem)
1082 -- Generic_Parent is defined on declaration nodes that are instances. The
1083 -- value of Generic_Parent is the generic entity from which the instance
1084 -- is obtained. Generic_Parent is also defined for the renaming
1085 -- declarations and object declarations created for the actuals in an
1086 -- instantiation. The generic parent of such a declaration is the
1087 -- corresponding generic association in the Instantiation node.
1088
1089 -- Generic_Parent_Type (Node4-Sem)
1090 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1091 -- actuals of formal private and derived types. Within the instance, the
1092 -- operations on the actual are those inherited from the parent. For a
1093 -- formal private type, the parent type is the generic type itself. The
1094 -- Generic_Parent_Type is also used in an instance to determine whether a
1095 -- private operation overrides an inherited one.
1096
1097 -- Handler_List_Entry (Node2-Sem)
1098 -- This field is present in N_Object_Declaration nodes. It is set only
1099 -- for the Handler_Record entry generated for an exception in zero cost
1100 -- exception handling mode. It references the corresponding item in the
1101 -- handler list, and is used to delete this entry if the corresponding
1102 -- handler is deleted during optimization. For further details on why
1103 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1104
1105 -- Has_No_Elaboration_Code (Flag17-Sem)
1106 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1107 -- or not elaboration code is present for this unit. It is initially set
1108 -- true for subprogram specs and bodies and for all generic units and
1109 -- false for non-generic package specs and bodies. Gigi may set the flag
1110 -- in the non-generic package case if it determines that no elaboration
1111 -- code is generated. Note that this flag is not related to the
1112 -- Is_Preelaborated status, there can be preelaborated packages that
1113 -- generate elaboration code, and non-preelaborated packages which do
1114 -- not generate elaboration code.
1115
1116 -- Has_Priority_Pragma (Flag6-Sem)
1117 -- A flag present in N_Subprogram_Body, N_Task_Definition and
1118 -- N_Protected_Definition nodes to flag the presence of either a Priority
1119 -- or Interrupt_Priority pragma in the declaration sequence (public or
1120 -- private in the task and protected cases)
1121
1122 -- Has_Private_View (Flag11-Sem)
1123 -- A flag present in generic nodes that have an entity, to indicate that
1124 -- the node has a private type. Used to exchange private and full
1125 -- declarations if the visibility at instantiation is different from the
1126 -- visibility at generic definition.
1127
1128 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1129 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1130 -- flag the presence of a pragma Relative_Deadline.
1131
1132 -- Has_Self_Reference (Flag13-Sem)
1133 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1134 -- of the expressions contains an access attribute reference to the
1135 -- enclosing type. Such a self-reference can only appear in default-
1136 -- initialized aggregate for a record type.
1137
1138 -- Has_Storage_Size_Pragma (Flag5-Sem)
1139 -- A flag present in an N_Task_Definition node to flag the presence of a
1140 -- Storage_Size pragma.
1141
1142 -- Has_Task_Info_Pragma (Flag7-Sem)
1143 -- A flag present in an N_Task_Definition node to flag the presence of a
1144 -- Task_Info pragma. Used to detect duplicate pragmas.
1145
1146 -- Has_Task_Name_Pragma (Flag8-Sem)
1147 -- A flag present in N_Task_Definition nodes to flag the presence of a
1148 -- Task_Name pragma in the declaration sequence for the task.
1149
1150 -- Has_Wide_Character (Flag11-Sem)
1151 -- Present in string literals, set if any wide character (i.e. character
1152 -- code outside the Character range) appears in the string.
1153
1154 -- Hidden_By_Use_Clause (Elist4-Sem)
1155 -- An entity list present in use clauses that appear within
1156 -- instantiations. For the resolution of local entities, entities
1157 -- introduced by these use clauses have priority over global ones, and
1158 -- outer entities must be explicitly hidden/restored on exit.
1159
1160 -- Implicit_With (Flag16-Sem)
1161 -- This flag is set in the N_With_Clause node that is implicitly
1162 -- generated for runtime units that are loaded by the expander, and also
1163 -- for package System, if it is loaded implicitly by a use of the
1164 -- 'Address or 'Tag attribute. ???There are other implicit with clauses
1165 -- as well.
1166
1167 -- Includes_Infinities (Flag11-Sem)
1168 -- This flag is present in N_Range nodes. It is set for the range of
1169 -- unconstrained float types defined in Standard, which include not only
1170 -- the given range of values, but also legitimately can include infinite
1171 -- values. This flag is false for any float type for which an explicit
1172 -- range is given by the programmer, even if that range is identical to
1173 -- the range for Float.
1174
1175 -- Instance_Spec (Node5-Sem)
1176 -- This field is present in generic instantiation nodes, and also in
1177 -- formal package declaration nodes (formal package declarations are
1178 -- treated in a manner very similar to package instantiations). It points
1179 -- to the node for the spec of the instance, inserted as part of the
1180 -- semantic processing for instantiations in Sem_Ch12.
1181
1182 -- Is_Accessibility_Actual (Flag13-Sem)
1183 -- Present in N_Parameter_Association nodes. True if the parameter is
1184 -- an extra actual that carries the accessibility level of the actual
1185 -- for an access parameter, in a function that dispatches on result and
1186 -- is called in a dispatching context. Used to prevent a formal/actual
1187 -- mismatch when the call is rewritten as a dispatching call.
1188
1189 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1190 -- A flag set in a Block_Statement node to indicate that it is the
1191 -- expansion of an asynchronous entry call. Such a block needs cleanup
1192 -- handler to assure that the call is cancelled.
1193
1194 -- Is_Component_Left_Opnd (Flag13-Sem)
1195 -- Is_Component_Right_Opnd (Flag14-Sem)
1196 -- Present in concatenation nodes, to indicate that the corresponding
1197 -- operand is of the component type of the result. Used in resolving
1198 -- concatenation nodes in instances.
1199
1200 -- Is_Controlling_Actual (Flag16-Sem)
1201 -- This flag is set on in an expression that is a controlling argument in
1202 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1203 -- details of its use.
1204
1205 -- Is_Dynamic_Coextension (Flag18-Sem)
1206 -- Present in allocator nodes, to indicate that this is an allocator
1207 -- for an access discriminant of a dynamically allocated object. The
1208 -- coextension must be deallocated and finalized at the same time as
1209 -- the enclosing object.
1210
1211 -- Is_Entry_Barrier_Function (Flag8-Sem)
1212 -- This flag is set in an N_Subprogram_Body node which is the expansion
1213 -- of an entry barrier from a protected entry body. It is used for the
1214 -- circuitry checking for incorrect use of Current_Task.
1215
1216 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1217 -- This flag is set in an N_Function_Call node to indicate that the extra
1218 -- actuals to support a build-in-place style of call have been added to
1219 -- the call.
1220
1221 -- Is_In_Discriminant_Check (Flag11-Sem)
1222 -- This flag is present in a selected component, and is used to indicate
1223 -- that the reference occurs within a discriminant check. The
1224 -- significance is that optimizations based on assuming that the
1225 -- discriminant check has a correct value cannot be performed in this
1226 -- case (or the discriminant check may be optimized away!)
1227
1228 -- Is_Machine_Number (Flag11-Sem)
1229 -- This flag is set in an N_Real_Literal node to indicate that the value
1230 -- is a machine number. This avoids some unnecessary cases of converting
1231 -- real literals to machine numbers.
1232
1233 -- Is_Null_Loop (Flag16-Sem)
1234 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1235 -- can be determined to be null at compile time. This is used to remove
1236 -- the loop entirely at expansion time.
1237
1238 -- Is_Overloaded (Flag5-Sem)
1239 -- A flag present in all expression nodes. Used temporarily during
1240 -- overloading determination. The setting of this flag is not relevant
1241 -- once overloading analysis is complete.
1242
1243 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1244 -- A flag present only in N_Op_Expon nodes. It is set when the
1245 -- exponentiation is of the form 2 ** N, where the type of N is an
1246 -- unsigned integral subtype whose size does not exceed the size of
1247 -- Standard_Integer (i.e. a type that can be safely converted to
1248 -- Natural), and the exponentiation appears as the right operand of an
1249 -- integer multiplication or an integer division where the dividend is
1250 -- unsigned. It is also required that overflow checking is off for both
1251 -- the exponentiation and the multiply/divide node. If this set of
1252 -- conditions holds, and the flag is set, then the division or
1253 -- multiplication can be (and is) converted to a shift.
1254
1255 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1256 -- A flag set in a Subprogram_Body block to indicate that it is the
1257 -- implementation of a protected subprogram. Such a body needs cleanup
1258 -- handler to make sure that the associated protected object is unlocked
1259 -- when the subprogram completes.
1260
1261 -- Is_Static_Coextension (Flag14-Sem)
1262 -- Present in N_Allocator nodes. Set if the allocator is a coextension
1263 -- of an object allocated on the stack rather than the heap.
1264
1265 -- Is_Static_Expression (Flag6-Sem)
1266 -- Indicates that an expression is a static expression (RM 4.9). See spec
1267 -- of package Sem_Eval for full details on the use of this flag.
1268
1269 -- Is_Subprogram_Descriptor (Flag16-Sem)
1270 -- Present in N_Object_Declaration, and set only for the object
1271 -- declaration generated for a subprogram descriptor in fast exception
1272 -- mode. See Exp_Ch11 for details of use.
1273
1274 -- Is_Task_Allocation_Block (Flag6-Sem)
1275 -- A flag set in a Block_Statement node to indicate that it is the
1276 -- expansion of a task allocator, or the allocator of an object
1277 -- containing tasks. Such a block requires a cleanup handler to call
1278 -- Expunge_Unactivated_Tasks to complete any tasks that have been
1279 -- allocated but not activated when the allocator completes abnormally.
1280
1281 -- Is_Task_Master (Flag5-Sem)
1282 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1283 -- indicate that the construct is a task master (i.e. has declared tasks
1284 -- or declares an access to a task type).
1285
1286 -- Itype (Node1-Sem)
1287 -- Used in N_Itype_Reference node to reference an itype for which it is
1288 -- important to ensure that it is defined. See description of this node
1289 -- for further details.
1290
1291 -- Kill_Range_Check (Flag11-Sem)
1292 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1293 -- result should not be subjected to range checks. This is used for the
1294 -- implementation of Normalize_Scalars.
1295
1296 -- Label_Construct (Node2-Sem)
1297 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1298 -- N_Block_Statement or N_Loop_Statement node to which the label
1299 -- declaration applies. This is not currently used in the compiler
1300 -- itself, but it is useful in the implementation of ASIS queries.
1301 -- This field is left empty for the special labels generated as part
1302 -- of expanding raise statements with a local exception handler.
1303
1304 -- Library_Unit (Node4-Sem)
1305 -- In a stub node, Library_Unit points to the compilation unit node of
1306 -- the corresponding subunit.
1307 --
1308 -- In a with clause node, Library_Unit points to the spec of the with'ed
1309 -- unit.
1310 --
1311 -- In a compilation unit node, the usage depends on the unit type:
1312 --
1313 -- For a library unit body, Library_Unit points to the compilation unit
1314 -- node of the corresponding spec, unless it's a subprogram body with
1315 -- Acts_As_Spec set, in which case it points to itself.
1316 --
1317 -- For a spec, Library_Unit points to the compilation unit node of the
1318 -- corresponding body, if present. The body will be present if the spec
1319 -- is or contains generics that we needed to instantiate. Similarly, the
1320 -- body will be present if we needed it for inlining purposes. Thus, if
1321 -- we have a spec/body pair, both of which are present, they point to
1322 -- each other via Library_Unit.
1323 --
1324 -- For a subunit, Library_Unit points to the compilation unit node of
1325 -- the parent body.
1326 --
1327 -- Note that this field is not used to hold the parent pointer for child
1328 -- unit (which might in any case need to use it for some other purpose as
1329 -- described above). Instead for a child unit, implicit with's are
1330 -- generated for all parents.
1331
1332 -- Local_Raise_Statements (Elist1)
1333 -- This field is present in exception handler nodes. It is set to
1334 -- No_Elist in the normal case. If there is at least one raise statement
1335 -- which can potentially be handled as a local raise, then this field
1336 -- points to a list of raise nodes, which are calls to a routine to raise
1337 -- an exception. These are raise nodes which can be optimized into gotos
1338 -- if the handler turns out to meet the conditions which permit this
1339 -- transformation. Note that this does NOT include instances of the
1340 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
1341 -- handled by the back end (using the N_Push/N_Pop mechanism).
1342
1343 -- Loop_Actions (List2-Sem)
1344 -- A list present in Component_Association nodes in array aggregates.
1345 -- Used to collect actions that must be executed within the loop because
1346 -- they may need to be evaluated anew each time through.
1347
1348 -- Limited_View_Installed (Flag18-Sem)
1349 -- Present in With_Clauses and in package specifications. If set on
1350 -- with_clause, it indicates that this clause has created the current
1351 -- limited view of the designated package. On a package specification, it
1352 -- indicates that the limited view has already been created because the
1353 -- package is mentioned in a limited_with_clause in the closure of the
1354 -- unit being compiled.
1355
1356 -- Local_Raise_Not_OK (Flag7-Sem)
1357 -- Present in N_Exception_Handler nodes. Set if the handler contains
1358 -- a construct (reraise statement, or call to subprogram in package
1359 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
1360 -- for a local raise (one that could otherwise be converted to a goto).
1361
1362 -- Must_Be_Byte_Aligned (Flag14-Sem)
1363 -- This flag is present in N_Attribute_Reference nodes. It can be set
1364 -- only for the Address and Unrestricted_Access attributes. If set it
1365 -- means that the object for which the address/access is given must be on
1366 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
1367 -- of the object is to be made before taking the address (this copy is in
1368 -- the current scope on the stack frame). This is used for certain cases
1369 -- of code generated by the expander that passes parameters by address.
1370 --
1371 -- The reason the copy is not made by the front end is that the back end
1372 -- has more information about type layout and may be able to (but is not
1373 -- guaranteed to) prevent making unnecessary copies.
1374
1375 -- Must_Not_Freeze (Flag8-Sem)
1376 -- A flag present in all expression nodes. Normally expressions cause
1377 -- freezing as described in the RM. If this flag is set, then this is
1378 -- inhibited. This is used by the analyzer and expander to label nodes
1379 -- that are created by semantic analysis or expansion and which must not
1380 -- cause freezing even though they normally would. This flag is also
1381 -- present in an N_Subtype_Indication node, since we also use these in
1382 -- calls to Freeze_Expression.
1383
1384 -- Next_Entity (Node2-Sem)
1385 -- Present in defining identifiers, defining character literals and
1386 -- defining operator symbols (i.e. in all entities). The entities of a
1387 -- scope are chained, and this field is used as the forward pointer for
1388 -- this list. See Einfo for further details.
1389
1390 -- Next_Implicit_With (Node3-Sem)
1391 -- Present in N_With_Clause. Part of a chain of with_clauses generated
1392 -- in rtsfind to indicate implicit dependencies on predefined units. Used
1393 -- to prevent multiple with_clauses for the same unit in a given context.
1394 -- A postorder traversal of the tree whose nodes are units and whose
1395 -- links are with_clauses defines the order in which Inspector must
1396 -- examine a compiled unit and its full context. This ordering ensures
1397 -- that any subprogram call is examined after the subprogram declartion
1398 -- has been seen.
1399
1400 -- Next_Named_Actual (Node4-Sem)
1401 -- Present in parameter association node. Set during semantic analysis to
1402 -- point to the next named parameter, where parameters are ordered by
1403 -- declaration order (as opposed to the actual order in the call, which
1404 -- may be different due to named associations). Not that this field
1405 -- points to the explicit actual parameter itself, not to the
1406 -- N_Parameter_Association node (its parent).
1407
1408 -- Next_Pragma (Node1-Sem)
1409 -- Present in N_Pragma nodes. Used to create a linked list of pragma
1410 -- nodes. Currently used for two purposes:
1411 --
1412 -- Create a list of linked Check_Policy pragmas. The head of this list
1413 -- is stored in Opt.Check_Policy_List (which has further details).
1414 --
1415 -- Used by processing for Pre/Postcondition pragmas to store a list of
1416 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
1417 -- details).
1418
1419 -- Next_Rep_Item (Node5-Sem)
1420 -- Present in pragma nodes and attribute definition nodes. Used to link
1421 -- representation items that apply to an entity. See description of
1422 -- First_Rep_Item field in Einfo for full details.
1423
1424 -- Next_Use_Clause (Node3-Sem)
1425 -- While use clauses are active during semantic processing, they are
1426 -- chained from the scope stack entry, using Next_Use_Clause as a link
1427 -- pointer, with Empty marking the end of the list. The head pointer is
1428 -- in the scope stack entry (First_Use_Clause). At the end of semantic
1429 -- processing (i.e. when Gigi sees the tree, the contents of this field
1430 -- is undefined and should not be read).
1431
1432 -- No_Ctrl_Actions (Flag7-Sem)
1433 -- Present in N_Assignment_Statement to indicate that no finalize nor
1434 -- adjust should take place on this assignment even though the rhs is
1435 -- controlled. This is used in init procs and aggregate expansions where
1436 -- the generated assignments are more initialisations than real
1437 -- assignments.
1438
1439 -- No_Elaboration_Check (Flag14-Sem)
1440 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1441 -- that no elaboration check is needed on the call, because it appears in
1442 -- the context of a local Suppress pragma. This is used on calls within
1443 -- task bodies, where the actual elaboration checks are applied after
1444 -- analysis, when the local scope stack is not present.
1445
1446 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1447 -- Present in N_With_Clause nodes. Set if the with clause is on the
1448 -- package or subprogram spec where the main unit is the corresponding
1449 -- body, and no entities of the with'ed unit are referenced by the spec
1450 -- (an entity may still be referenced in the body, so this flag is used
1451 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1452 -- full details)
1453
1454 -- No_Initialization (Flag13-Sem)
1455 -- Present in N_Object_Declaration and N_Allocator to indicate that the
1456 -- object must not be initialized (by Initialize or call to an init
1457 -- proc). This is needed for controlled aggregates. When the Object
1458 -- declaration has an expression, this flag means that this expression
1459 -- should not be taken into account (needed for in place initialization
1460 -- with aggregates).
1461
1462 -- No_Truncation (Flag17-Sem)
1463 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
1464 -- only if the RM_Size of the source is greater than the RM_Size of the
1465 -- target for scalar operands. Normally in such a case we truncate some
1466 -- higher order bits of the source, and then sign/zero extend the result
1467 -- to form the output value. But if this flag is set, then we do not do
1468 -- any truncation, so for example, if an 8 bit input is converted to 5
1469 -- bit result which is in fact stored in 8 bits, then the high order
1470 -- three bits of the target result will be copied from the source. This
1471 -- is used for properly setting out of range values for use by pragmas
1472 -- Initialize_Scalars and Normalize_Scalars.
1473
1474 -- Original_Discriminant (Node2-Sem)
1475 -- Present in identifiers. Used in references to discriminants that
1476 -- appear in generic units. Because the names of the discriminants may be
1477 -- different in an instance, we use this field to recover the position of
1478 -- the discriminant in the original type, and replace it with the
1479 -- discriminant at the same position in the instantiated type.
1480
1481 -- Original_Entity (Node2-Sem)
1482 -- Present in numeric literals. Used to denote the named number that has
1483 -- been constant-folded into the given literal. If literal is from
1484 -- source, or the result of some other constant-folding operation, then
1485 -- Original_Entity is empty. This field is needed to handle properly
1486 -- named numbers in generic units, where the Associated_Node field
1487 -- interferes with the Entity field, making it impossible to preserve the
1488 -- original entity at the point of instantiation (ASIS problem).
1489
1490 -- Others_Discrete_Choices (List1-Sem)
1491 -- When a case statement or variant is analyzed, the semantic checks
1492 -- determine the actual list of choices that correspond to an others
1493 -- choice. This list is materialized for later use by the expander and
1494 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
1495 -- this materialized list of choices, which is in standard format for a
1496 -- list of discrete choices, except that of course it cannot contain an
1497 -- N_Others_Choice entry.
1498
1499 -- Parameter_List_Truncated (Flag17-Sem)
1500 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. Set
1501 -- (for OpenVMS ports of GNAT only) if the parameter list is truncated as
1502 -- a result of a First_Optional_Parameter specification in an
1503 -- Import_Function, Import_Procedure, or Import_Valued_Procedure pragma.
1504 -- The truncation is done by the expander by removing trailing parameters
1505 -- from the argument list, in accordance with the set of rules allowing
1506 -- such parameter removal. In particular, parameters can be removed
1507 -- working from the end of the parameter list backwards up to and
1508 -- including the entry designated by First_Optional_Parameter in the
1509 -- Import pragma. Parameters can be removed if they are implicit and the
1510 -- default value is a known-at-compile-time value, including the use of
1511 -- the Null_Parameter attribute, or if explicit parameter values are
1512 -- present that match the corresponding defaults.
1513
1514 -- Parent_Spec (Node4-Sem)
1515 -- For a library unit that is a child unit spec (package or subprogram
1516 -- declaration, generic declaration or instantiation, or library level
1517 -- rename, this field points to the compilation unit node for the parent
1518 -- package specification. This field is Empty for library bodies (the
1519 -- parent spec in this case can be found from the corresponding spec).
1520
1521 -- PPC_Enabled (Flag5-Sem)
1522 -- Present in N_Pragma nodes. This flag is relevant only for precondition
1523 -- and postcondition nodes. It is true if the check corresponding to the
1524 -- pragma type is enabled at the point where the pragma appears.
1525
1526 -- Present_Expr (Uint3-Sem)
1527 -- Present in an N_Variant node. This has a meaningful value only after
1528 -- Gigi has back annotated the tree with representation information. At
1529 -- this point, it contains a reference to a gcc expression that depends
1530 -- on the values of one or more discriminants. Give a set of discriminant
1531 -- values, this expression evaluates to False (zero) if variant is not
1532 -- present, and True (non-zero) if it is present. See unit Repinfo for
1533 -- further details on gigi back annotation. This field is used during
1534 -- ASIS processing (data decomposition annex) to determine if a field is
1535 -- present or not.
1536
1537 -- Print_In_Hex (Flag13-Sem)
1538 -- Set on an N_Integer_Literal node to indicate that the value should be
1539 -- printed in hexadecimal in the sprint listing. Has no effect on
1540 -- legality or semantics of program, only on the displayed output. This
1541 -- is used to clarify output from the packed array cases.
1542
1543 -- Procedure_To_Call (Node2-Sem)
1544 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1545 -- and N_Extended_Return_Statement nodes. References the entity for the
1546 -- declaration of the procedure to be called to accomplish the required
1547 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
1548 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
1549 -- allocating the return value), and for the Deallocate procedure in the
1550 -- case of N_Free_Statement.
1551
1552 -- Raises_Constraint_Error (Flag7-Sem)
1553 -- Set on an expression whose evaluation will definitely fail constraint
1554 -- error check. In the case of static expressions, this flag must be set
1555 -- accurately (and if it is set, the expression is typically illegal
1556 -- unless it appears as a non-elaborated branch of a short-circuit form).
1557 -- For a non-static expression, this flag may be set whenever an
1558 -- expression (e.g. an aggregate) is known to raise constraint error. If
1559 -- set, the expression definitely will raise CE if elaborated at runtime.
1560 -- If not set, the expression may or may not raise CE. In other words, on
1561 -- static expressions, the flag is set accurately, on non-static
1562 -- expressions it is set conservatively.
1563
1564 -- Redundant_Use (Flag13-Sem)
1565 -- Present in nodes that can appear as an operand in a use clause or use
1566 -- type clause (identifiers, expanded names, attribute references). Set
1567 -- to indicate that a use is redundant (and therefore need not be undone
1568 -- on scope exit).
1569
1570 -- Renaming_Exception (Node2-Sem)
1571 -- Present in N_Exception_Declaration node. Used to point back to the
1572 -- exception renaming for an exception declared within a subprogram.
1573 -- What happens is that an exception declared in a subprogram is moved
1574 -- to the library level with a unique name, and the original exception
1575 -- becomes a renaming. This link from the library level exception to the
1576 -- renaming declaration allows registering of the proper exception name.
1577
1578 -- Return_Statement_Entity (Node5-Sem)
1579 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
1580 -- Points to an E_Return_Statement representing the return statement.
1581
1582 -- Return_Object_Declarations (List3)
1583 -- Present in N_Extended_Return_Statement.
1584 -- Points to a list initially containing a single
1585 -- N_Object_Declaration representing the return object.
1586 -- We use a list (instead of just a pointer to the object decl)
1587 -- because Analyze wants to insert extra actions on this list.
1588
1589 -- Rounded_Result (Flag18-Sem)
1590 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1591 -- Used in the fixed-point cases to indicate that the result must be
1592 -- rounded as a result of the use of the 'Round attribute. Also used for
1593 -- integer N_Op_Divide nodes to indicate that the result should be
1594 -- rounded to the nearest integer (breaking ties away from zero), rather
1595 -- than truncated towards zero as usual. These rounded integer operations
1596 -- are the result of expansion of rounded fixed-point divide, conversion
1597 -- and multiplication operations.
1598
1599 -- SCIL_Entity (Node4-Sem)
1600 -- Present in SCIL nodes. Used to reference the tagged type associated
1601 -- with the SCIL node.
1602
1603 -- SCIL_Related_Node (Node1-Sem)
1604 -- Present in SCIL nodes. Used to reference a tree node that requires
1605 -- special processing in the CodePeer backend.
1606
1607 -- SCIL_Controlling_Tag (Node5-Sem)
1608 -- Present in N_SCIL_Dispatching_Call nodes. Used to reference the
1609 -- controlling tag of a dispatching call.
1610
1611 -- SCIL_Tag_Value (Node5-Sem)
1612 -- Present in N_SCIL_Membership_Test nodes. Used to reference the tag
1613 -- value that is being tested.
1614
1615 -- SCIL_Target_Prim (Node2-Sem)
1616 -- Present in N_SCIL_Dispatching_Call nodes. Used to reference the tagged
1617 -- type primitive associated with the SCIL node.
1618
1619 -- Scope (Node3-Sem)
1620 -- Present in defining identifiers, defining character literals and
1621 -- defining operator symbols (i.e. in all entities). The entities of a
1622 -- scope all use this field to reference the corresponding scope entity.
1623 -- See Einfo for further details.
1624
1625 -- Shift_Count_OK (Flag4-Sem)
1626 -- A flag present in shift nodes to indicate that the shift count is
1627 -- known to be in range, i.e. is in the range from zero to word length
1628 -- minus one. If this flag is not set, then the shift count may be
1629 -- outside this range, i.e. larger than the word length, and the code
1630 -- must ensure that such shift counts give the appropriate result.
1631
1632 -- Source_Type (Node1-Sem)
1633 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1634 -- source type entity for the unchecked conversion instantiation
1635 -- which gigi must do size validation for.
1636
1637 -- Static_Processing_OK (Flag4-Sem)
1638 -- Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate
1639 -- flag is set, the full value of the aggregate can be determined at
1640 -- compile time and the aggregate can be passed as is to the back-end.
1641 -- In this event it is irrelevant whether this flag is set or not.
1642 -- However, if the flag Compile_Time_Known_Aggregate is not set but
1643 -- Static_Processing_OK is set, the aggregate can (but need not) be
1644 -- converted into a compile time known aggregate by the expander. See
1645 -- Sem_Aggr for the specific conditions under which an aggregate has its
1646 -- Static_Processing_OK flag set.
1647
1648 -- Storage_Pool (Node1-Sem)
1649 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1650 -- and N_Extended_Return_Statement nodes. References the entity for the
1651 -- storage pool to be used for the allocate or free call or for the
1652 -- allocation of the returned value from function. Empty indicates that
1653 -- the global default pool is to be used. Note that in the case
1654 -- of a return statement, this field is set only if the function returns
1655 -- value of a type whose size is not known at compile time on the
1656 -- secondary stack.
1657
1658 -- Suppress_Loop_Warnings (Flag17-Sem)
1659 -- Used in N_Loop_Statement node to indicate that warnings within the
1660 -- body of the loop should be suppressed. This is set when the range
1661 -- of a FOR loop is known to be null, or is probably null (loop would
1662 -- only execute if invalid values are present).
1663
1664 -- Target_Type (Node2-Sem)
1665 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
1666 -- type entity for the unchecked conversion instantiation which gigi must
1667 -- do size validation for.
1668
1669 -- Then_Actions (List3-Sem)
1670 -- This field is present in conditional expression nodes. During code
1671 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1672 -- actions at an appropriate place in the tree to get elaborated at the
1673 -- right time. For conditional expressions, we have to be sure that the
1674 -- actions for the Then branch are only elaborated if the condition is
1675 -- True. The Then_Actions field is used as a temporary parking place for
1676 -- these actions. The final tree is always rewritten to eliminate the
1677 -- need for this field, so in the tree passed to Gigi, this field is
1678 -- always set to No_List.
1679
1680 -- Treat_Fixed_As_Integer (Flag14-Sem)
1681 -- This flag appears in operator nodes for divide, multiply, mod and rem
1682 -- on fixed-point operands. It indicates that the operands are to be
1683 -- treated as integer values, ignoring small values. This flag is only
1684 -- set as a result of expansion of fixed-point operations. Typically a
1685 -- fixed-point multiplication in the source generates subsidiary
1686 -- multiplication and division operations that work with the underlying
1687 -- integer values and have this flag set. Note that this flag is not
1688 -- needed on other arithmetic operations (add, neg, subtract etc.) since
1689 -- in these cases it is always the case that fixed is treated as integer.
1690 -- The Etype field MUST be set if this flag is set. The analyzer knows to
1691 -- leave such nodes alone, and whoever makes them must set the correct
1692 -- Etype value.
1693
1694 -- TSS_Elist (Elist3-Sem)
1695 -- Present in N_Freeze_Entity nodes. Holds an element list containing
1696 -- entries for each TSS (type support subprogram) associated with the
1697 -- frozen type. The elements of the list are the entities for the
1698 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
1699 -- if there are no type support subprograms for the type or if the freeze
1700 -- node is not for a type.
1701
1702 -- Unreferenced_In_Spec (Flag7-Sem)
1703 -- Present in N_With_Clause nodes. Set if the with clause is on the
1704 -- package or subprogram spec where the main unit is the corresponding
1705 -- body, and is not referenced by the spec (it may still be referenced by
1706 -- the body, so this flag is used to generate the proper message (see
1707 -- Sem_Util.Check_Unused_Withs for details)
1708
1709 -- Was_Originally_Stub (Flag13-Sem)
1710 -- This flag is set in the node for a proper body that replaces stub.
1711 -- During the analysis procedure, stubs in some situations get rewritten
1712 -- by the corresponding bodies, and we set this flag to remember that
1713 -- this happened. Note that it is not good enough to rely on the use of
1714 -- Original_Node here because of the case of nested instantiations where
1715 -- the substituted node can be copied.
1716
1717 -- Zero_Cost_Handling (Flag5-Sem)
1718 -- This flag is set in all handled sequence of statement and exception
1719 -- handler nodes if exceptions are to be handled using the zero-cost
1720 -- mechanism (see Ada.Exceptions and System.Exceptions in files
1721 -- a-except.ads/adb and s-except.ads for full details). What gigi needs
1722 -- to do for such a handler is simply to put the code in the handler
1723 -- somewhere. The front end has generated all necessary labels.
1724
1725 --------------------------------------------------
1726 -- Note on Use of End_Label and End_Span Fields --
1727 --------------------------------------------------
1728
1729 -- Several constructs have end lines:
1730
1731 -- Loop Statement end loop [loop_IDENTIFIER];
1732 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
1733 -- Task Definition end [task_IDENTIFIER]
1734 -- Protected Definition end [protected_IDENTIFIER]
1735 -- Protected Body end [protected_IDENTIFIER]
1736
1737 -- Block Statement end [block_IDENTIFIER];
1738 -- Subprogram Body end [DESIGNATOR];
1739 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
1740 -- Task Body end [task_IDENTIFIER];
1741 -- Accept Statement end [entry_IDENTIFIER]];
1742 -- Entry Body end [entry_IDENTIFIER];
1743
1744 -- If Statement end if;
1745 -- Case Statement end case;
1746
1747 -- Record Definition end record;
1748 -- Enumeration Definition );
1749
1750 -- The End_Label and End_Span fields are used to mark the locations of
1751 -- these lines, and also keep track of the label in the case where a label
1752 -- is present.
1753
1754 -- For the first group above, the End_Label field of the corresponding node
1755 -- is used to point to the label identifier. In the case where there is no
1756 -- label in the source, the parser supplies a dummy identifier (with
1757 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
1758 -- marks the location of the token following the END token.
1759
1760 -- For the second group, the use of End_Label is similar, but the End_Label
1761 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
1762 -- simply because in some cases there is no room in the parent node.
1763
1764 -- For the third group, there is never any label, and instead of using
1765 -- End_Label, we use the End_Span field which gives the location of the
1766 -- token following END, relative to the starting Sloc of the construct,
1767 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
1768 -- following the End_Label.
1769
1770 -- The record definition case is handled specially, we treat it as though
1771 -- it required an optional label which is never present, and so the parser
1772 -- always builds a dummy identifier with Comes From Source set False. The
1773 -- reason we do this, rather than using End_Span in this case, is that we
1774 -- want to generate a cross-ref entry for the end of a record, since it
1775 -- represents a scope for name declaration purposes.
1776
1777 -- The enumeration definition case is handled in an exactly similar manner,
1778 -- building a dummy identifier to get a cross-reference.
1779
1780 -- Note: the reason we store the difference as a Uint, instead of storing
1781 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
1782 -- distinguished from other types of values, and we count on all general
1783 -- use fields being self describing. To make things easier for clients,
1784 -- note that we provide function End_Location, and procedure
1785 -- Set_End_Location to allow access to the logical value (which is the
1786 -- Source_Ptr value for the end token).
1787
1788 ---------------------
1789 -- Syntactic Nodes --
1790 ---------------------
1791
1792 ---------------------
1793 -- 2.3 Identifier --
1794 ---------------------
1795
1796 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
1797 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
1798
1799 -- An IDENTIFIER shall not be a reserved word
1800
1801 -- In the Ada grammar identifiers are the bottom level tokens which have
1802 -- very few semantics. Actual program identifiers are direct names. If
1803 -- we were being 100% honest with the grammar, then we would have a node
1804 -- called N_Direct_Name which would point to an identifier. However,
1805 -- that's too many extra nodes, so we just use the N_Identifier node
1806 -- directly as a direct name, and it contains the expression fields and
1807 -- Entity field that correspond to its use as a direct name. In those
1808 -- few cases where identifiers appear in contexts where they are not
1809 -- direct names (pragmas, pragma argument associations, attribute
1810 -- references and attribute definition clauses), the Chars field of the
1811 -- node contains the Name_Id for the identifier name.
1812
1813 -- Note: in GNAT, a reserved word can be treated as an identifier in two
1814 -- cases. First, an incorrect use of a reserved word as an identifier is
1815 -- diagnosed and then treated as a normal identifier. Second, an
1816 -- attribute designator of the form of a reserved word (access, delta,
1817 -- digits, range) is treated as an identifier.
1818
1819 -- Note: The set of letters that is permitted in an identifier depends
1820 -- on the character set in use. See package Csets for full details.
1821
1822 -- N_Identifier
1823 -- Sloc points to identifier
1824 -- Chars (Name1) contains the Name_Id for the identifier
1825 -- Entity (Node4-Sem)
1826 -- Associated_Node (Node4-Sem)
1827 -- Original_Discriminant (Node2-Sem)
1828 -- Redundant_Use (Flag13-Sem)
1829 -- Has_Private_View (Flag11-Sem) (set in generic units)
1830 -- plus fields for expression
1831
1832 --------------------------
1833 -- 2.4 Numeric Literal --
1834 --------------------------
1835
1836 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
1837
1838 ----------------------------
1839 -- 2.4.1 Decimal Literal --
1840 ----------------------------
1841
1842 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
1843
1844 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
1845
1846 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
1847
1848 -- Decimal literals appear in the tree as either integer literal nodes
1849 -- or real literal nodes, depending on whether a period is present.
1850
1851 -- Note: literal nodes appear as a result of direct use of literals
1852 -- in the source program, and also as the result of evaluating
1853 -- expressions at compile time. In the latter case, it is possible
1854 -- to construct real literals that have no syntactic representation
1855 -- using the standard literal format. Such literals are listed by
1856 -- Sprint using the notation [numerator / denominator].
1857
1858 -- Note: the value of an integer literal node created by the front end
1859 -- is never outside the range of values of the base type. However, it
1860 -- can be the case that the value is outside the range of the
1861 -- particular subtype. This happens in the case of integer overflows
1862 -- with checks suppressed.
1863
1864 -- N_Integer_Literal
1865 -- Sloc points to literal
1866 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1867 -- has been constant-folded into its literal value.
1868 -- Intval (Uint3) contains integer value of literal
1869 -- plus fields for expression
1870 -- Print_In_Hex (Flag13-Sem)
1871
1872 -- N_Real_Literal
1873 -- Sloc points to literal
1874 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1875 -- has been constant-folded into its literal value.
1876 -- Realval (Ureal3) contains real value of literal
1877 -- Corresponding_Integer_Value (Uint4-Sem)
1878 -- Is_Machine_Number (Flag11-Sem)
1879 -- plus fields for expression
1880
1881 --------------------------
1882 -- 2.4.2 Based Literal --
1883 --------------------------
1884
1885 -- BASED_LITERAL ::=
1886 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
1887
1888 -- BASE ::= NUMERAL
1889
1890 -- BASED_NUMERAL ::=
1891 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
1892
1893 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
1894
1895 -- Based literals appear in the tree as either integer literal nodes
1896 -- or real literal nodes, depending on whether a period is present.
1897
1898 ----------------------------
1899 -- 2.5 Character Literal --
1900 ----------------------------
1901
1902 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
1903
1904 -- N_Character_Literal
1905 -- Sloc points to literal
1906 -- Chars (Name1) contains the Name_Id for the identifier
1907 -- Char_Literal_Value (Uint2) contains the literal value
1908 -- Entity (Node4-Sem)
1909 -- Associated_Node (Node4-Sem)
1910 -- Has_Private_View (Flag11-Sem) set in generic units.
1911 -- plus fields for expression
1912
1913 -- Note: the Entity field will be missing (set to Empty) for character
1914 -- literals whose type is Standard.Wide_Character or Standard.Character
1915 -- or a type derived from one of these two. In this case the character
1916 -- literal stands for its own coding. The reason we take this irregular
1917 -- short cut is to avoid the need to build lots of junk defining
1918 -- character literal nodes.
1919
1920 -------------------------
1921 -- 2.6 String Literal --
1922 -------------------------
1923
1924 -- STRING LITERAL ::= "{STRING_ELEMENT}"
1925
1926 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
1927 -- single GRAPHIC_CHARACTER other than a quotation mark.
1928 --
1929 -- Is_Folded_In_Parser is True if the parser created this literal by
1930 -- folding a sequence of "&" operators. For example, if the source code
1931 -- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
1932 -- is set. This flag is needed because the parser doesn't know about
1933 -- visibility, so the folded result might be wrong, and semantic
1934 -- analysis needs to check for that.
1935
1936 -- N_String_Literal
1937 -- Sloc points to literal
1938 -- Strval (Str3) contains Id of string value
1939 -- Has_Wide_Character (Flag11-Sem)
1940 -- Is_Folded_In_Parser (Flag4)
1941 -- plus fields for expression
1942
1943 ------------------
1944 -- 2.7 Comment --
1945 ------------------
1946
1947 -- A COMMENT starts with two adjacent hyphens and extends up to the
1948 -- end of the line. A COMMENT may appear on any line of a program.
1949
1950 -- Comments are skipped by the scanner and do not appear in the tree.
1951 -- It is possible to reconstruct the position of comments with respect
1952 -- to the elements of the tree by using the source position (Sloc)
1953 -- pointers that appear in every tree node.
1954
1955 -----------------
1956 -- 2.8 Pragma --
1957 -----------------
1958
1959 -- PRAGMA ::= pragma IDENTIFIER
1960 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
1961
1962 -- Note that a pragma may appear in the tree anywhere a declaration
1963 -- or a statement may appear, as well as in some other situations
1964 -- which are explicitly documented.
1965
1966 -- N_Pragma
1967 -- Sloc points to pragma identifier
1968 -- Next_Pragma (Node1-Sem)
1969 -- Pragma_Argument_Associations (List2) (set to No_List if none)
1970 -- Debug_Statement (Node3) (set to Empty if not Debug, Assert)
1971 -- Pragma_Identifier (Node4)
1972 -- Next_Rep_Item (Node5-Sem)
1973 -- PPC_Enabled (Flag5-Sem)
1974
1975 -- Note: we should have a section on what pragmas are passed on to
1976 -- the back end to be processed. This section should note that pragma
1977 -- Psect_Object is always converted to Common_Object, but there are
1978 -- undoubtedly many other similar notes required ???
1979
1980 -- Note: a utility function Pragma_Name may be applied to pragma nodes
1981 -- to conveniently obtain the Chars field of the Pragma_Identifier.
1982
1983 --------------------------------------
1984 -- 2.8 Pragma Argument Association --
1985 --------------------------------------
1986
1987 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
1988 -- [pragma_argument_IDENTIFIER =>] NAME
1989 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
1990
1991 -- N_Pragma_Argument_Association
1992 -- Sloc points to first token in association
1993 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
1994 -- Expression (Node3)
1995
1996 ------------------------
1997 -- 2.9 Reserved Word --
1998 ------------------------
1999
2000 -- Reserved words are parsed by the scanner, and returned as the
2001 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
2002
2003 ----------------------------
2004 -- 3.1 Basic Declaration --
2005 ----------------------------
2006
2007 -- BASIC_DECLARATION ::=
2008 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
2009 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
2010 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
2011 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
2012 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
2013 -- | GENERIC_INSTANTIATION
2014
2015 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
2016 -- see further description in section on semantic nodes.
2017
2018 -- Also, in the tree that is constructed, a pragma may appear
2019 -- anywhere that a declaration may appear.
2020
2021 ------------------------------
2022 -- 3.1 Defining Identifier --
2023 ------------------------------
2024
2025 -- DEFINING_IDENTIFIER ::= IDENTIFIER
2026
2027 -- A defining identifier is an entity, which has additional fields
2028 -- depending on the setting of the Ekind field. These additional
2029 -- fields are defined (and access subprograms declared) in package
2030 -- Einfo.
2031
2032 -- Note: N_Defining_Identifier is an extended node whose fields are
2033 -- deliberate layed out to match the layout of fields in an ordinary
2034 -- N_Identifier node allowing for easy alteration of an identifier
2035 -- node into a defining identifier node. For details, see procedure
2036 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
2037
2038 -- N_Defining_Identifier
2039 -- Sloc points to identifier
2040 -- Chars (Name1) contains the Name_Id for the identifier
2041 -- Next_Entity (Node2-Sem)
2042 -- Scope (Node3-Sem)
2043 -- Etype (Node5-Sem)
2044
2045 -----------------------------
2046 -- 3.2.1 Type Declaration --
2047 -----------------------------
2048
2049 -- TYPE_DECLARATION ::=
2050 -- FULL_TYPE_DECLARATION
2051 -- | INCOMPLETE_TYPE_DECLARATION
2052 -- | PRIVATE_TYPE_DECLARATION
2053 -- | PRIVATE_EXTENSION_DECLARATION
2054
2055 ----------------------------------
2056 -- 3.2.1 Full Type Declaration --
2057 ----------------------------------
2058
2059 -- FULL_TYPE_DECLARATION ::=
2060 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2061 -- is TYPE_DEFINITION;
2062 -- | TASK_TYPE_DECLARATION
2063 -- | PROTECTED_TYPE_DECLARATION
2064
2065 -- The full type declaration node is used only for the first case. The
2066 -- second case (concurrent type declaration), is represented directly
2067 -- by a task type declaration or a protected type declaration.
2068
2069 -- N_Full_Type_Declaration
2070 -- Sloc points to TYPE
2071 -- Defining_Identifier (Node1)
2072 -- Discriminant_Specifications (List4) (set to No_List if none)
2073 -- Type_Definition (Node3)
2074 -- Discr_Check_Funcs_Built (Flag11-Sem)
2075
2076 ----------------------------
2077 -- 3.2.1 Type Definition --
2078 ----------------------------
2079
2080 -- TYPE_DEFINITION ::=
2081 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2082 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2083 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
2084 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
2085
2086 --------------------------------
2087 -- 3.2.2 Subtype Declaration --
2088 --------------------------------
2089
2090 -- SUBTYPE_DECLARATION ::=
2091 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION;
2092
2093 -- The subtype indication field is set to Empty for subtypes
2094 -- declared in package Standard (Positive, Natural).
2095
2096 -- N_Subtype_Declaration
2097 -- Sloc points to SUBTYPE
2098 -- Defining_Identifier (Node1)
2099 -- Null_Exclusion_Present (Flag11)
2100 -- Subtype_Indication (Node5)
2101 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2102 -- Exception_Junk (Flag8-Sem)
2103
2104 -------------------------------
2105 -- 3.2.2 Subtype Indication --
2106 -------------------------------
2107
2108 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2109
2110 -- Note: if no constraint is present, the subtype indication appears
2111 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2112 -- node is used only if a constraint is present.
2113
2114 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2115 -- with the null-exclusion part (see AI-231), we had to introduce a new
2116 -- attribute in all the parents of subtype_indication nodes to indicate
2117 -- if the null-exclusion is present.
2118
2119 -- Note: the reason that this node has expression fields is that a
2120 -- subtype indication can appear as an operand of a membership test.
2121
2122 -- N_Subtype_Indication
2123 -- Sloc points to first token of subtype mark
2124 -- Subtype_Mark (Node4)
2125 -- Constraint (Node3)
2126 -- Etype (Node5-Sem)
2127 -- Must_Not_Freeze (Flag8-Sem)
2128
2129 -- Note: Etype is a copy of the Etype field of the Subtype_Mark. The
2130 -- reason for this redundancy is so that in a list of array index types,
2131 -- the Etype can be uniformly accessed to determine the subscript type.
2132 -- This means that no Itype is constructed for the actual subtype that
2133 -- is created by the subtype indication. If such an Itype is required,
2134 -- it is constructed in the context in which the indication appears.
2135
2136 -------------------------
2137 -- 3.2.2 Subtype Mark --
2138 -------------------------
2139
2140 -- SUBTYPE_MARK ::= subtype_NAME
2141
2142 -----------------------
2143 -- 3.2.2 Constraint --
2144 -----------------------
2145
2146 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2147
2148 ------------------------------
2149 -- 3.2.2 Scalar Constraint --
2150 ------------------------------
2151
2152 -- SCALAR_CONSTRAINT ::=
2153 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2154
2155 ---------------------------------
2156 -- 3.2.2 Composite Constraint --
2157 ---------------------------------
2158
2159 -- COMPOSITE_CONSTRAINT ::=
2160 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2161
2162 -------------------------------
2163 -- 3.3.1 Object Declaration --
2164 -------------------------------
2165
2166 -- OBJECT_DECLARATION ::=
2167 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2168 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION];
2169 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2170 -- ACCESS_DEFINITION [:= EXPRESSION];
2171 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2172 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION];
2173 -- | SINGLE_TASK_DECLARATION
2174 -- | SINGLE_PROTECTED_DECLARATION
2175
2176 -- Note: aliased is not permitted in Ada 83 mode
2177
2178 -- The N_Object_Declaration node is only for the first two cases.
2179 -- Single task declaration is handled by P_Task (9.1)
2180 -- Single protected declaration is handled by P_protected (9.5)
2181
2182 -- Although the syntax allows multiple identifiers in the list, the
2183 -- semantics is as though successive declarations were given with
2184 -- identical type definition and expression components. To simplify
2185 -- semantic processing, the parser represents a multiple declaration
2186 -- case as a sequence of single declarations, using the More_Ids and
2187 -- Prev_Ids flags to preserve the original source form as described
2188 -- in the section on "Handling of Defining Identifier Lists".
2189
2190 -- The flag Has_Init_Expression is set if an initializing expression
2191 -- is present. Normally it is set if and only if Expression contains
2192 -- a non-empty value, but there is an exception to this. When the
2193 -- initializing expression is an aggregate which requires explicit
2194 -- assignments, the Expression field gets set to Empty, but this flag
2195 -- is still set, so we don't forget we had an initializing expression.
2196
2197 -- Note: if a range check is required for the initialization
2198 -- expression then the Do_Range_Check flag is set in the Expression,
2199 -- with the check being done against the type given by the object
2200 -- definition, which is also the Etype of the defining identifier.
2201
2202 -- Note: the contents of the Expression field must be ignored (i.e.
2203 -- treated as though it were Empty) if No_Initialization is set True.
2204
2205 -- Note: the back end places some restrictions on the form of the
2206 -- Expression field. If the object being declared is Atomic, then
2207 -- the Expression may not have the form of an aggregate (since this
2208 -- might cause the back end to generate separate assignments). In this
2209 -- case the front end must generate an extra temporary and initialize
2210 -- this temporary as required (the temporary itself is not atomic).
2211
2212 -- Note: there is not node kind for object definition. Instead, the
2213 -- corresponding field holds a subtype indication, an array type
2214 -- definition, or (Ada 2005, AI-406) an access definition.
2215
2216 -- N_Object_Declaration
2217 -- Sloc points to first identifier
2218 -- Defining_Identifier (Node1)
2219 -- Aliased_Present (Flag4) set if ALIASED appears
2220 -- Constant_Present (Flag17) set if CONSTANT appears
2221 -- Null_Exclusion_Present (Flag11)
2222 -- Object_Definition (Node4) subtype indic./array type def./access def.
2223 -- Expression (Node3) (set to Empty if not present)
2224 -- Handler_List_Entry (Node2-Sem)
2225 -- Corresponding_Generic_Association (Node5-Sem)
2226 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2227 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2228 -- No_Initialization (Flag13-Sem)
2229 -- Assignment_OK (Flag15-Sem)
2230 -- Exception_Junk (Flag8-Sem)
2231 -- Is_Subprogram_Descriptor (Flag16-Sem)
2232 -- Has_Init_Expression (Flag14)
2233
2234 -------------------------------------
2235 -- 3.3.1 Defining Identifier List --
2236 -------------------------------------
2237
2238 -- DEFINING_IDENTIFIER_LIST ::=
2239 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2240
2241 -------------------------------
2242 -- 3.3.2 Number Declaration --
2243 -------------------------------
2244
2245 -- NUMBER_DECLARATION ::=
2246 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2247
2248 -- Although the syntax allows multiple identifiers in the list, the
2249 -- semantics is as though successive declarations were given with
2250 -- identical expressions. To simplify semantic processing, the parser
2251 -- represents a multiple declaration case as a sequence of single
2252 -- declarations, using the More_Ids and Prev_Ids flags to preserve
2253 -- the original source form as described in the section on "Handling
2254 -- of Defining Identifier Lists".
2255
2256 -- N_Number_Declaration
2257 -- Sloc points to first identifier
2258 -- Defining_Identifier (Node1)
2259 -- Expression (Node3)
2260 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2261 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2262
2263 ----------------------------------
2264 -- 3.4 Derived Type Definition --
2265 ----------------------------------
2266
2267 -- DERIVED_TYPE_DEFINITION ::=
2268 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2269 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2270
2271 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
2272 -- in Ada 83 mode
2273
2274 -- Note: a record extension part is required if ABSTRACT is present
2275
2276 -- N_Derived_Type_Definition
2277 -- Sloc points to NEW
2278 -- Abstract_Present (Flag4)
2279 -- Null_Exclusion_Present (Flag11) (set to False if not present)
2280 -- Subtype_Indication (Node5)
2281 -- Record_Extension_Part (Node3) (set to Empty if not present)
2282 -- Limited_Present (Flag17)
2283 -- Task_Present (Flag5) set in task interfaces
2284 -- Protected_Present (Flag6) set in protected interfaces
2285 -- Synchronized_Present (Flag7) set in interfaces
2286 -- Interface_List (List2) (set to No_List if none)
2287 -- Interface_Present (Flag16) set in abstract interfaces
2288
2289 -- Note: Task_Present, Protected_Present, Synchronized_Present,
2290 -- Interface_List, and Interface_Present are used for abstract
2291 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2292
2293 ---------------------------
2294 -- 3.5 Range Constraint --
2295 ---------------------------
2296
2297 -- RANGE_CONSTRAINT ::= range RANGE
2298
2299 -- N_Range_Constraint
2300 -- Sloc points to RANGE
2301 -- Range_Expression (Node4)
2302
2303 ----------------
2304 -- 3.5 Range --
2305 ----------------
2306
2307 -- RANGE ::=
2308 -- RANGE_ATTRIBUTE_REFERENCE
2309 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2310
2311 -- Note: the case of a range given as a range attribute reference
2312 -- appears directly in the tree as an attribute reference.
2313
2314 -- Note: the field name for a reference to a range is Range_Expression
2315 -- rather than Range, because range is a reserved keyword in Ada!
2316
2317 -- Note: the reason that this node has expression fields is that a
2318 -- range can appear as an operand of a membership test. The Etype
2319 -- field is the type of the range (we do NOT construct an implicit
2320 -- subtype to represent the range exactly).
2321
2322 -- N_Range
2323 -- Sloc points to ..
2324 -- Low_Bound (Node1)
2325 -- High_Bound (Node2)
2326 -- Includes_Infinities (Flag11)
2327 -- plus fields for expression
2328
2329 -- Note: if the range appears in a context, such as a subtype
2330 -- declaration, where range checks are required on one or both of
2331 -- the expression fields, then type conversion nodes are inserted
2332 -- to represent the required checks.
2333
2334 ----------------------------------------
2335 -- 3.5.1 Enumeration Type Definition --
2336 ----------------------------------------
2337
2338 -- ENUMERATION_TYPE_DEFINITION ::=
2339 -- (ENUMERATION_LITERAL_SPECIFICATION
2340 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2341
2342 -- Note: the Literals field in the node described below is null for
2343 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2344 -- which special processing handles these types as special cases.
2345
2346 -- N_Enumeration_Type_Definition
2347 -- Sloc points to left parenthesis
2348 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2349 -- End_Label (Node4) (set to Empty if internally generated record)
2350
2351 ----------------------------------------------
2352 -- 3.5.1 Enumeration Literal Specification --
2353 ----------------------------------------------
2354
2355 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2356 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2357
2358 ---------------------------------------
2359 -- 3.5.1 Defining Character Literal --
2360 ---------------------------------------
2361
2362 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2363
2364 -- A defining character literal is an entity, which has additional
2365 -- fields depending on the setting of the Ekind field. These
2366 -- additional fields are defined (and access subprograms declared)
2367 -- in package Einfo.
2368
2369 -- Note: N_Defining_Character_Literal is an extended node whose fields
2370 -- are deliberate layed out to match the layout of fields in an ordinary
2371 -- N_Character_Literal node allowing for easy alteration of a character
2372 -- literal node into a defining character literal node. For details, see
2373 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2374
2375 -- N_Defining_Character_Literal
2376 -- Sloc points to literal
2377 -- Chars (Name1) contains the Name_Id for the identifier
2378 -- Next_Entity (Node2-Sem)
2379 -- Scope (Node3-Sem)
2380 -- Etype (Node5-Sem)
2381
2382 ------------------------------------
2383 -- 3.5.4 Integer Type Definition --
2384 ------------------------------------
2385
2386 -- Note: there is an error in this rule in the latest version of the
2387 -- grammar, so we have retained the old rule pending clarification.
2388
2389 -- INTEGER_TYPE_DEFINITION ::=
2390 -- SIGNED_INTEGER_TYPE_DEFINITION
2391 -- | MODULAR_TYPE_DEFINITION
2392
2393 -------------------------------------------
2394 -- 3.5.4 Signed Integer Type Definition --
2395 -------------------------------------------
2396
2397 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2398 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2399
2400 -- Note: the Low_Bound and High_Bound fields are set to Empty
2401 -- for integer types defined in package Standard.
2402
2403 -- N_Signed_Integer_Type_Definition
2404 -- Sloc points to RANGE
2405 -- Low_Bound (Node1)
2406 -- High_Bound (Node2)
2407
2408 ------------------------------------
2409 -- 3.5.4 Modular Type Definition --
2410 ------------------------------------
2411
2412 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2413
2414 -- N_Modular_Type_Definition
2415 -- Sloc points to MOD
2416 -- Expression (Node3)
2417
2418 ---------------------------------
2419 -- 3.5.6 Real Type Definition --
2420 ---------------------------------
2421
2422 -- REAL_TYPE_DEFINITION ::=
2423 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2424
2425 --------------------------------------
2426 -- 3.5.7 Floating Point Definition --
2427 --------------------------------------
2428
2429 -- FLOATING_POINT_DEFINITION ::=
2430 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2431
2432 -- Note: The Digits_Expression and Real_Range_Specifications fields
2433 -- are set to Empty for floating-point types declared in Standard.
2434
2435 -- N_Floating_Point_Definition
2436 -- Sloc points to DIGITS
2437 -- Digits_Expression (Node2)
2438 -- Real_Range_Specification (Node4) (set to Empty if not present)
2439
2440 -------------------------------------
2441 -- 3.5.7 Real Range Specification --
2442 -------------------------------------
2443
2444 -- REAL_RANGE_SPECIFICATION ::=
2445 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2446
2447 -- N_Real_Range_Specification
2448 -- Sloc points to RANGE
2449 -- Low_Bound (Node1)
2450 -- High_Bound (Node2)
2451
2452 -----------------------------------
2453 -- 3.5.9 Fixed Point Definition --
2454 -----------------------------------
2455
2456 -- FIXED_POINT_DEFINITION ::=
2457 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2458
2459 --------------------------------------------
2460 -- 3.5.9 Ordinary Fixed Point Definition --
2461 --------------------------------------------
2462
2463 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2464 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2465
2466 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2467
2468 -- N_Ordinary_Fixed_Point_Definition
2469 -- Sloc points to DELTA
2470 -- Delta_Expression (Node3)
2471 -- Real_Range_Specification (Node4)
2472
2473 -------------------------------------------
2474 -- 3.5.9 Decimal Fixed Point Definition --
2475 -------------------------------------------
2476
2477 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2478 -- delta static_EXPRESSION
2479 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2480
2481 -- Note: decimal types are not permitted in Ada 83 mode
2482
2483 -- N_Decimal_Fixed_Point_Definition
2484 -- Sloc points to DELTA
2485 -- Delta_Expression (Node3)
2486 -- Digits_Expression (Node2)
2487 -- Real_Range_Specification (Node4) (set to Empty if not present)
2488
2489 ------------------------------
2490 -- 3.5.9 Digits Constraint --
2491 ------------------------------
2492
2493 -- DIGITS_CONSTRAINT ::=
2494 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2495
2496 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2497 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2498
2499 -- N_Digits_Constraint
2500 -- Sloc points to DIGITS
2501 -- Digits_Expression (Node2)
2502 -- Range_Constraint (Node4) (set to Empty if not present)
2503
2504 --------------------------------
2505 -- 3.6 Array Type Definition --
2506 --------------------------------
2507
2508 -- ARRAY_TYPE_DEFINITION ::=
2509 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2510
2511 -----------------------------------------
2512 -- 3.6 Unconstrained Array Definition --
2513 -----------------------------------------
2514
2515 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2516 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2517 -- COMPONENT_DEFINITION
2518
2519 -- Note: dimensionality of array is indicated by number of entries in
2520 -- the Subtype_Marks list, which has one entry for each dimension.
2521
2522 -- N_Unconstrained_Array_Definition
2523 -- Sloc points to ARRAY
2524 -- Subtype_Marks (List2)
2525 -- Component_Definition (Node4)
2526
2527 -----------------------------------
2528 -- 3.6 Index Subtype Definition --
2529 -----------------------------------
2530
2531 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2532
2533 -- There is no explicit node in the tree for an index subtype
2534 -- definition since the N_Unconstrained_Array_Definition node
2535 -- incorporates the type marks which appear in this context.
2536
2537 ---------------------------------------
2538 -- 3.6 Constrained Array Definition --
2539 ---------------------------------------
2540
2541 -- CONSTRAINED_ARRAY_DEFINITION ::=
2542 -- array (DISCRETE_SUBTYPE_DEFINITION
2543 -- {, DISCRETE_SUBTYPE_DEFINITION})
2544 -- of COMPONENT_DEFINITION
2545
2546 -- Note: dimensionality of array is indicated by number of entries
2547 -- in the Discrete_Subtype_Definitions list, which has one entry
2548 -- for each dimension.
2549
2550 -- N_Constrained_Array_Definition
2551 -- Sloc points to ARRAY
2552 -- Discrete_Subtype_Definitions (List2)
2553 -- Component_Definition (Node4)
2554
2555 --------------------------------------
2556 -- 3.6 Discrete Subtype Definition --
2557 --------------------------------------
2558
2559 -- DISCRETE_SUBTYPE_DEFINITION ::=
2560 -- discrete_SUBTYPE_INDICATION | RANGE
2561
2562 -------------------------------
2563 -- 3.6 Component Definition --
2564 -------------------------------
2565
2566 -- COMPONENT_DEFINITION ::=
2567 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
2568
2569 -- Note: although the syntax does not permit a component definition to
2570 -- be an anonymous array (and the parser will diagnose such an attempt
2571 -- with an appropriate message), it is possible for anonymous arrays
2572 -- to appear as component definitions. The semantics and back end handle
2573 -- this case properly, and the expander in fact generates such cases.
2574 -- Access_Definition is an optional field that gives support to
2575 -- Ada 2005 (AI-230). The parser generates nodes that have either the
2576 -- Subtype_Indication field or else the Access_Definition field.
2577
2578 -- N_Component_Definition
2579 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
2580 -- Aliased_Present (Flag4)
2581 -- Null_Exclusion_Present (Flag11)
2582 -- Subtype_Indication (Node5) (set to Empty if not present)
2583 -- Access_Definition (Node3) (set to Empty if not present)
2584
2585 -----------------------------
2586 -- 3.6.1 Index Constraint --
2587 -----------------------------
2588
2589 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
2590
2591 -- It is not in general possible to distinguish between discriminant
2592 -- constraints and index constraints at parse time, since a simple
2593 -- name could be either the subtype mark of a discrete range, or an
2594 -- expression in a discriminant association with no name. Either
2595 -- entry appears simply as the name, and the semantic parse must
2596 -- distinguish between the two cases. Thus we use a common tree
2597 -- node format for both of these constraint types.
2598
2599 -- See Discriminant_Constraint for format of node
2600
2601 ---------------------------
2602 -- 3.6.1 Discrete Range --
2603 ---------------------------
2604
2605 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
2606
2607 ----------------------------
2608 -- 3.7 Discriminant Part --
2609 ----------------------------
2610
2611 -- DISCRIMINANT_PART ::=
2612 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
2613
2614 ------------------------------------
2615 -- 3.7 Unknown Discriminant Part --
2616 ------------------------------------
2617
2618 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
2619
2620 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
2621
2622 -- There is no explicit node in the tree for an unknown discriminant
2623 -- part. Instead the Unknown_Discriminants_Present flag is set in the
2624 -- parent node.
2625
2626 ----------------------------------
2627 -- 3.7 Known Discriminant Part --
2628 ----------------------------------
2629
2630 -- KNOWN_DISCRIMINANT_PART ::=
2631 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
2632
2633 -------------------------------------
2634 -- 3.7 Discriminant Specification --
2635 -------------------------------------
2636
2637 -- DISCRIMINANT_SPECIFICATION ::=
2638 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
2639 -- [:= DEFAULT_EXPRESSION]
2640 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
2641 -- [:= DEFAULT_EXPRESSION]
2642
2643 -- Although the syntax allows multiple identifiers in the list, the
2644 -- semantics is as though successive specifications were given with
2645 -- identical type definition and expression components. To simplify
2646 -- semantic processing, the parser represents a multiple declaration
2647 -- case as a sequence of single specifications, using the More_Ids and
2648 -- Prev_Ids flags to preserve the original source form as described
2649 -- in the section on "Handling of Defining Identifier Lists".
2650
2651 -- N_Discriminant_Specification
2652 -- Sloc points to first identifier
2653 -- Defining_Identifier (Node1)
2654 -- Null_Exclusion_Present (Flag11)
2655 -- Discriminant_Type (Node5) subtype mark or access parameter definition
2656 -- Expression (Node3) (set to Empty if no default expression)
2657 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2658 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2659
2660 -----------------------------
2661 -- 3.7 Default Expression --
2662 -----------------------------
2663
2664 -- DEFAULT_EXPRESSION ::= EXPRESSION
2665
2666 ------------------------------------
2667 -- 3.7.1 Discriminant Constraint --
2668 ------------------------------------
2669
2670 -- DISCRIMINANT_CONSTRAINT ::=
2671 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
2672
2673 -- It is not in general possible to distinguish between discriminant
2674 -- constraints and index constraints at parse time, since a simple
2675 -- name could be either the subtype mark of a discrete range, or an
2676 -- expression in a discriminant association with no name. Either
2677 -- entry appears simply as the name, and the semantic parse must
2678 -- distinguish between the two cases. Thus we use a common tree
2679 -- node format for both of these constraint types.
2680
2681 -- N_Index_Or_Discriminant_Constraint
2682 -- Sloc points to left paren
2683 -- Constraints (List1) points to list of discrete ranges or
2684 -- discriminant associations
2685
2686 -------------------------------------
2687 -- 3.7.1 Discriminant Association --
2688 -------------------------------------
2689
2690 -- DISCRIMINANT_ASSOCIATION ::=
2691 -- [discriminant_SELECTOR_NAME
2692 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
2693
2694 -- Note: a discriminant association that has no selector name list
2695 -- appears directly as an expression in the tree.
2696
2697 -- N_Discriminant_Association
2698 -- Sloc points to first token of discriminant association
2699 -- Selector_Names (List1) (always non-empty, since if no selector
2700 -- names are present, this node is not used, see comment above)
2701 -- Expression (Node3)
2702
2703 ---------------------------------
2704 -- 3.8 Record Type Definition --
2705 ---------------------------------
2706
2707 -- RECORD_TYPE_DEFINITION ::=
2708 -- [[abstract] tagged] [limited] RECORD_DEFINITION
2709
2710 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
2711
2712 -- There is no explicit node in the tree for a record type definition.
2713 -- Instead the flags for Tagged_Present and Limited_Present appear in
2714 -- the N_Record_Definition node for a record definition appearing in
2715 -- the context of a record type definition.
2716
2717 ----------------------------
2718 -- 3.8 Record Definition --
2719 ----------------------------
2720
2721 -- RECORD_DEFINITION ::=
2722 -- record
2723 -- COMPONENT_LIST
2724 -- end record
2725 -- | null record
2726
2727 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
2728 -- flags appear only for a record definition appearing in a record
2729 -- type definition.
2730
2731 -- Note: the NULL RECORD case is not permitted in Ada 83
2732
2733 -- N_Record_Definition
2734 -- Sloc points to RECORD or NULL
2735 -- End_Label (Node4) (set to Empty if internally generated record)
2736 -- Abstract_Present (Flag4)
2737 -- Tagged_Present (Flag15)
2738 -- Limited_Present (Flag17)
2739 -- Component_List (Node1) empty in null record case
2740 -- Null_Present (Flag13) set in null record case
2741 -- Task_Present (Flag5) set in task interfaces
2742 -- Protected_Present (Flag6) set in protected interfaces
2743 -- Synchronized_Present (Flag7) set in interfaces
2744 -- Interface_Present (Flag16) set in abstract interfaces
2745 -- Interface_List (List2) (set to No_List if none)
2746
2747 -- Note: Task_Present, Protected_Present, Synchronized _Present,
2748 -- Interface_List and Interface_Present are used for abstract
2749 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2750
2751 -------------------------
2752 -- 3.8 Component List --
2753 -------------------------
2754
2755 -- COMPONENT_LIST ::=
2756 -- COMPONENT_ITEM {COMPONENT_ITEM}
2757 -- | {COMPONENT_ITEM} VARIANT_PART
2758 -- | null;
2759
2760 -- N_Component_List
2761 -- Sloc points to first token of component list
2762 -- Component_Items (List3)
2763 -- Variant_Part (Node4) (set to Empty if no variant part)
2764 -- Null_Present (Flag13)
2765
2766 -------------------------
2767 -- 3.8 Component Item --
2768 -------------------------
2769
2770 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
2771
2772 -- Note: A component item can also be a pragma, and in the tree
2773 -- that is obtained after semantic processing, a component item
2774 -- can be an N_Null node resulting from a non-recognized pragma.
2775
2776 --------------------------------
2777 -- 3.8 Component Declaration --
2778 --------------------------------
2779
2780 -- COMPONENT_DECLARATION ::=
2781 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
2782 -- [:= DEFAULT_EXPRESSION]
2783
2784 -- Note: although the syntax does not permit a component definition to
2785 -- be an anonymous array (and the parser will diagnose such an attempt
2786 -- with an appropriate message), it is possible for anonymous arrays
2787 -- to appear as component definitions. The semantics and back end handle
2788 -- this case properly, and the expander in fact generates such cases.
2789
2790 -- Although the syntax allows multiple identifiers in the list, the
2791 -- semantics is as though successive declarations were given with the
2792 -- same component definition and expression components. To simplify
2793 -- semantic processing, the parser represents a multiple declaration
2794 -- case as a sequence of single declarations, using the More_Ids and
2795 -- Prev_Ids flags to preserve the original source form as described
2796 -- in the section on "Handling of Defining Identifier Lists".
2797
2798 -- N_Component_Declaration
2799 -- Sloc points to first identifier
2800 -- Defining_Identifier (Node1)
2801 -- Component_Definition (Node4)
2802 -- Expression (Node3) (set to Empty if no default expression)
2803 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2804 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2805
2806 -------------------------
2807 -- 3.8.1 Variant Part --
2808 -------------------------
2809
2810 -- VARIANT_PART ::=
2811 -- case discriminant_DIRECT_NAME is
2812 -- VARIANT
2813 -- {VARIANT}
2814 -- end case;
2815
2816 -- Note: the variants list can contain pragmas as well as variants.
2817 -- In a properly formed program there is at least one variant.
2818
2819 -- N_Variant_Part
2820 -- Sloc points to CASE
2821 -- Name (Node2)
2822 -- Variants (List1)
2823
2824 --------------------
2825 -- 3.8.1 Variant --
2826 --------------------
2827
2828 -- VARIANT ::=
2829 -- when DISCRETE_CHOICE_LIST =>
2830 -- COMPONENT_LIST
2831
2832 -- N_Variant
2833 -- Sloc points to WHEN
2834 -- Discrete_Choices (List4)
2835 -- Component_List (Node1)
2836 -- Enclosing_Variant (Node2-Sem)
2837 -- Present_Expr (Uint3-Sem)
2838 -- Dcheck_Function (Node5-Sem)
2839
2840 ---------------------------------
2841 -- 3.8.1 Discrete Choice List --
2842 ---------------------------------
2843
2844 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
2845
2846 ----------------------------
2847 -- 3.8.1 Discrete Choice --
2848 ----------------------------
2849
2850 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
2851
2852 -- Note: in Ada 83 mode, the expression must be a simple expression
2853
2854 -- The only choice that appears explicitly is the OTHERS choice, as
2855 -- defined here. Other cases of discrete choice (expression and
2856 -- discrete range) appear directly. This production is also used
2857 -- for the OTHERS possibility of an exception choice.
2858
2859 -- Note: in accordance with the syntax, the parser does not check that
2860 -- OTHERS appears at the end on its own in a choice list context. This
2861 -- is a semantic check.
2862
2863 -- N_Others_Choice
2864 -- Sloc points to OTHERS
2865 -- Others_Discrete_Choices (List1-Sem)
2866 -- All_Others (Flag11-Sem)
2867
2868 ----------------------------------
2869 -- 3.9.1 Record Extension Part --
2870 ----------------------------------
2871
2872 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
2873
2874 -- Note: record extension parts are not permitted in Ada 83 mode
2875
2876 --------------------------------------
2877 -- 3.9.4 Interface Type Definition --
2878 --------------------------------------
2879
2880 -- INTERFACE_TYPE_DEFINITION ::=
2881 -- [limited | task | protected | synchronized]
2882 -- interface [interface_list]
2883
2884 -- Note: Interfaces are implemented with N_Record_Definition and
2885 -- N_Derived_Type_Definition nodes because most of the support
2886 -- for the analysis of abstract types has been reused to
2887 -- analyze abstract interfaces.
2888
2889 ----------------------------------
2890 -- 3.10 Access Type Definition --
2891 ----------------------------------
2892
2893 -- ACCESS_TYPE_DEFINITION ::=
2894 -- ACCESS_TO_OBJECT_DEFINITION
2895 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2896
2897 --------------------------
2898 -- 3.10 Null Exclusion --
2899 --------------------------
2900
2901 -- NULL_EXCLUSION ::= not null
2902
2903 ---------------------------------------
2904 -- 3.10 Access To Object Definition --
2905 ---------------------------------------
2906
2907 -- ACCESS_TO_OBJECT_DEFINITION ::=
2908 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
2909 -- SUBTYPE_INDICATION
2910
2911 -- N_Access_To_Object_Definition
2912 -- Sloc points to ACCESS
2913 -- All_Present (Flag15)
2914 -- Null_Exclusion_Present (Flag11)
2915 -- Subtype_Indication (Node5)
2916 -- Constant_Present (Flag17)
2917
2918 -----------------------------------
2919 -- 3.10 General Access Modifier --
2920 -----------------------------------
2921
2922 -- GENERAL_ACCESS_MODIFIER ::= all | constant
2923
2924 -- Note: general access modifiers are not permitted in Ada 83 mode
2925
2926 -- There is no explicit node in the tree for general access modifier.
2927 -- Instead the All_Present or Constant_Present flags are set in the
2928 -- parent node.
2929
2930 -------------------------------------------
2931 -- 3.10 Access To Subprogram Definition --
2932 -------------------------------------------
2933
2934 -- ACCESS_TO_SUBPROGRAM_DEFINITION
2935 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
2936 -- | [NULL_EXCLUSION] access [protected] function
2937 -- PARAMETER_AND_RESULT_PROFILE
2938
2939 -- Note: access to subprograms are not permitted in Ada 83 mode
2940
2941 -- N_Access_Function_Definition
2942 -- Sloc points to ACCESS
2943 -- Null_Exclusion_Present (Flag11)
2944 -- Null_Exclusion_In_Return_Present (Flag14)
2945 -- Protected_Present (Flag6)
2946 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2947 -- Result_Definition (Node4) result subtype (subtype mark or access def)
2948
2949 -- N_Access_Procedure_Definition
2950 -- Sloc points to ACCESS
2951 -- Null_Exclusion_Present (Flag11)
2952 -- Protected_Present (Flag6)
2953 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2954
2955 -----------------------------
2956 -- 3.10 Access Definition --
2957 -----------------------------
2958
2959 -- ACCESS_DEFINITION ::=
2960 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
2961 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2962
2963 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
2964
2965 -- N_Access_Definition
2966 -- Sloc points to ACCESS
2967 -- Null_Exclusion_Present (Flag11)
2968 -- All_Present (Flag15)
2969 -- Constant_Present (Flag17)
2970 -- Subtype_Mark (Node4)
2971 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
2972
2973 -----------------------------------------
2974 -- 3.10.1 Incomplete Type Declaration --
2975 -----------------------------------------
2976
2977 -- INCOMPLETE_TYPE_DECLARATION ::=
2978 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
2979
2980 -- N_Incomplete_Type_Declaration
2981 -- Sloc points to TYPE
2982 -- Defining_Identifier (Node1)
2983 -- Discriminant_Specifications (List4) (set to No_List if no
2984 -- discriminant part, or if the discriminant part is an
2985 -- unknown discriminant part)
2986 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
2987 -- Tagged_Present (Flag15)
2988
2989 ----------------------------
2990 -- 3.11 Declarative Part --
2991 ----------------------------
2992
2993 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
2994
2995 -- Note: although the parser enforces the syntactic requirement that
2996 -- a declarative part can contain only declarations, the semantic
2997 -- processing may add statements to the list of actions in a
2998 -- declarative part, so the code generator should be prepared
2999 -- to accept a statement in this position.
3000
3001 ----------------------------
3002 -- 3.11 Declarative Item --
3003 ----------------------------
3004
3005 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
3006
3007 ----------------------------------
3008 -- 3.11 Basic Declarative Item --
3009 ----------------------------------
3010
3011 -- BASIC_DECLARATIVE_ITEM ::=
3012 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
3013
3014 ----------------
3015 -- 3.11 Body --
3016 ----------------
3017
3018 -- BODY ::= PROPER_BODY | BODY_STUB
3019
3020 -----------------------
3021 -- 3.11 Proper Body --
3022 -----------------------
3023
3024 -- PROPER_BODY ::=
3025 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
3026
3027 ---------------
3028 -- 4.1 Name --
3029 ---------------
3030
3031 -- NAME ::=
3032 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
3033 -- | INDEXED_COMPONENT | SLICE
3034 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
3035 -- | TYPE_CONVERSION | FUNCTION_CALL
3036 -- | CHARACTER_LITERAL
3037
3038 ----------------------
3039 -- 4.1 Direct Name --
3040 ----------------------
3041
3042 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3043
3044 -----------------
3045 -- 4.1 Prefix --
3046 -----------------
3047
3048 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3049
3050 -------------------------------
3051 -- 4.1 Explicit Dereference --
3052 -------------------------------
3053
3054 -- EXPLICIT_DEREFERENCE ::= NAME . all
3055
3056 -- N_Explicit_Dereference
3057 -- Sloc points to ALL
3058 -- Prefix (Node3)
3059 -- Actual_Designated_Subtype (Node4-Sem)
3060 -- plus fields for expression
3061
3062 -------------------------------
3063 -- 4.1 Implicit Dereference --
3064 -------------------------------
3065
3066 -- IMPLICIT_DEREFERENCE ::= NAME
3067
3068 ------------------------------
3069 -- 4.1.1 Indexed Component --
3070 ------------------------------
3071
3072 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3073
3074 -- Note: the parser may generate this node in some situations where it
3075 -- should be a function call. The semantic pass must correct this
3076 -- misidentification (which is inevitable at the parser level).
3077
3078 -- N_Indexed_Component
3079 -- Sloc contains a copy of the Sloc value of the Prefix
3080 -- Prefix (Node3)
3081 -- Expressions (List1)
3082 -- plus fields for expression
3083
3084 -- Note: if any of the subscripts requires a range check, then the
3085 -- Do_Range_Check flag is set on the corresponding expression, with
3086 -- the index type being determined from the type of the Prefix, which
3087 -- references the array being indexed.
3088
3089 -- Note: in a fully analyzed and expanded indexed component node, and
3090 -- hence in any such node that gigi sees, if the prefix is an access
3091 -- type, then an explicit dereference operation has been inserted.
3092
3093 ------------------
3094 -- 4.1.2 Slice --
3095 ------------------
3096
3097 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3098
3099 -- Note: an implicit subtype is created to describe the resulting
3100 -- type, so that the bounds of this type are the bounds of the slice.
3101
3102 -- N_Slice
3103 -- Sloc points to first token of prefix
3104 -- Prefix (Node3)
3105 -- Discrete_Range (Node4)
3106 -- plus fields for expression
3107
3108 -------------------------------
3109 -- 4.1.3 Selected Component --
3110 -------------------------------
3111
3112 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3113
3114 -- Note: selected components that are semantically expanded names get
3115 -- changed during semantic processing into the separate N_Expanded_Name
3116 -- node. See description of this node in the section on semantic nodes.
3117
3118 -- N_Selected_Component
3119 -- Sloc points to period
3120 -- Prefix (Node3)
3121 -- Selector_Name (Node2)
3122 -- Associated_Node (Node4-Sem)
3123 -- Do_Discriminant_Check (Flag13-Sem)
3124 -- Is_In_Discriminant_Check (Flag11-Sem)
3125 -- plus fields for expression
3126
3127 --------------------------
3128 -- 4.1.3 Selector Name --
3129 --------------------------
3130
3131 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3132
3133 --------------------------------
3134 -- 4.1.4 Attribute Reference --
3135 --------------------------------
3136
3137 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3138
3139 -- Note: the syntax is quite ambiguous at this point. Consider:
3140
3141 -- A'Length (X) X is part of the attribute designator
3142 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
3143 -- A'Class (X) X is the expression of a type conversion
3144
3145 -- It would be possible for the parser to distinguish these cases
3146 -- by looking at the attribute identifier. However, that would mean
3147 -- more work in introducing new implementation defined attributes,
3148 -- and also it would mean that special processing for attributes
3149 -- would be scattered around, instead of being centralized in the
3150 -- semantic routine that handles an N_Attribute_Reference node.
3151 -- Consequently, the parser in all the above cases stores the
3152 -- expression (X in these examples) as a single element list in
3153 -- in the Expressions field of the N_Attribute_Reference node.
3154
3155 -- Similarly, for attributes like Max which take two arguments,
3156 -- we store the two arguments as a two element list in the
3157 -- Expressions field. Of course it is clear at parse time that
3158 -- this case is really a function call with an attribute as the
3159 -- prefix, but it turns out to be convenient to handle the two
3160 -- argument case in a similar manner to the one argument case,
3161 -- and indeed in general the parser will accept any number of
3162 -- expressions in this position and store them as a list in the
3163 -- attribute reference node. This allows for future addition of
3164 -- attributes that take more than two arguments.
3165
3166 -- Note: named associates are not permitted in function calls where
3167 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
3168 -- to skip the normal subprogram argument processing.
3169
3170 -- Note: for the attributes whose designators are technically keywords,
3171 -- i.e. digits, access, delta, range, the Attribute_Name field contains
3172 -- the corresponding name, even though no identifier is involved.
3173
3174 -- Note: the generated code may contain stream attributes applied to
3175 -- limited types for which no stream routines exist officially. In such
3176 -- case, the result is to use the stream attribute for the underlying
3177 -- full type, or in the case of a protected type, the components
3178 -- (including any discriminants) are merely streamed in order.
3179
3180 -- See Exp_Attr for a complete description of which attributes are
3181 -- passed onto Gigi, and which are handled entirely by the front end.
3182
3183 -- Gigi restriction: For the Pos attribute, the prefix cannot be
3184 -- a non-standard enumeration type or a nonzero/zero semantics
3185 -- boolean type, so the value is simply the stored representation.
3186
3187 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
3188 -- references a subprogram that is a renaming, then the front end must
3189 -- rewrite the attribute to refer directly to the renamed entity.
3190
3191 -- Note: In generated code, the Address and Unrestricted_Access
3192 -- attributes can be applied to any expression, and the meaning is
3193 -- to create an object containing the value (the object is in the
3194 -- current stack frame), and pass the address of this value. If the
3195 -- Must_Be_Byte_Aligned flag is set, then the object whose address
3196 -- is taken must be on a byte (storage unit) boundary, and if it is
3197 -- not (or may not be), then the generated code must create a copy
3198 -- that is byte aligned, and pass the address of this copy.
3199
3200 -- N_Attribute_Reference
3201 -- Sloc points to apostrophe
3202 -- Prefix (Node3)
3203 -- Attribute_Name (Name2) identifier name from attribute designator
3204 -- Expressions (List1) (set to No_List if no associated expressions)
3205 -- Entity (Node4-Sem) used if the attribute yields a type
3206 -- Associated_Node (Node4-Sem)
3207 -- Do_Overflow_Check (Flag17-Sem)
3208 -- Redundant_Use (Flag13-Sem)
3209 -- Must_Be_Byte_Aligned (Flag14)
3210 -- plus fields for expression
3211
3212 ---------------------------------
3213 -- 4.1.4 Attribute Designator --
3214 ---------------------------------
3215
3216 -- ATTRIBUTE_DESIGNATOR ::=
3217 -- IDENTIFIER [(static_EXPRESSION)]
3218 -- | access | delta | digits
3219
3220 -- There is no explicit node in the tree for an attribute designator.
3221 -- Instead the Attribute_Name and Expressions fields of the parent
3222 -- node (N_Attribute_Reference node) hold the information.
3223
3224 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
3225 -- designator, then they are treated as identifiers internally
3226 -- rather than the keywords of the same name.
3227
3228 --------------------------------------
3229 -- 4.1.4 Range Attribute Reference --
3230 --------------------------------------
3231
3232 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3233
3234 -- A range attribute reference is represented in the tree using the
3235 -- normal N_Attribute_Reference node.
3236
3237 ---------------------------------------
3238 -- 4.1.4 Range Attribute Designator --
3239 ---------------------------------------
3240
3241 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3242
3243 -- A range attribute designator is represented in the tree using the
3244 -- normal N_Attribute_Reference node.
3245
3246 --------------------
3247 -- 4.3 Aggregate --
3248 --------------------
3249
3250 -- AGGREGATE ::=
3251 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3252
3253 -----------------------------
3254 -- 4.3.1 Record Aggregate --
3255 -----------------------------
3256
3257 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3258
3259 -- N_Aggregate
3260 -- Sloc points to left parenthesis
3261 -- Expressions (List1) (set to No_List if none or null record case)
3262 -- Component_Associations (List2) (set to No_List if none)
3263 -- Null_Record_Present (Flag17)
3264 -- Aggregate_Bounds (Node3-Sem)
3265 -- Associated_Node (Node4-Sem)
3266 -- Static_Processing_OK (Flag4-Sem)
3267 -- Compile_Time_Known_Aggregate (Flag18-Sem)
3268 -- Expansion_Delayed (Flag11-Sem)
3269 -- Has_Self_Reference (Flag13-Sem)
3270 -- plus fields for expression
3271
3272 -- Note: this structure is used for both record and array aggregates
3273 -- since the two cases are not separable by the parser. The parser
3274 -- makes no attempt to enforce consistency here, so it is up to the
3275 -- semantic phase to make sure that the aggregate is consistent (i.e.
3276 -- that it is not a "half-and-half" case that mixes record and array
3277 -- syntax. In particular, for a record aggregate, the expressions
3278 -- field will be set if there are positional associations.
3279
3280 -- Note: N_Aggregate is not used for all aggregates; in particular,
3281 -- there is a separate node kind for extension aggregates.
3282
3283 -- Note: gigi/gcc can handle array aggregates correctly providing that
3284 -- they are entirely positional, and the array subtype involved has a
3285 -- known at compile time length and is not bit packed, or a convention
3286 -- Fortran array with more than one dimension. If these conditions
3287 -- are not met, then the front end must translate the aggregate into
3288 -- an appropriate set of assignments into a temporary.
3289
3290 -- Note: for the record aggregate case, gigi/gcc can handle all cases
3291 -- of record aggregates, including those for packed, and rep-claused
3292 -- records, and also variant records, providing that there are no
3293 -- variable length fields whose size is not known at runtime, and
3294 -- providing that the aggregate is presented in fully named form.
3295
3296 ----------------------------------------------
3297 -- 4.3.1 Record Component Association List --
3298 ----------------------------------------------
3299
3300 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
3301 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3302 -- | null record
3303
3304 -- There is no explicit node in the tree for a record component
3305 -- association list. Instead the Null_Record_Present flag is set in
3306 -- the parent node for the NULL RECORD case.
3307
3308 ------------------------------------------------------
3309 -- 4.3.1 Record Component Association (also 4.3.3) --
3310 ------------------------------------------------------
3311
3312 -- RECORD_COMPONENT_ASSOCIATION ::=
3313 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
3314
3315 -- N_Component_Association
3316 -- Sloc points to first selector name
3317 -- Choices (List1)
3318 -- Loop_Actions (List2-Sem)
3319 -- Expression (Node3)
3320 -- Box_Present (Flag15)
3321
3322 -- Note: this structure is used for both record component associations
3323 -- and array component associations, since the two cases aren't always
3324 -- separable by the parser. The choices list may represent either a
3325 -- list of selector names in the record aggregate case, or a list of
3326 -- discrete choices in the array aggregate case or an N_Others_Choice
3327 -- node (which appears as a singleton list). Box_Present gives support
3328 -- to Ada 2005 (AI-287).
3329
3330 ----------------------------------
3331 -- 4.3.1 Component Choice List --
3332 ----------------------------------
3333
3334 -- COMPONENT_CHOICE_LIST ::=
3335 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
3336 -- | others
3337
3338 -- The entries of a component choice list appear in the Choices list of
3339 -- the associated N_Component_Association, as either selector names, or
3340 -- as an N_Others_Choice node.
3341
3342 --------------------------------
3343 -- 4.3.2 Extension Aggregate --
3344 --------------------------------
3345
3346 -- EXTENSION_AGGREGATE ::=
3347 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3348
3349 -- Note: extension aggregates are not permitted in Ada 83 mode
3350
3351 -- N_Extension_Aggregate
3352 -- Sloc points to left parenthesis
3353 -- Ancestor_Part (Node3)
3354 -- Associated_Node (Node4-Sem)
3355 -- Expressions (List1) (set to No_List if none or null record case)
3356 -- Component_Associations (List2) (set to No_List if none)
3357 -- Null_Record_Present (Flag17)
3358 -- Expansion_Delayed (Flag11-Sem)
3359 -- Has_Self_Reference (Flag13-Sem)
3360 -- plus fields for expression
3361
3362 --------------------------
3363 -- 4.3.2 Ancestor Part --
3364 --------------------------
3365
3366 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3367
3368 ----------------------------
3369 -- 4.3.3 Array Aggregate --
3370 ----------------------------
3371
3372 -- ARRAY_AGGREGATE ::=
3373 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3374
3375 ---------------------------------------
3376 -- 4.3.3 Positional Array Aggregate --
3377 ---------------------------------------
3378
3379 -- POSITIONAL_ARRAY_AGGREGATE ::=
3380 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3381 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3382
3383 -- See Record_Aggregate (4.3.1) for node structure
3384
3385 ----------------------------------
3386 -- 4.3.3 Named Array Aggregate --
3387 ----------------------------------
3388
3389 -- NAMED_ARRAY_AGGREGATE ::=
3390 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3391
3392 -- See Record_Aggregate (4.3.1) for node structure
3393
3394 ----------------------------------------
3395 -- 4.3.3 Array Component Association --
3396 ----------------------------------------
3397
3398 -- ARRAY_COMPONENT_ASSOCIATION ::=
3399 -- DISCRETE_CHOICE_LIST => EXPRESSION
3400
3401 -- See Record_Component_Association (4.3.1) for node structure
3402
3403 --------------------------------------------------
3404 -- 4.4 Expression/Relation/Term/Factor/Primary --
3405 --------------------------------------------------
3406
3407 -- EXPRESSION ::=
3408 -- RELATION {and RELATION} | RELATION {and then RELATION}
3409 -- | RELATION {or RELATION} | RELATION {or else RELATION}
3410 -- | RELATION {xor RELATION}
3411
3412 -- RELATION ::=
3413 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3414 -- | SIMPLE_EXPRESSION [not] in RANGE
3415 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3416
3417 -- SIMPLE_EXPRESSION ::=
3418 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3419
3420 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3421
3422 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3423
3424 -- No nodes are generated for any of these constructs. Instead, the
3425 -- node for the operator appears directly. When we refer to an
3426 -- expression in this description, we mean any of the possible
3427 -- constituent components of an expression (e.g. identifier is
3428 -- an example of an expression).
3429
3430 ------------------
3431 -- 4.4 Primary --
3432 ------------------
3433
3434 -- PRIMARY ::=
3435 -- NUMERIC_LITERAL | null
3436 -- | STRING_LITERAL | AGGREGATE
3437 -- | NAME | QUALIFIED_EXPRESSION
3438 -- | ALLOCATOR | (EXPRESSION)
3439
3440 -- Usually there is no explicit node in the tree for primary. Instead
3441 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3442 -- exceptions. First, there is an explicit node for a null primary.
3443
3444 -- N_Null
3445 -- Sloc points to NULL
3446 -- plus fields for expression
3447
3448 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3449 -- that the parser keep track of which subexpressions are enclosed
3450 -- in parentheses, and how many levels of parentheses are used. This
3451 -- information is required for optimization purposes, and also for
3452 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3453 -- conform with ((((1)))) in the body).
3454
3455 -- The parentheses are recorded by keeping a Paren_Count field in every
3456 -- subexpression node (it is actually present in all nodes, but only
3457 -- used in subexpression nodes). This count records the number of
3458 -- levels of parentheses. If the number of levels in the source exceeds
3459 -- the maximum accommodated by this count, then the count is simply left
3460 -- at the maximum value. This means that there are some pathological
3461 -- cases of failure to detect conformance failures (e.g. an expression
3462 -- with 500 levels of parens will conform with one with 501 levels),
3463 -- but we do not need to lose sleep over this.
3464
3465 -- Historical note: in versions of GNAT prior to 1.75, there was a node
3466 -- type N_Parenthesized_Expression used to accurately record unlimited
3467 -- numbers of levels of parentheses. However, it turned out to be a
3468 -- real nuisance to have to take into account the possible presence of
3469 -- this node during semantic analysis, since basically parentheses have
3470 -- zero relevance to semantic analysis.
3471
3472 -- Note: the level of parentheses always present in things like
3473 -- aggregates does not count, only the parentheses in the primary
3474 -- (EXPRESSION) affect the setting of the Paren_Count field.
3475
3476 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
3477 -- treated as though it were Empty) if No_Initialization is set True.
3478
3479 --------------------------------------
3480 -- 4.5 Short Circuit Control Forms --
3481 --------------------------------------
3482
3483 -- EXPRESSION ::=
3484 -- RELATION {and then RELATION} | RELATION {or else RELATION}
3485
3486 -- Gigi restriction: For both these control forms, the operand and
3487 -- result types are always Standard.Boolean. The expander inserts the
3488 -- required conversion operations where needed to ensure this is the
3489 -- case.
3490
3491 -- N_And_Then
3492 -- Sloc points to AND of AND THEN
3493 -- Left_Opnd (Node2)
3494 -- Right_Opnd (Node3)
3495 -- Actions (List1-Sem)
3496 -- plus fields for expression
3497
3498 -- N_Or_Else
3499 -- Sloc points to OR of OR ELSE
3500 -- Left_Opnd (Node2)
3501 -- Right_Opnd (Node3)
3502 -- Actions (List1-Sem)
3503 -- plus fields for expression
3504
3505 -- Note: The Actions field is used to hold actions associated with
3506 -- the right hand operand. These have to be treated specially since
3507 -- they are not unconditionally executed. See Insert_Actions for a
3508 -- more detailed description of how these actions are handled.
3509
3510 ---------------------------
3511 -- 4.5 Membership Tests --
3512 ---------------------------
3513
3514 -- RELATION ::=
3515 -- SIMPLE_EXPRESSION [not] in RANGE
3516 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3517
3518 -- Note: although the grammar above allows only a range or a subtype
3519 -- mark, the parser in fact will accept any simple expression in place
3520 -- of a subtype mark. This means that the semantic analyzer must be able
3521 -- to deal with, and diagnose a simple expression other than a name for
3522 -- the right operand. This simplifies error recovery in the parser.
3523
3524 -- If extensions are enabled, the grammar is as follows:
3525
3526 -- RELATION ::=
3527 -- SIMPLE_EXPRESSION [not] in SET_ALTERNATIVE {| SET_ALTERNATIVE}
3528
3529 -- SET_ALTERNATIVE ::= RANGE | SUBTYPE_MARK
3530
3531 -- The Alternatives field below is present only if there is more than
3532 -- one Set_Alternative present, in which case Right_Opnd is set to
3533 -- Empty, and Alternatives contains the list of alternatives. In the
3534 -- tree passed to the back end, Alternatives is always No_List, and
3535 -- Right_Opnd is set (i.e. the expansion circuitry expands out the
3536 -- complex set membership case using simple membership operations).
3537
3538 -- N_In
3539 -- Sloc points to IN
3540 -- Left_Opnd (Node2)
3541 -- Right_Opnd (Node3)
3542 -- Alternatives (List4) (set to No_List if only one set alternative)
3543 -- plus fields for expression
3544
3545 -- N_Not_In
3546 -- Sloc points to NOT of NOT IN
3547 -- Left_Opnd (Node2)
3548 -- Right_Opnd (Node3)
3549 -- Alternatives (List4) (set to No_List if only one set alternative)
3550 -- plus fields for expression
3551
3552 --------------------
3553 -- 4.5 Operators --
3554 --------------------
3555
3556 -- LOGICAL_OPERATOR ::= and | or | xor
3557
3558 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
3559
3560 -- BINARY_ADDING_OPERATOR ::= + | - | &
3561
3562 -- UNARY_ADDING_OPERATOR ::= + | -
3563
3564 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
3565
3566 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
3567
3568 -- Sprint syntax if Treat_Fixed_As_Integer is set:
3569
3570 -- x #* y
3571 -- x #/ y
3572 -- x #mod y
3573 -- x #rem y
3574
3575 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
3576 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
3577 -- All handling of smalls for multiplication and division is handled
3578 -- by the front end (mod and rem result only from expansion). Gigi
3579 -- thus never needs to worry about small values (for other operators
3580 -- operating on fixed-point, e.g. addition, the small value does not
3581 -- have any semantic effect anyway, these are always integer operations.
3582
3583 -- Gigi restriction: For all operators taking Boolean operands, the
3584 -- type is always Standard.Boolean. The expander inserts the required
3585 -- conversion operations where needed to ensure this is the case.
3586
3587 -- N_Op_And
3588 -- Sloc points to AND
3589 -- Do_Length_Check (Flag4-Sem)
3590 -- plus fields for binary operator
3591 -- plus fields for expression
3592
3593 -- N_Op_Or
3594 -- Sloc points to OR
3595 -- Do_Length_Check (Flag4-Sem)
3596 -- plus fields for binary operator
3597 -- plus fields for expression
3598
3599 -- N_Op_Xor
3600 -- Sloc points to XOR
3601 -- Do_Length_Check (Flag4-Sem)
3602 -- plus fields for binary operator
3603 -- plus fields for expression
3604
3605 -- N_Op_Eq
3606 -- Sloc points to =
3607 -- plus fields for binary operator
3608 -- plus fields for expression
3609
3610 -- N_Op_Ne
3611 -- Sloc points to /=
3612 -- plus fields for binary operator
3613 -- plus fields for expression
3614
3615 -- N_Op_Lt
3616 -- Sloc points to <
3617 -- plus fields for binary operator
3618 -- plus fields for expression
3619
3620 -- N_Op_Le
3621 -- Sloc points to <=
3622 -- plus fields for binary operator
3623 -- plus fields for expression
3624
3625 -- N_Op_Gt
3626 -- Sloc points to >
3627 -- plus fields for binary operator
3628 -- plus fields for expression
3629
3630 -- N_Op_Ge
3631 -- Sloc points to >=
3632 -- plus fields for binary operator
3633 -- plus fields for expression
3634
3635 -- N_Op_Add
3636 -- Sloc points to + (binary)
3637 -- plus fields for binary operator
3638 -- plus fields for expression
3639
3640 -- N_Op_Subtract
3641 -- Sloc points to - (binary)
3642 -- plus fields for binary operator
3643 -- plus fields for expression
3644
3645 -- N_Op_Concat
3646 -- Sloc points to &
3647 -- Is_Component_Left_Opnd (Flag13-Sem)
3648 -- Is_Component_Right_Opnd (Flag14-Sem)
3649 -- plus fields for binary operator
3650 -- plus fields for expression
3651
3652 -- N_Op_Multiply
3653 -- Sloc points to *
3654 -- Treat_Fixed_As_Integer (Flag14-Sem)
3655 -- Rounded_Result (Flag18-Sem)
3656 -- plus fields for binary operator
3657 -- plus fields for expression
3658
3659 -- N_Op_Divide
3660 -- Sloc points to /
3661 -- Treat_Fixed_As_Integer (Flag14-Sem)
3662 -- Do_Division_Check (Flag13-Sem)
3663 -- Rounded_Result (Flag18-Sem)
3664 -- plus fields for binary operator
3665 -- plus fields for expression
3666
3667 -- N_Op_Mod
3668 -- Sloc points to MOD
3669 -- Treat_Fixed_As_Integer (Flag14-Sem)
3670 -- Do_Division_Check (Flag13-Sem)
3671 -- plus fields for binary operator
3672 -- plus fields for expression
3673
3674 -- N_Op_Rem
3675 -- Sloc points to REM
3676 -- Treat_Fixed_As_Integer (Flag14-Sem)
3677 -- Do_Division_Check (Flag13-Sem)
3678 -- plus fields for binary operator
3679 -- plus fields for expression
3680
3681 -- N_Op_Expon
3682 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
3683 -- Sloc points to **
3684 -- plus fields for binary operator
3685 -- plus fields for expression
3686
3687 -- N_Op_Plus
3688 -- Sloc points to + (unary)
3689 -- plus fields for unary operator
3690 -- plus fields for expression
3691
3692 -- N_Op_Minus
3693 -- Sloc points to - (unary)
3694 -- plus fields for unary operator
3695 -- plus fields for expression
3696
3697 -- N_Op_Abs
3698 -- Sloc points to ABS
3699 -- plus fields for unary operator
3700 -- plus fields for expression
3701
3702 -- N_Op_Not
3703 -- Sloc points to NOT
3704 -- plus fields for unary operator
3705 -- plus fields for expression
3706
3707 -- See also shift operators in section B.2
3708
3709 -- Note on fixed-point operations passed to Gigi: For adding operators,
3710 -- the semantics is to treat these simply as integer operations, with
3711 -- the small values being ignored (the bounds are already stored in
3712 -- units of small, so that constraint checking works as usual). For the
3713 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
3714 -- point operands if the Treat_Fixed_As_Integer flag is set and will
3715 -- thus treat these nodes in identical manner, ignoring small values.
3716
3717 --------------------------
3718 -- 4.6 Type Conversion --
3719 --------------------------
3720
3721 -- TYPE_CONVERSION ::=
3722 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
3723
3724 -- In the (NAME) case, the name is stored as the expression
3725
3726 -- Note: the parser never generates a type conversion node, since it
3727 -- looks like an indexed component which is generated by preference.
3728 -- The semantic pass must correct this misidentification.
3729
3730 -- Gigi handles conversions that involve no change in the root type,
3731 -- and also all conversions from integer to floating-point types.
3732 -- Conversions from floating-point to integer are only handled in
3733 -- the case where Float_Truncate flag set. Other conversions from
3734 -- floating-point to integer (involving rounding) and all conversions
3735 -- involving fixed-point types are handled by the expander.
3736
3737 -- Sprint syntax if Float_Truncate set: X^(Y)
3738 -- Sprint syntax if Conversion_OK set X?(Y)
3739 -- Sprint syntax if both flags set X?^(Y)
3740
3741 -- Note: If either the operand or result type is fixed-point, Gigi will
3742 -- only see a type conversion node with Conversion_OK set. The front end
3743 -- takes care of all handling of small's for fixed-point conversions.
3744
3745 -- N_Type_Conversion
3746 -- Sloc points to first token of subtype mark
3747 -- Subtype_Mark (Node4)
3748 -- Expression (Node3)
3749 -- Do_Tag_Check (Flag13-Sem)
3750 -- Do_Length_Check (Flag4-Sem)
3751 -- Do_Overflow_Check (Flag17-Sem)
3752 -- Float_Truncate (Flag11-Sem)
3753 -- Rounded_Result (Flag18-Sem)
3754 -- Conversion_OK (Flag14-Sem)
3755 -- plus fields for expression
3756
3757 -- Note: if a range check is required, then the Do_Range_Check flag
3758 -- is set in the Expression with the check being done against the
3759 -- target type range (after the base type conversion, if any).
3760
3761 -------------------------------
3762 -- 4.7 Qualified Expression --
3763 -------------------------------
3764
3765 -- QUALIFIED_EXPRESSION ::=
3766 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
3767
3768 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
3769 -- the expression, so the Expression field of this node always points
3770 -- to a parenthesized expression in this case (i.e. Paren_Count will
3771 -- always be non-zero for the referenced expression if it is not an
3772 -- aggregate).
3773
3774 -- N_Qualified_Expression
3775 -- Sloc points to apostrophe
3776 -- Subtype_Mark (Node4)
3777 -- Expression (Node3) expression or aggregate
3778 -- plus fields for expression
3779
3780 --------------------
3781 -- 4.8 Allocator --
3782 --------------------
3783
3784 -- ALLOCATOR ::=
3785 -- new [NULL_EXCLUSION] SUBTYPE_INDICATION | new QUALIFIED_EXPRESSION
3786
3787 -- Sprint syntax (when storage pool present)
3788 -- new xxx (storage_pool = pool)
3789
3790 -- N_Allocator
3791 -- Sloc points to NEW
3792 -- Expression (Node3) subtype indication or qualified expression
3793 -- Storage_Pool (Node1-Sem)
3794 -- Procedure_To_Call (Node2-Sem)
3795 -- Coextensions (Elist4-Sem)
3796 -- Null_Exclusion_Present (Flag11)
3797 -- No_Initialization (Flag13-Sem)
3798 -- Is_Static_Coextension (Flag14-Sem)
3799 -- Do_Storage_Check (Flag17-Sem)
3800 -- Is_Dynamic_Coextension (Flag18-Sem)
3801 -- plus fields for expression
3802
3803 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
3804 -- This flag has a special function in conjunction with the restriction
3805 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
3806 -- is not set. This means that if a source allocator is replaced with
3807 -- a constructed allocator, the Comes_From_Source flag should be copied
3808 -- to the newly created allocator.
3809
3810 ---------------------------------
3811 -- 5.1 Sequence Of Statements --
3812 ---------------------------------
3813
3814 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
3815
3816 -- Note: Although the parser will not accept a declaration as a
3817 -- statement, the semantic analyzer may insert declarations (e.g.
3818 -- declarations of implicit types needed for execution of other
3819 -- statements) into a sequence of statements, so the code generator
3820 -- should be prepared to accept a declaration where a statement is
3821 -- expected. Note also that pragmas can appear as statements.
3822
3823 --------------------
3824 -- 5.1 Statement --
3825 --------------------
3826
3827 -- STATEMENT ::=
3828 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
3829
3830 -- There is no explicit node in the tree for a statement. Instead, the
3831 -- individual statement appears directly. Labels are treated as a
3832 -- kind of statement, i.e. they are linked into a statement list at
3833 -- the point they appear, so the labeled statement appears following
3834 -- the label or labels in the statement list.
3835
3836 ---------------------------
3837 -- 5.1 Simple Statement --
3838 ---------------------------
3839
3840 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
3841 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
3842 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
3843 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
3844 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
3845 -- | ABORT_STATEMENT | RAISE_STATEMENT
3846 -- | CODE_STATEMENT
3847
3848 -----------------------------
3849 -- 5.1 Compound Statement --
3850 -----------------------------
3851
3852 -- COMPOUND_STATEMENT ::=
3853 -- IF_STATEMENT | CASE_STATEMENT
3854 -- | LOOP_STATEMENT | BLOCK_STATEMENT
3855 -- | EXTENDED_RETURN_STATEMENT
3856 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
3857
3858 -------------------------
3859 -- 5.1 Null Statement --
3860 -------------------------
3861
3862 -- NULL_STATEMENT ::= null;
3863
3864 -- N_Null_Statement
3865 -- Sloc points to NULL
3866
3867 ----------------
3868 -- 5.1 Label --
3869 ----------------
3870
3871 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
3872
3873 -- Note that the occurrence of a label is not a defining identifier,
3874 -- but rather a referencing occurrence. The defining occurrence is
3875 -- in the implicit label declaration which occurs in the innermost
3876 -- enclosing block.
3877
3878 -- N_Label
3879 -- Sloc points to <<
3880 -- Identifier (Node1) direct name of statement identifier
3881 -- Exception_Junk (Flag8-Sem)
3882
3883 -------------------------------
3884 -- 5.1 Statement Identifier --
3885 -------------------------------
3886
3887 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
3888
3889 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
3890 -- (not an OPERATOR_SYMBOL)
3891
3892 -------------------------------
3893 -- 5.2 Assignment Statement --
3894 -------------------------------
3895
3896 -- ASSIGNMENT_STATEMENT ::=
3897 -- variable_NAME := EXPRESSION;
3898
3899 -- N_Assignment_Statement
3900 -- Sloc points to :=
3901 -- Name (Node2)
3902 -- Expression (Node3)
3903 -- Do_Tag_Check (Flag13-Sem)
3904 -- Do_Length_Check (Flag4-Sem)
3905 -- Forwards_OK (Flag5-Sem)
3906 -- Backwards_OK (Flag6-Sem)
3907 -- No_Ctrl_Actions (Flag7-Sem)
3908 -- Componentwise_Assignment (Flag14-Sem)
3909
3910 -- Note: if a range check is required, then the Do_Range_Check flag
3911 -- is set in the Expression (right hand side), with the check being
3912 -- done against the type of the Name (left hand side).
3913
3914 -- Note: the back end places some restrictions on the form of the
3915 -- Expression field. If the object being assigned to is Atomic, then
3916 -- the Expression may not have the form of an aggregate (since this
3917 -- might cause the back end to generate separate assignments). In this
3918 -- case the front end must generate an extra temporary and initialize
3919 -- this temporary as required (the temporary itself is not atomic).
3920
3921 -----------------------
3922 -- 5.3 If Statement --
3923 -----------------------
3924
3925 -- IF_STATEMENT ::=
3926 -- if CONDITION then
3927 -- SEQUENCE_OF_STATEMENTS
3928 -- {elsif CONDITION then
3929 -- SEQUENCE_OF_STATEMENTS}
3930 -- [else
3931 -- SEQUENCE_OF_STATEMENTS]
3932 -- end if;
3933
3934 -- Gigi restriction: This expander ensures that the type of the
3935 -- Condition fields is always Standard.Boolean, even if the type
3936 -- in the source is some non-standard boolean type.
3937
3938 -- N_If_Statement
3939 -- Sloc points to IF
3940 -- Condition (Node1)
3941 -- Then_Statements (List2)
3942 -- Elsif_Parts (List3) (set to No_List if none present)
3943 -- Else_Statements (List4) (set to No_List if no else part present)
3944 -- End_Span (Uint5) (set to No_Uint if expander generated)
3945
3946 -- N_Elsif_Part
3947 -- Sloc points to ELSIF
3948 -- Condition (Node1)
3949 -- Then_Statements (List2)
3950 -- Condition_Actions (List3-Sem)
3951
3952 --------------------
3953 -- 5.3 Condition --
3954 --------------------
3955
3956 -- CONDITION ::= boolean_EXPRESSION
3957
3958 -------------------------
3959 -- 5.4 Case Statement --
3960 -------------------------
3961
3962 -- CASE_STATEMENT ::=
3963 -- case EXPRESSION is
3964 -- CASE_STATEMENT_ALTERNATIVE
3965 -- {CASE_STATEMENT_ALTERNATIVE}
3966 -- end case;
3967
3968 -- Note: the Alternatives can contain pragmas. These only occur at
3969 -- the start of the list, since any pragmas occurring after the first
3970 -- alternative are absorbed into the corresponding statement sequence.
3971
3972 -- N_Case_Statement
3973 -- Sloc points to CASE
3974 -- Expression (Node3)
3975 -- Alternatives (List4)
3976 -- End_Span (Uint5) (set to No_Uint if expander generated)
3977
3978 -------------------------------------
3979 -- 5.4 Case Statement Alternative --
3980 -------------------------------------
3981
3982 -- CASE_STATEMENT_ALTERNATIVE ::=
3983 -- when DISCRETE_CHOICE_LIST =>
3984 -- SEQUENCE_OF_STATEMENTS
3985
3986 -- N_Case_Statement_Alternative
3987 -- Sloc points to WHEN
3988 -- Discrete_Choices (List4)
3989 -- Statements (List3)
3990
3991 -------------------------
3992 -- 5.5 Loop Statement --
3993 -------------------------
3994
3995 -- LOOP_STATEMENT ::=
3996 -- [loop_STATEMENT_IDENTIFIER :]
3997 -- [ITERATION_SCHEME] loop
3998 -- SEQUENCE_OF_STATEMENTS
3999 -- end loop [loop_IDENTIFIER];
4000
4001 -- Note: The occurrence of a loop label is not a defining identifier
4002 -- but rather a referencing occurrence. The defining occurrence is in
4003 -- the implicit label declaration which occurs in the innermost
4004 -- enclosing block.
4005
4006 -- Note: there is always a loop statement identifier present in
4007 -- the tree, even if none was given in the source. In the case where
4008 -- no loop identifier is given in the source, the parser creates
4009 -- a name of the form _Loop_n, where n is a decimal integer (the
4010 -- two underlines ensure that the loop names created in this manner
4011 -- do not conflict with any user defined identifiers), and the flag
4012 -- Has_Created_Identifier is set to True. The only exception to the
4013 -- rule that all loop statement nodes have identifiers occurs for
4014 -- loops constructed by the expander, and the semantic analyzer will
4015 -- create and supply dummy loop identifiers in these cases.
4016
4017 -- N_Loop_Statement
4018 -- Sloc points to LOOP
4019 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
4020 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
4021 -- Statements (List3)
4022 -- End_Label (Node4)
4023 -- Has_Created_Identifier (Flag15)
4024 -- Is_Null_Loop (Flag16)
4025 -- Suppress_Loop_Warnings (Flag17)
4026
4027 --------------------------
4028 -- 5.5 Iteration Scheme --
4029 --------------------------
4030
4031 -- ITERATION_SCHEME ::=
4032 -- while CONDITION | for LOOP_PARAMETER_SPECIFICATION
4033
4034 -- Gigi restriction: This expander ensures that the type of the
4035 -- Condition field is always Standard.Boolean, even if the type
4036 -- in the source is some non-standard boolean type.
4037
4038 -- N_Iteration_Scheme
4039 -- Sloc points to WHILE or FOR
4040 -- Condition (Node1) (set to Empty if FOR case)
4041 -- Condition_Actions (List3-Sem)
4042 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
4043
4044 ---------------------------------------
4045 -- 5.5 Loop parameter specification --
4046 ---------------------------------------
4047
4048 -- LOOP_PARAMETER_SPECIFICATION ::=
4049 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
4050
4051 -- N_Loop_Parameter_Specification
4052 -- Sloc points to first identifier
4053 -- Defining_Identifier (Node1)
4054 -- Reverse_Present (Flag15)
4055 -- Discrete_Subtype_Definition (Node4)
4056
4057 --------------------------
4058 -- 5.6 Block Statement --
4059 --------------------------
4060
4061 -- BLOCK_STATEMENT ::=
4062 -- [block_STATEMENT_IDENTIFIER:]
4063 -- [declare
4064 -- DECLARATIVE_PART]
4065 -- begin
4066 -- HANDLED_SEQUENCE_OF_STATEMENTS
4067 -- end [block_IDENTIFIER];
4068
4069 -- Note that the occurrence of a block identifier is not a defining
4070 -- identifier, but rather a referencing occurrence. The defining
4071 -- occurrence is an E_Block entity declared by the implicit label
4072 -- declaration which occurs in the innermost enclosing block statement
4073 -- or body; the block identifier denotes that E_Block.
4074
4075 -- For block statements that come from source code, there is always a
4076 -- block statement identifier present in the tree, denoting an
4077 -- E_Block. In the case where no block identifier is given in the
4078 -- source, the parser creates a name of the form B_n, where n is a
4079 -- decimal integer, and the flag Has_Created_Identifier is set to
4080 -- True. Blocks constructed by the expander usually have no identifier,
4081 -- and no corresponding entity.
4082
4083 -- Note: the block statement created for an extended return statement
4084 -- has an entity, and this entity is an E_Return_Statement, rather than
4085 -- the usual E_Block.
4086
4087 -- Note: Exception_Junk is set for the wrapping blocks created during
4088 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
4089
4090 -- N_Block_Statement
4091 -- Sloc points to DECLARE or BEGIN
4092 -- Identifier (Node1) block direct name (set to Empty if not present)
4093 -- Declarations (List2) (set to No_List if no DECLARE part)
4094 -- Handled_Statement_Sequence (Node4)
4095 -- Is_Task_Master (Flag5-Sem)
4096 -- Activation_Chain_Entity (Node3-Sem)
4097 -- Has_Created_Identifier (Flag15)
4098 -- Is_Task_Allocation_Block (Flag6)
4099 -- Is_Asynchronous_Call_Block (Flag7)
4100 -- Exception_Junk (Flag8-Sem)
4101
4102 -------------------------
4103 -- 5.7 Exit Statement --
4104 -------------------------
4105
4106 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
4107
4108 -- Gigi restriction: This expander ensures that the type of the
4109 -- Condition field is always Standard.Boolean, even if the type
4110 -- in the source is some non-standard boolean type.
4111
4112 -- N_Exit_Statement
4113 -- Sloc points to EXIT
4114 -- Name (Node2) (set to Empty if no loop name present)
4115 -- Condition (Node1) (set to Empty if no when part present)
4116
4117 -------------------------
4118 -- 5.9 Goto Statement --
4119 -------------------------
4120
4121 -- GOTO_STATEMENT ::= goto label_NAME;
4122
4123 -- N_Goto_Statement
4124 -- Sloc points to GOTO
4125 -- Name (Node2)
4126 -- Exception_Junk (Flag8-Sem)
4127
4128 ---------------------------------
4129 -- 6.1 Subprogram Declaration --
4130 ---------------------------------
4131
4132 -- SUBPROGRAM_DECLARATION ::= SUBPROGRAM_SPECIFICATION;
4133
4134 -- N_Subprogram_Declaration
4135 -- Sloc points to FUNCTION or PROCEDURE
4136 -- Specification (Node1)
4137 -- Body_To_Inline (Node3-Sem)
4138 -- Corresponding_Body (Node5-Sem)
4139 -- Parent_Spec (Node4-Sem)
4140
4141 ------------------------------------------
4142 -- 6.1 Abstract Subprogram Declaration --
4143 ------------------------------------------
4144
4145 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
4146 -- SUBPROGRAM_SPECIFICATION is abstract;
4147
4148 -- N_Abstract_Subprogram_Declaration
4149 -- Sloc points to ABSTRACT
4150 -- Specification (Node1)
4151
4152 -----------------------------------
4153 -- 6.1 Subprogram Specification --
4154 -----------------------------------
4155
4156 -- SUBPROGRAM_SPECIFICATION ::=
4157 -- [[not] overriding]
4158 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
4159 -- | [[not] overriding]
4160 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
4161
4162 -- Note: there are no separate nodes for the profiles, instead the
4163 -- information appears directly in the following nodes.
4164
4165 -- N_Function_Specification
4166 -- Sloc points to FUNCTION
4167 -- Defining_Unit_Name (Node1) (the designator)
4168 -- Elaboration_Boolean (Node2-Sem)
4169 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4170 -- Null_Exclusion_Present (Flag11)
4171 -- Result_Definition (Node4) for result subtype
4172 -- Generic_Parent (Node5-Sem)
4173 -- Must_Override (Flag14) set if overriding indicator present
4174 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4175
4176 -- N_Procedure_Specification
4177 -- Sloc points to PROCEDURE
4178 -- Defining_Unit_Name (Node1)
4179 -- Elaboration_Boolean (Node2-Sem)
4180 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4181 -- Generic_Parent (Node5-Sem)
4182 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
4183 -- Must_Override (Flag14) set if overriding indicator present
4184 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4185
4186 -- Note: overriding indicator is an Ada 2005 feature
4187
4188 ---------------------
4189 -- 6.1 Designator --
4190 ---------------------
4191
4192 -- DESIGNATOR ::=
4193 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
4194
4195 -- Designators that are simply identifiers or operator symbols appear
4196 -- directly in the tree in this form. The following node is used only
4197 -- in the case where the designator has a parent unit name component.
4198
4199 -- N_Designator
4200 -- Sloc points to period
4201 -- Name (Node2) holds the parent unit name. Note that this is always
4202 -- non-Empty, since this node is only used for the case where a
4203 -- parent library unit package name is present.
4204 -- Identifier (Node1)
4205
4206 -- Note that the identifier can also be an operator symbol here
4207
4208 ------------------------------
4209 -- 6.1 Defining Designator --
4210 ------------------------------
4211
4212 -- DEFINING_DESIGNATOR ::=
4213 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
4214
4215 -------------------------------------
4216 -- 6.1 Defining Program Unit Name --
4217 -------------------------------------
4218
4219 -- DEFINING_PROGRAM_UNIT_NAME ::=
4220 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
4221
4222 -- The parent unit name is present only in the case of a child unit
4223 -- name (permissible only for Ada 95 for a library level unit, i.e.
4224 -- a unit at scope level one). If no such name is present, the defining
4225 -- program unit name is represented simply as the defining identifier.
4226 -- In the child unit case, the following node is used to represent the
4227 -- child unit name.
4228
4229 -- N_Defining_Program_Unit_Name
4230 -- Sloc points to period
4231 -- Name (Node2) holds the parent unit name. Note that this is always
4232 -- non-Empty, since this node is only used for the case where a
4233 -- parent unit name is present.
4234 -- Defining_Identifier (Node1)
4235
4236 --------------------------
4237 -- 6.1 Operator Symbol --
4238 --------------------------
4239
4240 -- OPERATOR_SYMBOL ::= STRING_LITERAL
4241
4242 -- Note: the fields of the N_Operator_Symbol node are laid out to
4243 -- match the corresponding fields of an N_Character_Literal node. This
4244 -- allows easy conversion of the operator symbol node into a character
4245 -- literal node in the case where a string constant of the form of an
4246 -- operator symbol is scanned out as such, but turns out semantically
4247 -- to be a string literal that is not an operator. For details see
4248 -- Sinfo.CN.Change_Operator_Symbol_To_String_Literal.
4249
4250 -- N_Operator_Symbol
4251 -- Sloc points to literal
4252 -- Chars (Name1) contains the Name_Id for the operator symbol
4253 -- Strval (Str3) Id of string value. This is used if the operator
4254 -- symbol turns out to be a normal string after all.
4255 -- Entity (Node4-Sem)
4256 -- Associated_Node (Node4-Sem)
4257 -- Has_Private_View (Flag11-Sem) set in generic units.
4258 -- Etype (Node5-Sem)
4259
4260 -- Note: the Strval field may be set to No_String for generated
4261 -- operator symbols that are known not to be string literals
4262 -- semantically.
4263
4264 -----------------------------------
4265 -- 6.1 Defining Operator Symbol --
4266 -----------------------------------
4267
4268 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
4269
4270 -- A defining operator symbol is an entity, which has additional
4271 -- fields depending on the setting of the Ekind field. These
4272 -- additional fields are defined (and access subprograms declared)
4273 -- in package Einfo.
4274
4275 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
4276 -- are deliberately layed out to match the layout of fields in an
4277 -- ordinary N_Operator_Symbol node allowing for easy alteration of
4278 -- an operator symbol node into a defining operator symbol node.
4279 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
4280 -- for further details.
4281
4282 -- N_Defining_Operator_Symbol
4283 -- Sloc points to literal
4284 -- Chars (Name1) contains the Name_Id for the operator symbol
4285 -- Next_Entity (Node2-Sem)
4286 -- Scope (Node3-Sem)
4287 -- Etype (Node5-Sem)
4288
4289 ----------------------------
4290 -- 6.1 Parameter Profile --
4291 ----------------------------
4292
4293 -- PARAMETER_PROFILE ::= [FORMAL_PART]
4294
4295 ---------------------------------------
4296 -- 6.1 Parameter and Result Profile --
4297 ---------------------------------------
4298
4299 -- PARAMETER_AND_RESULT_PROFILE ::=
4300 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
4301 -- | [FORMAL_PART] return ACCESS_DEFINITION
4302
4303 -- There is no explicit node in the tree for a parameter and result
4304 -- profile. Instead the information appears directly in the parent.
4305
4306 ----------------------
4307 -- 6.1 Formal part --
4308 ----------------------
4309
4310 -- FORMAL_PART ::=
4311 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
4312
4313 ----------------------------------
4314 -- 6.1 Parameter specification --
4315 ----------------------------------
4316
4317 -- PARAMETER_SPECIFICATION ::=
4318 -- DEFINING_IDENTIFIER_LIST : MODE [NULL_EXCLUSION] SUBTYPE_MARK
4319 -- [:= DEFAULT_EXPRESSION]
4320 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
4321 -- [:= DEFAULT_EXPRESSION]
4322
4323 -- Although the syntax allows multiple identifiers in the list, the
4324 -- semantics is as though successive specifications were given with
4325 -- identical type definition and expression components. To simplify
4326 -- semantic processing, the parser represents a multiple declaration
4327 -- case as a sequence of single Specifications, using the More_Ids and
4328 -- Prev_Ids flags to preserve the original source form as described
4329 -- in the section on "Handling of Defining Identifier Lists".
4330
4331 -- N_Parameter_Specification
4332 -- Sloc points to first identifier
4333 -- Defining_Identifier (Node1)
4334 -- In_Present (Flag15)
4335 -- Out_Present (Flag17)
4336 -- Null_Exclusion_Present (Flag11)
4337 -- Parameter_Type (Node2) subtype mark or access definition
4338 -- Expression (Node3) (set to Empty if no default expression present)
4339 -- Do_Accessibility_Check (Flag13-Sem)
4340 -- More_Ids (Flag5) (set to False if no more identifiers in list)
4341 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
4342 -- Default_Expression (Node5-Sem)
4343
4344 ---------------
4345 -- 6.1 Mode --
4346 ---------------
4347
4348 -- MODE ::= [in] | in out | out
4349
4350 -- There is no explicit node in the tree for the Mode. Instead the
4351 -- In_Present and Out_Present flags are set in the parent node to
4352 -- record the presence of keywords specifying the mode.
4353
4354 --------------------------
4355 -- 6.3 Subprogram Body --
4356 --------------------------
4357
4358 -- SUBPROGRAM_BODY ::=
4359 -- SUBPROGRAM_SPECIFICATION is
4360 -- DECLARATIVE_PART
4361 -- begin
4362 -- HANDLED_SEQUENCE_OF_STATEMENTS
4363 -- end [DESIGNATOR];
4364
4365 -- N_Subprogram_Body
4366 -- Sloc points to FUNCTION or PROCEDURE
4367 -- Specification (Node1)
4368 -- Declarations (List2)
4369 -- Handled_Statement_Sequence (Node4)
4370 -- Activation_Chain_Entity (Node3-Sem)
4371 -- Corresponding_Spec (Node5-Sem)
4372 -- Acts_As_Spec (Flag4-Sem)
4373 -- Bad_Is_Detected (Flag15) used only by parser
4374 -- Do_Storage_Check (Flag17-Sem)
4375 -- Has_Priority_Pragma (Flag6-Sem)
4376 -- Is_Protected_Subprogram_Body (Flag7-Sem)
4377 -- Is_Entry_Barrier_Function (Flag8-Sem)
4378 -- Is_Task_Master (Flag5-Sem)
4379 -- Was_Originally_Stub (Flag13-Sem)
4380 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
4381
4382 -----------------------------------
4383 -- 6.4 Procedure Call Statement --
4384 -----------------------------------
4385
4386 -- PROCEDURE_CALL_STATEMENT ::=
4387 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
4388
4389 -- Note: the reason that a procedure call has expression fields is
4390 -- that it semantically resembles an expression, e.g. overloading is
4391 -- allowed and a type is concocted for semantic processing purposes.
4392 -- Certain of these fields, such as Parens are not relevant, but it
4393 -- is easier to just supply all of them together!
4394
4395 -- N_Procedure_Call_Statement
4396 -- Sloc points to first token of name or prefix
4397 -- Name (Node2) stores name or prefix
4398 -- Parameter_Associations (List3) (set to No_List if no
4399 -- actual parameter part)
4400 -- First_Named_Actual (Node4-Sem)
4401 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4402 -- Do_Tag_Check (Flag13-Sem)
4403 -- No_Elaboration_Check (Flag14-Sem)
4404 -- Parameter_List_Truncated (Flag17-Sem)
4405 -- ABE_Is_Certain (Flag18-Sem)
4406 -- plus fields for expression
4407
4408 -- If any IN parameter requires a range check, then the corresponding
4409 -- argument expression has the Do_Range_Check flag set, and the range
4410 -- check is done against the formal type. Note that this argument
4411 -- expression may appear directly in the Parameter_Associations list,
4412 -- or may be a descendent of an N_Parameter_Association node that
4413 -- appears in this list.
4414
4415 ------------------------
4416 -- 6.4 Function Call --
4417 ------------------------
4418
4419 -- FUNCTION_CALL ::=
4420 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
4421
4422 -- Note: the parser may generate an indexed component node or simply
4423 -- a name node instead of a function call node. The semantic pass must
4424 -- correct this misidentification.
4425
4426 -- N_Function_Call
4427 -- Sloc points to first token of name or prefix
4428 -- Name (Node2) stores name or prefix
4429 -- Parameter_Associations (List3) (set to No_List if no
4430 -- actual parameter part)
4431 -- First_Named_Actual (Node4-Sem)
4432 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4433 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
4434 -- Do_Tag_Check (Flag13-Sem)
4435 -- No_Elaboration_Check (Flag14-Sem)
4436 -- Parameter_List_Truncated (Flag17-Sem)
4437 -- ABE_Is_Certain (Flag18-Sem)
4438 -- plus fields for expression
4439
4440 --------------------------------
4441 -- 6.4 Actual Parameter Part --
4442 --------------------------------
4443
4444 -- ACTUAL_PARAMETER_PART ::=
4445 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
4446
4447 --------------------------------
4448 -- 6.4 Parameter Association --
4449 --------------------------------
4450
4451 -- PARAMETER_ASSOCIATION ::=
4452 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
4453
4454 -- Note: the N_Parameter_Association node is built only if a formal
4455 -- parameter selector name is present, otherwise the parameter
4456 -- association appears in the tree simply as the node for the
4457 -- explicit actual parameter.
4458
4459 -- N_Parameter_Association
4460 -- Sloc points to formal parameter
4461 -- Selector_Name (Node2) (always non-Empty)
4462 -- Explicit_Actual_Parameter (Node3)
4463 -- Next_Named_Actual (Node4-Sem)
4464 -- Is_Accessibility_Actual (Flag13-Sem)
4465
4466 ---------------------------
4467 -- 6.4 Actual Parameter --
4468 ---------------------------
4469
4470 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
4471
4472 ---------------------------
4473 -- 6.5 Return Statement --
4474 ---------------------------
4475
4476 -- RETURN_STATEMENT ::= return [EXPRESSION]; -- Ada 95
4477
4478 -- In Ada 2005, we have:
4479
4480 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
4481
4482 -- EXTENDED_RETURN_STATEMENT ::=
4483 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4484 -- [:= EXPRESSION] [do
4485 -- HANDLED_SEQUENCE_OF_STATEMENTS
4486 -- end return];
4487
4488 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
4489
4490 -- So in Ada 2005, RETURN_STATEMENT is no longer a nonterminal, but
4491 -- "return statement" is defined in 6.5 to mean a
4492 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT.
4493
4494 -- N_Return_Statement
4495 -- Sloc points to RETURN
4496 -- Return_Statement_Entity (Node5-Sem)
4497 -- Expression (Node3) (set to Empty if no expression present)
4498 -- Storage_Pool (Node1-Sem)
4499 -- Procedure_To_Call (Node2-Sem)
4500 -- Do_Tag_Check (Flag13-Sem)
4501 -- By_Ref (Flag5-Sem)
4502 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
4503
4504 -- N_Return_Statement represents a simple_return_statement, and is
4505 -- renamed to be N_Simple_Return_Statement below. Clients should refer
4506 -- to N_Simple_Return_Statement. We retain N_Return_Statement because
4507 -- that's how gigi knows it. See also renaming of Make_Return_Statement
4508 -- as Make_Simple_Return_Statement in Sem_Util.
4509
4510 -- Note: Return_Statement_Entity points to an E_Return_Statement
4511
4512 -- If a range check is required, then Do_Range_Check is set on the
4513 -- Expression. The check is against the return subtype of the function.
4514
4515 -- N_Extended_Return_Statement
4516 -- Sloc points to RETURN
4517 -- Return_Statement_Entity (Node5-Sem)
4518 -- Return_Object_Declarations (List3)
4519 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
4520 -- Storage_Pool (Node1-Sem)
4521 -- Procedure_To_Call (Node2-Sem)
4522 -- Do_Tag_Check (Flag13-Sem)
4523 -- By_Ref (Flag5-Sem)
4524
4525 -- Note: Return_Statement_Entity points to an E_Return_Statement.
4526 -- Note that Return_Object_Declarations is a list containing the
4527 -- N_Object_Declaration -- see comment on this field above.
4528 -- The declared object will have Is_Return_Object = True.
4529 -- There is no such syntactic category as return_object_declaration
4530 -- in the RM. Return_Object_Declarations represents this portion of
4531 -- the syntax for EXTENDED_RETURN_STATEMENT:
4532 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4533 -- [:= EXPRESSION]
4534
4535 -- There are two entities associated with an extended_return_statement:
4536 -- the Return_Statement_Entity represents the statement itself, and the
4537 -- Defining_Identifier of the Object_Declaration in
4538 -- Return_Object_Declarations represents the object being
4539 -- returned. N_Simple_Return_Statement has only the former.
4540
4541 ------------------------------
4542 -- 7.1 Package Declaration --
4543 ------------------------------
4544
4545 -- PACKAGE_DECLARATION ::= PACKAGE_SPECIFICATION;
4546
4547 -- Note: the activation chain entity for a package spec is used for
4548 -- all tasks declared in the package spec, or in the package body.
4549
4550 -- N_Package_Declaration
4551 -- Sloc points to PACKAGE
4552 -- Specification (Node1)
4553 -- Corresponding_Body (Node5-Sem)
4554 -- Parent_Spec (Node4-Sem)
4555 -- Activation_Chain_Entity (Node3-Sem)
4556
4557 --------------------------------
4558 -- 7.1 Package Specification --
4559 --------------------------------
4560
4561 -- PACKAGE_SPECIFICATION ::=
4562 -- package DEFINING_PROGRAM_UNIT_NAME is
4563 -- {BASIC_DECLARATIVE_ITEM}
4564 -- [private
4565 -- {BASIC_DECLARATIVE_ITEM}]
4566 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
4567
4568 -- N_Package_Specification
4569 -- Sloc points to PACKAGE
4570 -- Defining_Unit_Name (Node1)
4571 -- Visible_Declarations (List2)
4572 -- Private_Declarations (List3) (set to No_List if no private
4573 -- part present)
4574 -- End_Label (Node4)
4575 -- Generic_Parent (Node5-Sem)
4576 -- Limited_View_Installed (Flag18-Sem)
4577
4578 -----------------------
4579 -- 7.1 Package Body --
4580 -----------------------
4581
4582 -- PACKAGE_BODY ::=
4583 -- package body DEFINING_PROGRAM_UNIT_NAME is
4584 -- DECLARATIVE_PART
4585 -- [begin
4586 -- HANDLED_SEQUENCE_OF_STATEMENTS]
4587 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
4588
4589 -- N_Package_Body
4590 -- Sloc points to PACKAGE
4591 -- Defining_Unit_Name (Node1)
4592 -- Declarations (List2)
4593 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
4594 -- Corresponding_Spec (Node5-Sem)
4595 -- Was_Originally_Stub (Flag13-Sem)
4596
4597 -- Note: if a source level package does not contain a handled sequence
4598 -- of statements, then the parser supplies a dummy one with a null
4599 -- sequence of statements. Comes_From_Source will be False in this
4600 -- constructed sequence. The reason we need this is for the End_Label
4601 -- field in the HSS.
4602
4603 -----------------------------------
4604 -- 7.4 Private Type Declaration --
4605 -----------------------------------
4606
4607 -- PRIVATE_TYPE_DECLARATION ::=
4608 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
4609 -- is [[abstract] tagged] [limited] private;
4610
4611 -- Note: TAGGED is not permitted in Ada 83 mode
4612
4613 -- N_Private_Type_Declaration
4614 -- Sloc points to TYPE
4615 -- Defining_Identifier (Node1)
4616 -- Discriminant_Specifications (List4) (set to No_List if no
4617 -- discriminant part)
4618 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4619 -- Abstract_Present (Flag4)
4620 -- Tagged_Present (Flag15)
4621 -- Limited_Present (Flag17)
4622
4623 ----------------------------------------
4624 -- 7.4 Private Extension Declaration --
4625 ----------------------------------------
4626
4627 -- PRIVATE_EXTENSION_DECLARATION ::=
4628 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
4629 -- [abstract] [limited | synchronized]
4630 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
4631 -- with private;
4632
4633 -- Note: LIMITED, and private extension declarations are not allowed
4634 -- in Ada 83 mode.
4635
4636 -- N_Private_Extension_Declaration
4637 -- Sloc points to TYPE
4638 -- Defining_Identifier (Node1)
4639 -- Discriminant_Specifications (List4) (set to No_List if no
4640 -- discriminant part)
4641 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4642 -- Abstract_Present (Flag4)
4643 -- Limited_Present (Flag17)
4644 -- Synchronized_Present (Flag7)
4645 -- Subtype_Indication (Node5)
4646 -- Interface_List (List2) (set to No_List if none)
4647
4648 ---------------------
4649 -- 8.4 Use Clause --
4650 ---------------------
4651
4652 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
4653
4654 -----------------------------
4655 -- 8.4 Use Package Clause --
4656 -----------------------------
4657
4658 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
4659
4660 -- N_Use_Package_Clause
4661 -- Sloc points to USE
4662 -- Names (List2)
4663 -- Next_Use_Clause (Node3-Sem)
4664 -- Hidden_By_Use_Clause (Elist4-Sem)
4665
4666 --------------------------
4667 -- 8.4 Use Type Clause --
4668 --------------------------
4669
4670 -- USE_TYPE_CLAUSE ::= use type SUBTYPE_MARK {, SUBTYPE_MARK};
4671
4672 -- Note: use type clause is not permitted in Ada 83 mode
4673
4674 -- N_Use_Type_Clause
4675 -- Sloc points to USE
4676 -- Subtype_Marks (List2)
4677 -- Next_Use_Clause (Node3-Sem)
4678 -- Hidden_By_Use_Clause (Elist4-Sem)
4679
4680 -------------------------------
4681 -- 8.5 Renaming Declaration --
4682 -------------------------------
4683
4684 -- RENAMING_DECLARATION ::=
4685 -- OBJECT_RENAMING_DECLARATION
4686 -- | EXCEPTION_RENAMING_DECLARATION
4687 -- | PACKAGE_RENAMING_DECLARATION
4688 -- | SUBPROGRAM_RENAMING_DECLARATION
4689 -- | GENERIC_RENAMING_DECLARATION
4690
4691 --------------------------------------
4692 -- 8.5 Object Renaming Declaration --
4693 --------------------------------------
4694
4695 -- OBJECT_RENAMING_DECLARATION ::=
4696 -- DEFINING_IDENTIFIER :
4697 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME;
4698 -- | DEFINING_IDENTIFIER :
4699 -- ACCESS_DEFINITION renames object_NAME;
4700
4701 -- Note: Access_Definition is an optional field that gives support to
4702 -- Ada 2005 (AI-230). The parser generates nodes that have either the
4703 -- Subtype_Indication field or else the Access_Definition field.
4704
4705 -- N_Object_Renaming_Declaration
4706 -- Sloc points to first identifier
4707 -- Defining_Identifier (Node1)
4708 -- Null_Exclusion_Present (Flag11) (set to False if not present)
4709 -- Subtype_Mark (Node4) (set to Empty if not present)
4710 -- Access_Definition (Node3) (set to Empty if not present)
4711 -- Name (Node2)
4712 -- Corresponding_Generic_Association (Node5-Sem)
4713
4714 -----------------------------------------
4715 -- 8.5 Exception Renaming Declaration --
4716 -----------------------------------------
4717
4718 -- EXCEPTION_RENAMING_DECLARATION ::=
4719 -- DEFINING_IDENTIFIER : exception renames exception_NAME;
4720
4721 -- N_Exception_Renaming_Declaration
4722 -- Sloc points to first identifier
4723 -- Defining_Identifier (Node1)
4724 -- Name (Node2)
4725
4726 ---------------------------------------
4727 -- 8.5 Package Renaming Declaration --
4728 ---------------------------------------
4729
4730 -- PACKAGE_RENAMING_DECLARATION ::=
4731 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME;
4732
4733 -- N_Package_Renaming_Declaration
4734 -- Sloc points to PACKAGE
4735 -- Defining_Unit_Name (Node1)
4736 -- Name (Node2)
4737 -- Parent_Spec (Node4-Sem)
4738
4739 ------------------------------------------
4740 -- 8.5 Subprogram Renaming Declaration --
4741 ------------------------------------------
4742
4743 -- SUBPROGRAM_RENAMING_DECLARATION ::=
4744 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
4745
4746 -- N_Subprogram_Renaming_Declaration
4747 -- Sloc points to RENAMES
4748 -- Specification (Node1)
4749 -- Name (Node2)
4750 -- Parent_Spec (Node4-Sem)
4751 -- Corresponding_Spec (Node5-Sem)
4752 -- Corresponding_Formal_Spec (Node3-Sem)
4753 -- From_Default (Flag6-Sem)
4754
4755 -----------------------------------------
4756 -- 8.5.5 Generic Renaming Declaration --
4757 -----------------------------------------
4758
4759 -- GENERIC_RENAMING_DECLARATION ::=
4760 -- generic package DEFINING_PROGRAM_UNIT_NAME
4761 -- renames generic_package_NAME
4762 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
4763 -- renames generic_procedure_NAME
4764 -- | generic function DEFINING_PROGRAM_UNIT_NAME
4765 -- renames generic_function_NAME
4766
4767 -- N_Generic_Package_Renaming_Declaration
4768 -- Sloc points to GENERIC
4769 -- Defining_Unit_Name (Node1)
4770 -- Name (Node2)
4771 -- Parent_Spec (Node4-Sem)
4772
4773 -- N_Generic_Procedure_Renaming_Declaration
4774 -- Sloc points to GENERIC
4775 -- Defining_Unit_Name (Node1)
4776 -- Name (Node2)
4777 -- Parent_Spec (Node4-Sem)
4778
4779 -- N_Generic_Function_Renaming_Declaration
4780 -- Sloc points to GENERIC
4781 -- Defining_Unit_Name (Node1)
4782 -- Name (Node2)
4783 -- Parent_Spec (Node4-Sem)
4784
4785 --------------------------------
4786 -- 9.1 Task Type Declaration --
4787 --------------------------------
4788
4789 -- TASK_TYPE_DECLARATION ::=
4790 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4791 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
4792
4793 -- N_Task_Type_Declaration
4794 -- Sloc points to TASK
4795 -- Defining_Identifier (Node1)
4796 -- Discriminant_Specifications (List4) (set to No_List if no
4797 -- discriminant part)
4798 -- Interface_List (List2) (set to No_List if none)
4799 -- Task_Definition (Node3) (set to Empty if not present)
4800 -- Corresponding_Body (Node5-Sem)
4801
4802 ----------------------------------
4803 -- 9.1 Single Task Declaration --
4804 ----------------------------------
4805
4806 -- SINGLE_TASK_DECLARATION ::=
4807 -- task DEFINING_IDENTIFIER
4808 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
4809
4810 -- N_Single_Task_Declaration
4811 -- Sloc points to TASK
4812 -- Defining_Identifier (Node1)
4813 -- Interface_List (List2) (set to No_List if none)
4814 -- Task_Definition (Node3) (set to Empty if not present)
4815
4816 --------------------------
4817 -- 9.1 Task Definition --
4818 --------------------------
4819
4820 -- TASK_DEFINITION ::=
4821 -- {TASK_ITEM}
4822 -- [private
4823 -- {TASK_ITEM}]
4824 -- end [task_IDENTIFIER]
4825
4826 -- Note: as a result of semantic analysis, the list of task items can
4827 -- include implicit type declarations resulting from entry families.
4828
4829 -- N_Task_Definition
4830 -- Sloc points to first token of task definition
4831 -- Visible_Declarations (List2)
4832 -- Private_Declarations (List3) (set to No_List if no private part)
4833 -- End_Label (Node4)
4834 -- Has_Priority_Pragma (Flag6-Sem)
4835 -- Has_Storage_Size_Pragma (Flag5-Sem)
4836 -- Has_Task_Info_Pragma (Flag7-Sem)
4837 -- Has_Task_Name_Pragma (Flag8-Sem)
4838 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
4839
4840 --------------------
4841 -- 9.1 Task Item --
4842 --------------------
4843
4844 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
4845
4846 --------------------
4847 -- 9.1 Task Body --
4848 --------------------
4849
4850 -- TASK_BODY ::=
4851 -- task body task_DEFINING_IDENTIFIER is
4852 -- DECLARATIVE_PART
4853 -- begin
4854 -- HANDLED_SEQUENCE_OF_STATEMENTS
4855 -- end [task_IDENTIFIER];
4856
4857 -- Gigi restriction: This node never appears
4858
4859 -- N_Task_Body
4860 -- Sloc points to TASK
4861 -- Defining_Identifier (Node1)
4862 -- Declarations (List2)
4863 -- Handled_Statement_Sequence (Node4)
4864 -- Is_Task_Master (Flag5-Sem)
4865 -- Activation_Chain_Entity (Node3-Sem)
4866 -- Corresponding_Spec (Node5-Sem)
4867 -- Was_Originally_Stub (Flag13-Sem)
4868
4869 -------------------------------------
4870 -- 9.4 Protected Type Declaration --
4871 -------------------------------------
4872
4873 -- PROTECTED_TYPE_DECLARATION ::=
4874 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4875 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4876
4877 -- Note: protected type declarations are not permitted in Ada 83 mode
4878
4879 -- N_Protected_Type_Declaration
4880 -- Sloc points to PROTECTED
4881 -- Defining_Identifier (Node1)
4882 -- Discriminant_Specifications (List4) (set to No_List if no
4883 -- discriminant part)
4884 -- Interface_List (List2) (set to No_List if none)
4885 -- Protected_Definition (Node3)
4886 -- Corresponding_Body (Node5-Sem)
4887
4888 ---------------------------------------
4889 -- 9.4 Single Protected Declaration --
4890 ---------------------------------------
4891
4892 -- SINGLE_PROTECTED_DECLARATION ::=
4893 -- protected DEFINING_IDENTIFIER
4894 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4895
4896 -- Note: single protected declarations are not allowed in Ada 83 mode
4897
4898 -- N_Single_Protected_Declaration
4899 -- Sloc points to PROTECTED
4900 -- Defining_Identifier (Node1)
4901 -- Interface_List (List2) (set to No_List if none)
4902 -- Protected_Definition (Node3)
4903
4904 -------------------------------
4905 -- 9.4 Protected Definition --
4906 -------------------------------
4907
4908 -- PROTECTED_DEFINITION ::=
4909 -- {PROTECTED_OPERATION_DECLARATION}
4910 -- [private
4911 -- {PROTECTED_ELEMENT_DECLARATION}]
4912 -- end [protected_IDENTIFIER]
4913
4914 -- N_Protected_Definition
4915 -- Sloc points to first token of protected definition
4916 -- Visible_Declarations (List2)
4917 -- Private_Declarations (List3) (set to No_List if no private part)
4918 -- End_Label (Node4)
4919 -- Has_Priority_Pragma (Flag6-Sem)
4920
4921 ------------------------------------------
4922 -- 9.4 Protected Operation Declaration --
4923 ------------------------------------------
4924
4925 -- PROTECTED_OPERATION_DECLARATION ::=
4926 -- SUBPROGRAM_DECLARATION
4927 -- | ENTRY_DECLARATION
4928 -- | REPRESENTATION_CLAUSE
4929
4930 ----------------------------------------
4931 -- 9.4 Protected Element Declaration --
4932 ----------------------------------------
4933
4934 -- PROTECTED_ELEMENT_DECLARATION ::=
4935 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
4936
4937 -------------------------
4938 -- 9.4 Protected Body --
4939 -------------------------
4940
4941 -- PROTECTED_BODY ::=
4942 -- protected body DEFINING_IDENTIFIER is
4943 -- {PROTECTED_OPERATION_ITEM}
4944 -- end [protected_IDENTIFIER];
4945
4946 -- Note: protected bodies are not allowed in Ada 83 mode
4947
4948 -- Gigi restriction: This node never appears
4949
4950 -- N_Protected_Body
4951 -- Sloc points to PROTECTED
4952 -- Defining_Identifier (Node1)
4953 -- Declarations (List2) protected operation items (and pragmas)
4954 -- End_Label (Node4)
4955 -- Corresponding_Spec (Node5-Sem)
4956 -- Was_Originally_Stub (Flag13-Sem)
4957
4958 -----------------------------------
4959 -- 9.4 Protected Operation Item --
4960 -----------------------------------
4961
4962 -- PROTECTED_OPERATION_ITEM ::=
4963 -- SUBPROGRAM_DECLARATION
4964 -- | SUBPROGRAM_BODY
4965 -- | ENTRY_BODY
4966 -- | REPRESENTATION_CLAUSE
4967
4968 ------------------------------
4969 -- 9.5.2 Entry Declaration --
4970 ------------------------------
4971
4972 -- ENTRY_DECLARATION ::=
4973 -- [[not] overriding]
4974 -- entry DEFINING_IDENTIFIER
4975 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE;
4976
4977 -- N_Entry_Declaration
4978 -- Sloc points to ENTRY
4979 -- Defining_Identifier (Node1)
4980 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
4981 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4982 -- Corresponding_Body (Node5-Sem)
4983 -- Must_Override (Flag14) set if overriding indicator present
4984 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4985
4986 -- Note: overriding indicator is an Ada 2005 feature
4987
4988 -----------------------------
4989 -- 9.5.2 Accept statement --
4990 -----------------------------
4991
4992 -- ACCEPT_STATEMENT ::=
4993 -- accept entry_DIRECT_NAME
4994 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
4995 -- HANDLED_SEQUENCE_OF_STATEMENTS
4996 -- end [entry_IDENTIFIER]];
4997
4998 -- Gigi restriction: This node never appears
4999
5000 -- Note: there are no explicit declarations allowed in an accept
5001 -- statement. However, the implicit declarations for any statement
5002 -- identifiers (labels and block/loop identifiers) are declarations
5003 -- that belong logically to the accept statement, and that is why
5004 -- there is a Declarations field in this node.
5005
5006 -- N_Accept_Statement
5007 -- Sloc points to ACCEPT
5008 -- Entry_Direct_Name (Node1)
5009 -- Entry_Index (Node5) (set to Empty if not present)
5010 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5011 -- Handled_Statement_Sequence (Node4)
5012 -- Declarations (List2) (set to No_List if no declarations)
5013
5014 ------------------------
5015 -- 9.5.2 Entry Index --
5016 ------------------------
5017
5018 -- ENTRY_INDEX ::= EXPRESSION
5019
5020 -----------------------
5021 -- 9.5.2 Entry Body --
5022 -----------------------
5023
5024 -- ENTRY_BODY ::=
5025 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
5026 -- DECLARATIVE_PART
5027 -- begin
5028 -- HANDLED_SEQUENCE_OF_STATEMENTS
5029 -- end [entry_IDENTIFIER];
5030
5031 -- ENTRY_BARRIER ::= when CONDITION
5032
5033 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
5034 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
5035 -- too full (it would otherwise have too many fields)
5036
5037 -- Gigi restriction: This node never appears
5038
5039 -- N_Entry_Body
5040 -- Sloc points to ENTRY
5041 -- Defining_Identifier (Node1)
5042 -- Entry_Body_Formal_Part (Node5)
5043 -- Declarations (List2)
5044 -- Handled_Statement_Sequence (Node4)
5045 -- Activation_Chain_Entity (Node3-Sem)
5046
5047 -----------------------------------
5048 -- 9.5.2 Entry Body Formal Part --
5049 -----------------------------------
5050
5051 -- ENTRY_BODY_FORMAL_PART ::=
5052 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
5053
5054 -- Note that an entry body formal part node is present even if it is
5055 -- empty. This reflects the grammar, in which it is the components of
5056 -- the entry body formal part that are optional, not the entry body
5057 -- formal part itself. Also this means that the barrier condition
5058 -- always has somewhere to be stored.
5059
5060 -- Gigi restriction: This node never appears
5061
5062 -- N_Entry_Body_Formal_Part
5063 -- Sloc points to first token
5064 -- Entry_Index_Specification (Node4) (set to Empty if not present)
5065 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5066 -- Condition (Node1) from entry barrier of entry body
5067
5068 --------------------------
5069 -- 9.5.2 Entry Barrier --
5070 --------------------------
5071
5072 -- ENTRY_BARRIER ::= when CONDITION
5073
5074 --------------------------------------
5075 -- 9.5.2 Entry Index Specification --
5076 --------------------------------------
5077
5078 -- ENTRY_INDEX_SPECIFICATION ::=
5079 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
5080
5081 -- Gigi restriction: This node never appears
5082
5083 -- N_Entry_Index_Specification
5084 -- Sloc points to FOR
5085 -- Defining_Identifier (Node1)
5086 -- Discrete_Subtype_Definition (Node4)
5087
5088 ---------------------------------
5089 -- 9.5.3 Entry Call Statement --
5090 ---------------------------------
5091
5092 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
5093
5094 -- The parser may generate a procedure call for this construct. The
5095 -- semantic pass must correct this misidentification where needed.
5096
5097 -- Gigi restriction: This node never appears
5098
5099 -- N_Entry_Call_Statement
5100 -- Sloc points to first token of name
5101 -- Name (Node2)
5102 -- Parameter_Associations (List3) (set to No_List if no
5103 -- actual parameter part)
5104 -- First_Named_Actual (Node4-Sem)
5105
5106 ------------------------------
5107 -- 9.5.4 Requeue Statement --
5108 ------------------------------
5109
5110 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
5111
5112 -- Note: requeue statements are not permitted in Ada 83 mode
5113
5114 -- Gigi restriction: This node never appears
5115
5116 -- N_Requeue_Statement
5117 -- Sloc points to REQUEUE
5118 -- Name (Node2)
5119 -- Abort_Present (Flag15)
5120
5121 --------------------------
5122 -- 9.6 Delay Statement --
5123 --------------------------
5124
5125 -- DELAY_STATEMENT ::=
5126 -- DELAY_UNTIL_STATEMENT
5127 -- | DELAY_RELATIVE_STATEMENT
5128
5129 --------------------------------
5130 -- 9.6 Delay Until Statement --
5131 --------------------------------
5132
5133 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
5134
5135 -- Note: delay until statements are not permitted in Ada 83 mode
5136
5137 -- Gigi restriction: This node never appears
5138
5139 -- N_Delay_Until_Statement
5140 -- Sloc points to DELAY
5141 -- Expression (Node3)
5142
5143 -----------------------------------
5144 -- 9.6 Delay Relative Statement --
5145 -----------------------------------
5146
5147 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
5148
5149 -- Gigi restriction: This node never appears
5150
5151 -- N_Delay_Relative_Statement
5152 -- Sloc points to DELAY
5153 -- Expression (Node3)
5154
5155 ---------------------------
5156 -- 9.7 Select Statement --
5157 ---------------------------
5158
5159 -- SELECT_STATEMENT ::=
5160 -- SELECTIVE_ACCEPT
5161 -- | TIMED_ENTRY_CALL
5162 -- | CONDITIONAL_ENTRY_CALL
5163 -- | ASYNCHRONOUS_SELECT
5164
5165 -----------------------------
5166 -- 9.7.1 Selective Accept --
5167 -----------------------------
5168
5169 -- SELECTIVE_ACCEPT ::=
5170 -- select
5171 -- [GUARD]
5172 -- SELECT_ALTERNATIVE
5173 -- {or
5174 -- [GUARD]
5175 -- SELECT_ALTERNATIVE}
5176 -- [else
5177 -- SEQUENCE_OF_STATEMENTS]
5178 -- end select;
5179
5180 -- Gigi restriction: This node never appears
5181
5182 -- Note: the guard expression, if present, appears in the node for
5183 -- the select alternative.
5184
5185 -- N_Selective_Accept
5186 -- Sloc points to SELECT
5187 -- Select_Alternatives (List1)
5188 -- Else_Statements (List4) (set to No_List if no else part)
5189
5190 ------------------
5191 -- 9.7.1 Guard --
5192 ------------------
5193
5194 -- GUARD ::= when CONDITION =>
5195
5196 -- As noted above, the CONDITION that is part of a GUARD is included
5197 -- in the node for the select alternative for convenience.
5198
5199 -------------------------------
5200 -- 9.7.1 Select Alternative --
5201 -------------------------------
5202
5203 -- SELECT_ALTERNATIVE ::=
5204 -- ACCEPT_ALTERNATIVE
5205 -- | DELAY_ALTERNATIVE
5206 -- | TERMINATE_ALTERNATIVE
5207
5208 -------------------------------
5209 -- 9.7.1 Accept Alternative --
5210 -------------------------------
5211
5212 -- ACCEPT_ALTERNATIVE ::=
5213 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
5214
5215 -- Gigi restriction: This node never appears
5216
5217 -- N_Accept_Alternative
5218 -- Sloc points to ACCEPT
5219 -- Accept_Statement (Node2)
5220 -- Condition (Node1) from the guard (set to Empty if no guard present)
5221 -- Statements (List3) (set to Empty_List if no statements)
5222 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5223 -- Accept_Handler_Records (List5-Sem)
5224
5225 ------------------------------
5226 -- 9.7.1 Delay Alternative --
5227 ------------------------------
5228
5229 -- DELAY_ALTERNATIVE ::=
5230 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
5231
5232 -- Gigi restriction: This node never appears
5233
5234 -- N_Delay_Alternative
5235 -- Sloc points to DELAY
5236 -- Delay_Statement (Node2)
5237 -- Condition (Node1) from the guard (set to Empty if no guard present)
5238 -- Statements (List3) (set to Empty_List if no statements)
5239 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5240
5241 ----------------------------------
5242 -- 9.7.1 Terminate Alternative --
5243 ----------------------------------
5244
5245 -- TERMINATE_ALTERNATIVE ::= terminate;
5246
5247 -- Gigi restriction: This node never appears
5248
5249 -- N_Terminate_Alternative
5250 -- Sloc points to TERMINATE
5251 -- Condition (Node1) from the guard (set to Empty if no guard present)
5252 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5253 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
5254
5255 -----------------------------
5256 -- 9.7.2 Timed Entry Call --
5257 -----------------------------
5258
5259 -- TIMED_ENTRY_CALL ::=
5260 -- select
5261 -- ENTRY_CALL_ALTERNATIVE
5262 -- or
5263 -- DELAY_ALTERNATIVE
5264 -- end select;
5265
5266 -- Gigi restriction: This node never appears
5267
5268 -- N_Timed_Entry_Call
5269 -- Sloc points to SELECT
5270 -- Entry_Call_Alternative (Node1)
5271 -- Delay_Alternative (Node4)
5272
5273 -----------------------------------
5274 -- 9.7.2 Entry Call Alternative --
5275 -----------------------------------
5276
5277 -- ENTRY_CALL_ALTERNATIVE ::=
5278 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
5279
5280 -- PROCEDURE_OR_ENTRY_CALL ::=
5281 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
5282
5283 -- Gigi restriction: This node never appears
5284
5285 -- N_Entry_Call_Alternative
5286 -- Sloc points to first token of entry call statement
5287 -- Entry_Call_Statement (Node1)
5288 -- Statements (List3) (set to Empty_List if no statements)
5289 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5290
5291 -----------------------------------
5292 -- 9.7.3 Conditional Entry Call --
5293 -----------------------------------
5294
5295 -- CONDITIONAL_ENTRY_CALL ::=
5296 -- select
5297 -- ENTRY_CALL_ALTERNATIVE
5298 -- else
5299 -- SEQUENCE_OF_STATEMENTS
5300 -- end select;
5301
5302 -- Gigi restriction: This node never appears
5303
5304 -- N_Conditional_Entry_Call
5305 -- Sloc points to SELECT
5306 -- Entry_Call_Alternative (Node1)
5307 -- Else_Statements (List4)
5308
5309 --------------------------------
5310 -- 9.7.4 Asynchronous Select --
5311 --------------------------------
5312
5313 -- ASYNCHRONOUS_SELECT ::=
5314 -- select
5315 -- TRIGGERING_ALTERNATIVE
5316 -- then abort
5317 -- ABORTABLE_PART
5318 -- end select;
5319
5320 -- Note: asynchronous select is not permitted in Ada 83 mode
5321
5322 -- Gigi restriction: This node never appears
5323
5324 -- N_Asynchronous_Select
5325 -- Sloc points to SELECT
5326 -- Triggering_Alternative (Node1)
5327 -- Abortable_Part (Node2)
5328
5329 -----------------------------------
5330 -- 9.7.4 Triggering Alternative --
5331 -----------------------------------
5332
5333 -- TRIGGERING_ALTERNATIVE ::=
5334 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
5335
5336 -- Gigi restriction: This node never appears
5337
5338 -- N_Triggering_Alternative
5339 -- Sloc points to first token of triggering statement
5340 -- Triggering_Statement (Node1)
5341 -- Statements (List3) (set to Empty_List if no statements)
5342 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5343
5344 ---------------------------------
5345 -- 9.7.4 Triggering Statement --
5346 ---------------------------------
5347
5348 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
5349
5350 ---------------------------
5351 -- 9.7.4 Abortable Part --
5352 ---------------------------
5353
5354 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
5355
5356 -- Gigi restriction: This node never appears
5357
5358 -- N_Abortable_Part
5359 -- Sloc points to ABORT
5360 -- Statements (List3)
5361
5362 --------------------------
5363 -- 9.8 Abort Statement --
5364 --------------------------
5365
5366 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
5367
5368 -- Gigi restriction: This node never appears
5369
5370 -- N_Abort_Statement
5371 -- Sloc points to ABORT
5372 -- Names (List2)
5373
5374 -------------------------
5375 -- 10.1.1 Compilation --
5376 -------------------------
5377
5378 -- COMPILATION ::= {COMPILATION_UNIT}
5379
5380 -- There is no explicit node in the tree for a compilation, since in
5381 -- general the compiler is processing only a single compilation unit
5382 -- at a time. It is possible to parse multiple units in syntax check
5383 -- only mode, but the trees are discarded in that case.
5384
5385 ------------------------------
5386 -- 10.1.1 Compilation Unit --
5387 ------------------------------
5388
5389 -- COMPILATION_UNIT ::=
5390 -- CONTEXT_CLAUSE LIBRARY_ITEM
5391 -- | CONTEXT_CLAUSE SUBUNIT
5392
5393 -- The N_Compilation_Unit node itself represents the above syntax.
5394 -- However, there are two additional items not reflected in the above
5395 -- syntax. First we have the global declarations that are added by the
5396 -- code generator. These are outer level declarations (so they cannot
5397 -- be represented as being inside the units). An example is the wrapper
5398 -- subprograms that are created to do ABE checking. As always a list of
5399 -- declarations can contain actions as well (i.e. statements), and such
5400 -- statements are executed as part of the elaboration of the unit. Note
5401 -- that all such declarations are elaborated before the library unit.
5402
5403 -- Similarly, certain actions need to be elaborated at the completion
5404 -- of elaboration of the library unit (notably the statement that sets
5405 -- the Boolean flag indicating that elaboration is complete).
5406
5407 -- The third item not reflected in the syntax is pragmas that appear
5408 -- after the compilation unit. As always pragmas are a problem since
5409 -- they are not part of the formal syntax, but can be stuck into the
5410 -- source following a set of ad hoc rules, and we have to find an ad
5411 -- hoc way of sticking them into the tree. For pragmas that appear
5412 -- before the library unit, we just consider them to be part of the
5413 -- context clause, and pragmas can appear in the Context_Items list
5414 -- of the compilation unit. However, pragmas can also appear after
5415 -- the library item.
5416
5417 -- To deal with all these problems, we create an auxiliary node for
5418 -- a compilation unit, referenced from the N_Compilation_Unit node
5419 -- that contains these three items.
5420
5421 -- N_Compilation_Unit
5422 -- Sloc points to first token of defining unit name
5423 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
5424 -- Context_Items (List1) context items and pragmas preceding unit
5425 -- Private_Present (Flag15) set if library unit has private keyword
5426 -- Unit (Node2) library item or subunit
5427 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
5428 -- Has_No_Elaboration_Code (Flag17-Sem)
5429 -- Body_Required (Flag13-Sem) set for spec if body is required
5430 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
5431 -- Context_Pending (Flag16-Sem)
5432 -- First_Inlined_Subprogram (Node3-Sem)
5433
5434 -- N_Compilation_Unit_Aux
5435 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
5436 -- Declarations (List2) (set to No_List if no global declarations)
5437 -- Actions (List1) (set to No_List if no actions)
5438 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
5439 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
5440
5441 --------------------------
5442 -- 10.1.1 Library Item --
5443 --------------------------
5444
5445 -- LIBRARY_ITEM ::=
5446 -- [private] LIBRARY_UNIT_DECLARATION
5447 -- | LIBRARY_UNIT_BODY
5448 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
5449
5450 -- Note: PRIVATE is not allowed in Ada 83 mode
5451
5452 -- There is no explicit node in the tree for library item, instead
5453 -- the declaration or body, and the flag for private if present,
5454 -- appear in the N_Compilation_Unit node.
5455
5456 --------------------------------------
5457 -- 10.1.1 Library Unit Declaration --
5458 --------------------------------------
5459
5460 -- LIBRARY_UNIT_DECLARATION ::=
5461 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
5462 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
5463
5464 -----------------------------------------------
5465 -- 10.1.1 Library Unit Renaming Declaration --
5466 -----------------------------------------------
5467
5468 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
5469 -- PACKAGE_RENAMING_DECLARATION
5470 -- | GENERIC_RENAMING_DECLARATION
5471 -- | SUBPROGRAM_RENAMING_DECLARATION
5472
5473 -------------------------------
5474 -- 10.1.1 Library unit body --
5475 -------------------------------
5476
5477 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
5478
5479 ------------------------------
5480 -- 10.1.1 Parent Unit Name --
5481 ------------------------------
5482
5483 -- PARENT_UNIT_NAME ::= NAME
5484
5485 ----------------------------
5486 -- 10.1.2 Context clause --
5487 ----------------------------
5488
5489 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
5490
5491 -- The context clause can include pragmas, and any pragmas that appear
5492 -- before the context clause proper (i.e. all configuration pragmas,
5493 -- also appear at the front of this list).
5494
5495 --------------------------
5496 -- 10.1.2 Context_Item --
5497 --------------------------
5498
5499 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
5500
5501 -------------------------
5502 -- 10.1.2 With clause --
5503 -------------------------
5504
5505 -- WITH_CLAUSE ::=
5506 -- with library_unit_NAME {,library_unit_NAME};
5507
5508 -- A separate With clause is built for each name, so that we have
5509 -- a Corresponding_Spec field for each with'ed spec. The flags
5510 -- First_Name and Last_Name are used to reconstruct the exact
5511 -- source form. When a list of names appears in one with clause,
5512 -- the first name in the list has First_Name set, and the last
5513 -- has Last_Name set. If the with clause has only one name, then
5514 -- both of the flags First_Name and Last_Name are set in this name.
5515
5516 -- Note: in the case of implicit with's that are installed by the
5517 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
5518 -- set to Standard_Location, but it is incorrect to test the Sloc
5519 -- to find out if a with clause is implicit, test the flag instead.
5520
5521 -- N_With_Clause
5522 -- Sloc points to first token of library unit name
5523 -- Name (Node2)
5524 -- Next_Implicit_With (Node3-Sem)
5525 -- Library_Unit (Node4-Sem)
5526 -- Corresponding_Spec (Node5-Sem)
5527 -- First_Name (Flag5) (set to True if first name or only one name)
5528 -- Last_Name (Flag6) (set to True if last name or only one name)
5529 -- Context_Installed (Flag13-Sem)
5530 -- Elaborate_Present (Flag4-Sem)
5531 -- Elaborate_All_Present (Flag14-Sem)
5532 -- Elaborate_All_Desirable (Flag9-Sem)
5533 -- Elaborate_Desirable (Flag11-Sem)
5534 -- Private_Present (Flag15) set if with_clause has private keyword
5535 -- Implicit_With (Flag16-Sem)
5536 -- Limited_Present (Flag17) set if LIMITED is present
5537 -- Limited_View_Installed (Flag18-Sem)
5538 -- Unreferenced_In_Spec (Flag7-Sem)
5539 -- No_Entities_Ref_In_Spec (Flag8-Sem)
5540
5541 -- Note: Limited_Present and Limited_View_Installed give support to
5542 -- Ada 2005 (AI-50217).
5543 -- Similarly, Private_Present gives support to AI-50262.
5544
5545 ----------------------
5546 -- With_Type clause --
5547 ----------------------
5548
5549 -- This is a GNAT extension, used to implement mutually recursive
5550 -- types declared in different packages.
5551 -- Note: this is now obsolete. The functionality of this construct
5552 -- is now implemented by the Ada 2005 Limited_with_Clause.
5553
5554 ---------------------
5555 -- 10.2 Body stub --
5556 ---------------------
5557
5558 -- BODY_STUB ::=
5559 -- SUBPROGRAM_BODY_STUB
5560 -- | PACKAGE_BODY_STUB
5561 -- | TASK_BODY_STUB
5562 -- | PROTECTED_BODY_STUB
5563
5564 ----------------------------------
5565 -- 10.1.3 Subprogram Body Stub --
5566 ----------------------------------
5567
5568 -- SUBPROGRAM_BODY_STUB ::=
5569 -- SUBPROGRAM_SPECIFICATION is separate;
5570
5571 -- N_Subprogram_Body_Stub
5572 -- Sloc points to FUNCTION or PROCEDURE
5573 -- Specification (Node1)
5574 -- Library_Unit (Node4-Sem) points to the subunit
5575 -- Corresponding_Body (Node5-Sem)
5576
5577 -------------------------------
5578 -- 10.1.3 Package Body Stub --
5579 -------------------------------
5580
5581 -- PACKAGE_BODY_STUB ::=
5582 -- package body DEFINING_IDENTIFIER is separate;
5583
5584 -- N_Package_Body_Stub
5585 -- Sloc points to PACKAGE
5586 -- Defining_Identifier (Node1)
5587 -- Library_Unit (Node4-Sem) points to the subunit
5588 -- Corresponding_Body (Node5-Sem)
5589
5590 ----------------------------
5591 -- 10.1.3 Task Body Stub --
5592 ----------------------------
5593
5594 -- TASK_BODY_STUB ::=
5595 -- task body DEFINING_IDENTIFIER is separate;
5596
5597 -- N_Task_Body_Stub
5598 -- Sloc points to TASK
5599 -- Defining_Identifier (Node1)
5600 -- Library_Unit (Node4-Sem) points to the subunit
5601 -- Corresponding_Body (Node5-Sem)
5602
5603 ---------------------------------
5604 -- 10.1.3 Protected Body Stub --
5605 ---------------------------------
5606
5607 -- PROTECTED_BODY_STUB ::=
5608 -- protected body DEFINING_IDENTIFIER is separate;
5609
5610 -- Note: protected body stubs are not allowed in Ada 83 mode
5611
5612 -- N_Protected_Body_Stub
5613 -- Sloc points to PROTECTED
5614 -- Defining_Identifier (Node1)
5615 -- Library_Unit (Node4-Sem) points to the subunit
5616 -- Corresponding_Body (Node5-Sem)
5617
5618 ---------------------
5619 -- 10.1.3 Subunit --
5620 ---------------------
5621
5622 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
5623
5624 -- N_Subunit
5625 -- Sloc points to SEPARATE
5626 -- Name (Node2) is the name of the parent unit
5627 -- Proper_Body (Node1) is the subunit body
5628 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
5629
5630 ---------------------------------
5631 -- 11.1 Exception Declaration --
5632 ---------------------------------
5633
5634 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception;
5635
5636 -- For consistency with object declarations etc., the parser converts
5637 -- the case of multiple identifiers being declared to a series of
5638 -- declarations in which the expression is copied, using the More_Ids
5639 -- and Prev_Ids flags to remember the source form as described in the
5640 -- section on "Handling of Defining Identifier Lists".
5641
5642 -- N_Exception_Declaration
5643 -- Sloc points to EXCEPTION
5644 -- Defining_Identifier (Node1)
5645 -- Expression (Node3-Sem)
5646 -- Renaming_Exception (Node2-Sem)
5647 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5648 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5649
5650 ------------------------------------------
5651 -- 11.2 Handled Sequence Of Statements --
5652 ------------------------------------------
5653
5654 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
5655 -- SEQUENCE_OF_STATEMENTS
5656 -- [exception
5657 -- EXCEPTION_HANDLER
5658 -- {EXCEPTION_HANDLER}]
5659 -- [at end
5660 -- cleanup_procedure_call (param, param, param, ...);]
5661
5662 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
5663 -- used only internally currently, but is considered to be syntactic.
5664 -- At the moment, the only cleanup action allowed is a single call to
5665 -- a parameterless procedure, and the Identifier field of the node is
5666 -- the procedure to be called. Also there is a current restriction
5667 -- that exception handles and a cleanup cannot be present in the same
5668 -- frame, so at least one of Exception_Handlers or the Identifier must
5669 -- be missing.
5670
5671 -- Actually, more accurately, this restriction applies to the original
5672 -- source program. In the expanded tree, if the At_End_Proc field is
5673 -- present, then there will also be an exception handler of the form:
5674
5675 -- when all others =>
5676 -- cleanup;
5677 -- raise;
5678
5679 -- where cleanup is the procedure to be generated. The reason we do
5680 -- this is so that the front end can handle the necessary entries in
5681 -- the exception tables, and other exception handler actions required
5682 -- as part of the normal handling for exception handlers.
5683
5684 -- The AT END cleanup handler protects only the sequence of statements
5685 -- (not the associated declarations of the parent), just like exception
5686 -- handlers. The big difference is that the cleanup procedure is called
5687 -- on either a normal or an abnormal exit from the statement sequence.
5688
5689 -- Note: the list of Exception_Handlers can contain pragmas as well
5690 -- as actual handlers. In practice these pragmas can only occur at
5691 -- the start of the list, since any pragmas occurring later on will
5692 -- be included in the statement list of the corresponding handler.
5693
5694 -- Note: although in the Ada syntax, the sequence of statements in
5695 -- a handled sequence of statements can only contain statements, we
5696 -- allow free mixing of declarations and statements in the resulting
5697 -- expanded tree. This is for example used to deal with the case of
5698 -- a cleanup procedure that must handle declarations as well as the
5699 -- statements of a block.
5700
5701 -- N_Handled_Sequence_Of_Statements
5702 -- Sloc points to first token of first statement
5703 -- Statements (List3)
5704 -- End_Label (Node4) (set to Empty if expander generated)
5705 -- Exception_Handlers (List5) (set to No_List if none present)
5706 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
5707 -- First_Real_Statement (Node2-Sem)
5708 -- Zero_Cost_Handling (Flag5-Sem)
5709
5710 -- Note: the parent always contains a Declarations field which contains
5711 -- declarations associated with the handled sequence of statements. This
5712 -- is true even in the case of an accept statement (see description of
5713 -- the N_Accept_Statement node).
5714
5715 -- End_Label refers to the containing construct
5716
5717 -----------------------------
5718 -- 11.2 Exception Handler --
5719 -----------------------------
5720
5721 -- EXCEPTION_HANDLER ::=
5722 -- when [CHOICE_PARAMETER_SPECIFICATION :]
5723 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
5724 -- SEQUENCE_OF_STATEMENTS
5725
5726 -- Note: choice parameter specification is not allowed in Ada 83 mode
5727
5728 -- N_Exception_Handler
5729 -- Sloc points to WHEN
5730 -- Choice_Parameter (Node2) (set to Empty if not present)
5731 -- Exception_Choices (List4)
5732 -- Statements (List3)
5733 -- Exception_Label (Node5-Sem) (set to Empty of not present)
5734 -- Zero_Cost_Handling (Flag5-Sem)
5735 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
5736 -- Local_Raise_Not_OK (Flag7-Sem)
5737 -- Has_Local_Raise (Flag8-Sem)
5738
5739 ------------------------------------------
5740 -- 11.2 Choice parameter specification --
5741 ------------------------------------------
5742
5743 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
5744
5745 ----------------------------
5746 -- 11.2 Exception Choice --
5747 ----------------------------
5748
5749 -- EXCEPTION_CHOICE ::= exception_NAME | others
5750
5751 -- Except in the case of OTHERS, no explicit node appears in the tree
5752 -- for exception choice. Instead the exception name appears directly.
5753 -- An OTHERS choice is represented by a N_Others_Choice node (see
5754 -- section 3.8.1.
5755
5756 -- Note: for the exception choice created for an at end handler, the
5757 -- exception choice is an N_Others_Choice node with All_Others set.
5758
5759 ---------------------------
5760 -- 11.3 Raise Statement --
5761 ---------------------------
5762
5763 -- RAISE_STATEMENT ::= raise [exception_NAME];
5764
5765 -- In Ada 2005, we have
5766
5767 -- RAISE_STATEMENT ::= raise; | raise exception_NAME [with EXPRESSION];
5768
5769 -- N_Raise_Statement
5770 -- Sloc points to RAISE
5771 -- Name (Node2) (set to Empty if no exception name present)
5772 -- Expression (Node3) (set to Empty if no expression present)
5773 -- From_At_End (Flag4-Sem)
5774
5775 -------------------------------
5776 -- 12.1 Generic Declaration --
5777 -------------------------------
5778
5779 -- GENERIC_DECLARATION ::=
5780 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
5781
5782 ------------------------------------------
5783 -- 12.1 Generic Subprogram Declaration --
5784 ------------------------------------------
5785
5786 -- GENERIC_SUBPROGRAM_DECLARATION ::=
5787 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION;
5788
5789 -- Note: Generic_Formal_Declarations can include pragmas
5790
5791 -- N_Generic_Subprogram_Declaration
5792 -- Sloc points to GENERIC
5793 -- Specification (Node1) subprogram specification
5794 -- Corresponding_Body (Node5-Sem)
5795 -- Generic_Formal_Declarations (List2) from generic formal part
5796 -- Parent_Spec (Node4-Sem)
5797
5798 ---------------------------------------
5799 -- 12.1 Generic Package Declaration --
5800 ---------------------------------------
5801
5802 -- GENERIC_PACKAGE_DECLARATION ::=
5803 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION;
5804
5805 -- Note: when we do generics right, the Activation_Chain_Entity entry
5806 -- for this node can be removed (since the expander won't see generic
5807 -- units any more)???.
5808
5809 -- Note: Generic_Formal_Declarations can include pragmas
5810
5811 -- N_Generic_Package_Declaration
5812 -- Sloc points to GENERIC
5813 -- Specification (Node1) package specification
5814 -- Corresponding_Body (Node5-Sem)
5815 -- Generic_Formal_Declarations (List2) from generic formal part
5816 -- Parent_Spec (Node4-Sem)
5817 -- Activation_Chain_Entity (Node3-Sem)
5818
5819 -------------------------------
5820 -- 12.1 Generic Formal Part --
5821 -------------------------------
5822
5823 -- GENERIC_FORMAL_PART ::=
5824 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
5825
5826 ------------------------------------------------
5827 -- 12.1 Generic Formal Parameter Declaration --
5828 ------------------------------------------------
5829
5830 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
5831 -- FORMAL_OBJECT_DECLARATION
5832 -- | FORMAL_TYPE_DECLARATION
5833 -- | FORMAL_SUBPROGRAM_DECLARATION
5834 -- | FORMAL_PACKAGE_DECLARATION
5835
5836 ---------------------------------
5837 -- 12.3 Generic Instantiation --
5838 ---------------------------------
5839
5840 -- GENERIC_INSTANTIATION ::=
5841 -- package DEFINING_PROGRAM_UNIT_NAME is
5842 -- new generic_package_NAME [GENERIC_ACTUAL_PART];
5843 -- | [[not] overriding]
5844 -- procedure DEFINING_PROGRAM_UNIT_NAME is
5845 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART];
5846 -- | [[not] overriding]
5847 -- function DEFINING_DESIGNATOR is
5848 -- new generic_function_NAME [GENERIC_ACTUAL_PART];
5849
5850 -- N_Package_Instantiation
5851 -- Sloc points to PACKAGE
5852 -- Defining_Unit_Name (Node1)
5853 -- Name (Node2)
5854 -- Generic_Associations (List3) (set to No_List if no
5855 -- generic actual part)
5856 -- Parent_Spec (Node4-Sem)
5857 -- Instance_Spec (Node5-Sem)
5858 -- ABE_Is_Certain (Flag18-Sem)
5859
5860 -- N_Procedure_Instantiation
5861 -- Sloc points to PROCEDURE
5862 -- Defining_Unit_Name (Node1)
5863 -- Name (Node2)
5864 -- Parent_Spec (Node4-Sem)
5865 -- Generic_Associations (List3) (set to No_List if no
5866 -- generic actual part)
5867 -- Instance_Spec (Node5-Sem)
5868 -- Must_Override (Flag14) set if overriding indicator present
5869 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5870 -- ABE_Is_Certain (Flag18-Sem)
5871
5872 -- N_Function_Instantiation
5873 -- Sloc points to FUNCTION
5874 -- Defining_Unit_Name (Node1)
5875 -- Name (Node2)
5876 -- Generic_Associations (List3) (set to No_List if no
5877 -- generic actual part)
5878 -- Parent_Spec (Node4-Sem)
5879 -- Instance_Spec (Node5-Sem)
5880 -- Must_Override (Flag14) set if overriding indicator present
5881 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5882 -- ABE_Is_Certain (Flag18-Sem)
5883
5884 -- Note: overriding indicator is an Ada 2005 feature
5885
5886 -------------------------------
5887 -- 12.3 Generic Actual Part --
5888 -------------------------------
5889
5890 -- GENERIC_ACTUAL_PART ::=
5891 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
5892
5893 -------------------------------
5894 -- 12.3 Generic Association --
5895 -------------------------------
5896
5897 -- GENERIC_ASSOCIATION ::=
5898 -- [generic_formal_parameter_SELECTOR_NAME =>]
5899
5900 -- Note: unlike the procedure call case, a generic association node
5901 -- is generated for every association, even if no formal parameter
5902 -- selector name is present. In this case the parser will leave the
5903 -- Selector_Name field set to Empty, to be filled in later by the
5904 -- semantic pass.
5905
5906 -- In Ada 2005, a formal may be associated with a box, if the
5907 -- association is part of the list of actuals for a formal package.
5908 -- If the association is given by OTHERS => <>, the association is
5909 -- an N_Others_Choice.
5910
5911 -- N_Generic_Association
5912 -- Sloc points to first token of generic association
5913 -- Selector_Name (Node2) (set to Empty if no formal
5914 -- parameter selector name)
5915 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
5916 -- Box_Present (Flag15) (for formal_package associations with a box)
5917
5918 ---------------------------------------------
5919 -- 12.3 Explicit Generic Actual Parameter --
5920 ---------------------------------------------
5921
5922 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
5923 -- EXPRESSION | variable_NAME | subprogram_NAME
5924 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
5925
5926 -------------------------------------
5927 -- 12.4 Formal Object Declaration --
5928 -------------------------------------
5929
5930 -- FORMAL_OBJECT_DECLARATION ::=
5931 -- DEFINING_IDENTIFIER_LIST :
5932 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION];
5933 -- | DEFINING_IDENTIFIER_LIST :
5934 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION];
5935
5936 -- Although the syntax allows multiple identifiers in the list, the
5937 -- semantics is as though successive declarations were given with
5938 -- identical type definition and expression components. To simplify
5939 -- semantic processing, the parser represents a multiple declaration
5940 -- case as a sequence of single declarations, using the More_Ids and
5941 -- Prev_Ids flags to preserve the original source form as described
5942 -- in the section on "Handling of Defining Identifier Lists".
5943
5944 -- N_Formal_Object_Declaration
5945 -- Sloc points to first identifier
5946 -- Defining_Identifier (Node1)
5947 -- In_Present (Flag15)
5948 -- Out_Present (Flag17)
5949 -- Null_Exclusion_Present (Flag11) (set to False if not present)
5950 -- Subtype_Mark (Node4) (set to Empty if not present)
5951 -- Access_Definition (Node3) (set to Empty if not present)
5952 -- Default_Expression (Node5) (set to Empty if no default expression)
5953 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5954 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5955
5956 -----------------------------------
5957 -- 12.5 Formal Type Declaration --
5958 -----------------------------------
5959
5960 -- FORMAL_TYPE_DECLARATION ::=
5961 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5962 -- is FORMAL_TYPE_DEFINITION;
5963
5964 -- N_Formal_Type_Declaration
5965 -- Sloc points to TYPE
5966 -- Defining_Identifier (Node1)
5967 -- Formal_Type_Definition (Node3)
5968 -- Discriminant_Specifications (List4) (set to No_List if no
5969 -- discriminant part)
5970 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5971
5972 ----------------------------------
5973 -- 12.5 Formal type definition --
5974 ----------------------------------
5975
5976 -- FORMAL_TYPE_DEFINITION ::=
5977 -- FORMAL_PRIVATE_TYPE_DEFINITION
5978 -- | FORMAL_DERIVED_TYPE_DEFINITION
5979 -- | FORMAL_DISCRETE_TYPE_DEFINITION
5980 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
5981 -- | FORMAL_MODULAR_TYPE_DEFINITION
5982 -- | FORMAL_FLOATING_POINT_DEFINITION
5983 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
5984 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
5985 -- | FORMAL_ARRAY_TYPE_DEFINITION
5986 -- | FORMAL_ACCESS_TYPE_DEFINITION
5987 -- | FORMAL_INTERFACE_TYPE_DEFINITION
5988
5989 ---------------------------------------------
5990 -- 12.5.1 Formal Private Type Definition --
5991 ---------------------------------------------
5992
5993 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
5994 -- [[abstract] tagged] [limited] private
5995
5996 -- Note: TAGGED is not allowed in Ada 83 mode
5997
5998 -- N_Formal_Private_Type_Definition
5999 -- Sloc points to PRIVATE
6000 -- Abstract_Present (Flag4)
6001 -- Tagged_Present (Flag15)
6002 -- Limited_Present (Flag17)
6003
6004 --------------------------------------------
6005 -- 12.5.1 Formal Derived Type Definition --
6006 --------------------------------------------
6007
6008 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
6009 -- [abstract] [limited | synchronized]
6010 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
6011 -- Note: this construct is not allowed in Ada 83 mode
6012
6013 -- N_Formal_Derived_Type_Definition
6014 -- Sloc points to NEW
6015 -- Subtype_Mark (Node4)
6016 -- Private_Present (Flag15)
6017 -- Abstract_Present (Flag4)
6018 -- Limited_Present (Flag17)
6019 -- Synchronized_Present (Flag7)
6020 -- Interface_List (List2) (set to No_List if none)
6021
6022 ---------------------------------------------
6023 -- 12.5.2 Formal Discrete Type Definition --
6024 ---------------------------------------------
6025
6026 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
6027
6028 -- N_Formal_Discrete_Type_Definition
6029 -- Sloc points to (
6030
6031 ---------------------------------------------------
6032 -- 12.5.2 Formal Signed Integer Type Definition --
6033 ---------------------------------------------------
6034
6035 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
6036
6037 -- N_Formal_Signed_Integer_Type_Definition
6038 -- Sloc points to RANGE
6039
6040 --------------------------------------------
6041 -- 12.5.2 Formal Modular Type Definition --
6042 --------------------------------------------
6043
6044 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
6045
6046 -- N_Formal_Modular_Type_Definition
6047 -- Sloc points to MOD
6048
6049 ----------------------------------------------
6050 -- 12.5.2 Formal Floating Point Definition --
6051 ----------------------------------------------
6052
6053 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
6054
6055 -- N_Formal_Floating_Point_Definition
6056 -- Sloc points to DIGITS
6057
6058 ----------------------------------------------------
6059 -- 12.5.2 Formal Ordinary Fixed Point Definition --
6060 ----------------------------------------------------
6061
6062 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
6063
6064 -- N_Formal_Ordinary_Fixed_Point_Definition
6065 -- Sloc points to DELTA
6066
6067 ---------------------------------------------------
6068 -- 12.5.2 Formal Decimal Fixed Point Definition --
6069 ---------------------------------------------------
6070
6071 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
6072
6073 -- Note: formal decimal fixed point definition not allowed in Ada 83
6074
6075 -- N_Formal_Decimal_Fixed_Point_Definition
6076 -- Sloc points to DELTA
6077
6078 ------------------------------------------
6079 -- 12.5.3 Formal Array Type Definition --
6080 ------------------------------------------
6081
6082 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
6083
6084 -------------------------------------------
6085 -- 12.5.4 Formal Access Type Definition --
6086 -------------------------------------------
6087
6088 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
6089
6090 ----------------------------------------------
6091 -- 12.5.5 Formal Interface Type Definition --
6092 ----------------------------------------------
6093
6094 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
6095
6096 -----------------------------------------
6097 -- 12.6 Formal Subprogram Declaration --
6098 -----------------------------------------
6099
6100 -- FORMAL_SUBPROGRAM_DECLARATION ::=
6101 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
6102 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
6103
6104 --------------------------------------------------
6105 -- 12.6 Formal Concrete Subprogram Declaration --
6106 --------------------------------------------------
6107
6108 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
6109 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT];
6110
6111 -- N_Formal_Concrete_Subprogram_Declaration
6112 -- Sloc points to WITH
6113 -- Specification (Node1)
6114 -- Default_Name (Node2) (set to Empty if no subprogram default)
6115 -- Box_Present (Flag15)
6116
6117 -- Note: if no subprogram default is present, then Name is set
6118 -- to Empty, and Box_Present is False.
6119
6120 --------------------------------------------------
6121 -- 12.6 Formal Abstract Subprogram Declaration --
6122 --------------------------------------------------
6123
6124 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
6125 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT];
6126
6127 -- N_Formal_Abstract_Subprogram_Declaration
6128 -- Sloc points to WITH
6129 -- Specification (Node1)
6130 -- Default_Name (Node2) (set to Empty if no subprogram default)
6131 -- Box_Present (Flag15)
6132
6133 -- Note: if no subprogram default is present, then Name is set
6134 -- to Empty, and Box_Present is False.
6135
6136 ------------------------------
6137 -- 12.6 Subprogram Default --
6138 ------------------------------
6139
6140 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
6141
6142 -- There is no separate node in the tree for a subprogram default.
6143 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
6144 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
6145 -- default name or box indication, as needed.
6146
6147 ------------------------
6148 -- 12.6 Default Name --
6149 ------------------------
6150
6151 -- DEFAULT_NAME ::= NAME
6152
6153 --------------------------------------
6154 -- 12.7 Formal Package Declaration --
6155 --------------------------------------
6156
6157 -- FORMAL_PACKAGE_DECLARATION ::=
6158 -- with package DEFINING_IDENTIFIER
6159 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART;
6160
6161 -- Note: formal package declarations not allowed in Ada 83 mode
6162
6163 -- N_Formal_Package_Declaration
6164 -- Sloc points to WITH
6165 -- Defining_Identifier (Node1)
6166 -- Name (Node2)
6167 -- Generic_Associations (List3) (set to No_List if (<>) case or
6168 -- empty generic actual part)
6169 -- Box_Present (Flag15)
6170 -- Instance_Spec (Node5-Sem)
6171 -- ABE_Is_Certain (Flag18-Sem)
6172
6173 --------------------------------------
6174 -- 12.7 Formal Package Actual Part --
6175 --------------------------------------
6176
6177 -- FORMAL_PACKAGE_ACTUAL_PART ::=
6178 -- ([OTHERS] => <>)
6179 -- | [GENERIC_ACTUAL_PART]
6180 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
6181
6182 -- FORMAL_PACKAGE_ASSOCIATION ::=
6183 -- GENERIC_ASSOCIATION
6184 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
6185
6186 -- There is no explicit node in the tree for a formal package actual
6187 -- part. Instead the information appears in the parent node (i.e. the
6188 -- formal package declaration node itself).
6189
6190 -- There is no explicit node for a formal package association. All of
6191 -- them are represented either by a generic association, possibly with
6192 -- Box_Present, or by an N_Others_Choice.
6193
6194 ---------------------------------
6195 -- 13.1 Representation clause --
6196 ---------------------------------
6197
6198 -- REPRESENTATION_CLAUSE ::=
6199 -- ATTRIBUTE_DEFINITION_CLAUSE
6200 -- | ENUMERATION_REPRESENTATION_CLAUSE
6201 -- | RECORD_REPRESENTATION_CLAUSE
6202 -- | AT_CLAUSE
6203
6204 ----------------------
6205 -- 13.1 Local Name --
6206 ----------------------
6207
6208 -- LOCAL_NAME :=
6209 -- DIRECT_NAME
6210 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
6211 -- | library_unit_NAME
6212
6213 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
6214 -- as an attribute reference, which has essentially the same form.
6215
6216 ---------------------------------------
6217 -- 13.3 Attribute definition clause --
6218 ---------------------------------------
6219
6220 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
6221 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
6222 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
6223
6224 -- In Ada 83, the expression must be a simple expression and the
6225 -- local name must be a direct name.
6226
6227 -- Note: the only attribute definition clause that is processed by
6228 -- gigi is an address clause. For all other cases, the information
6229 -- is extracted by the front end and either results in setting entity
6230 -- information, e.g. Esize for the Size clause, or in appropriate
6231 -- expansion actions (e.g. in the case of Storage_Size).
6232
6233 -- For an address clause, Gigi constructs the appropriate addressing
6234 -- code. It also ensures that no aliasing optimizations are made
6235 -- for the object for which the address clause appears.
6236
6237 -- Note: for an address clause used to achieve an overlay:
6238
6239 -- A : Integer;
6240 -- B : Integer;
6241 -- for B'Address use A'Address;
6242
6243 -- the above rule means that Gigi will ensure that no optimizations
6244 -- will be made for B that would violate the implementation advice
6245 -- of RM 13.3(19). However, this advice applies only to B and not
6246 -- to A, which seems unfortunate. The GNAT front end will mark the
6247 -- object A as volatile to also prevent unwanted optimization
6248 -- assumptions based on no aliasing being made for B.
6249
6250 -- N_Attribute_Definition_Clause
6251 -- Sloc points to FOR
6252 -- Name (Node2) the local name
6253 -- Chars (Name1) the identifier name from the attribute designator
6254 -- Expression (Node3) the expression or name
6255 -- Entity (Node4-Sem)
6256 -- Next_Rep_Item (Node5-Sem)
6257 -- From_At_Mod (Flag4-Sem)
6258 -- Check_Address_Alignment (Flag11-Sem)
6259 -- Address_Warning_Posted (Flag18-Sem)
6260
6261 ---------------------------------------------
6262 -- 13.4 Enumeration representation clause --
6263 ---------------------------------------------
6264
6265 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
6266 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
6267
6268 -- In Ada 83, the name must be a direct name
6269
6270 -- N_Enumeration_Representation_Clause
6271 -- Sloc points to FOR
6272 -- Identifier (Node1) direct name
6273 -- Array_Aggregate (Node3)
6274 -- Next_Rep_Item (Node5-Sem)
6275
6276 ---------------------------------
6277 -- 13.4 Enumeration aggregate --
6278 ---------------------------------
6279
6280 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
6281
6282 ------------------------------------------
6283 -- 13.5.1 Record representation clause --
6284 ------------------------------------------
6285
6286 -- RECORD_REPRESENTATION_CLAUSE ::=
6287 -- for first_subtype_LOCAL_NAME use
6288 -- record [MOD_CLAUSE]
6289 -- {COMPONENT_CLAUSE}
6290 -- end record;
6291
6292 -- Gigi restriction: Mod_Clause is always Empty (if present it is
6293 -- replaced by a corresponding Alignment attribute definition clause).
6294
6295 -- Note: Component_Clauses can include pragmas
6296
6297 -- N_Record_Representation_Clause
6298 -- Sloc points to FOR
6299 -- Identifier (Node1) direct name
6300 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
6301 -- Component_Clauses (List3)
6302 -- Next_Rep_Item (Node5-Sem)
6303
6304 ------------------------------
6305 -- 13.5.1 Component clause --
6306 ------------------------------
6307
6308 -- COMPONENT_CLAUSE ::=
6309 -- component_LOCAL_NAME at POSITION
6310 -- range FIRST_BIT .. LAST_BIT;
6311
6312 -- N_Component_Clause
6313 -- Sloc points to AT
6314 -- Component_Name (Node1) points to Name or Attribute_Reference
6315 -- Position (Node2)
6316 -- First_Bit (Node3)
6317 -- Last_Bit (Node4)
6318
6319 ----------------------
6320 -- 13.5.1 Position --
6321 ----------------------
6322
6323 -- POSITION ::= static_EXPRESSION
6324
6325 -----------------------
6326 -- 13.5.1 First_Bit --
6327 -----------------------
6328
6329 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
6330
6331 ----------------------
6332 -- 13.5.1 Last_Bit --
6333 ----------------------
6334
6335 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
6336
6337 --------------------------
6338 -- 13.8 Code statement --
6339 --------------------------
6340
6341 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
6342
6343 -- Note: in GNAT, the qualified expression has the form
6344
6345 -- Asm_Insn'(Asm (...));
6346
6347 -- See package System.Machine_Code in file s-maccod.ads for details on
6348 -- the allowed parameters to Asm. There are two ways this node can
6349 -- arise, as a code statement, in which case the expression is the
6350 -- qualified expression, or as a result of the expansion of an intrinsic
6351 -- call to the Asm or Asm_Input procedure.
6352
6353 -- N_Code_Statement
6354 -- Sloc points to first token of the expression
6355 -- Expression (Node3)
6356
6357 -- Note: package Exp_Code contains an abstract functional interface
6358 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
6359
6360 ------------------------
6361 -- 13.12 Restriction --
6362 ------------------------
6363
6364 -- RESTRICTION ::=
6365 -- restriction_IDENTIFIER
6366 -- | restriction_parameter_IDENTIFIER => EXPRESSION
6367
6368 -- There is no explicit node for restrictions. Instead the restriction
6369 -- appears in normal pragma syntax as a pragma argument association,
6370 -- which has the same syntactic form.
6371
6372 --------------------------
6373 -- B.2 Shift Operators --
6374 --------------------------
6375
6376 -- Calls to the intrinsic shift functions are converted to one of
6377 -- the following shift nodes, which have the form of normal binary
6378 -- operator names. Note that for a given shift operation, one node
6379 -- covers all possible types, as for normal operators.
6380
6381 -- Note: it is perfectly permissible for the expander to generate
6382 -- shift operation nodes directly, in which case they will be analyzed
6383 -- and parsed in the usual manner.
6384
6385 -- Sprint syntax: shift-function-name!(expr, count)
6386
6387 -- Note: the Left_Opnd field holds the first argument (the value to
6388 -- be shifted). The Right_Opnd field holds the second argument (the
6389 -- shift count). The Chars field is the name of the intrinsic function.
6390
6391 -- N_Op_Rotate_Left
6392 -- Sloc points to the function name
6393 -- plus fields for binary operator
6394 -- plus fields for expression
6395 -- Shift_Count_OK (Flag4-Sem)
6396
6397 -- N_Op_Rotate_Right
6398 -- Sloc points to the function name
6399 -- plus fields for binary operator
6400 -- plus fields for expression
6401 -- Shift_Count_OK (Flag4-Sem)
6402
6403 -- N_Op_Shift_Left
6404 -- Sloc points to the function name
6405 -- plus fields for binary operator
6406 -- plus fields for expression
6407 -- Shift_Count_OK (Flag4-Sem)
6408
6409 -- N_Op_Shift_Right_Arithmetic
6410 -- Sloc points to the function name
6411 -- plus fields for binary operator
6412 -- plus fields for expression
6413 -- Shift_Count_OK (Flag4-Sem)
6414
6415 -- N_Op_Shift_Right
6416 -- Sloc points to the function name
6417 -- plus fields for binary operator
6418 -- plus fields for expression
6419 -- Shift_Count_OK (Flag4-Sem)
6420
6421 --------------------------
6422 -- Obsolescent Features --
6423 --------------------------
6424
6425 -- The syntax descriptions and tree nodes for obsolescent features are
6426 -- grouped together, corresponding to their location in appendix I in
6427 -- the RM. However, parsing and semantic analysis for these constructs
6428 -- is located in an appropriate chapter (see individual notes).
6429
6430 ---------------------------
6431 -- J.3 Delta Constraint --
6432 ---------------------------
6433
6434 -- Note: the parse routine for this construct is located in section
6435 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
6436 -- where delta constraint logically belongs.
6437
6438 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
6439
6440 -- N_Delta_Constraint
6441 -- Sloc points to DELTA
6442 -- Delta_Expression (Node3)
6443 -- Range_Constraint (Node4) (set to Empty if not present)
6444
6445 --------------------
6446 -- J.7 At Clause --
6447 --------------------
6448
6449 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
6450
6451 -- Note: the parse routine for this construct is located in Par-Ch13,
6452 -- and the semantic analysis is in Sem_Ch13, where at clause logically
6453 -- belongs if it were not obsolescent.
6454
6455 -- Note: in Ada 83 the expression must be a simple expression
6456
6457 -- Gigi restriction: This node never appears, it is rewritten as an
6458 -- address attribute definition clause.
6459
6460 -- N_At_Clause
6461 -- Sloc points to FOR
6462 -- Identifier (Node1)
6463 -- Expression (Node3)
6464
6465 ---------------------
6466 -- J.8 Mod clause --
6467 ---------------------
6468
6469 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
6470
6471 -- Note: the parse routine for this construct is located in Par-Ch13,
6472 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
6473 -- belongs if it were not obsolescent.
6474
6475 -- Note: in Ada 83, the expression must be a simple expression
6476
6477 -- Gigi restriction: this node never appears. It is replaced
6478 -- by a corresponding Alignment attribute definition clause.
6479
6480 -- Note: pragmas can appear before and after the MOD_CLAUSE since
6481 -- its name has "clause" in it. This is rather strange, but is quite
6482 -- definitely specified. The pragmas before are collected in the
6483 -- Pragmas_Before field of the mod clause node itself, and pragmas
6484 -- after are simply swallowed up in the list of component clauses.
6485
6486 -- N_Mod_Clause
6487 -- Sloc points to AT
6488 -- Expression (Node3)
6489 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
6490
6491 --------------------
6492 -- Semantic Nodes --
6493 --------------------
6494
6495 -- These semantic nodes are used to hold additional semantic information.
6496 -- They are inserted into the tree as a result of semantic processing.
6497 -- Although there are no legitimate source syntax constructions that
6498 -- correspond directly to these nodes, we need a source syntax for the
6499 -- reconstructed tree printed by Sprint, and the node descriptions here
6500 -- show this syntax.
6501
6502 -- Note: Conditional_Expression is in this section for historical reasons.
6503 -- We will move it to its appropriate place when it is officially approved
6504 -- as an extension (and then we will know what the exact grammar and place
6505 -- in the Reference Manual is!)
6506
6507 ----------------------------
6508 -- Conditional Expression --
6509 ----------------------------
6510
6511 -- This node is used to represent an expression corresponding to the
6512 -- C construct (condition ? then-expression : else_expression), where
6513 -- Expressions is a three element list, whose first expression is the
6514 -- condition, and whose second and third expressions are the then and
6515 -- else expressions respectively.
6516
6517 -- Note: the Then_Actions and Else_Actions fields are always set to
6518 -- No_List in the tree passed to Gigi. These fields are used only
6519 -- for temporary processing purposes in the expander.
6520
6521 -- The Ada language does not permit conditional expressions, however
6522 -- this is under discussion as a possible extension by the ARG, and we
6523 -- have implemented a form of this capability in GNAT under control of
6524 -- the -gnatX switch. The syntax is:
6525
6526 -- CONDITIONAL_EXPRESSION ::=
6527 -- if EXPRESSION then EXPRESSION
6528 -- {elsif EXPRESSION then EXPRESSION}
6529 -- [else EXPRESSION]
6530
6531 -- And we add the additional constructs
6532
6533 -- PRIMARY ::= ( CONDITIONAL_EXPRESION )
6534 -- PRAGMA_ARGUMENT_ASSOCIATION ::= CONDITIONAL_EXPRESSION
6535
6536 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
6537 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
6538 -- the Is_Elsif flag is set on the inner conditional expression.
6539
6540 -- N_Conditional_Expression
6541 -- Sloc points to IF or ELSIF keyword
6542 -- Expressions (List1)
6543 -- Then_Actions (List2-Sem)
6544 -- Else_Actions (List3-Sem)
6545 -- Is_Elsif (Flag13) (set if comes from ELSIF)
6546 -- plus fields for expression
6547
6548 -------------------
6549 -- Expanded_Name --
6550 -------------------
6551
6552 -- The N_Expanded_Name node is used to represent a selected component
6553 -- name that has been resolved to an expanded name. The semantic phase
6554 -- replaces N_Selected_Component nodes that represent names by the use
6555 -- of this node, leaving the N_Selected_Component node used only when
6556 -- the prefix is a record or protected type.
6557
6558 -- The fields of the N_Expanded_Name node are layed out identically
6559 -- to those of the N_Selected_Component node, allowing conversion of
6560 -- an expanded name node to a selected component node to be done
6561 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
6562
6563 -- There is no special sprint syntax for an expanded name
6564
6565 -- N_Expanded_Name
6566 -- Sloc points to the period
6567 -- Chars (Name1) copy of Chars field of selector name
6568 -- Prefix (Node3)
6569 -- Selector_Name (Node2)
6570 -- Entity (Node4-Sem)
6571 -- Associated_Node (Node4-Sem)
6572 -- Redundant_Use (Flag13-Sem)
6573 -- Has_Private_View (Flag11-Sem) set in generic units.
6574 -- plus fields for expression
6575
6576 --------------------
6577 -- Free Statement --
6578 --------------------
6579
6580 -- The N_Free_Statement node is generated as a result of a call to an
6581 -- instantiation of Unchecked_Deallocation. The instantiation of this
6582 -- generic is handled specially and generates this node directly.
6583
6584 -- Sprint syntax: free expression
6585
6586 -- N_Free_Statement
6587 -- Sloc is copied from the unchecked deallocation call
6588 -- Expression (Node3) argument to unchecked deallocation call
6589 -- Storage_Pool (Node1-Sem)
6590 -- Procedure_To_Call (Node2-Sem)
6591 -- Actual_Designated_Subtype (Node4-Sem)
6592
6593 -- Note: in the case where a debug source file is generated, the Sloc
6594 -- for this node points to the FREE keyword in the Sprint file output.
6595
6596 -------------------
6597 -- Freeze Entity --
6598 -------------------
6599
6600 -- This node marks the point in a declarative part at which an entity
6601 -- declared therein becomes frozen. The expander places initialization
6602 -- procedures for types at those points. Gigi uses the freezing point
6603 -- to elaborate entities that may depend on previous private types.
6604
6605 -- See the section in Einfo "Delayed Freezing and Elaboration" for
6606 -- a full description of the use of this node.
6607
6608 -- The Entity field points back to the entity for the type (whose
6609 -- Freeze_Node field points back to this freeze node).
6610
6611 -- The Actions field contains a list of declarations and statements
6612 -- generated by the expander which are associated with the freeze
6613 -- node, and are elaborated as though the freeze node were replaced
6614 -- by this sequence of actions.
6615
6616 -- Note: the Sloc field in the freeze node references a construct
6617 -- associated with the freezing point. This is used for posting
6618 -- messages in some error/warning situations, e.g. the case where
6619 -- a primitive operation of a tagged type is declared too late.
6620
6621 -- Sprint syntax: freeze entity-name [
6622 -- freeze actions
6623 -- ]
6624
6625 -- N_Freeze_Entity
6626 -- Sloc points near freeze point (see above special note)
6627 -- Entity (Node4-Sem)
6628 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
6629 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
6630 -- Actions (List1) (set to No_List if no freeze actions)
6631 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
6632
6633 -- The Actions field holds actions associated with the freeze. These
6634 -- actions are elaborated at the point where the type is frozen.
6635
6636 -- Note: in the case where a debug source file is generated, the Sloc
6637 -- for this node points to the FREEZE keyword in the Sprint file output.
6638
6639 --------------------------------
6640 -- Implicit Label Declaration --
6641 --------------------------------
6642
6643 -- An implicit label declaration is created for every occurrence of a
6644 -- label on a statement or a label on a block or loop. It is chained
6645 -- in the declarations of the innermost enclosing block as specified
6646 -- in RM section 5.1 (3).
6647
6648 -- The Defining_Identifier is the actual identifier for the statement
6649 -- identifier. Note that the occurrence of the label is a reference, NOT
6650 -- the defining occurrence. The defining occurrence occurs at the head
6651 -- of the innermost enclosing block, and is represented by this node.
6652
6653 -- Note: from the grammar, this might better be called an implicit
6654 -- statement identifier declaration, but the term we choose seems
6655 -- friendlier, since at least informally statement identifiers are
6656 -- called labels in both cases (i.e. when used in labels, and when
6657 -- used as the identifiers of blocks and loops).
6658
6659 -- Note: although this is logically a semantic node, since it does not
6660 -- correspond directly to a source syntax construction, these nodes are
6661 -- actually created by the parser in a post pass done just after parsing
6662 -- is complete, before semantic analysis is started (see Par.Labl).
6663
6664 -- Sprint syntax: labelname : label;
6665
6666 -- N_Implicit_Label_Declaration
6667 -- Sloc points to the << of the label
6668 -- Defining_Identifier (Node1)
6669 -- Label_Construct (Node2-Sem)
6670
6671 -- Note: in the case where a debug source file is generated, the Sloc
6672 -- for this node points to the label name in the generated declaration.
6673
6674 ---------------------
6675 -- Itype_Reference --
6676 ---------------------
6677
6678 -- This node is used to create a reference to an Itype. The only purpose
6679 -- is to make sure the Itype is defined if this is the first reference.
6680
6681 -- A typical use of this node is when an Itype is to be referenced in
6682 -- two branches of an IF statement. In this case it is important that
6683 -- the first use of the Itype not be inside the conditional, since then
6684 -- it might not be defined if the other branch of the IF is taken, in
6685 -- the case where the definition generates elaboration code.
6686
6687 -- The Itype field points to the referenced Itype
6688
6689 -- Sprint syntax: reference itype-name
6690
6691 -- N_Itype_Reference
6692 -- Sloc points to the node generating the reference
6693 -- Itype (Node1-Sem)
6694
6695 -- Note: in the case where a debug source file is generated, the Sloc
6696 -- for this node points to the REFERENCE keyword in the file output.
6697
6698 ---------------------
6699 -- Raise_xxx_Error --
6700 ---------------------
6701
6702 -- One of these nodes is created during semantic analysis to replace
6703 -- a node for an expression that is determined to definitely raise
6704 -- the corresponding exception.
6705
6706 -- The N_Raise_xxx_Error node may also stand alone in place
6707 -- of a declaration or statement, in which case it simply causes
6708 -- the exception to be raised (i.e. it is equivalent to a raise
6709 -- statement that raises the corresponding exception). This use
6710 -- is distinguished by the fact that the Etype in this case is
6711 -- Standard_Void_Type, In the subexpression case, the Etype is the
6712 -- same as the type of the subexpression which it replaces.
6713
6714 -- If Condition is empty, then the raise is unconditional. If the
6715 -- Condition field is non-empty, it is a boolean expression which
6716 -- is first evaluated, and the exception is raised only if the
6717 -- value of the expression is True. In the unconditional case, the
6718 -- creation of this node is usually accompanied by a warning message
6719 -- error. The creation of this node will usually be accompanied by a
6720 -- message (unless it appears within the right operand of a short
6721 -- circuit form whose left argument is static and decisively
6722 -- eliminates elaboration of the raise operation. The condition field
6723 -- can ONLY be present when the node is used as a statement form, it
6724 -- may NOT be present in the case where the node appears within an
6725 -- expression.
6726
6727 -- The exception is generated with a message that contains the
6728 -- file name and line number, and then appended text. The Reason
6729 -- code shows the text to be added. The Reason code is an element
6730 -- of the type Types.RT_Exception_Code, and indicates both the
6731 -- message to be added, and the exception to be raised (which must
6732 -- match the node type). The value is stored by storing a Uint which
6733 -- is the Pos value of the enumeration element in this type.
6734
6735 -- Gigi restriction: This expander ensures that the type of the
6736 -- Condition field is always Standard.Boolean, even if the type
6737 -- in the source is some non-standard boolean type.
6738
6739 -- Sprint syntax: [xxx_error "msg"]
6740 -- or: [xxx_error when condition "msg"]
6741
6742 -- N_Raise_Constraint_Error
6743 -- Sloc references related construct
6744 -- Condition (Node1) (set to Empty if no condition)
6745 -- Reason (Uint3)
6746 -- plus fields for expression
6747
6748 -- N_Raise_Program_Error
6749 -- Sloc references related construct
6750 -- Condition (Node1) (set to Empty if no condition)
6751 -- Reason (Uint3)
6752 -- plus fields for expression
6753
6754 -- N_Raise_Storage_Error
6755 -- Sloc references related construct
6756 -- Condition (Node1) (set to Empty if no condition)
6757 -- Reason (Uint3)
6758 -- plus fields for expression
6759
6760 -- Note: Sloc is copied from the expression generating the exception.
6761 -- In the case where a debug source file is generated, the Sloc for
6762 -- this node points to the left bracket in the Sprint file output.
6763
6764 -- Note: the back end may be required to translate these nodes into
6765 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
6766
6767 ---------------------------------------------
6768 -- Optimization of Exception Raise to Goto --
6769 ---------------------------------------------
6770
6771 -- In some cases, the front end will determine that any exception raised
6772 -- by the back end for a certain exception should be transformed into a
6773 -- goto statement.
6774
6775 -- There are three kinds of exceptions raised by the back end (note that
6776 -- for this purpose we consider gigi to be part of the back end in the
6777 -- gcc case):
6778
6779 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
6780 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
6781 -- 3. Other cases not specifically marked by the front end
6782
6783 -- Normally all such exceptions are translated into calls to the proper
6784 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
6785 -- and the exception message.
6786
6787 -- The front end may determine that for a particular sequence of code,
6788 -- exceptions in any of these three categories for a particular builtin
6789 -- exception should result in a goto, rather than a call to Rcheck_xx.
6790 -- The exact sequence to be generated is:
6791
6792 -- Local_Raise (exception'Identity);
6793 -- goto Label
6794
6795 -- The front end marks such a sequence of code by bracketing it with
6796 -- push and pop nodes:
6797
6798 -- N_Push_xxx_Label (referencing the label)
6799 -- ...
6800 -- (code where transformation is expected for exception xxx)
6801 -- ...
6802 -- N_Pop_xxx_Label
6803
6804 -- The use of push/pop reflects the fact that such regions can properly
6805 -- nest, and one special case is a subregion in which no transformation
6806 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
6807 -- Exception_Label field is Empty.
6808
6809 -- N_Push_Constraint_Error_Label
6810 -- Sloc references first statement in region covered
6811 -- Exception_Label (Node5-Sem)
6812
6813 -- N_Push_Program_Error_Label
6814 -- Sloc references first statement in region covered
6815 -- Exception_Label (Node5-Sem)
6816
6817 -- N_Push_Storage_Error_Label
6818 -- Sloc references first statement in region covered
6819 -- Exception_Label (Node5-Sem)
6820
6821 -- N_Pop_Constraint_Error_Label
6822 -- Sloc references last statement in region covered
6823
6824 -- N_Pop_Program_Error_Label
6825 -- Sloc references last statement in region covered
6826
6827 -- N_Pop_Storage_Error_Label
6828 -- Sloc references last statement in region covered
6829
6830 ---------------
6831 -- Reference --
6832 ---------------
6833
6834 -- For a number of purposes, we need to construct references to objects.
6835 -- These references are subsequently treated as normal access values.
6836 -- An example is the construction of the parameter block passed to a
6837 -- task entry. The N_Reference node is provided for this purpose. It is
6838 -- similar in effect to the use of the Unrestricted_Access attribute,
6839 -- and like Unrestricted_Access can be applied to objects which would
6840 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
6841 -- objects which are not aliased, and slices). In addition it can be
6842 -- applied to composite type values as well as objects, including string
6843 -- values and aggregates.
6844
6845 -- Note: we use the Prefix field for this expression so that the
6846 -- resulting node can be treated using common code with the attribute
6847 -- nodes for the 'Access and related attributes. Logically it would make
6848 -- more sense to call it an Expression field, but then we would have to
6849 -- special case the treatment of the N_Reference node.
6850
6851 -- Sprint syntax: prefix'reference
6852
6853 -- N_Reference
6854 -- Sloc is copied from the expression
6855 -- Prefix (Node3)
6856 -- plus fields for expression
6857
6858 -- Note: in the case where a debug source file is generated, the Sloc
6859 -- for this node points to the quote in the Sprint file output.
6860
6861 -----------------
6862 -- SCIL Nodes --
6863 -----------------
6864
6865 -- SCIL nodes are special nodes added to the tree when the CodePeer
6866 -- mode is active. They help the CodePeer backend to locate nodes that
6867 -- require special processing.
6868
6869 -- Major documentation on the general design of the SCIL interface, and
6870 -- in particular detailed description of these nodes is missing and is
6871 -- to be supplied in the future, when the design has finalized ???
6872
6873 -- Meanwhile these nodes should be considered in experimental form, and
6874 -- should be ignored by all code generating back ends. ???
6875
6876 -- N_SCIL_Dispatch_Table_Object_Init
6877 -- Sloc references a declaration node containing a dispatch table
6878 -- SCIL_Related_Node (Node1-Sem)
6879 -- SCIL_Entity (Node4-Sem)
6880
6881 -- N_SCIL_Dispatch_Table_Tag_Init
6882 -- Sloc references a node for a tag initialization
6883 -- SCIL_Related_Node (Node1-Sem)
6884 -- SCIL_Entity (Node4-Sem)
6885
6886 -- N_SCIL_Dispatching_Call
6887 -- Sloc references the node of a dispatching call
6888 -- SCIL_Related_Node (Node1-Sem)
6889 -- SCIL_Target_Prim (Node2-Sem)
6890 -- SCIL_Entity (Node4-Sem)
6891 -- SCIL_Controlling_Tag (Node5-Sem)
6892
6893 -- N_SCIL_Membership_Test
6894 -- Sloc references the node of a membership test
6895 -- SCIL_Related_Node (Node1-Sem)
6896 -- SCIL_Tag_Value (Node5-Sem)
6897 -- SCIL_Entity (Node4-Sem)
6898
6899 -- N_SCIL_Tag_Init
6900 -- Sloc references the node of a tag component initialization
6901 -- SCIL_Related_Node (Node1-Sem)
6902 -- SCIL_Entity (Node4-Sem)
6903
6904 ---------------------
6905 -- Subprogram_Info --
6906 ---------------------
6907
6908 -- This node generates the appropriate Subprogram_Info value for a
6909 -- given procedure. See Ada.Exceptions for further details
6910
6911 -- Sprint syntax: subprog'subprogram_info
6912
6913 -- N_Subprogram_Info
6914 -- Sloc points to the entity for the procedure
6915 -- Identifier (Node1) identifier referencing the procedure
6916 -- Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc
6917
6918 -- Note: in the case where a debug source file is generated, the Sloc
6919 -- for this node points to the quote in the Sprint file output.
6920
6921 --------------------------
6922 -- Unchecked Expression --
6923 --------------------------
6924
6925 -- An unchecked expression is one that must be analyzed and resolved
6926 -- with all checks off, regardless of the current setting of scope
6927 -- suppress flags.
6928
6929 -- Sprint syntax: `(expression)
6930
6931 -- Note: this node is always removed from the tree (and replaced by
6932 -- its constituent expression) on completion of analysis, so it only
6933 -- appears in intermediate trees, and will never be seen by Gigi.
6934
6935 -- N_Unchecked_Expression
6936 -- Sloc is a copy of the Sloc of the expression
6937 -- Expression (Node3)
6938 -- plus fields for expression
6939
6940 -- Note: in the case where a debug source file is generated, the Sloc
6941 -- for this node points to the back quote in the Sprint file output.
6942
6943 -------------------------------
6944 -- Unchecked Type Conversion --
6945 -------------------------------
6946
6947 -- An unchecked type conversion node represents the semantic action
6948 -- corresponding to a call to an instantiation of Unchecked_Conversion.
6949 -- It is generated as a result of actual use of Unchecked_Conversion
6950 -- and also the expander generates unchecked type conversion nodes
6951 -- directly for expansion of complex semantic actions.
6952
6953 -- Note: an unchecked type conversion is a variable as far as the
6954 -- semantics are concerned, which is convenient for the expander.
6955 -- This does not change what Ada source programs are legal, since
6956 -- clearly a function call to an instantiation of Unchecked_Conversion
6957 -- is not a variable in any case.
6958
6959 -- Sprint syntax: subtype-mark!(expression)
6960
6961 -- N_Unchecked_Type_Conversion
6962 -- Sloc points to related node in source
6963 -- Subtype_Mark (Node4)
6964 -- Expression (Node3)
6965 -- Kill_Range_Check (Flag11-Sem)
6966 -- No_Truncation (Flag17-Sem)
6967 -- plus fields for expression
6968
6969 -- Note: in the case where a debug source file is generated, the Sloc
6970 -- for this node points to the exclamation in the Sprint file output.
6971
6972 -----------------------------------
6973 -- Validate_Unchecked_Conversion --
6974 -----------------------------------
6975
6976 -- The front end does most of the validation of unchecked conversion,
6977 -- including checking sizes (this is done after the back end is called
6978 -- to take advantage of back-annotation of calculated sizes).
6979
6980 -- The front end also deals with specific cases that are not allowed
6981 -- e.g. involving unconstrained array types.
6982
6983 -- For the case of the standard gigi backend, this means that all
6984 -- checks are done in the front-end.
6985
6986 -- However, in the case of specialized back-ends, notably the JVM
6987 -- backend for JGNAT, additional requirements and restrictions apply
6988 -- to unchecked conversion, and these are most conveniently performed
6989 -- in the specialized back-end.
6990
6991 -- To accommodate this requirement, for such back ends, the following
6992 -- special node is generated recording an unchecked conversion that
6993 -- needs to be validated. The back end should post an appropriate
6994 -- error message if the unchecked conversion is invalid or warrants
6995 -- a special warning message.
6996
6997 -- Source_Type and Target_Type point to the entities for the two
6998 -- types involved in the unchecked conversion instantiation that
6999 -- is to be validated.
7000
7001 -- Sprint syntax: validate Unchecked_Conversion (source, target);
7002
7003 -- N_Validate_Unchecked_Conversion
7004 -- Sloc points to instantiation (location for warning message)
7005 -- Source_Type (Node1-Sem)
7006 -- Target_Type (Node2-Sem)
7007
7008 -- Note: in the case where a debug source file is generated, the Sloc
7009 -- for this node points to the VALIDATE keyword in the file output.
7010
7011 -----------
7012 -- Empty --
7013 -----------
7014
7015 -- Used as the contents of the Nkind field of the dummy Empty node
7016 -- and in some other situations to indicate an uninitialized value.
7017
7018 -- N_Empty
7019 -- Chars (Name1) is set to No_Name
7020
7021 -----------
7022 -- Error --
7023 -----------
7024
7025 -- Used as the contents of the Nkind field of the dummy Error node.
7026 -- Has an Etype field, which gets set to Any_Type later on, to help
7027 -- error recovery (Error_Posted is also set in the Error node).
7028
7029 -- N_Error
7030 -- Chars (Name1) is set to Error_Name
7031 -- Etype (Node5-Sem)
7032
7033 --------------------------
7034 -- Node Type Definition --
7035 --------------------------
7036
7037 -- The following is the definition of the Node_Kind type. As previously
7038 -- discussed, this is separated off to allow rearrangement of the order
7039 -- to facilitate definition of subtype ranges. The comments show the
7040 -- subtype classes which apply to each set of node kinds. The first
7041 -- entry in the comment characterizes the following list of nodes.
7042
7043 type Node_Kind is (
7044 N_Unused_At_Start,
7045
7046 -- N_Representation_Clause
7047
7048 N_At_Clause,
7049 N_Component_Clause,
7050 N_Enumeration_Representation_Clause,
7051 N_Mod_Clause,
7052 N_Record_Representation_Clause,
7053
7054 -- N_Representation_Clause, N_Has_Chars
7055
7056 N_Attribute_Definition_Clause,
7057
7058 -- N_Has_Chars
7059
7060 N_Empty,
7061 N_Pragma_Argument_Association,
7062
7063 -- N_Has_Etype
7064
7065 N_Error,
7066
7067 -- N_Entity, N_Has_Etype, N_Has_Chars
7068
7069 N_Defining_Character_Literal,
7070 N_Defining_Identifier,
7071 N_Defining_Operator_Symbol,
7072
7073 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
7074
7075 N_Expanded_Name,
7076
7077 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
7078 -- N_Has_Chars, N_Has_Entity
7079
7080 N_Identifier,
7081 N_Operator_Symbol,
7082
7083 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
7084 -- N_Has_Chars, N_Has_Entity
7085
7086 N_Character_Literal,
7087
7088 -- N_Binary_Op, N_Op, N_Subexpr,
7089 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
7090
7091 N_Op_Add,
7092 N_Op_Concat,
7093 N_Op_Expon,
7094 N_Op_Subtract,
7095
7096 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
7097 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
7098
7099 N_Op_Divide,
7100 N_Op_Mod,
7101 N_Op_Multiply,
7102 N_Op_Rem,
7103
7104 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7105 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7106
7107 N_Op_And,
7108
7109 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7110 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
7111
7112 N_Op_Eq,
7113 N_Op_Ge,
7114 N_Op_Gt,
7115 N_Op_Le,
7116 N_Op_Lt,
7117 N_Op_Ne,
7118
7119 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7120 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7121
7122 N_Op_Or,
7123 N_Op_Xor,
7124
7125 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
7126 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
7127
7128 N_Op_Rotate_Left,
7129 N_Op_Rotate_Right,
7130 N_Op_Shift_Left,
7131 N_Op_Shift_Right,
7132 N_Op_Shift_Right_Arithmetic,
7133
7134 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
7135 -- N_Has_Chars, N_Has_Entity
7136
7137 N_Op_Abs,
7138 N_Op_Minus,
7139 N_Op_Not,
7140 N_Op_Plus,
7141
7142 -- N_Subexpr, N_Has_Etype, N_Has_Entity
7143
7144 N_Attribute_Reference,
7145
7146 -- N_Subexpr, N_Has_Etype, N_Membership_Test
7147
7148 N_In,
7149 N_Not_In,
7150
7151 -- N_Subexpr, N_Has_Etype, N_Short_Circuit
7152
7153 N_And_Then,
7154 N_Or_Else,
7155
7156 -- N_Subexpr, N_Has_Etype
7157
7158 N_Conditional_Expression,
7159 N_Explicit_Dereference,
7160 N_Function_Call,
7161 N_Indexed_Component,
7162 N_Integer_Literal,
7163 N_Null,
7164 N_Procedure_Call_Statement,
7165 N_Qualified_Expression,
7166
7167 -- N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
7168
7169 N_Raise_Constraint_Error,
7170 N_Raise_Program_Error,
7171 N_Raise_Storage_Error,
7172
7173 -- N_Subexpr, N_Has_Etype
7174
7175 N_Aggregate,
7176 N_Allocator,
7177 N_Extension_Aggregate,
7178 N_Range,
7179 N_Real_Literal,
7180 N_Reference,
7181 N_Selected_Component,
7182 N_Slice,
7183 N_String_Literal,
7184 N_Subprogram_Info,
7185 N_Type_Conversion,
7186 N_Unchecked_Expression,
7187 N_Unchecked_Type_Conversion,
7188
7189 -- N_Has_Etype
7190
7191 N_Subtype_Indication,
7192
7193 -- N_Declaration
7194
7195 N_Component_Declaration,
7196 N_Entry_Declaration,
7197 N_Formal_Object_Declaration,
7198 N_Formal_Type_Declaration,
7199 N_Full_Type_Declaration,
7200 N_Incomplete_Type_Declaration,
7201 N_Loop_Parameter_Specification,
7202 N_Object_Declaration,
7203 N_Protected_Type_Declaration,
7204 N_Private_Extension_Declaration,
7205 N_Private_Type_Declaration,
7206 N_Subtype_Declaration,
7207
7208 -- N_Subprogram_Specification, N_Declaration
7209
7210 N_Function_Specification,
7211 N_Procedure_Specification,
7212
7213 -- N_Access_To_Subprogram_Definition
7214
7215 N_Access_Function_Definition,
7216 N_Access_Procedure_Definition,
7217
7218 -- N_Later_Decl_Item
7219
7220 N_Task_Type_Declaration,
7221
7222 -- N_Body_Stub, N_Later_Decl_Item
7223
7224 N_Package_Body_Stub,
7225 N_Protected_Body_Stub,
7226 N_Subprogram_Body_Stub,
7227 N_Task_Body_Stub,
7228
7229 -- N_Generic_Instantiation, N_Later_Decl_Item
7230 -- N_Subprogram_Instantiation
7231
7232 N_Function_Instantiation,
7233 N_Procedure_Instantiation,
7234
7235 -- N_Generic_Instantiation, N_Later_Decl_Item
7236
7237 N_Package_Instantiation,
7238
7239 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
7240
7241 N_Package_Body,
7242 N_Subprogram_Body,
7243
7244 -- N_Later_Decl_Item, N_Proper_Body
7245
7246 N_Protected_Body,
7247 N_Task_Body,
7248
7249 -- N_Later_Decl_Item
7250
7251 N_Implicit_Label_Declaration,
7252 N_Package_Declaration,
7253 N_Single_Task_Declaration,
7254 N_Subprogram_Declaration,
7255 N_Use_Package_Clause,
7256
7257 -- N_Generic_Declaration, N_Later_Decl_Item
7258
7259 N_Generic_Package_Declaration,
7260 N_Generic_Subprogram_Declaration,
7261
7262 -- N_Array_Type_Definition
7263
7264 N_Constrained_Array_Definition,
7265 N_Unconstrained_Array_Definition,
7266
7267 -- N_Renaming_Declaration
7268
7269 N_Exception_Renaming_Declaration,
7270 N_Object_Renaming_Declaration,
7271 N_Package_Renaming_Declaration,
7272 N_Subprogram_Renaming_Declaration,
7273
7274 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
7275
7276 N_Generic_Function_Renaming_Declaration,
7277 N_Generic_Package_Renaming_Declaration,
7278 N_Generic_Procedure_Renaming_Declaration,
7279
7280 -- N_Statement_Other_Than_Procedure_Call
7281
7282 N_Abort_Statement,
7283 N_Accept_Statement,
7284 N_Assignment_Statement,
7285 N_Asynchronous_Select,
7286 N_Block_Statement,
7287 N_Case_Statement,
7288 N_Code_Statement,
7289 N_Conditional_Entry_Call,
7290
7291 -- N_Statement_Other_Than_Procedure_Call. N_Delay_Statement
7292
7293 N_Delay_Relative_Statement,
7294 N_Delay_Until_Statement,
7295
7296 -- N_Statement_Other_Than_Procedure_Call
7297
7298 N_Entry_Call_Statement,
7299 N_Free_Statement,
7300 N_Goto_Statement,
7301 N_Loop_Statement,
7302 N_Null_Statement,
7303 N_Raise_Statement,
7304 N_Requeue_Statement,
7305 N_Return_Statement, -- renamed as N_Simple_Return_Statement below
7306 N_Extended_Return_Statement,
7307 N_Selective_Accept,
7308 N_Timed_Entry_Call,
7309
7310 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
7311
7312 N_Exit_Statement,
7313 N_If_Statement,
7314
7315 -- N_Has_Condition
7316
7317 N_Accept_Alternative,
7318 N_Delay_Alternative,
7319 N_Elsif_Part,
7320 N_Entry_Body_Formal_Part,
7321 N_Iteration_Scheme,
7322 N_Terminate_Alternative,
7323
7324 -- N_Formal_Subprogram_Declaration
7325
7326 N_Formal_Abstract_Subprogram_Declaration,
7327 N_Formal_Concrete_Subprogram_Declaration,
7328
7329 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
7330
7331 N_Push_Constraint_Error_Label,
7332 N_Push_Program_Error_Label,
7333 N_Push_Storage_Error_Label,
7334
7335 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
7336
7337 N_Pop_Constraint_Error_Label,
7338 N_Pop_Program_Error_Label,
7339 N_Pop_Storage_Error_Label,
7340
7341 -- SCIL nodes
7342
7343 N_SCIL_Dispatch_Table_Object_Init,
7344 N_SCIL_Dispatch_Table_Tag_Init,
7345 N_SCIL_Dispatching_Call,
7346 N_SCIL_Membership_Test,
7347 N_SCIL_Tag_Init,
7348
7349 -- Other nodes (not part of any subtype class)
7350
7351 N_Abortable_Part,
7352 N_Abstract_Subprogram_Declaration,
7353 N_Access_Definition,
7354 N_Access_To_Object_Definition,
7355 N_Case_Statement_Alternative,
7356 N_Compilation_Unit,
7357 N_Compilation_Unit_Aux,
7358 N_Component_Association,
7359 N_Component_Definition,
7360 N_Component_List,
7361 N_Derived_Type_Definition,
7362 N_Decimal_Fixed_Point_Definition,
7363 N_Defining_Program_Unit_Name,
7364 N_Delta_Constraint,
7365 N_Designator,
7366 N_Digits_Constraint,
7367 N_Discriminant_Association,
7368 N_Discriminant_Specification,
7369 N_Enumeration_Type_Definition,
7370 N_Entry_Body,
7371 N_Entry_Call_Alternative,
7372 N_Entry_Index_Specification,
7373 N_Exception_Declaration,
7374 N_Exception_Handler,
7375 N_Floating_Point_Definition,
7376 N_Formal_Decimal_Fixed_Point_Definition,
7377 N_Formal_Derived_Type_Definition,
7378 N_Formal_Discrete_Type_Definition,
7379 N_Formal_Floating_Point_Definition,
7380 N_Formal_Modular_Type_Definition,
7381 N_Formal_Ordinary_Fixed_Point_Definition,
7382 N_Formal_Package_Declaration,
7383 N_Formal_Private_Type_Definition,
7384 N_Formal_Signed_Integer_Type_Definition,
7385 N_Freeze_Entity,
7386 N_Generic_Association,
7387 N_Handled_Sequence_Of_Statements,
7388 N_Index_Or_Discriminant_Constraint,
7389 N_Itype_Reference,
7390 N_Label,
7391 N_Modular_Type_Definition,
7392 N_Number_Declaration,
7393 N_Ordinary_Fixed_Point_Definition,
7394 N_Others_Choice,
7395 N_Package_Specification,
7396 N_Parameter_Association,
7397 N_Parameter_Specification,
7398 N_Pragma,
7399 N_Protected_Definition,
7400 N_Range_Constraint,
7401 N_Real_Range_Specification,
7402 N_Record_Definition,
7403 N_Signed_Integer_Type_Definition,
7404 N_Single_Protected_Declaration,
7405 N_Subunit,
7406 N_Task_Definition,
7407 N_Triggering_Alternative,
7408 N_Use_Type_Clause,
7409 N_Validate_Unchecked_Conversion,
7410 N_Variant,
7411 N_Variant_Part,
7412 N_With_Clause,
7413 N_Unused_At_End);
7414
7415 for Node_Kind'Size use 8;
7416 -- The data structures in Atree assume this!
7417
7418 ----------------------------
7419 -- Node Class Definitions --
7420 ----------------------------
7421
7422 subtype N_Access_To_Subprogram_Definition is Node_Kind range
7423 N_Access_Function_Definition ..
7424 N_Access_Procedure_Definition;
7425
7426 subtype N_Array_Type_Definition is Node_Kind range
7427 N_Constrained_Array_Definition ..
7428 N_Unconstrained_Array_Definition;
7429
7430 subtype N_Binary_Op is Node_Kind range
7431 N_Op_Add ..
7432 N_Op_Shift_Right_Arithmetic;
7433
7434 subtype N_Body_Stub is Node_Kind range
7435 N_Package_Body_Stub ..
7436 N_Task_Body_Stub;
7437
7438 subtype N_Declaration is Node_Kind range
7439 N_Component_Declaration ..
7440 N_Procedure_Specification;
7441 -- Note: this includes all constructs normally thought of as declarations
7442 -- except those which are separately grouped as later declarations.
7443
7444 subtype N_Delay_Statement is Node_Kind range
7445 N_Delay_Relative_Statement ..
7446 N_Delay_Until_Statement;
7447
7448 subtype N_Direct_Name is Node_Kind range
7449 N_Identifier ..
7450 N_Character_Literal;
7451
7452 subtype N_Entity is Node_Kind range
7453 N_Defining_Character_Literal ..
7454 N_Defining_Operator_Symbol;
7455
7456 subtype N_Formal_Subprogram_Declaration is Node_Kind range
7457 N_Formal_Abstract_Subprogram_Declaration ..
7458 N_Formal_Concrete_Subprogram_Declaration;
7459
7460 subtype N_Generic_Declaration is Node_Kind range
7461 N_Generic_Package_Declaration ..
7462 N_Generic_Subprogram_Declaration;
7463
7464 subtype N_Generic_Instantiation is Node_Kind range
7465 N_Function_Instantiation ..
7466 N_Package_Instantiation;
7467
7468 subtype N_Generic_Renaming_Declaration is Node_Kind range
7469 N_Generic_Function_Renaming_Declaration ..
7470 N_Generic_Procedure_Renaming_Declaration;
7471
7472 subtype N_Has_Chars is Node_Kind range
7473 N_Attribute_Definition_Clause ..
7474 N_Op_Plus;
7475
7476 subtype N_Has_Entity is Node_Kind range
7477 N_Expanded_Name ..
7478 N_Attribute_Reference;
7479 -- Nodes that have Entity fields
7480 -- Warning: DOES NOT INCLUDE N_Freeze_Entity!
7481
7482 subtype N_Has_Etype is Node_Kind range
7483 N_Error ..
7484 N_Subtype_Indication;
7485
7486 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
7487 N_Op_Divide ..
7488 N_Op_Rem;
7489
7490 subtype N_Multiplying_Operator is Node_Kind range
7491 N_Op_Divide ..
7492 N_Op_Rem;
7493
7494 subtype N_Later_Decl_Item is Node_Kind range
7495 N_Task_Type_Declaration ..
7496 N_Generic_Subprogram_Declaration;
7497 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
7498 -- only those items which can appear as later declarative items. This also
7499 -- includes N_Implicit_Label_Declaration which is not specifically in the
7500 -- grammar but may appear as a valid later declarative items. It does NOT
7501 -- include N_Pragma which can also appear among later declarative items.
7502 -- It does however include N_Protected_Body, which is a bit peculiar, but
7503 -- harmless since this cannot appear in Ada 83 mode anyway.
7504
7505 subtype N_Membership_Test is Node_Kind range
7506 N_In ..
7507 N_Not_In;
7508
7509 subtype N_Op is Node_Kind range
7510 N_Op_Add ..
7511 N_Op_Plus;
7512
7513 subtype N_Op_Boolean is Node_Kind range
7514 N_Op_And ..
7515 N_Op_Xor;
7516 -- Binary operators which take operands of a boolean type, and yield
7517 -- a result of a boolean type.
7518
7519 subtype N_Op_Compare is Node_Kind range
7520 N_Op_Eq ..
7521 N_Op_Ne;
7522
7523 subtype N_Op_Shift is Node_Kind range
7524 N_Op_Rotate_Left ..
7525 N_Op_Shift_Right_Arithmetic;
7526
7527 subtype N_Proper_Body is Node_Kind range
7528 N_Package_Body ..
7529 N_Task_Body;
7530
7531 subtype N_Push_xxx_Label is Node_Kind range
7532 N_Push_Constraint_Error_Label ..
7533 N_Push_Storage_Error_Label;
7534
7535 subtype N_Pop_xxx_Label is Node_Kind range
7536 N_Pop_Constraint_Error_Label ..
7537 N_Pop_Storage_Error_Label;
7538
7539 subtype N_Push_Pop_xxx_Label is Node_Kind range
7540 N_Push_Constraint_Error_Label ..
7541 N_Pop_Storage_Error_Label;
7542
7543 subtype N_Raise_xxx_Error is Node_Kind range
7544 N_Raise_Constraint_Error ..
7545 N_Raise_Storage_Error;
7546
7547 subtype N_Renaming_Declaration is Node_Kind range
7548 N_Exception_Renaming_Declaration ..
7549 N_Generic_Procedure_Renaming_Declaration;
7550
7551 subtype N_Representation_Clause is Node_Kind range
7552 N_At_Clause ..
7553 N_Attribute_Definition_Clause;
7554
7555 subtype N_Short_Circuit is Node_Kind range
7556 N_And_Then ..
7557 N_Or_Else;
7558
7559 subtype N_SCIL_Node is Node_Kind range
7560 N_SCIL_Dispatch_Table_Object_Init ..
7561 N_SCIL_Tag_Init;
7562
7563 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
7564 N_Abort_Statement ..
7565 N_If_Statement;
7566 -- Note that this includes all statement types except for the cases of the
7567 -- N_Procedure_Call_Statement which is considered to be a subexpression
7568 -- (since overloading is possible, so it needs to go through the normal
7569 -- overloading resolution for expressions).
7570
7571 subtype N_Subprogram_Instantiation is Node_Kind range
7572 N_Function_Instantiation ..
7573 N_Procedure_Instantiation;
7574
7575 subtype N_Has_Condition is Node_Kind range
7576 N_Exit_Statement ..
7577 N_Terminate_Alternative;
7578 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
7579
7580 subtype N_Subexpr is Node_Kind range
7581 N_Expanded_Name ..
7582 N_Unchecked_Type_Conversion;
7583 -- Nodes with expression fields
7584
7585 subtype N_Subprogram_Specification is Node_Kind range
7586 N_Function_Specification ..
7587 N_Procedure_Specification;
7588
7589 subtype N_Unary_Op is Node_Kind range
7590 N_Op_Abs ..
7591 N_Op_Plus;
7592
7593 subtype N_Unit_Body is Node_Kind range
7594 N_Package_Body ..
7595 N_Subprogram_Body;
7596
7597 ---------------------------
7598 -- Node Access Functions --
7599 ---------------------------
7600
7601 -- The following functions return the contents of the indicated field of
7602 -- the node referenced by the argument, which is a Node_Id. They provide
7603 -- logical access to fields in the node which could be accessed using the
7604 -- Atree.Unchecked_Access package, but the idea is always to use these
7605 -- higher level routines which preserve strong typing. In debug mode,
7606 -- these routines check that they are being applied to an appropriate
7607 -- node, as well as checking that the node is in range.
7608
7609 function ABE_Is_Certain
7610 (N : Node_Id) return Boolean; -- Flag18
7611
7612 function Abort_Present
7613 (N : Node_Id) return Boolean; -- Flag15
7614
7615 function Abortable_Part
7616 (N : Node_Id) return Node_Id; -- Node2
7617
7618 function Abstract_Present
7619 (N : Node_Id) return Boolean; -- Flag4
7620
7621 function Accept_Handler_Records
7622 (N : Node_Id) return List_Id; -- List5
7623
7624 function Accept_Statement
7625 (N : Node_Id) return Node_Id; -- Node2
7626
7627 function Access_Definition
7628 (N : Node_Id) return Node_Id; -- Node3
7629
7630 function Access_To_Subprogram_Definition
7631 (N : Node_Id) return Node_Id; -- Node3
7632
7633 function Access_Types_To_Process
7634 (N : Node_Id) return Elist_Id; -- Elist2
7635
7636 function Actions
7637 (N : Node_Id) return List_Id; -- List1
7638
7639 function Activation_Chain_Entity
7640 (N : Node_Id) return Node_Id; -- Node3
7641
7642 function Acts_As_Spec
7643 (N : Node_Id) return Boolean; -- Flag4
7644
7645 function Actual_Designated_Subtype
7646 (N : Node_Id) return Node_Id; -- Node4
7647
7648 function Address_Warning_Posted
7649 (N : Node_Id) return Boolean; -- Flag18
7650
7651 function Aggregate_Bounds
7652 (N : Node_Id) return Node_Id; -- Node3
7653
7654 function Aliased_Present
7655 (N : Node_Id) return Boolean; -- Flag4
7656
7657 function All_Others
7658 (N : Node_Id) return Boolean; -- Flag11
7659
7660 function All_Present
7661 (N : Node_Id) return Boolean; -- Flag15
7662
7663 function Alternatives
7664 (N : Node_Id) return List_Id; -- List4
7665
7666 function Ancestor_Part
7667 (N : Node_Id) return Node_Id; -- Node3
7668
7669 function Array_Aggregate
7670 (N : Node_Id) return Node_Id; -- Node3
7671
7672 function Assignment_OK
7673 (N : Node_Id) return Boolean; -- Flag15
7674
7675 function Associated_Node
7676 (N : Node_Id) return Node_Id; -- Node4
7677
7678 function At_End_Proc
7679 (N : Node_Id) return Node_Id; -- Node1
7680
7681 function Attribute_Name
7682 (N : Node_Id) return Name_Id; -- Name2
7683
7684 function Aux_Decls_Node
7685 (N : Node_Id) return Node_Id; -- Node5
7686
7687 function Backwards_OK
7688 (N : Node_Id) return Boolean; -- Flag6
7689
7690 function Bad_Is_Detected
7691 (N : Node_Id) return Boolean; -- Flag15
7692
7693 function By_Ref
7694 (N : Node_Id) return Boolean; -- Flag5
7695
7696 function Body_Required
7697 (N : Node_Id) return Boolean; -- Flag13
7698
7699 function Body_To_Inline
7700 (N : Node_Id) return Node_Id; -- Node3
7701
7702 function Box_Present
7703 (N : Node_Id) return Boolean; -- Flag15
7704
7705 function Char_Literal_Value
7706 (N : Node_Id) return Uint; -- Uint2
7707
7708 function Chars
7709 (N : Node_Id) return Name_Id; -- Name1
7710
7711 function Check_Address_Alignment
7712 (N : Node_Id) return Boolean; -- Flag11
7713
7714 function Choice_Parameter
7715 (N : Node_Id) return Node_Id; -- Node2
7716
7717 function Choices
7718 (N : Node_Id) return List_Id; -- List1
7719
7720 function Coextensions
7721 (N : Node_Id) return Elist_Id; -- Elist4
7722
7723 function Comes_From_Extended_Return_Statement
7724 (N : Node_Id) return Boolean; -- Flag18
7725
7726 function Compile_Time_Known_Aggregate
7727 (N : Node_Id) return Boolean; -- Flag18
7728
7729 function Component_Associations
7730 (N : Node_Id) return List_Id; -- List2
7731
7732 function Component_Clauses
7733 (N : Node_Id) return List_Id; -- List3
7734
7735 function Component_Definition
7736 (N : Node_Id) return Node_Id; -- Node4
7737
7738 function Component_Items
7739 (N : Node_Id) return List_Id; -- List3
7740
7741 function Component_List
7742 (N : Node_Id) return Node_Id; -- Node1
7743
7744 function Component_Name
7745 (N : Node_Id) return Node_Id; -- Node1
7746
7747 function Componentwise_Assignment
7748 (N : Node_Id) return Boolean; -- Flag14
7749
7750 function Condition
7751 (N : Node_Id) return Node_Id; -- Node1
7752
7753 function Condition_Actions
7754 (N : Node_Id) return List_Id; -- List3
7755
7756 function Config_Pragmas
7757 (N : Node_Id) return List_Id; -- List4
7758
7759 function Constant_Present
7760 (N : Node_Id) return Boolean; -- Flag17
7761
7762 function Constraint
7763 (N : Node_Id) return Node_Id; -- Node3
7764
7765 function Constraints
7766 (N : Node_Id) return List_Id; -- List1
7767
7768 function Context_Installed
7769 (N : Node_Id) return Boolean; -- Flag13
7770
7771 function Context_Pending
7772 (N : Node_Id) return Boolean; -- Flag16
7773
7774 function Context_Items
7775 (N : Node_Id) return List_Id; -- List1
7776
7777 function Controlling_Argument
7778 (N : Node_Id) return Node_Id; -- Node1
7779
7780 function Conversion_OK
7781 (N : Node_Id) return Boolean; -- Flag14
7782
7783 function Corresponding_Body
7784 (N : Node_Id) return Node_Id; -- Node5
7785
7786 function Corresponding_Formal_Spec
7787 (N : Node_Id) return Node_Id; -- Node3
7788
7789 function Corresponding_Generic_Association
7790 (N : Node_Id) return Node_Id; -- Node5
7791
7792 function Corresponding_Integer_Value
7793 (N : Node_Id) return Uint; -- Uint4
7794
7795 function Corresponding_Spec
7796 (N : Node_Id) return Node_Id; -- Node5
7797
7798 function Corresponding_Stub
7799 (N : Node_Id) return Node_Id; -- Node3
7800
7801 function Dcheck_Function
7802 (N : Node_Id) return Entity_Id; -- Node5
7803
7804 function Debug_Statement
7805 (N : Node_Id) return Node_Id; -- Node3
7806
7807 function Declarations
7808 (N : Node_Id) return List_Id; -- List2
7809
7810 function Default_Expression
7811 (N : Node_Id) return Node_Id; -- Node5
7812
7813 function Default_Name
7814 (N : Node_Id) return Node_Id; -- Node2
7815
7816 function Defining_Identifier
7817 (N : Node_Id) return Entity_Id; -- Node1
7818
7819 function Defining_Unit_Name
7820 (N : Node_Id) return Node_Id; -- Node1
7821
7822 function Delay_Alternative
7823 (N : Node_Id) return Node_Id; -- Node4
7824
7825 function Delay_Statement
7826 (N : Node_Id) return Node_Id; -- Node2
7827
7828 function Delta_Expression
7829 (N : Node_Id) return Node_Id; -- Node3
7830
7831 function Digits_Expression
7832 (N : Node_Id) return Node_Id; -- Node2
7833
7834 function Discr_Check_Funcs_Built
7835 (N : Node_Id) return Boolean; -- Flag11
7836
7837 function Discrete_Choices
7838 (N : Node_Id) return List_Id; -- List4
7839
7840 function Discrete_Range
7841 (N : Node_Id) return Node_Id; -- Node4
7842
7843 function Discrete_Subtype_Definition
7844 (N : Node_Id) return Node_Id; -- Node4
7845
7846 function Discrete_Subtype_Definitions
7847 (N : Node_Id) return List_Id; -- List2
7848
7849 function Discriminant_Specifications
7850 (N : Node_Id) return List_Id; -- List4
7851
7852 function Discriminant_Type
7853 (N : Node_Id) return Node_Id; -- Node5
7854
7855 function Do_Accessibility_Check
7856 (N : Node_Id) return Boolean; -- Flag13
7857
7858 function Do_Discriminant_Check
7859 (N : Node_Id) return Boolean; -- Flag13
7860
7861 function Do_Division_Check
7862 (N : Node_Id) return Boolean; -- Flag13
7863
7864 function Do_Length_Check
7865 (N : Node_Id) return Boolean; -- Flag4
7866
7867 function Do_Overflow_Check
7868 (N : Node_Id) return Boolean; -- Flag17
7869
7870 function Do_Range_Check
7871 (N : Node_Id) return Boolean; -- Flag9
7872
7873 function Do_Storage_Check
7874 (N : Node_Id) return Boolean; -- Flag17
7875
7876 function Do_Tag_Check
7877 (N : Node_Id) return Boolean; -- Flag13
7878
7879 function Elaborate_All_Desirable
7880 (N : Node_Id) return Boolean; -- Flag9
7881
7882 function Elaborate_All_Present
7883 (N : Node_Id) return Boolean; -- Flag14
7884
7885 function Elaborate_Desirable
7886 (N : Node_Id) return Boolean; -- Flag11
7887
7888 function Elaborate_Present
7889 (N : Node_Id) return Boolean; -- Flag4
7890
7891 function Elaboration_Boolean
7892 (N : Node_Id) return Node_Id; -- Node2
7893
7894 function Else_Actions
7895 (N : Node_Id) return List_Id; -- List3
7896
7897 function Else_Statements
7898 (N : Node_Id) return List_Id; -- List4
7899
7900 function Elsif_Parts
7901 (N : Node_Id) return List_Id; -- List3
7902
7903 function Enclosing_Variant
7904 (N : Node_Id) return Node_Id; -- Node2
7905
7906 function End_Label
7907 (N : Node_Id) return Node_Id; -- Node4
7908
7909 function End_Span
7910 (N : Node_Id) return Uint; -- Uint5
7911
7912 function Entity
7913 (N : Node_Id) return Node_Id; -- Node4
7914
7915 function Entity_Or_Associated_Node
7916 (N : Node_Id) return Node_Id; -- Node4
7917
7918 function Entry_Body_Formal_Part
7919 (N : Node_Id) return Node_Id; -- Node5
7920
7921 function Entry_Call_Alternative
7922 (N : Node_Id) return Node_Id; -- Node1
7923
7924 function Entry_Call_Statement
7925 (N : Node_Id) return Node_Id; -- Node1
7926
7927 function Entry_Direct_Name
7928 (N : Node_Id) return Node_Id; -- Node1
7929
7930 function Entry_Index
7931 (N : Node_Id) return Node_Id; -- Node5
7932
7933 function Entry_Index_Specification
7934 (N : Node_Id) return Node_Id; -- Node4
7935
7936 function Etype
7937 (N : Node_Id) return Node_Id; -- Node5
7938
7939 function Exception_Choices
7940 (N : Node_Id) return List_Id; -- List4
7941
7942 function Exception_Handlers
7943 (N : Node_Id) return List_Id; -- List5
7944
7945 function Exception_Junk
7946 (N : Node_Id) return Boolean; -- Flag8
7947
7948 function Exception_Label
7949 (N : Node_Id) return Node_Id; -- Node5
7950
7951 function Explicit_Actual_Parameter
7952 (N : Node_Id) return Node_Id; -- Node3
7953
7954 function Expansion_Delayed
7955 (N : Node_Id) return Boolean; -- Flag11
7956
7957 function Explicit_Generic_Actual_Parameter
7958 (N : Node_Id) return Node_Id; -- Node1
7959
7960 function Expression
7961 (N : Node_Id) return Node_Id; -- Node3
7962
7963 function Expressions
7964 (N : Node_Id) return List_Id; -- List1
7965
7966 function First_Bit
7967 (N : Node_Id) return Node_Id; -- Node3
7968
7969 function First_Inlined_Subprogram
7970 (N : Node_Id) return Entity_Id; -- Node3
7971
7972 function First_Name
7973 (N : Node_Id) return Boolean; -- Flag5
7974
7975 function First_Named_Actual
7976 (N : Node_Id) return Node_Id; -- Node4
7977
7978 function First_Real_Statement
7979 (N : Node_Id) return Node_Id; -- Node2
7980
7981 function First_Subtype_Link
7982 (N : Node_Id) return Entity_Id; -- Node5
7983
7984 function Float_Truncate
7985 (N : Node_Id) return Boolean; -- Flag11
7986
7987 function Formal_Type_Definition
7988 (N : Node_Id) return Node_Id; -- Node3
7989
7990 function Forwards_OK
7991 (N : Node_Id) return Boolean; -- Flag5
7992
7993 function From_At_End
7994 (N : Node_Id) return Boolean; -- Flag4
7995
7996 function From_At_Mod
7997 (N : Node_Id) return Boolean; -- Flag4
7998
7999 function From_Default
8000 (N : Node_Id) return Boolean; -- Flag6
8001
8002 function Generic_Associations
8003 (N : Node_Id) return List_Id; -- List3
8004
8005 function Generic_Formal_Declarations
8006 (N : Node_Id) return List_Id; -- List2
8007
8008 function Generic_Parent
8009 (N : Node_Id) return Node_Id; -- Node5
8010
8011 function Generic_Parent_Type
8012 (N : Node_Id) return Node_Id; -- Node4
8013
8014 function Handled_Statement_Sequence
8015 (N : Node_Id) return Node_Id; -- Node4
8016
8017 function Handler_List_Entry
8018 (N : Node_Id) return Node_Id; -- Node2
8019
8020 function Has_Created_Identifier
8021 (N : Node_Id) return Boolean; -- Flag15
8022
8023 function Has_Dynamic_Length_Check
8024 (N : Node_Id) return Boolean; -- Flag10
8025
8026 function Has_Dynamic_Range_Check
8027 (N : Node_Id) return Boolean; -- Flag12
8028
8029 function Has_Init_Expression
8030 (N : Node_Id) return Boolean; -- Flag14
8031
8032 function Has_Local_Raise
8033 (N : Node_Id) return Boolean; -- Flag8
8034
8035 function Has_No_Elaboration_Code
8036 (N : Node_Id) return Boolean; -- Flag17
8037
8038 function Has_Priority_Pragma
8039 (N : Node_Id) return Boolean; -- Flag6
8040
8041 function Has_Private_View
8042 (N : Node_Id) return Boolean; -- Flag11
8043
8044 function Has_Relative_Deadline_Pragma
8045 (N : Node_Id) return Boolean; -- Flag9
8046
8047 function Has_Self_Reference
8048 (N : Node_Id) return Boolean; -- Flag13
8049
8050 function Has_Storage_Size_Pragma
8051 (N : Node_Id) return Boolean; -- Flag5
8052
8053 function Has_Task_Info_Pragma
8054 (N : Node_Id) return Boolean; -- Flag7
8055
8056 function Has_Task_Name_Pragma
8057 (N : Node_Id) return Boolean; -- Flag8
8058
8059 function Has_Wide_Character
8060 (N : Node_Id) return Boolean; -- Flag11
8061
8062 function Hidden_By_Use_Clause
8063 (N : Node_Id) return Elist_Id; -- Elist4
8064
8065 function High_Bound
8066 (N : Node_Id) return Node_Id; -- Node2
8067
8068 function Identifier
8069 (N : Node_Id) return Node_Id; -- Node1
8070
8071 function Interface_List
8072 (N : Node_Id) return List_Id; -- List2
8073
8074 function Interface_Present
8075 (N : Node_Id) return Boolean; -- Flag16
8076
8077 function Implicit_With
8078 (N : Node_Id) return Boolean; -- Flag16
8079
8080 function In_Present
8081 (N : Node_Id) return Boolean; -- Flag15
8082
8083 function Includes_Infinities
8084 (N : Node_Id) return Boolean; -- Flag11
8085
8086 function Instance_Spec
8087 (N : Node_Id) return Node_Id; -- Node5
8088
8089 function Intval
8090 (N : Node_Id) return Uint; -- Uint3
8091
8092 function Is_Accessibility_Actual
8093 (N : Node_Id) return Boolean; -- Flag13
8094
8095 function Is_Asynchronous_Call_Block
8096 (N : Node_Id) return Boolean; -- Flag7
8097
8098 function Is_Component_Left_Opnd
8099 (N : Node_Id) return Boolean; -- Flag13
8100
8101 function Is_Component_Right_Opnd
8102 (N : Node_Id) return Boolean; -- Flag14
8103
8104 function Is_Controlling_Actual
8105 (N : Node_Id) return Boolean; -- Flag16
8106
8107 function Is_Dynamic_Coextension
8108 (N : Node_Id) return Boolean; -- Flag18
8109
8110 function Is_Elsif
8111 (N : Node_Id) return Boolean; -- Flag13
8112
8113 function Is_Entry_Barrier_Function
8114 (N : Node_Id) return Boolean; -- Flag8
8115
8116 function Is_Expanded_Build_In_Place_Call
8117 (N : Node_Id) return Boolean; -- Flag11
8118
8119 function Is_Folded_In_Parser
8120 (N : Node_Id) return Boolean; -- Flag4
8121
8122 function Is_In_Discriminant_Check
8123 (N : Node_Id) return Boolean; -- Flag11
8124
8125 function Is_Machine_Number
8126 (N : Node_Id) return Boolean; -- Flag11
8127
8128 function Is_Null_Loop
8129 (N : Node_Id) return Boolean; -- Flag16
8130
8131 function Is_Overloaded
8132 (N : Node_Id) return Boolean; -- Flag5
8133
8134 function Is_Power_Of_2_For_Shift
8135 (N : Node_Id) return Boolean; -- Flag13
8136
8137 function Is_Protected_Subprogram_Body
8138 (N : Node_Id) return Boolean; -- Flag7
8139
8140 function Is_Static_Coextension
8141 (N : Node_Id) return Boolean; -- Flag14
8142
8143 function Is_Static_Expression
8144 (N : Node_Id) return Boolean; -- Flag6
8145
8146 function Is_Subprogram_Descriptor
8147 (N : Node_Id) return Boolean; -- Flag16
8148
8149 function Is_Task_Allocation_Block
8150 (N : Node_Id) return Boolean; -- Flag6
8151
8152 function Is_Task_Master
8153 (N : Node_Id) return Boolean; -- Flag5
8154
8155 function Iteration_Scheme
8156 (N : Node_Id) return Node_Id; -- Node2
8157
8158 function Itype
8159 (N : Node_Id) return Entity_Id; -- Node1
8160
8161 function Kill_Range_Check
8162 (N : Node_Id) return Boolean; -- Flag11
8163
8164 function Label_Construct
8165 (N : Node_Id) return Node_Id; -- Node2
8166
8167 function Left_Opnd
8168 (N : Node_Id) return Node_Id; -- Node2
8169
8170 function Last_Bit
8171 (N : Node_Id) return Node_Id; -- Node4
8172
8173 function Last_Name
8174 (N : Node_Id) return Boolean; -- Flag6
8175
8176 function Library_Unit
8177 (N : Node_Id) return Node_Id; -- Node4
8178
8179 function Limited_View_Installed
8180 (N : Node_Id) return Boolean; -- Flag18
8181
8182 function Limited_Present
8183 (N : Node_Id) return Boolean; -- Flag17
8184
8185 function Literals
8186 (N : Node_Id) return List_Id; -- List1
8187
8188 function Local_Raise_Not_OK
8189 (N : Node_Id) return Boolean; -- Flag7
8190
8191 function Local_Raise_Statements
8192 (N : Node_Id) return Elist_Id; -- Elist1
8193
8194 function Loop_Actions
8195 (N : Node_Id) return List_Id; -- List2
8196
8197 function Loop_Parameter_Specification
8198 (N : Node_Id) return Node_Id; -- Node4
8199
8200 function Low_Bound
8201 (N : Node_Id) return Node_Id; -- Node1
8202
8203 function Mod_Clause
8204 (N : Node_Id) return Node_Id; -- Node2
8205
8206 function More_Ids
8207 (N : Node_Id) return Boolean; -- Flag5
8208
8209 function Must_Be_Byte_Aligned
8210 (N : Node_Id) return Boolean; -- Flag14
8211
8212 function Must_Not_Freeze
8213 (N : Node_Id) return Boolean; -- Flag8
8214
8215 function Must_Not_Override
8216 (N : Node_Id) return Boolean; -- Flag15
8217
8218 function Must_Override
8219 (N : Node_Id) return Boolean; -- Flag14
8220
8221 function Name
8222 (N : Node_Id) return Node_Id; -- Node2
8223
8224 function Names
8225 (N : Node_Id) return List_Id; -- List2
8226
8227 function Next_Entity
8228 (N : Node_Id) return Node_Id; -- Node2
8229
8230 function Next_Implicit_With
8231 (N : Node_Id) return Node_Id; -- Node3
8232
8233 function Next_Named_Actual
8234 (N : Node_Id) return Node_Id; -- Node4
8235
8236 function Next_Pragma
8237 (N : Node_Id) return Node_Id; -- Node1
8238
8239 function Next_Rep_Item
8240 (N : Node_Id) return Node_Id; -- Node5
8241
8242 function Next_Use_Clause
8243 (N : Node_Id) return Node_Id; -- Node3
8244
8245 function No_Ctrl_Actions
8246 (N : Node_Id) return Boolean; -- Flag7
8247
8248 function No_Elaboration_Check
8249 (N : Node_Id) return Boolean; -- Flag14
8250
8251 function No_Entities_Ref_In_Spec
8252 (N : Node_Id) return Boolean; -- Flag8
8253
8254 function No_Initialization
8255 (N : Node_Id) return Boolean; -- Flag13
8256
8257 function No_Truncation
8258 (N : Node_Id) return Boolean; -- Flag17
8259
8260 function Null_Present
8261 (N : Node_Id) return Boolean; -- Flag13
8262
8263 function Null_Exclusion_Present
8264 (N : Node_Id) return Boolean; -- Flag11
8265
8266 function Null_Exclusion_In_Return_Present
8267 (N : Node_Id) return Boolean; -- Flag14
8268
8269 function Null_Record_Present
8270 (N : Node_Id) return Boolean; -- Flag17
8271
8272 function Object_Definition
8273 (N : Node_Id) return Node_Id; -- Node4
8274
8275 function Original_Discriminant
8276 (N : Node_Id) return Node_Id; -- Node2
8277
8278 function Original_Entity
8279 (N : Node_Id) return Entity_Id; -- Node2
8280
8281 function Others_Discrete_Choices
8282 (N : Node_Id) return List_Id; -- List1
8283
8284 function Out_Present
8285 (N : Node_Id) return Boolean; -- Flag17
8286
8287 function Parameter_Associations
8288 (N : Node_Id) return List_Id; -- List3
8289
8290 function Parameter_List_Truncated
8291 (N : Node_Id) return Boolean; -- Flag17
8292
8293 function Parameter_Specifications
8294 (N : Node_Id) return List_Id; -- List3
8295
8296 function Parameter_Type
8297 (N : Node_Id) return Node_Id; -- Node2
8298
8299 function Parent_Spec
8300 (N : Node_Id) return Node_Id; -- Node4
8301
8302 function PPC_Enabled
8303 (N : Node_Id) return Boolean; -- Flag5
8304
8305 function Position
8306 (N : Node_Id) return Node_Id; -- Node2
8307
8308 function Pragma_Argument_Associations
8309 (N : Node_Id) return List_Id; -- List2
8310
8311 function Pragma_Identifier
8312 (N : Node_Id) return Node_Id; -- Node4
8313
8314 function Pragmas_After
8315 (N : Node_Id) return List_Id; -- List5
8316
8317 function Pragmas_Before
8318 (N : Node_Id) return List_Id; -- List4
8319
8320 function Prefix
8321 (N : Node_Id) return Node_Id; -- Node3
8322
8323 function Present_Expr
8324 (N : Node_Id) return Uint; -- Uint3
8325
8326 function Prev_Ids
8327 (N : Node_Id) return Boolean; -- Flag6
8328
8329 function Print_In_Hex
8330 (N : Node_Id) return Boolean; -- Flag13
8331
8332 function Private_Declarations
8333 (N : Node_Id) return List_Id; -- List3
8334
8335 function Private_Present
8336 (N : Node_Id) return Boolean; -- Flag15
8337
8338 function Procedure_To_Call
8339 (N : Node_Id) return Node_Id; -- Node2
8340
8341 function Proper_Body
8342 (N : Node_Id) return Node_Id; -- Node1
8343
8344 function Protected_Definition
8345 (N : Node_Id) return Node_Id; -- Node3
8346
8347 function Protected_Present
8348 (N : Node_Id) return Boolean; -- Flag6
8349
8350 function Raises_Constraint_Error
8351 (N : Node_Id) return Boolean; -- Flag7
8352
8353 function Range_Constraint
8354 (N : Node_Id) return Node_Id; -- Node4
8355
8356 function Range_Expression
8357 (N : Node_Id) return Node_Id; -- Node4
8358
8359 function Real_Range_Specification
8360 (N : Node_Id) return Node_Id; -- Node4
8361
8362 function Realval
8363 (N : Node_Id) return Ureal; -- Ureal3
8364
8365 function Reason
8366 (N : Node_Id) return Uint; -- Uint3
8367
8368 function Record_Extension_Part
8369 (N : Node_Id) return Node_Id; -- Node3
8370
8371 function Redundant_Use
8372 (N : Node_Id) return Boolean; -- Flag13
8373
8374 function Renaming_Exception
8375 (N : Node_Id) return Node_Id; -- Node2
8376
8377 function Result_Definition
8378 (N : Node_Id) return Node_Id; -- Node4
8379
8380 function Return_Object_Declarations
8381 (N : Node_Id) return List_Id; -- List3
8382
8383 function Return_Statement_Entity
8384 (N : Node_Id) return Node_Id; -- Node5
8385
8386 function Reverse_Present
8387 (N : Node_Id) return Boolean; -- Flag15
8388
8389 function Right_Opnd
8390 (N : Node_Id) return Node_Id; -- Node3
8391
8392 function Rounded_Result
8393 (N : Node_Id) return Boolean; -- Flag18
8394
8395 function SCIL_Controlling_Tag
8396 (N : Node_Id) return Node_Id; -- Node5
8397
8398 function SCIL_Entity
8399 (N : Node_Id) return Node_Id; -- Node4
8400
8401 function SCIL_Related_Node
8402 (N : Node_Id) return Node_Id; -- Node1
8403
8404 function SCIL_Tag_Value
8405 (N : Node_Id) return Node_Id; -- Node5
8406
8407 function SCIL_Target_Prim
8408 (N : Node_Id) return Node_Id; -- Node2
8409
8410 function Scope
8411 (N : Node_Id) return Node_Id; -- Node3
8412
8413 function Select_Alternatives
8414 (N : Node_Id) return List_Id; -- List1
8415
8416 function Selector_Name
8417 (N : Node_Id) return Node_Id; -- Node2
8418
8419 function Selector_Names
8420 (N : Node_Id) return List_Id; -- List1
8421
8422 function Shift_Count_OK
8423 (N : Node_Id) return Boolean; -- Flag4
8424
8425 function Source_Type
8426 (N : Node_Id) return Entity_Id; -- Node1
8427
8428 function Specification
8429 (N : Node_Id) return Node_Id; -- Node1
8430
8431 function Statements
8432 (N : Node_Id) return List_Id; -- List3
8433
8434 function Static_Processing_OK
8435 (N : Node_Id) return Boolean; -- Flag4
8436
8437 function Storage_Pool
8438 (N : Node_Id) return Node_Id; -- Node1
8439
8440 function Strval
8441 (N : Node_Id) return String_Id; -- Str3
8442
8443 function Subtype_Indication
8444 (N : Node_Id) return Node_Id; -- Node5
8445
8446 function Subtype_Mark
8447 (N : Node_Id) return Node_Id; -- Node4
8448
8449 function Subtype_Marks
8450 (N : Node_Id) return List_Id; -- List2
8451
8452 function Suppress_Loop_Warnings
8453 (N : Node_Id) return Boolean; -- Flag17
8454
8455 function Synchronized_Present
8456 (N : Node_Id) return Boolean; -- Flag7
8457
8458 function Tagged_Present
8459 (N : Node_Id) return Boolean; -- Flag15
8460
8461 function Target_Type
8462 (N : Node_Id) return Entity_Id; -- Node2
8463
8464 function Task_Definition
8465 (N : Node_Id) return Node_Id; -- Node3
8466
8467 function Task_Present
8468 (N : Node_Id) return Boolean; -- Flag5
8469
8470 function Then_Actions
8471 (N : Node_Id) return List_Id; -- List2
8472
8473 function Then_Statements
8474 (N : Node_Id) return List_Id; -- List2
8475
8476 function Treat_Fixed_As_Integer
8477 (N : Node_Id) return Boolean; -- Flag14
8478
8479 function Triggering_Alternative
8480 (N : Node_Id) return Node_Id; -- Node1
8481
8482 function Triggering_Statement
8483 (N : Node_Id) return Node_Id; -- Node1
8484
8485 function TSS_Elist
8486 (N : Node_Id) return Elist_Id; -- Elist3
8487
8488 function Type_Definition
8489 (N : Node_Id) return Node_Id; -- Node3
8490
8491 function Unit
8492 (N : Node_Id) return Node_Id; -- Node2
8493
8494 function Unknown_Discriminants_Present
8495 (N : Node_Id) return Boolean; -- Flag13
8496
8497 function Unreferenced_In_Spec
8498 (N : Node_Id) return Boolean; -- Flag7
8499
8500 function Variant_Part
8501 (N : Node_Id) return Node_Id; -- Node4
8502
8503 function Variants
8504 (N : Node_Id) return List_Id; -- List1
8505
8506 function Visible_Declarations
8507 (N : Node_Id) return List_Id; -- List2
8508
8509 function Was_Originally_Stub
8510 (N : Node_Id) return Boolean; -- Flag13
8511
8512 function Zero_Cost_Handling
8513 (N : Node_Id) return Boolean; -- Flag5
8514
8515 -- End functions (note used by xsinfo utility program to end processing)
8516
8517 ----------------------------
8518 -- Node Update Procedures --
8519 ----------------------------
8520
8521 -- These are the corresponding node update routines, which again provide
8522 -- a high level logical access with type checking. In addition to setting
8523 -- the indicated field of the node N to the given Val, in the case of
8524 -- tree pointers (List1-4), the parent pointer of the Val node is set to
8525 -- point back to node N. This automates the setting of the parent pointer.
8526
8527 procedure Set_ABE_Is_Certain
8528 (N : Node_Id; Val : Boolean := True); -- Flag18
8529
8530 procedure Set_Abort_Present
8531 (N : Node_Id; Val : Boolean := True); -- Flag15
8532
8533 procedure Set_Abortable_Part
8534 (N : Node_Id; Val : Node_Id); -- Node2
8535
8536 procedure Set_Abstract_Present
8537 (N : Node_Id; Val : Boolean := True); -- Flag4
8538
8539 procedure Set_Accept_Handler_Records
8540 (N : Node_Id; Val : List_Id); -- List5
8541
8542 procedure Set_Accept_Statement
8543 (N : Node_Id; Val : Node_Id); -- Node2
8544
8545 procedure Set_Access_Definition
8546 (N : Node_Id; Val : Node_Id); -- Node3
8547
8548 procedure Set_Access_To_Subprogram_Definition
8549 (N : Node_Id; Val : Node_Id); -- Node3
8550
8551 procedure Set_Access_Types_To_Process
8552 (N : Node_Id; Val : Elist_Id); -- Elist2
8553
8554 procedure Set_Actions
8555 (N : Node_Id; Val : List_Id); -- List1
8556
8557 procedure Set_Activation_Chain_Entity
8558 (N : Node_Id; Val : Node_Id); -- Node3
8559
8560 procedure Set_Acts_As_Spec
8561 (N : Node_Id; Val : Boolean := True); -- Flag4
8562
8563 procedure Set_Actual_Designated_Subtype
8564 (N : Node_Id; Val : Node_Id); -- Node4
8565
8566 procedure Set_Address_Warning_Posted
8567 (N : Node_Id; Val : Boolean := True); -- Flag18
8568
8569 procedure Set_Aggregate_Bounds
8570 (N : Node_Id; Val : Node_Id); -- Node3
8571
8572 procedure Set_Aliased_Present
8573 (N : Node_Id; Val : Boolean := True); -- Flag4
8574
8575 procedure Set_All_Others
8576 (N : Node_Id; Val : Boolean := True); -- Flag11
8577
8578 procedure Set_All_Present
8579 (N : Node_Id; Val : Boolean := True); -- Flag15
8580
8581 procedure Set_Alternatives
8582 (N : Node_Id; Val : List_Id); -- List4
8583
8584 procedure Set_Ancestor_Part
8585 (N : Node_Id; Val : Node_Id); -- Node3
8586
8587 procedure Set_Array_Aggregate
8588 (N : Node_Id; Val : Node_Id); -- Node3
8589
8590 procedure Set_Assignment_OK
8591 (N : Node_Id; Val : Boolean := True); -- Flag15
8592
8593 procedure Set_Associated_Node
8594 (N : Node_Id; Val : Node_Id); -- Node4
8595
8596 procedure Set_Attribute_Name
8597 (N : Node_Id; Val : Name_Id); -- Name2
8598
8599 procedure Set_At_End_Proc
8600 (N : Node_Id; Val : Node_Id); -- Node1
8601
8602 procedure Set_Aux_Decls_Node
8603 (N : Node_Id; Val : Node_Id); -- Node5
8604
8605 procedure Set_Backwards_OK
8606 (N : Node_Id; Val : Boolean := True); -- Flag6
8607
8608 procedure Set_Bad_Is_Detected
8609 (N : Node_Id; Val : Boolean := True); -- Flag15
8610
8611 procedure Set_Body_Required
8612 (N : Node_Id; Val : Boolean := True); -- Flag13
8613
8614 procedure Set_Body_To_Inline
8615 (N : Node_Id; Val : Node_Id); -- Node3
8616
8617 procedure Set_Box_Present
8618 (N : Node_Id; Val : Boolean := True); -- Flag15
8619
8620 procedure Set_By_Ref
8621 (N : Node_Id; Val : Boolean := True); -- Flag5
8622
8623 procedure Set_Char_Literal_Value
8624 (N : Node_Id; Val : Uint); -- Uint2
8625
8626 procedure Set_Chars
8627 (N : Node_Id; Val : Name_Id); -- Name1
8628
8629 procedure Set_Check_Address_Alignment
8630 (N : Node_Id; Val : Boolean := True); -- Flag11
8631
8632 procedure Set_Choice_Parameter
8633 (N : Node_Id; Val : Node_Id); -- Node2
8634
8635 procedure Set_Coextensions
8636 (N : Node_Id; Val : Elist_Id); -- Elist4
8637
8638 procedure Set_Choices
8639 (N : Node_Id; Val : List_Id); -- List1
8640
8641 procedure Set_Comes_From_Extended_Return_Statement
8642 (N : Node_Id; Val : Boolean := True); -- Flag18
8643
8644 procedure Set_Compile_Time_Known_Aggregate
8645 (N : Node_Id; Val : Boolean := True); -- Flag18
8646
8647 procedure Set_Component_Associations
8648 (N : Node_Id; Val : List_Id); -- List2
8649
8650 procedure Set_Component_Clauses
8651 (N : Node_Id; Val : List_Id); -- List3
8652
8653 procedure Set_Component_Definition
8654 (N : Node_Id; Val : Node_Id); -- Node4
8655
8656 procedure Set_Component_Items
8657 (N : Node_Id; Val : List_Id); -- List3
8658
8659 procedure Set_Component_List
8660 (N : Node_Id; Val : Node_Id); -- Node1
8661
8662 procedure Set_Component_Name
8663 (N : Node_Id; Val : Node_Id); -- Node1
8664
8665 procedure Set_Componentwise_Assignment
8666 (N : Node_Id; Val : Boolean := True); -- Flag14
8667
8668 procedure Set_Condition
8669 (N : Node_Id; Val : Node_Id); -- Node1
8670
8671 procedure Set_Condition_Actions
8672 (N : Node_Id; Val : List_Id); -- List3
8673
8674 procedure Set_Config_Pragmas
8675 (N : Node_Id; Val : List_Id); -- List4
8676
8677 procedure Set_Constant_Present
8678 (N : Node_Id; Val : Boolean := True); -- Flag17
8679
8680 procedure Set_Constraint
8681 (N : Node_Id; Val : Node_Id); -- Node3
8682
8683 procedure Set_Constraints
8684 (N : Node_Id; Val : List_Id); -- List1
8685
8686 procedure Set_Context_Installed
8687 (N : Node_Id; Val : Boolean := True); -- Flag13
8688
8689 procedure Set_Context_Items
8690 (N : Node_Id; Val : List_Id); -- List1
8691
8692 procedure Set_Context_Pending
8693 (N : Node_Id; Val : Boolean := True); -- Flag16
8694
8695 procedure Set_Controlling_Argument
8696 (N : Node_Id; Val : Node_Id); -- Node1
8697
8698 procedure Set_Conversion_OK
8699 (N : Node_Id; Val : Boolean := True); -- Flag14
8700
8701 procedure Set_Corresponding_Body
8702 (N : Node_Id; Val : Node_Id); -- Node5
8703
8704 procedure Set_Corresponding_Formal_Spec
8705 (N : Node_Id; Val : Node_Id); -- Node3
8706
8707 procedure Set_Corresponding_Generic_Association
8708 (N : Node_Id; Val : Node_Id); -- Node5
8709
8710 procedure Set_Corresponding_Integer_Value
8711 (N : Node_Id; Val : Uint); -- Uint4
8712
8713 procedure Set_Corresponding_Spec
8714 (N : Node_Id; Val : Node_Id); -- Node5
8715
8716 procedure Set_Corresponding_Stub
8717 (N : Node_Id; Val : Node_Id); -- Node3
8718
8719 procedure Set_Dcheck_Function
8720 (N : Node_Id; Val : Entity_Id); -- Node5
8721
8722 procedure Set_Debug_Statement
8723 (N : Node_Id; Val : Node_Id); -- Node3
8724
8725 procedure Set_Declarations
8726 (N : Node_Id; Val : List_Id); -- List2
8727
8728 procedure Set_Default_Expression
8729 (N : Node_Id; Val : Node_Id); -- Node5
8730
8731 procedure Set_Default_Name
8732 (N : Node_Id; Val : Node_Id); -- Node2
8733
8734 procedure Set_Defining_Identifier
8735 (N : Node_Id; Val : Entity_Id); -- Node1
8736
8737 procedure Set_Defining_Unit_Name
8738 (N : Node_Id; Val : Node_Id); -- Node1
8739
8740 procedure Set_Delay_Alternative
8741 (N : Node_Id; Val : Node_Id); -- Node4
8742
8743 procedure Set_Delay_Statement
8744 (N : Node_Id; Val : Node_Id); -- Node2
8745
8746 procedure Set_Delta_Expression
8747 (N : Node_Id; Val : Node_Id); -- Node3
8748
8749 procedure Set_Digits_Expression
8750 (N : Node_Id; Val : Node_Id); -- Node2
8751
8752 procedure Set_Discr_Check_Funcs_Built
8753 (N : Node_Id; Val : Boolean := True); -- Flag11
8754
8755 procedure Set_Discrete_Choices
8756 (N : Node_Id; Val : List_Id); -- List4
8757
8758 procedure Set_Discrete_Range
8759 (N : Node_Id; Val : Node_Id); -- Node4
8760
8761 procedure Set_Discrete_Subtype_Definition
8762 (N : Node_Id; Val : Node_Id); -- Node4
8763
8764 procedure Set_Discrete_Subtype_Definitions
8765 (N : Node_Id; Val : List_Id); -- List2
8766
8767 procedure Set_Discriminant_Specifications
8768 (N : Node_Id; Val : List_Id); -- List4
8769
8770 procedure Set_Discriminant_Type
8771 (N : Node_Id; Val : Node_Id); -- Node5
8772
8773 procedure Set_Do_Accessibility_Check
8774 (N : Node_Id; Val : Boolean := True); -- Flag13
8775
8776 procedure Set_Do_Discriminant_Check
8777 (N : Node_Id; Val : Boolean := True); -- Flag13
8778
8779 procedure Set_Do_Division_Check
8780 (N : Node_Id; Val : Boolean := True); -- Flag13
8781
8782 procedure Set_Do_Length_Check
8783 (N : Node_Id; Val : Boolean := True); -- Flag4
8784
8785 procedure Set_Do_Overflow_Check
8786 (N : Node_Id; Val : Boolean := True); -- Flag17
8787
8788 procedure Set_Do_Range_Check
8789 (N : Node_Id; Val : Boolean := True); -- Flag9
8790
8791 procedure Set_Do_Storage_Check
8792 (N : Node_Id; Val : Boolean := True); -- Flag17
8793
8794 procedure Set_Do_Tag_Check
8795 (N : Node_Id; Val : Boolean := True); -- Flag13
8796
8797 procedure Set_Elaborate_All_Desirable
8798 (N : Node_Id; Val : Boolean := True); -- Flag9
8799
8800 procedure Set_Elaborate_All_Present
8801 (N : Node_Id; Val : Boolean := True); -- Flag14
8802
8803 procedure Set_Elaborate_Desirable
8804 (N : Node_Id; Val : Boolean := True); -- Flag11
8805
8806 procedure Set_Elaborate_Present
8807 (N : Node_Id; Val : Boolean := True); -- Flag4
8808
8809 procedure Set_Elaboration_Boolean
8810 (N : Node_Id; Val : Node_Id); -- Node2
8811
8812 procedure Set_Else_Actions
8813 (N : Node_Id; Val : List_Id); -- List3
8814
8815 procedure Set_Else_Statements
8816 (N : Node_Id; Val : List_Id); -- List4
8817
8818 procedure Set_Elsif_Parts
8819 (N : Node_Id; Val : List_Id); -- List3
8820
8821 procedure Set_Enclosing_Variant
8822 (N : Node_Id; Val : Node_Id); -- Node2
8823
8824 procedure Set_End_Label
8825 (N : Node_Id; Val : Node_Id); -- Node4
8826
8827 procedure Set_End_Span
8828 (N : Node_Id; Val : Uint); -- Uint5
8829
8830 procedure Set_Entity
8831 (N : Node_Id; Val : Node_Id); -- Node4
8832
8833 procedure Set_Entry_Body_Formal_Part
8834 (N : Node_Id; Val : Node_Id); -- Node5
8835
8836 procedure Set_Entry_Call_Alternative
8837 (N : Node_Id; Val : Node_Id); -- Node1
8838
8839 procedure Set_Entry_Call_Statement
8840 (N : Node_Id; Val : Node_Id); -- Node1
8841
8842 procedure Set_Entry_Direct_Name
8843 (N : Node_Id; Val : Node_Id); -- Node1
8844
8845 procedure Set_Entry_Index
8846 (N : Node_Id; Val : Node_Id); -- Node5
8847
8848 procedure Set_Entry_Index_Specification
8849 (N : Node_Id; Val : Node_Id); -- Node4
8850
8851 procedure Set_Etype
8852 (N : Node_Id; Val : Node_Id); -- Node5
8853
8854 procedure Set_Exception_Choices
8855 (N : Node_Id; Val : List_Id); -- List4
8856
8857 procedure Set_Exception_Handlers
8858 (N : Node_Id; Val : List_Id); -- List5
8859
8860 procedure Set_Exception_Junk
8861 (N : Node_Id; Val : Boolean := True); -- Flag8
8862
8863 procedure Set_Exception_Label
8864 (N : Node_Id; Val : Node_Id); -- Node5
8865
8866 procedure Set_Expansion_Delayed
8867 (N : Node_Id; Val : Boolean := True); -- Flag11
8868
8869 procedure Set_Explicit_Actual_Parameter
8870 (N : Node_Id; Val : Node_Id); -- Node3
8871
8872 procedure Set_Explicit_Generic_Actual_Parameter
8873 (N : Node_Id; Val : Node_Id); -- Node1
8874
8875 procedure Set_Expression
8876 (N : Node_Id; Val : Node_Id); -- Node3
8877
8878 procedure Set_Expressions
8879 (N : Node_Id; Val : List_Id); -- List1
8880
8881 procedure Set_First_Bit
8882 (N : Node_Id; Val : Node_Id); -- Node3
8883
8884 procedure Set_First_Inlined_Subprogram
8885 (N : Node_Id; Val : Entity_Id); -- Node3
8886
8887 procedure Set_First_Name
8888 (N : Node_Id; Val : Boolean := True); -- Flag5
8889
8890 procedure Set_First_Named_Actual
8891 (N : Node_Id; Val : Node_Id); -- Node4
8892
8893 procedure Set_First_Real_Statement
8894 (N : Node_Id; Val : Node_Id); -- Node2
8895
8896 procedure Set_First_Subtype_Link
8897 (N : Node_Id; Val : Entity_Id); -- Node5
8898
8899 procedure Set_Float_Truncate
8900 (N : Node_Id; Val : Boolean := True); -- Flag11
8901
8902 procedure Set_Formal_Type_Definition
8903 (N : Node_Id; Val : Node_Id); -- Node3
8904
8905 procedure Set_Forwards_OK
8906 (N : Node_Id; Val : Boolean := True); -- Flag5
8907
8908 procedure Set_From_At_Mod
8909 (N : Node_Id; Val : Boolean := True); -- Flag4
8910
8911 procedure Set_From_At_End
8912 (N : Node_Id; Val : Boolean := True); -- Flag4
8913
8914 procedure Set_From_Default
8915 (N : Node_Id; Val : Boolean := True); -- Flag6
8916
8917 procedure Set_Generic_Associations
8918 (N : Node_Id; Val : List_Id); -- List3
8919
8920 procedure Set_Generic_Formal_Declarations
8921 (N : Node_Id; Val : List_Id); -- List2
8922
8923 procedure Set_Generic_Parent
8924 (N : Node_Id; Val : Node_Id); -- Node5
8925
8926 procedure Set_Generic_Parent_Type
8927 (N : Node_Id; Val : Node_Id); -- Node4
8928
8929 procedure Set_Handled_Statement_Sequence
8930 (N : Node_Id; Val : Node_Id); -- Node4
8931
8932 procedure Set_Handler_List_Entry
8933 (N : Node_Id; Val : Node_Id); -- Node2
8934
8935 procedure Set_Has_Created_Identifier
8936 (N : Node_Id; Val : Boolean := True); -- Flag15
8937
8938 procedure Set_Has_Dynamic_Length_Check
8939 (N : Node_Id; Val : Boolean := True); -- Flag10
8940
8941 procedure Set_Has_Dynamic_Range_Check
8942 (N : Node_Id; Val : Boolean := True); -- Flag12
8943
8944 procedure Set_Has_Init_Expression
8945 (N : Node_Id; Val : Boolean := True); -- Flag14
8946
8947 procedure Set_Has_Local_Raise
8948 (N : Node_Id; Val : Boolean := True); -- Flag8
8949
8950 procedure Set_Has_No_Elaboration_Code
8951 (N : Node_Id; Val : Boolean := True); -- Flag17
8952
8953 procedure Set_Has_Priority_Pragma
8954 (N : Node_Id; Val : Boolean := True); -- Flag6
8955
8956 procedure Set_Has_Private_View
8957 (N : Node_Id; Val : Boolean := True); -- Flag11
8958
8959 procedure Set_Has_Relative_Deadline_Pragma
8960 (N : Node_Id; Val : Boolean := True); -- Flag9
8961
8962 procedure Set_Has_Self_Reference
8963 (N : Node_Id; Val : Boolean := True); -- Flag13
8964
8965 procedure Set_Has_Storage_Size_Pragma
8966 (N : Node_Id; Val : Boolean := True); -- Flag5
8967
8968 procedure Set_Has_Task_Info_Pragma
8969 (N : Node_Id; Val : Boolean := True); -- Flag7
8970
8971 procedure Set_Has_Task_Name_Pragma
8972 (N : Node_Id; Val : Boolean := True); -- Flag8
8973
8974 procedure Set_Has_Wide_Character
8975 (N : Node_Id; Val : Boolean := True); -- Flag11
8976
8977 procedure Set_Hidden_By_Use_Clause
8978 (N : Node_Id; Val : Elist_Id); -- Elist4
8979
8980 procedure Set_High_Bound
8981 (N : Node_Id; Val : Node_Id); -- Node2
8982
8983 procedure Set_Identifier
8984 (N : Node_Id; Val : Node_Id); -- Node1
8985
8986 procedure Set_Interface_List
8987 (N : Node_Id; Val : List_Id); -- List2
8988
8989 procedure Set_Interface_Present
8990 (N : Node_Id; Val : Boolean := True); -- Flag16
8991
8992 procedure Set_Implicit_With
8993 (N : Node_Id; Val : Boolean := True); -- Flag16
8994
8995 procedure Set_In_Present
8996 (N : Node_Id; Val : Boolean := True); -- Flag15
8997
8998 procedure Set_Includes_Infinities
8999 (N : Node_Id; Val : Boolean := True); -- Flag11
9000
9001 procedure Set_Instance_Spec
9002 (N : Node_Id; Val : Node_Id); -- Node5
9003
9004 procedure Set_Intval
9005 (N : Node_Id; Val : Uint); -- Uint3
9006
9007 procedure Set_Is_Accessibility_Actual
9008 (N : Node_Id; Val : Boolean := True); -- Flag13
9009
9010 procedure Set_Is_Asynchronous_Call_Block
9011 (N : Node_Id; Val : Boolean := True); -- Flag7
9012
9013 procedure Set_Is_Component_Left_Opnd
9014 (N : Node_Id; Val : Boolean := True); -- Flag13
9015
9016 procedure Set_Is_Component_Right_Opnd
9017 (N : Node_Id; Val : Boolean := True); -- Flag14
9018
9019 procedure Set_Is_Controlling_Actual
9020 (N : Node_Id; Val : Boolean := True); -- Flag16
9021
9022 procedure Set_Is_Dynamic_Coextension
9023 (N : Node_Id; Val : Boolean := True); -- Flag18
9024
9025 procedure Set_Is_Elsif
9026 (N : Node_Id; Val : Boolean := True); -- Flag13
9027
9028 procedure Set_Is_Entry_Barrier_Function
9029 (N : Node_Id; Val : Boolean := True); -- Flag8
9030
9031 procedure Set_Is_Expanded_Build_In_Place_Call
9032 (N : Node_Id; Val : Boolean := True); -- Flag11
9033
9034 procedure Set_Is_Folded_In_Parser
9035 (N : Node_Id; Val : Boolean := True); -- Flag4
9036
9037 procedure Set_Is_In_Discriminant_Check
9038 (N : Node_Id; Val : Boolean := True); -- Flag11
9039
9040 procedure Set_Is_Machine_Number
9041 (N : Node_Id; Val : Boolean := True); -- Flag11
9042
9043 procedure Set_Is_Null_Loop
9044 (N : Node_Id; Val : Boolean := True); -- Flag16
9045
9046 procedure Set_Is_Overloaded
9047 (N : Node_Id; Val : Boolean := True); -- Flag5
9048
9049 procedure Set_Is_Power_Of_2_For_Shift
9050 (N : Node_Id; Val : Boolean := True); -- Flag13
9051
9052 procedure Set_Is_Protected_Subprogram_Body
9053 (N : Node_Id; Val : Boolean := True); -- Flag7
9054
9055 procedure Set_Is_Static_Coextension
9056 (N : Node_Id; Val : Boolean := True); -- Flag14
9057
9058 procedure Set_Is_Static_Expression
9059 (N : Node_Id; Val : Boolean := True); -- Flag6
9060
9061 procedure Set_Is_Subprogram_Descriptor
9062 (N : Node_Id; Val : Boolean := True); -- Flag16
9063
9064 procedure Set_Is_Task_Allocation_Block
9065 (N : Node_Id; Val : Boolean := True); -- Flag6
9066
9067 procedure Set_Is_Task_Master
9068 (N : Node_Id; Val : Boolean := True); -- Flag5
9069
9070 procedure Set_Iteration_Scheme
9071 (N : Node_Id; Val : Node_Id); -- Node2
9072
9073 procedure Set_Itype
9074 (N : Node_Id; Val : Entity_Id); -- Node1
9075
9076 procedure Set_Kill_Range_Check
9077 (N : Node_Id; Val : Boolean := True); -- Flag11
9078
9079 procedure Set_Last_Bit
9080 (N : Node_Id; Val : Node_Id); -- Node4
9081
9082 procedure Set_Last_Name
9083 (N : Node_Id; Val : Boolean := True); -- Flag6
9084
9085 procedure Set_Library_Unit
9086 (N : Node_Id; Val : Node_Id); -- Node4
9087
9088 procedure Set_Label_Construct
9089 (N : Node_Id; Val : Node_Id); -- Node2
9090
9091 procedure Set_Left_Opnd
9092 (N : Node_Id; Val : Node_Id); -- Node2
9093
9094 procedure Set_Limited_View_Installed
9095 (N : Node_Id; Val : Boolean := True); -- Flag18
9096
9097 procedure Set_Limited_Present
9098 (N : Node_Id; Val : Boolean := True); -- Flag17
9099
9100 procedure Set_Literals
9101 (N : Node_Id; Val : List_Id); -- List1
9102
9103 procedure Set_Local_Raise_Not_OK
9104 (N : Node_Id; Val : Boolean := True); -- Flag7
9105
9106 procedure Set_Local_Raise_Statements
9107 (N : Node_Id; Val : Elist_Id); -- Elist1
9108
9109 procedure Set_Loop_Actions
9110 (N : Node_Id; Val : List_Id); -- List2
9111
9112 procedure Set_Loop_Parameter_Specification
9113 (N : Node_Id; Val : Node_Id); -- Node4
9114
9115 procedure Set_Low_Bound
9116 (N : Node_Id; Val : Node_Id); -- Node1
9117
9118 procedure Set_Mod_Clause
9119 (N : Node_Id; Val : Node_Id); -- Node2
9120
9121 procedure Set_More_Ids
9122 (N : Node_Id; Val : Boolean := True); -- Flag5
9123
9124 procedure Set_Must_Be_Byte_Aligned
9125 (N : Node_Id; Val : Boolean := True); -- Flag14
9126
9127 procedure Set_Must_Not_Freeze
9128 (N : Node_Id; Val : Boolean := True); -- Flag8
9129
9130 procedure Set_Must_Not_Override
9131 (N : Node_Id; Val : Boolean := True); -- Flag15
9132
9133 procedure Set_Must_Override
9134 (N : Node_Id; Val : Boolean := True); -- Flag14
9135
9136 procedure Set_Name
9137 (N : Node_Id; Val : Node_Id); -- Node2
9138
9139 procedure Set_Names
9140 (N : Node_Id; Val : List_Id); -- List2
9141
9142 procedure Set_Next_Entity
9143 (N : Node_Id; Val : Node_Id); -- Node2
9144
9145 procedure Set_Next_Implicit_With
9146 (N : Node_Id; Val : Node_Id); -- Node3
9147
9148 procedure Set_Next_Named_Actual
9149 (N : Node_Id; Val : Node_Id); -- Node4
9150
9151 procedure Set_Next_Pragma
9152 (N : Node_Id; Val : Node_Id); -- Node1
9153
9154 procedure Set_Next_Rep_Item
9155 (N : Node_Id; Val : Node_Id); -- Node5
9156
9157 procedure Set_Next_Use_Clause
9158 (N : Node_Id; Val : Node_Id); -- Node3
9159
9160 procedure Set_No_Ctrl_Actions
9161 (N : Node_Id; Val : Boolean := True); -- Flag7
9162
9163 procedure Set_No_Elaboration_Check
9164 (N : Node_Id; Val : Boolean := True); -- Flag14
9165
9166 procedure Set_No_Entities_Ref_In_Spec
9167 (N : Node_Id; Val : Boolean := True); -- Flag8
9168
9169 procedure Set_No_Initialization
9170 (N : Node_Id; Val : Boolean := True); -- Flag13
9171
9172 procedure Set_No_Truncation
9173 (N : Node_Id; Val : Boolean := True); -- Flag17
9174
9175 procedure Set_Null_Present
9176 (N : Node_Id; Val : Boolean := True); -- Flag13
9177
9178 procedure Set_Null_Exclusion_Present
9179 (N : Node_Id; Val : Boolean := True); -- Flag11
9180
9181 procedure Set_Null_Exclusion_In_Return_Present
9182 (N : Node_Id; Val : Boolean := True); -- Flag14
9183
9184 procedure Set_Null_Record_Present
9185 (N : Node_Id; Val : Boolean := True); -- Flag17
9186
9187 procedure Set_Object_Definition
9188 (N : Node_Id; Val : Node_Id); -- Node4
9189
9190 procedure Set_Original_Discriminant
9191 (N : Node_Id; Val : Node_Id); -- Node2
9192
9193 procedure Set_Original_Entity
9194 (N : Node_Id; Val : Entity_Id); -- Node2
9195
9196 procedure Set_Others_Discrete_Choices
9197 (N : Node_Id; Val : List_Id); -- List1
9198
9199 procedure Set_Out_Present
9200 (N : Node_Id; Val : Boolean := True); -- Flag17
9201
9202 procedure Set_Parameter_Associations
9203 (N : Node_Id; Val : List_Id); -- List3
9204
9205 procedure Set_Parameter_List_Truncated
9206 (N : Node_Id; Val : Boolean := True); -- Flag17
9207
9208 procedure Set_Parameter_Specifications
9209 (N : Node_Id; Val : List_Id); -- List3
9210
9211 procedure Set_Parameter_Type
9212 (N : Node_Id; Val : Node_Id); -- Node2
9213
9214 procedure Set_Parent_Spec
9215 (N : Node_Id; Val : Node_Id); -- Node4
9216
9217 procedure Set_PPC_Enabled
9218 (N : Node_Id; Val : Boolean := True); -- Flag5
9219
9220 procedure Set_Position
9221 (N : Node_Id; Val : Node_Id); -- Node2
9222
9223 procedure Set_Pragma_Argument_Associations
9224 (N : Node_Id; Val : List_Id); -- List2
9225
9226 procedure Set_Pragma_Identifier
9227 (N : Node_Id; Val : Node_Id); -- Node4
9228
9229 procedure Set_Pragmas_After
9230 (N : Node_Id; Val : List_Id); -- List5
9231
9232 procedure Set_Pragmas_Before
9233 (N : Node_Id; Val : List_Id); -- List4
9234
9235 procedure Set_Prefix
9236 (N : Node_Id; Val : Node_Id); -- Node3
9237
9238 procedure Set_Present_Expr
9239 (N : Node_Id; Val : Uint); -- Uint3
9240
9241 procedure Set_Prev_Ids
9242 (N : Node_Id; Val : Boolean := True); -- Flag6
9243
9244 procedure Set_Print_In_Hex
9245 (N : Node_Id; Val : Boolean := True); -- Flag13
9246
9247 procedure Set_Private_Declarations
9248 (N : Node_Id; Val : List_Id); -- List3
9249
9250 procedure Set_Private_Present
9251 (N : Node_Id; Val : Boolean := True); -- Flag15
9252
9253 procedure Set_Procedure_To_Call
9254 (N : Node_Id; Val : Node_Id); -- Node2
9255
9256 procedure Set_Proper_Body
9257 (N : Node_Id; Val : Node_Id); -- Node1
9258
9259 procedure Set_Protected_Definition
9260 (N : Node_Id; Val : Node_Id); -- Node3
9261
9262 procedure Set_Protected_Present
9263 (N : Node_Id; Val : Boolean := True); -- Flag6
9264
9265 procedure Set_Raises_Constraint_Error
9266 (N : Node_Id; Val : Boolean := True); -- Flag7
9267
9268 procedure Set_Range_Constraint
9269 (N : Node_Id; Val : Node_Id); -- Node4
9270
9271 procedure Set_Range_Expression
9272 (N : Node_Id; Val : Node_Id); -- Node4
9273
9274 procedure Set_Real_Range_Specification
9275 (N : Node_Id; Val : Node_Id); -- Node4
9276
9277 procedure Set_Realval
9278 (N : Node_Id; Val : Ureal); -- Ureal3
9279
9280 procedure Set_Reason
9281 (N : Node_Id; Val : Uint); -- Uint3
9282
9283 procedure Set_Record_Extension_Part
9284 (N : Node_Id; Val : Node_Id); -- Node3
9285
9286 procedure Set_Redundant_Use
9287 (N : Node_Id; Val : Boolean := True); -- Flag13
9288
9289 procedure Set_Renaming_Exception
9290 (N : Node_Id; Val : Node_Id); -- Node2
9291
9292 procedure Set_Result_Definition
9293 (N : Node_Id; Val : Node_Id); -- Node4
9294
9295 procedure Set_Return_Object_Declarations
9296 (N : Node_Id; Val : List_Id); -- List3
9297
9298 procedure Set_Return_Statement_Entity
9299 (N : Node_Id; Val : Node_Id); -- Node5
9300
9301 procedure Set_Reverse_Present
9302 (N : Node_Id; Val : Boolean := True); -- Flag15
9303
9304 procedure Set_Right_Opnd
9305 (N : Node_Id; Val : Node_Id); -- Node3
9306
9307 procedure Set_Rounded_Result
9308 (N : Node_Id; Val : Boolean := True); -- Flag18
9309
9310 procedure Set_SCIL_Controlling_Tag
9311 (N : Node_Id; Val : Node_Id); -- Node5
9312
9313 procedure Set_SCIL_Entity
9314 (N : Node_Id; Val : Node_Id); -- Node4
9315
9316 procedure Set_SCIL_Related_Node
9317 (N : Node_Id; Val : Node_Id); -- Node1
9318
9319 procedure Set_SCIL_Tag_Value
9320 (N : Node_Id; Val : Node_Id); -- Node5
9321
9322 procedure Set_SCIL_Target_Prim
9323 (N : Node_Id; Val : Node_Id); -- Node2
9324
9325 procedure Set_Scope
9326 (N : Node_Id; Val : Node_Id); -- Node3
9327
9328 procedure Set_Select_Alternatives
9329 (N : Node_Id; Val : List_Id); -- List1
9330
9331 procedure Set_Selector_Name
9332 (N : Node_Id; Val : Node_Id); -- Node2
9333
9334 procedure Set_Selector_Names
9335 (N : Node_Id; Val : List_Id); -- List1
9336
9337 procedure Set_Shift_Count_OK
9338 (N : Node_Id; Val : Boolean := True); -- Flag4
9339
9340 procedure Set_Source_Type
9341 (N : Node_Id; Val : Entity_Id); -- Node1
9342
9343 procedure Set_Specification
9344 (N : Node_Id; Val : Node_Id); -- Node1
9345
9346 procedure Set_Statements
9347 (N : Node_Id; Val : List_Id); -- List3
9348
9349 procedure Set_Static_Processing_OK
9350 (N : Node_Id; Val : Boolean); -- Flag4
9351
9352 procedure Set_Storage_Pool
9353 (N : Node_Id; Val : Node_Id); -- Node1
9354
9355 procedure Set_Strval
9356 (N : Node_Id; Val : String_Id); -- Str3
9357
9358 procedure Set_Subtype_Indication
9359 (N : Node_Id; Val : Node_Id); -- Node5
9360
9361 procedure Set_Subtype_Mark
9362 (N : Node_Id; Val : Node_Id); -- Node4
9363
9364 procedure Set_Subtype_Marks
9365 (N : Node_Id; Val : List_Id); -- List2
9366
9367 procedure Set_Suppress_Loop_Warnings
9368 (N : Node_Id; Val : Boolean := True); -- Flag17
9369
9370 procedure Set_Synchronized_Present
9371 (N : Node_Id; Val : Boolean := True); -- Flag7
9372
9373 procedure Set_Tagged_Present
9374 (N : Node_Id; Val : Boolean := True); -- Flag15
9375
9376 procedure Set_Target_Type
9377 (N : Node_Id; Val : Entity_Id); -- Node2
9378
9379 procedure Set_Task_Definition
9380 (N : Node_Id; Val : Node_Id); -- Node3
9381
9382 procedure Set_Task_Present
9383 (N : Node_Id; Val : Boolean := True); -- Flag5
9384
9385 procedure Set_Then_Actions
9386 (N : Node_Id; Val : List_Id); -- List2
9387
9388 procedure Set_Then_Statements
9389 (N : Node_Id; Val : List_Id); -- List2
9390
9391 procedure Set_Treat_Fixed_As_Integer
9392 (N : Node_Id; Val : Boolean := True); -- Flag14
9393
9394 procedure Set_Triggering_Alternative
9395 (N : Node_Id; Val : Node_Id); -- Node1
9396
9397 procedure Set_Triggering_Statement
9398 (N : Node_Id; Val : Node_Id); -- Node1
9399
9400 procedure Set_TSS_Elist
9401 (N : Node_Id; Val : Elist_Id); -- Elist3
9402
9403 procedure Set_Type_Definition
9404 (N : Node_Id; Val : Node_Id); -- Node3
9405
9406 procedure Set_Unit
9407 (N : Node_Id; Val : Node_Id); -- Node2
9408
9409 procedure Set_Unknown_Discriminants_Present
9410 (N : Node_Id; Val : Boolean := True); -- Flag13
9411
9412 procedure Set_Unreferenced_In_Spec
9413 (N : Node_Id; Val : Boolean := True); -- Flag7
9414
9415 procedure Set_Variant_Part
9416 (N : Node_Id; Val : Node_Id); -- Node4
9417
9418 procedure Set_Variants
9419 (N : Node_Id; Val : List_Id); -- List1
9420
9421 procedure Set_Visible_Declarations
9422 (N : Node_Id; Val : List_Id); -- List2
9423
9424 procedure Set_Was_Originally_Stub
9425 (N : Node_Id; Val : Boolean := True); -- Flag13
9426
9427 procedure Set_Zero_Cost_Handling
9428 (N : Node_Id; Val : Boolean := True); -- Flag5
9429
9430 -------------------------
9431 -- Iterator Procedures --
9432 -------------------------
9433
9434 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
9435
9436 procedure Next_Entity (N : in out Node_Id);
9437 procedure Next_Named_Actual (N : in out Node_Id);
9438 procedure Next_Rep_Item (N : in out Node_Id);
9439 procedure Next_Use_Clause (N : in out Node_Id);
9440
9441 --------------------------------------
9442 -- Logical Access to End_Span Field --
9443 --------------------------------------
9444
9445 function End_Location (N : Node_Id) return Source_Ptr;
9446 -- N is an N_If_Statement or N_Case_Statement node, and this
9447 -- function returns the location of the IF token in the END IF
9448 -- sequence by translating the value of the End_Span field.
9449
9450 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
9451 -- N is an N_If_Statement or N_Case_Statement node. This procedure
9452 -- sets the End_Span field to correspond to the given value S. In
9453 -- other words, End_Span is set to the difference between S and
9454 -- Sloc (N), the starting location.
9455
9456 --------------------------------
9457 -- Node_Kind Membership Tests --
9458 --------------------------------
9459
9460 -- The following functions allow a convenient notation for testing whether
9461 -- a Node_Kind value matches any one of a list of possible values. In each
9462 -- case True is returned if the given T argument is equal to any of the V
9463 -- arguments. Note that there is a similar set of functions defined in
9464 -- Atree where the first argument is a Node_Id whose Nkind field is tested.
9465
9466 function Nkind_In
9467 (T : Node_Kind;
9468 V1 : Node_Kind;
9469 V2 : Node_Kind) return Boolean;
9470
9471 function Nkind_In
9472 (T : Node_Kind;
9473 V1 : Node_Kind;
9474 V2 : Node_Kind;
9475 V3 : Node_Kind) return Boolean;
9476
9477 function Nkind_In
9478 (T : Node_Kind;
9479 V1 : Node_Kind;
9480 V2 : Node_Kind;
9481 V3 : Node_Kind;
9482 V4 : Node_Kind) return Boolean;
9483
9484 function Nkind_In
9485 (T : Node_Kind;
9486 V1 : Node_Kind;
9487 V2 : Node_Kind;
9488 V3 : Node_Kind;
9489 V4 : Node_Kind;
9490 V5 : Node_Kind) return Boolean;
9491
9492 function Nkind_In
9493 (T : Node_Kind;
9494 V1 : Node_Kind;
9495 V2 : Node_Kind;
9496 V3 : Node_Kind;
9497 V4 : Node_Kind;
9498 V5 : Node_Kind;
9499 V6 : Node_Kind) return Boolean;
9500
9501 function Nkind_In
9502 (T : Node_Kind;
9503 V1 : Node_Kind;
9504 V2 : Node_Kind;
9505 V3 : Node_Kind;
9506 V4 : Node_Kind;
9507 V5 : Node_Kind;
9508 V6 : Node_Kind;
9509 V7 : Node_Kind) return Boolean;
9510
9511 function Nkind_In
9512 (T : Node_Kind;
9513 V1 : Node_Kind;
9514 V2 : Node_Kind;
9515 V3 : Node_Kind;
9516 V4 : Node_Kind;
9517 V5 : Node_Kind;
9518 V6 : Node_Kind;
9519 V7 : Node_Kind;
9520 V8 : Node_Kind) return Boolean;
9521
9522 function Nkind_In
9523 (T : Node_Kind;
9524 V1 : Node_Kind;
9525 V2 : Node_Kind;
9526 V3 : Node_Kind;
9527 V4 : Node_Kind;
9528 V5 : Node_Kind;
9529 V6 : Node_Kind;
9530 V7 : Node_Kind;
9531 V8 : Node_Kind;
9532 V9 : Node_Kind) return Boolean;
9533
9534 pragma Inline (Nkind_In);
9535 -- Inline all above functions
9536
9537 -----------------------
9538 -- Utility Functions --
9539 -----------------------
9540
9541 function Pragma_Name (N : Node_Id) return Name_Id;
9542 pragma Inline (Pragma_Name);
9543 -- Convenient function to obtain Chars field of Pragma_Identifier
9544
9545 -----------------------------
9546 -- Syntactic Parent Tables --
9547 -----------------------------
9548
9549 -- These tables show for each node, and for each of the five fields,
9550 -- whether the corresponding field is syntactic (True) or semantic (False).
9551 -- Unused entries are also set to False.
9552
9553 subtype Field_Num is Natural range 1 .. 5;
9554
9555 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
9556
9557 -- Following entries can be built automatically from the sinfo sources
9558 -- using the makeisf utility (currently this program is in spitbol).
9559
9560 N_Identifier =>
9561 (1 => True, -- Chars (Name1)
9562 2 => False, -- Original_Discriminant (Node2-Sem)
9563 3 => False, -- unused
9564 4 => False, -- Entity (Node4-Sem)
9565 5 => False), -- Etype (Node5-Sem)
9566
9567 N_Integer_Literal =>
9568 (1 => False, -- unused
9569 2 => False, -- Original_Entity (Node2-Sem)
9570 3 => True, -- Intval (Uint3)
9571 4 => False, -- unused
9572 5 => False), -- Etype (Node5-Sem)
9573
9574 N_Real_Literal =>
9575 (1 => False, -- unused
9576 2 => False, -- Original_Entity (Node2-Sem)
9577 3 => True, -- Realval (Ureal3)
9578 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
9579 5 => False), -- Etype (Node5-Sem)
9580
9581 N_Character_Literal =>
9582 (1 => True, -- Chars (Name1)
9583 2 => True, -- Char_Literal_Value (Uint2)
9584 3 => False, -- unused
9585 4 => False, -- Entity (Node4-Sem)
9586 5 => False), -- Etype (Node5-Sem)
9587
9588 N_String_Literal =>
9589 (1 => False, -- unused
9590 2 => False, -- unused
9591 3 => True, -- Strval (Str3)
9592 4 => False, -- unused
9593 5 => False), -- Etype (Node5-Sem)
9594
9595 N_Pragma =>
9596 (1 => False, -- Next_Pragma (Node1-Sem)
9597 2 => True, -- Pragma_Argument_Associations (List2)
9598 3 => True, -- Debug_Statement (Node3)
9599 4 => True, -- Pragma_Identifier (Node4)
9600 5 => False), -- Next_Rep_Item (Node5-Sem)
9601
9602 N_Pragma_Argument_Association =>
9603 (1 => True, -- Chars (Name1)
9604 2 => False, -- unused
9605 3 => True, -- Expression (Node3)
9606 4 => False, -- unused
9607 5 => False), -- unused
9608
9609 N_Defining_Identifier =>
9610 (1 => True, -- Chars (Name1)
9611 2 => False, -- Next_Entity (Node2-Sem)
9612 3 => False, -- Scope (Node3-Sem)
9613 4 => False, -- unused
9614 5 => False), -- Etype (Node5-Sem)
9615
9616 N_Full_Type_Declaration =>
9617 (1 => True, -- Defining_Identifier (Node1)
9618 2 => False, -- unused
9619 3 => True, -- Type_Definition (Node3)
9620 4 => True, -- Discriminant_Specifications (List4)
9621 5 => False), -- unused
9622
9623 N_Subtype_Declaration =>
9624 (1 => True, -- Defining_Identifier (Node1)
9625 2 => False, -- unused
9626 3 => False, -- unused
9627 4 => False, -- Generic_Parent_Type (Node4-Sem)
9628 5 => True), -- Subtype_Indication (Node5)
9629
9630 N_Subtype_Indication =>
9631 (1 => False, -- unused
9632 2 => False, -- unused
9633 3 => True, -- Constraint (Node3)
9634 4 => True, -- Subtype_Mark (Node4)
9635 5 => False), -- Etype (Node5-Sem)
9636
9637 N_Object_Declaration =>
9638 (1 => True, -- Defining_Identifier (Node1)
9639 2 => False, -- Handler_List_Entry (Node2-Sem)
9640 3 => True, -- Expression (Node3)
9641 4 => True, -- Object_Definition (Node4)
9642 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
9643
9644 N_Number_Declaration =>
9645 (1 => True, -- Defining_Identifier (Node1)
9646 2 => False, -- unused
9647 3 => True, -- Expression (Node3)
9648 4 => False, -- unused
9649 5 => False), -- unused
9650
9651 N_Derived_Type_Definition =>
9652 (1 => False, -- unused
9653 2 => True, -- Interface_List (List2)
9654 3 => True, -- Record_Extension_Part (Node3)
9655 4 => False, -- unused
9656 5 => True), -- Subtype_Indication (Node5)
9657
9658 N_Range_Constraint =>
9659 (1 => False, -- unused
9660 2 => False, -- unused
9661 3 => False, -- unused
9662 4 => True, -- Range_Expression (Node4)
9663 5 => False), -- unused
9664
9665 N_Range =>
9666 (1 => True, -- Low_Bound (Node1)
9667 2 => True, -- High_Bound (Node2)
9668 3 => False, -- unused
9669 4 => False, -- unused
9670 5 => False), -- Etype (Node5-Sem)
9671
9672 N_Enumeration_Type_Definition =>
9673 (1 => True, -- Literals (List1)
9674 2 => False, -- unused
9675 3 => False, -- unused
9676 4 => True, -- End_Label (Node4)
9677 5 => False), -- unused
9678
9679 N_Defining_Character_Literal =>
9680 (1 => True, -- Chars (Name1)
9681 2 => False, -- Next_Entity (Node2-Sem)
9682 3 => False, -- Scope (Node3-Sem)
9683 4 => False, -- unused
9684 5 => False), -- Etype (Node5-Sem)
9685
9686 N_Signed_Integer_Type_Definition =>
9687 (1 => True, -- Low_Bound (Node1)
9688 2 => True, -- High_Bound (Node2)
9689 3 => False, -- unused
9690 4 => False, -- unused
9691 5 => False), -- unused
9692
9693 N_Modular_Type_Definition =>
9694 (1 => False, -- unused
9695 2 => False, -- unused
9696 3 => True, -- Expression (Node3)
9697 4 => False, -- unused
9698 5 => False), -- unused
9699
9700 N_Floating_Point_Definition =>
9701 (1 => False, -- unused
9702 2 => True, -- Digits_Expression (Node2)
9703 3 => False, -- unused
9704 4 => True, -- Real_Range_Specification (Node4)
9705 5 => False), -- unused
9706
9707 N_Real_Range_Specification =>
9708 (1 => True, -- Low_Bound (Node1)
9709 2 => True, -- High_Bound (Node2)
9710 3 => False, -- unused
9711 4 => False, -- unused
9712 5 => False), -- unused
9713
9714 N_Ordinary_Fixed_Point_Definition =>
9715 (1 => False, -- unused
9716 2 => False, -- unused
9717 3 => True, -- Delta_Expression (Node3)
9718 4 => True, -- Real_Range_Specification (Node4)
9719 5 => False), -- unused
9720
9721 N_Decimal_Fixed_Point_Definition =>
9722 (1 => False, -- unused
9723 2 => True, -- Digits_Expression (Node2)
9724 3 => True, -- Delta_Expression (Node3)
9725 4 => True, -- Real_Range_Specification (Node4)
9726 5 => False), -- unused
9727
9728 N_Digits_Constraint =>
9729 (1 => False, -- unused
9730 2 => True, -- Digits_Expression (Node2)
9731 3 => False, -- unused
9732 4 => True, -- Range_Constraint (Node4)
9733 5 => False), -- unused
9734
9735 N_Unconstrained_Array_Definition =>
9736 (1 => False, -- unused
9737 2 => True, -- Subtype_Marks (List2)
9738 3 => False, -- unused
9739 4 => True, -- Component_Definition (Node4)
9740 5 => False), -- unused
9741
9742 N_Constrained_Array_Definition =>
9743 (1 => False, -- unused
9744 2 => True, -- Discrete_Subtype_Definitions (List2)
9745 3 => False, -- unused
9746 4 => True, -- Component_Definition (Node4)
9747 5 => False), -- unused
9748
9749 N_Component_Definition =>
9750 (1 => False, -- unused
9751 2 => False, -- unused
9752 3 => True, -- Access_Definition (Node3)
9753 4 => False, -- unused
9754 5 => True), -- Subtype_Indication (Node5)
9755
9756 N_Discriminant_Specification =>
9757 (1 => True, -- Defining_Identifier (Node1)
9758 2 => False, -- unused
9759 3 => True, -- Expression (Node3)
9760 4 => False, -- unused
9761 5 => True), -- Discriminant_Type (Node5)
9762
9763 N_Index_Or_Discriminant_Constraint =>
9764 (1 => True, -- Constraints (List1)
9765 2 => False, -- unused
9766 3 => False, -- unused
9767 4 => False, -- unused
9768 5 => False), -- unused
9769
9770 N_Discriminant_Association =>
9771 (1 => True, -- Selector_Names (List1)
9772 2 => False, -- unused
9773 3 => True, -- Expression (Node3)
9774 4 => False, -- unused
9775 5 => False), -- unused
9776
9777 N_Record_Definition =>
9778 (1 => True, -- Component_List (Node1)
9779 2 => True, -- Interface_List (List2)
9780 3 => False, -- unused
9781 4 => True, -- End_Label (Node4)
9782 5 => False), -- unused
9783
9784 N_Component_List =>
9785 (1 => False, -- unused
9786 2 => False, -- unused
9787 3 => True, -- Component_Items (List3)
9788 4 => True, -- Variant_Part (Node4)
9789 5 => False), -- unused
9790
9791 N_Component_Declaration =>
9792 (1 => True, -- Defining_Identifier (Node1)
9793 2 => False, -- unused
9794 3 => True, -- Expression (Node3)
9795 4 => True, -- Component_Definition (Node4)
9796 5 => False), -- unused
9797
9798 N_Variant_Part =>
9799 (1 => True, -- Variants (List1)
9800 2 => True, -- Name (Node2)
9801 3 => False, -- unused
9802 4 => False, -- unused
9803 5 => False), -- unused
9804
9805 N_Variant =>
9806 (1 => True, -- Component_List (Node1)
9807 2 => False, -- Enclosing_Variant (Node2-Sem)
9808 3 => False, -- Present_Expr (Uint3-Sem)
9809 4 => True, -- Discrete_Choices (List4)
9810 5 => False), -- Dcheck_Function (Node5-Sem)
9811
9812 N_Others_Choice =>
9813 (1 => False, -- Others_Discrete_Choices (List1-Sem)
9814 2 => False, -- unused
9815 3 => False, -- unused
9816 4 => False, -- unused
9817 5 => False), -- unused
9818
9819 N_Access_To_Object_Definition =>
9820 (1 => False, -- unused
9821 2 => False, -- unused
9822 3 => False, -- unused
9823 4 => False, -- unused
9824 5 => True), -- Subtype_Indication (Node5)
9825
9826 N_Access_Function_Definition =>
9827 (1 => False, -- unused
9828 2 => False, -- unused
9829 3 => True, -- Parameter_Specifications (List3)
9830 4 => True, -- Result_Definition (Node4)
9831 5 => False), -- unused
9832
9833 N_Access_Procedure_Definition =>
9834 (1 => False, -- unused
9835 2 => False, -- unused
9836 3 => True, -- Parameter_Specifications (List3)
9837 4 => False, -- unused
9838 5 => False), -- unused
9839
9840 N_Access_Definition =>
9841 (1 => False, -- unused
9842 2 => False, -- unused
9843 3 => True, -- Access_To_Subprogram_Definition (Node3)
9844 4 => True, -- Subtype_Mark (Node4)
9845 5 => False), -- unused
9846
9847 N_Incomplete_Type_Declaration =>
9848 (1 => True, -- Defining_Identifier (Node1)
9849 2 => False, -- unused
9850 3 => False, -- unused
9851 4 => True, -- Discriminant_Specifications (List4)
9852 5 => False), -- unused
9853
9854 N_Explicit_Dereference =>
9855 (1 => False, -- unused
9856 2 => False, -- unused
9857 3 => True, -- Prefix (Node3)
9858 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
9859 5 => False), -- Etype (Node5-Sem)
9860
9861 N_Indexed_Component =>
9862 (1 => True, -- Expressions (List1)
9863 2 => False, -- unused
9864 3 => True, -- Prefix (Node3)
9865 4 => False, -- unused
9866 5 => False), -- Etype (Node5-Sem)
9867
9868 N_Slice =>
9869 (1 => False, -- unused
9870 2 => False, -- unused
9871 3 => True, -- Prefix (Node3)
9872 4 => True, -- Discrete_Range (Node4)
9873 5 => False), -- Etype (Node5-Sem)
9874
9875 N_Selected_Component =>
9876 (1 => False, -- unused
9877 2 => True, -- Selector_Name (Node2)
9878 3 => True, -- Prefix (Node3)
9879 4 => False, -- unused
9880 5 => False), -- Etype (Node5-Sem)
9881
9882 N_Attribute_Reference =>
9883 (1 => True, -- Expressions (List1)
9884 2 => True, -- Attribute_Name (Name2)
9885 3 => True, -- Prefix (Node3)
9886 4 => False, -- Entity (Node4-Sem)
9887 5 => False), -- Etype (Node5-Sem)
9888
9889 N_Aggregate =>
9890 (1 => True, -- Expressions (List1)
9891 2 => True, -- Component_Associations (List2)
9892 3 => False, -- Aggregate_Bounds (Node3-Sem)
9893 4 => False, -- unused
9894 5 => False), -- Etype (Node5-Sem)
9895
9896 N_Component_Association =>
9897 (1 => True, -- Choices (List1)
9898 2 => False, -- Loop_Actions (List2-Sem)
9899 3 => True, -- Expression (Node3)
9900 4 => False, -- unused
9901 5 => False), -- unused
9902
9903 N_Extension_Aggregate =>
9904 (1 => True, -- Expressions (List1)
9905 2 => True, -- Component_Associations (List2)
9906 3 => True, -- Ancestor_Part (Node3)
9907 4 => False, -- unused
9908 5 => False), -- Etype (Node5-Sem)
9909
9910 N_Null =>
9911 (1 => False, -- unused
9912 2 => False, -- unused
9913 3 => False, -- unused
9914 4 => False, -- unused
9915 5 => False), -- Etype (Node5-Sem)
9916
9917 N_And_Then =>
9918 (1 => False, -- Actions (List1-Sem)
9919 2 => True, -- Left_Opnd (Node2)
9920 3 => True, -- Right_Opnd (Node3)
9921 4 => False, -- unused
9922 5 => False), -- Etype (Node5-Sem)
9923
9924 N_Or_Else =>
9925 (1 => False, -- Actions (List1-Sem)
9926 2 => True, -- Left_Opnd (Node2)
9927 3 => True, -- Right_Opnd (Node3)
9928 4 => False, -- unused
9929 5 => False), -- Etype (Node5-Sem)
9930
9931 N_In =>
9932 (1 => False, -- unused
9933 2 => True, -- Left_Opnd (Node2)
9934 3 => True, -- Right_Opnd (Node3)
9935 4 => True, -- Alternatives (List4)
9936 5 => False), -- Etype (Node5-Sem)
9937
9938 N_Not_In =>
9939 (1 => False, -- unused
9940 2 => True, -- Left_Opnd (Node2)
9941 3 => True, -- Right_Opnd (Node3)
9942 4 => True, -- Alternatives (List4)
9943 5 => False), -- Etype (Node5-Sem)
9944
9945 N_Op_And =>
9946 (1 => True, -- Chars (Name1)
9947 2 => True, -- Left_Opnd (Node2)
9948 3 => True, -- Right_Opnd (Node3)
9949 4 => False, -- Entity (Node4-Sem)
9950 5 => False), -- Etype (Node5-Sem)
9951
9952 N_Op_Or =>
9953 (1 => True, -- Chars (Name1)
9954 2 => True, -- Left_Opnd (Node2)
9955 3 => True, -- Right_Opnd (Node3)
9956 4 => False, -- Entity (Node4-Sem)
9957 5 => False), -- Etype (Node5-Sem)
9958
9959 N_Op_Xor =>
9960 (1 => True, -- Chars (Name1)
9961 2 => True, -- Left_Opnd (Node2)
9962 3 => True, -- Right_Opnd (Node3)
9963 4 => False, -- Entity (Node4-Sem)
9964 5 => False), -- Etype (Node5-Sem)
9965
9966 N_Op_Eq =>
9967 (1 => True, -- Chars (Name1)
9968 2 => True, -- Left_Opnd (Node2)
9969 3 => True, -- Right_Opnd (Node3)
9970 4 => False, -- Entity (Node4-Sem)
9971 5 => False), -- Etype (Node5-Sem)
9972
9973 N_Op_Ne =>
9974 (1 => True, -- Chars (Name1)
9975 2 => True, -- Left_Opnd (Node2)
9976 3 => True, -- Right_Opnd (Node3)
9977 4 => False, -- Entity (Node4-Sem)
9978 5 => False), -- Etype (Node5-Sem)
9979
9980 N_Op_Lt =>
9981 (1 => True, -- Chars (Name1)
9982 2 => True, -- Left_Opnd (Node2)
9983 3 => True, -- Right_Opnd (Node3)
9984 4 => False, -- Entity (Node4-Sem)
9985 5 => False), -- Etype (Node5-Sem)
9986
9987 N_Op_Le =>
9988 (1 => True, -- Chars (Name1)
9989 2 => True, -- Left_Opnd (Node2)
9990 3 => True, -- Right_Opnd (Node3)
9991 4 => False, -- Entity (Node4-Sem)
9992 5 => False), -- Etype (Node5-Sem)
9993
9994 N_Op_Gt =>
9995 (1 => True, -- Chars (Name1)
9996 2 => True, -- Left_Opnd (Node2)
9997 3 => True, -- Right_Opnd (Node3)
9998 4 => False, -- Entity (Node4-Sem)
9999 5 => False), -- Etype (Node5-Sem)
10000
10001 N_Op_Ge =>
10002 (1 => True, -- Chars (Name1)
10003 2 => True, -- Left_Opnd (Node2)
10004 3 => True, -- Right_Opnd (Node3)
10005 4 => False, -- Entity (Node4-Sem)
10006 5 => False), -- Etype (Node5-Sem)
10007
10008 N_Op_Add =>
10009 (1 => True, -- Chars (Name1)
10010 2 => True, -- Left_Opnd (Node2)
10011 3 => True, -- Right_Opnd (Node3)
10012 4 => False, -- Entity (Node4-Sem)
10013 5 => False), -- Etype (Node5-Sem)
10014
10015 N_Op_Subtract =>
10016 (1 => True, -- Chars (Name1)
10017 2 => True, -- Left_Opnd (Node2)
10018 3 => True, -- Right_Opnd (Node3)
10019 4 => False, -- Entity (Node4-Sem)
10020 5 => False), -- Etype (Node5-Sem)
10021
10022 N_Op_Concat =>
10023 (1 => True, -- Chars (Name1)
10024 2 => True, -- Left_Opnd (Node2)
10025 3 => True, -- Right_Opnd (Node3)
10026 4 => False, -- Entity (Node4-Sem)
10027 5 => False), -- Etype (Node5-Sem)
10028
10029 N_Op_Multiply =>
10030 (1 => True, -- Chars (Name1)
10031 2 => True, -- Left_Opnd (Node2)
10032 3 => True, -- Right_Opnd (Node3)
10033 4 => False, -- Entity (Node4-Sem)
10034 5 => False), -- Etype (Node5-Sem)
10035
10036 N_Op_Divide =>
10037 (1 => True, -- Chars (Name1)
10038 2 => True, -- Left_Opnd (Node2)
10039 3 => True, -- Right_Opnd (Node3)
10040 4 => False, -- Entity (Node4-Sem)
10041 5 => False), -- Etype (Node5-Sem)
10042
10043 N_Op_Mod =>
10044 (1 => True, -- Chars (Name1)
10045 2 => True, -- Left_Opnd (Node2)
10046 3 => True, -- Right_Opnd (Node3)
10047 4 => False, -- Entity (Node4-Sem)
10048 5 => False), -- Etype (Node5-Sem)
10049
10050 N_Op_Rem =>
10051 (1 => True, -- Chars (Name1)
10052 2 => True, -- Left_Opnd (Node2)
10053 3 => True, -- Right_Opnd (Node3)
10054 4 => False, -- Entity (Node4-Sem)
10055 5 => False), -- Etype (Node5-Sem)
10056
10057 N_Op_Expon =>
10058 (1 => True, -- Chars (Name1)
10059 2 => True, -- Left_Opnd (Node2)
10060 3 => True, -- Right_Opnd (Node3)
10061 4 => False, -- Entity (Node4-Sem)
10062 5 => False), -- Etype (Node5-Sem)
10063
10064 N_Op_Plus =>
10065 (1 => True, -- Chars (Name1)
10066 2 => False, -- unused
10067 3 => True, -- Right_Opnd (Node3)
10068 4 => False, -- Entity (Node4-Sem)
10069 5 => False), -- Etype (Node5-Sem)
10070
10071 N_Op_Minus =>
10072 (1 => True, -- Chars (Name1)
10073 2 => False, -- unused
10074 3 => True, -- Right_Opnd (Node3)
10075 4 => False, -- Entity (Node4-Sem)
10076 5 => False), -- Etype (Node5-Sem)
10077
10078 N_Op_Abs =>
10079 (1 => True, -- Chars (Name1)
10080 2 => False, -- unused
10081 3 => True, -- Right_Opnd (Node3)
10082 4 => False, -- Entity (Node4-Sem)
10083 5 => False), -- Etype (Node5-Sem)
10084
10085 N_Op_Not =>
10086 (1 => True, -- Chars (Name1)
10087 2 => False, -- unused
10088 3 => True, -- Right_Opnd (Node3)
10089 4 => False, -- Entity (Node4-Sem)
10090 5 => False), -- Etype (Node5-Sem)
10091
10092 N_Type_Conversion =>
10093 (1 => False, -- unused
10094 2 => False, -- unused
10095 3 => True, -- Expression (Node3)
10096 4 => True, -- Subtype_Mark (Node4)
10097 5 => False), -- Etype (Node5-Sem)
10098
10099 N_Qualified_Expression =>
10100 (1 => False, -- unused
10101 2 => False, -- unused
10102 3 => True, -- Expression (Node3)
10103 4 => True, -- Subtype_Mark (Node4)
10104 5 => False), -- Etype (Node5-Sem)
10105
10106 N_Allocator =>
10107 (1 => False, -- Storage_Pool (Node1-Sem)
10108 2 => False, -- Procedure_To_Call (Node2-Sem)
10109 3 => True, -- Expression (Node3)
10110 4 => False, -- Coextensions (Elist4-Sem)
10111 5 => False), -- Etype (Node5-Sem)
10112
10113 N_Null_Statement =>
10114 (1 => False, -- unused
10115 2 => False, -- unused
10116 3 => False, -- unused
10117 4 => False, -- unused
10118 5 => False), -- unused
10119
10120 N_Label =>
10121 (1 => True, -- Identifier (Node1)
10122 2 => False, -- unused
10123 3 => False, -- unused
10124 4 => False, -- unused
10125 5 => False), -- unused
10126
10127 N_Assignment_Statement =>
10128 (1 => False, -- unused
10129 2 => True, -- Name (Node2)
10130 3 => True, -- Expression (Node3)
10131 4 => False, -- unused
10132 5 => False), -- unused
10133
10134 N_If_Statement =>
10135 (1 => True, -- Condition (Node1)
10136 2 => True, -- Then_Statements (List2)
10137 3 => True, -- Elsif_Parts (List3)
10138 4 => True, -- Else_Statements (List4)
10139 5 => True), -- End_Span (Uint5)
10140
10141 N_Elsif_Part =>
10142 (1 => True, -- Condition (Node1)
10143 2 => True, -- Then_Statements (List2)
10144 3 => False, -- Condition_Actions (List3-Sem)
10145 4 => False, -- unused
10146 5 => False), -- unused
10147
10148 N_Case_Statement =>
10149 (1 => False, -- unused
10150 2 => False, -- unused
10151 3 => True, -- Expression (Node3)
10152 4 => True, -- Alternatives (List4)
10153 5 => True), -- End_Span (Uint5)
10154
10155 N_Case_Statement_Alternative =>
10156 (1 => False, -- unused
10157 2 => False, -- unused
10158 3 => True, -- Statements (List3)
10159 4 => True, -- Discrete_Choices (List4)
10160 5 => False), -- unused
10161
10162 N_Loop_Statement =>
10163 (1 => True, -- Identifier (Node1)
10164 2 => True, -- Iteration_Scheme (Node2)
10165 3 => True, -- Statements (List3)
10166 4 => True, -- End_Label (Node4)
10167 5 => False), -- unused
10168
10169 N_Iteration_Scheme =>
10170 (1 => True, -- Condition (Node1)
10171 2 => False, -- unused
10172 3 => False, -- Condition_Actions (List3-Sem)
10173 4 => True, -- Loop_Parameter_Specification (Node4)
10174 5 => False), -- unused
10175
10176 N_Loop_Parameter_Specification =>
10177 (1 => True, -- Defining_Identifier (Node1)
10178 2 => False, -- unused
10179 3 => False, -- unused
10180 4 => True, -- Discrete_Subtype_Definition (Node4)
10181 5 => False), -- unused
10182
10183 N_Block_Statement =>
10184 (1 => True, -- Identifier (Node1)
10185 2 => True, -- Declarations (List2)
10186 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10187 4 => True, -- Handled_Statement_Sequence (Node4)
10188 5 => False), -- unused
10189
10190 N_Exit_Statement =>
10191 (1 => True, -- Condition (Node1)
10192 2 => True, -- Name (Node2)
10193 3 => False, -- unused
10194 4 => False, -- unused
10195 5 => False), -- unused
10196
10197 N_Goto_Statement =>
10198 (1 => False, -- unused
10199 2 => True, -- Name (Node2)
10200 3 => False, -- unused
10201 4 => False, -- unused
10202 5 => False), -- unused
10203
10204 N_Subprogram_Declaration =>
10205 (1 => True, -- Specification (Node1)
10206 2 => False, -- unused
10207 3 => False, -- Body_To_Inline (Node3-Sem)
10208 4 => False, -- Parent_Spec (Node4-Sem)
10209 5 => False), -- Corresponding_Body (Node5-Sem)
10210
10211 N_Abstract_Subprogram_Declaration =>
10212 (1 => True, -- Specification (Node1)
10213 2 => False, -- unused
10214 3 => False, -- unused
10215 4 => False, -- unused
10216 5 => False), -- unused
10217
10218 N_Function_Specification =>
10219 (1 => True, -- Defining_Unit_Name (Node1)
10220 2 => False, -- Elaboration_Boolean (Node2-Sem)
10221 3 => True, -- Parameter_Specifications (List3)
10222 4 => True, -- Result_Definition (Node4)
10223 5 => False), -- Generic_Parent (Node5-Sem)
10224
10225 N_Procedure_Specification =>
10226 (1 => True, -- Defining_Unit_Name (Node1)
10227 2 => False, -- Elaboration_Boolean (Node2-Sem)
10228 3 => True, -- Parameter_Specifications (List3)
10229 4 => False, -- unused
10230 5 => False), -- Generic_Parent (Node5-Sem)
10231
10232 N_Designator =>
10233 (1 => True, -- Identifier (Node1)
10234 2 => True, -- Name (Node2)
10235 3 => False, -- unused
10236 4 => False, -- unused
10237 5 => False), -- unused
10238
10239 N_Defining_Program_Unit_Name =>
10240 (1 => True, -- Defining_Identifier (Node1)
10241 2 => True, -- Name (Node2)
10242 3 => False, -- unused
10243 4 => False, -- unused
10244 5 => False), -- unused
10245
10246 N_Operator_Symbol =>
10247 (1 => True, -- Chars (Name1)
10248 2 => False, -- unused
10249 3 => True, -- Strval (Str3)
10250 4 => False, -- Entity (Node4-Sem)
10251 5 => False), -- Etype (Node5-Sem)
10252
10253 N_Defining_Operator_Symbol =>
10254 (1 => True, -- Chars (Name1)
10255 2 => False, -- Next_Entity (Node2-Sem)
10256 3 => False, -- Scope (Node3-Sem)
10257 4 => False, -- unused
10258 5 => False), -- Etype (Node5-Sem)
10259
10260 N_Parameter_Specification =>
10261 (1 => True, -- Defining_Identifier (Node1)
10262 2 => True, -- Parameter_Type (Node2)
10263 3 => True, -- Expression (Node3)
10264 4 => False, -- unused
10265 5 => False), -- Default_Expression (Node5-Sem)
10266
10267 N_Subprogram_Body =>
10268 (1 => True, -- Specification (Node1)
10269 2 => True, -- Declarations (List2)
10270 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10271 4 => True, -- Handled_Statement_Sequence (Node4)
10272 5 => False), -- Corresponding_Spec (Node5-Sem)
10273
10274 N_Procedure_Call_Statement =>
10275 (1 => False, -- Controlling_Argument (Node1-Sem)
10276 2 => True, -- Name (Node2)
10277 3 => True, -- Parameter_Associations (List3)
10278 4 => False, -- First_Named_Actual (Node4-Sem)
10279 5 => False), -- Etype (Node5-Sem)
10280
10281 N_Function_Call =>
10282 (1 => False, -- Controlling_Argument (Node1-Sem)
10283 2 => True, -- Name (Node2)
10284 3 => True, -- Parameter_Associations (List3)
10285 4 => False, -- First_Named_Actual (Node4-Sem)
10286 5 => False), -- Etype (Node5-Sem)
10287
10288 N_Parameter_Association =>
10289 (1 => False, -- unused
10290 2 => True, -- Selector_Name (Node2)
10291 3 => True, -- Explicit_Actual_Parameter (Node3)
10292 4 => False, -- Next_Named_Actual (Node4-Sem)
10293 5 => False), -- unused
10294
10295 N_Return_Statement =>
10296 (1 => False, -- Storage_Pool (Node1-Sem)
10297 2 => False, -- Procedure_To_Call (Node2-Sem)
10298 3 => True, -- Expression (Node3)
10299 4 => False, -- unused
10300 5 => False), -- Return_Statement_Entity (Node5-Sem)
10301
10302 N_Extended_Return_Statement =>
10303 (1 => False, -- Storage_Pool (Node1-Sem)
10304 2 => False, -- Procedure_To_Call (Node2-Sem)
10305 3 => True, -- Return_Object_Declarations (List3)
10306 4 => True, -- Handled_Statement_Sequence (Node4)
10307 5 => False), -- Return_Statement_Entity (Node5-Sem)
10308
10309 N_Package_Declaration =>
10310 (1 => True, -- Specification (Node1)
10311 2 => False, -- unused
10312 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10313 4 => False, -- Parent_Spec (Node4-Sem)
10314 5 => False), -- Corresponding_Body (Node5-Sem)
10315
10316 N_Package_Specification =>
10317 (1 => True, -- Defining_Unit_Name (Node1)
10318 2 => True, -- Visible_Declarations (List2)
10319 3 => True, -- Private_Declarations (List3)
10320 4 => True, -- End_Label (Node4)
10321 5 => False), -- Generic_Parent (Node5-Sem)
10322
10323 N_Package_Body =>
10324 (1 => True, -- Defining_Unit_Name (Node1)
10325 2 => True, -- Declarations (List2)
10326 3 => False, -- unused
10327 4 => True, -- Handled_Statement_Sequence (Node4)
10328 5 => False), -- Corresponding_Spec (Node5-Sem)
10329
10330 N_Private_Type_Declaration =>
10331 (1 => True, -- Defining_Identifier (Node1)
10332 2 => False, -- unused
10333 3 => False, -- unused
10334 4 => True, -- Discriminant_Specifications (List4)
10335 5 => False), -- unused
10336
10337 N_Private_Extension_Declaration =>
10338 (1 => True, -- Defining_Identifier (Node1)
10339 2 => True, -- Interface_List (List2)
10340 3 => False, -- unused
10341 4 => True, -- Discriminant_Specifications (List4)
10342 5 => True), -- Subtype_Indication (Node5)
10343
10344 N_Use_Package_Clause =>
10345 (1 => False, -- unused
10346 2 => True, -- Names (List2)
10347 3 => False, -- Next_Use_Clause (Node3-Sem)
10348 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10349 5 => False), -- unused
10350
10351 N_Use_Type_Clause =>
10352 (1 => False, -- unused
10353 2 => True, -- Subtype_Marks (List2)
10354 3 => False, -- Next_Use_Clause (Node3-Sem)
10355 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10356 5 => False), -- unused
10357
10358 N_Object_Renaming_Declaration =>
10359 (1 => True, -- Defining_Identifier (Node1)
10360 2 => True, -- Name (Node2)
10361 3 => True, -- Access_Definition (Node3)
10362 4 => True, -- Subtype_Mark (Node4)
10363 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
10364
10365 N_Exception_Renaming_Declaration =>
10366 (1 => True, -- Defining_Identifier (Node1)
10367 2 => True, -- Name (Node2)
10368 3 => False, -- unused
10369 4 => False, -- unused
10370 5 => False), -- unused
10371
10372 N_Package_Renaming_Declaration =>
10373 (1 => True, -- Defining_Unit_Name (Node1)
10374 2 => True, -- Name (Node2)
10375 3 => False, -- unused
10376 4 => False, -- Parent_Spec (Node4-Sem)
10377 5 => False), -- unused
10378
10379 N_Subprogram_Renaming_Declaration =>
10380 (1 => True, -- Specification (Node1)
10381 2 => True, -- Name (Node2)
10382 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
10383 4 => False, -- Parent_Spec (Node4-Sem)
10384 5 => False), -- Corresponding_Spec (Node5-Sem)
10385
10386 N_Generic_Package_Renaming_Declaration =>
10387 (1 => True, -- Defining_Unit_Name (Node1)
10388 2 => True, -- Name (Node2)
10389 3 => False, -- unused
10390 4 => False, -- Parent_Spec (Node4-Sem)
10391 5 => False), -- unused
10392
10393 N_Generic_Procedure_Renaming_Declaration =>
10394 (1 => True, -- Defining_Unit_Name (Node1)
10395 2 => True, -- Name (Node2)
10396 3 => False, -- unused
10397 4 => False, -- Parent_Spec (Node4-Sem)
10398 5 => False), -- unused
10399
10400 N_Generic_Function_Renaming_Declaration =>
10401 (1 => True, -- Defining_Unit_Name (Node1)
10402 2 => True, -- Name (Node2)
10403 3 => False, -- unused
10404 4 => False, -- Parent_Spec (Node4-Sem)
10405 5 => False), -- unused
10406
10407 N_Task_Type_Declaration =>
10408 (1 => True, -- Defining_Identifier (Node1)
10409 2 => True, -- Interface_List (List2)
10410 3 => True, -- Task_Definition (Node3)
10411 4 => True, -- Discriminant_Specifications (List4)
10412 5 => False), -- Corresponding_Body (Node5-Sem)
10413
10414 N_Single_Task_Declaration =>
10415 (1 => True, -- Defining_Identifier (Node1)
10416 2 => True, -- Interface_List (List2)
10417 3 => True, -- Task_Definition (Node3)
10418 4 => False, -- unused
10419 5 => False), -- unused
10420
10421 N_Task_Definition =>
10422 (1 => False, -- unused
10423 2 => True, -- Visible_Declarations (List2)
10424 3 => True, -- Private_Declarations (List3)
10425 4 => True, -- End_Label (Node4)
10426 5 => False), -- unused
10427
10428 N_Task_Body =>
10429 (1 => True, -- Defining_Identifier (Node1)
10430 2 => True, -- Declarations (List2)
10431 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10432 4 => True, -- Handled_Statement_Sequence (Node4)
10433 5 => False), -- Corresponding_Spec (Node5-Sem)
10434
10435 N_Protected_Type_Declaration =>
10436 (1 => True, -- Defining_Identifier (Node1)
10437 2 => True, -- Interface_List (List2)
10438 3 => True, -- Protected_Definition (Node3)
10439 4 => True, -- Discriminant_Specifications (List4)
10440 5 => False), -- Corresponding_Body (Node5-Sem)
10441
10442 N_Single_Protected_Declaration =>
10443 (1 => True, -- Defining_Identifier (Node1)
10444 2 => True, -- Interface_List (List2)
10445 3 => True, -- Protected_Definition (Node3)
10446 4 => False, -- unused
10447 5 => False), -- unused
10448
10449 N_Protected_Definition =>
10450 (1 => False, -- unused
10451 2 => True, -- Visible_Declarations (List2)
10452 3 => True, -- Private_Declarations (List3)
10453 4 => True, -- End_Label (Node4)
10454 5 => False), -- unused
10455
10456 N_Protected_Body =>
10457 (1 => True, -- Defining_Identifier (Node1)
10458 2 => True, -- Declarations (List2)
10459 3 => False, -- unused
10460 4 => True, -- End_Label (Node4)
10461 5 => False), -- Corresponding_Spec (Node5-Sem)
10462
10463 N_Entry_Declaration =>
10464 (1 => True, -- Defining_Identifier (Node1)
10465 2 => False, -- unused
10466 3 => True, -- Parameter_Specifications (List3)
10467 4 => True, -- Discrete_Subtype_Definition (Node4)
10468 5 => False), -- Corresponding_Body (Node5-Sem)
10469
10470 N_Accept_Statement =>
10471 (1 => True, -- Entry_Direct_Name (Node1)
10472 2 => True, -- Declarations (List2)
10473 3 => True, -- Parameter_Specifications (List3)
10474 4 => True, -- Handled_Statement_Sequence (Node4)
10475 5 => True), -- Entry_Index (Node5)
10476
10477 N_Entry_Body =>
10478 (1 => True, -- Defining_Identifier (Node1)
10479 2 => True, -- Declarations (List2)
10480 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10481 4 => True, -- Handled_Statement_Sequence (Node4)
10482 5 => True), -- Entry_Body_Formal_Part (Node5)
10483
10484 N_Entry_Body_Formal_Part =>
10485 (1 => True, -- Condition (Node1)
10486 2 => False, -- unused
10487 3 => True, -- Parameter_Specifications (List3)
10488 4 => True, -- Entry_Index_Specification (Node4)
10489 5 => False), -- unused
10490
10491 N_Entry_Index_Specification =>
10492 (1 => True, -- Defining_Identifier (Node1)
10493 2 => False, -- unused
10494 3 => False, -- unused
10495 4 => True, -- Discrete_Subtype_Definition (Node4)
10496 5 => False), -- unused
10497
10498 N_Entry_Call_Statement =>
10499 (1 => False, -- unused
10500 2 => True, -- Name (Node2)
10501 3 => True, -- Parameter_Associations (List3)
10502 4 => False, -- First_Named_Actual (Node4-Sem)
10503 5 => False), -- unused
10504
10505 N_Requeue_Statement =>
10506 (1 => False, -- unused
10507 2 => True, -- Name (Node2)
10508 3 => False, -- unused
10509 4 => False, -- unused
10510 5 => False), -- unused
10511
10512 N_Delay_Until_Statement =>
10513 (1 => False, -- unused
10514 2 => False, -- unused
10515 3 => True, -- Expression (Node3)
10516 4 => False, -- unused
10517 5 => False), -- unused
10518
10519 N_Delay_Relative_Statement =>
10520 (1 => False, -- unused
10521 2 => False, -- unused
10522 3 => True, -- Expression (Node3)
10523 4 => False, -- unused
10524 5 => False), -- unused
10525
10526 N_Selective_Accept =>
10527 (1 => True, -- Select_Alternatives (List1)
10528 2 => False, -- unused
10529 3 => False, -- unused
10530 4 => True, -- Else_Statements (List4)
10531 5 => False), -- unused
10532
10533 N_Accept_Alternative =>
10534 (1 => True, -- Condition (Node1)
10535 2 => True, -- Accept_Statement (Node2)
10536 3 => True, -- Statements (List3)
10537 4 => True, -- Pragmas_Before (List4)
10538 5 => False), -- Accept_Handler_Records (List5-Sem)
10539
10540 N_Delay_Alternative =>
10541 (1 => True, -- Condition (Node1)
10542 2 => True, -- Delay_Statement (Node2)
10543 3 => True, -- Statements (List3)
10544 4 => True, -- Pragmas_Before (List4)
10545 5 => False), -- unused
10546
10547 N_Terminate_Alternative =>
10548 (1 => True, -- Condition (Node1)
10549 2 => False, -- unused
10550 3 => False, -- unused
10551 4 => True, -- Pragmas_Before (List4)
10552 5 => True), -- Pragmas_After (List5)
10553
10554 N_Timed_Entry_Call =>
10555 (1 => True, -- Entry_Call_Alternative (Node1)
10556 2 => False, -- unused
10557 3 => False, -- unused
10558 4 => True, -- Delay_Alternative (Node4)
10559 5 => False), -- unused
10560
10561 N_Entry_Call_Alternative =>
10562 (1 => True, -- Entry_Call_Statement (Node1)
10563 2 => False, -- unused
10564 3 => True, -- Statements (List3)
10565 4 => True, -- Pragmas_Before (List4)
10566 5 => False), -- unused
10567
10568 N_Conditional_Entry_Call =>
10569 (1 => True, -- Entry_Call_Alternative (Node1)
10570 2 => False, -- unused
10571 3 => False, -- unused
10572 4 => True, -- Else_Statements (List4)
10573 5 => False), -- unused
10574
10575 N_Asynchronous_Select =>
10576 (1 => True, -- Triggering_Alternative (Node1)
10577 2 => True, -- Abortable_Part (Node2)
10578 3 => False, -- unused
10579 4 => False, -- unused
10580 5 => False), -- unused
10581
10582 N_Triggering_Alternative =>
10583 (1 => True, -- Triggering_Statement (Node1)
10584 2 => False, -- unused
10585 3 => True, -- Statements (List3)
10586 4 => True, -- Pragmas_Before (List4)
10587 5 => False), -- unused
10588
10589 N_Abortable_Part =>
10590 (1 => False, -- unused
10591 2 => False, -- unused
10592 3 => True, -- Statements (List3)
10593 4 => False, -- unused
10594 5 => False), -- unused
10595
10596 N_Abort_Statement =>
10597 (1 => False, -- unused
10598 2 => True, -- Names (List2)
10599 3 => False, -- unused
10600 4 => False, -- unused
10601 5 => False), -- unused
10602
10603 N_Compilation_Unit =>
10604 (1 => True, -- Context_Items (List1)
10605 2 => True, -- Unit (Node2)
10606 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
10607 4 => False, -- Library_Unit (Node4-Sem)
10608 5 => True), -- Aux_Decls_Node (Node5)
10609
10610 N_Compilation_Unit_Aux =>
10611 (1 => True, -- Actions (List1)
10612 2 => True, -- Declarations (List2)
10613 3 => False, -- unused
10614 4 => True, -- Config_Pragmas (List4)
10615 5 => True), -- Pragmas_After (List5)
10616
10617 N_With_Clause =>
10618 (1 => False, -- unused
10619 2 => True, -- Name (Node2)
10620 3 => False, -- unused
10621 4 => False, -- Library_Unit (Node4-Sem)
10622 5 => False), -- Corresponding_Spec (Node5-Sem)
10623
10624 N_Subprogram_Body_Stub =>
10625 (1 => True, -- Specification (Node1)
10626 2 => False, -- unused
10627 3 => False, -- unused
10628 4 => False, -- Library_Unit (Node4-Sem)
10629 5 => False), -- Corresponding_Body (Node5-Sem)
10630
10631 N_Package_Body_Stub =>
10632 (1 => True, -- Defining_Identifier (Node1)
10633 2 => False, -- unused
10634 3 => False, -- unused
10635 4 => False, -- Library_Unit (Node4-Sem)
10636 5 => False), -- Corresponding_Body (Node5-Sem)
10637
10638 N_Task_Body_Stub =>
10639 (1 => True, -- Defining_Identifier (Node1)
10640 2 => False, -- unused
10641 3 => False, -- unused
10642 4 => False, -- Library_Unit (Node4-Sem)
10643 5 => False), -- Corresponding_Body (Node5-Sem)
10644
10645 N_Protected_Body_Stub =>
10646 (1 => True, -- Defining_Identifier (Node1)
10647 2 => False, -- unused
10648 3 => False, -- unused
10649 4 => False, -- Library_Unit (Node4-Sem)
10650 5 => False), -- Corresponding_Body (Node5-Sem)
10651
10652 N_Subunit =>
10653 (1 => True, -- Proper_Body (Node1)
10654 2 => True, -- Name (Node2)
10655 3 => False, -- Corresponding_Stub (Node3-Sem)
10656 4 => False, -- unused
10657 5 => False), -- unused
10658
10659 N_Exception_Declaration =>
10660 (1 => True, -- Defining_Identifier (Node1)
10661 2 => False, -- unused
10662 3 => False, -- Expression (Node3-Sem)
10663 4 => False, -- unused
10664 5 => False), -- unused
10665
10666 N_Handled_Sequence_Of_Statements =>
10667 (1 => True, -- At_End_Proc (Node1)
10668 2 => False, -- First_Real_Statement (Node2-Sem)
10669 3 => True, -- Statements (List3)
10670 4 => True, -- End_Label (Node4)
10671 5 => True), -- Exception_Handlers (List5)
10672
10673 N_Exception_Handler =>
10674 (1 => False, -- Local_Raise_Statements (Elist1)
10675 2 => True, -- Choice_Parameter (Node2)
10676 3 => True, -- Statements (List3)
10677 4 => True, -- Exception_Choices (List4)
10678 5 => False), -- Exception_Label (Node5)
10679
10680 N_Raise_Statement =>
10681 (1 => False, -- unused
10682 2 => True, -- Name (Node2)
10683 3 => True, -- Expression (Node3)
10684 4 => False, -- unused
10685 5 => False), -- unused
10686
10687 N_Generic_Subprogram_Declaration =>
10688 (1 => True, -- Specification (Node1)
10689 2 => True, -- Generic_Formal_Declarations (List2)
10690 3 => False, -- unused
10691 4 => False, -- Parent_Spec (Node4-Sem)
10692 5 => False), -- Corresponding_Body (Node5-Sem)
10693
10694 N_Generic_Package_Declaration =>
10695 (1 => True, -- Specification (Node1)
10696 2 => True, -- Generic_Formal_Declarations (List2)
10697 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10698 4 => False, -- Parent_Spec (Node4-Sem)
10699 5 => False), -- Corresponding_Body (Node5-Sem)
10700
10701 N_Package_Instantiation =>
10702 (1 => True, -- Defining_Unit_Name (Node1)
10703 2 => True, -- Name (Node2)
10704 3 => True, -- Generic_Associations (List3)
10705 4 => False, -- Parent_Spec (Node4-Sem)
10706 5 => False), -- Instance_Spec (Node5-Sem)
10707
10708 N_Procedure_Instantiation =>
10709 (1 => True, -- Defining_Unit_Name (Node1)
10710 2 => True, -- Name (Node2)
10711 3 => True, -- Generic_Associations (List3)
10712 4 => False, -- Parent_Spec (Node4-Sem)
10713 5 => False), -- Instance_Spec (Node5-Sem)
10714
10715 N_Function_Instantiation =>
10716 (1 => True, -- Defining_Unit_Name (Node1)
10717 2 => True, -- Name (Node2)
10718 3 => True, -- Generic_Associations (List3)
10719 4 => False, -- Parent_Spec (Node4-Sem)
10720 5 => False), -- Instance_Spec (Node5-Sem)
10721
10722 N_Generic_Association =>
10723 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
10724 2 => True, -- Selector_Name (Node2)
10725 3 => False, -- unused
10726 4 => False, -- unused
10727 5 => False), -- unused
10728
10729 N_Formal_Object_Declaration =>
10730 (1 => True, -- Defining_Identifier (Node1)
10731 2 => False, -- unused
10732 3 => True, -- Access_Definition (Node3)
10733 4 => True, -- Subtype_Mark (Node4)
10734 5 => True), -- Default_Expression (Node5)
10735
10736 N_Formal_Type_Declaration =>
10737 (1 => True, -- Defining_Identifier (Node1)
10738 2 => False, -- unused
10739 3 => True, -- Formal_Type_Definition (Node3)
10740 4 => True, -- Discriminant_Specifications (List4)
10741 5 => False), -- unused
10742
10743 N_Formal_Private_Type_Definition =>
10744 (1 => False, -- unused
10745 2 => False, -- unused
10746 3 => False, -- unused
10747 4 => False, -- unused
10748 5 => False), -- unused
10749
10750 N_Formal_Derived_Type_Definition =>
10751 (1 => False, -- unused
10752 2 => True, -- Interface_List (List2)
10753 3 => False, -- unused
10754 4 => True, -- Subtype_Mark (Node4)
10755 5 => False), -- unused
10756
10757 N_Formal_Discrete_Type_Definition =>
10758 (1 => False, -- unused
10759 2 => False, -- unused
10760 3 => False, -- unused
10761 4 => False, -- unused
10762 5 => False), -- unused
10763
10764 N_Formal_Signed_Integer_Type_Definition =>
10765 (1 => False, -- unused
10766 2 => False, -- unused
10767 3 => False, -- unused
10768 4 => False, -- unused
10769 5 => False), -- unused
10770
10771 N_Formal_Modular_Type_Definition =>
10772 (1 => False, -- unused
10773 2 => False, -- unused
10774 3 => False, -- unused
10775 4 => False, -- unused
10776 5 => False), -- unused
10777
10778 N_Formal_Floating_Point_Definition =>
10779 (1 => False, -- unused
10780 2 => False, -- unused
10781 3 => False, -- unused
10782 4 => False, -- unused
10783 5 => False), -- unused
10784
10785 N_Formal_Ordinary_Fixed_Point_Definition =>
10786 (1 => False, -- unused
10787 2 => False, -- unused
10788 3 => False, -- unused
10789 4 => False, -- unused
10790 5 => False), -- unused
10791
10792 N_Formal_Decimal_Fixed_Point_Definition =>
10793 (1 => False, -- unused
10794 2 => False, -- unused
10795 3 => False, -- unused
10796 4 => False, -- unused
10797 5 => False), -- unused
10798
10799 N_Formal_Concrete_Subprogram_Declaration =>
10800 (1 => True, -- Specification (Node1)
10801 2 => True, -- Default_Name (Node2)
10802 3 => False, -- unused
10803 4 => False, -- unused
10804 5 => False), -- unused
10805
10806 N_Formal_Abstract_Subprogram_Declaration =>
10807 (1 => True, -- Specification (Node1)
10808 2 => True, -- Default_Name (Node2)
10809 3 => False, -- unused
10810 4 => False, -- unused
10811 5 => False), -- unused
10812
10813 N_Formal_Package_Declaration =>
10814 (1 => True, -- Defining_Identifier (Node1)
10815 2 => True, -- Name (Node2)
10816 3 => True, -- Generic_Associations (List3)
10817 4 => False, -- unused
10818 5 => False), -- Instance_Spec (Node5-Sem)
10819
10820 N_Attribute_Definition_Clause =>
10821 (1 => True, -- Chars (Name1)
10822 2 => True, -- Name (Node2)
10823 3 => True, -- Expression (Node3)
10824 4 => False, -- unused
10825 5 => False), -- Next_Rep_Item (Node5-Sem)
10826
10827 N_Enumeration_Representation_Clause =>
10828 (1 => True, -- Identifier (Node1)
10829 2 => False, -- unused
10830 3 => True, -- Array_Aggregate (Node3)
10831 4 => False, -- unused
10832 5 => False), -- Next_Rep_Item (Node5-Sem)
10833
10834 N_Record_Representation_Clause =>
10835 (1 => True, -- Identifier (Node1)
10836 2 => True, -- Mod_Clause (Node2)
10837 3 => True, -- Component_Clauses (List3)
10838 4 => False, -- unused
10839 5 => False), -- Next_Rep_Item (Node5-Sem)
10840
10841 N_Component_Clause =>
10842 (1 => True, -- Component_Name (Node1)
10843 2 => True, -- Position (Node2)
10844 3 => True, -- First_Bit (Node3)
10845 4 => True, -- Last_Bit (Node4)
10846 5 => False), -- unused
10847
10848 N_Code_Statement =>
10849 (1 => False, -- unused
10850 2 => False, -- unused
10851 3 => True, -- Expression (Node3)
10852 4 => False, -- unused
10853 5 => False), -- unused
10854
10855 N_Op_Rotate_Left =>
10856 (1 => True, -- Chars (Name1)
10857 2 => True, -- Left_Opnd (Node2)
10858 3 => True, -- Right_Opnd (Node3)
10859 4 => False, -- Entity (Node4-Sem)
10860 5 => False), -- Etype (Node5-Sem)
10861
10862 N_Op_Rotate_Right =>
10863 (1 => True, -- Chars (Name1)
10864 2 => True, -- Left_Opnd (Node2)
10865 3 => True, -- Right_Opnd (Node3)
10866 4 => False, -- Entity (Node4-Sem)
10867 5 => False), -- Etype (Node5-Sem)
10868
10869 N_Op_Shift_Left =>
10870 (1 => True, -- Chars (Name1)
10871 2 => True, -- Left_Opnd (Node2)
10872 3 => True, -- Right_Opnd (Node3)
10873 4 => False, -- Entity (Node4-Sem)
10874 5 => False), -- Etype (Node5-Sem)
10875
10876 N_Op_Shift_Right_Arithmetic =>
10877 (1 => True, -- Chars (Name1)
10878 2 => True, -- Left_Opnd (Node2)
10879 3 => True, -- Right_Opnd (Node3)
10880 4 => False, -- Entity (Node4-Sem)
10881 5 => False), -- Etype (Node5-Sem)
10882
10883 N_Op_Shift_Right =>
10884 (1 => True, -- Chars (Name1)
10885 2 => True, -- Left_Opnd (Node2)
10886 3 => True, -- Right_Opnd (Node3)
10887 4 => False, -- Entity (Node4-Sem)
10888 5 => False), -- Etype (Node5-Sem)
10889
10890 N_Delta_Constraint =>
10891 (1 => False, -- unused
10892 2 => False, -- unused
10893 3 => True, -- Delta_Expression (Node3)
10894 4 => True, -- Range_Constraint (Node4)
10895 5 => False), -- unused
10896
10897 N_At_Clause =>
10898 (1 => True, -- Identifier (Node1)
10899 2 => False, -- unused
10900 3 => True, -- Expression (Node3)
10901 4 => False, -- unused
10902 5 => False), -- unused
10903
10904 N_Mod_Clause =>
10905 (1 => False, -- unused
10906 2 => False, -- unused
10907 3 => True, -- Expression (Node3)
10908 4 => True, -- Pragmas_Before (List4)
10909 5 => False), -- unused
10910
10911 N_Conditional_Expression =>
10912 (1 => True, -- Expressions (List1)
10913 2 => False, -- Then_Actions (List2-Sem)
10914 3 => False, -- Else_Actions (List3-Sem)
10915 4 => False, -- unused
10916 5 => False), -- Etype (Node5-Sem)
10917
10918 N_Expanded_Name =>
10919 (1 => True, -- Chars (Name1)
10920 2 => True, -- Selector_Name (Node2)
10921 3 => True, -- Prefix (Node3)
10922 4 => False, -- Entity (Node4-Sem)
10923 5 => False), -- Etype (Node5-Sem)
10924
10925 N_Free_Statement =>
10926 (1 => False, -- Storage_Pool (Node1-Sem)
10927 2 => False, -- Procedure_To_Call (Node2-Sem)
10928 3 => True, -- Expression (Node3)
10929 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
10930 5 => False), -- unused
10931
10932 N_Freeze_Entity =>
10933 (1 => True, -- Actions (List1)
10934 2 => False, -- Access_Types_To_Process (Elist2-Sem)
10935 3 => False, -- TSS_Elist (Elist3-Sem)
10936 4 => False, -- Entity (Node4-Sem)
10937 5 => False), -- First_Subtype_Link (Node5-Sem)
10938
10939 N_Implicit_Label_Declaration =>
10940 (1 => True, -- Defining_Identifier (Node1)
10941 2 => False, -- Label_Construct (Node2-Sem)
10942 3 => False, -- unused
10943 4 => False, -- unused
10944 5 => False), -- unused
10945
10946 N_Itype_Reference =>
10947 (1 => False, -- Itype (Node1-Sem)
10948 2 => False, -- unused
10949 3 => False, -- unused
10950 4 => False, -- unused
10951 5 => False), -- unused
10952
10953 N_Raise_Constraint_Error =>
10954 (1 => True, -- Condition (Node1)
10955 2 => False, -- unused
10956 3 => True, -- Reason (Uint3)
10957 4 => False, -- unused
10958 5 => False), -- Etype (Node5-Sem)
10959
10960 N_Raise_Program_Error =>
10961 (1 => True, -- Condition (Node1)
10962 2 => False, -- unused
10963 3 => True, -- Reason (Uint3)
10964 4 => False, -- unused
10965 5 => False), -- Etype (Node5-Sem)
10966
10967 N_Raise_Storage_Error =>
10968 (1 => True, -- Condition (Node1)
10969 2 => False, -- unused
10970 3 => True, -- Reason (Uint3)
10971 4 => False, -- unused
10972 5 => False), -- Etype (Node5-Sem)
10973
10974 N_Push_Constraint_Error_Label =>
10975 (1 => False, -- unused
10976 2 => False, -- unused
10977 3 => False, -- unused
10978 4 => False, -- unused
10979 5 => False), -- unused
10980
10981 N_Push_Program_Error_Label =>
10982 (1 => False, -- Exception_Label
10983 2 => False, -- unused
10984 3 => False, -- unused
10985 4 => False, -- unused
10986 5 => False), -- Exception_Label
10987
10988 N_Push_Storage_Error_Label =>
10989 (1 => False, -- Exception_Label
10990 2 => False, -- unused
10991 3 => False, -- unused
10992 4 => False, -- unused
10993 5 => False), -- Exception_Label
10994
10995 N_Pop_Constraint_Error_Label =>
10996 (1 => False, -- unused
10997 2 => False, -- unused
10998 3 => False, -- unused
10999 4 => False, -- unused
11000 5 => False), -- unused
11001
11002 N_Pop_Program_Error_Label =>
11003 (1 => False, -- unused
11004 2 => False, -- unused
11005 3 => False, -- unused
11006 4 => False, -- unused
11007 5 => False), -- unused
11008
11009 N_Pop_Storage_Error_Label =>
11010 (1 => False, -- unused
11011 2 => False, -- unused
11012 3 => False, -- unused
11013 4 => False, -- unused
11014 5 => False), -- unused
11015
11016 N_Reference =>
11017 (1 => False, -- unused
11018 2 => False, -- unused
11019 3 => True, -- Prefix (Node3)
11020 4 => False, -- unused
11021 5 => False), -- Etype (Node5-Sem)
11022
11023 N_Subprogram_Info =>
11024 (1 => True, -- Identifier (Node1)
11025 2 => False, -- unused
11026 3 => False, -- unused
11027 4 => False, -- unused
11028 5 => False), -- Etype (Node5-Sem)
11029
11030 N_Unchecked_Expression =>
11031 (1 => False, -- unused
11032 2 => False, -- unused
11033 3 => True, -- Expression (Node3)
11034 4 => False, -- unused
11035 5 => False), -- Etype (Node5-Sem)
11036
11037 N_Unchecked_Type_Conversion =>
11038 (1 => False, -- unused
11039 2 => False, -- unused
11040 3 => True, -- Expression (Node3)
11041 4 => True, -- Subtype_Mark (Node4)
11042 5 => False), -- Etype (Node5-Sem)
11043
11044 N_Validate_Unchecked_Conversion =>
11045 (1 => False, -- Source_Type (Node1-Sem)
11046 2 => False, -- Target_Type (Node2-Sem)
11047 3 => False, -- unused
11048 4 => False, -- unused
11049 5 => False), -- unused
11050
11051 -- End of inserted output from makeisf program
11052
11053 -- Entries for SCIL nodes
11054
11055 N_SCIL_Dispatch_Table_Object_Init =>
11056 (1 => False, -- SCIL_Related_Node (Node1-Sem)
11057 2 => False, -- unused
11058 3 => False, -- unused
11059 4 => False, -- SCIL_Entity (Node4-Sem)
11060 5 => False), -- unused
11061
11062 N_SCIL_Dispatch_Table_Tag_Init =>
11063 (1 => False, -- SCIL_Related_Node (Node1-Sem)
11064 2 => False, -- unused
11065 3 => False, -- unused
11066 4 => False, -- SCIL_Entity (Node4-Sem)
11067 5 => False), -- unused
11068
11069 N_SCIL_Dispatching_Call =>
11070 (1 => False, -- SCIL_Related_Node (Node1-Sem)
11071 2 => False, -- SCIL_Target_Prim (Node2-Sem)
11072 3 => False, -- unused
11073 4 => False, -- SCIL_Entity (Node4-Sem)
11074 5 => False), -- SCIL_Controlling_Tag (Node5-Sem)
11075
11076 N_SCIL_Membership_Test =>
11077 (1 => False, -- SCIL_Related_Node (Node1-Sem)
11078 2 => False, -- unused
11079 3 => False, -- unused
11080 4 => False, -- SCIL_Entity (Node4-Sem)
11081 5 => False), -- SCIL_Tag_Value (Node5-Sem)
11082
11083 N_SCIL_Tag_Init =>
11084 (1 => False, -- SCIL_Related_Node (Node1-Sem)
11085 2 => False, -- unused
11086 3 => False, -- unused
11087 4 => False, -- SCIL_Entity (Node4-Sem)
11088 5 => False), -- unused
11089
11090 -- Entries for Empty, Error and Unused. Even thought these have a Chars
11091 -- field for debugging purposes, they are not really syntactic fields, so
11092 -- we mark all fields as unused.
11093
11094 N_Empty =>
11095 (1 => False, -- unused
11096 2 => False, -- unused
11097 3 => False, -- unused
11098 4 => False, -- unused
11099 5 => False), -- unused
11100
11101 N_Error =>
11102 (1 => False, -- unused
11103 2 => False, -- unused
11104 3 => False, -- unused
11105 4 => False, -- unused
11106 5 => False), -- unused
11107
11108 N_Unused_At_Start =>
11109 (1 => False, -- unused
11110 2 => False, -- unused
11111 3 => False, -- unused
11112 4 => False, -- unused
11113 5 => False), -- unused
11114
11115 N_Unused_At_End =>
11116 (1 => False, -- unused
11117 2 => False, -- unused
11118 3 => False, -- unused
11119 4 => False, -- unused
11120 5 => False)); -- unused
11121
11122 --------------------
11123 -- Inline Pragmas --
11124 --------------------
11125
11126 pragma Inline (ABE_Is_Certain);
11127 pragma Inline (Abort_Present);
11128 pragma Inline (Abortable_Part);
11129 pragma Inline (Abstract_Present);
11130 pragma Inline (Accept_Handler_Records);
11131 pragma Inline (Accept_Statement);
11132 pragma Inline (Access_Definition);
11133 pragma Inline (Access_To_Subprogram_Definition);
11134 pragma Inline (Access_Types_To_Process);
11135 pragma Inline (Actions);
11136 pragma Inline (Activation_Chain_Entity);
11137 pragma Inline (Acts_As_Spec);
11138 pragma Inline (Actual_Designated_Subtype);
11139 pragma Inline (Address_Warning_Posted);
11140 pragma Inline (Aggregate_Bounds);
11141 pragma Inline (Aliased_Present);
11142 pragma Inline (All_Others);
11143 pragma Inline (All_Present);
11144 pragma Inline (Alternatives);
11145 pragma Inline (Ancestor_Part);
11146 pragma Inline (Array_Aggregate);
11147 pragma Inline (Assignment_OK);
11148 pragma Inline (Associated_Node);
11149 pragma Inline (At_End_Proc);
11150 pragma Inline (Attribute_Name);
11151 pragma Inline (Aux_Decls_Node);
11152 pragma Inline (Backwards_OK);
11153 pragma Inline (Bad_Is_Detected);
11154 pragma Inline (Body_To_Inline);
11155 pragma Inline (Body_Required);
11156 pragma Inline (By_Ref);
11157 pragma Inline (Box_Present);
11158 pragma Inline (Char_Literal_Value);
11159 pragma Inline (Chars);
11160 pragma Inline (Check_Address_Alignment);
11161 pragma Inline (Choice_Parameter);
11162 pragma Inline (Choices);
11163 pragma Inline (Coextensions);
11164 pragma Inline (Comes_From_Extended_Return_Statement);
11165 pragma Inline (Compile_Time_Known_Aggregate);
11166 pragma Inline (Component_Associations);
11167 pragma Inline (Component_Clauses);
11168 pragma Inline (Component_Definition);
11169 pragma Inline (Component_Items);
11170 pragma Inline (Component_List);
11171 pragma Inline (Component_Name);
11172 pragma Inline (Componentwise_Assignment);
11173 pragma Inline (Condition);
11174 pragma Inline (Condition_Actions);
11175 pragma Inline (Config_Pragmas);
11176 pragma Inline (Constant_Present);
11177 pragma Inline (Constraint);
11178 pragma Inline (Constraints);
11179 pragma Inline (Context_Installed);
11180 pragma Inline (Context_Items);
11181 pragma Inline (Context_Pending);
11182 pragma Inline (Controlling_Argument);
11183 pragma Inline (Conversion_OK);
11184 pragma Inline (Corresponding_Body);
11185 pragma Inline (Corresponding_Formal_Spec);
11186 pragma Inline (Corresponding_Generic_Association);
11187 pragma Inline (Corresponding_Integer_Value);
11188 pragma Inline (Corresponding_Spec);
11189 pragma Inline (Corresponding_Stub);
11190 pragma Inline (Dcheck_Function);
11191 pragma Inline (Debug_Statement);
11192 pragma Inline (Declarations);
11193 pragma Inline (Default_Expression);
11194 pragma Inline (Default_Name);
11195 pragma Inline (Defining_Identifier);
11196 pragma Inline (Defining_Unit_Name);
11197 pragma Inline (Delay_Alternative);
11198 pragma Inline (Delay_Statement);
11199 pragma Inline (Delta_Expression);
11200 pragma Inline (Digits_Expression);
11201 pragma Inline (Discr_Check_Funcs_Built);
11202 pragma Inline (Discrete_Choices);
11203 pragma Inline (Discrete_Range);
11204 pragma Inline (Discrete_Subtype_Definition);
11205 pragma Inline (Discrete_Subtype_Definitions);
11206 pragma Inline (Discriminant_Specifications);
11207 pragma Inline (Discriminant_Type);
11208 pragma Inline (Do_Accessibility_Check);
11209 pragma Inline (Do_Discriminant_Check);
11210 pragma Inline (Do_Length_Check);
11211 pragma Inline (Do_Division_Check);
11212 pragma Inline (Do_Overflow_Check);
11213 pragma Inline (Do_Range_Check);
11214 pragma Inline (Do_Storage_Check);
11215 pragma Inline (Do_Tag_Check);
11216 pragma Inline (Elaborate_Present);
11217 pragma Inline (Elaborate_All_Desirable);
11218 pragma Inline (Elaborate_All_Present);
11219 pragma Inline (Elaborate_Desirable);
11220 pragma Inline (Elaboration_Boolean);
11221 pragma Inline (Else_Actions);
11222 pragma Inline (Else_Statements);
11223 pragma Inline (Elsif_Parts);
11224 pragma Inline (Enclosing_Variant);
11225 pragma Inline (End_Label);
11226 pragma Inline (End_Span);
11227 pragma Inline (Entity);
11228 pragma Inline (Entity_Or_Associated_Node);
11229 pragma Inline (Entry_Body_Formal_Part);
11230 pragma Inline (Entry_Call_Alternative);
11231 pragma Inline (Entry_Call_Statement);
11232 pragma Inline (Entry_Direct_Name);
11233 pragma Inline (Entry_Index);
11234 pragma Inline (Entry_Index_Specification);
11235 pragma Inline (Etype);
11236 pragma Inline (Exception_Choices);
11237 pragma Inline (Exception_Handlers);
11238 pragma Inline (Exception_Junk);
11239 pragma Inline (Exception_Label);
11240 pragma Inline (Expansion_Delayed);
11241 pragma Inline (Explicit_Actual_Parameter);
11242 pragma Inline (Explicit_Generic_Actual_Parameter);
11243 pragma Inline (Expression);
11244 pragma Inline (Expressions);
11245 pragma Inline (First_Bit);
11246 pragma Inline (First_Inlined_Subprogram);
11247 pragma Inline (First_Name);
11248 pragma Inline (First_Named_Actual);
11249 pragma Inline (First_Real_Statement);
11250 pragma Inline (First_Subtype_Link);
11251 pragma Inline (Float_Truncate);
11252 pragma Inline (Formal_Type_Definition);
11253 pragma Inline (Forwards_OK);
11254 pragma Inline (From_At_End);
11255 pragma Inline (From_At_Mod);
11256 pragma Inline (From_Default);
11257 pragma Inline (Generic_Associations);
11258 pragma Inline (Generic_Formal_Declarations);
11259 pragma Inline (Generic_Parent);
11260 pragma Inline (Generic_Parent_Type);
11261 pragma Inline (Handled_Statement_Sequence);
11262 pragma Inline (Handler_List_Entry);
11263 pragma Inline (Has_Created_Identifier);
11264 pragma Inline (Has_Dynamic_Length_Check);
11265 pragma Inline (Has_Dynamic_Range_Check);
11266 pragma Inline (Has_Init_Expression);
11267 pragma Inline (Has_Local_Raise);
11268 pragma Inline (Has_Self_Reference);
11269 pragma Inline (Has_No_Elaboration_Code);
11270 pragma Inline (Has_Priority_Pragma);
11271 pragma Inline (Has_Private_View);
11272 pragma Inline (Has_Relative_Deadline_Pragma);
11273 pragma Inline (Has_Storage_Size_Pragma);
11274 pragma Inline (Has_Task_Info_Pragma);
11275 pragma Inline (Has_Task_Name_Pragma);
11276 pragma Inline (Has_Wide_Character);
11277 pragma Inline (Hidden_By_Use_Clause);
11278 pragma Inline (High_Bound);
11279 pragma Inline (Identifier);
11280 pragma Inline (Implicit_With);
11281 pragma Inline (Interface_List);
11282 pragma Inline (Interface_Present);
11283 pragma Inline (Includes_Infinities);
11284 pragma Inline (In_Present);
11285 pragma Inline (Instance_Spec);
11286 pragma Inline (Intval);
11287 pragma Inline (Is_Accessibility_Actual);
11288 pragma Inline (Is_Asynchronous_Call_Block);
11289 pragma Inline (Is_Component_Left_Opnd);
11290 pragma Inline (Is_Component_Right_Opnd);
11291 pragma Inline (Is_Controlling_Actual);
11292 pragma Inline (Is_Dynamic_Coextension);
11293 pragma Inline (Is_Elsif);
11294 pragma Inline (Is_Entry_Barrier_Function);
11295 pragma Inline (Is_Expanded_Build_In_Place_Call);
11296 pragma Inline (Is_Folded_In_Parser);
11297 pragma Inline (Is_In_Discriminant_Check);
11298 pragma Inline (Is_Machine_Number);
11299 pragma Inline (Is_Null_Loop);
11300 pragma Inline (Is_Overloaded);
11301 pragma Inline (Is_Power_Of_2_For_Shift);
11302 pragma Inline (Is_Protected_Subprogram_Body);
11303 pragma Inline (Is_Static_Coextension);
11304 pragma Inline (Is_Static_Expression);
11305 pragma Inline (Is_Subprogram_Descriptor);
11306 pragma Inline (Is_Task_Allocation_Block);
11307 pragma Inline (Is_Task_Master);
11308 pragma Inline (Iteration_Scheme);
11309 pragma Inline (Itype);
11310 pragma Inline (Kill_Range_Check);
11311 pragma Inline (Last_Bit);
11312 pragma Inline (Last_Name);
11313 pragma Inline (Library_Unit);
11314 pragma Inline (Label_Construct);
11315 pragma Inline (Left_Opnd);
11316 pragma Inline (Limited_View_Installed);
11317 pragma Inline (Limited_Present);
11318 pragma Inline (Literals);
11319 pragma Inline (Local_Raise_Not_OK);
11320 pragma Inline (Local_Raise_Statements);
11321 pragma Inline (Loop_Actions);
11322 pragma Inline (Loop_Parameter_Specification);
11323 pragma Inline (Low_Bound);
11324 pragma Inline (Mod_Clause);
11325 pragma Inline (More_Ids);
11326 pragma Inline (Must_Be_Byte_Aligned);
11327 pragma Inline (Must_Not_Freeze);
11328 pragma Inline (Must_Not_Override);
11329 pragma Inline (Must_Override);
11330 pragma Inline (Name);
11331 pragma Inline (Names);
11332 pragma Inline (Next_Entity);
11333 pragma Inline (Next_Implicit_With);
11334 pragma Inline (Next_Named_Actual);
11335 pragma Inline (Next_Pragma);
11336 pragma Inline (Next_Rep_Item);
11337 pragma Inline (Next_Use_Clause);
11338 pragma Inline (No_Ctrl_Actions);
11339 pragma Inline (No_Elaboration_Check);
11340 pragma Inline (No_Entities_Ref_In_Spec);
11341 pragma Inline (No_Initialization);
11342 pragma Inline (No_Truncation);
11343 pragma Inline (Null_Present);
11344 pragma Inline (Null_Exclusion_Present);
11345 pragma Inline (Null_Exclusion_In_Return_Present);
11346 pragma Inline (Null_Record_Present);
11347 pragma Inline (Object_Definition);
11348 pragma Inline (Original_Discriminant);
11349 pragma Inline (Original_Entity);
11350 pragma Inline (Others_Discrete_Choices);
11351 pragma Inline (Out_Present);
11352 pragma Inline (Parameter_Associations);
11353 pragma Inline (Parameter_Specifications);
11354 pragma Inline (Parameter_List_Truncated);
11355 pragma Inline (Parameter_Type);
11356 pragma Inline (Parent_Spec);
11357 pragma Inline (PPC_Enabled);
11358 pragma Inline (Position);
11359 pragma Inline (Pragma_Argument_Associations);
11360 pragma Inline (Pragma_Identifier);
11361 pragma Inline (Pragmas_After);
11362 pragma Inline (Pragmas_Before);
11363 pragma Inline (Prefix);
11364 pragma Inline (Present_Expr);
11365 pragma Inline (Prev_Ids);
11366 pragma Inline (Print_In_Hex);
11367 pragma Inline (Private_Declarations);
11368 pragma Inline (Private_Present);
11369 pragma Inline (Procedure_To_Call);
11370 pragma Inline (Proper_Body);
11371 pragma Inline (Protected_Definition);
11372 pragma Inline (Protected_Present);
11373 pragma Inline (Raises_Constraint_Error);
11374 pragma Inline (Range_Constraint);
11375 pragma Inline (Range_Expression);
11376 pragma Inline (Real_Range_Specification);
11377 pragma Inline (Realval);
11378 pragma Inline (Reason);
11379 pragma Inline (Record_Extension_Part);
11380 pragma Inline (Redundant_Use);
11381 pragma Inline (Renaming_Exception);
11382 pragma Inline (Result_Definition);
11383 pragma Inline (Return_Object_Declarations);
11384 pragma Inline (Return_Statement_Entity);
11385 pragma Inline (Reverse_Present);
11386 pragma Inline (Right_Opnd);
11387 pragma Inline (Rounded_Result);
11388 pragma Inline (SCIL_Controlling_Tag);
11389 pragma Inline (SCIL_Entity);
11390 pragma Inline (SCIL_Related_Node);
11391 pragma Inline (SCIL_Tag_Value);
11392 pragma Inline (SCIL_Target_Prim);
11393 pragma Inline (Scope);
11394 pragma Inline (Select_Alternatives);
11395 pragma Inline (Selector_Name);
11396 pragma Inline (Selector_Names);
11397 pragma Inline (Shift_Count_OK);
11398 pragma Inline (Source_Type);
11399 pragma Inline (Specification);
11400 pragma Inline (Statements);
11401 pragma Inline (Static_Processing_OK);
11402 pragma Inline (Storage_Pool);
11403 pragma Inline (Strval);
11404 pragma Inline (Subtype_Indication);
11405 pragma Inline (Subtype_Mark);
11406 pragma Inline (Subtype_Marks);
11407 pragma Inline (Suppress_Loop_Warnings);
11408 pragma Inline (Synchronized_Present);
11409 pragma Inline (Tagged_Present);
11410 pragma Inline (Target_Type);
11411 pragma Inline (Task_Definition);
11412 pragma Inline (Task_Present);
11413 pragma Inline (Then_Actions);
11414 pragma Inline (Then_Statements);
11415 pragma Inline (Triggering_Alternative);
11416 pragma Inline (Triggering_Statement);
11417 pragma Inline (Treat_Fixed_As_Integer);
11418 pragma Inline (TSS_Elist);
11419 pragma Inline (Type_Definition);
11420 pragma Inline (Unit);
11421 pragma Inline (Unknown_Discriminants_Present);
11422 pragma Inline (Unreferenced_In_Spec);
11423 pragma Inline (Variant_Part);
11424 pragma Inline (Variants);
11425 pragma Inline (Visible_Declarations);
11426 pragma Inline (Was_Originally_Stub);
11427 pragma Inline (Zero_Cost_Handling);
11428
11429 pragma Inline (Set_ABE_Is_Certain);
11430 pragma Inline (Set_Abort_Present);
11431 pragma Inline (Set_Abortable_Part);
11432 pragma Inline (Set_Abstract_Present);
11433 pragma Inline (Set_Accept_Handler_Records);
11434 pragma Inline (Set_Accept_Statement);
11435 pragma Inline (Set_Access_Definition);
11436 pragma Inline (Set_Access_To_Subprogram_Definition);
11437 pragma Inline (Set_Access_Types_To_Process);
11438 pragma Inline (Set_Actions);
11439 pragma Inline (Set_Activation_Chain_Entity);
11440 pragma Inline (Set_Acts_As_Spec);
11441 pragma Inline (Set_Actual_Designated_Subtype);
11442 pragma Inline (Set_Address_Warning_Posted);
11443 pragma Inline (Set_Aggregate_Bounds);
11444 pragma Inline (Set_Aliased_Present);
11445 pragma Inline (Set_All_Others);
11446 pragma Inline (Set_All_Present);
11447 pragma Inline (Set_Alternatives);
11448 pragma Inline (Set_Ancestor_Part);
11449 pragma Inline (Set_Array_Aggregate);
11450 pragma Inline (Set_Assignment_OK);
11451 pragma Inline (Set_Associated_Node);
11452 pragma Inline (Set_At_End_Proc);
11453 pragma Inline (Set_Attribute_Name);
11454 pragma Inline (Set_Aux_Decls_Node);
11455 pragma Inline (Set_Backwards_OK);
11456 pragma Inline (Set_Bad_Is_Detected);
11457 pragma Inline (Set_Body_To_Inline);
11458 pragma Inline (Set_Body_Required);
11459 pragma Inline (Set_By_Ref);
11460 pragma Inline (Set_Box_Present);
11461 pragma Inline (Set_Char_Literal_Value);
11462 pragma Inline (Set_Chars);
11463 pragma Inline (Set_Check_Address_Alignment);
11464 pragma Inline (Set_Choice_Parameter);
11465 pragma Inline (Set_Choices);
11466 pragma Inline (Set_Coextensions);
11467 pragma Inline (Set_Comes_From_Extended_Return_Statement);
11468 pragma Inline (Set_Compile_Time_Known_Aggregate);
11469 pragma Inline (Set_Component_Associations);
11470 pragma Inline (Set_Component_Clauses);
11471 pragma Inline (Set_Component_Definition);
11472 pragma Inline (Set_Component_Items);
11473 pragma Inline (Set_Component_List);
11474 pragma Inline (Set_Component_Name);
11475 pragma Inline (Set_Componentwise_Assignment);
11476 pragma Inline (Set_Condition);
11477 pragma Inline (Set_Condition_Actions);
11478 pragma Inline (Set_Config_Pragmas);
11479 pragma Inline (Set_Constant_Present);
11480 pragma Inline (Set_Constraint);
11481 pragma Inline (Set_Constraints);
11482 pragma Inline (Set_Context_Installed);
11483 pragma Inline (Set_Context_Items);
11484 pragma Inline (Set_Context_Pending);
11485 pragma Inline (Set_Controlling_Argument);
11486 pragma Inline (Set_Conversion_OK);
11487 pragma Inline (Set_Corresponding_Body);
11488 pragma Inline (Set_Corresponding_Formal_Spec);
11489 pragma Inline (Set_Corresponding_Generic_Association);
11490 pragma Inline (Set_Corresponding_Integer_Value);
11491 pragma Inline (Set_Corresponding_Spec);
11492 pragma Inline (Set_Corresponding_Stub);
11493 pragma Inline (Set_Dcheck_Function);
11494 pragma Inline (Set_Debug_Statement);
11495 pragma Inline (Set_Declarations);
11496 pragma Inline (Set_Default_Expression);
11497 pragma Inline (Set_Default_Name);
11498 pragma Inline (Set_Defining_Identifier);
11499 pragma Inline (Set_Defining_Unit_Name);
11500 pragma Inline (Set_Delay_Alternative);
11501 pragma Inline (Set_Delay_Statement);
11502 pragma Inline (Set_Delta_Expression);
11503 pragma Inline (Set_Digits_Expression);
11504 pragma Inline (Set_Discr_Check_Funcs_Built);
11505 pragma Inline (Set_Discrete_Choices);
11506 pragma Inline (Set_Discrete_Range);
11507 pragma Inline (Set_Discrete_Subtype_Definition);
11508 pragma Inline (Set_Discrete_Subtype_Definitions);
11509 pragma Inline (Set_Discriminant_Specifications);
11510 pragma Inline (Set_Discriminant_Type);
11511 pragma Inline (Set_Do_Accessibility_Check);
11512 pragma Inline (Set_Do_Discriminant_Check);
11513 pragma Inline (Set_Do_Length_Check);
11514 pragma Inline (Set_Do_Division_Check);
11515 pragma Inline (Set_Do_Overflow_Check);
11516 pragma Inline (Set_Do_Range_Check);
11517 pragma Inline (Set_Do_Storage_Check);
11518 pragma Inline (Set_Do_Tag_Check);
11519 pragma Inline (Set_Elaborate_Present);
11520 pragma Inline (Set_Elaborate_All_Desirable);
11521 pragma Inline (Set_Elaborate_All_Present);
11522 pragma Inline (Set_Elaborate_Desirable);
11523 pragma Inline (Set_Elaboration_Boolean);
11524 pragma Inline (Set_Else_Actions);
11525 pragma Inline (Set_Else_Statements);
11526 pragma Inline (Set_Elsif_Parts);
11527 pragma Inline (Set_Enclosing_Variant);
11528 pragma Inline (Set_End_Label);
11529 pragma Inline (Set_End_Span);
11530 pragma Inline (Set_Entity);
11531 pragma Inline (Set_Entry_Body_Formal_Part);
11532 pragma Inline (Set_Entry_Call_Alternative);
11533 pragma Inline (Set_Entry_Call_Statement);
11534 pragma Inline (Set_Entry_Direct_Name);
11535 pragma Inline (Set_Entry_Index);
11536 pragma Inline (Set_Entry_Index_Specification);
11537 pragma Inline (Set_Etype);
11538 pragma Inline (Set_Exception_Choices);
11539 pragma Inline (Set_Exception_Handlers);
11540 pragma Inline (Set_Exception_Junk);
11541 pragma Inline (Set_Exception_Label);
11542 pragma Inline (Set_Expansion_Delayed);
11543 pragma Inline (Set_Explicit_Actual_Parameter);
11544 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
11545 pragma Inline (Set_Expression);
11546 pragma Inline (Set_Expressions);
11547 pragma Inline (Set_First_Bit);
11548 pragma Inline (Set_First_Inlined_Subprogram);
11549 pragma Inline (Set_First_Name);
11550 pragma Inline (Set_First_Named_Actual);
11551 pragma Inline (Set_First_Real_Statement);
11552 pragma Inline (Set_First_Subtype_Link);
11553 pragma Inline (Set_Float_Truncate);
11554 pragma Inline (Set_Formal_Type_Definition);
11555 pragma Inline (Set_Forwards_OK);
11556 pragma Inline (Set_From_At_End);
11557 pragma Inline (Set_From_At_Mod);
11558 pragma Inline (Set_From_Default);
11559 pragma Inline (Set_Generic_Associations);
11560 pragma Inline (Set_Generic_Formal_Declarations);
11561 pragma Inline (Set_Generic_Parent);
11562 pragma Inline (Set_Generic_Parent_Type);
11563 pragma Inline (Set_Handled_Statement_Sequence);
11564 pragma Inline (Set_Handler_List_Entry);
11565 pragma Inline (Set_Has_Created_Identifier);
11566 pragma Inline (Set_Has_Dynamic_Length_Check);
11567 pragma Inline (Set_Has_Init_Expression);
11568 pragma Inline (Set_Has_Local_Raise);
11569 pragma Inline (Set_Has_Dynamic_Range_Check);
11570 pragma Inline (Set_Has_No_Elaboration_Code);
11571 pragma Inline (Set_Has_Priority_Pragma);
11572 pragma Inline (Set_Has_Private_View);
11573 pragma Inline (Set_Has_Relative_Deadline_Pragma);
11574 pragma Inline (Set_Has_Storage_Size_Pragma);
11575 pragma Inline (Set_Has_Task_Info_Pragma);
11576 pragma Inline (Set_Has_Task_Name_Pragma);
11577 pragma Inline (Set_Has_Wide_Character);
11578 pragma Inline (Set_Hidden_By_Use_Clause);
11579 pragma Inline (Set_High_Bound);
11580 pragma Inline (Set_Identifier);
11581 pragma Inline (Set_Implicit_With);
11582 pragma Inline (Set_Includes_Infinities);
11583 pragma Inline (Set_Interface_List);
11584 pragma Inline (Set_Interface_Present);
11585 pragma Inline (Set_In_Present);
11586 pragma Inline (Set_Instance_Spec);
11587 pragma Inline (Set_Intval);
11588 pragma Inline (Set_Is_Accessibility_Actual);
11589 pragma Inline (Set_Is_Asynchronous_Call_Block);
11590 pragma Inline (Set_Is_Component_Left_Opnd);
11591 pragma Inline (Set_Is_Component_Right_Opnd);
11592 pragma Inline (Set_Is_Controlling_Actual);
11593 pragma Inline (Set_Is_Dynamic_Coextension);
11594 pragma Inline (Set_Is_Elsif);
11595 pragma Inline (Set_Is_Entry_Barrier_Function);
11596 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
11597 pragma Inline (Set_Is_Folded_In_Parser);
11598 pragma Inline (Set_Is_In_Discriminant_Check);
11599 pragma Inline (Set_Is_Machine_Number);
11600 pragma Inline (Set_Is_Null_Loop);
11601 pragma Inline (Set_Is_Overloaded);
11602 pragma Inline (Set_Is_Power_Of_2_For_Shift);
11603 pragma Inline (Set_Is_Protected_Subprogram_Body);
11604 pragma Inline (Set_Has_Self_Reference);
11605 pragma Inline (Set_Is_Static_Coextension);
11606 pragma Inline (Set_Is_Static_Expression);
11607 pragma Inline (Set_Is_Subprogram_Descriptor);
11608 pragma Inline (Set_Is_Task_Allocation_Block);
11609 pragma Inline (Set_Is_Task_Master);
11610 pragma Inline (Set_Iteration_Scheme);
11611 pragma Inline (Set_Itype);
11612 pragma Inline (Set_Kill_Range_Check);
11613 pragma Inline (Set_Last_Bit);
11614 pragma Inline (Set_Last_Name);
11615 pragma Inline (Set_Library_Unit);
11616 pragma Inline (Set_Label_Construct);
11617 pragma Inline (Set_Left_Opnd);
11618 pragma Inline (Set_Limited_View_Installed);
11619 pragma Inline (Set_Limited_Present);
11620 pragma Inline (Set_Literals);
11621 pragma Inline (Set_Local_Raise_Not_OK);
11622 pragma Inline (Set_Local_Raise_Statements);
11623 pragma Inline (Set_Loop_Actions);
11624 pragma Inline (Set_Loop_Parameter_Specification);
11625 pragma Inline (Set_Low_Bound);
11626 pragma Inline (Set_Mod_Clause);
11627 pragma Inline (Set_More_Ids);
11628 pragma Inline (Set_Must_Be_Byte_Aligned);
11629 pragma Inline (Set_Must_Not_Freeze);
11630 pragma Inline (Set_Must_Not_Override);
11631 pragma Inline (Set_Must_Override);
11632 pragma Inline (Set_Name);
11633 pragma Inline (Set_Names);
11634 pragma Inline (Set_Next_Entity);
11635 pragma Inline (Set_Next_Implicit_With);
11636 pragma Inline (Set_Next_Named_Actual);
11637 pragma Inline (Set_Next_Pragma);
11638 pragma Inline (Set_Next_Rep_Item);
11639 pragma Inline (Set_Next_Use_Clause);
11640 pragma Inline (Set_No_Ctrl_Actions);
11641 pragma Inline (Set_No_Elaboration_Check);
11642 pragma Inline (Set_No_Entities_Ref_In_Spec);
11643 pragma Inline (Set_No_Initialization);
11644 pragma Inline (Set_No_Truncation);
11645 pragma Inline (Set_Null_Present);
11646 pragma Inline (Set_Null_Exclusion_Present);
11647 pragma Inline (Set_Null_Exclusion_In_Return_Present);
11648 pragma Inline (Set_Null_Record_Present);
11649 pragma Inline (Set_Object_Definition);
11650 pragma Inline (Set_Original_Discriminant);
11651 pragma Inline (Set_Original_Entity);
11652 pragma Inline (Set_Others_Discrete_Choices);
11653 pragma Inline (Set_Out_Present);
11654 pragma Inline (Set_Parameter_Associations);
11655 pragma Inline (Set_Parameter_Specifications);
11656 pragma Inline (Set_Parameter_List_Truncated);
11657 pragma Inline (Set_Parameter_Type);
11658 pragma Inline (Set_Parent_Spec);
11659 pragma Inline (Set_PPC_Enabled);
11660 pragma Inline (Set_Position);
11661 pragma Inline (Set_Pragma_Argument_Associations);
11662 pragma Inline (Set_Pragma_Identifier);
11663 pragma Inline (Set_Pragmas_After);
11664 pragma Inline (Set_Pragmas_Before);
11665 pragma Inline (Set_Prefix);
11666 pragma Inline (Set_Present_Expr);
11667 pragma Inline (Set_Prev_Ids);
11668 pragma Inline (Set_Print_In_Hex);
11669 pragma Inline (Set_Private_Declarations);
11670 pragma Inline (Set_Private_Present);
11671 pragma Inline (Set_Procedure_To_Call);
11672 pragma Inline (Set_Proper_Body);
11673 pragma Inline (Set_Protected_Definition);
11674 pragma Inline (Set_Protected_Present);
11675 pragma Inline (Set_Raises_Constraint_Error);
11676 pragma Inline (Set_Range_Constraint);
11677 pragma Inline (Set_Range_Expression);
11678 pragma Inline (Set_Real_Range_Specification);
11679 pragma Inline (Set_Realval);
11680 pragma Inline (Set_Reason);
11681 pragma Inline (Set_Record_Extension_Part);
11682 pragma Inline (Set_Redundant_Use);
11683 pragma Inline (Set_Renaming_Exception);
11684 pragma Inline (Set_Result_Definition);
11685 pragma Inline (Set_Return_Object_Declarations);
11686 pragma Inline (Set_Reverse_Present);
11687 pragma Inline (Set_Right_Opnd);
11688 pragma Inline (Set_Rounded_Result);
11689 pragma Inline (Set_SCIL_Controlling_Tag);
11690 pragma Inline (Set_SCIL_Entity);
11691 pragma Inline (Set_SCIL_Related_Node);
11692 pragma Inline (Set_SCIL_Tag_Value);
11693 pragma Inline (Set_SCIL_Target_Prim);
11694 pragma Inline (Set_Scope);
11695 pragma Inline (Set_Select_Alternatives);
11696 pragma Inline (Set_Selector_Name);
11697 pragma Inline (Set_Selector_Names);
11698 pragma Inline (Set_Shift_Count_OK);
11699 pragma Inline (Set_Source_Type);
11700 pragma Inline (Set_Specification);
11701 pragma Inline (Set_Statements);
11702 pragma Inline (Set_Static_Processing_OK);
11703 pragma Inline (Set_Storage_Pool);
11704 pragma Inline (Set_Strval);
11705 pragma Inline (Set_Subtype_Indication);
11706 pragma Inline (Set_Subtype_Mark);
11707 pragma Inline (Set_Subtype_Marks);
11708 pragma Inline (Set_Suppress_Loop_Warnings);
11709 pragma Inline (Set_Synchronized_Present);
11710 pragma Inline (Set_Tagged_Present);
11711 pragma Inline (Set_Target_Type);
11712 pragma Inline (Set_Task_Definition);
11713 pragma Inline (Set_Task_Present);
11714 pragma Inline (Set_Then_Actions);
11715 pragma Inline (Set_Then_Statements);
11716 pragma Inline (Set_Triggering_Alternative);
11717 pragma Inline (Set_Triggering_Statement);
11718 pragma Inline (Set_Treat_Fixed_As_Integer);
11719 pragma Inline (Set_TSS_Elist);
11720 pragma Inline (Set_Type_Definition);
11721 pragma Inline (Set_Unit);
11722 pragma Inline (Set_Unknown_Discriminants_Present);
11723 pragma Inline (Set_Unreferenced_In_Spec);
11724 pragma Inline (Set_Variant_Part);
11725 pragma Inline (Set_Variants);
11726 pragma Inline (Set_Visible_Declarations);
11727 pragma Inline (Set_Was_Originally_Stub);
11728 pragma Inline (Set_Zero_Cost_Handling);
11729
11730 N_Simple_Return_Statement : constant Node_Kind := N_Return_Statement;
11731 -- Rename N_Return_Statement to be N_Simple_Return_Statement. Clients
11732 -- should refer to N_Simple_Return_Statement.
11733
11734 end Sinfo;