[multiple changes]
[gcc.git] / gcc / ada / sinfo.ads
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S I N F O --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
30 ------------------------------------------------------------------------------
31
32 -- This package defines the structure of the abstract syntax tree. The Tree
33 -- package provides a basic tree structure. Sinfo describes how this structure
34 -- is used to represent the syntax of an Ada program.
35
36 -- The grammar in the RM is followed very closely in the tree design, and is
37 -- repeated as part of this source file.
38
39 -- The tree contains not only the full syntactic representation of the
40 -- program, but also the results of semantic analysis. In particular, the
41 -- nodes for defining identifiers, defining character literals and defining
42 -- operator symbols, collectively referred to as entities, represent what
43 -- would normally be regarded as the symbol table information. In addition a
44 -- number of the tree nodes contain semantic information.
45
46 -- WARNING: Several files are automatically generated from this package.
47 -- See below for details.
48
49 with Namet; use Namet;
50 with Types; use Types;
51 with Uintp; use Uintp;
52 with Urealp; use Urealp;
53
54 package Sinfo is
55
56 ---------------------------------
57 -- Making Changes to This File --
58 ---------------------------------
59
60 -- If changes are made to this file, a number of related steps must be
61 -- carried out to ensure consistency. First, if a field access function is
62 -- added, it appears in seven places:
63
64 -- The documentation associated with the node
65 -- The spec of the access function in sinfo.ads
66 -- The body of the access function in sinfo.adb
67 -- The pragma Inline at the end of sinfo.ads for the access function
68 -- The spec of the set procedure in sinfo.ads
69 -- The body of the set procedure in sinfo.adb
70 -- The pragma Inline at the end of sinfo.ads for the set procedure
71
72 -- The field chosen must be consistent in all places, and, for a node that
73 -- is a subexpression, must not overlap any of the standard expression
74 -- fields.
75
76 -- In addition, if any of the standard expression fields is changed, then
77 -- the utility program which creates the Treeprs spec (in file treeprs.ads)
78 -- must be updated appropriately, since it special cases expression fields.
79
80 -- If a new tree node is added, then the following changes are made
81
82 -- Add it to the documentation in the appropriate place
83 -- Add its fields to this documentation section
84 -- Define it in the appropriate classification in Node_Kind
85 -- In the body (sinfo), add entries to the access functions for all
86 -- its fields (except standard expression fields) to include the new
87 -- node in the checks.
88 -- Add an appropriate section to the case statement in sprint.adb
89 -- Add an appropriate section to the case statement in sem.adb
90 -- Add an appropriate section to the case statement in exp_util.adb
91 -- (Insert_Actions procedure)
92 -- For a subexpression, add an appropriate section to the case
93 -- statement in sem_eval.adb
94 -- For a subexpression, add an appropriate section to the case
95 -- statement in sem_res.adb
96
97 -- Finally, four utility programs must be run:
98
99 -- Run CSinfo to check that you have made the changes consistently. It
100 -- checks most of the rules given above, with clear error messages. This
101 -- utility reads sinfo.ads and sinfo.adb and generates a report to
102 -- standard output.
103
104 -- Run XSinfo to create sinfo.h, the corresponding C header. This
105 -- utility reads sinfo.ads and generates sinfo.h. Note that it does
106 -- not need to read sinfo.adb, since the contents of the body are
107 -- algorithmically determinable from the spec.
108
109 -- Run XTreeprs to create treeprs.ads, an updated version of the module
110 -- that is used to drive the tree print routine. This utility reads (but
111 -- does not modify) treeprs.adt, the template that provides the basic
112 -- structure of the file, and then fills in the data from the comments
113 -- in sinfo.ads.
114
115 -- Run XNmake to create nmake.ads and nmake.adb, the package body and
116 -- spec of the Nmake package which contains functions for constructing
117 -- nodes.
118
119 -- All of the above steps except CSinfo are done automatically by the
120 -- build scripts when you do a full bootstrap.
121
122 -- Note: sometime we could write a utility that actually generated the body
123 -- of sinfo from the spec instead of simply checking it, since, as noted
124 -- above, the contents of the body can be determined from the spec.
125
126 --------------------------------
127 -- Implicit Nodes in the Tree --
128 --------------------------------
129
130 -- Generally the structure of the tree very closely follows the grammar as
131 -- defined in the RM. However, certain nodes are omitted to save space and
132 -- simplify semantic processing. Two general classes of such omitted nodes
133 -- are as follows:
134
135 -- If the only possibilities for a non-terminal are one or more other
136 -- non-terminals (i.e. the rule is a "skinny" rule), then usually the
137 -- corresponding node is omitted from the tree, and the target construct
138 -- appears directly. For example, a real type definition is either
139 -- floating point definition or a fixed point definition. No explicit node
140 -- appears for real type definition. Instead either the floating point
141 -- definition or fixed point definition appears directly.
142
143 -- If a non-terminal corresponds to a list of some other non-terminal
144 -- (possibly with separating punctuation), then usually it is omitted from
145 -- the tree, and a list of components appears instead. For example,
146 -- sequence of statements does not appear explicitly in the tree. Instead
147 -- a list of statements appears directly.
148
149 -- Some additional cases of omitted nodes occur and are documented
150 -- individually. In particular, many nodes are omitted in the tree
151 -- generated for an expression.
152
153 -------------------------------------------
154 -- Handling of Defining Identifier Lists --
155 -------------------------------------------
156
157 -- In several declarative forms in the syntax, lists of defining
158 -- identifiers appear (object declarations, component declarations, number
159 -- declarations etc.)
160
161 -- The semantics of such statements are equivalent to a series of identical
162 -- declarations of single defining identifiers (except that conformance
163 -- checks require the same grouping of identifiers in the parameter case).
164
165 -- To simplify semantic processing, the parser breaks down such multiple
166 -- declaration cases into sequences of single declarations, duplicating
167 -- type and initialization information as required. The flags More_Ids and
168 -- Prev_Ids are used to record the original form of the source in the case
169 -- where the original source used a list of names, More_Ids being set on
170 -- all but the last name and Prev_Ids being set on all but the first name.
171 -- These flags are used to reconstruct the original source (e.g. in the
172 -- Sprint package), and also are included in the conformance checks, but
173 -- otherwise have no semantic significance.
174
175 -- Note: the reason that we use More_Ids and Prev_Ids rather than
176 -- First_Name and Last_Name flags is so that the flags are off in the
177 -- normal one identifier case, which minimizes tree print output.
178
179 -----------------------
180 -- Use of Node Lists --
181 -----------------------
182
183 -- With a few exceptions, if a construction of the form {non-terminal}
184 -- appears in the tree, lists are used in the corresponding tree node (see
185 -- package Nlists for handling of node lists). In this case a field of the
186 -- parent node points to a list of nodes for the non-terminal. The field
187 -- name for such fields has a plural name which always ends in "s". For
188 -- example, a case statement has a field Alternatives pointing to list of
189 -- case statement alternative nodes.
190
191 -- Only fields pointing to lists have names ending in "s", so generally the
192 -- structure is strongly typed, fields not ending in s point to single
193 -- nodes, and fields ending in s point to lists.
194
195 -- The following example shows how a traversal of a list is written. We
196 -- suppose here that Stmt points to a N_Case_Statement node which has a
197 -- list field called Alternatives:
198
199 -- Alt := First (Alternatives (Stmt));
200 -- while Present (Alt) loop
201 -- ..
202 -- -- processing for case statement alternative Alt
203 -- ..
204 -- Alt := Next (Alt);
205 -- end loop;
206
207 -- The Present function tests for Empty, which in this case signals the end
208 -- of the list. First returns Empty immediately if the list is empty.
209 -- Present is defined in Atree, First and Next are defined in Nlists.
210
211 -- The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
212 -- contexts, which is handled as described in the previous section, and
213 -- with {,library_unit_NAME} in the N_With_Clause mode, which is handled
214 -- using the First_Name and Last_Name flags, as further detailed in the
215 -- description of the N_With_Clause node.
216
217 -------------
218 -- Pragmas --
219 -------------
220
221 -- Pragmas can appear in many different context, but are not included in
222 -- the grammar. Still they must appear in the tree, so they can be properly
223 -- processed.
224
225 -- Two approaches are used. In some cases, an extra field is defined in an
226 -- appropriate node that contains a list of pragmas appearing in the
227 -- expected context. For example pragmas can appear before an
228 -- Accept_Alternative in a Selective_Accept_Statement, and these pragmas
229 -- appear in the Pragmas_Before field of the N_Accept_Alternative node.
230
231 -- The other approach is to simply allow pragmas to appear in syntactic
232 -- lists where the grammar (of course) does not include the possibility.
233 -- For example, the Variants field of an N_Variant_Part node points to a
234 -- list that can contain both N_Pragma and N_Variant nodes.
235
236 -- To make processing easier in the latter case, the Nlists package
237 -- provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
238 -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be handled
239 -- ignoring all pragmas.
240
241 -- In the case of the variants list, we can either write:
242
243 -- Variant := First (Variants (N));
244 -- while Present (Variant) loop
245 -- ...
246 -- Variant := Next (Variant);
247 -- end loop;
248
249 -- or
250
251 -- Variant := First_Non_Pragma (Variants (N));
252 -- while Present (Variant) loop
253 -- ...
254 -- Variant := Next_Non_Pragma (Variant);
255 -- end loop;
256
257 -- In the first form of the loop, Variant can either be an N_Pragma or an
258 -- N_Variant node. In the second form, Variant can only be N_Variant since
259 -- all pragmas are skipped.
260
261 ---------------------
262 -- Optional Fields --
263 ---------------------
264
265 -- Fields which correspond to a section of the syntax enclosed in square
266 -- brackets are generally omitted (and the corresponding field set to Empty
267 -- for a node, or No_List for a list). The documentation of such fields
268 -- notes these cases. One exception to this rule occurs in the case of
269 -- possibly empty statement sequences (such as the sequence of statements
270 -- in an entry call alternative). Such cases appear in the syntax rules as
271 -- [SEQUENCE_OF_STATEMENTS] and the fields corresponding to such optional
272 -- statement sequences always contain an empty list (not No_List) if no
273 -- statements are present.
274
275 -- Note: the utility program that constructs the body and spec of the Nmake
276 -- package relies on the format of the comments to determine if a field
277 -- should have a default value in the corresponding make routine. The rule
278 -- is that if the first line of the description of the field contains the
279 -- string "(set to xxx if", then a default value of xxx is provided for
280 -- this field in the corresponding Make_yyy routine.
281
282 -----------------------------------
283 -- Note on Body/Spec Terminology --
284 -----------------------------------
285
286 -- In informal discussions about Ada, it is customary to refer to package
287 -- and subprogram specs and bodies. However, this is not technically
288 -- correct, what is normally referred to as a spec or specification is in
289 -- fact a package declaration or subprogram declaration. We are careful in
290 -- GNAT to use the correct terminology and in particular, the full word
291 -- specification is never used as an incorrect substitute for declaration.
292 -- The structure and terminology used in the tree also reflects the grammar
293 -- and thus uses declaration and specification in the technically correct
294 -- manner.
295
296 -- However, there are contexts in which the informal terminology is useful.
297 -- We have the word "body" to refer to the Interp_Etype declared by the
298 -- declaration of a unit body, and in some contexts we need similar term to
299 -- refer to the entity declared by the package or subprogram declaration,
300 -- and simply using declaration can be confusing since the body also has a
301 -- declaration.
302
303 -- An example of such a context is the link between the package body and
304 -- its declaration. With_Declaration is confusing, since the package body
305 -- itself is a declaration.
306
307 -- To deal with this problem, we reserve the informal term Spec, i.e. the
308 -- popular abbreviation used in this context, to refer to the entity
309 -- declared by the package or subprogram declaration. So in the above
310 -- example case, the field in the body is called With_Spec.
311
312 -- Another important context for the use of the word Spec is in error
313 -- messages, where a hyper-correct use of declaration would be confusing to
314 -- a typical Ada programmer, and even for an expert programmer can cause
315 -- confusion since the body has a declaration as well.
316
317 -- So, to summarize:
318
319 -- Declaration always refers to the syntactic entity that is called
320 -- a declaration. In particular, subprogram declaration
321 -- and package declaration are used to describe the
322 -- syntactic entity that includes the semicolon.
323
324 -- Specification always refers to the syntactic entity that is called
325 -- a specification. In particular, the terms procedure
326 -- specification, function specification, package
327 -- specification, subprogram specification always refer
328 -- to the syntactic entity that has no semicolon.
329
330 -- Spec is an informal term, used to refer to the entity
331 -- that is declared by a task declaration, protected
332 -- declaration, generic declaration, subprogram
333 -- declaration or package declaration.
334
335 -- This convention is followed throughout the GNAT documentation
336 -- both internal and external, and in all error message text.
337
338 ------------------------
339 -- Internal Use Nodes --
340 ------------------------
341
342 -- These are Node_Kind settings used in the internal implementation which
343 -- are not logically part of the specification.
344
345 -- N_Unused_At_Start
346 -- Completely unused entry at the start of the enumeration type. This
347 -- is inserted so that no legitimate value is zero, which helps to get
348 -- better debugging behavior, since zero is a likely uninitialized value).
349
350 -- N_Unused_At_End
351 -- Completely unused entry at the end of the enumeration type. This is
352 -- handy so that arrays with Node_Kind as the index type have an extra
353 -- entry at the end (see for example the use of the Pchar_Pos_Array in
354 -- Treepr, where the extra entry provides the limit value when dealing with
355 -- the last used entry in the array).
356
357 -----------------------------------------
358 -- Note on the settings of Sloc fields --
359 -----------------------------------------
360
361 -- The Sloc field of nodes that come from the source is set by the parser.
362 -- For internal nodes, and nodes generated during expansion the Sloc is
363 -- usually set in the call to the constructor for the node. In general the
364 -- Sloc value chosen for an internal node is the Sloc of the source node
365 -- whose processing is responsible for the expansion. For example, the Sloc
366 -- of an inherited primitive operation is the Sloc of the corresponding
367 -- derived type declaration.
368
369 -- For the nodes of a generic instantiation, the Sloc value is encoded to
370 -- represent both the original Sloc in the generic unit, and the Sloc of
371 -- the instantiation itself. See Sinput.ads for details.
372
373 -- Subprogram instances create two callable entities: one is the visible
374 -- subprogram instance, and the other is an anonymous subprogram nested
375 -- within a wrapper package that contains the renamings for the actuals.
376 -- Both of these entities have the Sloc of the defining entity in the
377 -- instantiation node. This simplifies some ASIS queries.
378
379 -----------------------
380 -- Field Definitions --
381 -----------------------
382
383 -- In the following node definitions, all fields, both syntactic and
384 -- semantic, are documented. The one exception is in the case of entities
385 -- (defining identifiers, character literals and operator symbols), where
386 -- the usage of the fields depends on the entity kind. Entity fields are
387 -- fully documented in the separate package Einfo.
388
389 -- In the node definitions, three common sets of fields are abbreviated to
390 -- save both space in the documentation, and also space in the string
391 -- (defined in Tree_Print_Strings) used to print trees. The following
392 -- abbreviations are used:
393
394 -- Note: the utility program that creates the Treeprs spec (in the file
395 -- xtreeprs.adb) knows about the special fields here, so it must be
396 -- modified if any change is made to these fields.
397
398 -- "plus fields for binary operator"
399 -- Chars (Name1) Name_Id for the operator
400 -- Left_Opnd (Node2) left operand expression
401 -- Right_Opnd (Node3) right operand expression
402 -- Entity (Node4-Sem) defining entity for operator
403 -- Associated_Node (Node4-Sem) for generic processing
404 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
405 -- Has_Private_View (Flag11-Sem) set in generic units.
406
407 -- "plus fields for unary operator"
408 -- Chars (Name1) Name_Id for the operator
409 -- Right_Opnd (Node3) right operand expression
410 -- Entity (Node4-Sem) defining entity for operator
411 -- Associated_Node (Node4-Sem) for generic processing
412 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
413 -- Has_Private_View (Flag11-Sem) set in generic units.
414
415 -- "plus fields for expression"
416 -- Paren_Count number of parentheses levels
417 -- Etype (Node5-Sem) type of the expression
418 -- Is_Overloaded (Flag5-Sem) >1 type interpretation exists
419 -- Is_Static_Expression (Flag6-Sem) set for static expression
420 -- Raises_Constraint_Error (Flag7-Sem) evaluation raises CE
421 -- Must_Not_Freeze (Flag8-Sem) set if must not freeze
422 -- Do_Range_Check (Flag9-Sem) set if a range check needed
423 -- Assignment_OK (Flag15-Sem) set if modification is OK
424 -- Is_Controlling_Actual (Flag16-Sem) set for controlling argument
425
426 -- Note: see under (EXPRESSION) for further details on the use of
427 -- the Paren_Count field to record the number of parentheses levels.
428
429 -- Node_Kind is the type used in the Nkind field to indicate the node kind.
430 -- The actual definition of this type is given later (the reason for this
431 -- is that we want the descriptions ordered by logical chapter in the RM,
432 -- but the type definition is reordered to facilitate the definition of
433 -- some subtype ranges. The individual descriptions of the nodes show how
434 -- the various fields are used in each node kind, as well as providing
435 -- logical names for the fields. Functions and procedures are provided for
436 -- accessing and setting these fields using these logical names.
437
438 -----------------------
439 -- Gigi Restrictions --
440 -----------------------
441
442 -- The tree passed to Gigi is more restricted than the general tree form.
443 -- For example, as a result of expansion, most of the tasking nodes can
444 -- never appear. For each node to which either a complete or partial
445 -- restriction applies, a note entitled "Gigi restriction" appears which
446 -- documents the restriction.
447
448 -- Note that most of these restrictions apply only to trees generated when
449 -- code is being generated, since they involved expander actions that
450 -- destroy the tree.
451
452 ------------------------
453 -- Common Flag Fields --
454 ------------------------
455
456 -- The following flag fields appear in all nodes
457
458 -- Analyzed (Flag1)
459 -- This flag is used to indicate that a node (and all its children have
460 -- been analyzed. It is used to avoid reanalysis of a node that has
461 -- already been analyzed, both for efficiency and functional correctness
462 -- reasons.
463
464 -- Comes_From_Source (Flag2)
465 -- This flag is on for any nodes built by the scanner or parser from the
466 -- source program, and off for any nodes built by the analyzer or
467 -- expander. It indicates that a node comes from the original source.
468 -- This flag is defined in Atree.
469
470 -- Error_Posted (Flag3)
471 -- This flag is used to avoid multiple error messages being posted on or
472 -- referring to the same node. This flag is set if an error message
473 -- refers to a node or is posted on its source location, and has the
474 -- effect of inhibiting further messages involving this same node.
475
476 -- Has_Dynamic_Length_Check (Flag10-Sem)
477 -- This flag is present on all nodes. It is set to indicate that one of
478 -- the routines in unit Checks has generated a length check action which
479 -- has been inserted at the flagged node. This is used to avoid the
480 -- generation of duplicate checks.
481
482 -- Has_Dynamic_Range_Check (Flag12-Sem)
483 -- This flag is present on all nodes. It is set to indicate that one of
484 -- the routines in unit Checks has generated a range check action which
485 -- has been inserted at the flagged node. This is used to avoid the
486 -- generation of duplicate checks.
487
488 -- Has_Local_Raise (Flag8-Sem)
489 -- Present in exception handler nodes. Set if the handler can be entered
490 -- via a local raise that gets transformed to a goto statement. This will
491 -- always be set if Local_Raise_Statements is non-empty, but can also be
492 -- set as a result of generation of N_Raise_xxx nodes, or flags set in
493 -- nodes requiring generation of back end checks.
494
495 ------------------------------------
496 -- Description of Semantic Fields --
497 ------------------------------------
498
499 -- The meaning of the syntactic fields is generally clear from their names
500 -- without any further description, since the names are chosen to
501 -- correspond very closely to the syntax in the reference manual. This
502 -- section describes the usage of the semantic fields, which are used to
503 -- contain additional information determined during semantic analysis.
504
505 -- ABE_Is_Certain (Flag18-Sem)
506 -- This flag is set in an instantiation node or a call node is determined
507 -- to be sure to raise an ABE. This is used to trigger special handling
508 -- of such cases, particularly in the instantiation case where we avoid
509 -- instantiating the body if this flag is set. This flag is also present
510 -- in an N_Formal_Package_Declaration_Node since formal package
511 -- declarations are treated like instantiations, but it is always set to
512 -- False in this context.
513
514 -- Accept_Handler_Records (List5-Sem)
515 -- This field is present only in an N_Accept_Alternative node. It is used
516 -- to temporarily hold the exception handler records from an accept
517 -- statement in a selective accept. These exception handlers will
518 -- eventually be placed in the Handler_Records list of the procedure
519 -- built for this accept (see Expand_N_Selective_Accept procedure in
520 -- Exp_Ch9 for further details).
521
522 -- Access_Types_To_Process (Elist2-Sem)
523 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
524 -- Contains the list of access types which may require specific treatment
525 -- when the nature of the type completion is completely known. An example
526 -- of such treatment is the generation of the associated_final_chain.
527
528 -- Actions (List1-Sem)
529 -- This field contains a sequence of actions that are associated with the
530 -- node holding the field. See the individual node types for details of
531 -- how this field is used, as well as the description of the specific use
532 -- for a particular node type.
533
534 -- Activation_Chain_Entity (Node3-Sem)
535 -- This is used in tree nodes representing task activators (blocks,
536 -- subprogram bodies, package declarations, and task bodies). It is
537 -- initially Empty, and then gets set to point to the entity for the
538 -- declared Activation_Chain variable when the first task is declared.
539 -- When tasks are declared in the corresponding declarative region this
540 -- entity is located by name (its name is always _Chain) and the declared
541 -- tasks are added to the chain. Note that N_Extended_Return_Statement
542 -- does not have this attribute, although it does have an activation
543 -- chain. This chain is used to store the tasks temporarily, and is not
544 -- used for activating them. On successful completion of the return
545 -- statement, the tasks are moved to the caller's chain, and the caller
546 -- activates them.
547
548 -- Acts_As_Spec (Flag4-Sem)
549 -- A flag set in the N_Subprogram_Body node for a subprogram body which
550 -- is acting as its own spec, except in the case of a library level
551 -- subprogram, in which case the flag is set on the parent compilation
552 -- unit node instead (see further description in spec of Lib package).
553 -- ??? Above note about Lib is dubious since lib.ads does not mention
554 -- Acts_As_Spec at all.
555
556 -- Actual_Designated_Subtype (Node4-Sem)
557 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
558 -- needs to known the dynamic constrained subtype of the designated
559 -- object, this attribute is set to that type. This is done for
560 -- N_Free_Statements for access-to-classwide types and access to
561 -- unconstrained packed array types, and for N_Explicit_Dereference when
562 -- the designated type is an unconstrained packed array and the
563 -- dereference is the prefix of a 'Size attribute reference.
564
565 -- Address_Warning_Posted (Flag18-Sem)
566 -- Present in N_Attribute_Definition nodes. Set to indicate that we have
567 -- posted a warning for the address clause regarding size or alignment
568 -- issues. Used to inhibit multiple redundant messages.
569
570 -- Aggregate_Bounds (Node3-Sem)
571 -- Present in array N_Aggregate nodes. If the aggregate contains
572 -- component associations this field points to an N_Range node whose
573 -- bounds give the lowest and highest discrete choice values. If the
574 -- named aggregate contains a dynamic or null choice this field is empty.
575 -- If the aggregate contains positional elements this field points to an
576 -- N_Integer_Literal node giving the number of positional elements. Note
577 -- that if the aggregate contains positional elements and an other choice
578 -- the N_Integer_Literal only accounts for the number of positional
579 -- elements.
580
581 -- All_Others (Flag11-Sem)
582 -- Present in an N_Others_Choice node. This flag is set for an others
583 -- exception where all exceptions are to be caught, even those that are
584 -- not normally handled (in particular the tasking abort signal). This
585 -- is used for translation of the at end handler into a normal exception
586 -- handler.
587
588 -- Assignment_OK (Flag15-Sem)
589 -- This flag is set in a subexpression node for an object, indicating
590 -- that the associated object can be modified, even if this would not
591 -- normally be permissible (either by direct assignment, or by being
592 -- passed as an out or in-out parameter). This is used by the expander
593 -- for a number of purposes, including initialization of constants and
594 -- limited type objects (such as tasks), setting discriminant fields,
595 -- setting tag values, etc. N_Object_Declaration nodes also have this
596 -- flag defined. Here it is used to indicate that an initialization
597 -- expression is valid, even where it would normally not be allowed
598 -- (e.g. where the type involved is limited).
599
600 -- Associated_Node (Node4-Sem)
601 -- Present in nodes that can denote an entity: identifiers, character
602 -- literals, operator symbols, expanded names, operator nodes, and
603 -- attribute reference nodes (all these nodes have an Entity field).
604 -- This field is also present in N_Aggregate, N_Selected_Component, and
605 -- N_Extension_Aggregate nodes. This field is used in generic processing
606 -- to create links between the generic template and the generic copy.
607 -- See Sem_Ch12.Get_Associated_Node for full details. Note that this
608 -- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
609 -- the normal function of Entity is not required at the point where the
610 -- Associated_Node is set. Note also, that in generic templates, this
611 -- means that the Entity field does not necessarily point to an Entity.
612 -- Since the back end is expected to ignore generic templates, this is
613 -- harmless.
614
615 -- At_End_Proc (Node1)
616 -- This field is present in an N_Handled_Sequence_Of_Statements node.
617 -- It contains an identifier reference for the cleanup procedure to be
618 -- called. See description of this node for further details.
619
620 -- Backwards_OK (Flag6-Sem)
621 -- A flag present in the N_Assignment_Statement node. It is used only
622 -- if the type being assigned is an array type, and is set if analysis
623 -- determines that it is definitely safe to do the copy backwards, i.e.
624 -- starting at the highest addressed element. This is the case if either
625 -- the operands do not overlap, or they may overlap, but if they do,
626 -- then the left operand is at a higher address than the right operand.
627 --
628 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
629 -- means that the front end could not determine that either direction is
630 -- definitely safe, and a runtime check may be required if the backend
631 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
632 -- set, it means that the front end can assure no overlap of operands.
633
634 -- Body_To_Inline (Node3-Sem)
635 -- present in subprogram declarations. Denotes analyzed but unexpanded
636 -- body of subprogram, to be used when inlining calls. Present when the
637 -- subprogram has an Inline pragma and inlining is enabled. If the
638 -- declaration is completed by a renaming_as_body, and the renamed en-
639 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
640 -- which is used directly in later calls to the original subprogram.
641
642 -- Body_Required (Flag13-Sem)
643 -- A flag that appears in the N_Compilation_Unit node indicating that
644 -- the corresponding unit requires a body. For the package case, this
645 -- indicates that a completion is required. In Ada 95, if the flag is not
646 -- set for the package case, then a body may not be present. In Ada 83,
647 -- if the flag is not set for the package case, then body is optional.
648 -- For a subprogram declaration, the flag is set except in the case where
649 -- a pragma Import or Interface applies, in which case no body is
650 -- permitted (in Ada 83 or Ada 95).
651
652 -- By_Ref (Flag5-Sem)
653 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
654 -- this flag is set when the returned expression is already allocated on
655 -- the secondary stack and thus the result is passed by reference rather
656 -- than copied another time.
657
658 -- Check_Address_Alignment (Flag11-Sem)
659 -- A flag present in N_Attribute_Definition clause for a 'Address
660 -- attribute definition. This flag is set if a dynamic check should be
661 -- generated at the freeze point for the entity to which this address
662 -- clause applies. The reason that we need this flag is that we want to
663 -- check for range checks being suppressed at the point where the
664 -- attribute definition clause is given, rather than testing this at the
665 -- freeze point.
666
667 -- Coextensions (Elist4-Sem)
668 -- Present in allocators nodes. Points to list of allocators for the
669 -- access discriminants of the allocated object.
670
671 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
672 -- Present in N_Simple_Return_Statement nodes. True if this node was
673 -- constructed as part of the N_Extended_Return_Statement expansion.
674 -- .
675
676 -- Compile_Time_Known_Aggregate (Flag18-Sem)
677 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
678 -- evaluated at compile time without raising constraint error. Such
679 -- aggregates can be passed as is to Gigi without any expansion. See
680 -- Sem_Aggr for the specific conditions under which an aggregate has this
681 -- flag set. See also the flag Static_Processing_OK.
682
683 -- Condition_Actions (List3-Sem)
684 -- This field appears in else-if nodes and in the iteration scheme node
685 -- for while loops. This field is only used during semantic processing to
686 -- temporarily hold actions inserted into the tree. In the tree passed
687 -- to gigi, the condition actions field is always set to No_List. For
688 -- details on how this field is used, see the routine Insert_Actions in
689 -- package Exp_Util, and also the expansion routines for the relevant
690 -- nodes.
691
692 -- Controlling_Argument (Node1-Sem)
693 -- This field is set in procedure and function call nodes if the call
694 -- is a dispatching call (it is Empty for a non-dispatching call). It
695 -- indicates the source of the call's controlling tag. For procedure
696 -- calls, the Controlling_Argument is one of the actuals. For function
697 -- that has a dispatching result, it is an entity in the context of the
698 -- call that can provide a tag, or else it is the tag of the root type
699 -- of the class. It can also specify a tag directly rather than being a
700 -- tagged object. The latter is needed by the implementations of AI-239
701 -- and AI-260.
702
703 -- Conversion_OK (Flag14-Sem)
704 -- A flag set on type conversion nodes to indicate that the conversion
705 -- is to be considered as being valid, even though it is the case that
706 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
707 -- Fixed_Value and Integer_Value, for internal conversions done for
708 -- fixed-point operations, and for certain conversions for calls to
709 -- initialization procedures. If Conversion_OK is set, then Etype must be
710 -- set (the analyzer assumes that Etype has been set). For the case of
711 -- fixed-point operands, it also indicates that the conversion is to be
712 -- direct conversion of the underlying integer result, with no regard to
713 -- the small operand.
714
715 -- Corresponding_Body (Node5-Sem)
716 -- This field is set in subprogram declarations, package declarations,
717 -- entry declarations of protected types, and in generic units. It
718 -- points to the defining entity for the corresponding body (NOT the
719 -- node for the body itself).
720
721 -- Corresponding_Formal_Spec (Node3-Sem)
722 -- This field is set in subprogram renaming declarations, where it points
723 -- to the defining entity for a formal subprogram in the case where the
724 -- renaming corresponds to a generic formal subprogram association in an
725 -- instantiation. The field is Empty if the renaming does not correspond
726 -- to such a formal association.
727
728 -- Corresponding_Generic_Association (Node5-Sem)
729 -- This field is defined for object declarations and object renaming
730 -- declarations. It is set for the declarations within an instance that
731 -- map generic formals to their actuals. If set, the field points to
732 -- a generic_association which is the original parent of the expression
733 -- or name appearing in the declaration. This simplifies ASIS queries.
734
735 -- Corresponding_Integer_Value (Uint4-Sem)
736 -- This field is set in real literals of fixed-point types (it is not
737 -- used for floating-point types). It contains the integer value used
738 -- to represent the fixed-point value. It is also set on the universal
739 -- real literals used to represent bounds of fixed-point base types
740 -- and their first named subtypes.
741
742 -- Corresponding_Spec (Node5-Sem)
743 -- This field is set in subprogram, package, task, and protected body
744 -- nodes, where it points to the defining entity in the corresponding
745 -- spec. The attribute is also set in N_With_Clause nodes where it points
746 -- to the defining entity for the with'ed spec, and in a subprogram
747 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
748 -- if there is no corresponding spec, as in the case of a subprogram body
749 -- that serves as its own spec.
750
751 -- Corresponding_Stub (Node3-Sem)
752 -- This field is present in an N_Subunit node. It holds the node in
753 -- the parent unit that is the stub declaration for the subunit. It is
754 -- set when analysis of the stub forces loading of the proper body. If
755 -- expansion of the proper body creates new declarative nodes, they are
756 -- inserted at the point of the corresponding_stub.
757
758 -- Dcheck_Function (Node5-Sem)
759 -- This field is present in an N_Variant node, It references the entity
760 -- for the discriminant checking function for the variant.
761
762 -- Debug_Statement (Node3)
763 -- This field is present in an N_Pragma node. It is used only for a Debug
764 -- pragma. The parameter is of the form of an expression, as required by
765 -- the pragma syntax, but is actually a procedure call. To simplify
766 -- semantic processing, the parser creates a copy of the argument
767 -- rearranged into a procedure call statement and places it in the
768 -- Debug_Statement field. Note that this field is considered syntactic
769 -- field, since it is created by the parser.
770
771 -- Default_Expression (Node5-Sem)
772 -- This field is Empty if there is no default expression. If there is a
773 -- simple default expression (one with no side effects), then this field
774 -- simply contains a copy of the Expression field (both point to the tree
775 -- for the default expression). Default_Expression is used for
776 -- conformance checking.
777
778 -- Discr_Check_Funcs_Built (Flag11-Sem)
779 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
780 -- discriminant checking functions are constructed. The purpose is to
781 -- avoid attempting to set these functions more than once.
782
783 -- Do_Accessibility_Check (Flag13-Sem)
784 -- This flag is set on N_Parameter_Specification nodes to indicate
785 -- that an accessibility check is required for the parameter. It is
786 -- not yet decided who takes care of this check (TBD ???).
787
788 -- Do_Discriminant_Check (Flag13-Sem)
789 -- This flag is set on N_Selected_Component nodes to indicate that a
790 -- discriminant check is required using the discriminant check routine
791 -- associated with the selector. The actual check is generated by the
792 -- expander when processing selected components.
793
794 -- Do_Division_Check (Flag13-Sem)
795 -- This flag is set on a division operator (/ mod rem) to indicate
796 -- that a zero divide check is required. The actual check is dealt
797 -- with by the backend (all the front end does is to set the flag).
798
799 -- Do_Length_Check (Flag4-Sem)
800 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
801 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
802 -- is required. It is not determined who deals with this flag (???).
803
804 -- Do_Overflow_Check (Flag17-Sem)
805 -- This flag is set on an operator where an overflow check is required on
806 -- the operation. The actual check is dealt with by the backend (all the
807 -- front end does is to set the flag). The other cases where this flag is
808 -- used is on a Type_Conversion node and for attribute reference nodes.
809 -- For a type conversion, it means that the conversion is from one base
810 -- type to another, and the value may not fit in the target base type.
811 -- See also the description of Do_Range_Check for this case. The only
812 -- attribute references which use this flag are Pred and Succ, where it
813 -- means that the result should be checked for going outside the base
814 -- range. Note that this flag is not set for modular types.
815
816 -- Do_Range_Check (Flag9-Sem)
817 -- This flag is set on an expression which appears in a context where a
818 -- range check is required. The target type is clear from the context.
819 -- The contexts in which this flag can appear are the following:
820
821 -- Right side of an assignment. In this case the target type is
822 -- taken from the left side of the assignment, which is referenced
823 -- by the Name of the N_Assignment_Statement node.
824
825 -- Subscript expressions in an indexed component. In this case the
826 -- target type is determined from the type of the array, which is
827 -- referenced by the Prefix of the N_Indexed_Component node.
828
829 -- Argument expression for a parameter, appearing either directly in
830 -- the Parameter_Associations list of a call or as the Expression of an
831 -- N_Parameter_Association node that appears in this list. In either
832 -- case, the check is against the type of the formal. Note that the
833 -- flag is relevant only in IN and IN OUT parameters, and will be
834 -- ignored for OUT parameters, where no check is required in the call,
835 -- and if a check is required on the return, it is generated explicitly
836 -- with a type conversion.
837
838 -- Initialization expression for the initial value in an object
839 -- declaration. In this case the Do_Range_Check flag is set on
840 -- the initialization expression, and the check is against the
841 -- range of the type of the object being declared.
842
843 -- The expression of a type conversion. In this case the range check is
844 -- against the target type of the conversion. See also the use of
845 -- Do_Overflow_Check on a type conversion. The distinction is that the
846 -- overflow check protects against a value that is outside the range of
847 -- the target base type, whereas a range check checks that the
848 -- resulting value (which is a value of the base type of the target
849 -- type), satisfies the range constraint of the target type.
850
851 -- Note: when a range check is required in contexts other than those
852 -- listed above (e.g. in a return statement), an additional type
853 -- conversion node is introduced to represent the required check.
854
855 -- Do_Storage_Check (Flag17-Sem)
856 -- This flag is set in an N_Allocator node to indicate that a storage
857 -- check is required for the allocation, or in an N_Subprogram_Body node
858 -- to indicate that a stack check is required in the subprogram prolog.
859 -- The N_Allocator case is handled by the routine that expands the call
860 -- to the runtime routine. The N_Subprogram_Body case is handled by the
861 -- backend, and all the semantics does is set the flag.
862
863 -- Do_Tag_Check (Flag13-Sem)
864 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
865 -- N_Procedure_Call_Statement, N_Type_Conversion,
866 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
867 -- node to indicate that the tag check can be suppressed. It is not
868 -- yet decided how this flag is used (TBD ???).
869
870 -- Elaborate_Present (Flag4-Sem)
871 -- This flag is set in the N_With_Clause node to indicate that pragma
872 -- Elaborate pragma appears for the with'ed units.
873
874 -- Elaborate_All_Desirable (Flag9-Sem)
875 -- This flag is set in the N_With_Clause mode to indicate that the static
876 -- elaboration processing has determined that an Elaborate_All pragma is
877 -- desirable for correct elaboration for this unit.
878
879 -- Elaborate_All_Present (Flag14-Sem)
880 -- This flag is set in the N_With_Clause node to indicate that a
881 -- pragma Elaborate_All pragma appears for the with'ed units.
882
883 -- Elaborate_Desirable (Flag11-Sem)
884 -- This flag is set in the N_With_Clause mode to indicate that the static
885 -- elaboration processing has determined that an Elaborate pragma is
886 -- desirable for correct elaboration for this unit.
887
888 -- Elaboration_Boolean (Node2-Sem)
889 -- This field is present in function and procedure specification nodes.
890 -- If set, it points to the entity for a Boolean flag that must be tested
891 -- for certain calls to check for access before elaboration. See body of
892 -- Sem_Elab for further details. This field is Empty if no elaboration
893 -- boolean is required.
894
895 -- Else_Actions (List3-Sem)
896 -- This field is present in conditional expression nodes. During code
897 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
898 -- actions at an appropriate place in the tree to get elaborated at the
899 -- right time. For conditional expressions, we have to be sure that the
900 -- actions for the Else branch are only elaborated if the condition is
901 -- False. The Else_Actions field is used as a temporary parking place for
902 -- these actions. The final tree is always rewritten to eliminate the
903 -- need for this field, so in the tree passed to Gigi, this field is
904 -- always set to No_List.
905
906 -- Enclosing_Variant (Node2-Sem)
907 -- This field is present in the N_Variant node and identifies the Node_Id
908 -- corresponding to the immediately enclosing variant when the variant is
909 -- nested, and N_Empty otherwise. Set during semantic processing of the
910 -- variant part of a record type.
911
912 -- Entity (Node4-Sem)
913 -- Appears in all direct names (identifiers, character literals, and
914 -- operator symbols), as well as expanded names, and attributes that
915 -- denote entities, such as 'Class. Points to entity for corresponding
916 -- defining occurrence. Set after name resolution. For identifiers in a
917 -- WITH list, the corresponding defining occurrence is in a separately
918 -- compiled file, and Entity must be set by the library Load procedure.
919 --
920 -- Note: During name resolution, the value in Entity may be temporarily
921 -- incorrect (e.g. during overload resolution, Entity is initially set to
922 -- the first possible correct interpretation, and then later modified if
923 -- necessary to contain the correct value after resolution).
924 --
925 -- Note: This field overlaps Associated_Node, which is used during
926 -- generic processing (see Sem_Ch12 for details). Note also that in
927 -- generic templates, this means that the Entity field does not always
928 -- point to an Entity. Since the back end is expected to ignore generic
929 -- templates, this is harmless.
930 --
931 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
932 -- It is used only for stream attributes definition clauses. In this
933 -- case, it denotes a (possibly dummy) subprogram entity that is declared
934 -- conceptually at the point of the clause. Thus the visibility of the
935 -- attribute definition clause (in the sense of 8.3(23) as amended by
936 -- AI-195) can be checked by testing the visibility of that subprogram.
937 --
938 -- Note: Normally the Entity field of an identifier points to the entity
939 -- for the corresponding defining identifier, and hence the Chars field
940 -- of an identifier will match the Chars field of the entity. However,
941 -- there is no requirement that these match, and there are obscure cases
942 -- of generated code where they do not match.
943
944 -- Entity_Or_Associated_Node (Node4-Sem)
945 -- A synonym for both Entity and Associated_Node. Used by convention in
946 -- the code when referencing this field in cases where it is not known
947 -- whether the field contains an Entity or an Associated_Node.
948
949 -- Etype (Node5-Sem)
950 -- Appears in all expression nodes, all direct names, and all entities.
951 -- Points to the entity for the related type. Set after type resolution.
952 -- Normally this is the actual subtype of the expression. However, in
953 -- certain contexts such as the right side of an assignment, subscripts,
954 -- arguments to calls, returned value in a function, initial value etc.
955 -- it is the desired target type. In the event that this is different
956 -- from the actual type, the Do_Range_Check flag will be set if a range
957 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
958 -- points to an essentially arbitrary choice from the possible set of
959 -- types.
960
961 -- Exception_Junk (Flag8-Sem)
962 -- This flag is set in a various nodes appearing in a statement sequence
963 -- to indicate that the corresponding node is an artifact of the
964 -- generated code for exception handling, and should be ignored when
965 -- analyzing the control flow of the relevant sequence of statements
966 -- (e.g. to check that it does not end with a bad return statement).
967
968 -- Exception_Label (Node5-Sem)
969 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
970 -- to be used for transforming the corresponding exception into a goto,
971 -- or contains Empty, if this exception is not to be transformed. Also
972 -- appears in N_Exception_Handler nodes, where, if set, it indicates
973 -- that there may be a local raise for the handler, so that expansion
974 -- to allow a goto is required (and this field contains the label for
975 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
976
977 -- Expansion_Delayed (Flag11-Sem)
978 -- Set on aggregates and extension aggregates that need a top-down rather
979 -- than bottom-up expansion. Typically aggregate expansion happens bottom
980 -- up. For nested aggregates the expansion is delayed until the enclosing
981 -- aggregate itself is expanded, e.g. in the context of a declaration. To
982 -- delay it we set this flag. This is done to avoid creating a temporary
983 -- for each level of a nested aggregates, and also to prevent the
984 -- premature generation of constraint checks. This is also a requirement
985 -- if we want to generate the proper attachment to the internal
986 -- finalization lists (for record with controlled components). Top down
987 -- expansion of aggregates is also used for in-place array aggregate
988 -- assignment or initialization. When the full context is known, the
989 -- target of the assignment or initialization is used to generate the
990 -- left-hand side of individual assignment to each sub-component.
991
992 -- First_Inlined_Subprogram (Node3-Sem)
993 -- Present in the N_Compilation_Unit node for the main program. Points
994 -- to a chain of entities for subprograms that are to be inlined. The
995 -- Next_Inlined_Subprogram field of these entities is used as a link
996 -- pointer with Empty marking the end of the list. This field is Empty
997 -- if there are no inlined subprograms or inlining is not active.
998
999 -- First_Named_Actual (Node4-Sem)
1000 -- Present in procedure call statement and function call nodes, and also
1001 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1002 -- named parameter where parameters are ordered by declaration order (as
1003 -- opposed to the actual order in the call which may be different due to
1004 -- named associations). Note: this field points to the explicit actual
1005 -- parameter itself, not the N_Parameter_Association node (its parent).
1006
1007 -- First_Real_Statement (Node2-Sem)
1008 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
1009 -- Empty. Used only when declarations are moved into the statement part
1010 -- of a construct as a result of wrapping an AT END handler that is
1011 -- required to cover the declarations. In this case, this field is used
1012 -- to remember the location in the statements list of the first real
1013 -- statement, i.e. the statement that used to be first in the statement
1014 -- list before the declarations were prepended.
1015
1016 -- First_Subtype_Link (Node5-Sem)
1017 -- Present in N_Freeze_Entity node for an anonymous base type that is
1018 -- implicitly created by the declaration of a first subtype. It points
1019 -- to the entity for the first subtype.
1020
1021 -- Float_Truncate (Flag11-Sem)
1022 -- A flag present in type conversion nodes. This is used for float to
1023 -- integer conversions where truncation is required rather than rounding.
1024 -- Note that Gigi does not handle type conversions from real to integer
1025 -- with rounding (see Expand_N_Type_Conversion).
1026
1027 -- Forwards_OK (Flag5-Sem)
1028 -- A flag present in the N_Assignment_Statement node. It is used only
1029 -- if the type being assigned is an array type, and is set if analysis
1030 -- determines that it is definitely safe to do the copy forwards, i.e.
1031 -- starting at the lowest addressed element. This is the case if either
1032 -- the operands do not overlap, or they may overlap, but if they do,
1033 -- then the left operand is at a lower address than the right operand.
1034 --
1035 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1036 -- means that the front end could not determine that either direction is
1037 -- definitely safe, and a runtime check may be required if the backend
1038 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1039 -- set, it means that the front end can assure no overlap of operands.
1040
1041 -- From_At_End (Flag4-Sem)
1042 -- This flag is set on an N_Raise_Statement node if it corresponds to
1043 -- the reraise statement generated as the last statement of an AT END
1044 -- handler when SJLJ exception handling is active. It is used to stop
1045 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1046 -- because if the restriction is set, the reraise is not generated.
1047
1048 -- From_At_Mod (Flag4-Sem)
1049 -- This flag is set on the attribute definition clause node that is
1050 -- generated by a transformation of an at mod phrase in a record
1051 -- representation clause. This is used to give slightly different (Ada 83
1052 -- compatible) semantics to such a clause, namely it is used to specify a
1053 -- minimum acceptable alignment for the base type and all subtypes. In
1054 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1055 -- must be a multiple of the given value, and the representation clause
1056 -- is considered to be type specific instead of subtype specific.
1057
1058 -- From_Default (Flag6-Sem)
1059 -- This flag is set on the subprogram renaming declaration created in an
1060 -- instance for a formal subprogram, when the formal is declared with a
1061 -- box, and there is no explicit actual. If the flag is present, the
1062 -- declaration is treated as an implicit reference to the formal in the
1063 -- ali file.
1064
1065 -- Generic_Parent (Node5-Sem)
1066 -- Generic_Parent is defined on declaration nodes that are instances. The
1067 -- value of Generic_Parent is the generic entity from which the instance
1068 -- is obtained. Generic_Parent is also defined for the renaming
1069 -- declarations and object declarations created for the actuals in an
1070 -- instantiation. The generic parent of such a declaration is the
1071 -- corresponding generic association in the Instantiation node.
1072
1073 -- Generic_Parent_Type (Node4-Sem)
1074 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1075 -- actuals of formal private and derived types. Within the instance, the
1076 -- operations on the actual are those inherited from the parent. For a
1077 -- formal private type, the parent type is the generic type itself. The
1078 -- Generic_Parent_Type is also used in an instance to determine whether a
1079 -- private operation overrides an inherited one.
1080
1081 -- Handler_List_Entry (Node2-Sem)
1082 -- This field is present in N_Object_Declaration nodes. It is set only
1083 -- for the Handler_Record entry generated for an exception in zero cost
1084 -- exception handling mode. It references the corresponding item in the
1085 -- handler list, and is used to delete this entry if the corresponding
1086 -- handler is deleted during optimization. For further details on why
1087 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1088
1089 -- Has_No_Elaboration_Code (Flag17-Sem)
1090 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1091 -- or not elaboration code is present for this unit. It is initially set
1092 -- true for subprogram specs and bodies and for all generic units and
1093 -- false for non-generic package specs and bodies. Gigi may set the flag
1094 -- in the non-generic package case if it determines that no elaboration
1095 -- code is generated. Note that this flag is not related to the
1096 -- Is_Preelaborated status, there can be preelaborated packages that
1097 -- generate elaboration code, and non-preelaborated packages which do
1098 -- not generate elaboration code.
1099
1100 -- Has_Priority_Pragma (Flag6-Sem)
1101 -- A flag present in N_Subprogram_Body, N_Task_Definition and
1102 -- N_Protected_Definition nodes to flag the presence of either a Priority
1103 -- or Interrupt_Priority pragma in the declaration sequence (public or
1104 -- private in the task and protected cases)
1105
1106 -- Has_Private_View (Flag11-Sem)
1107 -- A flag present in generic nodes that have an entity, to indicate that
1108 -- the node has a private type. Used to exchange private and full
1109 -- declarations if the visibility at instantiation is different from the
1110 -- visibility at generic definition.
1111
1112 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1113 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1114 -- flag the presence of a pragma Relative_Deadline.
1115
1116 -- Has_Self_Reference (Flag13-Sem)
1117 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1118 -- of the expressions contains an access attribute reference to the
1119 -- enclosing type. Such a self-reference can only appear in default-
1120 -- initialized aggregate for a record type.
1121
1122 -- Has_Storage_Size_Pragma (Flag5-Sem)
1123 -- A flag present in an N_Task_Definition node to flag the presence of a
1124 -- Storage_Size pragma.
1125
1126 -- Has_Task_Info_Pragma (Flag7-Sem)
1127 -- A flag present in an N_Task_Definition node to flag the presence of a
1128 -- Task_Info pragma. Used to detect duplicate pragmas.
1129
1130 -- Has_Task_Name_Pragma (Flag8-Sem)
1131 -- A flag present in N_Task_Definition nodes to flag the presence of a
1132 -- Task_Name pragma in the declaration sequence for the task.
1133
1134 -- Has_Wide_Character (Flag11-Sem)
1135 -- Present in string literals, set if any wide character (i.e. character
1136 -- code outside the Character range) appears in the string.
1137
1138 -- Hidden_By_Use_Clause (Elist4-Sem)
1139 -- An entity list present in use clauses that appear within
1140 -- instantiations. For the resolution of local entities, entities
1141 -- introduced by these use clauses have priority over global ones, and
1142 -- outer entities must be explicitly hidden/restored on exit.
1143
1144 -- Implicit_With (Flag16-Sem)
1145 -- This flag is set in the N_With_Clause node that is implicitly
1146 -- generated for runtime units that are loaded by the expander, and also
1147 -- for package System, if it is loaded implicitly by a use of the
1148 -- 'Address or 'Tag attribute. ???There are other implicit with clauses
1149 -- as well.
1150
1151 -- Includes_Infinities (Flag11-Sem)
1152 -- This flag is present in N_Range nodes. It is set for the range of
1153 -- unconstrained float types defined in Standard, which include not only
1154 -- the given range of values, but also legitimately can include infinite
1155 -- values. This flag is false for any float type for which an explicit
1156 -- range is given by the programmer, even if that range is identical to
1157 -- the range for Float.
1158
1159 -- Instance_Spec (Node5-Sem)
1160 -- This field is present in generic instantiation nodes, and also in
1161 -- formal package declaration nodes (formal package declarations are
1162 -- treated in a manner very similar to package instantiations). It points
1163 -- to the node for the spec of the instance, inserted as part of the
1164 -- semantic processing for instantiations in Sem_Ch12.
1165
1166 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1167 -- A flag set in a Block_Statement node to indicate that it is the
1168 -- expansion of an asynchronous entry call. Such a block needs cleanup
1169 -- handler to assure that the call is cancelled.
1170
1171 -- Is_Component_Left_Opnd (Flag13-Sem)
1172 -- Is_Component_Right_Opnd (Flag14-Sem)
1173 -- Present in concatenation nodes, to indicate that the corresponding
1174 -- operand is of the component type of the result. Used in resolving
1175 -- concatenation nodes in instances.
1176
1177 -- Is_Controlling_Actual (Flag16-Sem)
1178 -- This flag is set on in an expression that is a controlling argument in
1179 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1180 -- details of its use.
1181
1182 -- Is_Dynamic_Coextension (Flag18-Sem)
1183 -- Present in allocator nodes, to indicate that this is an allocator
1184 -- for an access discriminant of a dynamically allocated object. The
1185 -- coextension must be deallocated and finalized at the same time as
1186 -- the enclosing object.
1187
1188 -- Is_Entry_Barrier_Function (Flag8-Sem)
1189 -- This flag is set in an N_Subprogram_Body node which is the expansion
1190 -- of an entry barrier from a protected entry body. It is used for the
1191 -- circuitry checking for incorrect use of Current_Task.
1192
1193 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1194 -- This flag is set in an N_Function_Call node to indicate that the extra
1195 -- actuals to support a build-in-place style of call have been added to
1196 -- the call.
1197
1198 -- Is_In_Discriminant_Check (Flag11-Sem)
1199 -- This flag is present in a selected component, and is used to indicate
1200 -- that the reference occurs within a discriminant check. The
1201 -- significance is that optimizations based on assuming that the
1202 -- discriminant check has a correct value cannot be performed in this
1203 -- case (or the discriminant check may be optimized away!)
1204
1205 -- Is_Machine_Number (Flag11-Sem)
1206 -- This flag is set in an N_Real_Literal node to indicate that the value
1207 -- is a machine number. This avoids some unnecessary cases of converting
1208 -- real literals to machine numbers.
1209
1210 -- Is_Null_Loop (Flag16-Sem)
1211 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1212 -- can be determined to be null at compile time. This is used to remove
1213 -- the loop entirely at expansion time.
1214
1215 -- Is_Overloaded (Flag5-Sem)
1216 -- A flag present in all expression nodes. Used temporarily during
1217 -- overloading determination. The setting of this flag is not relevant
1218 -- once overloading analysis is complete.
1219
1220 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1221 -- A flag present only in N_Op_Expon nodes. It is set when the
1222 -- exponentiation is of the form 2 ** N, where the type of N is an
1223 -- unsigned integral subtype whose size does not exceed the size of
1224 -- Standard_Integer (i.e. a type that can be safely converted to
1225 -- Natural), and the exponentiation appears as the right operand of an
1226 -- integer multiplication or an integer division where the dividend is
1227 -- unsigned. It is also required that overflow checking is off for both
1228 -- the exponentiation and the multiply/divide node. If this set of
1229 -- conditions holds, and the flag is set, then the division or
1230 -- multiplication can be (and is) converted to a shift.
1231
1232 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1233 -- A flag set in a Subprogram_Body block to indicate that it is the
1234 -- implementation of a protected subprogram. Such a body needs cleanup
1235 -- handler to make sure that the associated protected object is unlocked
1236 -- when the subprogram completes.
1237
1238 -- Is_Static_Coextension (Flag14-Sem)
1239 -- Present in N_Allocator nodes. Set if the allocator is a coextension
1240 -- of an object allocated on the stack rather than the heap.
1241
1242 -- Is_Static_Expression (Flag6-Sem)
1243 -- Indicates that an expression is a static expression (RM 4.9). See spec
1244 -- of package Sem_Eval for full details on the use of this flag.
1245
1246 -- Is_Subprogram_Descriptor (Flag16-Sem)
1247 -- Present in N_Object_Declaration, and set only for the object
1248 -- declaration generated for a subprogram descriptor in fast exception
1249 -- mode. See Exp_Ch11 for details of use.
1250
1251 -- Is_Task_Allocation_Block (Flag6-Sem)
1252 -- A flag set in a Block_Statement node to indicate that it is the
1253 -- expansion of a task allocator, or the allocator of an object
1254 -- containing tasks. Such a block requires a cleanup handler to call
1255 -- Expunge_Unactivated_Tasks to complete any tasks that have been
1256 -- allocated but not activated when the allocator completes abnormally.
1257
1258 -- Is_Task_Master (Flag5-Sem)
1259 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1260 -- indicate that the construct is a task master (i.e. has declared tasks
1261 -- or declares an access to a task type).
1262
1263 -- Itype (Node1-Sem)
1264 -- Used in N_Itype_Reference node to reference an itype for which it is
1265 -- important to ensure that it is defined. See description of this node
1266 -- for further details.
1267
1268 -- Kill_Range_Check (Flag11-Sem)
1269 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1270 -- result should not be subjected to range checks. This is used for the
1271 -- implementation of Normalize_Scalars.
1272
1273 -- Label_Construct (Node2-Sem)
1274 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1275 -- N_Block_Statement or N_Loop_Statement node to which the label
1276 -- declaration applies. This is not currently used in the compiler
1277 -- itself, but it is useful in the implementation of ASIS queries.
1278 -- This field is left empty for the special labels generated as part
1279 -- of expanding raise statements with a local exception handler.
1280
1281 -- Library_Unit (Node4-Sem)
1282 -- In a stub node, Library_Unit points to the compilation unit node of
1283 -- the corresponding subunit.
1284 --
1285 -- In a with clause node, Library_Unit points to the spec of the with'ed
1286 -- unit.
1287 --
1288 -- In a compilation unit node, the usage depends on the unit type:
1289 --
1290 -- For a library unit body, Library_Unit points to the compilation unit
1291 -- node of the corresponding spec, unless it's a subprogram body with
1292 -- Acts_As_Spec set, in which case it points to itself.
1293 --
1294 -- For a spec, Library_Unit points to the compilation unit node of the
1295 -- corresponding body, if present. The body will be present if the spec
1296 -- is or contains generics that we needed to instantiate. Similarly, the
1297 -- body will be present if we needed it for inlining purposes. Thus, if
1298 -- we have a spec/body pair, both of which are present, they point to
1299 -- each other via Library_Unit.
1300 --
1301 -- For a subunit, Library_Unit points to the compilation unit node of
1302 -- the parent body.
1303 --
1304 -- Note that this field is not used to hold the parent pointer for child
1305 -- unit (which might in any case need to use it for some other purpose as
1306 -- described above). Instead for a child unit, implicit with's are
1307 -- generated for all parents.
1308
1309 -- Local_Raise_Statements (Elist1)
1310 -- This field is present in exception handler nodes. It is set to
1311 -- No_Elist in the normal case. If there is at least one raise statement
1312 -- which can potentially be handled as a local raise, then this field
1313 -- points to a list of raise nodes, which are calls to a routine to raise
1314 -- an exception. These are raise nodes which can be optimized into gotos
1315 -- if the handler turns out to meet the conditions which permit this
1316 -- transformation. Note that this does NOT include instances of the
1317 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
1318 -- handled by the back end (using the N_Push/N_Pop mechanism).
1319
1320 -- Loop_Actions (List2-Sem)
1321 -- A list present in Component_Association nodes in array aggregates.
1322 -- Used to collect actions that must be executed within the loop because
1323 -- they may need to be evaluated anew each time through.
1324
1325 -- Limited_View_Installed (Flag18-Sem)
1326 -- Present in With_Clauses and in package specifications. If set on
1327 -- with_clause, it indicates that this clause has created the current
1328 -- limited view of the designated package. On a package specification, it
1329 -- indicates that the limited view has already been created because the
1330 -- package is mentioned in a limited_with_clause in the closure of the
1331 -- unit being compiled.
1332
1333 -- Local_Raise_Not_OK (Flag7-Sem)
1334 -- Present in N_Exception_Handler nodes. Set if the handler contains
1335 -- a construct (reraise statement, or call to subprogram in package
1336 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
1337 -- for a local raise (one that could otherwise be converted to a goto).
1338
1339 -- Must_Be_Byte_Aligned (Flag14-Sem)
1340 -- This flag is present in N_Attribute_Reference nodes. It can be set
1341 -- only for the Address and Unrestricted_Access attributes. If set it
1342 -- means that the object for which the address/access is given must be on
1343 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
1344 -- of the object is to be made before taking the address (this copy is in
1345 -- the current scope on the stack frame). This is used for certain cases
1346 -- of code generated by the expander that passes parameters by address.
1347 --
1348 -- The reason the copy is not made by the front end is that the back end
1349 -- has more information about type layout and may be able to (but is not
1350 -- guaranteed to) prevent making unnecessary copies.
1351
1352 -- Must_Not_Freeze (Flag8-Sem)
1353 -- A flag present in all expression nodes. Normally expressions cause
1354 -- freezing as described in the RM. If this flag is set, then this is
1355 -- inhibited. This is used by the analyzer and expander to label nodes
1356 -- that are created by semantic analysis or expansion and which must not
1357 -- cause freezing even though they normally would. This flag is also
1358 -- present in an N_Subtype_Indication node, since we also use these in
1359 -- calls to Freeze_Expression.
1360
1361 -- Next_Entity (Node2-Sem)
1362 -- Present in defining identifiers, defining character literals and
1363 -- defining operator symbols (i.e. in all entities). The entities of a
1364 -- scope are chained, and this field is used as the forward pointer for
1365 -- this list. See Einfo for further details.
1366
1367 -- Next_Implicit_With (Node3-Sem)
1368 -- Present in N_With_Clause. Part of a chain of with_clauses generated
1369 -- in rtsfind to indicate implicit dependencies on predefined units. Used
1370 -- to prevent multiple with_clauses for the same unit in a given context.
1371 -- A postorder traversal of the tree whose nodes are units and whose
1372 -- links are with_clauses defines the order in which Inspector must
1373 -- examine a compiled unit and its full context. This ordering ensures
1374 -- that any subprogram call is examined after the subprogram declartion
1375 -- has been seen.
1376
1377 -- Next_Named_Actual (Node4-Sem)
1378 -- Present in parameter association node. Set during semantic analysis to
1379 -- point to the next named parameter, where parameters are ordered by
1380 -- declaration order (as opposed to the actual order in the call, which
1381 -- may be different due to named associations). Not that this field
1382 -- points to the explicit actual parameter itself, not to the
1383 -- N_Parameter_Association node (its parent).
1384
1385 -- Next_Pragma (Node1-Sem)
1386 -- Present in N_Pragma nodes. Used to create a linked list of pragma
1387 -- nodes. Currently used for two purposes:
1388 --
1389 -- Create a list of linked Check_Policy pragmas. The head of this list
1390 -- is stored in Opt.Check_Policy_List (which has further details).
1391 --
1392 -- Used by processing for Pre/Postcondition pragmas to store a list of
1393 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
1394 -- details).
1395
1396 -- Next_Rep_Item (Node5-Sem)
1397 -- Present in pragma nodes and attribute definition nodes. Used to link
1398 -- representation items that apply to an entity. See description of
1399 -- First_Rep_Item field in Einfo for full details.
1400
1401 -- Next_Use_Clause (Node3-Sem)
1402 -- While use clauses are active during semantic processing, they are
1403 -- chained from the scope stack entry, using Next_Use_Clause as a link
1404 -- pointer, with Empty marking the end of the list. The head pointer is
1405 -- in the scope stack entry (First_Use_Clause). At the end of semantic
1406 -- processing (i.e. when Gigi sees the tree, the contents of this field
1407 -- is undefined and should not be read).
1408
1409 -- No_Ctrl_Actions (Flag7-Sem)
1410 -- Present in N_Assignment_Statement to indicate that no finalize nor
1411 -- adjust should take place on this assignment even though the rhs is
1412 -- controlled. This is used in init procs and aggregate expansions where
1413 -- the generated assignments are more initialisations than real
1414 -- assignments.
1415
1416 -- No_Elaboration_Check (Flag14-Sem)
1417 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1418 -- that no elaboration check is needed on the call, because it appears in
1419 -- the context of a local Suppress pragma. This is used on calls within
1420 -- task bodies, where the actual elaboration checks are applied after
1421 -- analysis, when the local scope stack is not present.
1422
1423 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1424 -- Present in N_With_Clause nodes. Set if the with clause is on the
1425 -- package or subprogram spec where the main unit is the corresponding
1426 -- body, and no entities of the with'ed unit are referenced by the spec
1427 -- (an entity may still be referenced in the body, so this flag is used
1428 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1429 -- full details)
1430
1431 -- No_Initialization (Flag13-Sem)
1432 -- Present in N_Object_Declaration and N_Allocator to indicate that the
1433 -- object must not be initialized (by Initialize or call to an init
1434 -- proc). This is needed for controlled aggregates. When the Object
1435 -- declaration has an expression, this flag means that this expression
1436 -- should not be taken into account (needed for in place initialization
1437 -- with aggregates).
1438
1439 -- No_Truncation (Flag17-Sem)
1440 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
1441 -- only if the RM_Size of the source is greater than the RM_Size of the
1442 -- target for scalar operands. Normally in such a case we truncate some
1443 -- higher order bits of the source, and then sign/zero extend the result
1444 -- to form the output value. But if this flag is set, then we do not do
1445 -- any truncation, so for example, if an 8 bit input is converted to 5
1446 -- bit result which is in fact stored in 8 bits, then the high order
1447 -- three bits of the target result will be copied from the source. This
1448 -- is used for properly setting out of range values for use by pragmas
1449 -- Initialize_Scalars and Normalize_Scalars.
1450
1451 -- Original_Discriminant (Node2-Sem)
1452 -- Present in identifiers. Used in references to discriminants that
1453 -- appear in generic units. Because the names of the discriminants may be
1454 -- different in an instance, we use this field to recover the position of
1455 -- the discriminant in the original type, and replace it with the
1456 -- discriminant at the same position in the instantiated type.
1457
1458 -- Original_Entity (Node2-Sem)
1459 -- Present in numeric literals. Used to denote the named number that has
1460 -- been constant-folded into the given literal. If literal is from
1461 -- source, or the result of some other constant-folding operation, then
1462 -- Original_Entity is empty. This field is needed to handle properly
1463 -- named numbers in generic units, where the Associated_Node field
1464 -- interferes with the Entity field, making it impossible to preserve the
1465 -- original entity at the point of instantiation (ASIS problem).
1466
1467 -- Others_Discrete_Choices (List1-Sem)
1468 -- When a case statement or variant is analyzed, the semantic checks
1469 -- determine the actual list of choices that correspond to an others
1470 -- choice. This list is materialized for later use by the expander and
1471 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
1472 -- this materialized list of choices, which is in standard format for a
1473 -- list of discrete choices, except that of course it cannot contain an
1474 -- N_Others_Choice entry.
1475
1476 -- Parameter_List_Truncated (Flag17-Sem)
1477 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. Set
1478 -- (for OpenVMS ports of GNAT only) if the parameter list is truncated as
1479 -- a result of a First_Optional_Parameter specification in an
1480 -- Import_Function, Import_Procedure, or Import_Valued_Procedure pragma.
1481 -- The truncation is done by the expander by removing trailing parameters
1482 -- from the argument list, in accordance with the set of rules allowing
1483 -- such parameter removal. In particular, parameters can be removed
1484 -- working from the end of the parameter list backwards up to and
1485 -- including the entry designated by First_Optional_Parameter in the
1486 -- Import pragma. Parameters can be removed if they are implicit and the
1487 -- default value is a known-at-compile-time value, including the use of
1488 -- the Null_Parameter attribute, or if explicit parameter values are
1489 -- present that match the corresponding defaults.
1490
1491 -- Parent_Spec (Node4-Sem)
1492 -- For a library unit that is a child unit spec (package or subprogram
1493 -- declaration, generic declaration or instantiation, or library level
1494 -- rename, this field points to the compilation unit node for the parent
1495 -- package specification. This field is Empty for library bodies (the
1496 -- parent spec in this case can be found from the corresponding spec).
1497
1498 -- PPC_Enabled (Flag5-Sem)
1499 -- Present in N_Pragma nodes. This flag is relevant only for precondition
1500 -- and postcondition nodes. It is true if the check corresponding to the
1501 -- pragma type is enabled at the point where the pragma appears.
1502
1503 -- Present_Expr (Uint3-Sem)
1504 -- Present in an N_Variant node. This has a meaningful value only after
1505 -- Gigi has back annotated the tree with representation information. At
1506 -- this point, it contains a reference to a gcc expression that depends
1507 -- on the values of one or more discriminants. Give a set of discriminant
1508 -- values, this expression evaluates to False (zero) if variant is not
1509 -- present, and True (non-zero) if it is present. See unit Repinfo for
1510 -- further details on gigi back annotation. This field is used during
1511 -- ASIS processing (data decomposition annex) to determine if a field is
1512 -- present or not.
1513
1514 -- Print_In_Hex (Flag13-Sem)
1515 -- Set on an N_Integer_Literal node to indicate that the value should be
1516 -- printed in hexadecimal in the sprint listing. Has no effect on
1517 -- legality or semantics of program, only on the displayed output. This
1518 -- is used to clarify output from the packed array cases.
1519
1520 -- Procedure_To_Call (Node2-Sem)
1521 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1522 -- and N_Extended_Return_Statement nodes. References the entity for the
1523 -- declaration of the procedure to be called to accomplish the required
1524 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
1525 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
1526 -- allocating the return value), and for the Deallocate procedure in the
1527 -- case of N_Free_Statement.
1528
1529 -- Raises_Constraint_Error (Flag7-Sem)
1530 -- Set on an expression whose evaluation will definitely fail constraint
1531 -- error check. In the case of static expressions, this flag must be set
1532 -- accurately (and if it is set, the expression is typically illegal
1533 -- unless it appears as a non-elaborated branch of a short-circuit form).
1534 -- For a non-static expression, this flag may be set whenever an
1535 -- expression (e.g. an aggregate) is known to raise constraint error. If
1536 -- set, the expression definitely will raise CE if elaborated at runtime.
1537 -- If not set, the expression may or may not raise CE. In other words, on
1538 -- static expressions, the flag is set accurately, on non-static
1539 -- expressions it is set conservatively.
1540
1541 -- Redundant_Use (Flag13-Sem)
1542 -- Present in nodes that can appear as an operand in a use clause or use
1543 -- type clause (identifiers, expanded names, attribute references). Set
1544 -- to indicate that a use is redundant (and therefore need not be undone
1545 -- on scope exit).
1546
1547 -- Renaming_Exception (Node2-Sem)
1548 -- Present in N_Exception_Declaration node. Used to point back to the
1549 -- exception renaming for an exception declared within a subprogram.
1550 -- What happens is that an exception declared in a subprogram is moved
1551 -- to the library level with a unique name, and the original exception
1552 -- becomes a renaming. This link from the library level exception to the
1553 -- renaming declaration allows registering of the proper exception name.
1554
1555 -- Return_Statement_Entity (Node5-Sem)
1556 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
1557 -- Points to an E_Return_Statement representing the return statement.
1558
1559 -- Return_Object_Declarations (List3)
1560 -- Present in N_Extended_Return_Statement.
1561 -- Points to a list initially containing a single
1562 -- N_Object_Declaration representing the return object.
1563 -- We use a list (instead of just a pointer to the object decl)
1564 -- because Analyze wants to insert extra actions on this list.
1565
1566 -- Rounded_Result (Flag18-Sem)
1567 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1568 -- Used in the fixed-point cases to indicate that the result must be
1569 -- rounded as a result of the use of the 'Round attribute. Also used for
1570 -- integer N_Op_Divide nodes to indicate that the result should be
1571 -- rounded to the nearest integer (breaking ties away from zero), rather
1572 -- than truncated towards zero as usual. These rounded integer operations
1573 -- are the result of expansion of rounded fixed-point divide, conversion
1574 -- and multiplication operations.
1575
1576 -- Scope (Node3-Sem)
1577 -- Present in defining identifiers, defining character literals and
1578 -- defining operator symbols (i.e. in all entities). The entities of a
1579 -- scope all use this field to reference the corresponding scope entity.
1580 -- See Einfo for further details.
1581
1582 -- Shift_Count_OK (Flag4-Sem)
1583 -- A flag present in shift nodes to indicate that the shift count is
1584 -- known to be in range, i.e. is in the range from zero to word length
1585 -- minus one. If this flag is not set, then the shift count may be
1586 -- outside this range, i.e. larger than the word length, and the code
1587 -- must ensure that such shift counts give the appropriate result.
1588
1589 -- Source_Type (Node1-Sem)
1590 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1591 -- source type entity for the unchecked conversion instantiation
1592 -- which gigi must do size validation for.
1593
1594 -- Static_Processing_OK (Flag4-Sem)
1595 -- Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate
1596 -- flag is set, the full value of the aggregate can be determined at
1597 -- compile time and the aggregate can be passed as is to the back-end.
1598 -- In this event it is irrelevant whether this flag is set or not.
1599 -- However, if the flag Compile_Time_Known_Aggregate is not set but
1600 -- Static_Processing_OK is set, the aggregate can (but need not) be
1601 -- converted into a compile time known aggregate by the expander. See
1602 -- Sem_Aggr for the specific conditions under which an aggregate has its
1603 -- Static_Processing_OK flag set.
1604
1605 -- Storage_Pool (Node1-Sem)
1606 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1607 -- and N_Extended_Return_Statement nodes. References the entity for the
1608 -- storage pool to be used for the allocate or free call or for the
1609 -- allocation of the returned value from function. Empty indicates that
1610 -- the global default pool is to be used. Note that in the case
1611 -- of a return statement, this field is set only if the function returns
1612 -- value of a type whose size is not known at compile time on the
1613 -- secondary stack.
1614
1615 -- Suppress_Loop_Warnings (Flag17-Sem)
1616 -- Used in N_Loop_Statement node to indicate that warnings within the
1617 -- body of the loop should be suppressed. This is set when the range
1618 -- of a FOR loop is known to be null, or is probably null (loop would
1619 -- only execute if invalid values are present).
1620
1621 -- Target_Type (Node2-Sem)
1622 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
1623 -- type entity for the unchecked conversion instantiation which gigi must
1624 -- do size validation for.
1625
1626 -- Then_Actions (List3-Sem)
1627 -- This field is present in conditional expression nodes. During code
1628 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1629 -- actions at an appropriate place in the tree to get elaborated at the
1630 -- right time. For conditional expressions, we have to be sure that the
1631 -- actions for the Then branch are only elaborated if the condition is
1632 -- True. The Then_Actions field is used as a temporary parking place for
1633 -- these actions. The final tree is always rewritten to eliminate the
1634 -- need for this field, so in the tree passed to Gigi, this field is
1635 -- always set to No_List.
1636
1637 -- Treat_Fixed_As_Integer (Flag14-Sem)
1638 -- This flag appears in operator nodes for divide, multiply, mod and rem
1639 -- on fixed-point operands. It indicates that the operands are to be
1640 -- treated as integer values, ignoring small values. This flag is only
1641 -- set as a result of expansion of fixed-point operations. Typically a
1642 -- fixed-point multiplication in the source generates subsidiary
1643 -- multiplication and division operations that work with the underlying
1644 -- integer values and have this flag set. Note that this flag is not
1645 -- needed on other arithmetic operations (add, neg, subtract etc.) since
1646 -- in these cases it is always the case that fixed is treated as integer.
1647 -- The Etype field MUST be set if this flag is set. The analyzer knows to
1648 -- leave such nodes alone, and whoever makes them must set the correct
1649 -- Etype value.
1650
1651 -- TSS_Elist (Elist3-Sem)
1652 -- Present in N_Freeze_Entity nodes. Holds an element list containing
1653 -- entries for each TSS (type support subprogram) associated with the
1654 -- frozen type. The elements of the list are the entities for the
1655 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
1656 -- if there are no type support subprograms for the type or if the freeze
1657 -- node is not for a type.
1658
1659 -- Unreferenced_In_Spec (Flag7-Sem)
1660 -- Present in N_With_Clause nodes. Set if the with clause is on the
1661 -- package or subprogram spec where the main unit is the corresponding
1662 -- body, and is not referenced by the spec (it may still be referenced by
1663 -- the body, so this flag is used to generate the proper message (see
1664 -- Sem_Util.Check_Unused_Withs for details)
1665
1666 -- Was_Originally_Stub (Flag13-Sem)
1667 -- This flag is set in the node for a proper body that replaces stub.
1668 -- During the analysis procedure, stubs in some situations get rewritten
1669 -- by the corresponding bodies, and we set this flag to remember that
1670 -- this happened. Note that it is not good enough to rely on the use of
1671 -- Original_Node here because of the case of nested instantiations where
1672 -- the substituted node can be copied.
1673
1674 -- Zero_Cost_Handling (Flag5-Sem)
1675 -- This flag is set in all handled sequence of statement and exception
1676 -- handler nodes if exceptions are to be handled using the zero-cost
1677 -- mechanism (see Ada.Exceptions and System.Exceptions in files
1678 -- a-except.ads/adb and s-except.ads for full details). What gigi needs
1679 -- to do for such a handler is simply to put the code in the handler
1680 -- somewhere. The front end has generated all necessary labels.
1681
1682 --------------------------------------------------
1683 -- Note on Use of End_Label and End_Span Fields --
1684 --------------------------------------------------
1685
1686 -- Several constructs have end lines:
1687
1688 -- Loop Statement end loop [loop_IDENTIFIER];
1689 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
1690 -- Task Definition end [task_IDENTIFIER]
1691 -- Protected Definition end [protected_IDENTIFIER]
1692 -- Protected Body end [protected_IDENTIFIER]
1693
1694 -- Block Statement end [block_IDENTIFIER];
1695 -- Subprogram Body end [DESIGNATOR];
1696 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
1697 -- Task Body end [task_IDENTIFIER];
1698 -- Accept Statement end [entry_IDENTIFIER]];
1699 -- Entry Body end [entry_IDENTIFIER];
1700
1701 -- If Statement end if;
1702 -- Case Statement end case;
1703
1704 -- Record Definition end record;
1705 -- Enumeration Definition );
1706
1707 -- The End_Label and End_Span fields are used to mark the locations of
1708 -- these lines, and also keep track of the label in the case where a label
1709 -- is present.
1710
1711 -- For the first group above, the End_Label field of the corresponding node
1712 -- is used to point to the label identifier. In the case where there is no
1713 -- label in the source, the parser supplies a dummy identifier (with
1714 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
1715 -- marks the location of the token following the END token.
1716
1717 -- For the second group, the use of End_Label is similar, but the End_Label
1718 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
1719 -- simply because in some cases there is no room in the parent node.
1720
1721 -- For the third group, there is never any label, and instead of using
1722 -- End_Label, we use the End_Span field which gives the location of the
1723 -- token following END, relative to the starting Sloc of the construct,
1724 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
1725 -- following the End_Label.
1726
1727 -- The record definition case is handled specially, we treat it as though
1728 -- it required an optional label which is never present, and so the parser
1729 -- always builds a dummy identifier with Comes From Source set False. The
1730 -- reason we do this, rather than using End_Span in this case, is that we
1731 -- want to generate a cross-ref entry for the end of a record, since it
1732 -- represents a scope for name declaration purposes.
1733
1734 -- The enumeration definition case is handled in an exactly similar manner,
1735 -- building a dummy identifier to get a cross-reference.
1736
1737 -- Note: the reason we store the difference as a Uint, instead of storing
1738 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
1739 -- distinguished from other types of values, and we count on all general
1740 -- use fields being self describing. To make things easier for clients,
1741 -- note that we provide function End_Location, and procedure
1742 -- Set_End_Location to allow access to the logical value (which is the
1743 -- Source_Ptr value for the end token).
1744
1745 ---------------------
1746 -- Syntactic Nodes --
1747 ---------------------
1748
1749 ---------------------
1750 -- 2.3 Identifier --
1751 ---------------------
1752
1753 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
1754 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
1755
1756 -- An IDENTIFIER shall not be a reserved word
1757
1758 -- In the Ada grammar identifiers are the bottom level tokens which have
1759 -- very few semantics. Actual program identifiers are direct names. If
1760 -- we were being 100% honest with the grammar, then we would have a node
1761 -- called N_Direct_Name which would point to an identifier. However,
1762 -- that's too many extra nodes, so we just use the N_Identifier node
1763 -- directly as a direct name, and it contains the expression fields and
1764 -- Entity field that correspond to its use as a direct name. In those
1765 -- few cases where identifiers appear in contexts where they are not
1766 -- direct names (pragmas, pragma argument associations, attribute
1767 -- references and attribute definition clauses), the Chars field of the
1768 -- node contains the Name_Id for the identifier name.
1769
1770 -- Note: in GNAT, a reserved word can be treated as an identifier in two
1771 -- cases. First, an incorrect use of a reserved word as an identifier is
1772 -- diagnosed and then treated as a normal identifier. Second, an
1773 -- attribute designator of the form of a reserved word (access, delta,
1774 -- digits, range) is treated as an identifier.
1775
1776 -- Note: The set of letters that is permitted in an identifier depends
1777 -- on the character set in use. See package Csets for full details.
1778
1779 -- N_Identifier
1780 -- Sloc points to identifier
1781 -- Chars (Name1) contains the Name_Id for the identifier
1782 -- Entity (Node4-Sem)
1783 -- Associated_Node (Node4-Sem)
1784 -- Original_Discriminant (Node2-Sem)
1785 -- Redundant_Use (Flag13-Sem)
1786 -- Has_Private_View (Flag11-Sem) (set in generic units)
1787 -- plus fields for expression
1788
1789 --------------------------
1790 -- 2.4 Numeric Literal --
1791 --------------------------
1792
1793 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
1794
1795 ----------------------------
1796 -- 2.4.1 Decimal Literal --
1797 ----------------------------
1798
1799 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
1800
1801 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
1802
1803 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
1804
1805 -- Decimal literals appear in the tree as either integer literal nodes
1806 -- or real literal nodes, depending on whether a period is present.
1807
1808 -- Note: literal nodes appear as a result of direct use of literals
1809 -- in the source program, and also as the result of evaluating
1810 -- expressions at compile time. In the latter case, it is possible
1811 -- to construct real literals that have no syntactic representation
1812 -- using the standard literal format. Such literals are listed by
1813 -- Sprint using the notation [numerator / denominator].
1814
1815 -- Note: the value of an integer literal node created by the front end
1816 -- is never outside the range of values of the base type. However, it
1817 -- can be the case that the value is outside the range of the
1818 -- particular subtype. This happens in the case of integer overflows
1819 -- with checks suppressed.
1820
1821 -- N_Integer_Literal
1822 -- Sloc points to literal
1823 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1824 -- has been constant-folded into its literal value.
1825 -- Intval (Uint3) contains integer value of literal
1826 -- plus fields for expression
1827 -- Print_In_Hex (Flag13-Sem)
1828
1829 -- N_Real_Literal
1830 -- Sloc points to literal
1831 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1832 -- has been constant-folded into its literal value.
1833 -- Realval (Ureal3) contains real value of literal
1834 -- Corresponding_Integer_Value (Uint4-Sem)
1835 -- Is_Machine_Number (Flag11-Sem)
1836 -- plus fields for expression
1837
1838 --------------------------
1839 -- 2.4.2 Based Literal --
1840 --------------------------
1841
1842 -- BASED_LITERAL ::=
1843 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
1844
1845 -- BASE ::= NUMERAL
1846
1847 -- BASED_NUMERAL ::=
1848 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
1849
1850 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
1851
1852 -- Based literals appear in the tree as either integer literal nodes
1853 -- or real literal nodes, depending on whether a period is present.
1854
1855 ----------------------------
1856 -- 2.5 Character Literal --
1857 ----------------------------
1858
1859 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
1860
1861 -- N_Character_Literal
1862 -- Sloc points to literal
1863 -- Chars (Name1) contains the Name_Id for the identifier
1864 -- Char_Literal_Value (Uint2) contains the literal value
1865 -- Entity (Node4-Sem)
1866 -- Associated_Node (Node4-Sem)
1867 -- Has_Private_View (Flag11-Sem) set in generic units.
1868 -- plus fields for expression
1869
1870 -- Note: the Entity field will be missing (set to Empty) for character
1871 -- literals whose type is Standard.Wide_Character or Standard.Character
1872 -- or a type derived from one of these two. In this case the character
1873 -- literal stands for its own coding. The reason we take this irregular
1874 -- short cut is to avoid the need to build lots of junk defining
1875 -- character literal nodes.
1876
1877 -------------------------
1878 -- 2.6 String Literal --
1879 -------------------------
1880
1881 -- STRING LITERAL ::= "{STRING_ELEMENT}"
1882
1883 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
1884 -- single GRAPHIC_CHARACTER other than a quotation mark.
1885 --
1886 -- Is_Folded_In_Parser is True if the parser created this literal by
1887 -- folding a sequence of "&" operators. For example, if the source code
1888 -- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
1889 -- is set. This flag is needed because the parser doesn't know about
1890 -- visibility, so the folded result might be wrong, and semantic
1891 -- analysis needs to check for that.
1892
1893 -- N_String_Literal
1894 -- Sloc points to literal
1895 -- Strval (Str3) contains Id of string value
1896 -- Has_Wide_Character (Flag11-Sem)
1897 -- Is_Folded_In_Parser (Flag4)
1898 -- plus fields for expression
1899
1900 ------------------
1901 -- 2.7 Comment --
1902 ------------------
1903
1904 -- A COMMENT starts with two adjacent hyphens and extends up to the
1905 -- end of the line. A COMMENT may appear on any line of a program.
1906
1907 -- Comments are skipped by the scanner and do not appear in the tree.
1908 -- It is possible to reconstruct the position of comments with respect
1909 -- to the elements of the tree by using the source position (Sloc)
1910 -- pointers that appear in every tree node.
1911
1912 -----------------
1913 -- 2.8 Pragma --
1914 -----------------
1915
1916 -- PRAGMA ::= pragma IDENTIFIER
1917 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
1918
1919 -- Note that a pragma may appear in the tree anywhere a declaration
1920 -- or a statement may appear, as well as in some other situations
1921 -- which are explicitly documented.
1922
1923 -- N_Pragma
1924 -- Sloc points to pragma identifier
1925 -- Next_Pragma (Node1-Sem)
1926 -- Pragma_Argument_Associations (List2) (set to No_List if none)
1927 -- Debug_Statement (Node3) (set to Empty if not Debug, Assert)
1928 -- Pragma_Identifier (Node4)
1929 -- Next_Rep_Item (Node5-Sem)
1930 -- PPC_Enabled (Flag5-Sem)
1931
1932 -- Note: we should have a section on what pragmas are passed on to
1933 -- the back end to be processed. This section should note that pragma
1934 -- Psect_Object is always converted to Common_Object, but there are
1935 -- undoubtedly many other similar notes required ???
1936
1937 -- Note: a utility function Pragma_Name may be applied to pragma nodes
1938 -- to conveniently obtain the Chars field of the Pragma_Identifier.
1939
1940 --------------------------------------
1941 -- 2.8 Pragma Argument Association --
1942 --------------------------------------
1943
1944 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
1945 -- [pragma_argument_IDENTIFIER =>] NAME
1946 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
1947
1948 -- N_Pragma_Argument_Association
1949 -- Sloc points to first token in association
1950 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
1951 -- Expression (Node3)
1952
1953 ------------------------
1954 -- 2.9 Reserved Word --
1955 ------------------------
1956
1957 -- Reserved words are parsed by the scanner, and returned as the
1958 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
1959
1960 ----------------------------
1961 -- 3.1 Basic Declaration --
1962 ----------------------------
1963
1964 -- BASIC_DECLARATION ::=
1965 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
1966 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
1967 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
1968 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
1969 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
1970 -- | GENERIC_INSTANTIATION
1971
1972 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
1973 -- see further description in section on semantic nodes.
1974
1975 -- Also, in the tree that is constructed, a pragma may appear
1976 -- anywhere that a declaration may appear.
1977
1978 ------------------------------
1979 -- 3.1 Defining Identifier --
1980 ------------------------------
1981
1982 -- DEFINING_IDENTIFIER ::= IDENTIFIER
1983
1984 -- A defining identifier is an entity, which has additional fields
1985 -- depending on the setting of the Ekind field. These additional
1986 -- fields are defined (and access subprograms declared) in package
1987 -- Einfo.
1988
1989 -- Note: N_Defining_Identifier is an extended node whose fields are
1990 -- deliberate layed out to match the layout of fields in an ordinary
1991 -- N_Identifier node allowing for easy alteration of an identifier
1992 -- node into a defining identifier node. For details, see procedure
1993 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
1994
1995 -- N_Defining_Identifier
1996 -- Sloc points to identifier
1997 -- Chars (Name1) contains the Name_Id for the identifier
1998 -- Next_Entity (Node2-Sem)
1999 -- Scope (Node3-Sem)
2000 -- Etype (Node5-Sem)
2001
2002 -----------------------------
2003 -- 3.2.1 Type Declaration --
2004 -----------------------------
2005
2006 -- TYPE_DECLARATION ::=
2007 -- FULL_TYPE_DECLARATION
2008 -- | INCOMPLETE_TYPE_DECLARATION
2009 -- | PRIVATE_TYPE_DECLARATION
2010 -- | PRIVATE_EXTENSION_DECLARATION
2011
2012 ----------------------------------
2013 -- 3.2.1 Full Type Declaration --
2014 ----------------------------------
2015
2016 -- FULL_TYPE_DECLARATION ::=
2017 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2018 -- is TYPE_DEFINITION;
2019 -- | TASK_TYPE_DECLARATION
2020 -- | PROTECTED_TYPE_DECLARATION
2021
2022 -- The full type declaration node is used only for the first case. The
2023 -- second case (concurrent type declaration), is represented directly
2024 -- by a task type declaration or a protected type declaration.
2025
2026 -- N_Full_Type_Declaration
2027 -- Sloc points to TYPE
2028 -- Defining_Identifier (Node1)
2029 -- Discriminant_Specifications (List4) (set to No_List if none)
2030 -- Type_Definition (Node3)
2031 -- Discr_Check_Funcs_Built (Flag11-Sem)
2032
2033 ----------------------------
2034 -- 3.2.1 Type Definition --
2035 ----------------------------
2036
2037 -- TYPE_DEFINITION ::=
2038 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2039 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2040 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
2041 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
2042
2043 --------------------------------
2044 -- 3.2.2 Subtype Declaration --
2045 --------------------------------
2046
2047 -- SUBTYPE_DECLARATION ::=
2048 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION;
2049
2050 -- The subtype indication field is set to Empty for subtypes
2051 -- declared in package Standard (Positive, Natural).
2052
2053 -- N_Subtype_Declaration
2054 -- Sloc points to SUBTYPE
2055 -- Defining_Identifier (Node1)
2056 -- Null_Exclusion_Present (Flag11)
2057 -- Subtype_Indication (Node5)
2058 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2059 -- Exception_Junk (Flag8-Sem)
2060
2061 -------------------------------
2062 -- 3.2.2 Subtype Indication --
2063 -------------------------------
2064
2065 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2066
2067 -- Note: if no constraint is present, the subtype indication appears
2068 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2069 -- node is used only if a constraint is present.
2070
2071 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2072 -- with the null-exclusion part (see AI-231), we had to introduce a new
2073 -- attribute in all the parents of subtype_indication nodes to indicate
2074 -- if the null-exclusion is present.
2075
2076 -- Note: the reason that this node has expression fields is that a
2077 -- subtype indication can appear as an operand of a membership test.
2078
2079 -- N_Subtype_Indication
2080 -- Sloc points to first token of subtype mark
2081 -- Subtype_Mark (Node4)
2082 -- Constraint (Node3)
2083 -- Etype (Node5-Sem)
2084 -- Must_Not_Freeze (Flag8-Sem)
2085
2086 -- Note: Etype is a copy of the Etype field of the Subtype_Mark. The
2087 -- reason for this redundancy is so that in a list of array index types,
2088 -- the Etype can be uniformly accessed to determine the subscript type.
2089 -- This means that no Itype is constructed for the actual subtype that
2090 -- is created by the subtype indication. If such an Itype is required,
2091 -- it is constructed in the context in which the indication appears.
2092
2093 -------------------------
2094 -- 3.2.2 Subtype Mark --
2095 -------------------------
2096
2097 -- SUBTYPE_MARK ::= subtype_NAME
2098
2099 -----------------------
2100 -- 3.2.2 Constraint --
2101 -----------------------
2102
2103 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2104
2105 ------------------------------
2106 -- 3.2.2 Scalar Constraint --
2107 ------------------------------
2108
2109 -- SCALAR_CONSTRAINT ::=
2110 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2111
2112 ---------------------------------
2113 -- 3.2.2 Composite Constraint --
2114 ---------------------------------
2115
2116 -- COMPOSITE_CONSTRAINT ::=
2117 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2118
2119 -------------------------------
2120 -- 3.3.1 Object Declaration --
2121 -------------------------------
2122
2123 -- OBJECT_DECLARATION ::=
2124 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2125 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION];
2126 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2127 -- ACCESS_DEFINITION [:= EXPRESSION];
2128 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2129 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION];
2130 -- | SINGLE_TASK_DECLARATION
2131 -- | SINGLE_PROTECTED_DECLARATION
2132
2133 -- Note: aliased is not permitted in Ada 83 mode
2134
2135 -- The N_Object_Declaration node is only for the first two cases.
2136 -- Single task declaration is handled by P_Task (9.1)
2137 -- Single protected declaration is handled by P_protected (9.5)
2138
2139 -- Although the syntax allows multiple identifiers in the list, the
2140 -- semantics is as though successive declarations were given with
2141 -- identical type definition and expression components. To simplify
2142 -- semantic processing, the parser represents a multiple declaration
2143 -- case as a sequence of single declarations, using the More_Ids and
2144 -- Prev_Ids flags to preserve the original source form as described
2145 -- in the section on "Handling of Defining Identifier Lists".
2146
2147 -- The flag Has_Init_Expression is set if an initializing expression
2148 -- is present. Normally it is set if and only if Expression contains
2149 -- a non-empty value, but there is an exception to this. When the
2150 -- initializing expression is an aggregate which requires explicit
2151 -- assignments, the Expression field gets set to Empty, but this flag
2152 -- is still set, so we don't forget we had an initializing expression.
2153
2154 -- Note: if a range check is required for the initialization
2155 -- expression then the Do_Range_Check flag is set in the Expression,
2156 -- with the check being done against the type given by the object
2157 -- definition, which is also the Etype of the defining identifier.
2158
2159 -- Note: the contents of the Expression field must be ignored (i.e.
2160 -- treated as though it were Empty) if No_Initialization is set True.
2161
2162 -- Note: the back end places some restrictions on the form of the
2163 -- Expression field. If the object being declared is Atomic, then
2164 -- the Expression may not have the form of an aggregate (since this
2165 -- might cause the back end to generate separate assignments). In this
2166 -- case the front end must generate an extra temporary and initialize
2167 -- this temporary as required (the temporary itself is not atomic).
2168
2169 -- Note: there is not node kind for object definition. Instead, the
2170 -- corresponding field holds a subtype indication, an array type
2171 -- definition, or (Ada 2005, AI-406) an access definition.
2172
2173 -- N_Object_Declaration
2174 -- Sloc points to first identifier
2175 -- Defining_Identifier (Node1)
2176 -- Aliased_Present (Flag4) set if ALIASED appears
2177 -- Constant_Present (Flag17) set if CONSTANT appears
2178 -- Null_Exclusion_Present (Flag11)
2179 -- Object_Definition (Node4) subtype indic./array type def./ access def.
2180 -- Expression (Node3) (set to Empty if not present)
2181 -- Handler_List_Entry (Node2-Sem)
2182 -- Corresponding_Generic_Association (Node5-Sem)
2183 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2184 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2185 -- No_Initialization (Flag13-Sem)
2186 -- Assignment_OK (Flag15-Sem)
2187 -- Exception_Junk (Flag8-Sem)
2188 -- Is_Subprogram_Descriptor (Flag16-Sem)
2189 -- Has_Init_Expression (Flag14)
2190
2191 -------------------------------------
2192 -- 3.3.1 Defining Identifier List --
2193 -------------------------------------
2194
2195 -- DEFINING_IDENTIFIER_LIST ::=
2196 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2197
2198 -------------------------------
2199 -- 3.3.2 Number Declaration --
2200 -------------------------------
2201
2202 -- NUMBER_DECLARATION ::=
2203 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2204
2205 -- Although the syntax allows multiple identifiers in the list, the
2206 -- semantics is as though successive declarations were given with
2207 -- identical expressions. To simplify semantic processing, the parser
2208 -- represents a multiple declaration case as a sequence of single
2209 -- declarations, using the More_Ids and Prev_Ids flags to preserve
2210 -- the original source form as described in the section on "Handling
2211 -- of Defining Identifier Lists".
2212
2213 -- N_Number_Declaration
2214 -- Sloc points to first identifier
2215 -- Defining_Identifier (Node1)
2216 -- Expression (Node3)
2217 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2218 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2219
2220 ----------------------------------
2221 -- 3.4 Derived Type Definition --
2222 ----------------------------------
2223
2224 -- DERIVED_TYPE_DEFINITION ::=
2225 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2226 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2227
2228 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
2229 -- in Ada 83 mode
2230
2231 -- Note: a record extension part is required if ABSTRACT is present
2232
2233 -- N_Derived_Type_Definition
2234 -- Sloc points to NEW
2235 -- Abstract_Present (Flag4)
2236 -- Null_Exclusion_Present (Flag11) (set to False if not present)
2237 -- Subtype_Indication (Node5)
2238 -- Record_Extension_Part (Node3) (set to Empty if not present)
2239 -- Limited_Present (Flag17)
2240 -- Task_Present (Flag5) set in task interfaces
2241 -- Protected_Present (Flag6) set in protected interfaces
2242 -- Synchronized_Present (Flag7) set in interfaces
2243 -- Interface_List (List2) (set to No_List if none)
2244 -- Interface_Present (Flag16) set in abstract interfaces
2245
2246 -- Note: Task_Present, Protected_Present, Synchronized_Present,
2247 -- Interface_List, and Interface_Present are used for abstract
2248 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2249
2250 ---------------------------
2251 -- 3.5 Range Constraint --
2252 ---------------------------
2253
2254 -- RANGE_CONSTRAINT ::= range RANGE
2255
2256 -- N_Range_Constraint
2257 -- Sloc points to RANGE
2258 -- Range_Expression (Node4)
2259
2260 ----------------
2261 -- 3.5 Range --
2262 ----------------
2263
2264 -- RANGE ::=
2265 -- RANGE_ATTRIBUTE_REFERENCE
2266 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2267
2268 -- Note: the case of a range given as a range attribute reference
2269 -- appears directly in the tree as an attribute reference.
2270
2271 -- Note: the field name for a reference to a range is Range_Expression
2272 -- rather than Range, because range is a reserved keyword in Ada!
2273
2274 -- Note: the reason that this node has expression fields is that a
2275 -- range can appear as an operand of a membership test. The Etype
2276 -- field is the type of the range (we do NOT construct an implicit
2277 -- subtype to represent the range exactly).
2278
2279 -- N_Range
2280 -- Sloc points to ..
2281 -- Low_Bound (Node1)
2282 -- High_Bound (Node2)
2283 -- Includes_Infinities (Flag11)
2284 -- plus fields for expression
2285
2286 -- Note: if the range appears in a context, such as a subtype
2287 -- declaration, where range checks are required on one or both of
2288 -- the expression fields, then type conversion nodes are inserted
2289 -- to represent the required checks.
2290
2291 ----------------------------------------
2292 -- 3.5.1 Enumeration Type Definition --
2293 ----------------------------------------
2294
2295 -- ENUMERATION_TYPE_DEFINITION ::=
2296 -- (ENUMERATION_LITERAL_SPECIFICATION
2297 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2298
2299 -- Note: the Literals field in the node described below is null for
2300 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2301 -- which special processing handles these types as special cases.
2302
2303 -- N_Enumeration_Type_Definition
2304 -- Sloc points to left parenthesis
2305 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2306 -- End_Label (Node4) (set to Empty if internally generated record)
2307
2308 ----------------------------------------------
2309 -- 3.5.1 Enumeration Literal Specification --
2310 ----------------------------------------------
2311
2312 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2313 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2314
2315 ---------------------------------------
2316 -- 3.5.1 Defining Character Literal --
2317 ---------------------------------------
2318
2319 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2320
2321 -- A defining character literal is an entity, which has additional
2322 -- fields depending on the setting of the Ekind field. These
2323 -- additional fields are defined (and access subprograms declared)
2324 -- in package Einfo.
2325
2326 -- Note: N_Defining_Character_Literal is an extended node whose fields
2327 -- are deliberate layed out to match the layout of fields in an ordinary
2328 -- N_Character_Literal node allowing for easy alteration of a character
2329 -- literal node into a defining character literal node. For details, see
2330 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2331
2332 -- N_Defining_Character_Literal
2333 -- Sloc points to literal
2334 -- Chars (Name1) contains the Name_Id for the identifier
2335 -- Next_Entity (Node2-Sem)
2336 -- Scope (Node3-Sem)
2337 -- Etype (Node5-Sem)
2338
2339 ------------------------------------
2340 -- 3.5.4 Integer Type Definition --
2341 ------------------------------------
2342
2343 -- Note: there is an error in this rule in the latest version of the
2344 -- grammar, so we have retained the old rule pending clarification.
2345
2346 -- INTEGER_TYPE_DEFINITION ::=
2347 -- SIGNED_INTEGER_TYPE_DEFINITION
2348 -- | MODULAR_TYPE_DEFINITION
2349
2350 -------------------------------------------
2351 -- 3.5.4 Signed Integer Type Definition --
2352 -------------------------------------------
2353
2354 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2355 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2356
2357 -- Note: the Low_Bound and High_Bound fields are set to Empty
2358 -- for integer types defined in package Standard.
2359
2360 -- N_Signed_Integer_Type_Definition
2361 -- Sloc points to RANGE
2362 -- Low_Bound (Node1)
2363 -- High_Bound (Node2)
2364
2365 ------------------------------------
2366 -- 3.5.4 Modular Type Definition --
2367 ------------------------------------
2368
2369 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2370
2371 -- N_Modular_Type_Definition
2372 -- Sloc points to MOD
2373 -- Expression (Node3)
2374
2375 ---------------------------------
2376 -- 3.5.6 Real Type Definition --
2377 ---------------------------------
2378
2379 -- REAL_TYPE_DEFINITION ::=
2380 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2381
2382 --------------------------------------
2383 -- 3.5.7 Floating Point Definition --
2384 --------------------------------------
2385
2386 -- FLOATING_POINT_DEFINITION ::=
2387 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2388
2389 -- Note: The Digits_Expression and Real_Range_Specifications fields
2390 -- are set to Empty for floating-point types declared in Standard.
2391
2392 -- N_Floating_Point_Definition
2393 -- Sloc points to DIGITS
2394 -- Digits_Expression (Node2)
2395 -- Real_Range_Specification (Node4) (set to Empty if not present)
2396
2397 -------------------------------------
2398 -- 3.5.7 Real Range Specification --
2399 -------------------------------------
2400
2401 -- REAL_RANGE_SPECIFICATION ::=
2402 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2403
2404 -- N_Real_Range_Specification
2405 -- Sloc points to RANGE
2406 -- Low_Bound (Node1)
2407 -- High_Bound (Node2)
2408
2409 -----------------------------------
2410 -- 3.5.9 Fixed Point Definition --
2411 -----------------------------------
2412
2413 -- FIXED_POINT_DEFINITION ::=
2414 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2415
2416 --------------------------------------------
2417 -- 3.5.9 Ordinary Fixed Point Definition --
2418 --------------------------------------------
2419
2420 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2421 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2422
2423 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2424
2425 -- N_Ordinary_Fixed_Point_Definition
2426 -- Sloc points to DELTA
2427 -- Delta_Expression (Node3)
2428 -- Real_Range_Specification (Node4)
2429
2430 -------------------------------------------
2431 -- 3.5.9 Decimal Fixed Point Definition --
2432 -------------------------------------------
2433
2434 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2435 -- delta static_EXPRESSION
2436 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2437
2438 -- Note: decimal types are not permitted in Ada 83 mode
2439
2440 -- N_Decimal_Fixed_Point_Definition
2441 -- Sloc points to DELTA
2442 -- Delta_Expression (Node3)
2443 -- Digits_Expression (Node2)
2444 -- Real_Range_Specification (Node4) (set to Empty if not present)
2445
2446 ------------------------------
2447 -- 3.5.9 Digits Constraint --
2448 ------------------------------
2449
2450 -- DIGITS_CONSTRAINT ::=
2451 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2452
2453 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2454 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2455
2456 -- N_Digits_Constraint
2457 -- Sloc points to DIGITS
2458 -- Digits_Expression (Node2)
2459 -- Range_Constraint (Node4) (set to Empty if not present)
2460
2461 --------------------------------
2462 -- 3.6 Array Type Definition --
2463 --------------------------------
2464
2465 -- ARRAY_TYPE_DEFINITION ::=
2466 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2467
2468 -----------------------------------------
2469 -- 3.6 Unconstrained Array Definition --
2470 -----------------------------------------
2471
2472 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2473 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2474 -- COMPONENT_DEFINITION
2475
2476 -- Note: dimensionality of array is indicated by number of entries in
2477 -- the Subtype_Marks list, which has one entry for each dimension.
2478
2479 -- N_Unconstrained_Array_Definition
2480 -- Sloc points to ARRAY
2481 -- Subtype_Marks (List2)
2482 -- Component_Definition (Node4)
2483
2484 -----------------------------------
2485 -- 3.6 Index Subtype Definition --
2486 -----------------------------------
2487
2488 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2489
2490 -- There is no explicit node in the tree for an index subtype
2491 -- definition since the N_Unconstrained_Array_Definition node
2492 -- incorporates the type marks which appear in this context.
2493
2494 ---------------------------------------
2495 -- 3.6 Constrained Array Definition --
2496 ---------------------------------------
2497
2498 -- CONSTRAINED_ARRAY_DEFINITION ::=
2499 -- array (DISCRETE_SUBTYPE_DEFINITION
2500 -- {, DISCRETE_SUBTYPE_DEFINITION})
2501 -- of COMPONENT_DEFINITION
2502
2503 -- Note: dimensionality of array is indicated by number of entries
2504 -- in the Discrete_Subtype_Definitions list, which has one entry
2505 -- for each dimension.
2506
2507 -- N_Constrained_Array_Definition
2508 -- Sloc points to ARRAY
2509 -- Discrete_Subtype_Definitions (List2)
2510 -- Component_Definition (Node4)
2511
2512 --------------------------------------
2513 -- 3.6 Discrete Subtype Definition --
2514 --------------------------------------
2515
2516 -- DISCRETE_SUBTYPE_DEFINITION ::=
2517 -- discrete_SUBTYPE_INDICATION | RANGE
2518
2519 -------------------------------
2520 -- 3.6 Component Definition --
2521 -------------------------------
2522
2523 -- COMPONENT_DEFINITION ::=
2524 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
2525
2526 -- Note: although the syntax does not permit a component definition to
2527 -- be an anonymous array (and the parser will diagnose such an attempt
2528 -- with an appropriate message), it is possible for anonymous arrays
2529 -- to appear as component definitions. The semantics and back end handle
2530 -- this case properly, and the expander in fact generates such cases.
2531 -- Access_Definition is an optional field that gives support to
2532 -- Ada 2005 (AI-230). The parser generates nodes that have either the
2533 -- Subtype_Indication field or else the Access_Definition field.
2534
2535 -- N_Component_Definition
2536 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
2537 -- Aliased_Present (Flag4)
2538 -- Null_Exclusion_Present (Flag11)
2539 -- Subtype_Indication (Node5) (set to Empty if not present)
2540 -- Access_Definition (Node3) (set to Empty if not present)
2541
2542 -----------------------------
2543 -- 3.6.1 Index Constraint --
2544 -----------------------------
2545
2546 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
2547
2548 -- It is not in general possible to distinguish between discriminant
2549 -- constraints and index constraints at parse time, since a simple
2550 -- name could be either the subtype mark of a discrete range, or an
2551 -- expression in a discriminant association with no name. Either
2552 -- entry appears simply as the name, and the semantic parse must
2553 -- distinguish between the two cases. Thus we use a common tree
2554 -- node format for both of these constraint types.
2555
2556 -- See Discriminant_Constraint for format of node
2557
2558 ---------------------------
2559 -- 3.6.1 Discrete Range --
2560 ---------------------------
2561
2562 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
2563
2564 ----------------------------
2565 -- 3.7 Discriminant Part --
2566 ----------------------------
2567
2568 -- DISCRIMINANT_PART ::=
2569 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
2570
2571 ------------------------------------
2572 -- 3.7 Unknown Discriminant Part --
2573 ------------------------------------
2574
2575 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
2576
2577 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
2578
2579 -- There is no explicit node in the tree for an unknown discriminant
2580 -- part. Instead the Unknown_Discriminants_Present flag is set in the
2581 -- parent node.
2582
2583 ----------------------------------
2584 -- 3.7 Known Discriminant Part --
2585 ----------------------------------
2586
2587 -- KNOWN_DISCRIMINANT_PART ::=
2588 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
2589
2590 -------------------------------------
2591 -- 3.7 Discriminant Specification --
2592 -------------------------------------
2593
2594 -- DISCRIMINANT_SPECIFICATION ::=
2595 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
2596 -- [:= DEFAULT_EXPRESSION]
2597 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
2598 -- [:= DEFAULT_EXPRESSION]
2599
2600 -- Although the syntax allows multiple identifiers in the list, the
2601 -- semantics is as though successive specifications were given with
2602 -- identical type definition and expression components. To simplify
2603 -- semantic processing, the parser represents a multiple declaration
2604 -- case as a sequence of single specifications, using the More_Ids and
2605 -- Prev_Ids flags to preserve the original source form as described
2606 -- in the section on "Handling of Defining Identifier Lists".
2607
2608 -- N_Discriminant_Specification
2609 -- Sloc points to first identifier
2610 -- Defining_Identifier (Node1)
2611 -- Null_Exclusion_Present (Flag11)
2612 -- Discriminant_Type (Node5) subtype mark or access parameter definition
2613 -- Expression (Node3) (set to Empty if no default expression)
2614 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2615 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2616
2617 -----------------------------
2618 -- 3.7 Default Expression --
2619 -----------------------------
2620
2621 -- DEFAULT_EXPRESSION ::= EXPRESSION
2622
2623 ------------------------------------
2624 -- 3.7.1 Discriminant Constraint --
2625 ------------------------------------
2626
2627 -- DISCRIMINANT_CONSTRAINT ::=
2628 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
2629
2630 -- It is not in general possible to distinguish between discriminant
2631 -- constraints and index constraints at parse time, since a simple
2632 -- name could be either the subtype mark of a discrete range, or an
2633 -- expression in a discriminant association with no name. Either
2634 -- entry appears simply as the name, and the semantic parse must
2635 -- distinguish between the two cases. Thus we use a common tree
2636 -- node format for both of these constraint types.
2637
2638 -- N_Index_Or_Discriminant_Constraint
2639 -- Sloc points to left paren
2640 -- Constraints (List1) points to list of discrete ranges or
2641 -- discriminant associations
2642
2643 -------------------------------------
2644 -- 3.7.1 Discriminant Association --
2645 -------------------------------------
2646
2647 -- DISCRIMINANT_ASSOCIATION ::=
2648 -- [discriminant_SELECTOR_NAME
2649 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
2650
2651 -- Note: a discriminant association that has no selector name list
2652 -- appears directly as an expression in the tree.
2653
2654 -- N_Discriminant_Association
2655 -- Sloc points to first token of discriminant association
2656 -- Selector_Names (List1) (always non-empty, since if no selector
2657 -- names are present, this node is not used, see comment above)
2658 -- Expression (Node3)
2659
2660 ---------------------------------
2661 -- 3.8 Record Type Definition --
2662 ---------------------------------
2663
2664 -- RECORD_TYPE_DEFINITION ::=
2665 -- [[abstract] tagged] [limited] RECORD_DEFINITION
2666
2667 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
2668
2669 -- There is no explicit node in the tree for a record type definition.
2670 -- Instead the flags for Tagged_Present and Limited_Present appear in
2671 -- the N_Record_Definition node for a record definition appearing in
2672 -- the context of a record type definition.
2673
2674 ----------------------------
2675 -- 3.8 Record Definition --
2676 ----------------------------
2677
2678 -- RECORD_DEFINITION ::=
2679 -- record
2680 -- COMPONENT_LIST
2681 -- end record
2682 -- | null record
2683
2684 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
2685 -- flags appear only for a record definition appearing in a record
2686 -- type definition.
2687
2688 -- Note: the NULL RECORD case is not permitted in Ada 83
2689
2690 -- N_Record_Definition
2691 -- Sloc points to RECORD or NULL
2692 -- End_Label (Node4) (set to Empty if internally generated record)
2693 -- Abstract_Present (Flag4)
2694 -- Tagged_Present (Flag15)
2695 -- Limited_Present (Flag17)
2696 -- Component_List (Node1) empty in null record case
2697 -- Null_Present (Flag13) set in null record case
2698 -- Task_Present (Flag5) set in task interfaces
2699 -- Protected_Present (Flag6) set in protected interfaces
2700 -- Synchronized_Present (Flag7) set in interfaces
2701 -- Interface_Present (Flag16) set in abstract interfaces
2702 -- Interface_List (List2) (set to No_List if none)
2703
2704 -- Note: Task_Present, Protected_Present, Synchronized _Present,
2705 -- Interface_List and Interface_Present are used for abstract
2706 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2707
2708 -------------------------
2709 -- 3.8 Component List --
2710 -------------------------
2711
2712 -- COMPONENT_LIST ::=
2713 -- COMPONENT_ITEM {COMPONENT_ITEM}
2714 -- | {COMPONENT_ITEM} VARIANT_PART
2715 -- | null;
2716
2717 -- N_Component_List
2718 -- Sloc points to first token of component list
2719 -- Component_Items (List3)
2720 -- Variant_Part (Node4) (set to Empty if no variant part)
2721 -- Null_Present (Flag13)
2722
2723 -------------------------
2724 -- 3.8 Component Item --
2725 -------------------------
2726
2727 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
2728
2729 -- Note: A component item can also be a pragma, and in the tree
2730 -- that is obtained after semantic processing, a component item
2731 -- can be an N_Null node resulting from a non-recognized pragma.
2732
2733 --------------------------------
2734 -- 3.8 Component Declaration --
2735 --------------------------------
2736
2737 -- COMPONENT_DECLARATION ::=
2738 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
2739 -- [:= DEFAULT_EXPRESSION]
2740
2741 -- Note: although the syntax does not permit a component definition to
2742 -- be an anonymous array (and the parser will diagnose such an attempt
2743 -- with an appropriate message), it is possible for anonymous arrays
2744 -- to appear as component definitions. The semantics and back end handle
2745 -- this case properly, and the expander in fact generates such cases.
2746
2747 -- Although the syntax allows multiple identifiers in the list, the
2748 -- semantics is as though successive declarations were given with the
2749 -- same component definition and expression components. To simplify
2750 -- semantic processing, the parser represents a multiple declaration
2751 -- case as a sequence of single declarations, using the More_Ids and
2752 -- Prev_Ids flags to preserve the original source form as described
2753 -- in the section on "Handling of Defining Identifier Lists".
2754
2755 -- N_Component_Declaration
2756 -- Sloc points to first identifier
2757 -- Defining_Identifier (Node1)
2758 -- Component_Definition (Node4)
2759 -- Expression (Node3) (set to Empty if no default expression)
2760 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2761 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2762
2763 -------------------------
2764 -- 3.8.1 Variant Part --
2765 -------------------------
2766
2767 -- VARIANT_PART ::=
2768 -- case discriminant_DIRECT_NAME is
2769 -- VARIANT
2770 -- {VARIANT}
2771 -- end case;
2772
2773 -- Note: the variants list can contain pragmas as well as variants.
2774 -- In a properly formed program there is at least one variant.
2775
2776 -- N_Variant_Part
2777 -- Sloc points to CASE
2778 -- Name (Node2)
2779 -- Variants (List1)
2780
2781 --------------------
2782 -- 3.8.1 Variant --
2783 --------------------
2784
2785 -- VARIANT ::=
2786 -- when DISCRETE_CHOICE_LIST =>
2787 -- COMPONENT_LIST
2788
2789 -- N_Variant
2790 -- Sloc points to WHEN
2791 -- Discrete_Choices (List4)
2792 -- Component_List (Node1)
2793 -- Enclosing_Variant (Node2-Sem)
2794 -- Present_Expr (Uint3-Sem)
2795 -- Dcheck_Function (Node5-Sem)
2796
2797 ---------------------------------
2798 -- 3.8.1 Discrete Choice List --
2799 ---------------------------------
2800
2801 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
2802
2803 ----------------------------
2804 -- 3.8.1 Discrete Choice --
2805 ----------------------------
2806
2807 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
2808
2809 -- Note: in Ada 83 mode, the expression must be a simple expression
2810
2811 -- The only choice that appears explicitly is the OTHERS choice, as
2812 -- defined here. Other cases of discrete choice (expression and
2813 -- discrete range) appear directly. This production is also used
2814 -- for the OTHERS possibility of an exception choice.
2815
2816 -- Note: in accordance with the syntax, the parser does not check that
2817 -- OTHERS appears at the end on its own in a choice list context. This
2818 -- is a semantic check.
2819
2820 -- N_Others_Choice
2821 -- Sloc points to OTHERS
2822 -- Others_Discrete_Choices (List1-Sem)
2823 -- All_Others (Flag11-Sem)
2824
2825 ----------------------------------
2826 -- 3.9.1 Record Extension Part --
2827 ----------------------------------
2828
2829 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
2830
2831 -- Note: record extension parts are not permitted in Ada 83 mode
2832
2833 --------------------------------------
2834 -- 3.9.4 Interface Type Definition --
2835 --------------------------------------
2836
2837 -- INTERFACE_TYPE_DEFINITION ::=
2838 -- [limited | task | protected | synchronized]
2839 -- interface [interface_list]
2840
2841 -- Note: Interfaces are implemented with N_Record_Definition and
2842 -- N_Derived_Type_Definition nodes because most of the support
2843 -- for the analysis of abstract types has been reused to
2844 -- analyze abstract interfaces.
2845
2846 ----------------------------------
2847 -- 3.10 Access Type Definition --
2848 ----------------------------------
2849
2850 -- ACCESS_TYPE_DEFINITION ::=
2851 -- ACCESS_TO_OBJECT_DEFINITION
2852 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2853
2854 --------------------------
2855 -- 3.10 Null Exclusion --
2856 --------------------------
2857
2858 -- NULL_EXCLUSION ::= not null
2859
2860 ---------------------------------------
2861 -- 3.10 Access To Object Definition --
2862 ---------------------------------------
2863
2864 -- ACCESS_TO_OBJECT_DEFINITION ::=
2865 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
2866 -- SUBTYPE_INDICATION
2867
2868 -- N_Access_To_Object_Definition
2869 -- Sloc points to ACCESS
2870 -- All_Present (Flag15)
2871 -- Null_Exclusion_Present (Flag11)
2872 -- Subtype_Indication (Node5)
2873 -- Constant_Present (Flag17)
2874
2875 -----------------------------------
2876 -- 3.10 General Access Modifier --
2877 -----------------------------------
2878
2879 -- GENERAL_ACCESS_MODIFIER ::= all | constant
2880
2881 -- Note: general access modifiers are not permitted in Ada 83 mode
2882
2883 -- There is no explicit node in the tree for general access modifier.
2884 -- Instead the All_Present or Constant_Present flags are set in the
2885 -- parent node.
2886
2887 -------------------------------------------
2888 -- 3.10 Access To Subprogram Definition --
2889 -------------------------------------------
2890
2891 -- ACCESS_TO_SUBPROGRAM_DEFINITION
2892 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
2893 -- | [NULL_EXCLUSION] access [protected] function
2894 -- PARAMETER_AND_RESULT_PROFILE
2895
2896 -- Note: access to subprograms are not permitted in Ada 83 mode
2897
2898 -- N_Access_Function_Definition
2899 -- Sloc points to ACCESS
2900 -- Null_Exclusion_Present (Flag11)
2901 -- Null_Exclusion_In_Return_Present (Flag14)
2902 -- Protected_Present (Flag6)
2903 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2904 -- Result_Definition (Node4) result subtype (subtype mark or access def)
2905
2906 -- N_Access_Procedure_Definition
2907 -- Sloc points to ACCESS
2908 -- Null_Exclusion_Present (Flag11)
2909 -- Protected_Present (Flag6)
2910 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2911
2912 -----------------------------
2913 -- 3.10 Access Definition --
2914 -----------------------------
2915
2916 -- ACCESS_DEFINITION ::=
2917 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
2918 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2919
2920 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
2921
2922 -- N_Access_Definition
2923 -- Sloc points to ACCESS
2924 -- Null_Exclusion_Present (Flag11)
2925 -- All_Present (Flag15)
2926 -- Constant_Present (Flag17)
2927 -- Subtype_Mark (Node4)
2928 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
2929
2930 -----------------------------------------
2931 -- 3.10.1 Incomplete Type Declaration --
2932 -----------------------------------------
2933
2934 -- INCOMPLETE_TYPE_DECLARATION ::=
2935 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
2936
2937 -- N_Incomplete_Type_Declaration
2938 -- Sloc points to TYPE
2939 -- Defining_Identifier (Node1)
2940 -- Discriminant_Specifications (List4) (set to No_List if no
2941 -- discriminant part, or if the discriminant part is an
2942 -- unknown discriminant part)
2943 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
2944 -- Tagged_Present (Flag15)
2945
2946 ----------------------------
2947 -- 3.11 Declarative Part --
2948 ----------------------------
2949
2950 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
2951
2952 -- Note: although the parser enforces the syntactic requirement that
2953 -- a declarative part can contain only declarations, the semantic
2954 -- processing may add statements to the list of actions in a
2955 -- declarative part, so the code generator should be prepared
2956 -- to accept a statement in this position.
2957
2958 ----------------------------
2959 -- 3.11 Declarative Item --
2960 ----------------------------
2961
2962 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
2963
2964 ----------------------------------
2965 -- 3.11 Basic Declarative Item --
2966 ----------------------------------
2967
2968 -- BASIC_DECLARATIVE_ITEM ::=
2969 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
2970
2971 ----------------
2972 -- 3.11 Body --
2973 ----------------
2974
2975 -- BODY ::= PROPER_BODY | BODY_STUB
2976
2977 -----------------------
2978 -- 3.11 Proper Body --
2979 -----------------------
2980
2981 -- PROPER_BODY ::=
2982 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
2983
2984 ---------------
2985 -- 4.1 Name --
2986 ---------------
2987
2988 -- NAME ::=
2989 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
2990 -- | INDEXED_COMPONENT | SLICE
2991 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
2992 -- | TYPE_CONVERSION | FUNCTION_CALL
2993 -- | CHARACTER_LITERAL
2994
2995 ----------------------
2996 -- 4.1 Direct Name --
2997 ----------------------
2998
2999 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3000
3001 -----------------
3002 -- 4.1 Prefix --
3003 -----------------
3004
3005 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3006
3007 -------------------------------
3008 -- 4.1 Explicit Dereference --
3009 -------------------------------
3010
3011 -- EXPLICIT_DEREFERENCE ::= NAME . all
3012
3013 -- N_Explicit_Dereference
3014 -- Sloc points to ALL
3015 -- Prefix (Node3)
3016 -- Actual_Designated_Subtype (Node4-Sem)
3017 -- plus fields for expression
3018
3019 -------------------------------
3020 -- 4.1 Implicit Dereference --
3021 -------------------------------
3022
3023 -- IMPLICIT_DEREFERENCE ::= NAME
3024
3025 ------------------------------
3026 -- 4.1.1 Indexed Component --
3027 ------------------------------
3028
3029 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3030
3031 -- Note: the parser may generate this node in some situations where it
3032 -- should be a function call. The semantic pass must correct this
3033 -- misidentification (which is inevitable at the parser level).
3034
3035 -- N_Indexed_Component
3036 -- Sloc contains a copy of the Sloc value of the Prefix
3037 -- Prefix (Node3)
3038 -- Expressions (List1)
3039 -- plus fields for expression
3040
3041 -- Note: if any of the subscripts requires a range check, then the
3042 -- Do_Range_Check flag is set on the corresponding expression, with
3043 -- the index type being determined from the type of the Prefix, which
3044 -- references the array being indexed.
3045
3046 -- Note: in a fully analyzed and expanded indexed component node, and
3047 -- hence in any such node that gigi sees, if the prefix is an access
3048 -- type, then an explicit dereference operation has been inserted.
3049
3050 ------------------
3051 -- 4.1.2 Slice --
3052 ------------------
3053
3054 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3055
3056 -- Note: an implicit subtype is created to describe the resulting
3057 -- type, so that the bounds of this type are the bounds of the slice.
3058
3059 -- N_Slice
3060 -- Sloc points to first token of prefix
3061 -- Prefix (Node3)
3062 -- Discrete_Range (Node4)
3063 -- plus fields for expression
3064
3065 -------------------------------
3066 -- 4.1.3 Selected Component --
3067 -------------------------------
3068
3069 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3070
3071 -- Note: selected components that are semantically expanded names get
3072 -- changed during semantic processing into the separate N_Expanded_Name
3073 -- node. See description of this node in the section on semantic nodes.
3074
3075 -- N_Selected_Component
3076 -- Sloc points to period
3077 -- Prefix (Node3)
3078 -- Selector_Name (Node2)
3079 -- Associated_Node (Node4-Sem)
3080 -- Do_Discriminant_Check (Flag13-Sem)
3081 -- Is_In_Discriminant_Check (Flag11-Sem)
3082 -- plus fields for expression
3083
3084 --------------------------
3085 -- 4.1.3 Selector Name --
3086 --------------------------
3087
3088 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3089
3090 --------------------------------
3091 -- 4.1.4 Attribute Reference --
3092 --------------------------------
3093
3094 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3095
3096 -- Note: the syntax is quite ambiguous at this point. Consider:
3097
3098 -- A'Length (X) X is part of the attribute designator
3099 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
3100 -- A'Class (X) X is the expression of a type conversion
3101
3102 -- It would be possible for the parser to distinguish these cases
3103 -- by looking at the attribute identifier. However, that would mean
3104 -- more work in introducing new implementation defined attributes,
3105 -- and also it would mean that special processing for attributes
3106 -- would be scattered around, instead of being centralized in the
3107 -- semantic routine that handles an N_Attribute_Reference node.
3108 -- Consequently, the parser in all the above cases stores the
3109 -- expression (X in these examples) as a single element list in
3110 -- in the Expressions field of the N_Attribute_Reference node.
3111
3112 -- Similarly, for attributes like Max which take two arguments,
3113 -- we store the two arguments as a two element list in the
3114 -- Expressions field. Of course it is clear at parse time that
3115 -- this case is really a function call with an attribute as the
3116 -- prefix, but it turns out to be convenient to handle the two
3117 -- argument case in a similar manner to the one argument case,
3118 -- and indeed in general the parser will accept any number of
3119 -- expressions in this position and store them as a list in the
3120 -- attribute reference node. This allows for future addition of
3121 -- attributes that take more than two arguments.
3122
3123 -- Note: named associates are not permitted in function calls where
3124 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
3125 -- to skip the normal subprogram argument processing.
3126
3127 -- Note: for the attributes whose designators are technically keywords,
3128 -- i.e. digits, access, delta, range, the Attribute_Name field contains
3129 -- the corresponding name, even though no identifier is involved.
3130
3131 -- Note: the generated code may contain stream attributes applied to
3132 -- limited types for which no stream routines exist officially. In such
3133 -- case, the result is to use the stream attribute for the underlying
3134 -- full type, or in the case of a protected type, the components
3135 -- (including any discriminants) are merely streamed in order.
3136
3137 -- See Exp_Attr for a complete description of which attributes are
3138 -- passed onto Gigi, and which are handled entirely by the front end.
3139
3140 -- Gigi restriction: For the Pos attribute, the prefix cannot be
3141 -- a non-standard enumeration type or a nonzero/zero semantics
3142 -- boolean type, so the value is simply the stored representation.
3143
3144 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
3145 -- references a subprogram that is a renaming, then the front end must
3146 -- rewrite the attribute to refer directly to the renamed entity.
3147
3148 -- Note: In generated code, the Address and Unrestricted_Access
3149 -- attributes can be applied to any expression, and the meaning is
3150 -- to create an object containing the value (the object is in the
3151 -- current stack frame), and pass the address of this value. If the
3152 -- Must_Be_Byte_Aligned flag is set, then the object whose address
3153 -- is taken must be on a byte (storage unit) boundary, and if it is
3154 -- not (or may not be), then the generated code must create a copy
3155 -- that is byte aligned, and pass the address of this copy.
3156
3157 -- N_Attribute_Reference
3158 -- Sloc points to apostrophe
3159 -- Prefix (Node3)
3160 -- Attribute_Name (Name2) identifier name from attribute designator
3161 -- Expressions (List1) (set to No_List if no associated expressions)
3162 -- Entity (Node4-Sem) used if the attribute yields a type
3163 -- Associated_Node (Node4-Sem)
3164 -- Do_Overflow_Check (Flag17-Sem)
3165 -- Redundant_Use (Flag13-Sem)
3166 -- Must_Be_Byte_Aligned (Flag14)
3167 -- plus fields for expression
3168
3169 ---------------------------------
3170 -- 4.1.4 Attribute Designator --
3171 ---------------------------------
3172
3173 -- ATTRIBUTE_DESIGNATOR ::=
3174 -- IDENTIFIER [(static_EXPRESSION)]
3175 -- | access | delta | digits
3176
3177 -- There is no explicit node in the tree for an attribute designator.
3178 -- Instead the Attribute_Name and Expressions fields of the parent
3179 -- node (N_Attribute_Reference node) hold the information.
3180
3181 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
3182 -- designator, then they are treated as identifiers internally
3183 -- rather than the keywords of the same name.
3184
3185 --------------------------------------
3186 -- 4.1.4 Range Attribute Reference --
3187 --------------------------------------
3188
3189 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3190
3191 -- A range attribute reference is represented in the tree using the
3192 -- normal N_Attribute_Reference node.
3193
3194 ---------------------------------------
3195 -- 4.1.4 Range Attribute Designator --
3196 ---------------------------------------
3197
3198 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3199
3200 -- A range attribute designator is represented in the tree using the
3201 -- normal N_Attribute_Reference node.
3202
3203 --------------------
3204 -- 4.3 Aggregate --
3205 --------------------
3206
3207 -- AGGREGATE ::=
3208 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3209
3210 -----------------------------
3211 -- 4.3.1 Record Aggregate --
3212 -----------------------------
3213
3214 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3215
3216 -- N_Aggregate
3217 -- Sloc points to left parenthesis
3218 -- Expressions (List1) (set to No_List if none or null record case)
3219 -- Component_Associations (List2) (set to No_List if none)
3220 -- Null_Record_Present (Flag17)
3221 -- Aggregate_Bounds (Node3-Sem)
3222 -- Associated_Node (Node4-Sem)
3223 -- Static_Processing_OK (Flag4-Sem)
3224 -- Compile_Time_Known_Aggregate (Flag18-Sem)
3225 -- Expansion_Delayed (Flag11-Sem)
3226 -- Has_Self_Reference (Flag13-Sem)
3227 -- plus fields for expression
3228
3229 -- Note: this structure is used for both record and array aggregates
3230 -- since the two cases are not separable by the parser. The parser
3231 -- makes no attempt to enforce consistency here, so it is up to the
3232 -- semantic phase to make sure that the aggregate is consistent (i.e.
3233 -- that it is not a "half-and-half" case that mixes record and array
3234 -- syntax. In particular, for a record aggregate, the expressions
3235 -- field will be set if there are positional associations.
3236
3237 -- Note: N_Aggregate is not used for all aggregates; in particular,
3238 -- there is a separate node kind for extension aggregates.
3239
3240 -- Note: gigi/gcc can handle array aggregates correctly providing that
3241 -- they are entirely positional, and the array subtype involved has a
3242 -- known at compile time length and is not bit packed, or a convention
3243 -- Fortran array with more than one dimension. If these conditions
3244 -- are not met, then the front end must translate the aggregate into
3245 -- an appropriate set of assignments into a temporary.
3246
3247 -- Note: for the record aggregate case, gigi/gcc can handle all cases
3248 -- of record aggregates, including those for packed, and rep-claused
3249 -- records, and also variant records, providing that there are no
3250 -- variable length fields whose size is not known at runtime, and
3251 -- providing that the aggregate is presented in fully named form.
3252
3253 ----------------------------------------------
3254 -- 4.3.1 Record Component Association List --
3255 ----------------------------------------------
3256
3257 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
3258 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3259 -- | null record
3260
3261 -- There is no explicit node in the tree for a record component
3262 -- association list. Instead the Null_Record_Present flag is set in
3263 -- the parent node for the NULL RECORD case.
3264
3265 ------------------------------------------------------
3266 -- 4.3.1 Record Component Association (also 4.3.3) --
3267 ------------------------------------------------------
3268
3269 -- RECORD_COMPONENT_ASSOCIATION ::=
3270 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
3271
3272 -- N_Component_Association
3273 -- Sloc points to first selector name
3274 -- Choices (List1)
3275 -- Loop_Actions (List2-Sem)
3276 -- Expression (Node3)
3277 -- Box_Present (Flag15)
3278
3279 -- Note: this structure is used for both record component associations
3280 -- and array component associations, since the two cases aren't always
3281 -- separable by the parser. The choices list may represent either a
3282 -- list of selector names in the record aggregate case, or a list of
3283 -- discrete choices in the array aggregate case or an N_Others_Choice
3284 -- node (which appears as a singleton list). Box_Present gives support
3285 -- to Ada 2005 (AI-287).
3286
3287 ----------------------------------
3288 -- 4.3.1 Component Choice List --
3289 ----------------------------------
3290
3291 -- COMPONENT_CHOICE_LIST ::=
3292 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
3293 -- | others
3294
3295 -- The entries of a component choice list appear in the Choices list of
3296 -- the associated N_Component_Association, as either selector names, or
3297 -- as an N_Others_Choice node.
3298
3299 --------------------------------
3300 -- 4.3.2 Extension Aggregate --
3301 --------------------------------
3302
3303 -- EXTENSION_AGGREGATE ::=
3304 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3305
3306 -- Note: extension aggregates are not permitted in Ada 83 mode
3307
3308 -- N_Extension_Aggregate
3309 -- Sloc points to left parenthesis
3310 -- Ancestor_Part (Node3)
3311 -- Associated_Node (Node4-Sem)
3312 -- Expressions (List1) (set to No_List if none or null record case)
3313 -- Component_Associations (List2) (set to No_List if none)
3314 -- Null_Record_Present (Flag17)
3315 -- Expansion_Delayed (Flag11-Sem)
3316 -- Has_Self_Reference (Flag13-Sem)
3317 -- plus fields for expression
3318
3319 --------------------------
3320 -- 4.3.2 Ancestor Part --
3321 --------------------------
3322
3323 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3324
3325 ----------------------------
3326 -- 4.3.3 Array Aggregate --
3327 ----------------------------
3328
3329 -- ARRAY_AGGREGATE ::=
3330 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3331
3332 ---------------------------------------
3333 -- 4.3.3 Positional Array Aggregate --
3334 ---------------------------------------
3335
3336 -- POSITIONAL_ARRAY_AGGREGATE ::=
3337 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3338 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3339
3340 -- See Record_Aggregate (4.3.1) for node structure
3341
3342 ----------------------------------
3343 -- 4.3.3 Named Array Aggregate --
3344 ----------------------------------
3345
3346 -- NAMED_ARRAY_AGGREGATE ::=
3347 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3348
3349 -- See Record_Aggregate (4.3.1) for node structure
3350
3351 ----------------------------------------
3352 -- 4.3.3 Array Component Association --
3353 ----------------------------------------
3354
3355 -- ARRAY_COMPONENT_ASSOCIATION ::=
3356 -- DISCRETE_CHOICE_LIST => EXPRESSION
3357
3358 -- See Record_Component_Association (4.3.1) for node structure
3359
3360 --------------------------------------------------
3361 -- 4.4 Expression/Relation/Term/Factor/Primary --
3362 --------------------------------------------------
3363
3364 -- EXPRESSION ::=
3365 -- RELATION {and RELATION} | RELATION {and then RELATION}
3366 -- | RELATION {or RELATION} | RELATION {or else RELATION}
3367 -- | RELATION {xor RELATION}
3368
3369 -- RELATION ::=
3370 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3371 -- | SIMPLE_EXPRESSION [not] in RANGE
3372 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3373
3374 -- SIMPLE_EXPRESSION ::=
3375 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3376
3377 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3378
3379 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3380
3381 -- No nodes are generated for any of these constructs. Instead, the
3382 -- node for the operator appears directly. When we refer to an
3383 -- expression in this description, we mean any of the possible
3384 -- constituent components of an expression (e.g. identifier is
3385 -- an example of an expression).
3386
3387 ------------------
3388 -- 4.4 Primary --
3389 ------------------
3390
3391 -- PRIMARY ::=
3392 -- NUMERIC_LITERAL | null
3393 -- | STRING_LITERAL | AGGREGATE
3394 -- | NAME | QUALIFIED_EXPRESSION
3395 -- | ALLOCATOR | (EXPRESSION)
3396
3397 -- Usually there is no explicit node in the tree for primary. Instead
3398 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3399 -- exceptions. First, there is an explicit node for a null primary.
3400
3401 -- N_Null
3402 -- Sloc points to NULL
3403 -- plus fields for expression
3404
3405 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3406 -- that the parser keep track of which subexpressions are enclosed
3407 -- in parentheses, and how many levels of parentheses are used. This
3408 -- information is required for optimization purposes, and also for
3409 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3410 -- conform with ((((1)))) in the body).
3411
3412 -- The parentheses are recorded by keeping a Paren_Count field in every
3413 -- subexpression node (it is actually present in all nodes, but only
3414 -- used in subexpression nodes). This count records the number of
3415 -- levels of parentheses. If the number of levels in the source exceeds
3416 -- the maximum accommodated by this count, then the count is simply left
3417 -- at the maximum value. This means that there are some pathological
3418 -- cases of failure to detect conformance failures (e.g. an expression
3419 -- with 500 levels of parens will conform with one with 501 levels),
3420 -- but we do not need to lose sleep over this.
3421
3422 -- Historical note: in versions of GNAT prior to 1.75, there was a node
3423 -- type N_Parenthesized_Expression used to accurately record unlimited
3424 -- numbers of levels of parentheses. However, it turned out to be a
3425 -- real nuisance to have to take into account the possible presence of
3426 -- this node during semantic analysis, since basically parentheses have
3427 -- zero relevance to semantic analysis.
3428
3429 -- Note: the level of parentheses always present in things like
3430 -- aggregates does not count, only the parentheses in the primary
3431 -- (EXPRESSION) affect the setting of the Paren_Count field.
3432
3433 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
3434 -- treated as though it were Empty) if No_Initialization is set True.
3435
3436 --------------------------------------
3437 -- 4.5 Short Circuit Control Forms --
3438 --------------------------------------
3439
3440 -- EXPRESSION ::=
3441 -- RELATION {and then RELATION} | RELATION {or else RELATION}
3442
3443 -- Gigi restriction: For both these control forms, the operand and
3444 -- result types are always Standard.Boolean. The expander inserts the
3445 -- required conversion operations where needed to ensure this is the
3446 -- case.
3447
3448 -- N_And_Then
3449 -- Sloc points to AND of AND THEN
3450 -- Left_Opnd (Node2)
3451 -- Right_Opnd (Node3)
3452 -- Actions (List1-Sem)
3453 -- plus fields for expression
3454
3455 -- N_Or_Else
3456 -- Sloc points to OR of OR ELSE
3457 -- Left_Opnd (Node2)
3458 -- Right_Opnd (Node3)
3459 -- Actions (List1-Sem)
3460 -- plus fields for expression
3461
3462 -- Note: The Actions field is used to hold actions associated with
3463 -- the right hand operand. These have to be treated specially since
3464 -- they are not unconditionally executed. See Insert_Actions for a
3465 -- more detailed description of how these actions are handled.
3466
3467 ---------------------------
3468 -- 4.5 Membership Tests --
3469 ---------------------------
3470
3471 -- RELATION ::=
3472 -- SIMPLE_EXPRESSION [not] in RANGE
3473 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3474
3475 -- Note: although the grammar above allows only a range or a subtype
3476 -- mark, the parser in fact will accept any simple expression in place
3477 -- of a subtype mark. This means that the semantic analyzer must be able
3478 -- to deal with, and diagnose a simple expression other than a name for
3479 -- the right operand. This simplifies error recovery in the parser.
3480
3481 -- If extensions are enabled, the grammar is as follows:
3482
3483 -- RELATION ::=
3484 -- SIMPLE_EXPRESSION [not] in SET_ALTERNATIVE {| SET_ALTERNATIVE}
3485
3486 -- SET_ALTERNATIVE ::= RANGE | SUBTYPE_MARK
3487
3488 -- The Alternatives field below is present only if there is more than
3489 -- one Set_Alternative present, in which case Right_Opnd is set to
3490 -- Empty, and Alternatives contains the list of alternatives. In the
3491 -- tree passed to the back end, Alternatives is always No_List, and
3492 -- Right_Opnd is set (i.e. the expansion circuitry expands out the
3493 -- complex set membership case using simple membership operations).
3494
3495 -- N_In
3496 -- Sloc points to IN
3497 -- Left_Opnd (Node2)
3498 -- Right_Opnd (Node3)
3499 -- Alternatives (List4) (set to No_List if only one set alternative)
3500 -- plus fields for expression
3501
3502 -- N_Not_In
3503 -- Sloc points to NOT of NOT IN
3504 -- Left_Opnd (Node2)
3505 -- Right_Opnd (Node3)
3506 -- Alternatives (List4) (set to No_List if only one set alternative)
3507 -- plus fields for expression
3508
3509 --------------------
3510 -- 4.5 Operators --
3511 --------------------
3512
3513 -- LOGICAL_OPERATOR ::= and | or | xor
3514
3515 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
3516
3517 -- BINARY_ADDING_OPERATOR ::= + | - | &
3518
3519 -- UNARY_ADDING_OPERATOR ::= + | -
3520
3521 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
3522
3523 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
3524
3525 -- Sprint syntax if Treat_Fixed_As_Integer is set:
3526
3527 -- x #* y
3528 -- x #/ y
3529 -- x #mod y
3530 -- x #rem y
3531
3532 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
3533 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
3534 -- All handling of smalls for multiplication and division is handled
3535 -- by the front end (mod and rem result only from expansion). Gigi
3536 -- thus never needs to worry about small values (for other operators
3537 -- operating on fixed-point, e.g. addition, the small value does not
3538 -- have any semantic effect anyway, these are always integer operations.
3539
3540 -- Gigi restriction: For all operators taking Boolean operands, the
3541 -- type is always Standard.Boolean. The expander inserts the required
3542 -- conversion operations where needed to ensure this is the case.
3543
3544 -- N_Op_And
3545 -- Sloc points to AND
3546 -- Do_Length_Check (Flag4-Sem)
3547 -- plus fields for binary operator
3548 -- plus fields for expression
3549
3550 -- N_Op_Or
3551 -- Sloc points to OR
3552 -- Do_Length_Check (Flag4-Sem)
3553 -- plus fields for binary operator
3554 -- plus fields for expression
3555
3556 -- N_Op_Xor
3557 -- Sloc points to XOR
3558 -- Do_Length_Check (Flag4-Sem)
3559 -- plus fields for binary operator
3560 -- plus fields for expression
3561
3562 -- N_Op_Eq
3563 -- Sloc points to =
3564 -- plus fields for binary operator
3565 -- plus fields for expression
3566
3567 -- N_Op_Ne
3568 -- Sloc points to /=
3569 -- plus fields for binary operator
3570 -- plus fields for expression
3571
3572 -- N_Op_Lt
3573 -- Sloc points to <
3574 -- plus fields for binary operator
3575 -- plus fields for expression
3576
3577 -- N_Op_Le
3578 -- Sloc points to <=
3579 -- plus fields for binary operator
3580 -- plus fields for expression
3581
3582 -- N_Op_Gt
3583 -- Sloc points to >
3584 -- plus fields for binary operator
3585 -- plus fields for expression
3586
3587 -- N_Op_Ge
3588 -- Sloc points to >=
3589 -- plus fields for binary operator
3590 -- plus fields for expression
3591
3592 -- N_Op_Add
3593 -- Sloc points to + (binary)
3594 -- plus fields for binary operator
3595 -- plus fields for expression
3596
3597 -- N_Op_Subtract
3598 -- Sloc points to - (binary)
3599 -- plus fields for binary operator
3600 -- plus fields for expression
3601
3602 -- N_Op_Concat
3603 -- Sloc points to &
3604 -- Is_Component_Left_Opnd (Flag13-Sem)
3605 -- Is_Component_Right_Opnd (Flag14-Sem)
3606 -- plus fields for binary operator
3607 -- plus fields for expression
3608
3609 -- N_Op_Multiply
3610 -- Sloc points to *
3611 -- Treat_Fixed_As_Integer (Flag14-Sem)
3612 -- Rounded_Result (Flag18-Sem)
3613 -- plus fields for binary operator
3614 -- plus fields for expression
3615
3616 -- N_Op_Divide
3617 -- Sloc points to /
3618 -- Treat_Fixed_As_Integer (Flag14-Sem)
3619 -- Do_Division_Check (Flag13-Sem)
3620 -- Rounded_Result (Flag18-Sem)
3621 -- plus fields for binary operator
3622 -- plus fields for expression
3623
3624 -- N_Op_Mod
3625 -- Sloc points to MOD
3626 -- Treat_Fixed_As_Integer (Flag14-Sem)
3627 -- Do_Division_Check (Flag13-Sem)
3628 -- plus fields for binary operator
3629 -- plus fields for expression
3630
3631 -- N_Op_Rem
3632 -- Sloc points to REM
3633 -- Treat_Fixed_As_Integer (Flag14-Sem)
3634 -- Do_Division_Check (Flag13-Sem)
3635 -- plus fields for binary operator
3636 -- plus fields for expression
3637
3638 -- N_Op_Expon
3639 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
3640 -- Sloc points to **
3641 -- plus fields for binary operator
3642 -- plus fields for expression
3643
3644 -- N_Op_Plus
3645 -- Sloc points to + (unary)
3646 -- plus fields for unary operator
3647 -- plus fields for expression
3648
3649 -- N_Op_Minus
3650 -- Sloc points to - (unary)
3651 -- plus fields for unary operator
3652 -- plus fields for expression
3653
3654 -- N_Op_Abs
3655 -- Sloc points to ABS
3656 -- plus fields for unary operator
3657 -- plus fields for expression
3658
3659 -- N_Op_Not
3660 -- Sloc points to NOT
3661 -- plus fields for unary operator
3662 -- plus fields for expression
3663
3664 -- See also shift operators in section B.2
3665
3666 -- Note on fixed-point operations passed to Gigi: For adding operators,
3667 -- the semantics is to treat these simply as integer operations, with
3668 -- the small values being ignored (the bounds are already stored in
3669 -- units of small, so that constraint checking works as usual). For the
3670 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
3671 -- point operands if the Treat_Fixed_As_Integer flag is set and will
3672 -- thus treat these nodes in identical manner, ignoring small values.
3673
3674 --------------------------
3675 -- 4.6 Type Conversion --
3676 --------------------------
3677
3678 -- TYPE_CONVERSION ::=
3679 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
3680
3681 -- In the (NAME) case, the name is stored as the expression
3682
3683 -- Note: the parser never generates a type conversion node, since it
3684 -- looks like an indexed component which is generated by preference.
3685 -- The semantic pass must correct this misidentification.
3686
3687 -- Gigi handles conversions that involve no change in the root type,
3688 -- and also all conversions from integer to floating-point types.
3689 -- Conversions from floating-point to integer are only handled in
3690 -- the case where Float_Truncate flag set. Other conversions from
3691 -- floating-point to integer (involving rounding) and all conversions
3692 -- involving fixed-point types are handled by the expander.
3693
3694 -- Sprint syntax if Float_Truncate set: X^(Y)
3695 -- Sprint syntax if Conversion_OK set X?(Y)
3696 -- Sprint syntax if both flags set X?^(Y)
3697
3698 -- Note: If either the operand or result type is fixed-point, Gigi will
3699 -- only see a type conversion node with Conversion_OK set. The front end
3700 -- takes care of all handling of small's for fixed-point conversions.
3701
3702 -- N_Type_Conversion
3703 -- Sloc points to first token of subtype mark
3704 -- Subtype_Mark (Node4)
3705 -- Expression (Node3)
3706 -- Do_Tag_Check (Flag13-Sem)
3707 -- Do_Length_Check (Flag4-Sem)
3708 -- Do_Overflow_Check (Flag17-Sem)
3709 -- Float_Truncate (Flag11-Sem)
3710 -- Rounded_Result (Flag18-Sem)
3711 -- Conversion_OK (Flag14-Sem)
3712 -- plus fields for expression
3713
3714 -- Note: if a range check is required, then the Do_Range_Check flag
3715 -- is set in the Expression with the check being done against the
3716 -- target type range (after the base type conversion, if any).
3717
3718 -------------------------------
3719 -- 4.7 Qualified Expression --
3720 -------------------------------
3721
3722 -- QUALIFIED_EXPRESSION ::=
3723 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
3724
3725 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
3726 -- the expression, so the Expression field of this node always points
3727 -- to a parenthesized expression in this case (i.e. Paren_Count will
3728 -- always be non-zero for the referenced expression if it is not an
3729 -- aggregate).
3730
3731 -- N_Qualified_Expression
3732 -- Sloc points to apostrophe
3733 -- Subtype_Mark (Node4)
3734 -- Expression (Node3) expression or aggregate
3735 -- plus fields for expression
3736
3737 --------------------
3738 -- 4.8 Allocator --
3739 --------------------
3740
3741 -- ALLOCATOR ::=
3742 -- new [NULL_EXCLUSION] SUBTYPE_INDICATION | new QUALIFIED_EXPRESSION
3743
3744 -- Sprint syntax (when storage pool present)
3745 -- new xxx (storage_pool = pool)
3746
3747 -- N_Allocator
3748 -- Sloc points to NEW
3749 -- Expression (Node3) subtype indication or qualified expression
3750 -- Storage_Pool (Node1-Sem)
3751 -- Procedure_To_Call (Node2-Sem)
3752 -- Coextensions (Elist4-Sem)
3753 -- Null_Exclusion_Present (Flag11)
3754 -- No_Initialization (Flag13-Sem)
3755 -- Is_Static_Coextension (Flag14-Sem)
3756 -- Do_Storage_Check (Flag17-Sem)
3757 -- Is_Dynamic_Coextension (Flag18-Sem)
3758 -- plus fields for expression
3759
3760 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
3761 -- This flag has a special function in conjunction with the restriction
3762 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
3763 -- is not set. This means that if a source allocator is replaced with
3764 -- a constructed allocator, the Comes_From_Source flag should be copied
3765 -- to the newly created allocator.
3766
3767 ---------------------------------
3768 -- 5.1 Sequence Of Statements --
3769 ---------------------------------
3770
3771 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
3772
3773 -- Note: Although the parser will not accept a declaration as a
3774 -- statement, the semantic analyzer may insert declarations (e.g.
3775 -- declarations of implicit types needed for execution of other
3776 -- statements) into a sequence of statements, so the code generator
3777 -- should be prepared to accept a declaration where a statement is
3778 -- expected. Note also that pragmas can appear as statements.
3779
3780 --------------------
3781 -- 5.1 Statement --
3782 --------------------
3783
3784 -- STATEMENT ::=
3785 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
3786
3787 -- There is no explicit node in the tree for a statement. Instead, the
3788 -- individual statement appears directly. Labels are treated as a
3789 -- kind of statement, i.e. they are linked into a statement list at
3790 -- the point they appear, so the labeled statement appears following
3791 -- the label or labels in the statement list.
3792
3793 ---------------------------
3794 -- 5.1 Simple Statement --
3795 ---------------------------
3796
3797 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
3798 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
3799 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
3800 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
3801 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
3802 -- | ABORT_STATEMENT | RAISE_STATEMENT
3803 -- | CODE_STATEMENT
3804
3805 -----------------------------
3806 -- 5.1 Compound Statement --
3807 -----------------------------
3808
3809 -- COMPOUND_STATEMENT ::=
3810 -- IF_STATEMENT | CASE_STATEMENT
3811 -- | LOOP_STATEMENT | BLOCK_STATEMENT
3812 -- | EXTENDED_RETURN_STATEMENT
3813 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
3814
3815 -------------------------
3816 -- 5.1 Null Statement --
3817 -------------------------
3818
3819 -- NULL_STATEMENT ::= null;
3820
3821 -- N_Null_Statement
3822 -- Sloc points to NULL
3823
3824 ----------------
3825 -- 5.1 Label --
3826 ----------------
3827
3828 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
3829
3830 -- Note that the occurrence of a label is not a defining identifier,
3831 -- but rather a referencing occurrence. The defining occurrence is
3832 -- in the implicit label declaration which occurs in the innermost
3833 -- enclosing block.
3834
3835 -- N_Label
3836 -- Sloc points to <<
3837 -- Identifier (Node1) direct name of statement identifier
3838 -- Exception_Junk (Flag8-Sem)
3839
3840 -------------------------------
3841 -- 5.1 Statement Identifier --
3842 -------------------------------
3843
3844 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
3845
3846 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
3847 -- (not an OPERATOR_SYMBOL)
3848
3849 -------------------------------
3850 -- 5.2 Assignment Statement --
3851 -------------------------------
3852
3853 -- ASSIGNMENT_STATEMENT ::=
3854 -- variable_NAME := EXPRESSION;
3855
3856 -- N_Assignment_Statement
3857 -- Sloc points to :=
3858 -- Name (Node2)
3859 -- Expression (Node3)
3860 -- Do_Tag_Check (Flag13-Sem)
3861 -- Do_Length_Check (Flag4-Sem)
3862 -- Forwards_OK (Flag5-Sem)
3863 -- Backwards_OK (Flag6-Sem)
3864 -- No_Ctrl_Actions (Flag7-Sem)
3865
3866 -- Note: if a range check is required, then the Do_Range_Check flag
3867 -- is set in the Expression (right hand side), with the check being
3868 -- done against the type of the Name (left hand side).
3869
3870 -- Note: the back end places some restrictions on the form of the
3871 -- Expression field. If the object being assigned to is Atomic, then
3872 -- the Expression may not have the form of an aggregate (since this
3873 -- might cause the back end to generate separate assignments). In this
3874 -- case the front end must generate an extra temporary and initialize
3875 -- this temporary as required (the temporary itself is not atomic).
3876
3877 -----------------------
3878 -- 5.3 If Statement --
3879 -----------------------
3880
3881 -- IF_STATEMENT ::=
3882 -- if CONDITION then
3883 -- SEQUENCE_OF_STATEMENTS
3884 -- {elsif CONDITION then
3885 -- SEQUENCE_OF_STATEMENTS}
3886 -- [else
3887 -- SEQUENCE_OF_STATEMENTS]
3888 -- end if;
3889
3890 -- Gigi restriction: This expander ensures that the type of the
3891 -- Condition fields is always Standard.Boolean, even if the type
3892 -- in the source is some non-standard boolean type.
3893
3894 -- N_If_Statement
3895 -- Sloc points to IF
3896 -- Condition (Node1)
3897 -- Then_Statements (List2)
3898 -- Elsif_Parts (List3) (set to No_List if none present)
3899 -- Else_Statements (List4) (set to No_List if no else part present)
3900 -- End_Span (Uint5) (set to No_Uint if expander generated)
3901
3902 -- N_Elsif_Part
3903 -- Sloc points to ELSIF
3904 -- Condition (Node1)
3905 -- Then_Statements (List2)
3906 -- Condition_Actions (List3-Sem)
3907
3908 --------------------
3909 -- 5.3 Condition --
3910 --------------------
3911
3912 -- CONDITION ::= boolean_EXPRESSION
3913
3914 -------------------------
3915 -- 5.4 Case Statement --
3916 -------------------------
3917
3918 -- CASE_STATEMENT ::=
3919 -- case EXPRESSION is
3920 -- CASE_STATEMENT_ALTERNATIVE
3921 -- {CASE_STATEMENT_ALTERNATIVE}
3922 -- end case;
3923
3924 -- Note: the Alternatives can contain pragmas. These only occur at
3925 -- the start of the list, since any pragmas occurring after the first
3926 -- alternative are absorbed into the corresponding statement sequence.
3927
3928 -- N_Case_Statement
3929 -- Sloc points to CASE
3930 -- Expression (Node3)
3931 -- Alternatives (List4)
3932 -- End_Span (Uint5) (set to No_Uint if expander generated)
3933
3934 -------------------------------------
3935 -- 5.4 Case Statement Alternative --
3936 -------------------------------------
3937
3938 -- CASE_STATEMENT_ALTERNATIVE ::=
3939 -- when DISCRETE_CHOICE_LIST =>
3940 -- SEQUENCE_OF_STATEMENTS
3941
3942 -- N_Case_Statement_Alternative
3943 -- Sloc points to WHEN
3944 -- Discrete_Choices (List4)
3945 -- Statements (List3)
3946
3947 -------------------------
3948 -- 5.5 Loop Statement --
3949 -------------------------
3950
3951 -- LOOP_STATEMENT ::=
3952 -- [loop_STATEMENT_IDENTIFIER :]
3953 -- [ITERATION_SCHEME] loop
3954 -- SEQUENCE_OF_STATEMENTS
3955 -- end loop [loop_IDENTIFIER];
3956
3957 -- Note: The occurrence of a loop label is not a defining identifier
3958 -- but rather a referencing occurrence. The defining occurrence is in
3959 -- the implicit label declaration which occurs in the innermost
3960 -- enclosing block.
3961
3962 -- Note: there is always a loop statement identifier present in
3963 -- the tree, even if none was given in the source. In the case where
3964 -- no loop identifier is given in the source, the parser creates
3965 -- a name of the form _Loop_n, where n is a decimal integer (the
3966 -- two underlines ensure that the loop names created in this manner
3967 -- do not conflict with any user defined identifiers), and the flag
3968 -- Has_Created_Identifier is set to True. The only exception to the
3969 -- rule that all loop statement nodes have identifiers occurs for
3970 -- loops constructed by the expander, and the semantic analyzer will
3971 -- create and supply dummy loop identifiers in these cases.
3972
3973 -- N_Loop_Statement
3974 -- Sloc points to LOOP
3975 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
3976 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
3977 -- Statements (List3)
3978 -- End_Label (Node4)
3979 -- Has_Created_Identifier (Flag15)
3980 -- Is_Null_Loop (Flag16)
3981 -- Suppress_Loop_Warnings (Flag17)
3982
3983 --------------------------
3984 -- 5.5 Iteration Scheme --
3985 --------------------------
3986
3987 -- ITERATION_SCHEME ::=
3988 -- while CONDITION | for LOOP_PARAMETER_SPECIFICATION
3989
3990 -- Gigi restriction: This expander ensures that the type of the
3991 -- Condition field is always Standard.Boolean, even if the type
3992 -- in the source is some non-standard boolean type.
3993
3994 -- N_Iteration_Scheme
3995 -- Sloc points to WHILE or FOR
3996 -- Condition (Node1) (set to Empty if FOR case)
3997 -- Condition_Actions (List3-Sem)
3998 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
3999
4000 ---------------------------------------
4001 -- 5.5 Loop parameter specification --
4002 ---------------------------------------
4003
4004 -- LOOP_PARAMETER_SPECIFICATION ::=
4005 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
4006
4007 -- N_Loop_Parameter_Specification
4008 -- Sloc points to first identifier
4009 -- Defining_Identifier (Node1)
4010 -- Reverse_Present (Flag15)
4011 -- Discrete_Subtype_Definition (Node4)
4012
4013 --------------------------
4014 -- 5.6 Block Statement --
4015 --------------------------
4016
4017 -- BLOCK_STATEMENT ::=
4018 -- [block_STATEMENT_IDENTIFIER:]
4019 -- [declare
4020 -- DECLARATIVE_PART]
4021 -- begin
4022 -- HANDLED_SEQUENCE_OF_STATEMENTS
4023 -- end [block_IDENTIFIER];
4024
4025 -- Note that the occurrence of a block identifier is not a defining
4026 -- identifier, but rather a referencing occurrence. The defining
4027 -- occurrence is an E_Block entity declared by the implicit label
4028 -- declaration which occurs in the innermost enclosing block statement
4029 -- or body; the block identifier denotes that E_Block.
4030
4031 -- For block statements that come from source code, there is always a
4032 -- block statement identifier present in the tree, denoting an
4033 -- E_Block. In the case where no block identifier is given in the
4034 -- source, the parser creates a name of the form B_n, where n is a
4035 -- decimal integer, and the flag Has_Created_Identifier is set to
4036 -- True. Blocks constructed by the expander usually have no identifier,
4037 -- and no corresponding entity.
4038
4039 -- Note: the block statement created for an extended return statement
4040 -- has an entity, and this entity is an E_Return_Statement, rather than
4041 -- the usual E_Block.
4042
4043 -- Note: Exception_Junk is set for the wrapping blocks created during
4044 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
4045
4046 -- N_Block_Statement
4047 -- Sloc points to DECLARE or BEGIN
4048 -- Identifier (Node1) block direct name (set to Empty if not present)
4049 -- Declarations (List2) (set to No_List if no DECLARE part)
4050 -- Handled_Statement_Sequence (Node4)
4051 -- Is_Task_Master (Flag5-Sem)
4052 -- Activation_Chain_Entity (Node3-Sem)
4053 -- Has_Created_Identifier (Flag15)
4054 -- Is_Task_Allocation_Block (Flag6)
4055 -- Is_Asynchronous_Call_Block (Flag7)
4056 -- Exception_Junk (Flag8-Sem)
4057
4058 -------------------------
4059 -- 5.7 Exit Statement --
4060 -------------------------
4061
4062 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
4063
4064 -- Gigi restriction: This expander ensures that the type of the
4065 -- Condition field is always Standard.Boolean, even if the type
4066 -- in the source is some non-standard boolean type.
4067
4068 -- N_Exit_Statement
4069 -- Sloc points to EXIT
4070 -- Name (Node2) (set to Empty if no loop name present)
4071 -- Condition (Node1) (set to Empty if no when part present)
4072
4073 -------------------------
4074 -- 5.9 Goto Statement --
4075 -------------------------
4076
4077 -- GOTO_STATEMENT ::= goto label_NAME;
4078
4079 -- N_Goto_Statement
4080 -- Sloc points to GOTO
4081 -- Name (Node2)
4082 -- Exception_Junk (Flag8-Sem)
4083
4084 ---------------------------------
4085 -- 6.1 Subprogram Declaration --
4086 ---------------------------------
4087
4088 -- SUBPROGRAM_DECLARATION ::= SUBPROGRAM_SPECIFICATION;
4089
4090 -- N_Subprogram_Declaration
4091 -- Sloc points to FUNCTION or PROCEDURE
4092 -- Specification (Node1)
4093 -- Body_To_Inline (Node3-Sem)
4094 -- Corresponding_Body (Node5-Sem)
4095 -- Parent_Spec (Node4-Sem)
4096
4097 ------------------------------------------
4098 -- 6.1 Abstract Subprogram Declaration --
4099 ------------------------------------------
4100
4101 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
4102 -- SUBPROGRAM_SPECIFICATION is abstract;
4103
4104 -- N_Abstract_Subprogram_Declaration
4105 -- Sloc points to ABSTRACT
4106 -- Specification (Node1)
4107
4108 -----------------------------------
4109 -- 6.1 Subprogram Specification --
4110 -----------------------------------
4111
4112 -- SUBPROGRAM_SPECIFICATION ::=
4113 -- [[not] overriding]
4114 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
4115 -- | [[not] overriding]
4116 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
4117
4118 -- Note: there are no separate nodes for the profiles, instead the
4119 -- information appears directly in the following nodes.
4120
4121 -- N_Function_Specification
4122 -- Sloc points to FUNCTION
4123 -- Defining_Unit_Name (Node1) (the designator)
4124 -- Elaboration_Boolean (Node2-Sem)
4125 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4126 -- Null_Exclusion_Present (Flag11)
4127 -- Result_Definition (Node4) for result subtype
4128 -- Generic_Parent (Node5-Sem)
4129 -- Must_Override (Flag14) set if overriding indicator present
4130 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4131
4132 -- N_Procedure_Specification
4133 -- Sloc points to PROCEDURE
4134 -- Defining_Unit_Name (Node1)
4135 -- Elaboration_Boolean (Node2-Sem)
4136 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4137 -- Generic_Parent (Node5-Sem)
4138 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
4139 -- Must_Override (Flag14) set if overriding indicator present
4140 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4141
4142 -- Note: overriding indicator is an Ada 2005 feature
4143
4144 ---------------------
4145 -- 6.1 Designator --
4146 ---------------------
4147
4148 -- DESIGNATOR ::=
4149 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
4150
4151 -- Designators that are simply identifiers or operator symbols appear
4152 -- directly in the tree in this form. The following node is used only
4153 -- in the case where the designator has a parent unit name component.
4154
4155 -- N_Designator
4156 -- Sloc points to period
4157 -- Name (Node2) holds the parent unit name. Note that this is always
4158 -- non-Empty, since this node is only used for the case where a
4159 -- parent library unit package name is present.
4160 -- Identifier (Node1)
4161
4162 -- Note that the identifier can also be an operator symbol here
4163
4164 ------------------------------
4165 -- 6.1 Defining Designator --
4166 ------------------------------
4167
4168 -- DEFINING_DESIGNATOR ::=
4169 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
4170
4171 -------------------------------------
4172 -- 6.1 Defining Program Unit Name --
4173 -------------------------------------
4174
4175 -- DEFINING_PROGRAM_UNIT_NAME ::=
4176 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
4177
4178 -- The parent unit name is present only in the case of a child unit
4179 -- name (permissible only for Ada 95 for a library level unit, i.e.
4180 -- a unit at scope level one). If no such name is present, the defining
4181 -- program unit name is represented simply as the defining identifier.
4182 -- In the child unit case, the following node is used to represent the
4183 -- child unit name.
4184
4185 -- N_Defining_Program_Unit_Name
4186 -- Sloc points to period
4187 -- Name (Node2) holds the parent unit name. Note that this is always
4188 -- non-Empty, since this node is only used for the case where a
4189 -- parent unit name is present.
4190 -- Defining_Identifier (Node1)
4191
4192 --------------------------
4193 -- 6.1 Operator Symbol --
4194 --------------------------
4195
4196 -- OPERATOR_SYMBOL ::= STRING_LITERAL
4197
4198 -- Note: the fields of the N_Operator_Symbol node are laid out to
4199 -- match the corresponding fields of an N_Character_Literal node. This
4200 -- allows easy conversion of the operator symbol node into a character
4201 -- literal node in the case where a string constant of the form of an
4202 -- operator symbol is scanned out as such, but turns out semantically
4203 -- to be a string literal that is not an operator. For details see
4204 -- Sinfo.CN.Change_Operator_Symbol_To_String_Literal.
4205
4206 -- N_Operator_Symbol
4207 -- Sloc points to literal
4208 -- Chars (Name1) contains the Name_Id for the operator symbol
4209 -- Strval (Str3) Id of string value. This is used if the operator
4210 -- symbol turns out to be a normal string after all.
4211 -- Entity (Node4-Sem)
4212 -- Associated_Node (Node4-Sem)
4213 -- Has_Private_View (Flag11-Sem) set in generic units.
4214 -- Etype (Node5-Sem)
4215
4216 -- Note: the Strval field may be set to No_String for generated
4217 -- operator symbols that are known not to be string literals
4218 -- semantically.
4219
4220 -----------------------------------
4221 -- 6.1 Defining Operator Symbol --
4222 -----------------------------------
4223
4224 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
4225
4226 -- A defining operator symbol is an entity, which has additional
4227 -- fields depending on the setting of the Ekind field. These
4228 -- additional fields are defined (and access subprograms declared)
4229 -- in package Einfo.
4230
4231 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
4232 -- are deliberately layed out to match the layout of fields in an
4233 -- ordinary N_Operator_Symbol node allowing for easy alteration of
4234 -- an operator symbol node into a defining operator symbol node.
4235 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
4236 -- for further details.
4237
4238 -- N_Defining_Operator_Symbol
4239 -- Sloc points to literal
4240 -- Chars (Name1) contains the Name_Id for the operator symbol
4241 -- Next_Entity (Node2-Sem)
4242 -- Scope (Node3-Sem)
4243 -- Etype (Node5-Sem)
4244
4245 ----------------------------
4246 -- 6.1 Parameter Profile --
4247 ----------------------------
4248
4249 -- PARAMETER_PROFILE ::= [FORMAL_PART]
4250
4251 ---------------------------------------
4252 -- 6.1 Parameter and Result Profile --
4253 ---------------------------------------
4254
4255 -- PARAMETER_AND_RESULT_PROFILE ::=
4256 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
4257 -- | [FORMAL_PART] return ACCESS_DEFINITION
4258
4259 -- There is no explicit node in the tree for a parameter and result
4260 -- profile. Instead the information appears directly in the parent.
4261
4262 ----------------------
4263 -- 6.1 Formal part --
4264 ----------------------
4265
4266 -- FORMAL_PART ::=
4267 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
4268
4269 ----------------------------------
4270 -- 6.1 Parameter specification --
4271 ----------------------------------
4272
4273 -- PARAMETER_SPECIFICATION ::=
4274 -- DEFINING_IDENTIFIER_LIST : MODE [NULL_EXCLUSION] SUBTYPE_MARK
4275 -- [:= DEFAULT_EXPRESSION]
4276 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
4277 -- [:= DEFAULT_EXPRESSION]
4278
4279 -- Although the syntax allows multiple identifiers in the list, the
4280 -- semantics is as though successive specifications were given with
4281 -- identical type definition and expression components. To simplify
4282 -- semantic processing, the parser represents a multiple declaration
4283 -- case as a sequence of single Specifications, using the More_Ids and
4284 -- Prev_Ids flags to preserve the original source form as described
4285 -- in the section on "Handling of Defining Identifier Lists".
4286
4287 -- N_Parameter_Specification
4288 -- Sloc points to first identifier
4289 -- Defining_Identifier (Node1)
4290 -- In_Present (Flag15)
4291 -- Out_Present (Flag17)
4292 -- Null_Exclusion_Present (Flag11)
4293 -- Parameter_Type (Node2) subtype mark or access definition
4294 -- Expression (Node3) (set to Empty if no default expression present)
4295 -- Do_Accessibility_Check (Flag13-Sem)
4296 -- More_Ids (Flag5) (set to False if no more identifiers in list)
4297 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
4298 -- Default_Expression (Node5-Sem)
4299
4300 ---------------
4301 -- 6.1 Mode --
4302 ---------------
4303
4304 -- MODE ::= [in] | in out | out
4305
4306 -- There is no explicit node in the tree for the Mode. Instead the
4307 -- In_Present and Out_Present flags are set in the parent node to
4308 -- record the presence of keywords specifying the mode.
4309
4310 --------------------------
4311 -- 6.3 Subprogram Body --
4312 --------------------------
4313
4314 -- SUBPROGRAM_BODY ::=
4315 -- SUBPROGRAM_SPECIFICATION is
4316 -- DECLARATIVE_PART
4317 -- begin
4318 -- HANDLED_SEQUENCE_OF_STATEMENTS
4319 -- end [DESIGNATOR];
4320
4321 -- N_Subprogram_Body
4322 -- Sloc points to FUNCTION or PROCEDURE
4323 -- Specification (Node1)
4324 -- Declarations (List2)
4325 -- Handled_Statement_Sequence (Node4)
4326 -- Activation_Chain_Entity (Node3-Sem)
4327 -- Corresponding_Spec (Node5-Sem)
4328 -- Acts_As_Spec (Flag4-Sem)
4329 -- Bad_Is_Detected (Flag15) used only by parser
4330 -- Do_Storage_Check (Flag17-Sem)
4331 -- Has_Priority_Pragma (Flag6-Sem)
4332 -- Is_Protected_Subprogram_Body (Flag7-Sem)
4333 -- Is_Entry_Barrier_Function (Flag8-Sem)
4334 -- Is_Task_Master (Flag5-Sem)
4335 -- Was_Originally_Stub (Flag13-Sem)
4336 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
4337
4338 -----------------------------------
4339 -- 6.4 Procedure Call Statement --
4340 -----------------------------------
4341
4342 -- PROCEDURE_CALL_STATEMENT ::=
4343 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
4344
4345 -- Note: the reason that a procedure call has expression fields is
4346 -- that it semantically resembles an expression, e.g. overloading is
4347 -- allowed and a type is concocted for semantic processing purposes.
4348 -- Certain of these fields, such as Parens are not relevant, but it
4349 -- is easier to just supply all of them together!
4350
4351 -- N_Procedure_Call_Statement
4352 -- Sloc points to first token of name or prefix
4353 -- Name (Node2) stores name or prefix
4354 -- Parameter_Associations (List3) (set to No_List if no
4355 -- actual parameter part)
4356 -- First_Named_Actual (Node4-Sem)
4357 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4358 -- Do_Tag_Check (Flag13-Sem)
4359 -- No_Elaboration_Check (Flag14-Sem)
4360 -- Parameter_List_Truncated (Flag17-Sem)
4361 -- ABE_Is_Certain (Flag18-Sem)
4362 -- plus fields for expression
4363
4364 -- If any IN parameter requires a range check, then the corresponding
4365 -- argument expression has the Do_Range_Check flag set, and the range
4366 -- check is done against the formal type. Note that this argument
4367 -- expression may appear directly in the Parameter_Associations list,
4368 -- or may be a descendent of an N_Parameter_Association node that
4369 -- appears in this list.
4370
4371 ------------------------
4372 -- 6.4 Function Call --
4373 ------------------------
4374
4375 -- FUNCTION_CALL ::=
4376 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
4377
4378 -- Note: the parser may generate an indexed component node or simply
4379 -- a name node instead of a function call node. The semantic pass must
4380 -- correct this misidentification.
4381
4382 -- N_Function_Call
4383 -- Sloc points to first token of name or prefix
4384 -- Name (Node2) stores name or prefix
4385 -- Parameter_Associations (List3) (set to No_List if no
4386 -- actual parameter part)
4387 -- First_Named_Actual (Node4-Sem)
4388 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4389 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
4390 -- Do_Tag_Check (Flag13-Sem)
4391 -- No_Elaboration_Check (Flag14-Sem)
4392 -- Parameter_List_Truncated (Flag17-Sem)
4393 -- ABE_Is_Certain (Flag18-Sem)
4394 -- plus fields for expression
4395
4396 --------------------------------
4397 -- 6.4 Actual Parameter Part --
4398 --------------------------------
4399
4400 -- ACTUAL_PARAMETER_PART ::=
4401 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
4402
4403 --------------------------------
4404 -- 6.4 Parameter Association --
4405 --------------------------------
4406
4407 -- PARAMETER_ASSOCIATION ::=
4408 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
4409
4410 -- Note: the N_Parameter_Association node is built only if a formal
4411 -- parameter selector name is present, otherwise the parameter
4412 -- association appears in the tree simply as the node for the
4413 -- explicit actual parameter.
4414
4415 -- N_Parameter_Association
4416 -- Sloc points to formal parameter
4417 -- Selector_Name (Node2) (always non-Empty)
4418 -- Explicit_Actual_Parameter (Node3)
4419 -- Next_Named_Actual (Node4-Sem)
4420
4421 ---------------------------
4422 -- 6.4 Actual Parameter --
4423 ---------------------------
4424
4425 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
4426
4427 ---------------------------
4428 -- 6.5 Return Statement --
4429 ---------------------------
4430
4431 -- RETURN_STATEMENT ::= return [EXPRESSION]; -- Ada 95
4432
4433 -- In Ada 2005, we have:
4434
4435 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
4436
4437 -- EXTENDED_RETURN_STATEMENT ::=
4438 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4439 -- [:= EXPRESSION] [do
4440 -- HANDLED_SEQUENCE_OF_STATEMENTS
4441 -- end return];
4442
4443 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
4444
4445 -- So in Ada 2005, RETURN_STATEMENT is no longer a nonterminal, but
4446 -- "return statement" is defined in 6.5 to mean a
4447 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT.
4448
4449 -- N_Return_Statement
4450 -- Sloc points to RETURN
4451 -- Return_Statement_Entity (Node5-Sem)
4452 -- Expression (Node3) (set to Empty if no expression present)
4453 -- Storage_Pool (Node1-Sem)
4454 -- Procedure_To_Call (Node2-Sem)
4455 -- Do_Tag_Check (Flag13-Sem)
4456 -- By_Ref (Flag5-Sem)
4457 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
4458
4459 -- N_Return_Statement represents a simple_return_statement, and is
4460 -- renamed to be N_Simple_Return_Statement below. Clients should refer
4461 -- to N_Simple_Return_Statement. We retain N_Return_Statement because
4462 -- that's how gigi knows it. See also renaming of Make_Return_Statement
4463 -- as Make_Simple_Return_Statement in Sem_Util.
4464
4465 -- Note: Return_Statement_Entity points to an E_Return_Statement
4466
4467 -- If a range check is required, then Do_Range_Check is set on the
4468 -- Expression. The check is against the return subtype of the function.
4469
4470 -- N_Extended_Return_Statement
4471 -- Sloc points to RETURN
4472 -- Return_Statement_Entity (Node5-Sem)
4473 -- Return_Object_Declarations (List3)
4474 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
4475 -- Storage_Pool (Node1-Sem)
4476 -- Procedure_To_Call (Node2-Sem)
4477 -- Do_Tag_Check (Flag13-Sem)
4478 -- By_Ref (Flag5-Sem)
4479
4480 -- Note: Return_Statement_Entity points to an E_Return_Statement.
4481 -- Note that Return_Object_Declarations is a list containing the
4482 -- N_Object_Declaration -- see comment on this field above.
4483 -- The declared object will have Is_Return_Object = True.
4484 -- There is no such syntactic category as return_object_declaration
4485 -- in the RM. Return_Object_Declarations represents this portion of
4486 -- the syntax for EXTENDED_RETURN_STATEMENT:
4487 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4488 -- [:= EXPRESSION]
4489
4490 -- There are two entities associated with an extended_return_statement:
4491 -- the Return_Statement_Entity represents the statement itself, and the
4492 -- Defining_Identifier of the Object_Declaration in
4493 -- Return_Object_Declarations represents the object being
4494 -- returned. N_Simple_Return_Statement has only the former.
4495
4496 ------------------------------
4497 -- 7.1 Package Declaration --
4498 ------------------------------
4499
4500 -- PACKAGE_DECLARATION ::= PACKAGE_SPECIFICATION;
4501
4502 -- Note: the activation chain entity for a package spec is used for
4503 -- all tasks declared in the package spec, or in the package body.
4504
4505 -- N_Package_Declaration
4506 -- Sloc points to PACKAGE
4507 -- Specification (Node1)
4508 -- Corresponding_Body (Node5-Sem)
4509 -- Parent_Spec (Node4-Sem)
4510 -- Activation_Chain_Entity (Node3-Sem)
4511
4512 --------------------------------
4513 -- 7.1 Package Specification --
4514 --------------------------------
4515
4516 -- PACKAGE_SPECIFICATION ::=
4517 -- package DEFINING_PROGRAM_UNIT_NAME is
4518 -- {BASIC_DECLARATIVE_ITEM}
4519 -- [private
4520 -- {BASIC_DECLARATIVE_ITEM}]
4521 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
4522
4523 -- N_Package_Specification
4524 -- Sloc points to PACKAGE
4525 -- Defining_Unit_Name (Node1)
4526 -- Visible_Declarations (List2)
4527 -- Private_Declarations (List3) (set to No_List if no private
4528 -- part present)
4529 -- End_Label (Node4)
4530 -- Generic_Parent (Node5-Sem)
4531 -- Limited_View_Installed (Flag18-Sem)
4532
4533 -----------------------
4534 -- 7.1 Package Body --
4535 -----------------------
4536
4537 -- PACKAGE_BODY ::=
4538 -- package body DEFINING_PROGRAM_UNIT_NAME is
4539 -- DECLARATIVE_PART
4540 -- [begin
4541 -- HANDLED_SEQUENCE_OF_STATEMENTS]
4542 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
4543
4544 -- N_Package_Body
4545 -- Sloc points to PACKAGE
4546 -- Defining_Unit_Name (Node1)
4547 -- Declarations (List2)
4548 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
4549 -- Corresponding_Spec (Node5-Sem)
4550 -- Was_Originally_Stub (Flag13-Sem)
4551
4552 -- Note: if a source level package does not contain a handled sequence
4553 -- of statements, then the parser supplies a dummy one with a null
4554 -- sequence of statements. Comes_From_Source will be False in this
4555 -- constructed sequence. The reason we need this is for the End_Label
4556 -- field in the HSS.
4557
4558 -----------------------------------
4559 -- 7.4 Private Type Declaration --
4560 -----------------------------------
4561
4562 -- PRIVATE_TYPE_DECLARATION ::=
4563 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
4564 -- is [[abstract] tagged] [limited] private;
4565
4566 -- Note: TAGGED is not permitted in Ada 83 mode
4567
4568 -- N_Private_Type_Declaration
4569 -- Sloc points to TYPE
4570 -- Defining_Identifier (Node1)
4571 -- Discriminant_Specifications (List4) (set to No_List if no
4572 -- discriminant part)
4573 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4574 -- Abstract_Present (Flag4)
4575 -- Tagged_Present (Flag15)
4576 -- Limited_Present (Flag17)
4577
4578 ----------------------------------------
4579 -- 7.4 Private Extension Declaration --
4580 ----------------------------------------
4581
4582 -- PRIVATE_EXTENSION_DECLARATION ::=
4583 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
4584 -- [abstract] [limited | synchronized]
4585 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
4586 -- with private;
4587
4588 -- Note: LIMITED, and private extension declarations are not allowed
4589 -- in Ada 83 mode.
4590
4591 -- N_Private_Extension_Declaration
4592 -- Sloc points to TYPE
4593 -- Defining_Identifier (Node1)
4594 -- Discriminant_Specifications (List4) (set to No_List if no
4595 -- discriminant part)
4596 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4597 -- Abstract_Present (Flag4)
4598 -- Limited_Present (Flag17)
4599 -- Synchronized_Present (Flag7)
4600 -- Subtype_Indication (Node5)
4601 -- Interface_List (List2) (set to No_List if none)
4602
4603 ---------------------
4604 -- 8.4 Use Clause --
4605 ---------------------
4606
4607 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
4608
4609 -----------------------------
4610 -- 8.4 Use Package Clause --
4611 -----------------------------
4612
4613 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
4614
4615 -- N_Use_Package_Clause
4616 -- Sloc points to USE
4617 -- Names (List2)
4618 -- Next_Use_Clause (Node3-Sem)
4619 -- Hidden_By_Use_Clause (Elist4-Sem)
4620
4621 --------------------------
4622 -- 8.4 Use Type Clause --
4623 --------------------------
4624
4625 -- USE_TYPE_CLAUSE ::= use type SUBTYPE_MARK {, SUBTYPE_MARK};
4626
4627 -- Note: use type clause is not permitted in Ada 83 mode
4628
4629 -- N_Use_Type_Clause
4630 -- Sloc points to USE
4631 -- Subtype_Marks (List2)
4632 -- Next_Use_Clause (Node3-Sem)
4633 -- Hidden_By_Use_Clause (Elist4-Sem)
4634
4635 -------------------------------
4636 -- 8.5 Renaming Declaration --
4637 -------------------------------
4638
4639 -- RENAMING_DECLARATION ::=
4640 -- OBJECT_RENAMING_DECLARATION
4641 -- | EXCEPTION_RENAMING_DECLARATION
4642 -- | PACKAGE_RENAMING_DECLARATION
4643 -- | SUBPROGRAM_RENAMING_DECLARATION
4644 -- | GENERIC_RENAMING_DECLARATION
4645
4646 --------------------------------------
4647 -- 8.5 Object Renaming Declaration --
4648 --------------------------------------
4649
4650 -- OBJECT_RENAMING_DECLARATION ::=
4651 -- DEFINING_IDENTIFIER :
4652 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME;
4653 -- | DEFINING_IDENTIFIER :
4654 -- ACCESS_DEFINITION renames object_NAME;
4655
4656 -- Note: Access_Definition is an optional field that gives support to
4657 -- Ada 2005 (AI-230). The parser generates nodes that have either the
4658 -- Subtype_Indication field or else the Access_Definition field.
4659
4660 -- N_Object_Renaming_Declaration
4661 -- Sloc points to first identifier
4662 -- Defining_Identifier (Node1)
4663 -- Null_Exclusion_Present (Flag11) (set to False if not present)
4664 -- Subtype_Mark (Node4) (set to Empty if not present)
4665 -- Access_Definition (Node3) (set to Empty if not present)
4666 -- Name (Node2)
4667 -- Corresponding_Generic_Association (Node5-Sem)
4668
4669 -----------------------------------------
4670 -- 8.5 Exception Renaming Declaration --
4671 -----------------------------------------
4672
4673 -- EXCEPTION_RENAMING_DECLARATION ::=
4674 -- DEFINING_IDENTIFIER : exception renames exception_NAME;
4675
4676 -- N_Exception_Renaming_Declaration
4677 -- Sloc points to first identifier
4678 -- Defining_Identifier (Node1)
4679 -- Name (Node2)
4680
4681 ---------------------------------------
4682 -- 8.5 Package Renaming Declaration --
4683 ---------------------------------------
4684
4685 -- PACKAGE_RENAMING_DECLARATION ::=
4686 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME;
4687
4688 -- N_Package_Renaming_Declaration
4689 -- Sloc points to PACKAGE
4690 -- Defining_Unit_Name (Node1)
4691 -- Name (Node2)
4692 -- Parent_Spec (Node4-Sem)
4693
4694 ------------------------------------------
4695 -- 8.5 Subprogram Renaming Declaration --
4696 ------------------------------------------
4697
4698 -- SUBPROGRAM_RENAMING_DECLARATION ::=
4699 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
4700
4701 -- N_Subprogram_Renaming_Declaration
4702 -- Sloc points to RENAMES
4703 -- Specification (Node1)
4704 -- Name (Node2)
4705 -- Parent_Spec (Node4-Sem)
4706 -- Corresponding_Spec (Node5-Sem)
4707 -- Corresponding_Formal_Spec (Node3-Sem)
4708 -- From_Default (Flag6-Sem)
4709
4710 -----------------------------------------
4711 -- 8.5.5 Generic Renaming Declaration --
4712 -----------------------------------------
4713
4714 -- GENERIC_RENAMING_DECLARATION ::=
4715 -- generic package DEFINING_PROGRAM_UNIT_NAME
4716 -- renames generic_package_NAME
4717 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
4718 -- renames generic_procedure_NAME
4719 -- | generic function DEFINING_PROGRAM_UNIT_NAME
4720 -- renames generic_function_NAME
4721
4722 -- N_Generic_Package_Renaming_Declaration
4723 -- Sloc points to GENERIC
4724 -- Defining_Unit_Name (Node1)
4725 -- Name (Node2)
4726 -- Parent_Spec (Node4-Sem)
4727
4728 -- N_Generic_Procedure_Renaming_Declaration
4729 -- Sloc points to GENERIC
4730 -- Defining_Unit_Name (Node1)
4731 -- Name (Node2)
4732 -- Parent_Spec (Node4-Sem)
4733
4734 -- N_Generic_Function_Renaming_Declaration
4735 -- Sloc points to GENERIC
4736 -- Defining_Unit_Name (Node1)
4737 -- Name (Node2)
4738 -- Parent_Spec (Node4-Sem)
4739
4740 --------------------------------
4741 -- 9.1 Task Type Declaration --
4742 --------------------------------
4743
4744 -- TASK_TYPE_DECLARATION ::=
4745 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4746 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
4747
4748 -- N_Task_Type_Declaration
4749 -- Sloc points to TASK
4750 -- Defining_Identifier (Node1)
4751 -- Discriminant_Specifications (List4) (set to No_List if no
4752 -- discriminant part)
4753 -- Interface_List (List2) (set to No_List if none)
4754 -- Task_Definition (Node3) (set to Empty if not present)
4755 -- Corresponding_Body (Node5-Sem)
4756
4757 ----------------------------------
4758 -- 9.1 Single Task Declaration --
4759 ----------------------------------
4760
4761 -- SINGLE_TASK_DECLARATION ::=
4762 -- task DEFINING_IDENTIFIER
4763 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
4764
4765 -- N_Single_Task_Declaration
4766 -- Sloc points to TASK
4767 -- Defining_Identifier (Node1)
4768 -- Interface_List (List2) (set to No_List if none)
4769 -- Task_Definition (Node3) (set to Empty if not present)
4770
4771 --------------------------
4772 -- 9.1 Task Definition --
4773 --------------------------
4774
4775 -- TASK_DEFINITION ::=
4776 -- {TASK_ITEM}
4777 -- [private
4778 -- {TASK_ITEM}]
4779 -- end [task_IDENTIFIER]
4780
4781 -- Note: as a result of semantic analysis, the list of task items can
4782 -- include implicit type declarations resulting from entry families.
4783
4784 -- N_Task_Definition
4785 -- Sloc points to first token of task definition
4786 -- Visible_Declarations (List2)
4787 -- Private_Declarations (List3) (set to No_List if no private part)
4788 -- End_Label (Node4)
4789 -- Has_Priority_Pragma (Flag6-Sem)
4790 -- Has_Storage_Size_Pragma (Flag5-Sem)
4791 -- Has_Task_Info_Pragma (Flag7-Sem)
4792 -- Has_Task_Name_Pragma (Flag8-Sem)
4793 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
4794
4795 --------------------
4796 -- 9.1 Task Item --
4797 --------------------
4798
4799 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
4800
4801 --------------------
4802 -- 9.1 Task Body --
4803 --------------------
4804
4805 -- TASK_BODY ::=
4806 -- task body task_DEFINING_IDENTIFIER is
4807 -- DECLARATIVE_PART
4808 -- begin
4809 -- HANDLED_SEQUENCE_OF_STATEMENTS
4810 -- end [task_IDENTIFIER];
4811
4812 -- Gigi restriction: This node never appears
4813
4814 -- N_Task_Body
4815 -- Sloc points to TASK
4816 -- Defining_Identifier (Node1)
4817 -- Declarations (List2)
4818 -- Handled_Statement_Sequence (Node4)
4819 -- Is_Task_Master (Flag5-Sem)
4820 -- Activation_Chain_Entity (Node3-Sem)
4821 -- Corresponding_Spec (Node5-Sem)
4822 -- Was_Originally_Stub (Flag13-Sem)
4823
4824 -------------------------------------
4825 -- 9.4 Protected Type Declaration --
4826 -------------------------------------
4827
4828 -- PROTECTED_TYPE_DECLARATION ::=
4829 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4830 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4831
4832 -- Note: protected type declarations are not permitted in Ada 83 mode
4833
4834 -- N_Protected_Type_Declaration
4835 -- Sloc points to PROTECTED
4836 -- Defining_Identifier (Node1)
4837 -- Discriminant_Specifications (List4) (set to No_List if no
4838 -- discriminant part)
4839 -- Interface_List (List2) (set to No_List if none)
4840 -- Protected_Definition (Node3)
4841 -- Corresponding_Body (Node5-Sem)
4842
4843 ---------------------------------------
4844 -- 9.4 Single Protected Declaration --
4845 ---------------------------------------
4846
4847 -- SINGLE_PROTECTED_DECLARATION ::=
4848 -- protected DEFINING_IDENTIFIER
4849 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4850
4851 -- Note: single protected declarations are not allowed in Ada 83 mode
4852
4853 -- N_Single_Protected_Declaration
4854 -- Sloc points to PROTECTED
4855 -- Defining_Identifier (Node1)
4856 -- Interface_List (List2) (set to No_List if none)
4857 -- Protected_Definition (Node3)
4858
4859 -------------------------------
4860 -- 9.4 Protected Definition --
4861 -------------------------------
4862
4863 -- PROTECTED_DEFINITION ::=
4864 -- {PROTECTED_OPERATION_DECLARATION}
4865 -- [private
4866 -- {PROTECTED_ELEMENT_DECLARATION}]
4867 -- end [protected_IDENTIFIER]
4868
4869 -- N_Protected_Definition
4870 -- Sloc points to first token of protected definition
4871 -- Visible_Declarations (List2)
4872 -- Private_Declarations (List3) (set to No_List if no private part)
4873 -- End_Label (Node4)
4874 -- Has_Priority_Pragma (Flag6-Sem)
4875
4876 ------------------------------------------
4877 -- 9.4 Protected Operation Declaration --
4878 ------------------------------------------
4879
4880 -- PROTECTED_OPERATION_DECLARATION ::=
4881 -- SUBPROGRAM_DECLARATION
4882 -- | ENTRY_DECLARATION
4883 -- | REPRESENTATION_CLAUSE
4884
4885 ----------------------------------------
4886 -- 9.4 Protected Element Declaration --
4887 ----------------------------------------
4888
4889 -- PROTECTED_ELEMENT_DECLARATION ::=
4890 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
4891
4892 -------------------------
4893 -- 9.4 Protected Body --
4894 -------------------------
4895
4896 -- PROTECTED_BODY ::=
4897 -- protected body DEFINING_IDENTIFIER is
4898 -- {PROTECTED_OPERATION_ITEM}
4899 -- end [protected_IDENTIFIER];
4900
4901 -- Note: protected bodies are not allowed in Ada 83 mode
4902
4903 -- Gigi restriction: This node never appears
4904
4905 -- N_Protected_Body
4906 -- Sloc points to PROTECTED
4907 -- Defining_Identifier (Node1)
4908 -- Declarations (List2) protected operation items (and pragmas)
4909 -- End_Label (Node4)
4910 -- Corresponding_Spec (Node5-Sem)
4911 -- Was_Originally_Stub (Flag13-Sem)
4912
4913 -----------------------------------
4914 -- 9.4 Protected Operation Item --
4915 -----------------------------------
4916
4917 -- PROTECTED_OPERATION_ITEM ::=
4918 -- SUBPROGRAM_DECLARATION
4919 -- | SUBPROGRAM_BODY
4920 -- | ENTRY_BODY
4921 -- | REPRESENTATION_CLAUSE
4922
4923 ------------------------------
4924 -- 9.5.2 Entry Declaration --
4925 ------------------------------
4926
4927 -- ENTRY_DECLARATION ::=
4928 -- [[not] overriding]
4929 -- entry DEFINING_IDENTIFIER
4930 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE;
4931
4932 -- N_Entry_Declaration
4933 -- Sloc points to ENTRY
4934 -- Defining_Identifier (Node1)
4935 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
4936 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4937 -- Corresponding_Body (Node5-Sem)
4938 -- Must_Override (Flag14) set if overriding indicator present
4939 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4940
4941 -- Note: overriding indicator is an Ada 2005 feature
4942
4943 -----------------------------
4944 -- 9.5.2 Accept statement --
4945 -----------------------------
4946
4947 -- ACCEPT_STATEMENT ::=
4948 -- accept entry_DIRECT_NAME
4949 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
4950 -- HANDLED_SEQUENCE_OF_STATEMENTS
4951 -- end [entry_IDENTIFIER]];
4952
4953 -- Gigi restriction: This node never appears
4954
4955 -- Note: there are no explicit declarations allowed in an accept
4956 -- statement. However, the implicit declarations for any statement
4957 -- identifiers (labels and block/loop identifiers) are declarations
4958 -- that belong logically to the accept statement, and that is why
4959 -- there is a Declarations field in this node.
4960
4961 -- N_Accept_Statement
4962 -- Sloc points to ACCEPT
4963 -- Entry_Direct_Name (Node1)
4964 -- Entry_Index (Node5) (set to Empty if not present)
4965 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4966 -- Handled_Statement_Sequence (Node4)
4967 -- Declarations (List2) (set to No_List if no declarations)
4968
4969 ------------------------
4970 -- 9.5.2 Entry Index --
4971 ------------------------
4972
4973 -- ENTRY_INDEX ::= EXPRESSION
4974
4975 -----------------------
4976 -- 9.5.2 Entry Body --
4977 -----------------------
4978
4979 -- ENTRY_BODY ::=
4980 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
4981 -- DECLARATIVE_PART
4982 -- begin
4983 -- HANDLED_SEQUENCE_OF_STATEMENTS
4984 -- end [entry_IDENTIFIER];
4985
4986 -- ENTRY_BARRIER ::= when CONDITION
4987
4988 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
4989 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
4990 -- too full (it would otherwise have too many fields)
4991
4992 -- Gigi restriction: This node never appears
4993
4994 -- N_Entry_Body
4995 -- Sloc points to ENTRY
4996 -- Defining_Identifier (Node1)
4997 -- Entry_Body_Formal_Part (Node5)
4998 -- Declarations (List2)
4999 -- Handled_Statement_Sequence (Node4)
5000 -- Activation_Chain_Entity (Node3-Sem)
5001
5002 -----------------------------------
5003 -- 9.5.2 Entry Body Formal Part --
5004 -----------------------------------
5005
5006 -- ENTRY_BODY_FORMAL_PART ::=
5007 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
5008
5009 -- Note that an entry body formal part node is present even if it is
5010 -- empty. This reflects the grammar, in which it is the components of
5011 -- the entry body formal part that are optional, not the entry body
5012 -- formal part itself. Also this means that the barrier condition
5013 -- always has somewhere to be stored.
5014
5015 -- Gigi restriction: This node never appears
5016
5017 -- N_Entry_Body_Formal_Part
5018 -- Sloc points to first token
5019 -- Entry_Index_Specification (Node4) (set to Empty if not present)
5020 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5021 -- Condition (Node1) from entry barrier of entry body
5022
5023 --------------------------
5024 -- 9.5.2 Entry Barrier --
5025 --------------------------
5026
5027 -- ENTRY_BARRIER ::= when CONDITION
5028
5029 --------------------------------------
5030 -- 9.5.2 Entry Index Specification --
5031 --------------------------------------
5032
5033 -- ENTRY_INDEX_SPECIFICATION ::=
5034 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
5035
5036 -- Gigi restriction: This node never appears
5037
5038 -- N_Entry_Index_Specification
5039 -- Sloc points to FOR
5040 -- Defining_Identifier (Node1)
5041 -- Discrete_Subtype_Definition (Node4)
5042
5043 ---------------------------------
5044 -- 9.5.3 Entry Call Statement --
5045 ---------------------------------
5046
5047 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
5048
5049 -- The parser may generate a procedure call for this construct. The
5050 -- semantic pass must correct this misidentification where needed.
5051
5052 -- Gigi restriction: This node never appears
5053
5054 -- N_Entry_Call_Statement
5055 -- Sloc points to first token of name
5056 -- Name (Node2)
5057 -- Parameter_Associations (List3) (set to No_List if no
5058 -- actual parameter part)
5059 -- First_Named_Actual (Node4-Sem)
5060
5061 ------------------------------
5062 -- 9.5.4 Requeue Statement --
5063 ------------------------------
5064
5065 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
5066
5067 -- Note: requeue statements are not permitted in Ada 83 mode
5068
5069 -- Gigi restriction: This node never appears
5070
5071 -- N_Requeue_Statement
5072 -- Sloc points to REQUEUE
5073 -- Name (Node2)
5074 -- Abort_Present (Flag15)
5075
5076 --------------------------
5077 -- 9.6 Delay Statement --
5078 --------------------------
5079
5080 -- DELAY_STATEMENT ::=
5081 -- DELAY_UNTIL_STATEMENT
5082 -- | DELAY_RELATIVE_STATEMENT
5083
5084 --------------------------------
5085 -- 9.6 Delay Until Statement --
5086 --------------------------------
5087
5088 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
5089
5090 -- Note: delay until statements are not permitted in Ada 83 mode
5091
5092 -- Gigi restriction: This node never appears
5093
5094 -- N_Delay_Until_Statement
5095 -- Sloc points to DELAY
5096 -- Expression (Node3)
5097
5098 -----------------------------------
5099 -- 9.6 Delay Relative Statement --
5100 -----------------------------------
5101
5102 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
5103
5104 -- Gigi restriction: This node never appears
5105
5106 -- N_Delay_Relative_Statement
5107 -- Sloc points to DELAY
5108 -- Expression (Node3)
5109
5110 ---------------------------
5111 -- 9.7 Select Statement --
5112 ---------------------------
5113
5114 -- SELECT_STATEMENT ::=
5115 -- SELECTIVE_ACCEPT
5116 -- | TIMED_ENTRY_CALL
5117 -- | CONDITIONAL_ENTRY_CALL
5118 -- | ASYNCHRONOUS_SELECT
5119
5120 -----------------------------
5121 -- 9.7.1 Selective Accept --
5122 -----------------------------
5123
5124 -- SELECTIVE_ACCEPT ::=
5125 -- select
5126 -- [GUARD]
5127 -- SELECT_ALTERNATIVE
5128 -- {or
5129 -- [GUARD]
5130 -- SELECT_ALTERNATIVE}
5131 -- [else
5132 -- SEQUENCE_OF_STATEMENTS]
5133 -- end select;
5134
5135 -- Gigi restriction: This node never appears
5136
5137 -- Note: the guard expression, if present, appears in the node for
5138 -- the select alternative.
5139
5140 -- N_Selective_Accept
5141 -- Sloc points to SELECT
5142 -- Select_Alternatives (List1)
5143 -- Else_Statements (List4) (set to No_List if no else part)
5144
5145 ------------------
5146 -- 9.7.1 Guard --
5147 ------------------
5148
5149 -- GUARD ::= when CONDITION =>
5150
5151 -- As noted above, the CONDITION that is part of a GUARD is included
5152 -- in the node for the select alternative for convenience.
5153
5154 -------------------------------
5155 -- 9.7.1 Select Alternative --
5156 -------------------------------
5157
5158 -- SELECT_ALTERNATIVE ::=
5159 -- ACCEPT_ALTERNATIVE
5160 -- | DELAY_ALTERNATIVE
5161 -- | TERMINATE_ALTERNATIVE
5162
5163 -------------------------------
5164 -- 9.7.1 Accept Alternative --
5165 -------------------------------
5166
5167 -- ACCEPT_ALTERNATIVE ::=
5168 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
5169
5170 -- Gigi restriction: This node never appears
5171
5172 -- N_Accept_Alternative
5173 -- Sloc points to ACCEPT
5174 -- Accept_Statement (Node2)
5175 -- Condition (Node1) from the guard (set to Empty if no guard present)
5176 -- Statements (List3) (set to Empty_List if no statements)
5177 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5178 -- Accept_Handler_Records (List5-Sem)
5179
5180 ------------------------------
5181 -- 9.7.1 Delay Alternative --
5182 ------------------------------
5183
5184 -- DELAY_ALTERNATIVE ::=
5185 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
5186
5187 -- Gigi restriction: This node never appears
5188
5189 -- N_Delay_Alternative
5190 -- Sloc points to DELAY
5191 -- Delay_Statement (Node2)
5192 -- Condition (Node1) from the guard (set to Empty if no guard present)
5193 -- Statements (List3) (set to Empty_List if no statements)
5194 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5195
5196 ----------------------------------
5197 -- 9.7.1 Terminate Alternative --
5198 ----------------------------------
5199
5200 -- TERMINATE_ALTERNATIVE ::= terminate;
5201
5202 -- Gigi restriction: This node never appears
5203
5204 -- N_Terminate_Alternative
5205 -- Sloc points to TERMINATE
5206 -- Condition (Node1) from the guard (set to Empty if no guard present)
5207 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5208 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
5209
5210 -----------------------------
5211 -- 9.7.2 Timed Entry Call --
5212 -----------------------------
5213
5214 -- TIMED_ENTRY_CALL ::=
5215 -- select
5216 -- ENTRY_CALL_ALTERNATIVE
5217 -- or
5218 -- DELAY_ALTERNATIVE
5219 -- end select;
5220
5221 -- Gigi restriction: This node never appears
5222
5223 -- N_Timed_Entry_Call
5224 -- Sloc points to SELECT
5225 -- Entry_Call_Alternative (Node1)
5226 -- Delay_Alternative (Node4)
5227
5228 -----------------------------------
5229 -- 9.7.2 Entry Call Alternative --
5230 -----------------------------------
5231
5232 -- ENTRY_CALL_ALTERNATIVE ::=
5233 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
5234
5235 -- PROCEDURE_OR_ENTRY_CALL ::=
5236 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
5237
5238 -- Gigi restriction: This node never appears
5239
5240 -- N_Entry_Call_Alternative
5241 -- Sloc points to first token of entry call statement
5242 -- Entry_Call_Statement (Node1)
5243 -- Statements (List3) (set to Empty_List if no statements)
5244 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5245
5246 -----------------------------------
5247 -- 9.7.3 Conditional Entry Call --
5248 -----------------------------------
5249
5250 -- CONDITIONAL_ENTRY_CALL ::=
5251 -- select
5252 -- ENTRY_CALL_ALTERNATIVE
5253 -- else
5254 -- SEQUENCE_OF_STATEMENTS
5255 -- end select;
5256
5257 -- Gigi restriction: This node never appears
5258
5259 -- N_Conditional_Entry_Call
5260 -- Sloc points to SELECT
5261 -- Entry_Call_Alternative (Node1)
5262 -- Else_Statements (List4)
5263
5264 --------------------------------
5265 -- 9.7.4 Asynchronous Select --
5266 --------------------------------
5267
5268 -- ASYNCHRONOUS_SELECT ::=
5269 -- select
5270 -- TRIGGERING_ALTERNATIVE
5271 -- then abort
5272 -- ABORTABLE_PART
5273 -- end select;
5274
5275 -- Note: asynchronous select is not permitted in Ada 83 mode
5276
5277 -- Gigi restriction: This node never appears
5278
5279 -- N_Asynchronous_Select
5280 -- Sloc points to SELECT
5281 -- Triggering_Alternative (Node1)
5282 -- Abortable_Part (Node2)
5283
5284 -----------------------------------
5285 -- 9.7.4 Triggering Alternative --
5286 -----------------------------------
5287
5288 -- TRIGGERING_ALTERNATIVE ::=
5289 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
5290
5291 -- Gigi restriction: This node never appears
5292
5293 -- N_Triggering_Alternative
5294 -- Sloc points to first token of triggering statement
5295 -- Triggering_Statement (Node1)
5296 -- Statements (List3) (set to Empty_List if no statements)
5297 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5298
5299 ---------------------------------
5300 -- 9.7.4 Triggering Statement --
5301 ---------------------------------
5302
5303 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
5304
5305 ---------------------------
5306 -- 9.7.4 Abortable Part --
5307 ---------------------------
5308
5309 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
5310
5311 -- Gigi restriction: This node never appears
5312
5313 -- N_Abortable_Part
5314 -- Sloc points to ABORT
5315 -- Statements (List3)
5316
5317 --------------------------
5318 -- 9.8 Abort Statement --
5319 --------------------------
5320
5321 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
5322
5323 -- Gigi restriction: This node never appears
5324
5325 -- N_Abort_Statement
5326 -- Sloc points to ABORT
5327 -- Names (List2)
5328
5329 -------------------------
5330 -- 10.1.1 Compilation --
5331 -------------------------
5332
5333 -- COMPILATION ::= {COMPILATION_UNIT}
5334
5335 -- There is no explicit node in the tree for a compilation, since in
5336 -- general the compiler is processing only a single compilation unit
5337 -- at a time. It is possible to parse multiple units in syntax check
5338 -- only mode, but the trees are discarded in that case.
5339
5340 ------------------------------
5341 -- 10.1.1 Compilation Unit --
5342 ------------------------------
5343
5344 -- COMPILATION_UNIT ::=
5345 -- CONTEXT_CLAUSE LIBRARY_ITEM
5346 -- | CONTEXT_CLAUSE SUBUNIT
5347
5348 -- The N_Compilation_Unit node itself represents the above syntax.
5349 -- However, there are two additional items not reflected in the above
5350 -- syntax. First we have the global declarations that are added by the
5351 -- code generator. These are outer level declarations (so they cannot
5352 -- be represented as being inside the units). An example is the wrapper
5353 -- subprograms that are created to do ABE checking. As always a list of
5354 -- declarations can contain actions as well (i.e. statements), and such
5355 -- statements are executed as part of the elaboration of the unit. Note
5356 -- that all such declarations are elaborated before the library unit.
5357
5358 -- Similarly, certain actions need to be elaborated at the completion
5359 -- of elaboration of the library unit (notably the statement that sets
5360 -- the Boolean flag indicating that elaboration is complete).
5361
5362 -- The third item not reflected in the syntax is pragmas that appear
5363 -- after the compilation unit. As always pragmas are a problem since
5364 -- they are not part of the formal syntax, but can be stuck into the
5365 -- source following a set of ad hoc rules, and we have to find an ad
5366 -- hoc way of sticking them into the tree. For pragmas that appear
5367 -- before the library unit, we just consider them to be part of the
5368 -- context clause, and pragmas can appear in the Context_Items list
5369 -- of the compilation unit. However, pragmas can also appear after
5370 -- the library item.
5371
5372 -- To deal with all these problems, we create an auxiliary node for
5373 -- a compilation unit, referenced from the N_Compilation_Unit node
5374 -- that contains these three items.
5375
5376 -- N_Compilation_Unit
5377 -- Sloc points to first token of defining unit name
5378 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
5379 -- Context_Items (List1) context items and pragmas preceding unit
5380 -- Private_Present (Flag15) set if library unit has private keyword
5381 -- Unit (Node2) library item or subunit
5382 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
5383 -- Has_No_Elaboration_Code (Flag17-Sem)
5384 -- Body_Required (Flag13-Sem) set for spec if body is required
5385 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
5386 -- First_Inlined_Subprogram (Node3-Sem)
5387
5388 -- N_Compilation_Unit_Aux
5389 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
5390 -- Declarations (List2) (set to No_List if no global declarations)
5391 -- Actions (List1) (set to No_List if no actions)
5392 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
5393 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
5394
5395 --------------------------
5396 -- 10.1.1 Library Item --
5397 --------------------------
5398
5399 -- LIBRARY_ITEM ::=
5400 -- [private] LIBRARY_UNIT_DECLARATION
5401 -- | LIBRARY_UNIT_BODY
5402 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
5403
5404 -- Note: PRIVATE is not allowed in Ada 83 mode
5405
5406 -- There is no explicit node in the tree for library item, instead
5407 -- the declaration or body, and the flag for private if present,
5408 -- appear in the N_Compilation_Unit node.
5409
5410 --------------------------------------
5411 -- 10.1.1 Library Unit Declaration --
5412 --------------------------------------
5413
5414 -- LIBRARY_UNIT_DECLARATION ::=
5415 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
5416 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
5417
5418 -----------------------------------------------
5419 -- 10.1.1 Library Unit Renaming Declaration --
5420 -----------------------------------------------
5421
5422 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
5423 -- PACKAGE_RENAMING_DECLARATION
5424 -- | GENERIC_RENAMING_DECLARATION
5425 -- | SUBPROGRAM_RENAMING_DECLARATION
5426
5427 -------------------------------
5428 -- 10.1.1 Library unit body --
5429 -------------------------------
5430
5431 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
5432
5433 ------------------------------
5434 -- 10.1.1 Parent Unit Name --
5435 ------------------------------
5436
5437 -- PARENT_UNIT_NAME ::= NAME
5438
5439 ----------------------------
5440 -- 10.1.2 Context clause --
5441 ----------------------------
5442
5443 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
5444
5445 -- The context clause can include pragmas, and any pragmas that appear
5446 -- before the context clause proper (i.e. all configuration pragmas,
5447 -- also appear at the front of this list).
5448
5449 --------------------------
5450 -- 10.1.2 Context_Item --
5451 --------------------------
5452
5453 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
5454
5455 -------------------------
5456 -- 10.1.2 With clause --
5457 -------------------------
5458
5459 -- WITH_CLAUSE ::=
5460 -- with library_unit_NAME {,library_unit_NAME};
5461
5462 -- A separate With clause is built for each name, so that we have
5463 -- a Corresponding_Spec field for each with'ed spec. The flags
5464 -- First_Name and Last_Name are used to reconstruct the exact
5465 -- source form. When a list of names appears in one with clause,
5466 -- the first name in the list has First_Name set, and the last
5467 -- has Last_Name set. If the with clause has only one name, then
5468 -- both of the flags First_Name and Last_Name are set in this name.
5469
5470 -- Note: in the case of implicit with's that are installed by the
5471 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
5472 -- set to Standard_Location, but it is incorrect to test the Sloc
5473 -- to find out if a with clause is implicit, test the flag instead.
5474
5475 -- N_With_Clause
5476 -- Sloc points to first token of library unit name
5477 -- Name (Node2)
5478 -- Next_Implicit_With (Node3-Sem)
5479 -- Library_Unit (Node4-Sem)
5480 -- Corresponding_Spec (Node5-Sem)
5481 -- First_Name (Flag5) (set to True if first name or only one name)
5482 -- Last_Name (Flag6) (set to True if last name or only one name)
5483 -- Context_Installed (Flag13-Sem)
5484 -- Elaborate_Present (Flag4-Sem)
5485 -- Elaborate_All_Present (Flag14-Sem)
5486 -- Elaborate_All_Desirable (Flag9-Sem)
5487 -- Elaborate_Desirable (Flag11-Sem)
5488 -- Private_Present (Flag15) set if with_clause has private keyword
5489 -- Implicit_With (Flag16-Sem)
5490 -- Limited_Present (Flag17) set if LIMITED is present
5491 -- Limited_View_Installed (Flag18-Sem)
5492 -- Unreferenced_In_Spec (Flag7-Sem)
5493 -- No_Entities_Ref_In_Spec (Flag8-Sem)
5494
5495 -- Note: Limited_Present and Limited_View_Installed give support to
5496 -- Ada 2005 (AI-50217).
5497 -- Similarly, Private_Present gives support to AI-50262.
5498
5499 ----------------------
5500 -- With_Type clause --
5501 ----------------------
5502
5503 -- This is a GNAT extension, used to implement mutually recursive
5504 -- types declared in different packages.
5505 -- Note: this is now obsolete. The functionality of this construct
5506 -- is now implemented by the Ada 2005 Limited_with_Clause.
5507
5508 ---------------------
5509 -- 10.2 Body stub --
5510 ---------------------
5511
5512 -- BODY_STUB ::=
5513 -- SUBPROGRAM_BODY_STUB
5514 -- | PACKAGE_BODY_STUB
5515 -- | TASK_BODY_STUB
5516 -- | PROTECTED_BODY_STUB
5517
5518 ----------------------------------
5519 -- 10.1.3 Subprogram Body Stub --
5520 ----------------------------------
5521
5522 -- SUBPROGRAM_BODY_STUB ::=
5523 -- SUBPROGRAM_SPECIFICATION is separate;
5524
5525 -- N_Subprogram_Body_Stub
5526 -- Sloc points to FUNCTION or PROCEDURE
5527 -- Specification (Node1)
5528 -- Library_Unit (Node4-Sem) points to the subunit
5529 -- Corresponding_Body (Node5-Sem)
5530
5531 -------------------------------
5532 -- 10.1.3 Package Body Stub --
5533 -------------------------------
5534
5535 -- PACKAGE_BODY_STUB ::=
5536 -- package body DEFINING_IDENTIFIER is separate;
5537
5538 -- N_Package_Body_Stub
5539 -- Sloc points to PACKAGE
5540 -- Defining_Identifier (Node1)
5541 -- Library_Unit (Node4-Sem) points to the subunit
5542 -- Corresponding_Body (Node5-Sem)
5543
5544 ----------------------------
5545 -- 10.1.3 Task Body Stub --
5546 ----------------------------
5547
5548 -- TASK_BODY_STUB ::=
5549 -- task body DEFINING_IDENTIFIER is separate;
5550
5551 -- N_Task_Body_Stub
5552 -- Sloc points to TASK
5553 -- Defining_Identifier (Node1)
5554 -- Library_Unit (Node4-Sem) points to the subunit
5555 -- Corresponding_Body (Node5-Sem)
5556
5557 ---------------------------------
5558 -- 10.1.3 Protected Body Stub --
5559 ---------------------------------
5560
5561 -- PROTECTED_BODY_STUB ::=
5562 -- protected body DEFINING_IDENTIFIER is separate;
5563
5564 -- Note: protected body stubs are not allowed in Ada 83 mode
5565
5566 -- N_Protected_Body_Stub
5567 -- Sloc points to PROTECTED
5568 -- Defining_Identifier (Node1)
5569 -- Library_Unit (Node4-Sem) points to the subunit
5570 -- Corresponding_Body (Node5-Sem)
5571
5572 ---------------------
5573 -- 10.1.3 Subunit --
5574 ---------------------
5575
5576 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
5577
5578 -- N_Subunit
5579 -- Sloc points to SEPARATE
5580 -- Name (Node2) is the name of the parent unit
5581 -- Proper_Body (Node1) is the subunit body
5582 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
5583
5584 ---------------------------------
5585 -- 11.1 Exception Declaration --
5586 ---------------------------------
5587
5588 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception;
5589
5590 -- For consistency with object declarations etc., the parser converts
5591 -- the case of multiple identifiers being declared to a series of
5592 -- declarations in which the expression is copied, using the More_Ids
5593 -- and Prev_Ids flags to remember the source form as described in the
5594 -- section on "Handling of Defining Identifier Lists".
5595
5596 -- N_Exception_Declaration
5597 -- Sloc points to EXCEPTION
5598 -- Defining_Identifier (Node1)
5599 -- Expression (Node3-Sem)
5600 -- Renaming_Exception (Node2-Sem)
5601 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5602 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5603
5604 ------------------------------------------
5605 -- 11.2 Handled Sequence Of Statements --
5606 ------------------------------------------
5607
5608 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
5609 -- SEQUENCE_OF_STATEMENTS
5610 -- [exception
5611 -- EXCEPTION_HANDLER
5612 -- {EXCEPTION_HANDLER}]
5613 -- [at end
5614 -- cleanup_procedure_call (param, param, param, ...);]
5615
5616 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
5617 -- used only internally currently, but is considered to be syntactic.
5618 -- At the moment, the only cleanup action allowed is a single call to
5619 -- a parameterless procedure, and the Identifier field of the node is
5620 -- the procedure to be called. Also there is a current restriction
5621 -- that exception handles and a cleanup cannot be present in the same
5622 -- frame, so at least one of Exception_Handlers or the Identifier must
5623 -- be missing.
5624
5625 -- Actually, more accurately, this restriction applies to the original
5626 -- source program. In the expanded tree, if the At_End_Proc field is
5627 -- present, then there will also be an exception handler of the form:
5628
5629 -- when all others =>
5630 -- cleanup;
5631 -- raise;
5632
5633 -- where cleanup is the procedure to be generated. The reason we do
5634 -- this is so that the front end can handle the necessary entries in
5635 -- the exception tables, and other exception handler actions required
5636 -- as part of the normal handling for exception handlers.
5637
5638 -- The AT END cleanup handler protects only the sequence of statements
5639 -- (not the associated declarations of the parent), just like exception
5640 -- handlers. The big difference is that the cleanup procedure is called
5641 -- on either a normal or an abnormal exit from the statement sequence.
5642
5643 -- Note: the list of Exception_Handlers can contain pragmas as well
5644 -- as actual handlers. In practice these pragmas can only occur at
5645 -- the start of the list, since any pragmas occurring later on will
5646 -- be included in the statement list of the corresponding handler.
5647
5648 -- Note: although in the Ada syntax, the sequence of statements in
5649 -- a handled sequence of statements can only contain statements, we
5650 -- allow free mixing of declarations and statements in the resulting
5651 -- expanded tree. This is for example used to deal with the case of
5652 -- a cleanup procedure that must handle declarations as well as the
5653 -- statements of a block.
5654
5655 -- N_Handled_Sequence_Of_Statements
5656 -- Sloc points to first token of first statement
5657 -- Statements (List3)
5658 -- End_Label (Node4) (set to Empty if expander generated)
5659 -- Exception_Handlers (List5) (set to No_List if none present)
5660 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
5661 -- First_Real_Statement (Node2-Sem)
5662 -- Zero_Cost_Handling (Flag5-Sem)
5663
5664 -- Note: the parent always contains a Declarations field which contains
5665 -- declarations associated with the handled sequence of statements. This
5666 -- is true even in the case of an accept statement (see description of
5667 -- the N_Accept_Statement node).
5668
5669 -- End_Label refers to the containing construct
5670
5671 -----------------------------
5672 -- 11.2 Exception Handler --
5673 -----------------------------
5674
5675 -- EXCEPTION_HANDLER ::=
5676 -- when [CHOICE_PARAMETER_SPECIFICATION :]
5677 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
5678 -- SEQUENCE_OF_STATEMENTS
5679
5680 -- Note: choice parameter specification is not allowed in Ada 83 mode
5681
5682 -- N_Exception_Handler
5683 -- Sloc points to WHEN
5684 -- Choice_Parameter (Node2) (set to Empty if not present)
5685 -- Exception_Choices (List4)
5686 -- Statements (List3)
5687 -- Exception_Label (Node5-Sem) (set to Empty of not present)
5688 -- Zero_Cost_Handling (Flag5-Sem)
5689 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
5690 -- Local_Raise_Not_OK (Flag7-Sem)
5691 -- Has_Local_Raise (Flag8-Sem)
5692
5693 ------------------------------------------
5694 -- 11.2 Choice parameter specification --
5695 ------------------------------------------
5696
5697 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
5698
5699 ----------------------------
5700 -- 11.2 Exception Choice --
5701 ----------------------------
5702
5703 -- EXCEPTION_CHOICE ::= exception_NAME | others
5704
5705 -- Except in the case of OTHERS, no explicit node appears in the tree
5706 -- for exception choice. Instead the exception name appears directly.
5707 -- An OTHERS choice is represented by a N_Others_Choice node (see
5708 -- section 3.8.1.
5709
5710 -- Note: for the exception choice created for an at end handler, the
5711 -- exception choice is an N_Others_Choice node with All_Others set.
5712
5713 ---------------------------
5714 -- 11.3 Raise Statement --
5715 ---------------------------
5716
5717 -- RAISE_STATEMENT ::= raise [exception_NAME];
5718
5719 -- In Ada 2005, we have
5720
5721 -- RAISE_STATEMENT ::= raise; | raise exception_NAME [with EXPRESSION];
5722
5723 -- N_Raise_Statement
5724 -- Sloc points to RAISE
5725 -- Name (Node2) (set to Empty if no exception name present)
5726 -- Expression (Node3) (set to Empty if no expression present)
5727 -- From_At_End (Flag4-Sem)
5728
5729 -------------------------------
5730 -- 12.1 Generic Declaration --
5731 -------------------------------
5732
5733 -- GENERIC_DECLARATION ::=
5734 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
5735
5736 ------------------------------------------
5737 -- 12.1 Generic Subprogram Declaration --
5738 ------------------------------------------
5739
5740 -- GENERIC_SUBPROGRAM_DECLARATION ::=
5741 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION;
5742
5743 -- Note: Generic_Formal_Declarations can include pragmas
5744
5745 -- N_Generic_Subprogram_Declaration
5746 -- Sloc points to GENERIC
5747 -- Specification (Node1) subprogram specification
5748 -- Corresponding_Body (Node5-Sem)
5749 -- Generic_Formal_Declarations (List2) from generic formal part
5750 -- Parent_Spec (Node4-Sem)
5751
5752 ---------------------------------------
5753 -- 12.1 Generic Package Declaration --
5754 ---------------------------------------
5755
5756 -- GENERIC_PACKAGE_DECLARATION ::=
5757 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION;
5758
5759 -- Note: when we do generics right, the Activation_Chain_Entity entry
5760 -- for this node can be removed (since the expander won't see generic
5761 -- units any more)???.
5762
5763 -- Note: Generic_Formal_Declarations can include pragmas
5764
5765 -- N_Generic_Package_Declaration
5766 -- Sloc points to GENERIC
5767 -- Specification (Node1) package specification
5768 -- Corresponding_Body (Node5-Sem)
5769 -- Generic_Formal_Declarations (List2) from generic formal part
5770 -- Parent_Spec (Node4-Sem)
5771 -- Activation_Chain_Entity (Node3-Sem)
5772
5773 -------------------------------
5774 -- 12.1 Generic Formal Part --
5775 -------------------------------
5776
5777 -- GENERIC_FORMAL_PART ::=
5778 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
5779
5780 ------------------------------------------------
5781 -- 12.1 Generic Formal Parameter Declaration --
5782 ------------------------------------------------
5783
5784 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
5785 -- FORMAL_OBJECT_DECLARATION
5786 -- | FORMAL_TYPE_DECLARATION
5787 -- | FORMAL_SUBPROGRAM_DECLARATION
5788 -- | FORMAL_PACKAGE_DECLARATION
5789
5790 ---------------------------------
5791 -- 12.3 Generic Instantiation --
5792 ---------------------------------
5793
5794 -- GENERIC_INSTANTIATION ::=
5795 -- package DEFINING_PROGRAM_UNIT_NAME is
5796 -- new generic_package_NAME [GENERIC_ACTUAL_PART];
5797 -- | [[not] overriding]
5798 -- procedure DEFINING_PROGRAM_UNIT_NAME is
5799 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART];
5800 -- | [[not] overriding]
5801 -- function DEFINING_DESIGNATOR is
5802 -- new generic_function_NAME [GENERIC_ACTUAL_PART];
5803
5804 -- N_Package_Instantiation
5805 -- Sloc points to PACKAGE
5806 -- Defining_Unit_Name (Node1)
5807 -- Name (Node2)
5808 -- Generic_Associations (List3) (set to No_List if no
5809 -- generic actual part)
5810 -- Parent_Spec (Node4-Sem)
5811 -- Instance_Spec (Node5-Sem)
5812 -- ABE_Is_Certain (Flag18-Sem)
5813
5814 -- N_Procedure_Instantiation
5815 -- Sloc points to PROCEDURE
5816 -- Defining_Unit_Name (Node1)
5817 -- Name (Node2)
5818 -- Parent_Spec (Node4-Sem)
5819 -- Generic_Associations (List3) (set to No_List if no
5820 -- generic actual part)
5821 -- Instance_Spec (Node5-Sem)
5822 -- Must_Override (Flag14) set if overriding indicator present
5823 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5824 -- ABE_Is_Certain (Flag18-Sem)
5825
5826 -- N_Function_Instantiation
5827 -- Sloc points to FUNCTION
5828 -- Defining_Unit_Name (Node1)
5829 -- Name (Node2)
5830 -- Generic_Associations (List3) (set to No_List if no
5831 -- generic actual part)
5832 -- Parent_Spec (Node4-Sem)
5833 -- Instance_Spec (Node5-Sem)
5834 -- Must_Override (Flag14) set if overriding indicator present
5835 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5836 -- ABE_Is_Certain (Flag18-Sem)
5837
5838 -- Note: overriding indicator is an Ada 2005 feature
5839
5840 -------------------------------
5841 -- 12.3 Generic Actual Part --
5842 -------------------------------
5843
5844 -- GENERIC_ACTUAL_PART ::=
5845 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
5846
5847 -------------------------------
5848 -- 12.3 Generic Association --
5849 -------------------------------
5850
5851 -- GENERIC_ASSOCIATION ::=
5852 -- [generic_formal_parameter_SELECTOR_NAME =>]
5853
5854 -- Note: unlike the procedure call case, a generic association node
5855 -- is generated for every association, even if no formal parameter
5856 -- selector name is present. In this case the parser will leave the
5857 -- Selector_Name field set to Empty, to be filled in later by the
5858 -- semantic pass.
5859
5860 -- In Ada 2005, a formal may be associated with a box, if the
5861 -- association is part of the list of actuals for a formal package.
5862 -- If the association is given by OTHERS => <>, the association is
5863 -- an N_Others_Choice.
5864
5865 -- N_Generic_Association
5866 -- Sloc points to first token of generic association
5867 -- Selector_Name (Node2) (set to Empty if no formal
5868 -- parameter selector name)
5869 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
5870 -- Box_Present (Flag15) (for formal_package associations with a box)
5871
5872 ---------------------------------------------
5873 -- 12.3 Explicit Generic Actual Parameter --
5874 ---------------------------------------------
5875
5876 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
5877 -- EXPRESSION | variable_NAME | subprogram_NAME
5878 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
5879
5880 -------------------------------------
5881 -- 12.4 Formal Object Declaration --
5882 -------------------------------------
5883
5884 -- FORMAL_OBJECT_DECLARATION ::=
5885 -- DEFINING_IDENTIFIER_LIST :
5886 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION];
5887 -- | DEFINING_IDENTIFIER_LIST :
5888 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION];
5889
5890 -- Although the syntax allows multiple identifiers in the list, the
5891 -- semantics is as though successive declarations were given with
5892 -- identical type definition and expression components. To simplify
5893 -- semantic processing, the parser represents a multiple declaration
5894 -- case as a sequence of single declarations, using the More_Ids and
5895 -- Prev_Ids flags to preserve the original source form as described
5896 -- in the section on "Handling of Defining Identifier Lists".
5897
5898 -- N_Formal_Object_Declaration
5899 -- Sloc points to first identifier
5900 -- Defining_Identifier (Node1)
5901 -- In_Present (Flag15)
5902 -- Out_Present (Flag17)
5903 -- Null_Exclusion_Present (Flag11) (set to False if not present)
5904 -- Subtype_Mark (Node4) (set to Empty if not present)
5905 -- Access_Definition (Node3) (set to Empty if not present)
5906 -- Default_Expression (Node5) (set to Empty if no default expression)
5907 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5908 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5909
5910 -----------------------------------
5911 -- 12.5 Formal Type Declaration --
5912 -----------------------------------
5913
5914 -- FORMAL_TYPE_DECLARATION ::=
5915 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5916 -- is FORMAL_TYPE_DEFINITION;
5917
5918 -- N_Formal_Type_Declaration
5919 -- Sloc points to TYPE
5920 -- Defining_Identifier (Node1)
5921 -- Formal_Type_Definition (Node3)
5922 -- Discriminant_Specifications (List4) (set to No_List if no
5923 -- discriminant part)
5924 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5925
5926 ----------------------------------
5927 -- 12.5 Formal type definition --
5928 ----------------------------------
5929
5930 -- FORMAL_TYPE_DEFINITION ::=
5931 -- FORMAL_PRIVATE_TYPE_DEFINITION
5932 -- | FORMAL_DERIVED_TYPE_DEFINITION
5933 -- | FORMAL_DISCRETE_TYPE_DEFINITION
5934 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
5935 -- | FORMAL_MODULAR_TYPE_DEFINITION
5936 -- | FORMAL_FLOATING_POINT_DEFINITION
5937 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
5938 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
5939 -- | FORMAL_ARRAY_TYPE_DEFINITION
5940 -- | FORMAL_ACCESS_TYPE_DEFINITION
5941 -- | FORMAL_INTERFACE_TYPE_DEFINITION
5942
5943 ---------------------------------------------
5944 -- 12.5.1 Formal Private Type Definition --
5945 ---------------------------------------------
5946
5947 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
5948 -- [[abstract] tagged] [limited] private
5949
5950 -- Note: TAGGED is not allowed in Ada 83 mode
5951
5952 -- N_Formal_Private_Type_Definition
5953 -- Sloc points to PRIVATE
5954 -- Abstract_Present (Flag4)
5955 -- Tagged_Present (Flag15)
5956 -- Limited_Present (Flag17)
5957
5958 --------------------------------------------
5959 -- 12.5.1 Formal Derived Type Definition --
5960 --------------------------------------------
5961
5962 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
5963 -- [abstract] [limited | synchronized]
5964 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
5965 -- Note: this construct is not allowed in Ada 83 mode
5966
5967 -- N_Formal_Derived_Type_Definition
5968 -- Sloc points to NEW
5969 -- Subtype_Mark (Node4)
5970 -- Private_Present (Flag15)
5971 -- Abstract_Present (Flag4)
5972 -- Limited_Present (Flag17)
5973 -- Synchronized_Present (Flag7)
5974 -- Interface_List (List2) (set to No_List if none)
5975
5976 ---------------------------------------------
5977 -- 12.5.2 Formal Discrete Type Definition --
5978 ---------------------------------------------
5979
5980 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
5981
5982 -- N_Formal_Discrete_Type_Definition
5983 -- Sloc points to (
5984
5985 ---------------------------------------------------
5986 -- 12.5.2 Formal Signed Integer Type Definition --
5987 ---------------------------------------------------
5988
5989 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
5990
5991 -- N_Formal_Signed_Integer_Type_Definition
5992 -- Sloc points to RANGE
5993
5994 --------------------------------------------
5995 -- 12.5.2 Formal Modular Type Definition --
5996 --------------------------------------------
5997
5998 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
5999
6000 -- N_Formal_Modular_Type_Definition
6001 -- Sloc points to MOD
6002
6003 ----------------------------------------------
6004 -- 12.5.2 Formal Floating Point Definition --
6005 ----------------------------------------------
6006
6007 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
6008
6009 -- N_Formal_Floating_Point_Definition
6010 -- Sloc points to DIGITS
6011
6012 ----------------------------------------------------
6013 -- 12.5.2 Formal Ordinary Fixed Point Definition --
6014 ----------------------------------------------------
6015
6016 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
6017
6018 -- N_Formal_Ordinary_Fixed_Point_Definition
6019 -- Sloc points to DELTA
6020
6021 ---------------------------------------------------
6022 -- 12.5.2 Formal Decimal Fixed Point Definition --
6023 ---------------------------------------------------
6024
6025 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
6026
6027 -- Note: formal decimal fixed point definition not allowed in Ada 83
6028
6029 -- N_Formal_Decimal_Fixed_Point_Definition
6030 -- Sloc points to DELTA
6031
6032 ------------------------------------------
6033 -- 12.5.3 Formal Array Type Definition --
6034 ------------------------------------------
6035
6036 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
6037
6038 -------------------------------------------
6039 -- 12.5.4 Formal Access Type Definition --
6040 -------------------------------------------
6041
6042 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
6043
6044 ----------------------------------------------
6045 -- 12.5.5 Formal Interface Type Definition --
6046 ----------------------------------------------
6047
6048 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
6049
6050 -----------------------------------------
6051 -- 12.6 Formal Subprogram Declaration --
6052 -----------------------------------------
6053
6054 -- FORMAL_SUBPROGRAM_DECLARATION ::=
6055 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
6056 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
6057
6058 --------------------------------------------------
6059 -- 12.6 Formal Concrete Subprogram Declaration --
6060 --------------------------------------------------
6061
6062 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
6063 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT];
6064
6065 -- N_Formal_Concrete_Subprogram_Declaration
6066 -- Sloc points to WITH
6067 -- Specification (Node1)
6068 -- Default_Name (Node2) (set to Empty if no subprogram default)
6069 -- Box_Present (Flag15)
6070
6071 -- Note: if no subprogram default is present, then Name is set
6072 -- to Empty, and Box_Present is False.
6073
6074 --------------------------------------------------
6075 -- 12.6 Formal Abstract Subprogram Declaration --
6076 --------------------------------------------------
6077
6078 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
6079 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT];
6080
6081 -- N_Formal_Abstract_Subprogram_Declaration
6082 -- Sloc points to WITH
6083 -- Specification (Node1)
6084 -- Default_Name (Node2) (set to Empty if no subprogram default)
6085 -- Box_Present (Flag15)
6086
6087 -- Note: if no subprogram default is present, then Name is set
6088 -- to Empty, and Box_Present is False.
6089
6090 ------------------------------
6091 -- 12.6 Subprogram Default --
6092 ------------------------------
6093
6094 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
6095
6096 -- There is no separate node in the tree for a subprogram default.
6097 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
6098 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
6099 -- default name or box indication, as needed.
6100
6101 ------------------------
6102 -- 12.6 Default Name --
6103 ------------------------
6104
6105 -- DEFAULT_NAME ::= NAME
6106
6107 --------------------------------------
6108 -- 12.7 Formal Package Declaration --
6109 --------------------------------------
6110
6111 -- FORMAL_PACKAGE_DECLARATION ::=
6112 -- with package DEFINING_IDENTIFIER
6113 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART;
6114
6115 -- Note: formal package declarations not allowed in Ada 83 mode
6116
6117 -- N_Formal_Package_Declaration
6118 -- Sloc points to WITH
6119 -- Defining_Identifier (Node1)
6120 -- Name (Node2)
6121 -- Generic_Associations (List3) (set to No_List if (<>) case or
6122 -- empty generic actual part)
6123 -- Box_Present (Flag15)
6124 -- Instance_Spec (Node5-Sem)
6125 -- ABE_Is_Certain (Flag18-Sem)
6126
6127 --------------------------------------
6128 -- 12.7 Formal Package Actual Part --
6129 --------------------------------------
6130
6131 -- FORMAL_PACKAGE_ACTUAL_PART ::=
6132 -- ([OTHERS] => <>)
6133 -- | [GENERIC_ACTUAL_PART]
6134 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
6135
6136 -- FORMAL_PACKAGE_ASSOCIATION ::=
6137 -- GENERIC_ASSOCIATION
6138 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
6139
6140 -- There is no explicit node in the tree for a formal package actual
6141 -- part. Instead the information appears in the parent node (i.e. the
6142 -- formal package declaration node itself).
6143
6144 -- There is no explicit node for a formal package association. All of
6145 -- them are represented either by a generic association, possibly with
6146 -- Box_Present, or by an N_Others_Choice.
6147
6148 ---------------------------------
6149 -- 13.1 Representation clause --
6150 ---------------------------------
6151
6152 -- REPRESENTATION_CLAUSE ::=
6153 -- ATTRIBUTE_DEFINITION_CLAUSE
6154 -- | ENUMERATION_REPRESENTATION_CLAUSE
6155 -- | RECORD_REPRESENTATION_CLAUSE
6156 -- | AT_CLAUSE
6157
6158 ----------------------
6159 -- 13.1 Local Name --
6160 ----------------------
6161
6162 -- LOCAL_NAME :=
6163 -- DIRECT_NAME
6164 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
6165 -- | library_unit_NAME
6166
6167 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
6168 -- as an attribute reference, which has essentially the same form.
6169
6170 ---------------------------------------
6171 -- 13.3 Attribute definition clause --
6172 ---------------------------------------
6173
6174 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
6175 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
6176 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
6177
6178 -- In Ada 83, the expression must be a simple expression and the
6179 -- local name must be a direct name.
6180
6181 -- Note: the only attribute definition clause that is processed by
6182 -- gigi is an address clause. For all other cases, the information
6183 -- is extracted by the front end and either results in setting entity
6184 -- information, e.g. Esize for the Size clause, or in appropriate
6185 -- expansion actions (e.g. in the case of Storage_Size).
6186
6187 -- For an address clause, Gigi constructs the appropriate addressing
6188 -- code. It also ensures that no aliasing optimizations are made
6189 -- for the object for which the address clause appears.
6190
6191 -- Note: for an address clause used to achieve an overlay:
6192
6193 -- A : Integer;
6194 -- B : Integer;
6195 -- for B'Address use A'Address;
6196
6197 -- the above rule means that Gigi will ensure that no optimizations
6198 -- will be made for B that would violate the implementation advice
6199 -- of RM 13.3(19). However, this advice applies only to B and not
6200 -- to A, which seems unfortunate. The GNAT front end will mark the
6201 -- object A as volatile to also prevent unwanted optimization
6202 -- assumptions based on no aliasing being made for B.
6203
6204 -- N_Attribute_Definition_Clause
6205 -- Sloc points to FOR
6206 -- Name (Node2) the local name
6207 -- Chars (Name1) the identifier name from the attribute designator
6208 -- Expression (Node3) the expression or name
6209 -- Entity (Node4-Sem)
6210 -- Next_Rep_Item (Node5-Sem)
6211 -- From_At_Mod (Flag4-Sem)
6212 -- Check_Address_Alignment (Flag11-Sem)
6213 -- Address_Warning_Posted (Flag18-Sem)
6214
6215 ---------------------------------------------
6216 -- 13.4 Enumeration representation clause --
6217 ---------------------------------------------
6218
6219 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
6220 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
6221
6222 -- In Ada 83, the name must be a direct name
6223
6224 -- N_Enumeration_Representation_Clause
6225 -- Sloc points to FOR
6226 -- Identifier (Node1) direct name
6227 -- Array_Aggregate (Node3)
6228 -- Next_Rep_Item (Node5-Sem)
6229
6230 ---------------------------------
6231 -- 13.4 Enumeration aggregate --
6232 ---------------------------------
6233
6234 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
6235
6236 ------------------------------------------
6237 -- 13.5.1 Record representation clause --
6238 ------------------------------------------
6239
6240 -- RECORD_REPRESENTATION_CLAUSE ::=
6241 -- for first_subtype_LOCAL_NAME use
6242 -- record [MOD_CLAUSE]
6243 -- {COMPONENT_CLAUSE}
6244 -- end record;
6245
6246 -- Gigi restriction: Mod_Clause is always Empty (if present it is
6247 -- replaced by a corresponding Alignment attribute definition clause).
6248
6249 -- Note: Component_Clauses can include pragmas
6250
6251 -- N_Record_Representation_Clause
6252 -- Sloc points to FOR
6253 -- Identifier (Node1) direct name
6254 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
6255 -- Component_Clauses (List3)
6256 -- Next_Rep_Item (Node5-Sem)
6257
6258 ------------------------------
6259 -- 13.5.1 Component clause --
6260 ------------------------------
6261
6262 -- COMPONENT_CLAUSE ::=
6263 -- component_LOCAL_NAME at POSITION
6264 -- range FIRST_BIT .. LAST_BIT;
6265
6266 -- N_Component_Clause
6267 -- Sloc points to AT
6268 -- Component_Name (Node1) points to Name or Attribute_Reference
6269 -- Position (Node2)
6270 -- First_Bit (Node3)
6271 -- Last_Bit (Node4)
6272
6273 ----------------------
6274 -- 13.5.1 Position --
6275 ----------------------
6276
6277 -- POSITION ::= static_EXPRESSION
6278
6279 -----------------------
6280 -- 13.5.1 First_Bit --
6281 -----------------------
6282
6283 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
6284
6285 ----------------------
6286 -- 13.5.1 Last_Bit --
6287 ----------------------
6288
6289 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
6290
6291 --------------------------
6292 -- 13.8 Code statement --
6293 --------------------------
6294
6295 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
6296
6297 -- Note: in GNAT, the qualified expression has the form
6298
6299 -- Asm_Insn'(Asm (...));
6300
6301 -- See package System.Machine_Code in file s-maccod.ads for details on
6302 -- the allowed parameters to Asm. There are two ways this node can
6303 -- arise, as a code statement, in which case the expression is the
6304 -- qualified expression, or as a result of the expansion of an intrinsic
6305 -- call to the Asm or Asm_Input procedure.
6306
6307 -- N_Code_Statement
6308 -- Sloc points to first token of the expression
6309 -- Expression (Node3)
6310
6311 -- Note: package Exp_Code contains an abstract functional interface
6312 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
6313
6314 ------------------------
6315 -- 13.12 Restriction --
6316 ------------------------
6317
6318 -- RESTRICTION ::=
6319 -- restriction_IDENTIFIER
6320 -- | restriction_parameter_IDENTIFIER => EXPRESSION
6321
6322 -- There is no explicit node for restrictions. Instead the restriction
6323 -- appears in normal pragma syntax as a pragma argument association,
6324 -- which has the same syntactic form.
6325
6326 --------------------------
6327 -- B.2 Shift Operators --
6328 --------------------------
6329
6330 -- Calls to the intrinsic shift functions are converted to one of
6331 -- the following shift nodes, which have the form of normal binary
6332 -- operator names. Note that for a given shift operation, one node
6333 -- covers all possible types, as for normal operators.
6334
6335 -- Note: it is perfectly permissible for the expander to generate
6336 -- shift operation nodes directly, in which case they will be analyzed
6337 -- and parsed in the usual manner.
6338
6339 -- Sprint syntax: shift-function-name!(expr, count)
6340
6341 -- Note: the Left_Opnd field holds the first argument (the value to
6342 -- be shifted). The Right_Opnd field holds the second argument (the
6343 -- shift count). The Chars field is the name of the intrinsic function.
6344
6345 -- N_Op_Rotate_Left
6346 -- Sloc points to the function name
6347 -- plus fields for binary operator
6348 -- plus fields for expression
6349 -- Shift_Count_OK (Flag4-Sem)
6350
6351 -- N_Op_Rotate_Right
6352 -- Sloc points to the function name
6353 -- plus fields for binary operator
6354 -- plus fields for expression
6355 -- Shift_Count_OK (Flag4-Sem)
6356
6357 -- N_Op_Shift_Left
6358 -- Sloc points to the function name
6359 -- plus fields for binary operator
6360 -- plus fields for expression
6361 -- Shift_Count_OK (Flag4-Sem)
6362
6363 -- N_Op_Shift_Right_Arithmetic
6364 -- Sloc points to the function name
6365 -- plus fields for binary operator
6366 -- plus fields for expression
6367 -- Shift_Count_OK (Flag4-Sem)
6368
6369 -- N_Op_Shift_Right
6370 -- Sloc points to the function name
6371 -- plus fields for binary operator
6372 -- plus fields for expression
6373 -- Shift_Count_OK (Flag4-Sem)
6374
6375 --------------------------
6376 -- Obsolescent Features --
6377 --------------------------
6378
6379 -- The syntax descriptions and tree nodes for obsolescent features are
6380 -- grouped together, corresponding to their location in appendix I in
6381 -- the RM. However, parsing and semantic analysis for these constructs
6382 -- is located in an appropriate chapter (see individual notes).
6383
6384 ---------------------------
6385 -- J.3 Delta Constraint --
6386 ---------------------------
6387
6388 -- Note: the parse routine for this construct is located in section
6389 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
6390 -- where delta constraint logically belongs.
6391
6392 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
6393
6394 -- N_Delta_Constraint
6395 -- Sloc points to DELTA
6396 -- Delta_Expression (Node3)
6397 -- Range_Constraint (Node4) (set to Empty if not present)
6398
6399 --------------------
6400 -- J.7 At Clause --
6401 --------------------
6402
6403 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
6404
6405 -- Note: the parse routine for this construct is located in Par-Ch13,
6406 -- and the semantic analysis is in Sem_Ch13, where at clause logically
6407 -- belongs if it were not obsolescent.
6408
6409 -- Note: in Ada 83 the expression must be a simple expression
6410
6411 -- Gigi restriction: This node never appears, it is rewritten as an
6412 -- address attribute definition clause.
6413
6414 -- N_At_Clause
6415 -- Sloc points to FOR
6416 -- Identifier (Node1)
6417 -- Expression (Node3)
6418
6419 ---------------------
6420 -- J.8 Mod clause --
6421 ---------------------
6422
6423 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
6424
6425 -- Note: the parse routine for this construct is located in Par-Ch13,
6426 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
6427 -- belongs if it were not obsolescent.
6428
6429 -- Note: in Ada 83, the expression must be a simple expression
6430
6431 -- Gigi restriction: this node never appears. It is replaced
6432 -- by a corresponding Alignment attribute definition clause.
6433
6434 -- Note: pragmas can appear before and after the MOD_CLAUSE since
6435 -- its name has "clause" in it. This is rather strange, but is quite
6436 -- definitely specified. The pragmas before are collected in the
6437 -- Pragmas_Before field of the mod clause node itself, and pragmas
6438 -- after are simply swallowed up in the list of component clauses.
6439
6440 -- N_Mod_Clause
6441 -- Sloc points to AT
6442 -- Expression (Node3)
6443 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
6444
6445 --------------------
6446 -- Semantic Nodes --
6447 --------------------
6448
6449 -- These semantic nodes are used to hold additional semantic information.
6450 -- They are inserted into the tree as a result of semantic processing.
6451 -- Although there are no legitimate source syntax constructions that
6452 -- correspond directly to these nodes, we need a source syntax for the
6453 -- reconstructed tree printed by Sprint, and the node descriptions here
6454 -- show this syntax.
6455
6456 -- Note: Conditional_Expression is in this section for historical reasons.
6457 -- We will move it to its appropriate place when it is officially approved
6458 -- as an extension (and then we will know what the exact grammar and place
6459 -- in the Reference Manual is!)
6460
6461 ----------------------------
6462 -- Conditional Expression --
6463 ----------------------------
6464
6465 -- This node is used to represent an expression corresponding to the
6466 -- C construct (condition ? then-expression : else_expression), where
6467 -- Expressions is a three element list, whose first expression is the
6468 -- condition, and whose second and third expressions are the then and
6469 -- else expressions respectively.
6470
6471 -- Note: the Then_Actions and Else_Actions fields are always set to
6472 -- No_List in the tree passed to Gigi. These fields are used only
6473 -- for temporary processing purposes in the expander.
6474
6475 -- The Ada language does not permit conditional expressions, however
6476 -- this is under discussion as a possible extension by the ARG, and we
6477 -- have implemented a form of this capability in GNAT under control of
6478 -- the -gnatX switch. The syntax is:
6479
6480 -- CONDITIONAL_EXPRESSION ::=
6481 -- if EXPRESSION then EXPRESSION
6482 -- {elsif EXPRESSION then EXPRESSION}
6483 -- [else EXPRESSION]
6484
6485 -- And we add the additional constructs
6486
6487 -- PRIMARY ::= ( CONDITIONAL_EXPRESION )
6488 -- PRAGMA_ARGUMENT_ASSOCIATION ::= CONDITIONAL_EXPRESSION
6489
6490 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
6491 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
6492 -- the Is_Elsif flag is set on the inner conditional expression.
6493
6494 -- N_Conditional_Expression
6495 -- Sloc points to IF or ELSIF keyword
6496 -- Expressions (List1)
6497 -- Then_Actions (List2-Sem)
6498 -- Else_Actions (List3-Sem)
6499 -- Is_Elsif (Flag13) (set if comes from ELSIF)
6500 -- plus fields for expression
6501
6502 -------------------
6503 -- Expanded_Name --
6504 -------------------
6505
6506 -- The N_Expanded_Name node is used to represent a selected component
6507 -- name that has been resolved to an expanded name. The semantic phase
6508 -- replaces N_Selected_Component nodes that represent names by the use
6509 -- of this node, leaving the N_Selected_Component node used only when
6510 -- the prefix is a record or protected type.
6511
6512 -- The fields of the N_Expanded_Name node are layed out identically
6513 -- to those of the N_Selected_Component node, allowing conversion of
6514 -- an expanded name node to a selected component node to be done
6515 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
6516
6517 -- There is no special sprint syntax for an expanded name
6518
6519 -- N_Expanded_Name
6520 -- Sloc points to the period
6521 -- Chars (Name1) copy of Chars field of selector name
6522 -- Prefix (Node3)
6523 -- Selector_Name (Node2)
6524 -- Entity (Node4-Sem)
6525 -- Associated_Node (Node4-Sem)
6526 -- Redundant_Use (Flag13-Sem)
6527 -- Has_Private_View (Flag11-Sem) set in generic units.
6528 -- plus fields for expression
6529
6530 --------------------
6531 -- Free Statement --
6532 --------------------
6533
6534 -- The N_Free_Statement node is generated as a result of a call to an
6535 -- instantiation of Unchecked_Deallocation. The instantiation of this
6536 -- generic is handled specially and generates this node directly.
6537
6538 -- Sprint syntax: free expression
6539
6540 -- N_Free_Statement
6541 -- Sloc is copied from the unchecked deallocation call
6542 -- Expression (Node3) argument to unchecked deallocation call
6543 -- Storage_Pool (Node1-Sem)
6544 -- Procedure_To_Call (Node2-Sem)
6545 -- Actual_Designated_Subtype (Node4-Sem)
6546
6547 -- Note: in the case where a debug source file is generated, the Sloc
6548 -- for this node points to the FREE keyword in the Sprint file output.
6549
6550 -------------------
6551 -- Freeze Entity --
6552 -------------------
6553
6554 -- This node marks the point in a declarative part at which an entity
6555 -- declared therein becomes frozen. The expander places initialization
6556 -- procedures for types at those points. Gigi uses the freezing point
6557 -- to elaborate entities that may depend on previous private types.
6558
6559 -- See the section in Einfo "Delayed Freezing and Elaboration" for
6560 -- a full description of the use of this node.
6561
6562 -- The Entity field points back to the entity for the type (whose
6563 -- Freeze_Node field points back to this freeze node).
6564
6565 -- The Actions field contains a list of declarations and statements
6566 -- generated by the expander which are associated with the freeze
6567 -- node, and are elaborated as though the freeze node were replaced
6568 -- by this sequence of actions.
6569
6570 -- Note: the Sloc field in the freeze node references a construct
6571 -- associated with the freezing point. This is used for posting
6572 -- messages in some error/warning situations, e.g. the case where
6573 -- a primitive operation of a tagged type is declared too late.
6574
6575 -- Sprint syntax: freeze entity-name [
6576 -- freeze actions
6577 -- ]
6578
6579 -- N_Freeze_Entity
6580 -- Sloc points near freeze point (see above special note)
6581 -- Entity (Node4-Sem)
6582 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
6583 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
6584 -- Actions (List1) (set to No_List if no freeze actions)
6585 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
6586
6587 -- The Actions field holds actions associated with the freeze. These
6588 -- actions are elaborated at the point where the type is frozen.
6589
6590 -- Note: in the case where a debug source file is generated, the Sloc
6591 -- for this node points to the FREEZE keyword in the Sprint file output.
6592
6593 --------------------------------
6594 -- Implicit Label Declaration --
6595 --------------------------------
6596
6597 -- An implicit label declaration is created for every occurrence of a
6598 -- label on a statement or a label on a block or loop. It is chained
6599 -- in the declarations of the innermost enclosing block as specified
6600 -- in RM section 5.1 (3).
6601
6602 -- The Defining_Identifier is the actual identifier for the statement
6603 -- identifier. Note that the occurrence of the label is a reference, NOT
6604 -- the defining occurrence. The defining occurrence occurs at the head
6605 -- of the innermost enclosing block, and is represented by this node.
6606
6607 -- Note: from the grammar, this might better be called an implicit
6608 -- statement identifier declaration, but the term we choose seems
6609 -- friendlier, since at least informally statement identifiers are
6610 -- called labels in both cases (i.e. when used in labels, and when
6611 -- used as the identifiers of blocks and loops).
6612
6613 -- Note: although this is logically a semantic node, since it does not
6614 -- correspond directly to a source syntax construction, these nodes are
6615 -- actually created by the parser in a post pass done just after parsing
6616 -- is complete, before semantic analysis is started (see Par.Labl).
6617
6618 -- Sprint syntax: labelname : label;
6619
6620 -- N_Implicit_Label_Declaration
6621 -- Sloc points to the << of the label
6622 -- Defining_Identifier (Node1)
6623 -- Label_Construct (Node2-Sem)
6624
6625 -- Note: in the case where a debug source file is generated, the Sloc
6626 -- for this node points to the label name in the generated declaration.
6627
6628 ---------------------
6629 -- Itype_Reference --
6630 ---------------------
6631
6632 -- This node is used to create a reference to an Itype. The only purpose
6633 -- is to make sure the Itype is defined if this is the first reference.
6634
6635 -- A typical use of this node is when an Itype is to be referenced in
6636 -- two branches of an IF statement. In this case it is important that
6637 -- the first use of the Itype not be inside the conditional, since then
6638 -- it might not be defined if the other branch of the IF is taken, in
6639 -- the case where the definition generates elaboration code.
6640
6641 -- The Itype field points to the referenced Itype
6642
6643 -- Sprint syntax: reference itype-name
6644
6645 -- N_Itype_Reference
6646 -- Sloc points to the node generating the reference
6647 -- Itype (Node1-Sem)
6648
6649 -- Note: in the case where a debug source file is generated, the Sloc
6650 -- for this node points to the REFERENCE keyword in the file output.
6651
6652 ---------------------
6653 -- Raise_xxx_Error --
6654 ---------------------
6655
6656 -- One of these nodes is created during semantic analysis to replace
6657 -- a node for an expression that is determined to definitely raise
6658 -- the corresponding exception.
6659
6660 -- The N_Raise_xxx_Error node may also stand alone in place
6661 -- of a declaration or statement, in which case it simply causes
6662 -- the exception to be raised (i.e. it is equivalent to a raise
6663 -- statement that raises the corresponding exception). This use
6664 -- is distinguished by the fact that the Etype in this case is
6665 -- Standard_Void_Type, In the subexpression case, the Etype is the
6666 -- same as the type of the subexpression which it replaces.
6667
6668 -- If Condition is empty, then the raise is unconditional. If the
6669 -- Condition field is non-empty, it is a boolean expression which
6670 -- is first evaluated, and the exception is raised only if the
6671 -- value of the expression is True. In the unconditional case, the
6672 -- creation of this node is usually accompanied by a warning message
6673 -- error. The creation of this node will usually be accompanied by a
6674 -- message (unless it appears within the right operand of a short
6675 -- circuit form whose left argument is static and decisively
6676 -- eliminates elaboration of the raise operation. The condition field
6677 -- can ONLY be present when the node is used as a statement form, it
6678 -- may NOT be present in the case where the node appears within an
6679 -- expression.
6680
6681 -- The exception is generated with a message that contains the
6682 -- file name and line number, and then appended text. The Reason
6683 -- code shows the text to be added. The Reason code is an element
6684 -- of the type Types.RT_Exception_Code, and indicates both the
6685 -- message to be added, and the exception to be raised (which must
6686 -- match the node type). The value is stored by storing a Uint which
6687 -- is the Pos value of the enumeration element in this type.
6688
6689 -- Gigi restriction: This expander ensures that the type of the
6690 -- Condition field is always Standard.Boolean, even if the type
6691 -- in the source is some non-standard boolean type.
6692
6693 -- Sprint syntax: [xxx_error "msg"]
6694 -- or: [xxx_error when condition "msg"]
6695
6696 -- N_Raise_Constraint_Error
6697 -- Sloc references related construct
6698 -- Condition (Node1) (set to Empty if no condition)
6699 -- Reason (Uint3)
6700 -- plus fields for expression
6701
6702 -- N_Raise_Program_Error
6703 -- Sloc references related construct
6704 -- Condition (Node1) (set to Empty if no condition)
6705 -- Reason (Uint3)
6706 -- plus fields for expression
6707
6708 -- N_Raise_Storage_Error
6709 -- Sloc references related construct
6710 -- Condition (Node1) (set to Empty if no condition)
6711 -- Reason (Uint3)
6712 -- plus fields for expression
6713
6714 -- Note: Sloc is copied from the expression generating the exception.
6715 -- In the case where a debug source file is generated, the Sloc for
6716 -- this node points to the left bracket in the Sprint file output.
6717
6718 -- Note: the back end may be required to translate these nodes into
6719 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
6720
6721 ---------------------------------------------
6722 -- Optimization of Exception Raise to Goto --
6723 ---------------------------------------------
6724
6725 -- In some cases, the front end will determine that any exception raised
6726 -- by the back end for a certain exception should be transformed into a
6727 -- goto statement.
6728
6729 -- There are three kinds of exceptions raised by the back end (note that
6730 -- for this purpose we consider gigi to be part of the back end in the
6731 -- gcc case):
6732
6733 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
6734 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
6735 -- 3. Other cases not specifically marked by the front end
6736
6737 -- Normally all such exceptions are translated into calls to the proper
6738 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
6739 -- and the exception message.
6740
6741 -- The front end may determine that for a particular sequence of code,
6742 -- exceptions in any of these three categories for a particular builtin
6743 -- exception should result in a goto, rather than a call to Rcheck_xx.
6744 -- The exact sequence to be generated is:
6745
6746 -- Local_Raise (exception'Identity);
6747 -- goto Label
6748
6749 -- The front end marks such a sequence of code by bracketing it with
6750 -- push and pop nodes:
6751
6752 -- N_Push_xxx_Label (referencing the label)
6753 -- ...
6754 -- (code where transformation is expected for exception xxx)
6755 -- ...
6756 -- N_Pop_xxx_Label
6757
6758 -- The use of push/pop reflects the fact that such regions can properly
6759 -- nest, and one special case is a subregion in which no transformation
6760 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
6761 -- Exception_Label field is Empty.
6762
6763 -- N_Push_Constraint_Error_Label
6764 -- Sloc references first statement in region covered
6765 -- Exception_Label (Node5-Sem)
6766
6767 -- N_Push_Program_Error_Label
6768 -- Sloc references first statement in region covered
6769 -- Exception_Label (Node5-Sem)
6770
6771 -- N_Push_Storage_Error_Label
6772 -- Sloc references first statement in region covered
6773 -- Exception_Label (Node5-Sem)
6774
6775 -- N_Pop_Constraint_Error_Label
6776 -- Sloc references last statement in region covered
6777
6778 -- N_Pop_Program_Error_Label
6779 -- Sloc references last statement in region covered
6780
6781 -- N_Pop_Storage_Error_Label
6782 -- Sloc references last statement in region covered
6783
6784 ---------------
6785 -- Reference --
6786 ---------------
6787
6788 -- For a number of purposes, we need to construct references to objects.
6789 -- These references are subsequently treated as normal access values.
6790 -- An example is the construction of the parameter block passed to a
6791 -- task entry. The N_Reference node is provided for this purpose. It is
6792 -- similar in effect to the use of the Unrestricted_Access attribute,
6793 -- and like Unrestricted_Access can be applied to objects which would
6794 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
6795 -- objects which are not aliased, and slices). In addition it can be
6796 -- applied to composite type values as well as objects, including string
6797 -- values and aggregates.
6798
6799 -- Note: we use the Prefix field for this expression so that the
6800 -- resulting node can be treated using common code with the attribute
6801 -- nodes for the 'Access and related attributes. Logically it would make
6802 -- more sense to call it an Expression field, but then we would have to
6803 -- special case the treatment of the N_Reference node.
6804
6805 -- Sprint syntax: prefix'reference
6806
6807 -- N_Reference
6808 -- Sloc is copied from the expression
6809 -- Prefix (Node3)
6810 -- plus fields for expression
6811
6812 -- Note: in the case where a debug source file is generated, the Sloc
6813 -- for this node points to the quote in the Sprint file output.
6814
6815 ---------------------
6816 -- Subprogram_Info --
6817 ---------------------
6818
6819 -- This node generates the appropriate Subprogram_Info value for a
6820 -- given procedure. See Ada.Exceptions for further details
6821
6822 -- Sprint syntax: subprog'subprogram_info
6823
6824 -- N_Subprogram_Info
6825 -- Sloc points to the entity for the procedure
6826 -- Identifier (Node1) identifier referencing the procedure
6827 -- Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc
6828
6829 -- Note: in the case where a debug source file is generated, the Sloc
6830 -- for this node points to the quote in the Sprint file output.
6831
6832 --------------------------
6833 -- Unchecked Expression --
6834 --------------------------
6835
6836 -- An unchecked expression is one that must be analyzed and resolved
6837 -- with all checks off, regardless of the current setting of scope
6838 -- suppress flags.
6839
6840 -- Sprint syntax: `(expression)
6841
6842 -- Note: this node is always removed from the tree (and replaced by
6843 -- its constituent expression) on completion of analysis, so it only
6844 -- appears in intermediate trees, and will never be seen by Gigi.
6845
6846 -- N_Unchecked_Expression
6847 -- Sloc is a copy of the Sloc of the expression
6848 -- Expression (Node3)
6849 -- plus fields for expression
6850
6851 -- Note: in the case where a debug source file is generated, the Sloc
6852 -- for this node points to the back quote in the Sprint file output.
6853
6854 -------------------------------
6855 -- Unchecked Type Conversion --
6856 -------------------------------
6857
6858 -- An unchecked type conversion node represents the semantic action
6859 -- corresponding to a call to an instantiation of Unchecked_Conversion.
6860 -- It is generated as a result of actual use of Unchecked_Conversion
6861 -- and also the expander generates unchecked type conversion nodes
6862 -- directly for expansion of complex semantic actions.
6863
6864 -- Note: an unchecked type conversion is a variable as far as the
6865 -- semantics are concerned, which is convenient for the expander.
6866 -- This does not change what Ada source programs are legal, since
6867 -- clearly a function call to an instantiation of Unchecked_Conversion
6868 -- is not a variable in any case.
6869
6870 -- Sprint syntax: subtype-mark!(expression)
6871
6872 -- N_Unchecked_Type_Conversion
6873 -- Sloc points to related node in source
6874 -- Subtype_Mark (Node4)
6875 -- Expression (Node3)
6876 -- Kill_Range_Check (Flag11-Sem)
6877 -- No_Truncation (Flag17-Sem)
6878 -- plus fields for expression
6879
6880 -- Note: in the case where a debug source file is generated, the Sloc
6881 -- for this node points to the exclamation in the Sprint file output.
6882
6883 -----------------------------------
6884 -- Validate_Unchecked_Conversion --
6885 -----------------------------------
6886
6887 -- The front end does most of the validation of unchecked conversion,
6888 -- including checking sizes (this is done after the back end is called
6889 -- to take advantage of back-annotation of calculated sizes).
6890
6891 -- The front end also deals with specific cases that are not allowed
6892 -- e.g. involving unconstrained array types.
6893
6894 -- For the case of the standard gigi backend, this means that all
6895 -- checks are done in the front-end.
6896
6897 -- However, in the case of specialized back-ends, notably the JVM
6898 -- backend for JGNAT, additional requirements and restrictions apply
6899 -- to unchecked conversion, and these are most conveniently performed
6900 -- in the specialized back-end.
6901
6902 -- To accommodate this requirement, for such back ends, the following
6903 -- special node is generated recording an unchecked conversion that
6904 -- needs to be validated. The back end should post an appropriate
6905 -- error message if the unchecked conversion is invalid or warrants
6906 -- a special warning message.
6907
6908 -- Source_Type and Target_Type point to the entities for the two
6909 -- types involved in the unchecked conversion instantiation that
6910 -- is to be validated.
6911
6912 -- Sprint syntax: validate Unchecked_Conversion (source, target);
6913
6914 -- N_Validate_Unchecked_Conversion
6915 -- Sloc points to instantiation (location for warning message)
6916 -- Source_Type (Node1-Sem)
6917 -- Target_Type (Node2-Sem)
6918
6919 -- Note: in the case where a debug source file is generated, the Sloc
6920 -- for this node points to the VALIDATE keyword in the file output.
6921
6922 -----------
6923 -- Empty --
6924 -----------
6925
6926 -- Used as the contents of the Nkind field of the dummy Empty node
6927 -- and in some other situations to indicate an uninitialized value.
6928
6929 -- N_Empty
6930 -- Chars (Name1) is set to No_Name
6931
6932 -----------
6933 -- Error --
6934 -----------
6935
6936 -- Used as the contents of the Nkind field of the dummy Error node.
6937 -- Has an Etype field, which gets set to Any_Type later on, to help
6938 -- error recovery (Error_Posted is also set in the Error node).
6939
6940 -- N_Error
6941 -- Chars (Name1) is set to Error_Name
6942 -- Etype (Node5-Sem)
6943
6944 --------------------------
6945 -- Node Type Definition --
6946 --------------------------
6947
6948 -- The following is the definition of the Node_Kind type. As previously
6949 -- discussed, this is separated off to allow rearrangement of the order
6950 -- to facilitate definition of subtype ranges. The comments show the
6951 -- subtype classes which apply to each set of node kinds. The first
6952 -- entry in the comment characterizes the following list of nodes.
6953
6954 type Node_Kind is (
6955 N_Unused_At_Start,
6956
6957 -- N_Representation_Clause
6958
6959 N_At_Clause,
6960 N_Component_Clause,
6961 N_Enumeration_Representation_Clause,
6962 N_Mod_Clause,
6963 N_Record_Representation_Clause,
6964
6965 -- N_Representation_Clause, N_Has_Chars
6966
6967 N_Attribute_Definition_Clause,
6968
6969 -- N_Has_Chars
6970
6971 N_Empty,
6972 N_Pragma_Argument_Association,
6973
6974 -- N_Has_Etype
6975
6976 N_Error,
6977
6978 -- N_Entity, N_Has_Etype, N_Has_Chars
6979
6980 N_Defining_Character_Literal,
6981 N_Defining_Identifier,
6982 N_Defining_Operator_Symbol,
6983
6984 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
6985
6986 N_Expanded_Name,
6987
6988 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
6989 -- N_Has_Chars, N_Has_Entity
6990
6991 N_Identifier,
6992 N_Operator_Symbol,
6993
6994 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
6995 -- N_Has_Chars, N_Has_Entity
6996
6997 N_Character_Literal,
6998
6999 -- N_Binary_Op, N_Op, N_Subexpr,
7000 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
7001
7002 N_Op_Add,
7003 N_Op_Concat,
7004 N_Op_Expon,
7005 N_Op_Subtract,
7006
7007 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
7008 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
7009
7010 N_Op_Divide,
7011 N_Op_Mod,
7012 N_Op_Multiply,
7013 N_Op_Rem,
7014
7015 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7016 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7017
7018 N_Op_And,
7019
7020 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7021 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
7022
7023 N_Op_Eq,
7024 N_Op_Ge,
7025 N_Op_Gt,
7026 N_Op_Le,
7027 N_Op_Lt,
7028 N_Op_Ne,
7029
7030 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7031 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7032
7033 N_Op_Or,
7034 N_Op_Xor,
7035
7036 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
7037 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
7038
7039 N_Op_Rotate_Left,
7040 N_Op_Rotate_Right,
7041 N_Op_Shift_Left,
7042 N_Op_Shift_Right,
7043 N_Op_Shift_Right_Arithmetic,
7044
7045 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
7046 -- N_Has_Chars, N_Has_Entity
7047
7048 N_Op_Abs,
7049 N_Op_Minus,
7050 N_Op_Not,
7051 N_Op_Plus,
7052
7053 -- N_Subexpr, N_Has_Etype, N_Has_Entity
7054
7055 N_Attribute_Reference,
7056
7057 -- N_Subexpr, N_Has_Etype, N_Membership_Test
7058
7059 N_In,
7060 N_Not_In,
7061
7062 -- N_Subexpr, N_Has_Etype, N_Short_Circuit
7063
7064 N_And_Then,
7065 N_Or_Else,
7066
7067 -- N_Subexpr, N_Has_Etype
7068
7069 N_Conditional_Expression,
7070 N_Explicit_Dereference,
7071 N_Function_Call,
7072 N_Indexed_Component,
7073 N_Integer_Literal,
7074 N_Null,
7075 N_Procedure_Call_Statement,
7076 N_Qualified_Expression,
7077
7078 -- N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
7079
7080 N_Raise_Constraint_Error,
7081 N_Raise_Program_Error,
7082 N_Raise_Storage_Error,
7083
7084 -- N_Subexpr, N_Has_Etype
7085
7086 N_Aggregate,
7087 N_Allocator,
7088 N_Extension_Aggregate,
7089 N_Range,
7090 N_Real_Literal,
7091 N_Reference,
7092 N_Selected_Component,
7093 N_Slice,
7094 N_String_Literal,
7095 N_Subprogram_Info,
7096 N_Type_Conversion,
7097 N_Unchecked_Expression,
7098 N_Unchecked_Type_Conversion,
7099
7100 -- N_Has_Etype
7101
7102 N_Subtype_Indication,
7103
7104 -- N_Declaration
7105
7106 N_Component_Declaration,
7107 N_Entry_Declaration,
7108 N_Formal_Object_Declaration,
7109 N_Formal_Type_Declaration,
7110 N_Full_Type_Declaration,
7111 N_Incomplete_Type_Declaration,
7112 N_Loop_Parameter_Specification,
7113 N_Object_Declaration,
7114 N_Protected_Type_Declaration,
7115 N_Private_Extension_Declaration,
7116 N_Private_Type_Declaration,
7117 N_Subtype_Declaration,
7118
7119 -- N_Subprogram_Specification, N_Declaration
7120
7121 N_Function_Specification,
7122 N_Procedure_Specification,
7123
7124 -- N_Access_To_Subprogram_Definition
7125
7126 N_Access_Function_Definition,
7127 N_Access_Procedure_Definition,
7128
7129 -- N_Later_Decl_Item
7130
7131 N_Task_Type_Declaration,
7132
7133 -- N_Body_Stub, N_Later_Decl_Item
7134
7135 N_Package_Body_Stub,
7136 N_Protected_Body_Stub,
7137 N_Subprogram_Body_Stub,
7138 N_Task_Body_Stub,
7139
7140 -- N_Generic_Instantiation, N_Later_Decl_Item
7141 -- N_Subprogram_Instantiation
7142
7143 N_Function_Instantiation,
7144 N_Procedure_Instantiation,
7145
7146 -- N_Generic_Instantiation, N_Later_Decl_Item
7147
7148 N_Package_Instantiation,
7149
7150 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
7151
7152 N_Package_Body,
7153 N_Subprogram_Body,
7154
7155 -- N_Later_Decl_Item, N_Proper_Body
7156
7157 N_Protected_Body,
7158 N_Task_Body,
7159
7160 -- N_Later_Decl_Item
7161
7162 N_Implicit_Label_Declaration,
7163 N_Package_Declaration,
7164 N_Single_Task_Declaration,
7165 N_Subprogram_Declaration,
7166 N_Use_Package_Clause,
7167
7168 -- N_Generic_Declaration, N_Later_Decl_Item
7169
7170 N_Generic_Package_Declaration,
7171 N_Generic_Subprogram_Declaration,
7172
7173 -- N_Array_Type_Definition
7174
7175 N_Constrained_Array_Definition,
7176 N_Unconstrained_Array_Definition,
7177
7178 -- N_Renaming_Declaration
7179
7180 N_Exception_Renaming_Declaration,
7181 N_Object_Renaming_Declaration,
7182 N_Package_Renaming_Declaration,
7183 N_Subprogram_Renaming_Declaration,
7184
7185 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
7186
7187 N_Generic_Function_Renaming_Declaration,
7188 N_Generic_Package_Renaming_Declaration,
7189 N_Generic_Procedure_Renaming_Declaration,
7190
7191 -- N_Statement_Other_Than_Procedure_Call
7192
7193 N_Abort_Statement,
7194 N_Accept_Statement,
7195 N_Assignment_Statement,
7196 N_Asynchronous_Select,
7197 N_Block_Statement,
7198 N_Case_Statement,
7199 N_Code_Statement,
7200 N_Conditional_Entry_Call,
7201
7202 -- N_Statement_Other_Than_Procedure_Call. N_Delay_Statement
7203
7204 N_Delay_Relative_Statement,
7205 N_Delay_Until_Statement,
7206
7207 -- N_Statement_Other_Than_Procedure_Call
7208
7209 N_Entry_Call_Statement,
7210 N_Free_Statement,
7211 N_Goto_Statement,
7212 N_Loop_Statement,
7213 N_Null_Statement,
7214 N_Raise_Statement,
7215 N_Requeue_Statement,
7216 N_Return_Statement, -- renamed as N_Simple_Return_Statement below
7217 N_Extended_Return_Statement,
7218 N_Selective_Accept,
7219 N_Timed_Entry_Call,
7220
7221 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
7222
7223 N_Exit_Statement,
7224 N_If_Statement,
7225
7226 -- N_Has_Condition
7227
7228 N_Accept_Alternative,
7229 N_Delay_Alternative,
7230 N_Elsif_Part,
7231 N_Entry_Body_Formal_Part,
7232 N_Iteration_Scheme,
7233 N_Terminate_Alternative,
7234
7235 -- N_Formal_Subprogram_Declaration
7236
7237 N_Formal_Abstract_Subprogram_Declaration,
7238 N_Formal_Concrete_Subprogram_Declaration,
7239
7240 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
7241
7242 N_Push_Constraint_Error_Label,
7243 N_Push_Program_Error_Label,
7244 N_Push_Storage_Error_Label,
7245
7246 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
7247
7248 N_Pop_Constraint_Error_Label,
7249 N_Pop_Program_Error_Label,
7250 N_Pop_Storage_Error_Label,
7251
7252 -- Other nodes (not part of any subtype class)
7253
7254 N_Abortable_Part,
7255 N_Abstract_Subprogram_Declaration,
7256 N_Access_Definition,
7257 N_Access_To_Object_Definition,
7258 N_Case_Statement_Alternative,
7259 N_Compilation_Unit,
7260 N_Compilation_Unit_Aux,
7261 N_Component_Association,
7262 N_Component_Definition,
7263 N_Component_List,
7264 N_Derived_Type_Definition,
7265 N_Decimal_Fixed_Point_Definition,
7266 N_Defining_Program_Unit_Name,
7267 N_Delta_Constraint,
7268 N_Designator,
7269 N_Digits_Constraint,
7270 N_Discriminant_Association,
7271 N_Discriminant_Specification,
7272 N_Enumeration_Type_Definition,
7273 N_Entry_Body,
7274 N_Entry_Call_Alternative,
7275 N_Entry_Index_Specification,
7276 N_Exception_Declaration,
7277 N_Exception_Handler,
7278 N_Floating_Point_Definition,
7279 N_Formal_Decimal_Fixed_Point_Definition,
7280 N_Formal_Derived_Type_Definition,
7281 N_Formal_Discrete_Type_Definition,
7282 N_Formal_Floating_Point_Definition,
7283 N_Formal_Modular_Type_Definition,
7284 N_Formal_Ordinary_Fixed_Point_Definition,
7285 N_Formal_Package_Declaration,
7286 N_Formal_Private_Type_Definition,
7287 N_Formal_Signed_Integer_Type_Definition,
7288 N_Freeze_Entity,
7289 N_Generic_Association,
7290 N_Handled_Sequence_Of_Statements,
7291 N_Index_Or_Discriminant_Constraint,
7292 N_Itype_Reference,
7293 N_Label,
7294 N_Modular_Type_Definition,
7295 N_Number_Declaration,
7296 N_Ordinary_Fixed_Point_Definition,
7297 N_Others_Choice,
7298 N_Package_Specification,
7299 N_Parameter_Association,
7300 N_Parameter_Specification,
7301 N_Pragma,
7302 N_Protected_Definition,
7303 N_Range_Constraint,
7304 N_Real_Range_Specification,
7305 N_Record_Definition,
7306 N_Signed_Integer_Type_Definition,
7307 N_Single_Protected_Declaration,
7308 N_Subunit,
7309 N_Task_Definition,
7310 N_Triggering_Alternative,
7311 N_Use_Type_Clause,
7312 N_Validate_Unchecked_Conversion,
7313 N_Variant,
7314 N_Variant_Part,
7315 N_With_Clause,
7316 N_Unused_At_End);
7317
7318 for Node_Kind'Size use 8;
7319 -- The data structures in Atree assume this!
7320
7321 ----------------------------
7322 -- Node Class Definitions --
7323 ----------------------------
7324
7325 subtype N_Access_To_Subprogram_Definition is Node_Kind range
7326 N_Access_Function_Definition ..
7327 N_Access_Procedure_Definition;
7328
7329 subtype N_Array_Type_Definition is Node_Kind range
7330 N_Constrained_Array_Definition ..
7331 N_Unconstrained_Array_Definition;
7332
7333 subtype N_Binary_Op is Node_Kind range
7334 N_Op_Add ..
7335 N_Op_Shift_Right_Arithmetic;
7336
7337 subtype N_Body_Stub is Node_Kind range
7338 N_Package_Body_Stub ..
7339 N_Task_Body_Stub;
7340
7341 subtype N_Declaration is Node_Kind range
7342 N_Component_Declaration ..
7343 N_Procedure_Specification;
7344 -- Note: this includes all constructs normally thought of as declarations
7345 -- except those which are separately grouped as later declarations.
7346
7347 subtype N_Delay_Statement is Node_Kind range
7348 N_Delay_Relative_Statement ..
7349 N_Delay_Until_Statement;
7350
7351 subtype N_Direct_Name is Node_Kind range
7352 N_Identifier ..
7353 N_Character_Literal;
7354
7355 subtype N_Entity is Node_Kind range
7356 N_Defining_Character_Literal ..
7357 N_Defining_Operator_Symbol;
7358
7359 subtype N_Formal_Subprogram_Declaration is Node_Kind range
7360 N_Formal_Abstract_Subprogram_Declaration ..
7361 N_Formal_Concrete_Subprogram_Declaration;
7362
7363 subtype N_Generic_Declaration is Node_Kind range
7364 N_Generic_Package_Declaration ..
7365 N_Generic_Subprogram_Declaration;
7366
7367 subtype N_Generic_Instantiation is Node_Kind range
7368 N_Function_Instantiation ..
7369 N_Package_Instantiation;
7370
7371 subtype N_Generic_Renaming_Declaration is Node_Kind range
7372 N_Generic_Function_Renaming_Declaration ..
7373 N_Generic_Procedure_Renaming_Declaration;
7374
7375 subtype N_Has_Chars is Node_Kind range
7376 N_Attribute_Definition_Clause ..
7377 N_Op_Plus;
7378
7379 subtype N_Has_Entity is Node_Kind range
7380 N_Expanded_Name ..
7381 N_Attribute_Reference;
7382 -- Nodes that have Entity fields
7383 -- Warning: DOES NOT INCLUDE N_Freeze_Entity!
7384
7385 subtype N_Has_Etype is Node_Kind range
7386 N_Error ..
7387 N_Subtype_Indication;
7388
7389 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
7390 N_Op_Divide ..
7391 N_Op_Rem;
7392
7393 subtype N_Multiplying_Operator is Node_Kind range
7394 N_Op_Divide ..
7395 N_Op_Rem;
7396
7397 subtype N_Later_Decl_Item is Node_Kind range
7398 N_Task_Type_Declaration ..
7399 N_Generic_Subprogram_Declaration;
7400 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and
7401 -- includes only those items which can appear as later declarative
7402 -- items. This also includes N_Implicit_Label_Declaration which is
7403 -- not specifically in the grammar but may appear as a valid later
7404 -- declarative items. It does NOT include N_Pragma which can also
7405 -- appear among later declarative items. It does however include
7406 -- N_Protected_Body, which is a bit peculiar, but harmless since
7407 -- this cannot appear in Ada 83 mode anyway.
7408
7409 subtype N_Membership_Test is Node_Kind range
7410 N_In ..
7411 N_Not_In;
7412
7413 subtype N_Op is Node_Kind range
7414 N_Op_Add ..
7415 N_Op_Plus;
7416
7417 subtype N_Op_Boolean is Node_Kind range
7418 N_Op_And ..
7419 N_Op_Xor;
7420 -- Binary operators which take operands of a boolean type, and yield
7421 -- a result of a boolean type.
7422
7423 subtype N_Op_Compare is Node_Kind range
7424 N_Op_Eq ..
7425 N_Op_Ne;
7426
7427 subtype N_Op_Shift is Node_Kind range
7428 N_Op_Rotate_Left ..
7429 N_Op_Shift_Right_Arithmetic;
7430
7431 subtype N_Proper_Body is Node_Kind range
7432 N_Package_Body ..
7433 N_Task_Body;
7434
7435 subtype N_Push_xxx_Label is Node_Kind range
7436 N_Push_Constraint_Error_Label ..
7437 N_Push_Storage_Error_Label;
7438
7439 subtype N_Pop_xxx_Label is Node_Kind range
7440 N_Pop_Constraint_Error_Label ..
7441 N_Pop_Storage_Error_Label;
7442
7443 subtype N_Push_Pop_xxx_Label is Node_Kind range
7444 N_Push_Constraint_Error_Label ..
7445 N_Pop_Storage_Error_Label;
7446
7447 subtype N_Raise_xxx_Error is Node_Kind range
7448 N_Raise_Constraint_Error ..
7449 N_Raise_Storage_Error;
7450
7451 subtype N_Renaming_Declaration is Node_Kind range
7452 N_Exception_Renaming_Declaration ..
7453 N_Generic_Procedure_Renaming_Declaration;
7454
7455 subtype N_Representation_Clause is Node_Kind range
7456 N_At_Clause ..
7457 N_Attribute_Definition_Clause;
7458
7459 subtype N_Short_Circuit is Node_Kind range
7460 N_And_Then ..
7461 N_Or_Else;
7462
7463 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
7464 N_Abort_Statement ..
7465 N_If_Statement;
7466 -- Note that this includes all statement types except for the cases of the
7467 -- N_Procedure_Call_Statement which is considered to be a subexpression
7468 -- (since overloading is possible, so it needs to go through the normal
7469 -- overloading resolution for expressions).
7470
7471 subtype N_Subprogram_Instantiation is Node_Kind range
7472 N_Function_Instantiation ..
7473 N_Procedure_Instantiation;
7474
7475 subtype N_Has_Condition is Node_Kind range
7476 N_Exit_Statement ..
7477 N_Terminate_Alternative;
7478 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
7479
7480 subtype N_Subexpr is Node_Kind range
7481 N_Expanded_Name ..
7482 N_Unchecked_Type_Conversion;
7483 -- Nodes with expression fields
7484
7485 subtype N_Subprogram_Specification is Node_Kind range
7486 N_Function_Specification ..
7487 N_Procedure_Specification;
7488
7489 subtype N_Unary_Op is Node_Kind range
7490 N_Op_Abs ..
7491 N_Op_Plus;
7492
7493 subtype N_Unit_Body is Node_Kind range
7494 N_Package_Body ..
7495 N_Subprogram_Body;
7496
7497 ---------------------------
7498 -- Node Access Functions --
7499 ---------------------------
7500
7501 -- The following functions return the contents of the indicated field of
7502 -- the node referenced by the argument, which is a Node_Id. They provide
7503 -- logical access to fields in the node which could be accessed using the
7504 -- Atree.Unchecked_Access package, but the idea is always to use these
7505 -- higher level routines which preserve strong typing. In debug mode,
7506 -- these routines check that they are being applied to an appropriate
7507 -- node, as well as checking that the node is in range.
7508
7509 function ABE_Is_Certain
7510 (N : Node_Id) return Boolean; -- Flag18
7511
7512 function Abort_Present
7513 (N : Node_Id) return Boolean; -- Flag15
7514
7515 function Abortable_Part
7516 (N : Node_Id) return Node_Id; -- Node2
7517
7518 function Abstract_Present
7519 (N : Node_Id) return Boolean; -- Flag4
7520
7521 function Accept_Handler_Records
7522 (N : Node_Id) return List_Id; -- List5
7523
7524 function Accept_Statement
7525 (N : Node_Id) return Node_Id; -- Node2
7526
7527 function Access_Definition
7528 (N : Node_Id) return Node_Id; -- Node3
7529
7530 function Access_To_Subprogram_Definition
7531 (N : Node_Id) return Node_Id; -- Node3
7532
7533 function Access_Types_To_Process
7534 (N : Node_Id) return Elist_Id; -- Elist2
7535
7536 function Actions
7537 (N : Node_Id) return List_Id; -- List1
7538
7539 function Activation_Chain_Entity
7540 (N : Node_Id) return Node_Id; -- Node3
7541
7542 function Acts_As_Spec
7543 (N : Node_Id) return Boolean; -- Flag4
7544
7545 function Actual_Designated_Subtype
7546 (N : Node_Id) return Node_Id; -- Node4
7547
7548 function Address_Warning_Posted
7549 (N : Node_Id) return Boolean; -- Flag18
7550
7551 function Aggregate_Bounds
7552 (N : Node_Id) return Node_Id; -- Node3
7553
7554 function Aliased_Present
7555 (N : Node_Id) return Boolean; -- Flag4
7556
7557 function All_Others
7558 (N : Node_Id) return Boolean; -- Flag11
7559
7560 function All_Present
7561 (N : Node_Id) return Boolean; -- Flag15
7562
7563 function Alternatives
7564 (N : Node_Id) return List_Id; -- List4
7565
7566 function Ancestor_Part
7567 (N : Node_Id) return Node_Id; -- Node3
7568
7569 function Array_Aggregate
7570 (N : Node_Id) return Node_Id; -- Node3
7571
7572 function Assignment_OK
7573 (N : Node_Id) return Boolean; -- Flag15
7574
7575 function Associated_Node
7576 (N : Node_Id) return Node_Id; -- Node4
7577
7578 function At_End_Proc
7579 (N : Node_Id) return Node_Id; -- Node1
7580
7581 function Attribute_Name
7582 (N : Node_Id) return Name_Id; -- Name2
7583
7584 function Aux_Decls_Node
7585 (N : Node_Id) return Node_Id; -- Node5
7586
7587 function Backwards_OK
7588 (N : Node_Id) return Boolean; -- Flag6
7589
7590 function Bad_Is_Detected
7591 (N : Node_Id) return Boolean; -- Flag15
7592
7593 function By_Ref
7594 (N : Node_Id) return Boolean; -- Flag5
7595
7596 function Body_Required
7597 (N : Node_Id) return Boolean; -- Flag13
7598
7599 function Body_To_Inline
7600 (N : Node_Id) return Node_Id; -- Node3
7601
7602 function Box_Present
7603 (N : Node_Id) return Boolean; -- Flag15
7604
7605 function Char_Literal_Value
7606 (N : Node_Id) return Uint; -- Uint2
7607
7608 function Chars
7609 (N : Node_Id) return Name_Id; -- Name1
7610
7611 function Check_Address_Alignment
7612 (N : Node_Id) return Boolean; -- Flag11
7613
7614 function Choice_Parameter
7615 (N : Node_Id) return Node_Id; -- Node2
7616
7617 function Choices
7618 (N : Node_Id) return List_Id; -- List1
7619
7620 function Coextensions
7621 (N : Node_Id) return Elist_Id; -- Elist4
7622
7623 function Comes_From_Extended_Return_Statement
7624 (N : Node_Id) return Boolean; -- Flag18
7625
7626 function Compile_Time_Known_Aggregate
7627 (N : Node_Id) return Boolean; -- Flag18
7628
7629 function Component_Associations
7630 (N : Node_Id) return List_Id; -- List2
7631
7632 function Component_Clauses
7633 (N : Node_Id) return List_Id; -- List3
7634
7635 function Component_Definition
7636 (N : Node_Id) return Node_Id; -- Node4
7637
7638 function Component_Items
7639 (N : Node_Id) return List_Id; -- List3
7640
7641 function Component_List
7642 (N : Node_Id) return Node_Id; -- Node1
7643
7644 function Component_Name
7645 (N : Node_Id) return Node_Id; -- Node1
7646
7647 function Condition
7648 (N : Node_Id) return Node_Id; -- Node1
7649
7650 function Condition_Actions
7651 (N : Node_Id) return List_Id; -- List3
7652
7653 function Config_Pragmas
7654 (N : Node_Id) return List_Id; -- List4
7655
7656 function Constant_Present
7657 (N : Node_Id) return Boolean; -- Flag17
7658
7659 function Constraint
7660 (N : Node_Id) return Node_Id; -- Node3
7661
7662 function Constraints
7663 (N : Node_Id) return List_Id; -- List1
7664
7665 function Context_Installed
7666 (N : Node_Id) return Boolean; -- Flag13
7667
7668 function Context_Items
7669 (N : Node_Id) return List_Id; -- List1
7670
7671 function Controlling_Argument
7672 (N : Node_Id) return Node_Id; -- Node1
7673
7674 function Conversion_OK
7675 (N : Node_Id) return Boolean; -- Flag14
7676
7677 function Corresponding_Body
7678 (N : Node_Id) return Node_Id; -- Node5
7679
7680 function Corresponding_Formal_Spec
7681 (N : Node_Id) return Node_Id; -- Node3
7682
7683 function Corresponding_Generic_Association
7684 (N : Node_Id) return Node_Id; -- Node5
7685
7686 function Corresponding_Integer_Value
7687 (N : Node_Id) return Uint; -- Uint4
7688
7689 function Corresponding_Spec
7690 (N : Node_Id) return Node_Id; -- Node5
7691
7692 function Corresponding_Stub
7693 (N : Node_Id) return Node_Id; -- Node3
7694
7695 function Dcheck_Function
7696 (N : Node_Id) return Entity_Id; -- Node5
7697
7698 function Debug_Statement
7699 (N : Node_Id) return Node_Id; -- Node3
7700
7701 function Declarations
7702 (N : Node_Id) return List_Id; -- List2
7703
7704 function Default_Expression
7705 (N : Node_Id) return Node_Id; -- Node5
7706
7707 function Default_Name
7708 (N : Node_Id) return Node_Id; -- Node2
7709
7710 function Defining_Identifier
7711 (N : Node_Id) return Entity_Id; -- Node1
7712
7713 function Defining_Unit_Name
7714 (N : Node_Id) return Node_Id; -- Node1
7715
7716 function Delay_Alternative
7717 (N : Node_Id) return Node_Id; -- Node4
7718
7719 function Delay_Statement
7720 (N : Node_Id) return Node_Id; -- Node2
7721
7722 function Delta_Expression
7723 (N : Node_Id) return Node_Id; -- Node3
7724
7725 function Digits_Expression
7726 (N : Node_Id) return Node_Id; -- Node2
7727
7728 function Discr_Check_Funcs_Built
7729 (N : Node_Id) return Boolean; -- Flag11
7730
7731 function Discrete_Choices
7732 (N : Node_Id) return List_Id; -- List4
7733
7734 function Discrete_Range
7735 (N : Node_Id) return Node_Id; -- Node4
7736
7737 function Discrete_Subtype_Definition
7738 (N : Node_Id) return Node_Id; -- Node4
7739
7740 function Discrete_Subtype_Definitions
7741 (N : Node_Id) return List_Id; -- List2
7742
7743 function Discriminant_Specifications
7744 (N : Node_Id) return List_Id; -- List4
7745
7746 function Discriminant_Type
7747 (N : Node_Id) return Node_Id; -- Node5
7748
7749 function Do_Accessibility_Check
7750 (N : Node_Id) return Boolean; -- Flag13
7751
7752 function Do_Discriminant_Check
7753 (N : Node_Id) return Boolean; -- Flag13
7754
7755 function Do_Division_Check
7756 (N : Node_Id) return Boolean; -- Flag13
7757
7758 function Do_Length_Check
7759 (N : Node_Id) return Boolean; -- Flag4
7760
7761 function Do_Overflow_Check
7762 (N : Node_Id) return Boolean; -- Flag17
7763
7764 function Do_Range_Check
7765 (N : Node_Id) return Boolean; -- Flag9
7766
7767 function Do_Storage_Check
7768 (N : Node_Id) return Boolean; -- Flag17
7769
7770 function Do_Tag_Check
7771 (N : Node_Id) return Boolean; -- Flag13
7772
7773 function Elaborate_All_Desirable
7774 (N : Node_Id) return Boolean; -- Flag9
7775
7776 function Elaborate_All_Present
7777 (N : Node_Id) return Boolean; -- Flag14
7778
7779 function Elaborate_Desirable
7780 (N : Node_Id) return Boolean; -- Flag11
7781
7782 function Elaborate_Present
7783 (N : Node_Id) return Boolean; -- Flag4
7784
7785 function Elaboration_Boolean
7786 (N : Node_Id) return Node_Id; -- Node2
7787
7788 function Else_Actions
7789 (N : Node_Id) return List_Id; -- List3
7790
7791 function Else_Statements
7792 (N : Node_Id) return List_Id; -- List4
7793
7794 function Elsif_Parts
7795 (N : Node_Id) return List_Id; -- List3
7796
7797 function Enclosing_Variant
7798 (N : Node_Id) return Node_Id; -- Node2
7799
7800 function End_Label
7801 (N : Node_Id) return Node_Id; -- Node4
7802
7803 function End_Span
7804 (N : Node_Id) return Uint; -- Uint5
7805
7806 function Entity
7807 (N : Node_Id) return Node_Id; -- Node4
7808
7809 function Entity_Or_Associated_Node
7810 (N : Node_Id) return Node_Id; -- Node4
7811
7812 function Entry_Body_Formal_Part
7813 (N : Node_Id) return Node_Id; -- Node5
7814
7815 function Entry_Call_Alternative
7816 (N : Node_Id) return Node_Id; -- Node1
7817
7818 function Entry_Call_Statement
7819 (N : Node_Id) return Node_Id; -- Node1
7820
7821 function Entry_Direct_Name
7822 (N : Node_Id) return Node_Id; -- Node1
7823
7824 function Entry_Index
7825 (N : Node_Id) return Node_Id; -- Node5
7826
7827 function Entry_Index_Specification
7828 (N : Node_Id) return Node_Id; -- Node4
7829
7830 function Etype
7831 (N : Node_Id) return Node_Id; -- Node5
7832
7833 function Exception_Choices
7834 (N : Node_Id) return List_Id; -- List4
7835
7836 function Exception_Handlers
7837 (N : Node_Id) return List_Id; -- List5
7838
7839 function Exception_Junk
7840 (N : Node_Id) return Boolean; -- Flag8
7841
7842 function Exception_Label
7843 (N : Node_Id) return Node_Id; -- Node5
7844
7845 function Explicit_Actual_Parameter
7846 (N : Node_Id) return Node_Id; -- Node3
7847
7848 function Expansion_Delayed
7849 (N : Node_Id) return Boolean; -- Flag11
7850
7851 function Explicit_Generic_Actual_Parameter
7852 (N : Node_Id) return Node_Id; -- Node1
7853
7854 function Expression
7855 (N : Node_Id) return Node_Id; -- Node3
7856
7857 function Expressions
7858 (N : Node_Id) return List_Id; -- List1
7859
7860 function First_Bit
7861 (N : Node_Id) return Node_Id; -- Node3
7862
7863 function First_Inlined_Subprogram
7864 (N : Node_Id) return Entity_Id; -- Node3
7865
7866 function First_Name
7867 (N : Node_Id) return Boolean; -- Flag5
7868
7869 function First_Named_Actual
7870 (N : Node_Id) return Node_Id; -- Node4
7871
7872 function First_Real_Statement
7873 (N : Node_Id) return Node_Id; -- Node2
7874
7875 function First_Subtype_Link
7876 (N : Node_Id) return Entity_Id; -- Node5
7877
7878 function Float_Truncate
7879 (N : Node_Id) return Boolean; -- Flag11
7880
7881 function Formal_Type_Definition
7882 (N : Node_Id) return Node_Id; -- Node3
7883
7884 function Forwards_OK
7885 (N : Node_Id) return Boolean; -- Flag5
7886
7887 function From_At_End
7888 (N : Node_Id) return Boolean; -- Flag4
7889
7890 function From_At_Mod
7891 (N : Node_Id) return Boolean; -- Flag4
7892
7893 function From_Default
7894 (N : Node_Id) return Boolean; -- Flag6
7895
7896 function Generic_Associations
7897 (N : Node_Id) return List_Id; -- List3
7898
7899 function Generic_Formal_Declarations
7900 (N : Node_Id) return List_Id; -- List2
7901
7902 function Generic_Parent
7903 (N : Node_Id) return Node_Id; -- Node5
7904
7905 function Generic_Parent_Type
7906 (N : Node_Id) return Node_Id; -- Node4
7907
7908 function Handled_Statement_Sequence
7909 (N : Node_Id) return Node_Id; -- Node4
7910
7911 function Handler_List_Entry
7912 (N : Node_Id) return Node_Id; -- Node2
7913
7914 function Has_Created_Identifier
7915 (N : Node_Id) return Boolean; -- Flag15
7916
7917 function Has_Dynamic_Length_Check
7918 (N : Node_Id) return Boolean; -- Flag10
7919
7920 function Has_Dynamic_Range_Check
7921 (N : Node_Id) return Boolean; -- Flag12
7922
7923 function Has_Init_Expression
7924 (N : Node_Id) return Boolean; -- Flag14
7925
7926 function Has_Local_Raise
7927 (N : Node_Id) return Boolean; -- Flag8
7928
7929 function Has_No_Elaboration_Code
7930 (N : Node_Id) return Boolean; -- Flag17
7931
7932 function Has_Priority_Pragma
7933 (N : Node_Id) return Boolean; -- Flag6
7934
7935 function Has_Private_View
7936 (N : Node_Id) return Boolean; -- Flag11
7937
7938 function Has_Relative_Deadline_Pragma
7939 (N : Node_Id) return Boolean; -- Flag9
7940
7941 function Has_Self_Reference
7942 (N : Node_Id) return Boolean; -- Flag13
7943
7944 function Has_Storage_Size_Pragma
7945 (N : Node_Id) return Boolean; -- Flag5
7946
7947 function Has_Task_Info_Pragma
7948 (N : Node_Id) return Boolean; -- Flag7
7949
7950 function Has_Task_Name_Pragma
7951 (N : Node_Id) return Boolean; -- Flag8
7952
7953 function Has_Wide_Character
7954 (N : Node_Id) return Boolean; -- Flag11
7955
7956 function Hidden_By_Use_Clause
7957 (N : Node_Id) return Elist_Id; -- Elist4
7958
7959 function High_Bound
7960 (N : Node_Id) return Node_Id; -- Node2
7961
7962 function Identifier
7963 (N : Node_Id) return Node_Id; -- Node1
7964
7965 function Interface_List
7966 (N : Node_Id) return List_Id; -- List2
7967
7968 function Interface_Present
7969 (N : Node_Id) return Boolean; -- Flag16
7970
7971 function Implicit_With
7972 (N : Node_Id) return Boolean; -- Flag16
7973
7974 function In_Present
7975 (N : Node_Id) return Boolean; -- Flag15
7976
7977 function Includes_Infinities
7978 (N : Node_Id) return Boolean; -- Flag11
7979
7980 function Instance_Spec
7981 (N : Node_Id) return Node_Id; -- Node5
7982
7983 function Intval
7984 (N : Node_Id) return Uint; -- Uint3
7985
7986 function Is_Asynchronous_Call_Block
7987 (N : Node_Id) return Boolean; -- Flag7
7988
7989 function Is_Component_Left_Opnd
7990 (N : Node_Id) return Boolean; -- Flag13
7991
7992 function Is_Component_Right_Opnd
7993 (N : Node_Id) return Boolean; -- Flag14
7994
7995 function Is_Controlling_Actual
7996 (N : Node_Id) return Boolean; -- Flag16
7997
7998 function Is_Dynamic_Coextension
7999 (N : Node_Id) return Boolean; -- Flag18
8000
8001 function Is_Elsif
8002 (N : Node_Id) return Boolean; -- Flag13
8003
8004 function Is_Entry_Barrier_Function
8005 (N : Node_Id) return Boolean; -- Flag8
8006
8007 function Is_Expanded_Build_In_Place_Call
8008 (N : Node_Id) return Boolean; -- Flag11
8009
8010 function Is_Folded_In_Parser
8011 (N : Node_Id) return Boolean; -- Flag4
8012
8013 function Is_In_Discriminant_Check
8014 (N : Node_Id) return Boolean; -- Flag11
8015
8016 function Is_Machine_Number
8017 (N : Node_Id) return Boolean; -- Flag11
8018
8019 function Is_Null_Loop
8020 (N : Node_Id) return Boolean; -- Flag16
8021
8022 function Is_Overloaded
8023 (N : Node_Id) return Boolean; -- Flag5
8024
8025 function Is_Power_Of_2_For_Shift
8026 (N : Node_Id) return Boolean; -- Flag13
8027
8028 function Is_Protected_Subprogram_Body
8029 (N : Node_Id) return Boolean; -- Flag7
8030
8031 function Is_Static_Coextension
8032 (N : Node_Id) return Boolean; -- Flag14
8033
8034 function Is_Static_Expression
8035 (N : Node_Id) return Boolean; -- Flag6
8036
8037 function Is_Subprogram_Descriptor
8038 (N : Node_Id) return Boolean; -- Flag16
8039
8040 function Is_Task_Allocation_Block
8041 (N : Node_Id) return Boolean; -- Flag6
8042
8043 function Is_Task_Master
8044 (N : Node_Id) return Boolean; -- Flag5
8045
8046 function Iteration_Scheme
8047 (N : Node_Id) return Node_Id; -- Node2
8048
8049 function Itype
8050 (N : Node_Id) return Entity_Id; -- Node1
8051
8052 function Kill_Range_Check
8053 (N : Node_Id) return Boolean; -- Flag11
8054
8055 function Label_Construct
8056 (N : Node_Id) return Node_Id; -- Node2
8057
8058 function Left_Opnd
8059 (N : Node_Id) return Node_Id; -- Node2
8060
8061 function Last_Bit
8062 (N : Node_Id) return Node_Id; -- Node4
8063
8064 function Last_Name
8065 (N : Node_Id) return Boolean; -- Flag6
8066
8067 function Library_Unit
8068 (N : Node_Id) return Node_Id; -- Node4
8069
8070 function Limited_View_Installed
8071 (N : Node_Id) return Boolean; -- Flag18
8072
8073 function Limited_Present
8074 (N : Node_Id) return Boolean; -- Flag17
8075
8076 function Literals
8077 (N : Node_Id) return List_Id; -- List1
8078
8079 function Local_Raise_Not_OK
8080 (N : Node_Id) return Boolean; -- Flag7
8081
8082 function Local_Raise_Statements
8083 (N : Node_Id) return Elist_Id; -- Elist1
8084
8085 function Loop_Actions
8086 (N : Node_Id) return List_Id; -- List2
8087
8088 function Loop_Parameter_Specification
8089 (N : Node_Id) return Node_Id; -- Node4
8090
8091 function Low_Bound
8092 (N : Node_Id) return Node_Id; -- Node1
8093
8094 function Mod_Clause
8095 (N : Node_Id) return Node_Id; -- Node2
8096
8097 function More_Ids
8098 (N : Node_Id) return Boolean; -- Flag5
8099
8100 function Must_Be_Byte_Aligned
8101 (N : Node_Id) return Boolean; -- Flag14
8102
8103 function Must_Not_Freeze
8104 (N : Node_Id) return Boolean; -- Flag8
8105
8106 function Must_Not_Override
8107 (N : Node_Id) return Boolean; -- Flag15
8108
8109 function Must_Override
8110 (N : Node_Id) return Boolean; -- Flag14
8111
8112 function Name
8113 (N : Node_Id) return Node_Id; -- Node2
8114
8115 function Names
8116 (N : Node_Id) return List_Id; -- List2
8117
8118 function Next_Entity
8119 (N : Node_Id) return Node_Id; -- Node2
8120
8121 function Next_Implicit_With
8122 (N : Node_Id) return Node_Id; -- Node3
8123
8124 function Next_Named_Actual
8125 (N : Node_Id) return Node_Id; -- Node4
8126
8127 function Next_Pragma
8128 (N : Node_Id) return Node_Id; -- Node1
8129
8130 function Next_Rep_Item
8131 (N : Node_Id) return Node_Id; -- Node5
8132
8133 function Next_Use_Clause
8134 (N : Node_Id) return Node_Id; -- Node3
8135
8136 function No_Ctrl_Actions
8137 (N : Node_Id) return Boolean; -- Flag7
8138
8139 function No_Elaboration_Check
8140 (N : Node_Id) return Boolean; -- Flag14
8141
8142 function No_Entities_Ref_In_Spec
8143 (N : Node_Id) return Boolean; -- Flag8
8144
8145 function No_Initialization
8146 (N : Node_Id) return Boolean; -- Flag13
8147
8148 function No_Truncation
8149 (N : Node_Id) return Boolean; -- Flag17
8150
8151 function Null_Present
8152 (N : Node_Id) return Boolean; -- Flag13
8153
8154 function Null_Exclusion_Present
8155 (N : Node_Id) return Boolean; -- Flag11
8156
8157 function Null_Exclusion_In_Return_Present
8158 (N : Node_Id) return Boolean; -- Flag14
8159
8160 function Null_Record_Present
8161 (N : Node_Id) return Boolean; -- Flag17
8162
8163 function Object_Definition
8164 (N : Node_Id) return Node_Id; -- Node4
8165
8166 function Original_Discriminant
8167 (N : Node_Id) return Node_Id; -- Node2
8168
8169 function Original_Entity
8170 (N : Node_Id) return Entity_Id; -- Node2
8171
8172 function Others_Discrete_Choices
8173 (N : Node_Id) return List_Id; -- List1
8174
8175 function Out_Present
8176 (N : Node_Id) return Boolean; -- Flag17
8177
8178 function Parameter_Associations
8179 (N : Node_Id) return List_Id; -- List3
8180
8181 function Parameter_List_Truncated
8182 (N : Node_Id) return Boolean; -- Flag17
8183
8184 function Parameter_Specifications
8185 (N : Node_Id) return List_Id; -- List3
8186
8187 function Parameter_Type
8188 (N : Node_Id) return Node_Id; -- Node2
8189
8190 function Parent_Spec
8191 (N : Node_Id) return Node_Id; -- Node4
8192
8193 function PPC_Enabled
8194 (N : Node_Id) return Boolean; -- Flag5
8195
8196 function Position
8197 (N : Node_Id) return Node_Id; -- Node2
8198
8199 function Pragma_Argument_Associations
8200 (N : Node_Id) return List_Id; -- List2
8201
8202 function Pragma_Identifier
8203 (N : Node_Id) return Node_Id; -- Node4
8204
8205 function Pragmas_After
8206 (N : Node_Id) return List_Id; -- List5
8207
8208 function Pragmas_Before
8209 (N : Node_Id) return List_Id; -- List4
8210
8211 function Prefix
8212 (N : Node_Id) return Node_Id; -- Node3
8213
8214 function Present_Expr
8215 (N : Node_Id) return Uint; -- Uint3
8216
8217 function Prev_Ids
8218 (N : Node_Id) return Boolean; -- Flag6
8219
8220 function Print_In_Hex
8221 (N : Node_Id) return Boolean; -- Flag13
8222
8223 function Private_Declarations
8224 (N : Node_Id) return List_Id; -- List3
8225
8226 function Private_Present
8227 (N : Node_Id) return Boolean; -- Flag15
8228
8229 function Procedure_To_Call
8230 (N : Node_Id) return Node_Id; -- Node2
8231
8232 function Proper_Body
8233 (N : Node_Id) return Node_Id; -- Node1
8234
8235 function Protected_Definition
8236 (N : Node_Id) return Node_Id; -- Node3
8237
8238 function Protected_Present
8239 (N : Node_Id) return Boolean; -- Flag6
8240
8241 function Raises_Constraint_Error
8242 (N : Node_Id) return Boolean; -- Flag7
8243
8244 function Range_Constraint
8245 (N : Node_Id) return Node_Id; -- Node4
8246
8247 function Range_Expression
8248 (N : Node_Id) return Node_Id; -- Node4
8249
8250 function Real_Range_Specification
8251 (N : Node_Id) return Node_Id; -- Node4
8252
8253 function Realval
8254 (N : Node_Id) return Ureal; -- Ureal3
8255
8256 function Reason
8257 (N : Node_Id) return Uint; -- Uint3
8258
8259 function Record_Extension_Part
8260 (N : Node_Id) return Node_Id; -- Node3
8261
8262 function Redundant_Use
8263 (N : Node_Id) return Boolean; -- Flag13
8264
8265 function Renaming_Exception
8266 (N : Node_Id) return Node_Id; -- Node2
8267
8268 function Result_Definition
8269 (N : Node_Id) return Node_Id; -- Node4
8270
8271 function Return_Object_Declarations
8272 (N : Node_Id) return List_Id; -- List3
8273
8274 function Return_Statement_Entity
8275 (N : Node_Id) return Node_Id; -- Node5
8276
8277 function Reverse_Present
8278 (N : Node_Id) return Boolean; -- Flag15
8279
8280 function Right_Opnd
8281 (N : Node_Id) return Node_Id; -- Node3
8282
8283 function Rounded_Result
8284 (N : Node_Id) return Boolean; -- Flag18
8285
8286 function Scope
8287 (N : Node_Id) return Node_Id; -- Node3
8288
8289 function Select_Alternatives
8290 (N : Node_Id) return List_Id; -- List1
8291
8292 function Selector_Name
8293 (N : Node_Id) return Node_Id; -- Node2
8294
8295 function Selector_Names
8296 (N : Node_Id) return List_Id; -- List1
8297
8298 function Shift_Count_OK
8299 (N : Node_Id) return Boolean; -- Flag4
8300
8301 function Source_Type
8302 (N : Node_Id) return Entity_Id; -- Node1
8303
8304 function Specification
8305 (N : Node_Id) return Node_Id; -- Node1
8306
8307 function Statements
8308 (N : Node_Id) return List_Id; -- List3
8309
8310 function Static_Processing_OK
8311 (N : Node_Id) return Boolean; -- Flag4
8312
8313 function Storage_Pool
8314 (N : Node_Id) return Node_Id; -- Node1
8315
8316 function Strval
8317 (N : Node_Id) return String_Id; -- Str3
8318
8319 function Subtype_Indication
8320 (N : Node_Id) return Node_Id; -- Node5
8321
8322 function Subtype_Mark
8323 (N : Node_Id) return Node_Id; -- Node4
8324
8325 function Subtype_Marks
8326 (N : Node_Id) return List_Id; -- List2
8327
8328 function Suppress_Loop_Warnings
8329 (N : Node_Id) return Boolean; -- Flag17
8330
8331 function Synchronized_Present
8332 (N : Node_Id) return Boolean; -- Flag7
8333
8334 function Tagged_Present
8335 (N : Node_Id) return Boolean; -- Flag15
8336
8337 function Target_Type
8338 (N : Node_Id) return Entity_Id; -- Node2
8339
8340 function Task_Definition
8341 (N : Node_Id) return Node_Id; -- Node3
8342
8343 function Task_Present
8344 (N : Node_Id) return Boolean; -- Flag5
8345
8346 function Then_Actions
8347 (N : Node_Id) return List_Id; -- List2
8348
8349 function Then_Statements
8350 (N : Node_Id) return List_Id; -- List2
8351
8352 function Treat_Fixed_As_Integer
8353 (N : Node_Id) return Boolean; -- Flag14
8354
8355 function Triggering_Alternative
8356 (N : Node_Id) return Node_Id; -- Node1
8357
8358 function Triggering_Statement
8359 (N : Node_Id) return Node_Id; -- Node1
8360
8361 function TSS_Elist
8362 (N : Node_Id) return Elist_Id; -- Elist3
8363
8364 function Type_Definition
8365 (N : Node_Id) return Node_Id; -- Node3
8366
8367 function Unit
8368 (N : Node_Id) return Node_Id; -- Node2
8369
8370 function Unknown_Discriminants_Present
8371 (N : Node_Id) return Boolean; -- Flag13
8372
8373 function Unreferenced_In_Spec
8374 (N : Node_Id) return Boolean; -- Flag7
8375
8376 function Variant_Part
8377 (N : Node_Id) return Node_Id; -- Node4
8378
8379 function Variants
8380 (N : Node_Id) return List_Id; -- List1
8381
8382 function Visible_Declarations
8383 (N : Node_Id) return List_Id; -- List2
8384
8385 function Was_Originally_Stub
8386 (N : Node_Id) return Boolean; -- Flag13
8387
8388 function Zero_Cost_Handling
8389 (N : Node_Id) return Boolean; -- Flag5
8390
8391 -- End functions (note used by xsinfo utility program to end processing)
8392
8393 ----------------------------
8394 -- Node Update Procedures --
8395 ----------------------------
8396
8397 -- These are the corresponding node update routines, which again provide
8398 -- a high level logical access with type checking. In addition to setting
8399 -- the indicated field of the node N to the given Val, in the case of
8400 -- tree pointers (List1-4), the parent pointer of the Val node is set to
8401 -- point back to node N. This automates the setting of the parent pointer.
8402
8403 procedure Set_ABE_Is_Certain
8404 (N : Node_Id; Val : Boolean := True); -- Flag18
8405
8406 procedure Set_Abort_Present
8407 (N : Node_Id; Val : Boolean := True); -- Flag15
8408
8409 procedure Set_Abortable_Part
8410 (N : Node_Id; Val : Node_Id); -- Node2
8411
8412 procedure Set_Abstract_Present
8413 (N : Node_Id; Val : Boolean := True); -- Flag4
8414
8415 procedure Set_Accept_Handler_Records
8416 (N : Node_Id; Val : List_Id); -- List5
8417
8418 procedure Set_Accept_Statement
8419 (N : Node_Id; Val : Node_Id); -- Node2
8420
8421 procedure Set_Access_Definition
8422 (N : Node_Id; Val : Node_Id); -- Node3
8423
8424 procedure Set_Access_To_Subprogram_Definition
8425 (N : Node_Id; Val : Node_Id); -- Node3
8426
8427 procedure Set_Access_Types_To_Process
8428 (N : Node_Id; Val : Elist_Id); -- Elist2
8429
8430 procedure Set_Actions
8431 (N : Node_Id; Val : List_Id); -- List1
8432
8433 procedure Set_Activation_Chain_Entity
8434 (N : Node_Id; Val : Node_Id); -- Node3
8435
8436 procedure Set_Acts_As_Spec
8437 (N : Node_Id; Val : Boolean := True); -- Flag4
8438
8439 procedure Set_Actual_Designated_Subtype
8440 (N : Node_Id; Val : Node_Id); -- Node4
8441
8442 procedure Set_Address_Warning_Posted
8443 (N : Node_Id; Val : Boolean := True); -- Flag18
8444
8445 procedure Set_Aggregate_Bounds
8446 (N : Node_Id; Val : Node_Id); -- Node3
8447
8448 procedure Set_Aliased_Present
8449 (N : Node_Id; Val : Boolean := True); -- Flag4
8450
8451 procedure Set_All_Others
8452 (N : Node_Id; Val : Boolean := True); -- Flag11
8453
8454 procedure Set_All_Present
8455 (N : Node_Id; Val : Boolean := True); -- Flag15
8456
8457 procedure Set_Alternatives
8458 (N : Node_Id; Val : List_Id); -- List4
8459
8460 procedure Set_Ancestor_Part
8461 (N : Node_Id; Val : Node_Id); -- Node3
8462
8463 procedure Set_Array_Aggregate
8464 (N : Node_Id; Val : Node_Id); -- Node3
8465
8466 procedure Set_Assignment_OK
8467 (N : Node_Id; Val : Boolean := True); -- Flag15
8468
8469 procedure Set_Associated_Node
8470 (N : Node_Id; Val : Node_Id); -- Node4
8471
8472 procedure Set_Attribute_Name
8473 (N : Node_Id; Val : Name_Id); -- Name2
8474
8475 procedure Set_At_End_Proc
8476 (N : Node_Id; Val : Node_Id); -- Node1
8477
8478 procedure Set_Aux_Decls_Node
8479 (N : Node_Id; Val : Node_Id); -- Node5
8480
8481 procedure Set_Backwards_OK
8482 (N : Node_Id; Val : Boolean := True); -- Flag6
8483
8484 procedure Set_Bad_Is_Detected
8485 (N : Node_Id; Val : Boolean := True); -- Flag15
8486
8487 procedure Set_Body_Required
8488 (N : Node_Id; Val : Boolean := True); -- Flag13
8489
8490 procedure Set_Body_To_Inline
8491 (N : Node_Id; Val : Node_Id); -- Node3
8492
8493 procedure Set_Box_Present
8494 (N : Node_Id; Val : Boolean := True); -- Flag15
8495
8496 procedure Set_By_Ref
8497 (N : Node_Id; Val : Boolean := True); -- Flag5
8498
8499 procedure Set_Char_Literal_Value
8500 (N : Node_Id; Val : Uint); -- Uint2
8501
8502 procedure Set_Chars
8503 (N : Node_Id; Val : Name_Id); -- Name1
8504
8505 procedure Set_Check_Address_Alignment
8506 (N : Node_Id; Val : Boolean := True); -- Flag11
8507
8508 procedure Set_Choice_Parameter
8509 (N : Node_Id; Val : Node_Id); -- Node2
8510
8511 procedure Set_Coextensions
8512 (N : Node_Id; Val : Elist_Id); -- Elist4
8513
8514 procedure Set_Choices
8515 (N : Node_Id; Val : List_Id); -- List1
8516
8517 procedure Set_Comes_From_Extended_Return_Statement
8518 (N : Node_Id; Val : Boolean := True); -- Flag18
8519
8520 procedure Set_Compile_Time_Known_Aggregate
8521 (N : Node_Id; Val : Boolean := True); -- Flag18
8522
8523 procedure Set_Component_Associations
8524 (N : Node_Id; Val : List_Id); -- List2
8525
8526 procedure Set_Component_Clauses
8527 (N : Node_Id; Val : List_Id); -- List3
8528
8529 procedure Set_Component_Definition
8530 (N : Node_Id; Val : Node_Id); -- Node4
8531
8532 procedure Set_Component_Items
8533 (N : Node_Id; Val : List_Id); -- List3
8534
8535 procedure Set_Component_List
8536 (N : Node_Id; Val : Node_Id); -- Node1
8537
8538 procedure Set_Component_Name
8539 (N : Node_Id; Val : Node_Id); -- Node1
8540
8541 procedure Set_Condition
8542 (N : Node_Id; Val : Node_Id); -- Node1
8543
8544 procedure Set_Condition_Actions
8545 (N : Node_Id; Val : List_Id); -- List3
8546
8547 procedure Set_Config_Pragmas
8548 (N : Node_Id; Val : List_Id); -- List4
8549
8550 procedure Set_Constant_Present
8551 (N : Node_Id; Val : Boolean := True); -- Flag17
8552
8553 procedure Set_Constraint
8554 (N : Node_Id; Val : Node_Id); -- Node3
8555
8556 procedure Set_Constraints
8557 (N : Node_Id; Val : List_Id); -- List1
8558
8559 procedure Set_Context_Installed
8560 (N : Node_Id; Val : Boolean := True); -- Flag13
8561
8562 procedure Set_Context_Items
8563 (N : Node_Id; Val : List_Id); -- List1
8564
8565 procedure Set_Controlling_Argument
8566 (N : Node_Id; Val : Node_Id); -- Node1
8567
8568 procedure Set_Conversion_OK
8569 (N : Node_Id; Val : Boolean := True); -- Flag14
8570
8571 procedure Set_Corresponding_Body
8572 (N : Node_Id; Val : Node_Id); -- Node5
8573
8574 procedure Set_Corresponding_Formal_Spec
8575 (N : Node_Id; Val : Node_Id); -- Node3
8576
8577 procedure Set_Corresponding_Generic_Association
8578 (N : Node_Id; Val : Node_Id); -- Node5
8579
8580 procedure Set_Corresponding_Integer_Value
8581 (N : Node_Id; Val : Uint); -- Uint4
8582
8583 procedure Set_Corresponding_Spec
8584 (N : Node_Id; Val : Node_Id); -- Node5
8585
8586 procedure Set_Corresponding_Stub
8587 (N : Node_Id; Val : Node_Id); -- Node3
8588
8589 procedure Set_Dcheck_Function
8590 (N : Node_Id; Val : Entity_Id); -- Node5
8591
8592 procedure Set_Debug_Statement
8593 (N : Node_Id; Val : Node_Id); -- Node3
8594
8595 procedure Set_Declarations
8596 (N : Node_Id; Val : List_Id); -- List2
8597
8598 procedure Set_Default_Expression
8599 (N : Node_Id; Val : Node_Id); -- Node5
8600
8601 procedure Set_Default_Name
8602 (N : Node_Id; Val : Node_Id); -- Node2
8603
8604 procedure Set_Defining_Identifier
8605 (N : Node_Id; Val : Entity_Id); -- Node1
8606
8607 procedure Set_Defining_Unit_Name
8608 (N : Node_Id; Val : Node_Id); -- Node1
8609
8610 procedure Set_Delay_Alternative
8611 (N : Node_Id; Val : Node_Id); -- Node4
8612
8613 procedure Set_Delay_Statement
8614 (N : Node_Id; Val : Node_Id); -- Node2
8615
8616 procedure Set_Delta_Expression
8617 (N : Node_Id; Val : Node_Id); -- Node3
8618
8619 procedure Set_Digits_Expression
8620 (N : Node_Id; Val : Node_Id); -- Node2
8621
8622 procedure Set_Discr_Check_Funcs_Built
8623 (N : Node_Id; Val : Boolean := True); -- Flag11
8624
8625 procedure Set_Discrete_Choices
8626 (N : Node_Id; Val : List_Id); -- List4
8627
8628 procedure Set_Discrete_Range
8629 (N : Node_Id; Val : Node_Id); -- Node4
8630
8631 procedure Set_Discrete_Subtype_Definition
8632 (N : Node_Id; Val : Node_Id); -- Node4
8633
8634 procedure Set_Discrete_Subtype_Definitions
8635 (N : Node_Id; Val : List_Id); -- List2
8636
8637 procedure Set_Discriminant_Specifications
8638 (N : Node_Id; Val : List_Id); -- List4
8639
8640 procedure Set_Discriminant_Type
8641 (N : Node_Id; Val : Node_Id); -- Node5
8642
8643 procedure Set_Do_Accessibility_Check
8644 (N : Node_Id; Val : Boolean := True); -- Flag13
8645
8646 procedure Set_Do_Discriminant_Check
8647 (N : Node_Id; Val : Boolean := True); -- Flag13
8648
8649 procedure Set_Do_Division_Check
8650 (N : Node_Id; Val : Boolean := True); -- Flag13
8651
8652 procedure Set_Do_Length_Check
8653 (N : Node_Id; Val : Boolean := True); -- Flag4
8654
8655 procedure Set_Do_Overflow_Check
8656 (N : Node_Id; Val : Boolean := True); -- Flag17
8657
8658 procedure Set_Do_Range_Check
8659 (N : Node_Id; Val : Boolean := True); -- Flag9
8660
8661 procedure Set_Do_Storage_Check
8662 (N : Node_Id; Val : Boolean := True); -- Flag17
8663
8664 procedure Set_Do_Tag_Check
8665 (N : Node_Id; Val : Boolean := True); -- Flag13
8666
8667 procedure Set_Elaborate_All_Desirable
8668 (N : Node_Id; Val : Boolean := True); -- Flag9
8669
8670 procedure Set_Elaborate_All_Present
8671 (N : Node_Id; Val : Boolean := True); -- Flag14
8672
8673 procedure Set_Elaborate_Desirable
8674 (N : Node_Id; Val : Boolean := True); -- Flag11
8675
8676 procedure Set_Elaborate_Present
8677 (N : Node_Id; Val : Boolean := True); -- Flag4
8678
8679 procedure Set_Elaboration_Boolean
8680 (N : Node_Id; Val : Node_Id); -- Node2
8681
8682 procedure Set_Else_Actions
8683 (N : Node_Id; Val : List_Id); -- List3
8684
8685 procedure Set_Else_Statements
8686 (N : Node_Id; Val : List_Id); -- List4
8687
8688 procedure Set_Elsif_Parts
8689 (N : Node_Id; Val : List_Id); -- List3
8690
8691 procedure Set_Enclosing_Variant
8692 (N : Node_Id; Val : Node_Id); -- Node2
8693
8694 procedure Set_End_Label
8695 (N : Node_Id; Val : Node_Id); -- Node4
8696
8697 procedure Set_End_Span
8698 (N : Node_Id; Val : Uint); -- Uint5
8699
8700 procedure Set_Entity
8701 (N : Node_Id; Val : Node_Id); -- Node4
8702
8703 procedure Set_Entry_Body_Formal_Part
8704 (N : Node_Id; Val : Node_Id); -- Node5
8705
8706 procedure Set_Entry_Call_Alternative
8707 (N : Node_Id; Val : Node_Id); -- Node1
8708
8709 procedure Set_Entry_Call_Statement
8710 (N : Node_Id; Val : Node_Id); -- Node1
8711
8712 procedure Set_Entry_Direct_Name
8713 (N : Node_Id; Val : Node_Id); -- Node1
8714
8715 procedure Set_Entry_Index
8716 (N : Node_Id; Val : Node_Id); -- Node5
8717
8718 procedure Set_Entry_Index_Specification
8719 (N : Node_Id; Val : Node_Id); -- Node4
8720
8721 procedure Set_Etype
8722 (N : Node_Id; Val : Node_Id); -- Node5
8723
8724 procedure Set_Exception_Choices
8725 (N : Node_Id; Val : List_Id); -- List4
8726
8727 procedure Set_Exception_Handlers
8728 (N : Node_Id; Val : List_Id); -- List5
8729
8730 procedure Set_Exception_Junk
8731 (N : Node_Id; Val : Boolean := True); -- Flag8
8732
8733 procedure Set_Exception_Label
8734 (N : Node_Id; Val : Node_Id); -- Node5
8735
8736 procedure Set_Expansion_Delayed
8737 (N : Node_Id; Val : Boolean := True); -- Flag11
8738
8739 procedure Set_Explicit_Actual_Parameter
8740 (N : Node_Id; Val : Node_Id); -- Node3
8741
8742 procedure Set_Explicit_Generic_Actual_Parameter
8743 (N : Node_Id; Val : Node_Id); -- Node1
8744
8745 procedure Set_Expression
8746 (N : Node_Id; Val : Node_Id); -- Node3
8747
8748 procedure Set_Expressions
8749 (N : Node_Id; Val : List_Id); -- List1
8750
8751 procedure Set_First_Bit
8752 (N : Node_Id; Val : Node_Id); -- Node3
8753
8754 procedure Set_First_Inlined_Subprogram
8755 (N : Node_Id; Val : Entity_Id); -- Node3
8756
8757 procedure Set_First_Name
8758 (N : Node_Id; Val : Boolean := True); -- Flag5
8759
8760 procedure Set_First_Named_Actual
8761 (N : Node_Id; Val : Node_Id); -- Node4
8762
8763 procedure Set_First_Real_Statement
8764 (N : Node_Id; Val : Node_Id); -- Node2
8765
8766 procedure Set_First_Subtype_Link
8767 (N : Node_Id; Val : Entity_Id); -- Node5
8768
8769 procedure Set_Float_Truncate
8770 (N : Node_Id; Val : Boolean := True); -- Flag11
8771
8772 procedure Set_Formal_Type_Definition
8773 (N : Node_Id; Val : Node_Id); -- Node3
8774
8775 procedure Set_Forwards_OK
8776 (N : Node_Id; Val : Boolean := True); -- Flag5
8777
8778 procedure Set_From_At_Mod
8779 (N : Node_Id; Val : Boolean := True); -- Flag4
8780
8781 procedure Set_From_At_End
8782 (N : Node_Id; Val : Boolean := True); -- Flag4
8783
8784 procedure Set_From_Default
8785 (N : Node_Id; Val : Boolean := True); -- Flag6
8786
8787 procedure Set_Generic_Associations
8788 (N : Node_Id; Val : List_Id); -- List3
8789
8790 procedure Set_Generic_Formal_Declarations
8791 (N : Node_Id; Val : List_Id); -- List2
8792
8793 procedure Set_Generic_Parent
8794 (N : Node_Id; Val : Node_Id); -- Node5
8795
8796 procedure Set_Generic_Parent_Type
8797 (N : Node_Id; Val : Node_Id); -- Node4
8798
8799 procedure Set_Handled_Statement_Sequence
8800 (N : Node_Id; Val : Node_Id); -- Node4
8801
8802 procedure Set_Handler_List_Entry
8803 (N : Node_Id; Val : Node_Id); -- Node2
8804
8805 procedure Set_Has_Created_Identifier
8806 (N : Node_Id; Val : Boolean := True); -- Flag15
8807
8808 procedure Set_Has_Dynamic_Length_Check
8809 (N : Node_Id; Val : Boolean := True); -- Flag10
8810
8811 procedure Set_Has_Dynamic_Range_Check
8812 (N : Node_Id; Val : Boolean := True); -- Flag12
8813
8814 procedure Set_Has_Init_Expression
8815 (N : Node_Id; Val : Boolean := True); -- Flag14
8816
8817 procedure Set_Has_Local_Raise
8818 (N : Node_Id; Val : Boolean := True); -- Flag8
8819
8820 procedure Set_Has_No_Elaboration_Code
8821 (N : Node_Id; Val : Boolean := True); -- Flag17
8822
8823 procedure Set_Has_Priority_Pragma
8824 (N : Node_Id; Val : Boolean := True); -- Flag6
8825
8826 procedure Set_Has_Private_View
8827 (N : Node_Id; Val : Boolean := True); -- Flag11
8828
8829 procedure Set_Has_Relative_Deadline_Pragma
8830 (N : Node_Id; Val : Boolean := True); -- Flag9
8831
8832 procedure Set_Has_Self_Reference
8833 (N : Node_Id; Val : Boolean := True); -- Flag13
8834
8835 procedure Set_Has_Storage_Size_Pragma
8836 (N : Node_Id; Val : Boolean := True); -- Flag5
8837
8838 procedure Set_Has_Task_Info_Pragma
8839 (N : Node_Id; Val : Boolean := True); -- Flag7
8840
8841 procedure Set_Has_Task_Name_Pragma
8842 (N : Node_Id; Val : Boolean := True); -- Flag8
8843
8844 procedure Set_Has_Wide_Character
8845 (N : Node_Id; Val : Boolean := True); -- Flag11
8846
8847 procedure Set_Hidden_By_Use_Clause
8848 (N : Node_Id; Val : Elist_Id); -- Elist4
8849
8850 procedure Set_High_Bound
8851 (N : Node_Id; Val : Node_Id); -- Node2
8852
8853 procedure Set_Identifier
8854 (N : Node_Id; Val : Node_Id); -- Node1
8855
8856 procedure Set_Interface_List
8857 (N : Node_Id; Val : List_Id); -- List2
8858
8859 procedure Set_Interface_Present
8860 (N : Node_Id; Val : Boolean := True); -- Flag16
8861
8862 procedure Set_Implicit_With
8863 (N : Node_Id; Val : Boolean := True); -- Flag16
8864
8865 procedure Set_In_Present
8866 (N : Node_Id; Val : Boolean := True); -- Flag15
8867
8868 procedure Set_Includes_Infinities
8869 (N : Node_Id; Val : Boolean := True); -- Flag11
8870
8871 procedure Set_Instance_Spec
8872 (N : Node_Id; Val : Node_Id); -- Node5
8873
8874 procedure Set_Intval
8875 (N : Node_Id; Val : Uint); -- Uint3
8876
8877 procedure Set_Is_Asynchronous_Call_Block
8878 (N : Node_Id; Val : Boolean := True); -- Flag7
8879
8880 procedure Set_Is_Component_Left_Opnd
8881 (N : Node_Id; Val : Boolean := True); -- Flag13
8882
8883 procedure Set_Is_Component_Right_Opnd
8884 (N : Node_Id; Val : Boolean := True); -- Flag14
8885
8886 procedure Set_Is_Controlling_Actual
8887 (N : Node_Id; Val : Boolean := True); -- Flag16
8888
8889 procedure Set_Is_Dynamic_Coextension
8890 (N : Node_Id; Val : Boolean := True); -- Flag18
8891
8892 procedure Set_Is_Elsif
8893 (N : Node_Id; Val : Boolean := True); -- Flag13
8894
8895 procedure Set_Is_Entry_Barrier_Function
8896 (N : Node_Id; Val : Boolean := True); -- Flag8
8897
8898 procedure Set_Is_Expanded_Build_In_Place_Call
8899 (N : Node_Id; Val : Boolean := True); -- Flag11
8900
8901 procedure Set_Is_Folded_In_Parser
8902 (N : Node_Id; Val : Boolean := True); -- Flag4
8903
8904 procedure Set_Is_In_Discriminant_Check
8905 (N : Node_Id; Val : Boolean := True); -- Flag11
8906
8907 procedure Set_Is_Machine_Number
8908 (N : Node_Id; Val : Boolean := True); -- Flag11
8909
8910 procedure Set_Is_Null_Loop
8911 (N : Node_Id; Val : Boolean := True); -- Flag16
8912
8913 procedure Set_Is_Overloaded
8914 (N : Node_Id; Val : Boolean := True); -- Flag5
8915
8916 procedure Set_Is_Power_Of_2_For_Shift
8917 (N : Node_Id; Val : Boolean := True); -- Flag13
8918
8919 procedure Set_Is_Protected_Subprogram_Body
8920 (N : Node_Id; Val : Boolean := True); -- Flag7
8921
8922 procedure Set_Is_Static_Coextension
8923 (N : Node_Id; Val : Boolean := True); -- Flag14
8924
8925 procedure Set_Is_Static_Expression
8926 (N : Node_Id; Val : Boolean := True); -- Flag6
8927
8928 procedure Set_Is_Subprogram_Descriptor
8929 (N : Node_Id; Val : Boolean := True); -- Flag16
8930
8931 procedure Set_Is_Task_Allocation_Block
8932 (N : Node_Id; Val : Boolean := True); -- Flag6
8933
8934 procedure Set_Is_Task_Master
8935 (N : Node_Id; Val : Boolean := True); -- Flag5
8936
8937 procedure Set_Iteration_Scheme
8938 (N : Node_Id; Val : Node_Id); -- Node2
8939
8940 procedure Set_Itype
8941 (N : Node_Id; Val : Entity_Id); -- Node1
8942
8943 procedure Set_Kill_Range_Check
8944 (N : Node_Id; Val : Boolean := True); -- Flag11
8945
8946 procedure Set_Last_Bit
8947 (N : Node_Id; Val : Node_Id); -- Node4
8948
8949 procedure Set_Last_Name
8950 (N : Node_Id; Val : Boolean := True); -- Flag6
8951
8952 procedure Set_Library_Unit
8953 (N : Node_Id; Val : Node_Id); -- Node4
8954
8955 procedure Set_Label_Construct
8956 (N : Node_Id; Val : Node_Id); -- Node2
8957
8958 procedure Set_Left_Opnd
8959 (N : Node_Id; Val : Node_Id); -- Node2
8960
8961 procedure Set_Limited_View_Installed
8962 (N : Node_Id; Val : Boolean := True); -- Flag18
8963
8964 procedure Set_Limited_Present
8965 (N : Node_Id; Val : Boolean := True); -- Flag17
8966
8967 procedure Set_Literals
8968 (N : Node_Id; Val : List_Id); -- List1
8969
8970 procedure Set_Local_Raise_Not_OK
8971 (N : Node_Id; Val : Boolean := True); -- Flag7
8972
8973 procedure Set_Local_Raise_Statements
8974 (N : Node_Id; Val : Elist_Id); -- Elist1
8975
8976 procedure Set_Loop_Actions
8977 (N : Node_Id; Val : List_Id); -- List2
8978
8979 procedure Set_Loop_Parameter_Specification
8980 (N : Node_Id; Val : Node_Id); -- Node4
8981
8982 procedure Set_Low_Bound
8983 (N : Node_Id; Val : Node_Id); -- Node1
8984
8985 procedure Set_Mod_Clause
8986 (N : Node_Id; Val : Node_Id); -- Node2
8987
8988 procedure Set_More_Ids
8989 (N : Node_Id; Val : Boolean := True); -- Flag5
8990
8991 procedure Set_Must_Be_Byte_Aligned
8992 (N : Node_Id; Val : Boolean := True); -- Flag14
8993
8994 procedure Set_Must_Not_Freeze
8995 (N : Node_Id; Val : Boolean := True); -- Flag8
8996
8997 procedure Set_Must_Not_Override
8998 (N : Node_Id; Val : Boolean := True); -- Flag15
8999
9000 procedure Set_Must_Override
9001 (N : Node_Id; Val : Boolean := True); -- Flag14
9002
9003 procedure Set_Name
9004 (N : Node_Id; Val : Node_Id); -- Node2
9005
9006 procedure Set_Names
9007 (N : Node_Id; Val : List_Id); -- List2
9008
9009 procedure Set_Next_Entity
9010 (N : Node_Id; Val : Node_Id); -- Node2
9011
9012 procedure Set_Next_Implicit_With
9013 (N : Node_Id; Val : Node_Id); -- Node3
9014
9015 procedure Set_Next_Named_Actual
9016 (N : Node_Id; Val : Node_Id); -- Node4
9017
9018 procedure Set_Next_Pragma
9019 (N : Node_Id; Val : Node_Id); -- Node1
9020
9021 procedure Set_Next_Rep_Item
9022 (N : Node_Id; Val : Node_Id); -- Node5
9023
9024 procedure Set_Next_Use_Clause
9025 (N : Node_Id; Val : Node_Id); -- Node3
9026
9027 procedure Set_No_Ctrl_Actions
9028 (N : Node_Id; Val : Boolean := True); -- Flag7
9029
9030 procedure Set_No_Elaboration_Check
9031 (N : Node_Id; Val : Boolean := True); -- Flag14
9032
9033 procedure Set_No_Entities_Ref_In_Spec
9034 (N : Node_Id; Val : Boolean := True); -- Flag8
9035
9036 procedure Set_No_Initialization
9037 (N : Node_Id; Val : Boolean := True); -- Flag13
9038
9039 procedure Set_No_Truncation
9040 (N : Node_Id; Val : Boolean := True); -- Flag17
9041
9042 procedure Set_Null_Present
9043 (N : Node_Id; Val : Boolean := True); -- Flag13
9044
9045 procedure Set_Null_Exclusion_Present
9046 (N : Node_Id; Val : Boolean := True); -- Flag11
9047
9048 procedure Set_Null_Exclusion_In_Return_Present
9049 (N : Node_Id; Val : Boolean := True); -- Flag14
9050
9051 procedure Set_Null_Record_Present
9052 (N : Node_Id; Val : Boolean := True); -- Flag17
9053
9054 procedure Set_Object_Definition
9055 (N : Node_Id; Val : Node_Id); -- Node4
9056
9057 procedure Set_Original_Discriminant
9058 (N : Node_Id; Val : Node_Id); -- Node2
9059
9060 procedure Set_Original_Entity
9061 (N : Node_Id; Val : Entity_Id); -- Node2
9062
9063 procedure Set_Others_Discrete_Choices
9064 (N : Node_Id; Val : List_Id); -- List1
9065
9066 procedure Set_Out_Present
9067 (N : Node_Id; Val : Boolean := True); -- Flag17
9068
9069 procedure Set_Parameter_Associations
9070 (N : Node_Id; Val : List_Id); -- List3
9071
9072 procedure Set_Parameter_List_Truncated
9073 (N : Node_Id; Val : Boolean := True); -- Flag17
9074
9075 procedure Set_Parameter_Specifications
9076 (N : Node_Id; Val : List_Id); -- List3
9077
9078 procedure Set_Parameter_Type
9079 (N : Node_Id; Val : Node_Id); -- Node2
9080
9081 procedure Set_Parent_Spec
9082 (N : Node_Id; Val : Node_Id); -- Node4
9083
9084 procedure Set_PPC_Enabled
9085 (N : Node_Id; Val : Boolean := True); -- Flag5
9086
9087 procedure Set_Position
9088 (N : Node_Id; Val : Node_Id); -- Node2
9089
9090 procedure Set_Pragma_Argument_Associations
9091 (N : Node_Id; Val : List_Id); -- List2
9092
9093 procedure Set_Pragma_Identifier
9094 (N : Node_Id; Val : Node_Id); -- Node4
9095
9096 procedure Set_Pragmas_After
9097 (N : Node_Id; Val : List_Id); -- List5
9098
9099 procedure Set_Pragmas_Before
9100 (N : Node_Id; Val : List_Id); -- List4
9101
9102 procedure Set_Prefix
9103 (N : Node_Id; Val : Node_Id); -- Node3
9104
9105 procedure Set_Present_Expr
9106 (N : Node_Id; Val : Uint); -- Uint3
9107
9108 procedure Set_Prev_Ids
9109 (N : Node_Id; Val : Boolean := True); -- Flag6
9110
9111 procedure Set_Print_In_Hex
9112 (N : Node_Id; Val : Boolean := True); -- Flag13
9113
9114 procedure Set_Private_Declarations
9115 (N : Node_Id; Val : List_Id); -- List3
9116
9117 procedure Set_Private_Present
9118 (N : Node_Id; Val : Boolean := True); -- Flag15
9119
9120 procedure Set_Procedure_To_Call
9121 (N : Node_Id; Val : Node_Id); -- Node2
9122
9123 procedure Set_Proper_Body
9124 (N : Node_Id; Val : Node_Id); -- Node1
9125
9126 procedure Set_Protected_Definition
9127 (N : Node_Id; Val : Node_Id); -- Node3
9128
9129 procedure Set_Protected_Present
9130 (N : Node_Id; Val : Boolean := True); -- Flag6
9131
9132 procedure Set_Raises_Constraint_Error
9133 (N : Node_Id; Val : Boolean := True); -- Flag7
9134
9135 procedure Set_Range_Constraint
9136 (N : Node_Id; Val : Node_Id); -- Node4
9137
9138 procedure Set_Range_Expression
9139 (N : Node_Id; Val : Node_Id); -- Node4
9140
9141 procedure Set_Real_Range_Specification
9142 (N : Node_Id; Val : Node_Id); -- Node4
9143
9144 procedure Set_Realval
9145 (N : Node_Id; Val : Ureal); -- Ureal3
9146
9147 procedure Set_Reason
9148 (N : Node_Id; Val : Uint); -- Uint3
9149
9150 procedure Set_Record_Extension_Part
9151 (N : Node_Id; Val : Node_Id); -- Node3
9152
9153 procedure Set_Redundant_Use
9154 (N : Node_Id; Val : Boolean := True); -- Flag13
9155
9156 procedure Set_Renaming_Exception
9157 (N : Node_Id; Val : Node_Id); -- Node2
9158
9159 procedure Set_Result_Definition
9160 (N : Node_Id; Val : Node_Id); -- Node4
9161
9162 procedure Set_Return_Object_Declarations
9163 (N : Node_Id; Val : List_Id); -- List3
9164
9165 procedure Set_Return_Statement_Entity
9166 (N : Node_Id; Val : Node_Id); -- Node5
9167
9168 procedure Set_Reverse_Present
9169 (N : Node_Id; Val : Boolean := True); -- Flag15
9170
9171 procedure Set_Right_Opnd
9172 (N : Node_Id; Val : Node_Id); -- Node3
9173
9174 procedure Set_Rounded_Result
9175 (N : Node_Id; Val : Boolean := True); -- Flag18
9176
9177 procedure Set_Scope
9178 (N : Node_Id; Val : Node_Id); -- Node3
9179
9180 procedure Set_Select_Alternatives
9181 (N : Node_Id; Val : List_Id); -- List1
9182
9183 procedure Set_Selector_Name
9184 (N : Node_Id; Val : Node_Id); -- Node2
9185
9186 procedure Set_Selector_Names
9187 (N : Node_Id; Val : List_Id); -- List1
9188
9189 procedure Set_Shift_Count_OK
9190 (N : Node_Id; Val : Boolean := True); -- Flag4
9191
9192 procedure Set_Source_Type
9193 (N : Node_Id; Val : Entity_Id); -- Node1
9194
9195 procedure Set_Specification
9196 (N : Node_Id; Val : Node_Id); -- Node1
9197
9198 procedure Set_Statements
9199 (N : Node_Id; Val : List_Id); -- List3
9200
9201 procedure Set_Static_Processing_OK
9202 (N : Node_Id; Val : Boolean); -- Flag4
9203
9204 procedure Set_Storage_Pool
9205 (N : Node_Id; Val : Node_Id); -- Node1
9206
9207 procedure Set_Strval
9208 (N : Node_Id; Val : String_Id); -- Str3
9209
9210 procedure Set_Subtype_Indication
9211 (N : Node_Id; Val : Node_Id); -- Node5
9212
9213 procedure Set_Subtype_Mark
9214 (N : Node_Id; Val : Node_Id); -- Node4
9215
9216 procedure Set_Subtype_Marks
9217 (N : Node_Id; Val : List_Id); -- List2
9218
9219 procedure Set_Suppress_Loop_Warnings
9220 (N : Node_Id; Val : Boolean := True); -- Flag17
9221
9222 procedure Set_Synchronized_Present
9223 (N : Node_Id; Val : Boolean := True); -- Flag7
9224
9225 procedure Set_Tagged_Present
9226 (N : Node_Id; Val : Boolean := True); -- Flag15
9227
9228 procedure Set_Target_Type
9229 (N : Node_Id; Val : Entity_Id); -- Node2
9230
9231 procedure Set_Task_Definition
9232 (N : Node_Id; Val : Node_Id); -- Node3
9233
9234 procedure Set_Task_Present
9235 (N : Node_Id; Val : Boolean := True); -- Flag5
9236
9237 procedure Set_Then_Actions
9238 (N : Node_Id; Val : List_Id); -- List2
9239
9240 procedure Set_Then_Statements
9241 (N : Node_Id; Val : List_Id); -- List2
9242
9243 procedure Set_Treat_Fixed_As_Integer
9244 (N : Node_Id; Val : Boolean := True); -- Flag14
9245
9246 procedure Set_Triggering_Alternative
9247 (N : Node_Id; Val : Node_Id); -- Node1
9248
9249 procedure Set_Triggering_Statement
9250 (N : Node_Id; Val : Node_Id); -- Node1
9251
9252 procedure Set_TSS_Elist
9253 (N : Node_Id; Val : Elist_Id); -- Elist3
9254
9255 procedure Set_Type_Definition
9256 (N : Node_Id; Val : Node_Id); -- Node3
9257
9258 procedure Set_Unit
9259 (N : Node_Id; Val : Node_Id); -- Node2
9260
9261 procedure Set_Unknown_Discriminants_Present
9262 (N : Node_Id; Val : Boolean := True); -- Flag13
9263
9264 procedure Set_Unreferenced_In_Spec
9265 (N : Node_Id; Val : Boolean := True); -- Flag7
9266
9267 procedure Set_Variant_Part
9268 (N : Node_Id; Val : Node_Id); -- Node4
9269
9270 procedure Set_Variants
9271 (N : Node_Id; Val : List_Id); -- List1
9272
9273 procedure Set_Visible_Declarations
9274 (N : Node_Id; Val : List_Id); -- List2
9275
9276 procedure Set_Was_Originally_Stub
9277 (N : Node_Id; Val : Boolean := True); -- Flag13
9278
9279 procedure Set_Zero_Cost_Handling
9280 (N : Node_Id; Val : Boolean := True); -- Flag5
9281
9282 -------------------------
9283 -- Iterator Procedures --
9284 -------------------------
9285
9286 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
9287
9288 procedure Next_Entity (N : in out Node_Id);
9289 procedure Next_Named_Actual (N : in out Node_Id);
9290 procedure Next_Rep_Item (N : in out Node_Id);
9291 procedure Next_Use_Clause (N : in out Node_Id);
9292
9293 --------------------------------------
9294 -- Logical Access to End_Span Field --
9295 --------------------------------------
9296
9297 function End_Location (N : Node_Id) return Source_Ptr;
9298 -- N is an N_If_Statement or N_Case_Statement node, and this
9299 -- function returns the location of the IF token in the END IF
9300 -- sequence by translating the value of the End_Span field.
9301
9302 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
9303 -- N is an N_If_Statement or N_Case_Statement node. This procedure
9304 -- sets the End_Span field to correspond to the given value S. In
9305 -- other words, End_Span is set to the difference between S and
9306 -- Sloc (N), the starting location.
9307
9308 --------------------------------
9309 -- Node_Kind Membership Tests --
9310 --------------------------------
9311
9312 -- The following functions allow a convenient notation for testing whether
9313 -- a Node_Kind value matches any one of a list of possible values. In each
9314 -- case True is returned if the given T argument is equal to any of the V
9315 -- arguments. Note that there is a similar set of functions defined in
9316 -- Atree where the first argument is a Node_Id whose Nkind field is tested.
9317
9318 function Nkind_In
9319 (T : Node_Kind;
9320 V1 : Node_Kind;
9321 V2 : Node_Kind) return Boolean;
9322
9323 function Nkind_In
9324 (T : Node_Kind;
9325 V1 : Node_Kind;
9326 V2 : Node_Kind;
9327 V3 : Node_Kind) return Boolean;
9328
9329 function Nkind_In
9330 (T : Node_Kind;
9331 V1 : Node_Kind;
9332 V2 : Node_Kind;
9333 V3 : Node_Kind;
9334 V4 : Node_Kind) return Boolean;
9335
9336 function Nkind_In
9337 (T : Node_Kind;
9338 V1 : Node_Kind;
9339 V2 : Node_Kind;
9340 V3 : Node_Kind;
9341 V4 : Node_Kind;
9342 V5 : Node_Kind) return Boolean;
9343
9344 function Nkind_In
9345 (T : Node_Kind;
9346 V1 : Node_Kind;
9347 V2 : Node_Kind;
9348 V3 : Node_Kind;
9349 V4 : Node_Kind;
9350 V5 : Node_Kind;
9351 V6 : Node_Kind) return Boolean;
9352
9353 function Nkind_In
9354 (T : Node_Kind;
9355 V1 : Node_Kind;
9356 V2 : Node_Kind;
9357 V3 : Node_Kind;
9358 V4 : Node_Kind;
9359 V5 : Node_Kind;
9360 V6 : Node_Kind;
9361 V7 : Node_Kind) return Boolean;
9362
9363 function Nkind_In
9364 (T : Node_Kind;
9365 V1 : Node_Kind;
9366 V2 : Node_Kind;
9367 V3 : Node_Kind;
9368 V4 : Node_Kind;
9369 V5 : Node_Kind;
9370 V6 : Node_Kind;
9371 V7 : Node_Kind;
9372 V8 : Node_Kind) return Boolean;
9373
9374 function Nkind_In
9375 (T : Node_Kind;
9376 V1 : Node_Kind;
9377 V2 : Node_Kind;
9378 V3 : Node_Kind;
9379 V4 : Node_Kind;
9380 V5 : Node_Kind;
9381 V6 : Node_Kind;
9382 V7 : Node_Kind;
9383 V8 : Node_Kind;
9384 V9 : Node_Kind) return Boolean;
9385
9386 pragma Inline (Nkind_In);
9387 -- Inline all above functions
9388
9389 -----------------------
9390 -- Utility Functions --
9391 -----------------------
9392
9393 function Pragma_Name (N : Node_Id) return Name_Id;
9394 pragma Inline (Pragma_Name);
9395 -- Convenient function to obtain Chars field of Pragma_Identifier
9396
9397 -----------------------------
9398 -- Syntactic Parent Tables --
9399 -----------------------------
9400
9401 -- These tables show for each node, and for each of the five fields,
9402 -- whether the corresponding field is syntactic (True) or semantic (False).
9403 -- Unused entries are also set to False.
9404
9405 subtype Field_Num is Natural range 1 .. 5;
9406
9407 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
9408
9409 -- Following entries can be built automatically from the sinfo sources
9410 -- using the makeisf utility (currently this program is in spitbol).
9411
9412 N_Identifier =>
9413 (1 => True, -- Chars (Name1)
9414 2 => False, -- Original_Discriminant (Node2-Sem)
9415 3 => False, -- unused
9416 4 => False, -- Entity (Node4-Sem)
9417 5 => False), -- Etype (Node5-Sem)
9418
9419 N_Integer_Literal =>
9420 (1 => False, -- unused
9421 2 => False, -- Original_Entity (Node2-Sem)
9422 3 => True, -- Intval (Uint3)
9423 4 => False, -- unused
9424 5 => False), -- Etype (Node5-Sem)
9425
9426 N_Real_Literal =>
9427 (1 => False, -- unused
9428 2 => False, -- Original_Entity (Node2-Sem)
9429 3 => True, -- Realval (Ureal3)
9430 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
9431 5 => False), -- Etype (Node5-Sem)
9432
9433 N_Character_Literal =>
9434 (1 => True, -- Chars (Name1)
9435 2 => True, -- Char_Literal_Value (Uint2)
9436 3 => False, -- unused
9437 4 => False, -- Entity (Node4-Sem)
9438 5 => False), -- Etype (Node5-Sem)
9439
9440 N_String_Literal =>
9441 (1 => False, -- unused
9442 2 => False, -- unused
9443 3 => True, -- Strval (Str3)
9444 4 => False, -- unused
9445 5 => False), -- Etype (Node5-Sem)
9446
9447 N_Pragma =>
9448 (1 => False, -- Next_Pragma (Node1-Sem)
9449 2 => True, -- Pragma_Argument_Associations (List2)
9450 3 => True, -- Debug_Statement (Node3)
9451 4 => True, -- Pragma_Identifier (Node4)
9452 5 => False), -- Next_Rep_Item (Node5-Sem)
9453
9454 N_Pragma_Argument_Association =>
9455 (1 => True, -- Chars (Name1)
9456 2 => False, -- unused
9457 3 => True, -- Expression (Node3)
9458 4 => False, -- unused
9459 5 => False), -- unused
9460
9461 N_Defining_Identifier =>
9462 (1 => True, -- Chars (Name1)
9463 2 => False, -- Next_Entity (Node2-Sem)
9464 3 => False, -- Scope (Node3-Sem)
9465 4 => False, -- unused
9466 5 => False), -- Etype (Node5-Sem)
9467
9468 N_Full_Type_Declaration =>
9469 (1 => True, -- Defining_Identifier (Node1)
9470 2 => False, -- unused
9471 3 => True, -- Type_Definition (Node3)
9472 4 => True, -- Discriminant_Specifications (List4)
9473 5 => False), -- unused
9474
9475 N_Subtype_Declaration =>
9476 (1 => True, -- Defining_Identifier (Node1)
9477 2 => False, -- unused
9478 3 => False, -- unused
9479 4 => False, -- Generic_Parent_Type (Node4-Sem)
9480 5 => True), -- Subtype_Indication (Node5)
9481
9482 N_Subtype_Indication =>
9483 (1 => False, -- unused
9484 2 => False, -- unused
9485 3 => True, -- Constraint (Node3)
9486 4 => True, -- Subtype_Mark (Node4)
9487 5 => False), -- Etype (Node5-Sem)
9488
9489 N_Object_Declaration =>
9490 (1 => True, -- Defining_Identifier (Node1)
9491 2 => False, -- Handler_List_Entry (Node2-Sem)
9492 3 => True, -- Expression (Node3)
9493 4 => True, -- Object_Definition (Node4)
9494 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
9495
9496 N_Number_Declaration =>
9497 (1 => True, -- Defining_Identifier (Node1)
9498 2 => False, -- unused
9499 3 => True, -- Expression (Node3)
9500 4 => False, -- unused
9501 5 => False), -- unused
9502
9503 N_Derived_Type_Definition =>
9504 (1 => False, -- unused
9505 2 => True, -- Interface_List (List2)
9506 3 => True, -- Record_Extension_Part (Node3)
9507 4 => False, -- unused
9508 5 => True), -- Subtype_Indication (Node5)
9509
9510 N_Range_Constraint =>
9511 (1 => False, -- unused
9512 2 => False, -- unused
9513 3 => False, -- unused
9514 4 => True, -- Range_Expression (Node4)
9515 5 => False), -- unused
9516
9517 N_Range =>
9518 (1 => True, -- Low_Bound (Node1)
9519 2 => True, -- High_Bound (Node2)
9520 3 => False, -- unused
9521 4 => False, -- unused
9522 5 => False), -- Etype (Node5-Sem)
9523
9524 N_Enumeration_Type_Definition =>
9525 (1 => True, -- Literals (List1)
9526 2 => False, -- unused
9527 3 => False, -- unused
9528 4 => True, -- End_Label (Node4)
9529 5 => False), -- unused
9530
9531 N_Defining_Character_Literal =>
9532 (1 => True, -- Chars (Name1)
9533 2 => False, -- Next_Entity (Node2-Sem)
9534 3 => False, -- Scope (Node3-Sem)
9535 4 => False, -- unused
9536 5 => False), -- Etype (Node5-Sem)
9537
9538 N_Signed_Integer_Type_Definition =>
9539 (1 => True, -- Low_Bound (Node1)
9540 2 => True, -- High_Bound (Node2)
9541 3 => False, -- unused
9542 4 => False, -- unused
9543 5 => False), -- unused
9544
9545 N_Modular_Type_Definition =>
9546 (1 => False, -- unused
9547 2 => False, -- unused
9548 3 => True, -- Expression (Node3)
9549 4 => False, -- unused
9550 5 => False), -- unused
9551
9552 N_Floating_Point_Definition =>
9553 (1 => False, -- unused
9554 2 => True, -- Digits_Expression (Node2)
9555 3 => False, -- unused
9556 4 => True, -- Real_Range_Specification (Node4)
9557 5 => False), -- unused
9558
9559 N_Real_Range_Specification =>
9560 (1 => True, -- Low_Bound (Node1)
9561 2 => True, -- High_Bound (Node2)
9562 3 => False, -- unused
9563 4 => False, -- unused
9564 5 => False), -- unused
9565
9566 N_Ordinary_Fixed_Point_Definition =>
9567 (1 => False, -- unused
9568 2 => False, -- unused
9569 3 => True, -- Delta_Expression (Node3)
9570 4 => True, -- Real_Range_Specification (Node4)
9571 5 => False), -- unused
9572
9573 N_Decimal_Fixed_Point_Definition =>
9574 (1 => False, -- unused
9575 2 => True, -- Digits_Expression (Node2)
9576 3 => True, -- Delta_Expression (Node3)
9577 4 => True, -- Real_Range_Specification (Node4)
9578 5 => False), -- unused
9579
9580 N_Digits_Constraint =>
9581 (1 => False, -- unused
9582 2 => True, -- Digits_Expression (Node2)
9583 3 => False, -- unused
9584 4 => True, -- Range_Constraint (Node4)
9585 5 => False), -- unused
9586
9587 N_Unconstrained_Array_Definition =>
9588 (1 => False, -- unused
9589 2 => True, -- Subtype_Marks (List2)
9590 3 => False, -- unused
9591 4 => True, -- Component_Definition (Node4)
9592 5 => False), -- unused
9593
9594 N_Constrained_Array_Definition =>
9595 (1 => False, -- unused
9596 2 => True, -- Discrete_Subtype_Definitions (List2)
9597 3 => False, -- unused
9598 4 => True, -- Component_Definition (Node4)
9599 5 => False), -- unused
9600
9601 N_Component_Definition =>
9602 (1 => False, -- unused
9603 2 => False, -- unused
9604 3 => True, -- Access_Definition (Node3)
9605 4 => False, -- unused
9606 5 => True), -- Subtype_Indication (Node5)
9607
9608 N_Discriminant_Specification =>
9609 (1 => True, -- Defining_Identifier (Node1)
9610 2 => False, -- unused
9611 3 => True, -- Expression (Node3)
9612 4 => False, -- unused
9613 5 => True), -- Discriminant_Type (Node5)
9614
9615 N_Index_Or_Discriminant_Constraint =>
9616 (1 => True, -- Constraints (List1)
9617 2 => False, -- unused
9618 3 => False, -- unused
9619 4 => False, -- unused
9620 5 => False), -- unused
9621
9622 N_Discriminant_Association =>
9623 (1 => True, -- Selector_Names (List1)
9624 2 => False, -- unused
9625 3 => True, -- Expression (Node3)
9626 4 => False, -- unused
9627 5 => False), -- unused
9628
9629 N_Record_Definition =>
9630 (1 => True, -- Component_List (Node1)
9631 2 => True, -- Interface_List (List2)
9632 3 => False, -- unused
9633 4 => True, -- End_Label (Node4)
9634 5 => False), -- unused
9635
9636 N_Component_List =>
9637 (1 => False, -- unused
9638 2 => False, -- unused
9639 3 => True, -- Component_Items (List3)
9640 4 => True, -- Variant_Part (Node4)
9641 5 => False), -- unused
9642
9643 N_Component_Declaration =>
9644 (1 => True, -- Defining_Identifier (Node1)
9645 2 => False, -- unused
9646 3 => True, -- Expression (Node3)
9647 4 => True, -- Component_Definition (Node4)
9648 5 => False), -- unused
9649
9650 N_Variant_Part =>
9651 (1 => True, -- Variants (List1)
9652 2 => True, -- Name (Node2)
9653 3 => False, -- unused
9654 4 => False, -- unused
9655 5 => False), -- unused
9656
9657 N_Variant =>
9658 (1 => True, -- Component_List (Node1)
9659 2 => False, -- Enclosing_Variant (Node2-Sem)
9660 3 => False, -- Present_Expr (Uint3-Sem)
9661 4 => True, -- Discrete_Choices (List4)
9662 5 => False), -- Dcheck_Function (Node5-Sem)
9663
9664 N_Others_Choice =>
9665 (1 => False, -- Others_Discrete_Choices (List1-Sem)
9666 2 => False, -- unused
9667 3 => False, -- unused
9668 4 => False, -- unused
9669 5 => False), -- unused
9670
9671 N_Access_To_Object_Definition =>
9672 (1 => False, -- unused
9673 2 => False, -- unused
9674 3 => False, -- unused
9675 4 => False, -- unused
9676 5 => True), -- Subtype_Indication (Node5)
9677
9678 N_Access_Function_Definition =>
9679 (1 => False, -- unused
9680 2 => False, -- unused
9681 3 => True, -- Parameter_Specifications (List3)
9682 4 => True, -- Result_Definition (Node4)
9683 5 => False), -- unused
9684
9685 N_Access_Procedure_Definition =>
9686 (1 => False, -- unused
9687 2 => False, -- unused
9688 3 => True, -- Parameter_Specifications (List3)
9689 4 => False, -- unused
9690 5 => False), -- unused
9691
9692 N_Access_Definition =>
9693 (1 => False, -- unused
9694 2 => False, -- unused
9695 3 => True, -- Access_To_Subprogram_Definition (Node3)
9696 4 => True, -- Subtype_Mark (Node4)
9697 5 => False), -- unused
9698
9699 N_Incomplete_Type_Declaration =>
9700 (1 => True, -- Defining_Identifier (Node1)
9701 2 => False, -- unused
9702 3 => False, -- unused
9703 4 => True, -- Discriminant_Specifications (List4)
9704 5 => False), -- unused
9705
9706 N_Explicit_Dereference =>
9707 (1 => False, -- unused
9708 2 => False, -- unused
9709 3 => True, -- Prefix (Node3)
9710 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
9711 5 => False), -- Etype (Node5-Sem)
9712
9713 N_Indexed_Component =>
9714 (1 => True, -- Expressions (List1)
9715 2 => False, -- unused
9716 3 => True, -- Prefix (Node3)
9717 4 => False, -- unused
9718 5 => False), -- Etype (Node5-Sem)
9719
9720 N_Slice =>
9721 (1 => False, -- unused
9722 2 => False, -- unused
9723 3 => True, -- Prefix (Node3)
9724 4 => True, -- Discrete_Range (Node4)
9725 5 => False), -- Etype (Node5-Sem)
9726
9727 N_Selected_Component =>
9728 (1 => False, -- unused
9729 2 => True, -- Selector_Name (Node2)
9730 3 => True, -- Prefix (Node3)
9731 4 => False, -- unused
9732 5 => False), -- Etype (Node5-Sem)
9733
9734 N_Attribute_Reference =>
9735 (1 => True, -- Expressions (List1)
9736 2 => True, -- Attribute_Name (Name2)
9737 3 => True, -- Prefix (Node3)
9738 4 => False, -- Entity (Node4-Sem)
9739 5 => False), -- Etype (Node5-Sem)
9740
9741 N_Aggregate =>
9742 (1 => True, -- Expressions (List1)
9743 2 => True, -- Component_Associations (List2)
9744 3 => False, -- Aggregate_Bounds (Node3-Sem)
9745 4 => False, -- unused
9746 5 => False), -- Etype (Node5-Sem)
9747
9748 N_Component_Association =>
9749 (1 => True, -- Choices (List1)
9750 2 => False, -- Loop_Actions (List2-Sem)
9751 3 => True, -- Expression (Node3)
9752 4 => False, -- unused
9753 5 => False), -- unused
9754
9755 N_Extension_Aggregate =>
9756 (1 => True, -- Expressions (List1)
9757 2 => True, -- Component_Associations (List2)
9758 3 => True, -- Ancestor_Part (Node3)
9759 4 => False, -- unused
9760 5 => False), -- Etype (Node5-Sem)
9761
9762 N_Null =>
9763 (1 => False, -- unused
9764 2 => False, -- unused
9765 3 => False, -- unused
9766 4 => False, -- unused
9767 5 => False), -- Etype (Node5-Sem)
9768
9769 N_And_Then =>
9770 (1 => False, -- Actions (List1-Sem)
9771 2 => True, -- Left_Opnd (Node2)
9772 3 => True, -- Right_Opnd (Node3)
9773 4 => False, -- unused
9774 5 => False), -- Etype (Node5-Sem)
9775
9776 N_Or_Else =>
9777 (1 => False, -- Actions (List1-Sem)
9778 2 => True, -- Left_Opnd (Node2)
9779 3 => True, -- Right_Opnd (Node3)
9780 4 => False, -- unused
9781 5 => False), -- Etype (Node5-Sem)
9782
9783 N_In =>
9784 (1 => False, -- unused
9785 2 => True, -- Left_Opnd (Node2)
9786 3 => True, -- Right_Opnd (Node3)
9787 4 => True, -- Alternatives (List4)
9788 5 => False), -- Etype (Node5-Sem)
9789
9790 N_Not_In =>
9791 (1 => False, -- unused
9792 2 => True, -- Left_Opnd (Node2)
9793 3 => True, -- Right_Opnd (Node3)
9794 4 => True, -- Alternatives (List4)
9795 5 => False), -- Etype (Node5-Sem)
9796
9797 N_Op_And =>
9798 (1 => True, -- Chars (Name1)
9799 2 => True, -- Left_Opnd (Node2)
9800 3 => True, -- Right_Opnd (Node3)
9801 4 => False, -- Entity (Node4-Sem)
9802 5 => False), -- Etype (Node5-Sem)
9803
9804 N_Op_Or =>
9805 (1 => True, -- Chars (Name1)
9806 2 => True, -- Left_Opnd (Node2)
9807 3 => True, -- Right_Opnd (Node3)
9808 4 => False, -- Entity (Node4-Sem)
9809 5 => False), -- Etype (Node5-Sem)
9810
9811 N_Op_Xor =>
9812 (1 => True, -- Chars (Name1)
9813 2 => True, -- Left_Opnd (Node2)
9814 3 => True, -- Right_Opnd (Node3)
9815 4 => False, -- Entity (Node4-Sem)
9816 5 => False), -- Etype (Node5-Sem)
9817
9818 N_Op_Eq =>
9819 (1 => True, -- Chars (Name1)
9820 2 => True, -- Left_Opnd (Node2)
9821 3 => True, -- Right_Opnd (Node3)
9822 4 => False, -- Entity (Node4-Sem)
9823 5 => False), -- Etype (Node5-Sem)
9824
9825 N_Op_Ne =>
9826 (1 => True, -- Chars (Name1)
9827 2 => True, -- Left_Opnd (Node2)
9828 3 => True, -- Right_Opnd (Node3)
9829 4 => False, -- Entity (Node4-Sem)
9830 5 => False), -- Etype (Node5-Sem)
9831
9832 N_Op_Lt =>
9833 (1 => True, -- Chars (Name1)
9834 2 => True, -- Left_Opnd (Node2)
9835 3 => True, -- Right_Opnd (Node3)
9836 4 => False, -- Entity (Node4-Sem)
9837 5 => False), -- Etype (Node5-Sem)
9838
9839 N_Op_Le =>
9840 (1 => True, -- Chars (Name1)
9841 2 => True, -- Left_Opnd (Node2)
9842 3 => True, -- Right_Opnd (Node3)
9843 4 => False, -- Entity (Node4-Sem)
9844 5 => False), -- Etype (Node5-Sem)
9845
9846 N_Op_Gt =>
9847 (1 => True, -- Chars (Name1)
9848 2 => True, -- Left_Opnd (Node2)
9849 3 => True, -- Right_Opnd (Node3)
9850 4 => False, -- Entity (Node4-Sem)
9851 5 => False), -- Etype (Node5-Sem)
9852
9853 N_Op_Ge =>
9854 (1 => True, -- Chars (Name1)
9855 2 => True, -- Left_Opnd (Node2)
9856 3 => True, -- Right_Opnd (Node3)
9857 4 => False, -- Entity (Node4-Sem)
9858 5 => False), -- Etype (Node5-Sem)
9859
9860 N_Op_Add =>
9861 (1 => True, -- Chars (Name1)
9862 2 => True, -- Left_Opnd (Node2)
9863 3 => True, -- Right_Opnd (Node3)
9864 4 => False, -- Entity (Node4-Sem)
9865 5 => False), -- Etype (Node5-Sem)
9866
9867 N_Op_Subtract =>
9868 (1 => True, -- Chars (Name1)
9869 2 => True, -- Left_Opnd (Node2)
9870 3 => True, -- Right_Opnd (Node3)
9871 4 => False, -- Entity (Node4-Sem)
9872 5 => False), -- Etype (Node5-Sem)
9873
9874 N_Op_Concat =>
9875 (1 => True, -- Chars (Name1)
9876 2 => True, -- Left_Opnd (Node2)
9877 3 => True, -- Right_Opnd (Node3)
9878 4 => False, -- Entity (Node4-Sem)
9879 5 => False), -- Etype (Node5-Sem)
9880
9881 N_Op_Multiply =>
9882 (1 => True, -- Chars (Name1)
9883 2 => True, -- Left_Opnd (Node2)
9884 3 => True, -- Right_Opnd (Node3)
9885 4 => False, -- Entity (Node4-Sem)
9886 5 => False), -- Etype (Node5-Sem)
9887
9888 N_Op_Divide =>
9889 (1 => True, -- Chars (Name1)
9890 2 => True, -- Left_Opnd (Node2)
9891 3 => True, -- Right_Opnd (Node3)
9892 4 => False, -- Entity (Node4-Sem)
9893 5 => False), -- Etype (Node5-Sem)
9894
9895 N_Op_Mod =>
9896 (1 => True, -- Chars (Name1)
9897 2 => True, -- Left_Opnd (Node2)
9898 3 => True, -- Right_Opnd (Node3)
9899 4 => False, -- Entity (Node4-Sem)
9900 5 => False), -- Etype (Node5-Sem)
9901
9902 N_Op_Rem =>
9903 (1 => True, -- Chars (Name1)
9904 2 => True, -- Left_Opnd (Node2)
9905 3 => True, -- Right_Opnd (Node3)
9906 4 => False, -- Entity (Node4-Sem)
9907 5 => False), -- Etype (Node5-Sem)
9908
9909 N_Op_Expon =>
9910 (1 => True, -- Chars (Name1)
9911 2 => True, -- Left_Opnd (Node2)
9912 3 => True, -- Right_Opnd (Node3)
9913 4 => False, -- Entity (Node4-Sem)
9914 5 => False), -- Etype (Node5-Sem)
9915
9916 N_Op_Plus =>
9917 (1 => True, -- Chars (Name1)
9918 2 => False, -- unused
9919 3 => True, -- Right_Opnd (Node3)
9920 4 => False, -- Entity (Node4-Sem)
9921 5 => False), -- Etype (Node5-Sem)
9922
9923 N_Op_Minus =>
9924 (1 => True, -- Chars (Name1)
9925 2 => False, -- unused
9926 3 => True, -- Right_Opnd (Node3)
9927 4 => False, -- Entity (Node4-Sem)
9928 5 => False), -- Etype (Node5-Sem)
9929
9930 N_Op_Abs =>
9931 (1 => True, -- Chars (Name1)
9932 2 => False, -- unused
9933 3 => True, -- Right_Opnd (Node3)
9934 4 => False, -- Entity (Node4-Sem)
9935 5 => False), -- Etype (Node5-Sem)
9936
9937 N_Op_Not =>
9938 (1 => True, -- Chars (Name1)
9939 2 => False, -- unused
9940 3 => True, -- Right_Opnd (Node3)
9941 4 => False, -- Entity (Node4-Sem)
9942 5 => False), -- Etype (Node5-Sem)
9943
9944 N_Type_Conversion =>
9945 (1 => False, -- unused
9946 2 => False, -- unused
9947 3 => True, -- Expression (Node3)
9948 4 => True, -- Subtype_Mark (Node4)
9949 5 => False), -- Etype (Node5-Sem)
9950
9951 N_Qualified_Expression =>
9952 (1 => False, -- unused
9953 2 => False, -- unused
9954 3 => True, -- Expression (Node3)
9955 4 => True, -- Subtype_Mark (Node4)
9956 5 => False), -- Etype (Node5-Sem)
9957
9958 N_Allocator =>
9959 (1 => False, -- Storage_Pool (Node1-Sem)
9960 2 => False, -- Procedure_To_Call (Node2-Sem)
9961 3 => True, -- Expression (Node3)
9962 4 => False, -- Coextensions (Elist4-Sem)
9963 5 => False), -- Etype (Node5-Sem)
9964
9965 N_Null_Statement =>
9966 (1 => False, -- unused
9967 2 => False, -- unused
9968 3 => False, -- unused
9969 4 => False, -- unused
9970 5 => False), -- unused
9971
9972 N_Label =>
9973 (1 => True, -- Identifier (Node1)
9974 2 => False, -- unused
9975 3 => False, -- unused
9976 4 => False, -- unused
9977 5 => False), -- unused
9978
9979 N_Assignment_Statement =>
9980 (1 => False, -- unused
9981 2 => True, -- Name (Node2)
9982 3 => True, -- Expression (Node3)
9983 4 => False, -- unused
9984 5 => False), -- unused
9985
9986 N_If_Statement =>
9987 (1 => True, -- Condition (Node1)
9988 2 => True, -- Then_Statements (List2)
9989 3 => True, -- Elsif_Parts (List3)
9990 4 => True, -- Else_Statements (List4)
9991 5 => True), -- End_Span (Uint5)
9992
9993 N_Elsif_Part =>
9994 (1 => True, -- Condition (Node1)
9995 2 => True, -- Then_Statements (List2)
9996 3 => False, -- Condition_Actions (List3-Sem)
9997 4 => False, -- unused
9998 5 => False), -- unused
9999
10000 N_Case_Statement =>
10001 (1 => False, -- unused
10002 2 => False, -- unused
10003 3 => True, -- Expression (Node3)
10004 4 => True, -- Alternatives (List4)
10005 5 => True), -- End_Span (Uint5)
10006
10007 N_Case_Statement_Alternative =>
10008 (1 => False, -- unused
10009 2 => False, -- unused
10010 3 => True, -- Statements (List3)
10011 4 => True, -- Discrete_Choices (List4)
10012 5 => False), -- unused
10013
10014 N_Loop_Statement =>
10015 (1 => True, -- Identifier (Node1)
10016 2 => True, -- Iteration_Scheme (Node2)
10017 3 => True, -- Statements (List3)
10018 4 => True, -- End_Label (Node4)
10019 5 => False), -- unused
10020
10021 N_Iteration_Scheme =>
10022 (1 => True, -- Condition (Node1)
10023 2 => False, -- unused
10024 3 => False, -- Condition_Actions (List3-Sem)
10025 4 => True, -- Loop_Parameter_Specification (Node4)
10026 5 => False), -- unused
10027
10028 N_Loop_Parameter_Specification =>
10029 (1 => True, -- Defining_Identifier (Node1)
10030 2 => False, -- unused
10031 3 => False, -- unused
10032 4 => True, -- Discrete_Subtype_Definition (Node4)
10033 5 => False), -- unused
10034
10035 N_Block_Statement =>
10036 (1 => True, -- Identifier (Node1)
10037 2 => True, -- Declarations (List2)
10038 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10039 4 => True, -- Handled_Statement_Sequence (Node4)
10040 5 => False), -- unused
10041
10042 N_Exit_Statement =>
10043 (1 => True, -- Condition (Node1)
10044 2 => True, -- Name (Node2)
10045 3 => False, -- unused
10046 4 => False, -- unused
10047 5 => False), -- unused
10048
10049 N_Goto_Statement =>
10050 (1 => False, -- unused
10051 2 => True, -- Name (Node2)
10052 3 => False, -- unused
10053 4 => False, -- unused
10054 5 => False), -- unused
10055
10056 N_Subprogram_Declaration =>
10057 (1 => True, -- Specification (Node1)
10058 2 => False, -- unused
10059 3 => False, -- Body_To_Inline (Node3-Sem)
10060 4 => False, -- Parent_Spec (Node4-Sem)
10061 5 => False), -- Corresponding_Body (Node5-Sem)
10062
10063 N_Abstract_Subprogram_Declaration =>
10064 (1 => True, -- Specification (Node1)
10065 2 => False, -- unused
10066 3 => False, -- unused
10067 4 => False, -- unused
10068 5 => False), -- unused
10069
10070 N_Function_Specification =>
10071 (1 => True, -- Defining_Unit_Name (Node1)
10072 2 => False, -- Elaboration_Boolean (Node2-Sem)
10073 3 => True, -- Parameter_Specifications (List3)
10074 4 => True, -- Result_Definition (Node4)
10075 5 => False), -- Generic_Parent (Node5-Sem)
10076
10077 N_Procedure_Specification =>
10078 (1 => True, -- Defining_Unit_Name (Node1)
10079 2 => False, -- Elaboration_Boolean (Node2-Sem)
10080 3 => True, -- Parameter_Specifications (List3)
10081 4 => False, -- unused
10082 5 => False), -- Generic_Parent (Node5-Sem)
10083
10084 N_Designator =>
10085 (1 => True, -- Identifier (Node1)
10086 2 => True, -- Name (Node2)
10087 3 => False, -- unused
10088 4 => False, -- unused
10089 5 => False), -- unused
10090
10091 N_Defining_Program_Unit_Name =>
10092 (1 => True, -- Defining_Identifier (Node1)
10093 2 => True, -- Name (Node2)
10094 3 => False, -- unused
10095 4 => False, -- unused
10096 5 => False), -- unused
10097
10098 N_Operator_Symbol =>
10099 (1 => True, -- Chars (Name1)
10100 2 => False, -- unused
10101 3 => True, -- Strval (Str3)
10102 4 => False, -- Entity (Node4-Sem)
10103 5 => False), -- Etype (Node5-Sem)
10104
10105 N_Defining_Operator_Symbol =>
10106 (1 => True, -- Chars (Name1)
10107 2 => False, -- Next_Entity (Node2-Sem)
10108 3 => False, -- Scope (Node3-Sem)
10109 4 => False, -- unused
10110 5 => False), -- Etype (Node5-Sem)
10111
10112 N_Parameter_Specification =>
10113 (1 => True, -- Defining_Identifier (Node1)
10114 2 => True, -- Parameter_Type (Node2)
10115 3 => True, -- Expression (Node3)
10116 4 => False, -- unused
10117 5 => False), -- Default_Expression (Node5-Sem)
10118
10119 N_Subprogram_Body =>
10120 (1 => True, -- Specification (Node1)
10121 2 => True, -- Declarations (List2)
10122 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10123 4 => True, -- Handled_Statement_Sequence (Node4)
10124 5 => False), -- Corresponding_Spec (Node5-Sem)
10125
10126 N_Procedure_Call_Statement =>
10127 (1 => False, -- Controlling_Argument (Node1-Sem)
10128 2 => True, -- Name (Node2)
10129 3 => True, -- Parameter_Associations (List3)
10130 4 => False, -- First_Named_Actual (Node4-Sem)
10131 5 => False), -- Etype (Node5-Sem)
10132
10133 N_Function_Call =>
10134 (1 => False, -- Controlling_Argument (Node1-Sem)
10135 2 => True, -- Name (Node2)
10136 3 => True, -- Parameter_Associations (List3)
10137 4 => False, -- First_Named_Actual (Node4-Sem)
10138 5 => False), -- Etype (Node5-Sem)
10139
10140 N_Parameter_Association =>
10141 (1 => False, -- unused
10142 2 => True, -- Selector_Name (Node2)
10143 3 => True, -- Explicit_Actual_Parameter (Node3)
10144 4 => False, -- Next_Named_Actual (Node4-Sem)
10145 5 => False), -- unused
10146
10147 N_Return_Statement =>
10148 (1 => False, -- Storage_Pool (Node1-Sem)
10149 2 => False, -- Procedure_To_Call (Node2-Sem)
10150 3 => True, -- Expression (Node3)
10151 4 => False, -- unused
10152 5 => False), -- Return_Statement_Entity (Node5-Sem)
10153
10154 N_Extended_Return_Statement =>
10155 (1 => False, -- Storage_Pool (Node1-Sem)
10156 2 => False, -- Procedure_To_Call (Node2-Sem)
10157 3 => True, -- Return_Object_Declarations (List3)
10158 4 => True, -- Handled_Statement_Sequence (Node4)
10159 5 => False), -- Return_Statement_Entity (Node5-Sem)
10160
10161 N_Package_Declaration =>
10162 (1 => True, -- Specification (Node1)
10163 2 => False, -- unused
10164 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10165 4 => False, -- Parent_Spec (Node4-Sem)
10166 5 => False), -- Corresponding_Body (Node5-Sem)
10167
10168 N_Package_Specification =>
10169 (1 => True, -- Defining_Unit_Name (Node1)
10170 2 => True, -- Visible_Declarations (List2)
10171 3 => True, -- Private_Declarations (List3)
10172 4 => True, -- End_Label (Node4)
10173 5 => False), -- Generic_Parent (Node5-Sem)
10174
10175 N_Package_Body =>
10176 (1 => True, -- Defining_Unit_Name (Node1)
10177 2 => True, -- Declarations (List2)
10178 3 => False, -- unused
10179 4 => True, -- Handled_Statement_Sequence (Node4)
10180 5 => False), -- Corresponding_Spec (Node5-Sem)
10181
10182 N_Private_Type_Declaration =>
10183 (1 => True, -- Defining_Identifier (Node1)
10184 2 => False, -- unused
10185 3 => False, -- unused
10186 4 => True, -- Discriminant_Specifications (List4)
10187 5 => False), -- unused
10188
10189 N_Private_Extension_Declaration =>
10190 (1 => True, -- Defining_Identifier (Node1)
10191 2 => True, -- Interface_List (List2)
10192 3 => False, -- unused
10193 4 => True, -- Discriminant_Specifications (List4)
10194 5 => True), -- Subtype_Indication (Node5)
10195
10196 N_Use_Package_Clause =>
10197 (1 => False, -- unused
10198 2 => True, -- Names (List2)
10199 3 => False, -- Next_Use_Clause (Node3-Sem)
10200 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10201 5 => False), -- unused
10202
10203 N_Use_Type_Clause =>
10204 (1 => False, -- unused
10205 2 => True, -- Subtype_Marks (List2)
10206 3 => False, -- Next_Use_Clause (Node3-Sem)
10207 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10208 5 => False), -- unused
10209
10210 N_Object_Renaming_Declaration =>
10211 (1 => True, -- Defining_Identifier (Node1)
10212 2 => True, -- Name (Node2)
10213 3 => True, -- Access_Definition (Node3)
10214 4 => True, -- Subtype_Mark (Node4)
10215 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
10216
10217 N_Exception_Renaming_Declaration =>
10218 (1 => True, -- Defining_Identifier (Node1)
10219 2 => True, -- Name (Node2)
10220 3 => False, -- unused
10221 4 => False, -- unused
10222 5 => False), -- unused
10223
10224 N_Package_Renaming_Declaration =>
10225 (1 => True, -- Defining_Unit_Name (Node1)
10226 2 => True, -- Name (Node2)
10227 3 => False, -- unused
10228 4 => False, -- Parent_Spec (Node4-Sem)
10229 5 => False), -- unused
10230
10231 N_Subprogram_Renaming_Declaration =>
10232 (1 => True, -- Specification (Node1)
10233 2 => True, -- Name (Node2)
10234 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
10235 4 => False, -- Parent_Spec (Node4-Sem)
10236 5 => False), -- Corresponding_Spec (Node5-Sem)
10237
10238 N_Generic_Package_Renaming_Declaration =>
10239 (1 => True, -- Defining_Unit_Name (Node1)
10240 2 => True, -- Name (Node2)
10241 3 => False, -- unused
10242 4 => False, -- Parent_Spec (Node4-Sem)
10243 5 => False), -- unused
10244
10245 N_Generic_Procedure_Renaming_Declaration =>
10246 (1 => True, -- Defining_Unit_Name (Node1)
10247 2 => True, -- Name (Node2)
10248 3 => False, -- unused
10249 4 => False, -- Parent_Spec (Node4-Sem)
10250 5 => False), -- unused
10251
10252 N_Generic_Function_Renaming_Declaration =>
10253 (1 => True, -- Defining_Unit_Name (Node1)
10254 2 => True, -- Name (Node2)
10255 3 => False, -- unused
10256 4 => False, -- Parent_Spec (Node4-Sem)
10257 5 => False), -- unused
10258
10259 N_Task_Type_Declaration =>
10260 (1 => True, -- Defining_Identifier (Node1)
10261 2 => True, -- Interface_List (List2)
10262 3 => True, -- Task_Definition (Node3)
10263 4 => True, -- Discriminant_Specifications (List4)
10264 5 => False), -- Corresponding_Body (Node5-Sem)
10265
10266 N_Single_Task_Declaration =>
10267 (1 => True, -- Defining_Identifier (Node1)
10268 2 => True, -- Interface_List (List2)
10269 3 => True, -- Task_Definition (Node3)
10270 4 => False, -- unused
10271 5 => False), -- unused
10272
10273 N_Task_Definition =>
10274 (1 => False, -- unused
10275 2 => True, -- Visible_Declarations (List2)
10276 3 => True, -- Private_Declarations (List3)
10277 4 => True, -- End_Label (Node4)
10278 5 => False), -- unused
10279
10280 N_Task_Body =>
10281 (1 => True, -- Defining_Identifier (Node1)
10282 2 => True, -- Declarations (List2)
10283 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10284 4 => True, -- Handled_Statement_Sequence (Node4)
10285 5 => False), -- Corresponding_Spec (Node5-Sem)
10286
10287 N_Protected_Type_Declaration =>
10288 (1 => True, -- Defining_Identifier (Node1)
10289 2 => True, -- Interface_List (List2)
10290 3 => True, -- Protected_Definition (Node3)
10291 4 => True, -- Discriminant_Specifications (List4)
10292 5 => False), -- Corresponding_Body (Node5-Sem)
10293
10294 N_Single_Protected_Declaration =>
10295 (1 => True, -- Defining_Identifier (Node1)
10296 2 => True, -- Interface_List (List2)
10297 3 => True, -- Protected_Definition (Node3)
10298 4 => False, -- unused
10299 5 => False), -- unused
10300
10301 N_Protected_Definition =>
10302 (1 => False, -- unused
10303 2 => True, -- Visible_Declarations (List2)
10304 3 => True, -- Private_Declarations (List3)
10305 4 => True, -- End_Label (Node4)
10306 5 => False), -- unused
10307
10308 N_Protected_Body =>
10309 (1 => True, -- Defining_Identifier (Node1)
10310 2 => True, -- Declarations (List2)
10311 3 => False, -- unused
10312 4 => True, -- End_Label (Node4)
10313 5 => False), -- Corresponding_Spec (Node5-Sem)
10314
10315 N_Entry_Declaration =>
10316 (1 => True, -- Defining_Identifier (Node1)
10317 2 => False, -- unused
10318 3 => True, -- Parameter_Specifications (List3)
10319 4 => True, -- Discrete_Subtype_Definition (Node4)
10320 5 => False), -- Corresponding_Body (Node5-Sem)
10321
10322 N_Accept_Statement =>
10323 (1 => True, -- Entry_Direct_Name (Node1)
10324 2 => True, -- Declarations (List2)
10325 3 => True, -- Parameter_Specifications (List3)
10326 4 => True, -- Handled_Statement_Sequence (Node4)
10327 5 => True), -- Entry_Index (Node5)
10328
10329 N_Entry_Body =>
10330 (1 => True, -- Defining_Identifier (Node1)
10331 2 => True, -- Declarations (List2)
10332 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10333 4 => True, -- Handled_Statement_Sequence (Node4)
10334 5 => True), -- Entry_Body_Formal_Part (Node5)
10335
10336 N_Entry_Body_Formal_Part =>
10337 (1 => True, -- Condition (Node1)
10338 2 => False, -- unused
10339 3 => True, -- Parameter_Specifications (List3)
10340 4 => True, -- Entry_Index_Specification (Node4)
10341 5 => False), -- unused
10342
10343 N_Entry_Index_Specification =>
10344 (1 => True, -- Defining_Identifier (Node1)
10345 2 => False, -- unused
10346 3 => False, -- unused
10347 4 => True, -- Discrete_Subtype_Definition (Node4)
10348 5 => False), -- unused
10349
10350 N_Entry_Call_Statement =>
10351 (1 => False, -- unused
10352 2 => True, -- Name (Node2)
10353 3 => True, -- Parameter_Associations (List3)
10354 4 => False, -- First_Named_Actual (Node4-Sem)
10355 5 => False), -- unused
10356
10357 N_Requeue_Statement =>
10358 (1 => False, -- unused
10359 2 => True, -- Name (Node2)
10360 3 => False, -- unused
10361 4 => False, -- unused
10362 5 => False), -- unused
10363
10364 N_Delay_Until_Statement =>
10365 (1 => False, -- unused
10366 2 => False, -- unused
10367 3 => True, -- Expression (Node3)
10368 4 => False, -- unused
10369 5 => False), -- unused
10370
10371 N_Delay_Relative_Statement =>
10372 (1 => False, -- unused
10373 2 => False, -- unused
10374 3 => True, -- Expression (Node3)
10375 4 => False, -- unused
10376 5 => False), -- unused
10377
10378 N_Selective_Accept =>
10379 (1 => True, -- Select_Alternatives (List1)
10380 2 => False, -- unused
10381 3 => False, -- unused
10382 4 => True, -- Else_Statements (List4)
10383 5 => False), -- unused
10384
10385 N_Accept_Alternative =>
10386 (1 => True, -- Condition (Node1)
10387 2 => True, -- Accept_Statement (Node2)
10388 3 => True, -- Statements (List3)
10389 4 => True, -- Pragmas_Before (List4)
10390 5 => False), -- Accept_Handler_Records (List5-Sem)
10391
10392 N_Delay_Alternative =>
10393 (1 => True, -- Condition (Node1)
10394 2 => True, -- Delay_Statement (Node2)
10395 3 => True, -- Statements (List3)
10396 4 => True, -- Pragmas_Before (List4)
10397 5 => False), -- unused
10398
10399 N_Terminate_Alternative =>
10400 (1 => True, -- Condition (Node1)
10401 2 => False, -- unused
10402 3 => False, -- unused
10403 4 => True, -- Pragmas_Before (List4)
10404 5 => True), -- Pragmas_After (List5)
10405
10406 N_Timed_Entry_Call =>
10407 (1 => True, -- Entry_Call_Alternative (Node1)
10408 2 => False, -- unused
10409 3 => False, -- unused
10410 4 => True, -- Delay_Alternative (Node4)
10411 5 => False), -- unused
10412
10413 N_Entry_Call_Alternative =>
10414 (1 => True, -- Entry_Call_Statement (Node1)
10415 2 => False, -- unused
10416 3 => True, -- Statements (List3)
10417 4 => True, -- Pragmas_Before (List4)
10418 5 => False), -- unused
10419
10420 N_Conditional_Entry_Call =>
10421 (1 => True, -- Entry_Call_Alternative (Node1)
10422 2 => False, -- unused
10423 3 => False, -- unused
10424 4 => True, -- Else_Statements (List4)
10425 5 => False), -- unused
10426
10427 N_Asynchronous_Select =>
10428 (1 => True, -- Triggering_Alternative (Node1)
10429 2 => True, -- Abortable_Part (Node2)
10430 3 => False, -- unused
10431 4 => False, -- unused
10432 5 => False), -- unused
10433
10434 N_Triggering_Alternative =>
10435 (1 => True, -- Triggering_Statement (Node1)
10436 2 => False, -- unused
10437 3 => True, -- Statements (List3)
10438 4 => True, -- Pragmas_Before (List4)
10439 5 => False), -- unused
10440
10441 N_Abortable_Part =>
10442 (1 => False, -- unused
10443 2 => False, -- unused
10444 3 => True, -- Statements (List3)
10445 4 => False, -- unused
10446 5 => False), -- unused
10447
10448 N_Abort_Statement =>
10449 (1 => False, -- unused
10450 2 => True, -- Names (List2)
10451 3 => False, -- unused
10452 4 => False, -- unused
10453 5 => False), -- unused
10454
10455 N_Compilation_Unit =>
10456 (1 => True, -- Context_Items (List1)
10457 2 => True, -- Unit (Node2)
10458 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
10459 4 => False, -- Library_Unit (Node4-Sem)
10460 5 => True), -- Aux_Decls_Node (Node5)
10461
10462 N_Compilation_Unit_Aux =>
10463 (1 => True, -- Actions (List1)
10464 2 => True, -- Declarations (List2)
10465 3 => False, -- unused
10466 4 => True, -- Config_Pragmas (List4)
10467 5 => True), -- Pragmas_After (List5)
10468
10469 N_With_Clause =>
10470 (1 => False, -- unused
10471 2 => True, -- Name (Node2)
10472 3 => False, -- unused
10473 4 => False, -- Library_Unit (Node4-Sem)
10474 5 => False), -- Corresponding_Spec (Node5-Sem)
10475
10476 N_Subprogram_Body_Stub =>
10477 (1 => True, -- Specification (Node1)
10478 2 => False, -- unused
10479 3 => False, -- unused
10480 4 => False, -- Library_Unit (Node4-Sem)
10481 5 => False), -- Corresponding_Body (Node5-Sem)
10482
10483 N_Package_Body_Stub =>
10484 (1 => True, -- Defining_Identifier (Node1)
10485 2 => False, -- unused
10486 3 => False, -- unused
10487 4 => False, -- Library_Unit (Node4-Sem)
10488 5 => False), -- Corresponding_Body (Node5-Sem)
10489
10490 N_Task_Body_Stub =>
10491 (1 => True, -- Defining_Identifier (Node1)
10492 2 => False, -- unused
10493 3 => False, -- unused
10494 4 => False, -- Library_Unit (Node4-Sem)
10495 5 => False), -- Corresponding_Body (Node5-Sem)
10496
10497 N_Protected_Body_Stub =>
10498 (1 => True, -- Defining_Identifier (Node1)
10499 2 => False, -- unused
10500 3 => False, -- unused
10501 4 => False, -- Library_Unit (Node4-Sem)
10502 5 => False), -- Corresponding_Body (Node5-Sem)
10503
10504 N_Subunit =>
10505 (1 => True, -- Proper_Body (Node1)
10506 2 => True, -- Name (Node2)
10507 3 => False, -- Corresponding_Stub (Node3-Sem)
10508 4 => False, -- unused
10509 5 => False), -- unused
10510
10511 N_Exception_Declaration =>
10512 (1 => True, -- Defining_Identifier (Node1)
10513 2 => False, -- unused
10514 3 => False, -- Expression (Node3-Sem)
10515 4 => False, -- unused
10516 5 => False), -- unused
10517
10518 N_Handled_Sequence_Of_Statements =>
10519 (1 => True, -- At_End_Proc (Node1)
10520 2 => False, -- First_Real_Statement (Node2-Sem)
10521 3 => True, -- Statements (List3)
10522 4 => True, -- End_Label (Node4)
10523 5 => True), -- Exception_Handlers (List5)
10524
10525 N_Exception_Handler =>
10526 (1 => False, -- Local_Raise_Statements (Elist1)
10527 2 => True, -- Choice_Parameter (Node2)
10528 3 => True, -- Statements (List3)
10529 4 => True, -- Exception_Choices (List4)
10530 5 => False), -- Exception_Label (Node5)
10531
10532 N_Raise_Statement =>
10533 (1 => False, -- unused
10534 2 => True, -- Name (Node2)
10535 3 => True, -- Expression (Node3)
10536 4 => False, -- unused
10537 5 => False), -- unused
10538
10539 N_Generic_Subprogram_Declaration =>
10540 (1 => True, -- Specification (Node1)
10541 2 => True, -- Generic_Formal_Declarations (List2)
10542 3 => False, -- unused
10543 4 => False, -- Parent_Spec (Node4-Sem)
10544 5 => False), -- Corresponding_Body (Node5-Sem)
10545
10546 N_Generic_Package_Declaration =>
10547 (1 => True, -- Specification (Node1)
10548 2 => True, -- Generic_Formal_Declarations (List2)
10549 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10550 4 => False, -- Parent_Spec (Node4-Sem)
10551 5 => False), -- Corresponding_Body (Node5-Sem)
10552
10553 N_Package_Instantiation =>
10554 (1 => True, -- Defining_Unit_Name (Node1)
10555 2 => True, -- Name (Node2)
10556 3 => True, -- Generic_Associations (List3)
10557 4 => False, -- Parent_Spec (Node4-Sem)
10558 5 => False), -- Instance_Spec (Node5-Sem)
10559
10560 N_Procedure_Instantiation =>
10561 (1 => True, -- Defining_Unit_Name (Node1)
10562 2 => True, -- Name (Node2)
10563 3 => True, -- Generic_Associations (List3)
10564 4 => False, -- Parent_Spec (Node4-Sem)
10565 5 => False), -- Instance_Spec (Node5-Sem)
10566
10567 N_Function_Instantiation =>
10568 (1 => True, -- Defining_Unit_Name (Node1)
10569 2 => True, -- Name (Node2)
10570 3 => True, -- Generic_Associations (List3)
10571 4 => False, -- Parent_Spec (Node4-Sem)
10572 5 => False), -- Instance_Spec (Node5-Sem)
10573
10574 N_Generic_Association =>
10575 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
10576 2 => True, -- Selector_Name (Node2)
10577 3 => False, -- unused
10578 4 => False, -- unused
10579 5 => False), -- unused
10580
10581 N_Formal_Object_Declaration =>
10582 (1 => True, -- Defining_Identifier (Node1)
10583 2 => False, -- unused
10584 3 => True, -- Access_Definition (Node3)
10585 4 => True, -- Subtype_Mark (Node4)
10586 5 => True), -- Default_Expression (Node5)
10587
10588 N_Formal_Type_Declaration =>
10589 (1 => True, -- Defining_Identifier (Node1)
10590 2 => False, -- unused
10591 3 => True, -- Formal_Type_Definition (Node3)
10592 4 => True, -- Discriminant_Specifications (List4)
10593 5 => False), -- unused
10594
10595 N_Formal_Private_Type_Definition =>
10596 (1 => False, -- unused
10597 2 => False, -- unused
10598 3 => False, -- unused
10599 4 => False, -- unused
10600 5 => False), -- unused
10601
10602 N_Formal_Derived_Type_Definition =>
10603 (1 => False, -- unused
10604 2 => True, -- Interface_List (List2)
10605 3 => False, -- unused
10606 4 => True, -- Subtype_Mark (Node4)
10607 5 => False), -- unused
10608
10609 N_Formal_Discrete_Type_Definition =>
10610 (1 => False, -- unused
10611 2 => False, -- unused
10612 3 => False, -- unused
10613 4 => False, -- unused
10614 5 => False), -- unused
10615
10616 N_Formal_Signed_Integer_Type_Definition =>
10617 (1 => False, -- unused
10618 2 => False, -- unused
10619 3 => False, -- unused
10620 4 => False, -- unused
10621 5 => False), -- unused
10622
10623 N_Formal_Modular_Type_Definition =>
10624 (1 => False, -- unused
10625 2 => False, -- unused
10626 3 => False, -- unused
10627 4 => False, -- unused
10628 5 => False), -- unused
10629
10630 N_Formal_Floating_Point_Definition =>
10631 (1 => False, -- unused
10632 2 => False, -- unused
10633 3 => False, -- unused
10634 4 => False, -- unused
10635 5 => False), -- unused
10636
10637 N_Formal_Ordinary_Fixed_Point_Definition =>
10638 (1 => False, -- unused
10639 2 => False, -- unused
10640 3 => False, -- unused
10641 4 => False, -- unused
10642 5 => False), -- unused
10643
10644 N_Formal_Decimal_Fixed_Point_Definition =>
10645 (1 => False, -- unused
10646 2 => False, -- unused
10647 3 => False, -- unused
10648 4 => False, -- unused
10649 5 => False), -- unused
10650
10651 N_Formal_Concrete_Subprogram_Declaration =>
10652 (1 => True, -- Specification (Node1)
10653 2 => True, -- Default_Name (Node2)
10654 3 => False, -- unused
10655 4 => False, -- unused
10656 5 => False), -- unused
10657
10658 N_Formal_Abstract_Subprogram_Declaration =>
10659 (1 => True, -- Specification (Node1)
10660 2 => True, -- Default_Name (Node2)
10661 3 => False, -- unused
10662 4 => False, -- unused
10663 5 => False), -- unused
10664
10665 N_Formal_Package_Declaration =>
10666 (1 => True, -- Defining_Identifier (Node1)
10667 2 => True, -- Name (Node2)
10668 3 => True, -- Generic_Associations (List3)
10669 4 => False, -- unused
10670 5 => False), -- Instance_Spec (Node5-Sem)
10671
10672 N_Attribute_Definition_Clause =>
10673 (1 => True, -- Chars (Name1)
10674 2 => True, -- Name (Node2)
10675 3 => True, -- Expression (Node3)
10676 4 => False, -- unused
10677 5 => False), -- Next_Rep_Item (Node5-Sem)
10678
10679 N_Enumeration_Representation_Clause =>
10680 (1 => True, -- Identifier (Node1)
10681 2 => False, -- unused
10682 3 => True, -- Array_Aggregate (Node3)
10683 4 => False, -- unused
10684 5 => False), -- Next_Rep_Item (Node5-Sem)
10685
10686 N_Record_Representation_Clause =>
10687 (1 => True, -- Identifier (Node1)
10688 2 => True, -- Mod_Clause (Node2)
10689 3 => True, -- Component_Clauses (List3)
10690 4 => False, -- unused
10691 5 => False), -- Next_Rep_Item (Node5-Sem)
10692
10693 N_Component_Clause =>
10694 (1 => True, -- Component_Name (Node1)
10695 2 => True, -- Position (Node2)
10696 3 => True, -- First_Bit (Node3)
10697 4 => True, -- Last_Bit (Node4)
10698 5 => False), -- unused
10699
10700 N_Code_Statement =>
10701 (1 => False, -- unused
10702 2 => False, -- unused
10703 3 => True, -- Expression (Node3)
10704 4 => False, -- unused
10705 5 => False), -- unused
10706
10707 N_Op_Rotate_Left =>
10708 (1 => True, -- Chars (Name1)
10709 2 => True, -- Left_Opnd (Node2)
10710 3 => True, -- Right_Opnd (Node3)
10711 4 => False, -- Entity (Node4-Sem)
10712 5 => False), -- Etype (Node5-Sem)
10713
10714 N_Op_Rotate_Right =>
10715 (1 => True, -- Chars (Name1)
10716 2 => True, -- Left_Opnd (Node2)
10717 3 => True, -- Right_Opnd (Node3)
10718 4 => False, -- Entity (Node4-Sem)
10719 5 => False), -- Etype (Node5-Sem)
10720
10721 N_Op_Shift_Left =>
10722 (1 => True, -- Chars (Name1)
10723 2 => True, -- Left_Opnd (Node2)
10724 3 => True, -- Right_Opnd (Node3)
10725 4 => False, -- Entity (Node4-Sem)
10726 5 => False), -- Etype (Node5-Sem)
10727
10728 N_Op_Shift_Right_Arithmetic =>
10729 (1 => True, -- Chars (Name1)
10730 2 => True, -- Left_Opnd (Node2)
10731 3 => True, -- Right_Opnd (Node3)
10732 4 => False, -- Entity (Node4-Sem)
10733 5 => False), -- Etype (Node5-Sem)
10734
10735 N_Op_Shift_Right =>
10736 (1 => True, -- Chars (Name1)
10737 2 => True, -- Left_Opnd (Node2)
10738 3 => True, -- Right_Opnd (Node3)
10739 4 => False, -- Entity (Node4-Sem)
10740 5 => False), -- Etype (Node5-Sem)
10741
10742 N_Delta_Constraint =>
10743 (1 => False, -- unused
10744 2 => False, -- unused
10745 3 => True, -- Delta_Expression (Node3)
10746 4 => True, -- Range_Constraint (Node4)
10747 5 => False), -- unused
10748
10749 N_At_Clause =>
10750 (1 => True, -- Identifier (Node1)
10751 2 => False, -- unused
10752 3 => True, -- Expression (Node3)
10753 4 => False, -- unused
10754 5 => False), -- unused
10755
10756 N_Mod_Clause =>
10757 (1 => False, -- unused
10758 2 => False, -- unused
10759 3 => True, -- Expression (Node3)
10760 4 => True, -- Pragmas_Before (List4)
10761 5 => False), -- unused
10762
10763 N_Conditional_Expression =>
10764 (1 => True, -- Expressions (List1)
10765 2 => False, -- Then_Actions (List2-Sem)
10766 3 => False, -- Else_Actions (List3-Sem)
10767 4 => False, -- unused
10768 5 => False), -- Etype (Node5-Sem)
10769
10770 N_Expanded_Name =>
10771 (1 => True, -- Chars (Name1)
10772 2 => True, -- Selector_Name (Node2)
10773 3 => True, -- Prefix (Node3)
10774 4 => False, -- Entity (Node4-Sem)
10775 5 => False), -- Etype (Node5-Sem)
10776
10777 N_Free_Statement =>
10778 (1 => False, -- Storage_Pool (Node1-Sem)
10779 2 => False, -- Procedure_To_Call (Node2-Sem)
10780 3 => True, -- Expression (Node3)
10781 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
10782 5 => False), -- unused
10783
10784 N_Freeze_Entity =>
10785 (1 => True, -- Actions (List1)
10786 2 => False, -- Access_Types_To_Process (Elist2-Sem)
10787 3 => False, -- TSS_Elist (Elist3-Sem)
10788 4 => False, -- Entity (Node4-Sem)
10789 5 => False), -- First_Subtype_Link (Node5-Sem)
10790
10791 N_Implicit_Label_Declaration =>
10792 (1 => True, -- Defining_Identifier (Node1)
10793 2 => False, -- Label_Construct (Node2-Sem)
10794 3 => False, -- unused
10795 4 => False, -- unused
10796 5 => False), -- unused
10797
10798 N_Itype_Reference =>
10799 (1 => False, -- Itype (Node1-Sem)
10800 2 => False, -- unused
10801 3 => False, -- unused
10802 4 => False, -- unused
10803 5 => False), -- unused
10804
10805 N_Raise_Constraint_Error =>
10806 (1 => True, -- Condition (Node1)
10807 2 => False, -- unused
10808 3 => True, -- Reason (Uint3)
10809 4 => False, -- unused
10810 5 => False), -- Etype (Node5-Sem)
10811
10812 N_Raise_Program_Error =>
10813 (1 => True, -- Condition (Node1)
10814 2 => False, -- unused
10815 3 => True, -- Reason (Uint3)
10816 4 => False, -- unused
10817 5 => False), -- Etype (Node5-Sem)
10818
10819 N_Raise_Storage_Error =>
10820 (1 => True, -- Condition (Node1)
10821 2 => False, -- unused
10822 3 => True, -- Reason (Uint3)
10823 4 => False, -- unused
10824 5 => False), -- Etype (Node5-Sem)
10825
10826 N_Push_Constraint_Error_Label =>
10827 (1 => False, -- unused
10828 2 => False, -- unused
10829 3 => False, -- unused
10830 4 => False, -- unused
10831 5 => False), -- unused
10832
10833 N_Push_Program_Error_Label =>
10834 (1 => False, -- Exception_Label
10835 2 => False, -- unused
10836 3 => False, -- unused
10837 4 => False, -- unused
10838 5 => False), -- Exception_Label
10839
10840 N_Push_Storage_Error_Label =>
10841 (1 => False, -- Exception_Label
10842 2 => False, -- unused
10843 3 => False, -- unused
10844 4 => False, -- unused
10845 5 => False), -- Exception_Label
10846
10847 N_Pop_Constraint_Error_Label =>
10848 (1 => False, -- unused
10849 2 => False, -- unused
10850 3 => False, -- unused
10851 4 => False, -- unused
10852 5 => False), -- unused
10853
10854 N_Pop_Program_Error_Label =>
10855 (1 => False, -- unused
10856 2 => False, -- unused
10857 3 => False, -- unused
10858 4 => False, -- unused
10859 5 => False), -- unused
10860
10861 N_Pop_Storage_Error_Label =>
10862 (1 => False, -- unused
10863 2 => False, -- unused
10864 3 => False, -- unused
10865 4 => False, -- unused
10866 5 => False), -- unused
10867
10868 N_Reference =>
10869 (1 => False, -- unused
10870 2 => False, -- unused
10871 3 => True, -- Prefix (Node3)
10872 4 => False, -- unused
10873 5 => False), -- Etype (Node5-Sem)
10874
10875 N_Subprogram_Info =>
10876 (1 => True, -- Identifier (Node1)
10877 2 => False, -- unused
10878 3 => False, -- unused
10879 4 => False, -- unused
10880 5 => False), -- Etype (Node5-Sem)
10881
10882 N_Unchecked_Expression =>
10883 (1 => False, -- unused
10884 2 => False, -- unused
10885 3 => True, -- Expression (Node3)
10886 4 => False, -- unused
10887 5 => False), -- Etype (Node5-Sem)
10888
10889 N_Unchecked_Type_Conversion =>
10890 (1 => False, -- unused
10891 2 => False, -- unused
10892 3 => True, -- Expression (Node3)
10893 4 => True, -- Subtype_Mark (Node4)
10894 5 => False), -- Etype (Node5-Sem)
10895
10896 N_Validate_Unchecked_Conversion =>
10897 (1 => False, -- Source_Type (Node1-Sem)
10898 2 => False, -- Target_Type (Node2-Sem)
10899 3 => False, -- unused
10900 4 => False, -- unused
10901 5 => False), -- unused
10902
10903 -- End of inserted output from makeisf program
10904
10905 -- Entries for Empty, Error and Unused. Even thought these have a Chars
10906 -- field for debugging purposes, they are not really syntactic fields, so
10907 -- we mark all fields as unused.
10908
10909 N_Empty =>
10910 (1 => False, -- unused
10911 2 => False, -- unused
10912 3 => False, -- unused
10913 4 => False, -- unused
10914 5 => False), -- unused
10915
10916 N_Error =>
10917 (1 => False, -- unused
10918 2 => False, -- unused
10919 3 => False, -- unused
10920 4 => False, -- unused
10921 5 => False), -- unused
10922
10923 N_Unused_At_Start =>
10924 (1 => False, -- unused
10925 2 => False, -- unused
10926 3 => False, -- unused
10927 4 => False, -- unused
10928 5 => False), -- unused
10929
10930 N_Unused_At_End =>
10931 (1 => False, -- unused
10932 2 => False, -- unused
10933 3 => False, -- unused
10934 4 => False, -- unused
10935 5 => False)); -- unused
10936
10937 --------------------
10938 -- Inline Pragmas --
10939 --------------------
10940
10941 pragma Inline (ABE_Is_Certain);
10942 pragma Inline (Abort_Present);
10943 pragma Inline (Abortable_Part);
10944 pragma Inline (Abstract_Present);
10945 pragma Inline (Accept_Handler_Records);
10946 pragma Inline (Accept_Statement);
10947 pragma Inline (Access_Definition);
10948 pragma Inline (Access_To_Subprogram_Definition);
10949 pragma Inline (Access_Types_To_Process);
10950 pragma Inline (Actions);
10951 pragma Inline (Activation_Chain_Entity);
10952 pragma Inline (Acts_As_Spec);
10953 pragma Inline (Actual_Designated_Subtype);
10954 pragma Inline (Address_Warning_Posted);
10955 pragma Inline (Aggregate_Bounds);
10956 pragma Inline (Aliased_Present);
10957 pragma Inline (All_Others);
10958 pragma Inline (All_Present);
10959 pragma Inline (Alternatives);
10960 pragma Inline (Ancestor_Part);
10961 pragma Inline (Array_Aggregate);
10962 pragma Inline (Assignment_OK);
10963 pragma Inline (Associated_Node);
10964 pragma Inline (At_End_Proc);
10965 pragma Inline (Attribute_Name);
10966 pragma Inline (Aux_Decls_Node);
10967 pragma Inline (Backwards_OK);
10968 pragma Inline (Bad_Is_Detected);
10969 pragma Inline (Body_To_Inline);
10970 pragma Inline (Body_Required);
10971 pragma Inline (By_Ref);
10972 pragma Inline (Box_Present);
10973 pragma Inline (Char_Literal_Value);
10974 pragma Inline (Chars);
10975 pragma Inline (Check_Address_Alignment);
10976 pragma Inline (Choice_Parameter);
10977 pragma Inline (Choices);
10978 pragma Inline (Coextensions);
10979 pragma Inline (Comes_From_Extended_Return_Statement);
10980 pragma Inline (Compile_Time_Known_Aggregate);
10981 pragma Inline (Component_Associations);
10982 pragma Inline (Component_Clauses);
10983 pragma Inline (Component_Definition);
10984 pragma Inline (Component_Items);
10985 pragma Inline (Component_List);
10986 pragma Inline (Component_Name);
10987 pragma Inline (Condition);
10988 pragma Inline (Condition_Actions);
10989 pragma Inline (Config_Pragmas);
10990 pragma Inline (Constant_Present);
10991 pragma Inline (Constraint);
10992 pragma Inline (Constraints);
10993 pragma Inline (Context_Installed);
10994 pragma Inline (Context_Items);
10995 pragma Inline (Controlling_Argument);
10996 pragma Inline (Conversion_OK);
10997 pragma Inline (Corresponding_Body);
10998 pragma Inline (Corresponding_Formal_Spec);
10999 pragma Inline (Corresponding_Generic_Association);
11000 pragma Inline (Corresponding_Integer_Value);
11001 pragma Inline (Corresponding_Spec);
11002 pragma Inline (Corresponding_Stub);
11003 pragma Inline (Dcheck_Function);
11004 pragma Inline (Debug_Statement);
11005 pragma Inline (Declarations);
11006 pragma Inline (Default_Expression);
11007 pragma Inline (Default_Name);
11008 pragma Inline (Defining_Identifier);
11009 pragma Inline (Defining_Unit_Name);
11010 pragma Inline (Delay_Alternative);
11011 pragma Inline (Delay_Statement);
11012 pragma Inline (Delta_Expression);
11013 pragma Inline (Digits_Expression);
11014 pragma Inline (Discr_Check_Funcs_Built);
11015 pragma Inline (Discrete_Choices);
11016 pragma Inline (Discrete_Range);
11017 pragma Inline (Discrete_Subtype_Definition);
11018 pragma Inline (Discrete_Subtype_Definitions);
11019 pragma Inline (Discriminant_Specifications);
11020 pragma Inline (Discriminant_Type);
11021 pragma Inline (Do_Accessibility_Check);
11022 pragma Inline (Do_Discriminant_Check);
11023 pragma Inline (Do_Length_Check);
11024 pragma Inline (Do_Division_Check);
11025 pragma Inline (Do_Overflow_Check);
11026 pragma Inline (Do_Range_Check);
11027 pragma Inline (Do_Storage_Check);
11028 pragma Inline (Do_Tag_Check);
11029 pragma Inline (Elaborate_Present);
11030 pragma Inline (Elaborate_All_Desirable);
11031 pragma Inline (Elaborate_All_Present);
11032 pragma Inline (Elaborate_Desirable);
11033 pragma Inline (Elaboration_Boolean);
11034 pragma Inline (Else_Actions);
11035 pragma Inline (Else_Statements);
11036 pragma Inline (Elsif_Parts);
11037 pragma Inline (Enclosing_Variant);
11038 pragma Inline (End_Label);
11039 pragma Inline (End_Span);
11040 pragma Inline (Entity);
11041 pragma Inline (Entity_Or_Associated_Node);
11042 pragma Inline (Entry_Body_Formal_Part);
11043 pragma Inline (Entry_Call_Alternative);
11044 pragma Inline (Entry_Call_Statement);
11045 pragma Inline (Entry_Direct_Name);
11046 pragma Inline (Entry_Index);
11047 pragma Inline (Entry_Index_Specification);
11048 pragma Inline (Etype);
11049 pragma Inline (Exception_Choices);
11050 pragma Inline (Exception_Handlers);
11051 pragma Inline (Exception_Junk);
11052 pragma Inline (Exception_Label);
11053 pragma Inline (Expansion_Delayed);
11054 pragma Inline (Explicit_Actual_Parameter);
11055 pragma Inline (Explicit_Generic_Actual_Parameter);
11056 pragma Inline (Expression);
11057 pragma Inline (Expressions);
11058 pragma Inline (First_Bit);
11059 pragma Inline (First_Inlined_Subprogram);
11060 pragma Inline (First_Name);
11061 pragma Inline (First_Named_Actual);
11062 pragma Inline (First_Real_Statement);
11063 pragma Inline (First_Subtype_Link);
11064 pragma Inline (Float_Truncate);
11065 pragma Inline (Formal_Type_Definition);
11066 pragma Inline (Forwards_OK);
11067 pragma Inline (From_At_End);
11068 pragma Inline (From_At_Mod);
11069 pragma Inline (From_Default);
11070 pragma Inline (Generic_Associations);
11071 pragma Inline (Generic_Formal_Declarations);
11072 pragma Inline (Generic_Parent);
11073 pragma Inline (Generic_Parent_Type);
11074 pragma Inline (Handled_Statement_Sequence);
11075 pragma Inline (Handler_List_Entry);
11076 pragma Inline (Has_Created_Identifier);
11077 pragma Inline (Has_Dynamic_Length_Check);
11078 pragma Inline (Has_Dynamic_Range_Check);
11079 pragma Inline (Has_Init_Expression);
11080 pragma Inline (Has_Local_Raise);
11081 pragma Inline (Has_Self_Reference);
11082 pragma Inline (Has_No_Elaboration_Code);
11083 pragma Inline (Has_Priority_Pragma);
11084 pragma Inline (Has_Private_View);
11085 pragma Inline (Has_Relative_Deadline_Pragma);
11086 pragma Inline (Has_Storage_Size_Pragma);
11087 pragma Inline (Has_Task_Info_Pragma);
11088 pragma Inline (Has_Task_Name_Pragma);
11089 pragma Inline (Has_Wide_Character);
11090 pragma Inline (Hidden_By_Use_Clause);
11091 pragma Inline (High_Bound);
11092 pragma Inline (Identifier);
11093 pragma Inline (Implicit_With);
11094 pragma Inline (Interface_List);
11095 pragma Inline (Interface_Present);
11096 pragma Inline (Includes_Infinities);
11097 pragma Inline (In_Present);
11098 pragma Inline (Instance_Spec);
11099 pragma Inline (Intval);
11100 pragma Inline (Is_Asynchronous_Call_Block);
11101 pragma Inline (Is_Component_Left_Opnd);
11102 pragma Inline (Is_Component_Right_Opnd);
11103 pragma Inline (Is_Controlling_Actual);
11104 pragma Inline (Is_Dynamic_Coextension);
11105 pragma Inline (Is_Elsif);
11106 pragma Inline (Is_Entry_Barrier_Function);
11107 pragma Inline (Is_Expanded_Build_In_Place_Call);
11108 pragma Inline (Is_Folded_In_Parser);
11109 pragma Inline (Is_In_Discriminant_Check);
11110 pragma Inline (Is_Machine_Number);
11111 pragma Inline (Is_Null_Loop);
11112 pragma Inline (Is_Overloaded);
11113 pragma Inline (Is_Power_Of_2_For_Shift);
11114 pragma Inline (Is_Protected_Subprogram_Body);
11115 pragma Inline (Is_Static_Coextension);
11116 pragma Inline (Is_Static_Expression);
11117 pragma Inline (Is_Subprogram_Descriptor);
11118 pragma Inline (Is_Task_Allocation_Block);
11119 pragma Inline (Is_Task_Master);
11120 pragma Inline (Iteration_Scheme);
11121 pragma Inline (Itype);
11122 pragma Inline (Kill_Range_Check);
11123 pragma Inline (Last_Bit);
11124 pragma Inline (Last_Name);
11125 pragma Inline (Library_Unit);
11126 pragma Inline (Label_Construct);
11127 pragma Inline (Left_Opnd);
11128 pragma Inline (Limited_View_Installed);
11129 pragma Inline (Limited_Present);
11130 pragma Inline (Literals);
11131 pragma Inline (Local_Raise_Not_OK);
11132 pragma Inline (Local_Raise_Statements);
11133 pragma Inline (Loop_Actions);
11134 pragma Inline (Loop_Parameter_Specification);
11135 pragma Inline (Low_Bound);
11136 pragma Inline (Mod_Clause);
11137 pragma Inline (More_Ids);
11138 pragma Inline (Must_Be_Byte_Aligned);
11139 pragma Inline (Must_Not_Freeze);
11140 pragma Inline (Must_Not_Override);
11141 pragma Inline (Must_Override);
11142 pragma Inline (Name);
11143 pragma Inline (Names);
11144 pragma Inline (Next_Entity);
11145 pragma Inline (Next_Implicit_With);
11146 pragma Inline (Next_Named_Actual);
11147 pragma Inline (Next_Pragma);
11148 pragma Inline (Next_Rep_Item);
11149 pragma Inline (Next_Use_Clause);
11150 pragma Inline (No_Ctrl_Actions);
11151 pragma Inline (No_Elaboration_Check);
11152 pragma Inline (No_Entities_Ref_In_Spec);
11153 pragma Inline (No_Initialization);
11154 pragma Inline (No_Truncation);
11155 pragma Inline (Null_Present);
11156 pragma Inline (Null_Exclusion_Present);
11157 pragma Inline (Null_Exclusion_In_Return_Present);
11158 pragma Inline (Null_Record_Present);
11159 pragma Inline (Object_Definition);
11160 pragma Inline (Original_Discriminant);
11161 pragma Inline (Original_Entity);
11162 pragma Inline (Others_Discrete_Choices);
11163 pragma Inline (Out_Present);
11164 pragma Inline (Parameter_Associations);
11165 pragma Inline (Parameter_Specifications);
11166 pragma Inline (Parameter_List_Truncated);
11167 pragma Inline (Parameter_Type);
11168 pragma Inline (Parent_Spec);
11169 pragma Inline (PPC_Enabled);
11170 pragma Inline (Position);
11171 pragma Inline (Pragma_Argument_Associations);
11172 pragma Inline (Pragma_Identifier);
11173 pragma Inline (Pragmas_After);
11174 pragma Inline (Pragmas_Before);
11175 pragma Inline (Prefix);
11176 pragma Inline (Present_Expr);
11177 pragma Inline (Prev_Ids);
11178 pragma Inline (Print_In_Hex);
11179 pragma Inline (Private_Declarations);
11180 pragma Inline (Private_Present);
11181 pragma Inline (Procedure_To_Call);
11182 pragma Inline (Proper_Body);
11183 pragma Inline (Protected_Definition);
11184 pragma Inline (Protected_Present);
11185 pragma Inline (Raises_Constraint_Error);
11186 pragma Inline (Range_Constraint);
11187 pragma Inline (Range_Expression);
11188 pragma Inline (Real_Range_Specification);
11189 pragma Inline (Realval);
11190 pragma Inline (Reason);
11191 pragma Inline (Record_Extension_Part);
11192 pragma Inline (Redundant_Use);
11193 pragma Inline (Renaming_Exception);
11194 pragma Inline (Result_Definition);
11195 pragma Inline (Return_Object_Declarations);
11196 pragma Inline (Return_Statement_Entity);
11197 pragma Inline (Reverse_Present);
11198 pragma Inline (Right_Opnd);
11199 pragma Inline (Rounded_Result);
11200 pragma Inline (Scope);
11201 pragma Inline (Select_Alternatives);
11202 pragma Inline (Selector_Name);
11203 pragma Inline (Selector_Names);
11204 pragma Inline (Shift_Count_OK);
11205 pragma Inline (Source_Type);
11206 pragma Inline (Specification);
11207 pragma Inline (Statements);
11208 pragma Inline (Static_Processing_OK);
11209 pragma Inline (Storage_Pool);
11210 pragma Inline (Strval);
11211 pragma Inline (Subtype_Indication);
11212 pragma Inline (Subtype_Mark);
11213 pragma Inline (Subtype_Marks);
11214 pragma Inline (Suppress_Loop_Warnings);
11215 pragma Inline (Synchronized_Present);
11216 pragma Inline (Tagged_Present);
11217 pragma Inline (Target_Type);
11218 pragma Inline (Task_Definition);
11219 pragma Inline (Task_Present);
11220 pragma Inline (Then_Actions);
11221 pragma Inline (Then_Statements);
11222 pragma Inline (Triggering_Alternative);
11223 pragma Inline (Triggering_Statement);
11224 pragma Inline (Treat_Fixed_As_Integer);
11225 pragma Inline (TSS_Elist);
11226 pragma Inline (Type_Definition);
11227 pragma Inline (Unit);
11228 pragma Inline (Unknown_Discriminants_Present);
11229 pragma Inline (Unreferenced_In_Spec);
11230 pragma Inline (Variant_Part);
11231 pragma Inline (Variants);
11232 pragma Inline (Visible_Declarations);
11233 pragma Inline (Was_Originally_Stub);
11234 pragma Inline (Zero_Cost_Handling);
11235
11236 pragma Inline (Set_ABE_Is_Certain);
11237 pragma Inline (Set_Abort_Present);
11238 pragma Inline (Set_Abortable_Part);
11239 pragma Inline (Set_Abstract_Present);
11240 pragma Inline (Set_Accept_Handler_Records);
11241 pragma Inline (Set_Accept_Statement);
11242 pragma Inline (Set_Access_Definition);
11243 pragma Inline (Set_Access_To_Subprogram_Definition);
11244 pragma Inline (Set_Access_Types_To_Process);
11245 pragma Inline (Set_Actions);
11246 pragma Inline (Set_Activation_Chain_Entity);
11247 pragma Inline (Set_Acts_As_Spec);
11248 pragma Inline (Set_Actual_Designated_Subtype);
11249 pragma Inline (Set_Address_Warning_Posted);
11250 pragma Inline (Set_Aggregate_Bounds);
11251 pragma Inline (Set_Aliased_Present);
11252 pragma Inline (Set_All_Others);
11253 pragma Inline (Set_All_Present);
11254 pragma Inline (Set_Alternatives);
11255 pragma Inline (Set_Ancestor_Part);
11256 pragma Inline (Set_Array_Aggregate);
11257 pragma Inline (Set_Assignment_OK);
11258 pragma Inline (Set_Associated_Node);
11259 pragma Inline (Set_At_End_Proc);
11260 pragma Inline (Set_Attribute_Name);
11261 pragma Inline (Set_Aux_Decls_Node);
11262 pragma Inline (Set_Backwards_OK);
11263 pragma Inline (Set_Bad_Is_Detected);
11264 pragma Inline (Set_Body_To_Inline);
11265 pragma Inline (Set_Body_Required);
11266 pragma Inline (Set_By_Ref);
11267 pragma Inline (Set_Box_Present);
11268 pragma Inline (Set_Char_Literal_Value);
11269 pragma Inline (Set_Chars);
11270 pragma Inline (Set_Check_Address_Alignment);
11271 pragma Inline (Set_Choice_Parameter);
11272 pragma Inline (Set_Choices);
11273 pragma Inline (Set_Coextensions);
11274 pragma Inline (Set_Comes_From_Extended_Return_Statement);
11275 pragma Inline (Set_Compile_Time_Known_Aggregate);
11276 pragma Inline (Set_Component_Associations);
11277 pragma Inline (Set_Component_Clauses);
11278 pragma Inline (Set_Component_Definition);
11279 pragma Inline (Set_Component_Items);
11280 pragma Inline (Set_Component_List);
11281 pragma Inline (Set_Component_Name);
11282 pragma Inline (Set_Condition);
11283 pragma Inline (Set_Condition_Actions);
11284 pragma Inline (Set_Config_Pragmas);
11285 pragma Inline (Set_Constant_Present);
11286 pragma Inline (Set_Constraint);
11287 pragma Inline (Set_Constraints);
11288 pragma Inline (Set_Context_Installed);
11289 pragma Inline (Set_Context_Items);
11290 pragma Inline (Set_Controlling_Argument);
11291 pragma Inline (Set_Conversion_OK);
11292 pragma Inline (Set_Corresponding_Body);
11293 pragma Inline (Set_Corresponding_Formal_Spec);
11294 pragma Inline (Set_Corresponding_Generic_Association);
11295 pragma Inline (Set_Corresponding_Integer_Value);
11296 pragma Inline (Set_Corresponding_Spec);
11297 pragma Inline (Set_Corresponding_Stub);
11298 pragma Inline (Set_Dcheck_Function);
11299 pragma Inline (Set_Debug_Statement);
11300 pragma Inline (Set_Declarations);
11301 pragma Inline (Set_Default_Expression);
11302 pragma Inline (Set_Default_Name);
11303 pragma Inline (Set_Defining_Identifier);
11304 pragma Inline (Set_Defining_Unit_Name);
11305 pragma Inline (Set_Delay_Alternative);
11306 pragma Inline (Set_Delay_Statement);
11307 pragma Inline (Set_Delta_Expression);
11308 pragma Inline (Set_Digits_Expression);
11309 pragma Inline (Set_Discr_Check_Funcs_Built);
11310 pragma Inline (Set_Discrete_Choices);
11311 pragma Inline (Set_Discrete_Range);
11312 pragma Inline (Set_Discrete_Subtype_Definition);
11313 pragma Inline (Set_Discrete_Subtype_Definitions);
11314 pragma Inline (Set_Discriminant_Specifications);
11315 pragma Inline (Set_Discriminant_Type);
11316 pragma Inline (Set_Do_Accessibility_Check);
11317 pragma Inline (Set_Do_Discriminant_Check);
11318 pragma Inline (Set_Do_Length_Check);
11319 pragma Inline (Set_Do_Division_Check);
11320 pragma Inline (Set_Do_Overflow_Check);
11321 pragma Inline (Set_Do_Range_Check);
11322 pragma Inline (Set_Do_Storage_Check);
11323 pragma Inline (Set_Do_Tag_Check);
11324 pragma Inline (Set_Elaborate_Present);
11325 pragma Inline (Set_Elaborate_All_Desirable);
11326 pragma Inline (Set_Elaborate_All_Present);
11327 pragma Inline (Set_Elaborate_Desirable);
11328 pragma Inline (Set_Elaboration_Boolean);
11329 pragma Inline (Set_Else_Actions);
11330 pragma Inline (Set_Else_Statements);
11331 pragma Inline (Set_Elsif_Parts);
11332 pragma Inline (Set_Enclosing_Variant);
11333 pragma Inline (Set_End_Label);
11334 pragma Inline (Set_End_Span);
11335 pragma Inline (Set_Entity);
11336 pragma Inline (Set_Entry_Body_Formal_Part);
11337 pragma Inline (Set_Entry_Call_Alternative);
11338 pragma Inline (Set_Entry_Call_Statement);
11339 pragma Inline (Set_Entry_Direct_Name);
11340 pragma Inline (Set_Entry_Index);
11341 pragma Inline (Set_Entry_Index_Specification);
11342 pragma Inline (Set_Etype);
11343 pragma Inline (Set_Exception_Choices);
11344 pragma Inline (Set_Exception_Handlers);
11345 pragma Inline (Set_Exception_Junk);
11346 pragma Inline (Set_Exception_Label);
11347 pragma Inline (Set_Expansion_Delayed);
11348 pragma Inline (Set_Explicit_Actual_Parameter);
11349 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
11350 pragma Inline (Set_Expression);
11351 pragma Inline (Set_Expressions);
11352 pragma Inline (Set_First_Bit);
11353 pragma Inline (Set_First_Inlined_Subprogram);
11354 pragma Inline (Set_First_Name);
11355 pragma Inline (Set_First_Named_Actual);
11356 pragma Inline (Set_First_Real_Statement);
11357 pragma Inline (Set_First_Subtype_Link);
11358 pragma Inline (Set_Float_Truncate);
11359 pragma Inline (Set_Formal_Type_Definition);
11360 pragma Inline (Set_Forwards_OK);
11361 pragma Inline (Set_From_At_End);
11362 pragma Inline (Set_From_At_Mod);
11363 pragma Inline (Set_From_Default);
11364 pragma Inline (Set_Generic_Associations);
11365 pragma Inline (Set_Generic_Formal_Declarations);
11366 pragma Inline (Set_Generic_Parent);
11367 pragma Inline (Set_Generic_Parent_Type);
11368 pragma Inline (Set_Handled_Statement_Sequence);
11369 pragma Inline (Set_Handler_List_Entry);
11370 pragma Inline (Set_Has_Created_Identifier);
11371 pragma Inline (Set_Has_Dynamic_Length_Check);
11372 pragma Inline (Set_Has_Init_Expression);
11373 pragma Inline (Set_Has_Local_Raise);
11374 pragma Inline (Set_Has_Dynamic_Range_Check);
11375 pragma Inline (Set_Has_No_Elaboration_Code);
11376 pragma Inline (Set_Has_Priority_Pragma);
11377 pragma Inline (Set_Has_Private_View);
11378 pragma Inline (Set_Has_Relative_Deadline_Pragma);
11379 pragma Inline (Set_Has_Storage_Size_Pragma);
11380 pragma Inline (Set_Has_Task_Info_Pragma);
11381 pragma Inline (Set_Has_Task_Name_Pragma);
11382 pragma Inline (Set_Has_Wide_Character);
11383 pragma Inline (Set_Hidden_By_Use_Clause);
11384 pragma Inline (Set_High_Bound);
11385 pragma Inline (Set_Identifier);
11386 pragma Inline (Set_Implicit_With);
11387 pragma Inline (Set_Includes_Infinities);
11388 pragma Inline (Set_Interface_List);
11389 pragma Inline (Set_Interface_Present);
11390 pragma Inline (Set_In_Present);
11391 pragma Inline (Set_Instance_Spec);
11392 pragma Inline (Set_Intval);
11393 pragma Inline (Set_Is_Asynchronous_Call_Block);
11394 pragma Inline (Set_Is_Component_Left_Opnd);
11395 pragma Inline (Set_Is_Component_Right_Opnd);
11396 pragma Inline (Set_Is_Controlling_Actual);
11397 pragma Inline (Set_Is_Dynamic_Coextension);
11398 pragma Inline (Set_Is_Elsif);
11399 pragma Inline (Set_Is_Entry_Barrier_Function);
11400 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
11401 pragma Inline (Set_Is_Folded_In_Parser);
11402 pragma Inline (Set_Is_In_Discriminant_Check);
11403 pragma Inline (Set_Is_Machine_Number);
11404 pragma Inline (Set_Is_Null_Loop);
11405 pragma Inline (Set_Is_Overloaded);
11406 pragma Inline (Set_Is_Power_Of_2_For_Shift);
11407 pragma Inline (Set_Is_Protected_Subprogram_Body);
11408 pragma Inline (Set_Has_Self_Reference);
11409 pragma Inline (Set_Is_Static_Coextension);
11410 pragma Inline (Set_Is_Static_Expression);
11411 pragma Inline (Set_Is_Subprogram_Descriptor);
11412 pragma Inline (Set_Is_Task_Allocation_Block);
11413 pragma Inline (Set_Is_Task_Master);
11414 pragma Inline (Set_Iteration_Scheme);
11415 pragma Inline (Set_Itype);
11416 pragma Inline (Set_Kill_Range_Check);
11417 pragma Inline (Set_Last_Bit);
11418 pragma Inline (Set_Last_Name);
11419 pragma Inline (Set_Library_Unit);
11420 pragma Inline (Set_Label_Construct);
11421 pragma Inline (Set_Left_Opnd);
11422 pragma Inline (Set_Limited_View_Installed);
11423 pragma Inline (Set_Limited_Present);
11424 pragma Inline (Set_Literals);
11425 pragma Inline (Set_Local_Raise_Not_OK);
11426 pragma Inline (Set_Local_Raise_Statements);
11427 pragma Inline (Set_Loop_Actions);
11428 pragma Inline (Set_Loop_Parameter_Specification);
11429 pragma Inline (Set_Low_Bound);
11430 pragma Inline (Set_Mod_Clause);
11431 pragma Inline (Set_More_Ids);
11432 pragma Inline (Set_Must_Be_Byte_Aligned);
11433 pragma Inline (Set_Must_Not_Freeze);
11434 pragma Inline (Set_Must_Not_Override);
11435 pragma Inline (Set_Must_Override);
11436 pragma Inline (Set_Name);
11437 pragma Inline (Set_Names);
11438 pragma Inline (Set_Next_Entity);
11439 pragma Inline (Set_Next_Implicit_With);
11440 pragma Inline (Set_Next_Named_Actual);
11441 pragma Inline (Set_Next_Pragma);
11442 pragma Inline (Set_Next_Rep_Item);
11443 pragma Inline (Set_Next_Use_Clause);
11444 pragma Inline (Set_No_Ctrl_Actions);
11445 pragma Inline (Set_No_Elaboration_Check);
11446 pragma Inline (Set_No_Entities_Ref_In_Spec);
11447 pragma Inline (Set_No_Initialization);
11448 pragma Inline (Set_No_Truncation);
11449 pragma Inline (Set_Null_Present);
11450 pragma Inline (Set_Null_Exclusion_Present);
11451 pragma Inline (Set_Null_Exclusion_In_Return_Present);
11452 pragma Inline (Set_Null_Record_Present);
11453 pragma Inline (Set_Object_Definition);
11454 pragma Inline (Set_Original_Discriminant);
11455 pragma Inline (Set_Original_Entity);
11456 pragma Inline (Set_Others_Discrete_Choices);
11457 pragma Inline (Set_Out_Present);
11458 pragma Inline (Set_Parameter_Associations);
11459 pragma Inline (Set_Parameter_Specifications);
11460 pragma Inline (Set_Parameter_List_Truncated);
11461 pragma Inline (Set_Parameter_Type);
11462 pragma Inline (Set_Parent_Spec);
11463 pragma Inline (Set_PPC_Enabled);
11464 pragma Inline (Set_Position);
11465 pragma Inline (Set_Pragma_Argument_Associations);
11466 pragma Inline (Set_Pragma_Identifier);
11467 pragma Inline (Set_Pragmas_After);
11468 pragma Inline (Set_Pragmas_Before);
11469 pragma Inline (Set_Prefix);
11470 pragma Inline (Set_Present_Expr);
11471 pragma Inline (Set_Prev_Ids);
11472 pragma Inline (Set_Print_In_Hex);
11473 pragma Inline (Set_Private_Declarations);
11474 pragma Inline (Set_Private_Present);
11475 pragma Inline (Set_Procedure_To_Call);
11476 pragma Inline (Set_Proper_Body);
11477 pragma Inline (Set_Protected_Definition);
11478 pragma Inline (Set_Protected_Present);
11479 pragma Inline (Set_Raises_Constraint_Error);
11480 pragma Inline (Set_Range_Constraint);
11481 pragma Inline (Set_Range_Expression);
11482 pragma Inline (Set_Real_Range_Specification);
11483 pragma Inline (Set_Realval);
11484 pragma Inline (Set_Reason);
11485 pragma Inline (Set_Record_Extension_Part);
11486 pragma Inline (Set_Redundant_Use);
11487 pragma Inline (Set_Renaming_Exception);
11488 pragma Inline (Set_Result_Definition);
11489 pragma Inline (Set_Return_Object_Declarations);
11490 pragma Inline (Set_Reverse_Present);
11491 pragma Inline (Set_Right_Opnd);
11492 pragma Inline (Set_Rounded_Result);
11493 pragma Inline (Set_Scope);
11494 pragma Inline (Set_Select_Alternatives);
11495 pragma Inline (Set_Selector_Name);
11496 pragma Inline (Set_Selector_Names);
11497 pragma Inline (Set_Shift_Count_OK);
11498 pragma Inline (Set_Source_Type);
11499 pragma Inline (Set_Specification);
11500 pragma Inline (Set_Statements);
11501 pragma Inline (Set_Static_Processing_OK);
11502 pragma Inline (Set_Storage_Pool);
11503 pragma Inline (Set_Strval);
11504 pragma Inline (Set_Subtype_Indication);
11505 pragma Inline (Set_Subtype_Mark);
11506 pragma Inline (Set_Subtype_Marks);
11507 pragma Inline (Set_Suppress_Loop_Warnings);
11508 pragma Inline (Set_Synchronized_Present);
11509 pragma Inline (Set_Tagged_Present);
11510 pragma Inline (Set_Target_Type);
11511 pragma Inline (Set_Task_Definition);
11512 pragma Inline (Set_Task_Present);
11513 pragma Inline (Set_Then_Actions);
11514 pragma Inline (Set_Then_Statements);
11515 pragma Inline (Set_Triggering_Alternative);
11516 pragma Inline (Set_Triggering_Statement);
11517 pragma Inline (Set_Treat_Fixed_As_Integer);
11518 pragma Inline (Set_TSS_Elist);
11519 pragma Inline (Set_Type_Definition);
11520 pragma Inline (Set_Unit);
11521 pragma Inline (Set_Unknown_Discriminants_Present);
11522 pragma Inline (Set_Unreferenced_In_Spec);
11523 pragma Inline (Set_Variant_Part);
11524 pragma Inline (Set_Variants);
11525 pragma Inline (Set_Visible_Declarations);
11526 pragma Inline (Set_Was_Originally_Stub);
11527 pragma Inline (Set_Zero_Cost_Handling);
11528
11529 N_Simple_Return_Statement : constant Node_Kind := N_Return_Statement;
11530 -- Rename N_Return_Statement to be N_Simple_Return_Statement. Clients
11531 -- should refer to N_Simple_Return_Statement.
11532
11533 end Sinfo;