Daily bump.
[official-gcc.git] / gcc / ada / sinfo.ads
blobba58c82f45fc00fb64252f9b1384202cf1c16477
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S I N F O --
6 -- --
7 -- S p e c --
8 -- --
9 -- $Revision: 1.5 $
10 -- --
11 -- Copyright (C) 1992-2001, Free Software Foundation, Inc. --
12 -- --
13 -- GNAT is free software; you can redistribute it and/or modify it under --
14 -- terms of the GNU General Public License as published by the Free Soft- --
15 -- ware Foundation; either version 2, or (at your option) any later ver- --
16 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
19 -- for more details. You should have received a copy of the GNU General --
20 -- Public License distributed with GNAT; see file COPYING. If not, write --
21 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
22 -- MA 02111-1307, USA. --
23 -- --
24 -- As a special exception, if other files instantiate generics from this --
25 -- unit, or you link this unit with other files to produce an executable, --
26 -- this unit does not by itself cause the resulting executable to be --
27 -- covered by the GNU General Public License. This exception does not --
28 -- however invalidate any other reasons why the executable file might be --
29 -- covered by the GNU Public License. --
30 -- --
31 -- GNAT was originally developed by the GNAT team at New York University. --
32 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
33 -- --
34 ------------------------------------------------------------------------------
36 -- This package defines the structure of the abstract syntax tree. The Tree
37 -- package provides a basic tree structure. Sinfo describes how this
38 -- structure is used to represent the syntax of an Ada program.
40 -- Note: the grammar used here is taken from Version 5.95 of the RM, dated
41 -- November 1994. The grammar in the RM is followed very closely in the tree
42 -- design, and is repeated as part of this source file.
44 -- The tree contains not only the full syntactic representation of the
45 -- program, but also the results of semantic analysis. In particular, the
46 -- nodes for defining identifiers, defining character literals and defining
47 -- operator symbols, collectively referred to as entities, represent what
48 -- would normally be regarded as the symbol table information. In addition
49 -- a number of the tree nodes contain semantic information.
51 -- WARNING: There is a C version of this package. Any changes to this
52 -- source file must be properly reflected in this C header file sinfo.h
53 -- which is created automatically from sinfo.ads using xsinfo.spt.
55 with Types; use Types;
56 with Uintp; use Uintp;
57 with Urealp; use Urealp;
59 package Sinfo is
61 ---------------------------------
62 -- Making Changes to This File --
63 ---------------------------------
65 -- If changes are made to this file, a number of related steps must be
66 -- carried out to ensure consistency. First, if a field access function
67 -- is added, it appears in seven places:
69 -- The documentation associated with the node
70 -- The spec of the access function in sinfo.ads
71 -- The body of the access function in sinfo.adb
72 -- The pragma Inline at the end of sinfo.ads for the access function
73 -- The spec of the set procedure in sinfo.ads
74 -- The body of the set procedure in sinfo.adb
75 -- The pragma Inline at the end of sinfo.ads for the set procedure
77 -- The field chosen must be consistent in all places, and, for a node
78 -- that is a subexpression, must not overlap any of the standard
79 -- expression fields. In the body, the calls to the Dcheck_Node debug
80 -- procedure will need cross-references adding in alphabetical order.
82 -- In addition, if any of the standard expression fields is changed, then
83 -- the utiliy program which creates the Treeprs spec (in file treeprs.ads)
84 -- must be updated appropriately, since it special cases expression fields.
86 -- If a new tree node is added, then the following changes are made
88 -- Add it to the documentation in the appropriate place
89 -- Add its fields to this documentation section
90 -- Define it in the appropriate classification in Node_Kind
91 -- In the body (sinfo), add entries to the Dcheck calls for all
92 -- its fields (except standard expression fields) to include
93 -- the new node in the debug cross-reference list
94 -- Add an appropriate section to the case statement in sprint.adb
95 -- Add an appropriate section to the case statement in sem.adb
96 -- Add an appropraite section to the case statement in exp_util.adb
97 -- (Insert_Actions procedure)
98 -- For a subexpression, add an appropriate sections to the case
99 -- statement in sem_eval.adb
100 -- For a subexpression, add an appropriate sections to the case
101 -- statement in sem_res.adb
103 -- Finally, four utility programs must be run:
105 -- Run CSinfo to check that you have made the changes consistently.
106 -- It checks most of the rules given above, with clear error messages.
107 -- This utility reads sinfo.ads and sinfo.adb and generates a report
108 -- to standard output.
110 -- Run XSinfo to create a-sinfo.h, the corresponding C header. This
111 -- utility reads sinfo.ads and generates a-sinfo.h. Note that it
112 -- does not need to read sinfo.adb, since the contents of the body
113 -- are algorithmically determinable from the spec.
115 -- Run XTreeprs to create treeprs.ads, an updated version of
116 -- the module that is used to drive the tree print routine. This
117 -- utility reads (but does not modify) treeprs.adt, the template
118 -- that provides the basic structure of the file, and then fills
119 -- in the data from the comments in sinfo.ads.
121 -- Run XNmake to create nmake.ads and nmake.adb, the package body
122 -- and spec of the Nmake package which contains functions for
123 -- constructing nodes.
125 -- Note: sometime we could write a utility that actually generated the
126 -- body of sinfo from the spec instead of simply checking it, since, as
127 -- noted above, the contents of the body can be determined from the spec.
129 --------------------------------
130 -- Implicit Nodes in the Tree --
131 --------------------------------
133 -- Generally the structure of the tree very closely follows the grammar
134 -- as defined in the RM. However, certain nodes are omitted to save
135 -- space and simplify semantic processing. Two general classes of such
136 -- omitted nodes are as follows:
138 -- If the only possibilities for a non-terminal are one or more other
139 -- non terminals (i.e. the rule is a "skinny" rule), then usually the
140 -- corresponding node is omitted from the tree, and the target construct
141 -- appears directly. For example, a real type definition is either a
142 -- floating point definition or a fixed point definition. No explicit
143 -- node appears for real type definition. Instead either the floating
144 -- point definition or fixed point definition appears directly.
146 -- If a non-terminal corresponds to a list of some other non-terminal
147 -- (possibly with separating punctuation), then usually it is omitted
148 -- from the tree, and a list of components appears instead. For
149 -- example, sequence of statements does not appear explicitly in the
150 -- tree. Instead a list of statements appears directly.
152 -- Some additional cases of omitted nodes occur and are documented
153 -- individually. In particular, many nodes are omitted in the tree
154 -- generated for an expression.
156 -------------------------------------------
157 -- Handling of Defining Identifier Lists --
158 -------------------------------------------
160 -- In several declarative forms in the syntax, lists of defining
161 -- identifiers appear (object declarations, component declarations,
162 -- number declarations etc.)
164 -- The semantics of such statements are equivalent to a series of
165 -- identical declarations of single defining identifiers (except that
166 -- conformance checks require the same grouping of identifiers in the
167 -- parameter case).
169 -- To simplify semantic processing, the parser breaks down such multiple
170 -- declaration cases into sequences of single declarations, duplicating
171 -- type and initialization information as required. The flags More_Ids
172 -- and Prev_Ids are used to record the original form of the source in
173 -- the case where the original source used a list of names, More_Ids
174 -- being set on all but the last name and Prev_Ids being set on all
175 -- but the first name. These flags are used to reconstruct the original
176 -- source (e.g. in the Sprint package), and also are included in the
177 -- conformance checks, but otherwise have no semantic significance.
179 -- Note: the reason that we use More_Ids and Prev_Ids rather than
180 -- First_Name and Last_Name flags is so that the flags are off in the
181 -- normal one identifier case, which minimizes tree print output.
183 -----------------------
184 -- Use of Node Lists --
185 -----------------------
187 -- With a few exceptions, if a construction of the form {non-terminal}
188 -- appears in the tree, lists are used in the corresponding tree node
189 -- (see package Nlists for handling of node lists). In this case a field
190 -- of the parent node points to a list of nodes for the non-terminal. The
191 -- field name for such fields has a plural name which always ends in "s".
192 -- For example, a case statement has a field Alternatives pointing to a
193 -- list of case statement alternative nodes.
195 -- Only fields pointing to lists have names ending in "s", so generally
196 -- the structure is strongly typed, fields not ending in s point to
197 -- single nodes, and fields ending in s point to lists.
199 -- The following example shows how a traversal of a list is written. We
200 -- suppose here that Stmt points to a N_Case_Statement node which has
201 -- a list field called Alternatives:
203 -- Alt := First (Alternatives (Stmt));
204 -- while Present (Alt) loop
205 -- ..
206 -- -- processing for case statement alternative Alt
207 -- ..
208 -- Alt := Next (Alt);
209 -- end loop;
211 -- The Present function tests for Empty, which in this case signals the
212 -- end of the list. First returns Empty immediately if the list is empty.
213 -- Present is defined in Atree, First and Next are defined in Nlists.
215 -- The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
216 -- contexts, which is handled as described in the previous section, and
217 -- with {,library_unit_NAME} in the N_With_Clause mode, which is handled
218 -- using the First_Name and Last_Name flags, as further detailed in the
219 -- description of the N_With_Clause node.
221 -------------
222 -- Pragmas --
223 -------------
225 -- Pragmas can appear in many different context, but are not included
226 -- in the grammar. Still they must appear in the tree, so they can be
227 -- properly processed.
229 -- Two approaches are used. In some cases, an extra field is defined
230 -- in an appropriate node that contains a list of pragmas appearing
231 -- in the expected context. For example pragmas can appear before an
232 -- Accept_Alternative in a Selective_Accept_Statement, and these pragmas
233 -- appear in the Pragmas_Before field of the N_Accept_Alternative node.
235 -- The other approach is to simply allow pragmas to appear in syntactic
236 -- lists where the grammar (of course) does not include the possibility.
237 -- For example, the Variants field of an N_Variant_Part node points to
238 -- a list that can contain both N_Pragma and N_Variant nodes.
240 -- To make processing easier in the latter case, the Nlists package
241 -- provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
242 -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be
243 -- handled ignoring all pragmas.
245 -- In the case of the variants list, we can either write:
247 -- Variant := First (Variants (N));
248 -- while Present (Variant) loop
249 -- ...
250 -- Alt := Next (Alt);
251 -- end loop;
253 -- or
255 -- Variant := First_Non_Pragma (Variants (N));
256 -- while Present (Variant) loop
257 -- ...
258 -- Alt := Next_Non_Pragma (Alt);
259 -- end loop;
261 -- In the first form of the loop, Variant can either be an N_Pragma or
262 -- an N_Variant node. In the second form, Variant can only be N_Variant
263 -- since all pragmas are skipped.
265 ---------------------
266 -- Optional Fields --
267 ---------------------
269 -- Fields which correspond to a section of the syntax enclosed in square
270 -- brackets are generally omitted (and the corresponding field set to
271 -- Empty for a node, or No_List for a list). The documentation of such
272 -- fields notes these cases. One exception to this rule occurs in the
273 -- case of possibly empty statement sequences (such as the sequence of
274 -- statements in an entry call alternative). Such cases appear in the
275 -- syntax rules as [SEQUENCE_OF_STATEMENTS] and the fields corresponding
276 -- to such optional statement sequences always contain an empty list (not
277 -- No_List) if no statements are present.
279 -- Note: the utility program that constructs the body and spec of the
280 -- Nmake package relies on the format of the comments to determine if
281 -- a field should have a default value in the corresponding make routine.
282 -- The rule is that if the first line of the description of the field
283 -- contains the string "(set to xxx if", then a default value of xxx is
284 -- provided for this field in the corresponding Make_yyy routine.
286 -----------------------------------
287 -- Note on Body/Spec Terminology --
288 -----------------------------------
290 -- In informal discussions about Ada, it is customary to refer to package
291 -- and subprogram specs and bodies. However, this is not technically
292 -- correct, what is normally referred to as a spec or specification is in
293 -- fact a package declaration or subprogram declaration. We are careful
294 -- in GNAT to use the correct terminology and in particular, the full
295 -- word specification is never used as an incorrect substitute for
296 -- declaration. The structure and terminology used in the tree also
297 -- reflects the grammar and thus uses declaration and specification in
298 -- the technically correct manner.
300 -- However, there are contexts in which the informal terminology is
301 -- useful. We have the word "body" to refer to the Interp_Etype declared by
302 -- the declaration of a unit body, and in some contexts we need a
303 -- similar term to refer to the entity declared by the package or
304 -- subprogram declaration, and simply using declaration can be confusing
305 -- since the body also has a declaration.
307 -- An example of such a context is the link between the package body
308 -- and its declaration. With_Declaration is confusing, since
309 -- the package body itself is a declaration.
311 -- To deal with this problem, we reserve the informal term Spec, i.e.
312 -- the popular abbreviation used in this context, to refer to the entity
313 -- declared by the package or subprogram declaration. So in the above
314 -- example case, the field in the body is called With_Spec.
316 -- Another important context for the use of the word Spec is in error
317 -- messages, where a hyper-correct use of declaration would be confusing
318 -- to a typical Ada programmer, and even for an expert programmer can
319 -- cause confusion since the body has a declaration as well.
321 -- So, to summarize:
323 -- Declaration always refers to the syntactic entity that is called
324 -- a declaration. In particular, subprogram declaration
325 -- and package declaration are used to describe the
326 -- syntactic entity that includes the semicolon.
328 -- Specification always refers to the syntactic entity that is called
329 -- a specification. In particular, the terms procedure
330 -- specification, function specification, package
331 -- specification, subprogram specification always refer
332 -- to the syntactic entity that has no semicolon.
334 -- Spec is an informal term, used to refer to the entity
335 -- that is declared by a task declaration, protected
336 -- declaration, generic declaration, subprogram
337 -- declaration or package declaration.
339 -- This convention is followed throughout the GNAT documentation
340 -- both internal and external, and in all error message text.
342 ------------------------
343 -- Internal Use Nodes --
344 ------------------------
346 -- These are Node_Kind settings used in the internal implementation
347 -- which are not logically part of the specification.
349 -- N_Unused_At_Start
350 -- Completely unused entry at the start of the enumeration type. This
351 -- is inserted so that no legitimate value is zero, which helps to get
352 -- better debugging behavior, since zero is a likely uninitialized value).
354 -- N_Unused_At_End
355 -- Completely unused entry at the end of the enumeration type. This is
356 -- handy so that arrays with Node_Kind as the index type have an extra
357 -- entry at the end (see for example the use of the Pchar_Pos_Array in
358 -- Treepr, where the extra entry provides the limit value when dealing
359 -- with the last used entry in the array).
361 -----------------------------------------
362 -- Note on the settings of Sloc fields --
363 -----------------------------------------
365 -- The Sloc field of nodes that come from the source is set by the
366 -- parser. For internal nodes, and nodes generated during expansion
367 -- the Sloc is usually set in the call to the constructor for the node.
368 -- In general the Sloc value chosen for an internal node is the Sloc of
369 -- the source node whose processing is responsible for the expansion. For
370 -- example, the Sloc of an inherited primitive operation is the Sloc of
371 -- the corresponding derived type declaration.
373 -- For the nodes of a generic instantiation, the Sloc value is encoded
374 -- to represent both the original Sloc in the generic unit, and the Sloc
375 -- of the instantiation itself. See Sinput.ads for details.
377 -- Subprogram instances create two callable entities: one is the visible
378 -- subprogram instance, and the other is an anonymous subprogram nested
379 -- within a wrapper package that contains the renamings for the actuals.
380 -- Both of these entities have the Sloc of the defining entity in the
381 -- instantiation node. This simplifies some ASIS queries.
383 -----------------------
384 -- Field Definitions --
385 -----------------------
387 -- In the following node definitions, all fields, both syntactic and
388 -- semantic, are documented. The one exception is in the case of entities
389 -- (defining identifiers, character literals and operator symbols),
390 -- where the usage of the fields depends on the entity kind. Entity
391 -- fields are fully documented in the separate package Einfo.
393 -- In the node definitions, three common sets of fields are abbreviated
394 -- to save both space in the documentation, and also space in the string
395 -- (defined in Tree_Print_Strings) used to print trees. The following
396 -- abbreviations are used:
398 -- Note: the utility program that creates the Treeprs spec (in the file
399 -- treeprs.ads) knows about the special fields here, so it must be
400 -- modified if any change is made to these fields.
402 -- "plus fields for binary operator"
403 -- Chars (Name1) Name_Id for the operator
404 -- Left_Opnd (Node2) left operand expression
405 -- Right_Opnd (Node3) right operand expression
406 -- Entity (Node4-Sem) defining entity for operator
407 -- Associated_Node (Node4-Sem) for generic processing
408 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
409 -- Has_Private_View (Flag11-Sem) set in generic units.
411 -- "plus fields for unary operator"
412 -- Chars (Name1) Name_Id for the operator
413 -- Right_Opnd (Node3) right operand expression
414 -- Entity (Node4-Sem) defining entity for operator
415 -- Associated_Node (Node4-Sem) for generic processing
416 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
417 -- Has_Private_View (Flag11-Sem) set in generic units.
419 -- "plus fields for expression"
420 -- Paren_Count number of parentheses levels
421 -- Etype (Node5-Sem) type of the expression
422 -- Is_Overloaded (Flag5-Sem) >1 type interpretation exists
423 -- Is_Static_Expression (Flag6-Sem) set for static expression
424 -- Raises_Constraint_Error (Flag7-Sem) evaluation raises CE
425 -- Must_Not_Freeze (Flag8-Sem) set if must not freeze
426 -- Do_Range_Check (Flag9-Sem) set if a range check needed
427 -- Assignment_OK (Flag15-Sem) set if modification is OK
428 -- Is_Controlling_Actual (Flag16-Sem) set for controlling argument
430 -- Note: see under (EXPRESSION) for further details on the use of
431 -- the Paren_Count field to record the number of parentheses levels.
433 -- Node_Kind is the type used in the Nkind field to indicate the node
434 -- kind. The actual definition of this type is given later (the reason
435 -- for this is that we want the descriptions ordered by logical chapter
436 -- in the RM, but the type definition is reordered to facilitate the
437 -- definition of some subtype ranges. The individual descriptions of
438 -- the nodes show how the various fields are used in each node kind,
439 -- as well as providing logical names for the fields. Functions and
440 -- procedures are provided for accessing and setting these fields
441 -- using these logical names.
443 -----------------------
444 -- Gigi Restrictions --
445 -----------------------
447 -- The tree passed to Gigi is more restricted than the general tree form.
448 -- For example, as a result of expansion, most of the tasking nodes can
449 -- never appear. For each node to which either a complete or partial
450 -- restriction applies, a note entitled "Gigi restriction" appears which
451 -- documents the restriction.
453 -- Note that most of these restrictions apply only to trees generated when
454 -- code is being generated, since they involved expander actions that
455 -- destroy the tree.
457 ------------------------
458 -- Common Flag Fields --
459 ------------------------
461 -- The following flag fields appear in all nodes
463 -- Analyzed
464 -- This flag is used to indicate that a node (and all its children
465 -- have been analyzed. It is used to avoid reanalysis of a node that
466 -- has already been analyzed, both for efficiency and functional
467 -- correctness reasons.
469 -- Error_Posted
470 -- This flag is used to avoid multiple error messages being posted
471 -- on or referring to the same node. This flag is set if an error
472 -- message refers to a node or is posted on its source location,
473 -- and has the effect of inhibiting further messages involving
474 -- this same node.
476 -- Comes_From_Source
477 -- This flag is on for any nodes built by the scanner or parser from
478 -- the source program, and off for any nodes built by the analyzer or
479 -- expander. It indicates that a node comes from the original source.
480 -- This flag is defined in Atree.
482 -- Has_Dynamic_Length_Check and Has_Dynamic_Range_Check also appear on
483 -- all nodes. They are fully described in the next section.
485 ------------------------------------
486 -- Description of Semantic Fields --
487 ------------------------------------
489 -- The meaning of the syntactic fields is generally clear from their
490 -- names without any further description, since the names are chosen
491 -- to correspond very closely to the syntax in the reference manual.
492 -- This section describes the usage of the semantic fields, which are
493 -- used to contain additional information determined during semantic
494 -- analysis.
496 -- ABE_Is_Certain (Flag18-Sem)
497 -- This flag is set in an instantiation node or a call node is
498 -- determined to be sure to raise an ABE. This is used to trigger
499 -- special handling of such cases, particularly in the instantiation
500 -- case where we avoid instantiating the body if this flag is set.
501 -- This flag is also present in an N_Formal_Package_Declaration_Node
502 -- since formal package declarations are treated like instantiations,
503 -- but it is always set to False in this context.
505 -- Accept_Handler_Records (List5-Sem)
506 -- This field is present only in an N_Accept_Alternative node. It is
507 -- used to temporarily hold the exception handler records from an
508 -- accept statement in a selective accept. These exception handlers
509 -- will eventually be placed in the Handler_Records list of the
510 -- procedure built for this accept (see Expand_N_Selective_Accept
511 -- procedure in Exp_Ch9 for further details).
513 -- Access_Types_To_Process (Elist2-Sem)
514 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
515 -- Contains the list of access types which may require specific
516 -- treatment when the nature of the type completion is completely
517 -- known. An example of such treatement is the generation of the
518 -- associated_final_chain.
520 -- Actions (List1-Sem)
521 -- This field contains a sequence of actions that are associated
522 -- with the node holding the field. See the individual node types
523 -- for details of how this field is used, as well as the description
524 -- of the specific use for a particular node type.
526 -- Activation_Chain_Entity (Node3-Sem)
527 -- This is used in tree nodes representing task activators (blocks,
528 -- subprogram bodies, package declarations, and task bodies). It is
529 -- initially Empty, and then gets set to point to the entity for the
530 -- declared Activation_Chain variable when the first task is declared.
531 -- When tasks are declared in the corresponding declarative region
532 -- this entity is located by name (its name is always _Chain) and
533 -- the declared tasks are added to the chain.
535 -- Acts_As_Spec (Flag4-Sem)
536 -- A flag set in the N_Subprogram_Body node for a subprogram body
537 -- which is acting as its own spec. This flag also appears in the
538 -- compilation unit node at the library level for such a subprogram
539 -- (see further description in spec of Lib package).
541 -- Aggregate_Bounds (Node3-Sem)
542 -- Present in array N_Aggregate nodes. If the aggregate contains
543 -- component associations this field points to an N_Range node whose
544 -- bounds give the lowest and highest discrete choice values. If the
545 -- named aggregate contains a dynamic or null choice this field is
546 -- empty. If the aggregate contains positional elements this field
547 -- points to an N_Integer_Literal node giving the number of positional
548 -- elements. Note that if the aggregate contains positional elements
549 -- and an other choice the N_Integer_Literal only accounts for the
550 -- number of positional elements.
552 -- All_Others (Flag11-Sem)
553 -- Present in an N_Others_Choice node. This flag is set in the case
554 -- of an others exception where all exceptions, even those that are
555 -- not normally handled (in particular the tasking abort signal) by
556 -- others. This is used for translation of the at end handler into
557 -- a normal exception handler.
559 -- Assignment_OK (Flag15-Sem)
560 -- This flag is set in a subexpression node for an object, indicating
561 -- that the associated object can be modified, even if this would not
562 -- normally be permissible (either by direct assignment, or by being
563 -- passed as an out or in-out parameter). This is used by the expander
564 -- for a number of purposes, including initialzation of constants and
565 -- limited type objects (such as tasks), setting discriminant fields,
566 -- setting tag values, etc. N_Object_Declaration nodes also have this
567 -- flag defined. Here it is used to indicate that an initialization
568 -- expression is valid, even where it would normally not be allowed
569 -- (e.g. where the type involved is limited).
571 -- Associated_Node (Node4-Sem)
572 -- Present in nodes that can denote an entity: identifiers, character
573 -- literals, operator symbols, expanded names, operator nodes and
574 -- attribute reference nodes (all these nodes have an Entity field).
575 -- This field is also present in N_Aggregate, N_Selected_Component,
576 -- and N_Extension_Aggregate nodes. This field is used during generic
577 -- processing to relate nodes in the original template to nodes in the
578 -- generic copy. It overlaps the Entity field, and is used to capture
579 -- global references in the analyzed copy and place them in the template.
580 -- See description in Sem_Ch12 for further details on this usage.
582 -- At_End_Proc (Node1)
583 -- This field is present in an N_Handled_Sequence_Of_Statements node.
584 -- It contains an identifier reference for the cleanup procedure to
585 -- be called. See description of this node for further details.
587 -- Backwards_OK (Flag6-Sem)
588 -- A flag present in the N_Assignment_Statement node. It is used only
589 -- if the type being assigned is an array type, and is set if analysis
590 -- determines that it is definitely safe to do the copy backwards, i.e.
591 -- starting at the highest addressed element. Note that if neither of
592 -- the flags Forwards_OK or Backwards_OK is set, it means that the
593 -- front end could not determine that either direction is definitely
594 -- safe, and a runtime check is required.
596 -- Body_To_Inline (Node3-Sem)
597 -- present in subprogram declarations. Denotes analyzed but unexpanded
598 -- body of subprogram, to be used when inlining calls. Present when the
599 -- subprogram has an Inline pragma and inlining is enabled. If the
600 -- declaration is completed by a renaming_as_body, and the renamed en-
601 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
602 -- which is used directly in later calls to the original subprogram.
604 -- Body_Required (Flag13-Sem)
605 -- A flag that appears in the N_Compilation_Unit node indicating that
606 -- the corresponding unit requires a body. For the package case, this
607 -- indicates that a completion is required. In Ada 95, if the flag
608 -- is not set for the package case, then a body may not be present.
609 -- In Ada 83, if the flag is not set for the package case, then a
610 -- body is optional. For a subprogram declaration, the flag is set
611 -- except in the case where a pragma Import or Interface applies,
612 -- in which case no body is permitted (in Ada 83 or Ada 95).
614 -- By_Ref (Flag5-Sem)
615 -- A flag present in the N_Return_Statement_Node. It is set when the
616 -- returned expression is already allocated on the secondary stack
617 -- and thus the result is passed by reference rather than copied
618 -- another time.
620 -- Compile_Time_Known_Aggregate (Flag18-Sem)
621 -- Present in N_Aggregate nodes. Set for aggregates which can be
622 -- fully evaluated at compile time without raising constraint error.
623 -- Such aggregates can be passed as is to Gigi without any expansion.
624 -- See Sem_Aggr for the specific conditions under which an aggregate
625 -- has this flag set. See also the flag Static_Processing_OK.
627 -- Condition_Actions (List3-Sem)
628 -- This field appears in else-if nodes and in the iteration scheme
629 -- node for while loops. This field is only used during semantic
630 -- processing to temporarily hold actions inserted into the tree.
631 -- In the tree passed to gigi, the condition actions field is always
632 -- set to No_List. For details on how this field is used, see the
633 -- routine Insert_Actions in package Exp_Util, and also the expansion
634 -- routines for the relevant nodes.
636 -- Controlling_Argument (Node1-Sem)
637 -- This field is set in procedure and function call nodes if the call
638 -- is a dispatching call (it is Empty for a non-dispatching call).
639 -- It indicates the source of the controlling tag for the call. For
640 -- Procedure calls, the Controlling_Argument is one of the actuals.
641 -- For a function that has a dispatching result, it is an entity in
642 -- the context of the call that can provide a tag, or else it is the
643 -- tag of the root type of the class.
645 -- Conversion_OK (Flag14-Sem)
646 -- A flag set on type conversion nodes to indicate that the conversion
647 -- is to be considered as being valid, even though it is the case that
648 -- the conversion is not valid Ada. This is used for the Enum_Rep,
649 -- Fixed_Value and Integer_Value attributes, for internal conversions
650 -- done for fixed-point operations, and for certain conversions for
651 -- calls to initialization procedures. If Conversion_OK is set, then
652 -- Etype must be set (the analyzer assumes that Etype has been set).
653 -- For the case of fixed-point operands, it also indicates that the
654 -- conversion is to be a direct conversion of the underlying integer
655 -- result, with no regard to the small operand.
657 -- Corresponding_Body (Node5-Sem)
658 -- This field is set in subprogram declarations, where it is needed
659 -- if a pragma Inline is present and the subprogram is called, in
660 -- generic declarations if the generic is instantiated, and also in
661 -- package declarations that contain inlined subprograms that are
662 -- called, or generic declarations that are instantiated. It points
663 -- to the defining entity for the corresponding body.
665 -- Corresponding_Generic_Association (Node5-Sem)
666 -- This field is defined for object declarations and object renaming
667 -- declarations. It is set for the declarations within an instance that
668 -- map generic formals to their actuals. If set, the field points to
669 -- a generic_association which is the original parent of the expression
670 -- or name appearing in the declaration. This simplifies ASIS queries.
672 -- Corresponding_Integer_Value (Uint4-Sem)
673 -- This field is set in real literals of fixed-point types (it is not
674 -- used for floating-point types). It contains the integer value used
675 -- to represent the fixed-point value. It is also set on the universal
676 -- real literals used to represent bounds of fixed-point base types
677 -- and their first named subtypes.
679 -- Corresponding_Spec (Node5-Sem)
680 -- This field is set in subprogram, package, task, and protected body
681 -- nodes, where it points to the defining entity in the corresponding
682 -- spec. The attribute is also set in N_With_Clause nodes, where
683 -- it points to the defining entity for the with'ed spec, and in
684 -- a subprogram renaming declaration when it is a Renaming_As_Body.
685 -- The field is Empty if there is no corresponding spec, as in the
686 -- case of a subprogram body that serves as its own spec.
688 -- Corresponding_Stub (Node3-Sem)
689 -- This field is present in an N_Subunit node. It holds the node in
690 -- the parent unit that is the stub declaration for the subunit. it is
691 -- set when analysis of the stub forces loading of the proper body. If
692 -- expansion of the proper body creates new declarative nodes, they are
693 -- inserted at the point of the corresponding_stub.
695 -- Dcheck_Function (Node5-Sem)
696 -- This field is present in an N_Variant node, It references the entity
697 -- for the discriminant checking function for the variant.
699 -- Debug_Statement (Node3)
700 -- This field is present in an N_Pragma node. It is used only for
701 -- a Debug pragma or pragma Assert with a second parameter. The
702 -- parameter is of the form of an expression, as required by the
703 -- pragma syntax, but is actually a procedure call. To simplify
704 -- semantic processing, the parser creates a copy of the argument
705 -- rearranged into a procedure call statement and places it in the
706 -- Debug_Statement field. Note that this field is considered a
707 -- syntactic field, since it is created by the parser.
709 -- Default_Expression (Node5-Sem)
710 -- This field is Empty if there is no default expression. If there
711 -- is a simple default expression (one with no side effects), then
712 -- this field simply contains a copy of the Expression field (both
713 -- point to the tree for the default expression). Default_Expression
714 -- is used for conformance checking.
716 -- Delay_Finalize_Attach (Flag14-Sem)
717 -- This flag is present in an N_Object_Declaration node. If it is set,
718 -- then in the case of a controlled type being declared and initialized,
719 -- the normal code for attaching the result to the appropriate local
720 -- finalization list is suppressed. This is used for functions that
721 -- return controlled types without using the secondary stack, where
722 -- it is the caller who must do the attachment.
724 -- Discr_Check_Funcs_Built (Flag11-Sem)
725 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
726 -- discriminant checking functions are constructed. The purpose is to
727 -- avoid attempting to set these functions more than once.
729 -- Do_Access_Check (Flag11-Sem)
730 -- This flag is set on nodes with a Prefix field that can be an object
731 -- of an access type. If the flag is set, it indicates that a check is
732 -- required to ensure that the value of the referenced object is not
733 -- null. The actual check (which may be explicit or implicit by means
734 -- of some trap), is generated by Gigi (all the front end does is to
735 -- set this flag to request the trap).
737 -- Do_Accessibility_Check (Flag13-Sem)
738 -- This flag is set on N_Parameter_Specification nodes to indicate
739 -- that an accessibility check is required for the parameter. It is
740 -- not yet decided who takes care of this check (TBD ???).
742 -- Do_Discriminant_Check (Flag13-Sem)
743 -- This flag is set on N_Selected_Component nodes to indicate that a
744 -- discriminant check is required using the discriminant check routine
745 -- associated with the selector. The actual check is dealt with by
746 -- Gigi (all the front end does is to set the flag).
748 -- Do_Division_Check (Flag13-Sem)
749 -- This flag is set on a division operator (/ mod rem) to indicate
750 -- that a zero divide check is required. The actual check is dealt
751 -- with by the backend (all the front end does is to set the flag).
753 -- Do_Length_Check (Flag4-Sem)
754 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
755 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
756 -- is required. It is not determined who deals with this flag (???).
758 -- Do_Overflow_Check (Flag17-Sem)
759 -- This flag is set on an operator where an overflow check is required
760 -- on the operation. The actual check is dealt with by the backend
761 -- (all the front end does is to set the flag). The other cases where
762 -- this flag is used is on a Type_Conversion node and for attribute
763 -- reference nodes. For a type conversion, it means that the conversion
764 -- is from one base type to another, and the value may not fit in the
765 -- target base type. See also the description of Do_Range_Check for
766 -- this case. The only attribute references which use this flag are
767 -- Pred and Succ, where it means that the result should be checked
768 -- for going outside the base range.
770 -- Do_Range_Check (Flag9-Sem)
771 -- This flag is set on an expression which appears in a context where
772 -- a range check is required. The target type is clear from the
773 -- context. The contexts in which this flag can appear are limited to
774 -- the following.
776 -- Right side of an assignment. In this case the target type is
777 -- taken from the left side of the assignment, which is referenced
778 -- by the Name of the N_Assignment_Statement node.
780 -- Subscript expressions in an indexed component. In this case the
781 -- target type is determined from the type of the array, which is
782 -- referenced by the Prefix of the N_Indexed_Component node.
784 -- Argument expression for a parameter, appearing either directly
785 -- in the Parameter_Associations list of a call or as the Expression
786 -- of an N_Parameter_Association node that appears in this list. In
787 -- either case, the check is against the type of the formal. Note
788 -- that the flag is relevant only in IN and IN OUT parameters, and
789 -- will be ignored for OUT parameters, where no check is required
790 -- in the call, and if a check is required on the return, it is
791 -- generated explicitly with a type conversion.
793 -- Initialization expression for the initial value in an object
794 -- declaration. In this case the Do_Range_Check flag is set on
795 -- the initialization expression, and the check is against the
796 -- range of the type of the object being declared.
798 -- The expression of a type conversion. In this case the range check
799 -- is against the target type of the conversion. See also the use of
800 -- Do_Overflow_Check on a type conversion. The distinction is that
801 -- the ovrflow check protects against a value that is outside the
802 -- range of the target base type, whereas a range check checks that
803 -- the resulting value (which is a value of the base type of the
804 -- target type), satisfies the range constraint of the target type.
806 -- Note: when a range check is required in contexts other than those
807 -- listed above (e.g. in a return statement), an additional type
808 -- conversion node is introduced to represent the required check.
810 -- Do_Storage_Check (Flag17-Sem)
811 -- This flag is set in an N_Allocator node to indicate that a storage
812 -- check is required for the allocation, or in an N_Subprogram_Body
813 -- node to indicate that a stack check is required in the subprogram
814 -- prolog. The N_Allocator case is handled by the routine that expands
815 -- the call to the runtime routine. The N_Subprogram_Body case is
816 -- handled by the backend, and all the semantics does is set the flag.
818 -- Do_Tag_Check (Flag13-Sem)
819 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
820 -- N_Procedure_Call_Statement, N_Type_Conversion or N_Return_Statememt
821 -- node to indicate that the tag check can be suppressed. It is not
822 -- yet decided how this flag is used (TBD ???).
824 -- Elaborate_Present (Flag4-Sem)
825 -- This flag is set in the N_With_Clause node to indicate that a
826 -- pragma Elaborate pragma appears for the with'ed units.
828 -- Elaborate_All_Present (Flag15-Sem)
829 -- This flag is set in the N_With_Clause node to indicate that a
830 -- pragma Elaborate_All pragma appears for the with'ed units.
832 -- Elaboration_Boolean (Node2-Sem)
833 -- This field is present in function and procedure specification
834 -- nodes. If set, it points to the entity for a Boolean flag that
835 -- must be tested for certain calls to check for access before
836 -- elaboration. See body of Sem_Elab for further details. This
837 -- field is Empty if no elaboration boolean is required.
839 -- Else_Actions (List3-Sem)
840 -- This field is present in conditional expression nodes. During code
841 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
842 -- actions at an appropriate place in the tree to get elaborated at the
843 -- right time. For conditional expressions, we have to be sure that the
844 -- actions for the Else branch are only elaborated if the condition is
845 -- False. The Else_Actions field is used as a temporary parking place
846 -- for these actions. The final tree is always rewritten to eliminate
847 -- the need for this field, so in the tree passed to Gigi, this field
848 -- is always set to No_List.
850 -- Enclosing_Variant (Node2-Sem)
851 -- This field is present in the N_Variant node and identifies the
852 -- Node_Id corresponding to the immediately enclosing variant when
853 -- the variant is nested, and N_Empty otherwise. Set during semantic
854 -- processing of the variant part of a record type.
856 -- Entity (Node4-Sem)
857 -- Appears in all direct names (identifier, character literal,
858 -- operator symbol), as well as expanded names, and attributes that
859 -- denote entities, such as 'Class. Points to the entity for the
860 -- corresponding defining occurrence. Set after name resolution.
861 -- In the case of identifiers in a WITH list, the corresponding
862 -- defining occurrence is in a separately compiled file, and this
863 -- pointer must be set using the library Load procedure. Note that
864 -- during name resolution, the value in Entity may be temporarily
865 -- incorrect (e.g. during overload resolution, Entity is initially
866 -- set to the first possible correct interpretation, and then later
867 -- modified if necessary to contain the correct value after resolution).
868 -- Note that Associated_Node overlays this field during the processing
869 -- of generics. See Sem_Ch12 for further details.
871 -- Etype (Node5-Sem)
872 -- Appears in all expression nodes, all direct names, and all
873 -- entities. Points to the entity for the related type. Set after
874 -- type resolution. Normally this is the actual subtype of the
875 -- expression. However, in certain contexts such as the right side
876 -- of an assignment, subscripts, arguments to calls, returned value
877 -- in a function, initial value etc. it is the desired target type.
878 -- In the event that this is different from the actual type, the
879 -- Do_Range_Check flag will be set if a range check is required.
880 -- Note: if the Is_Overloaded flag is set, then Etype points to
881 -- an essentially arbitrary choice from the possible set of types.
883 -- Exception_Junk (Flag11-Sem)
884 -- This flag is set in a various nodes appearing in a statement
885 -- sequence to indicate that the corresponding node is an artifact
886 -- of the generated code for exception handling, and should be
887 -- ignored when analyzing the control flow of the relevant sequence
888 -- of statements (e.g. to check that it does not end with a bad
889 -- return statement).
891 -- Expansion_Delayed (Flag11-Sem)
892 -- Set on aggregates and extension aggregates that need a top-down
893 -- rather than bottom up expansion. Typically aggregate expansion
894 -- happens bottom up. For nested aggregates the expansion is delayed
895 -- until the enclosing aggregate itself is expanded, e.g. in the context
896 -- of a declaration. To delay it we set this flag. This is done to
897 -- avoid creating a temporary for each level of a nested aggregates,
898 -- and also to prevent the premature generation of constraint checks.
899 -- This is also a requirement if we want to generate the proper
900 -- attachment to the internal finalization lists (for record with
901 -- controlled components). Top down expansion of aggregates is also
902 -- used for in-place array aggregate assignment or initialization.
903 -- When the full context is known, the target of the assignment or
904 -- initialization is used to generate the left-hand side of individual
905 -- assignment to each sub-component.
907 -- First_Inlined_Subprogram (Node3-Sem)
908 -- Present in the N_Compilation_Unit node for the main program. Points
909 -- to a chain of entities for subprograms that are to be inlined. The
910 -- Next_Inlined_Subprogram field of these entities is used as a link
911 -- pointer with Empty marking the end of the list. This field is Empty
912 -- if there are no inlined subprograms or inlining is not active.
914 -- First_Named_Actual (Node4-Sem)
915 -- Present in procedure call statement and function call nodes, and
916 -- also in Intrinsic nodes. Set during semantic analysis to point to
917 -- the first named parameter where parameters are ordered by declaration
918 -- order (as opposed to the actual order in the call which may be
919 -- different due to named associations). Note: this field points to the
920 -- explicit actual parameter itself, not the N_Parameter_Association
921 -- node (its parent).
923 -- First_Real_Statement (Node2-Sem)
924 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
925 -- Empty. Used only when declarations are moved into the statement
926 -- part of a construct as a result of wrapping an AT END handler that
927 -- is required to cover the declarations. In this case, this field is
928 -- used to remember the location in the statements list of the first
929 -- real statement, i.e. the statement that used to be first in the
930 -- statement list before the declarations were prepended.
932 -- First_Subtype_Link (Node5-Sem)
933 -- Present in N_Freeze_Entity node for an anonymous base type that
934 -- is implicitly created by the declaration of a first subtype. It
935 -- points to the entity for the first subtype.
937 -- Float_Truncate (Flag11-Sem)
938 -- A flag present in type conversion nodes. This is used for float
939 -- to integer conversions where truncation is required rather than
940 -- rounding. Note that Gigi does not handle type conversions from real
941 -- to integer with rounding (see Expand_N_Type_Conversion).
943 -- Forwards_OK (Flag5-Sem)
944 -- A flag present in the N_Assignment_Statement node. It is used only
945 -- if the type being assigned is an array type, and is set if analysis
946 -- determines that it is definitely safe to do the copy forwards, i.e.
947 -- starting at the lowest addressed element. Note that if neither of
948 -- the flags Forwards_OK or Backwards_OK is set, it means that the
949 -- front end could not determine that either direction is definitely
950 -- safe, and a runtime check is required.
952 -- From_At_Mod (Flag4-Sem)
953 -- This flag is set on the attribute definition clause node that is
954 -- generated by a transformation of an at mod phrase in a record
955 -- representation clause. This is used to give slightly different
956 -- (Ada 83 compatible) semantics to such a clause, namely it is
957 -- used to specify a minimum acceptable alignment for the base type
958 -- and all subtypes. In Ada 95 terms, the actual alignment of the
959 -- base type and all subtypes must be a multiple of the given value,
960 -- and the representation clause is considered to be type specific
961 -- instead of subtype specific.
963 -- Generic_Parent (Node5-Sem)
964 -- Generic_parent is defined on declaration nodes that are instances.
965 -- The value of Generic_Parent is the generic entity from which the
966 -- instance is obtained. Generic_Parent is also defined for the renaming
967 -- declarations and object declarations created for the actuals in an
968 -- instantiation. The generic parent of such a declaration is the
969 -- corresponding generic association in the Instantiation node.
971 -- Generic_Parent_Type (Node4-Sem)
972 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for
973 -- the actuals of formal private and derived types. Within the instance,
974 -- the operations on the actual are those inherited from the parent.
975 -- For a formal private type, the parent type is the generic type
976 -- itself. The Generic_Parent_Type is also used in an instance to
977 -- determine whether a private operation overrides an inherited one.
979 -- Handler_List_Entry (Node2-Sem)
980 -- This field is present in N_Object_Declaration nodes. It is set only
981 -- for the Handler_Record entry generated for an exception in zero cost
982 -- exception handling mode. It references the corresponding item in the
983 -- handler list, and is used to delete this entry if the corresponding
984 -- handler is deleted during optimization. For further details on why
985 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
987 -- Has_Dynamic_Length_Check (Flag10-Sem)
988 -- This flag is present on all nodes. It is set to indicate that one
989 -- of the routines in unit Checks has generated a length check action
990 -- which has been inserted at the flagged node. This is used to avoid
991 -- the generation of duplicate checks.
993 -- Has_Dynamic_Range_Check (Flag12-Sem)
994 -- This flag is present on all nodes. It is set to indicate that one
995 -- of the routines in unit Checks has generated a range check action
996 -- which has been inserted at the flagged node. This is used to avoid
997 -- the generation of duplicate checks.
999 -- Has_No_Elaboration_Code (Flag17-Sem)
1000 -- A flag that appears in the N_Compilation_Unit node to indicate
1001 -- whether or not elaboration code is present for this unit. It is
1002 -- initially set true for subprogram specs and bodies and for all
1003 -- generic units and false for non-generic package specs and bodies.
1004 -- Gigi may set the flag in the non-generic package case if it
1005 -- determines that no elaboration code is generated. Note that this
1006 -- flag is not related to the Is_Preelaborated status, there can be
1007 -- preelaborated packages that generate elaboration code, and non-
1008 -- preelaborated packages which do not generate elaboration code.
1010 -- Has_Priority_Pragma (Flag6-Sem)
1011 -- A flag present in N_Subprogram_Body, N_Task_Definition and
1012 -- N_Protected_Definition nodes to flag the presence of either
1013 -- a Priority or Interrupt_Priority pragma in the declaration
1014 -- sequence (public or private in the task and protected cases)
1016 -- Has_Private_View (Flag11-Sem)
1017 -- A flag present in generic nodes that have an entity, to indicate
1018 -- that the node has a private type. Used to exchange private
1019 -- and full declarations if the visibility at instantiation is
1020 -- different from the visibility at generic definition.
1022 -- Has_Storage_Size_Pragma (Flag5-Sem)
1023 -- A flag present in an N_Task_Definition node to flag the presence
1024 -- of a Storage_Size pragma
1026 -- Has_Task_Info_Pragma (Flag7-Sem)
1027 -- A flag present in an N_Task_Definition node to flag the presence
1028 -- of a Task_Info pragma. Used to detect duplicate pragmas.
1030 -- Has_Task_Name_Pragma (Flag8-Sem)
1031 -- A flag present in N_Task_Definition nodes to flag the presence
1032 -- of a Task_Name pragma in the declaration sequence for the task.
1034 -- Has_Wide_Character (Flag11-Sem)
1035 -- Present in string literals, set if any wide character (i.e. a
1036 -- character code outside the Character range) appears in the string.
1038 -- Hidden_By_Use_Clause (Elist4-Sem)
1039 -- An entity list present in use clauses that appear within
1040 -- instantiations. For the resolution of local entities, entities
1041 -- introduced by these use clauses have priority over global ones,
1042 -- and outer entities must be explicitly hidden/restored on exit.
1044 -- Implicit_With (Flag17-Sem)
1045 -- This flag is set in the N_With_Clause node that is implicitly
1046 -- generated for runtime units that are loaded by the expander, and
1047 -- also for package System, if it is loaded implicitly by a use of
1048 -- the 'Address or 'Tag attribute
1050 -- Includes_Infinities (Flag11-Sem)
1051 -- This flag is present in N_Range nodes. It is set for the range
1052 -- of unconstrained float types defined in Standard, which include
1053 -- not only the given range of values, but also legtitimately can
1054 -- include infinite values. This flag is false for any float type
1055 -- for which an explicit range is given by the programmer, even if
1056 -- that range is identical to the range for float.
1058 -- Instance_Spec (Node5-Sem)
1059 -- This field is present in generic instantiation nodes, and also in
1060 -- formal package declaration nodes (formal package declarations are
1061 -- treated in a manner very similar to package instantiations). It
1062 -- points to the node for the spec of the instance, inserted as part
1063 -- of the semantic processing for instantiations in Sem_Ch12.
1065 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1066 -- A flag set in a Block_Statement node to indicate that it is the
1067 -- expansion of an asynchronous entry call. Such a block needs a
1068 -- cleanup handler to assure that the call is cancelled.
1070 -- Is_Component_Left_Opnd (Flag13-Sem)
1071 -- Is_Component_Right_Opnd (Flag14-Sem)
1072 -- Present in concatenation nodes, to indicate that the corresponding
1073 -- operand is of the component type of the result. Used in resolving
1074 -- concatenation nodes in instances.
1076 -- Is_Controlling_Actual (Flag16-Sem)
1077 -- This flag is set on in an expression that is a controlling argument
1078 -- in a dispatching call. It is off in all other cases. See Sem_Disp
1079 -- for details of its use.
1081 -- Is_Machine_Number (Flag11-Sem)
1082 -- This flag is set in an N_Real_Literal node to indicate that the
1083 -- value is a machine number. This avoids some unnecessary cases
1084 -- of converting real literals to machine numbers.
1086 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1087 -- A flag present only in N_Op_Expon nodes. It is set when the
1088 -- exponentiation is of the forma 2 ** N, where the type of N is
1089 -- an unsigned integral subtype whose size does not exceed the size
1090 -- of Standard_Integer (i.e. a type that can be safely converted to
1091 -- Natural), and the exponentiation appears as the right operand of
1092 -- an integer multiplication or an integer division where the dividend
1093 -- is unsigned. It is also required that overflow checking is off for
1094 -- both the exponentiation and the multiply/divide node. If this set
1095 -- of conditions holds, and the flag is set, then the division or
1096 -- multiplication can be (and is) converted to a shift.
1098 -- Is_Overloaded (Flag5-Sem)
1099 -- A flag present in all expression nodes. Used temporarily during
1100 -- overloading determination. The setting of this flag is not
1101 -- relevant once overloading analysis is complete.
1103 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1104 -- A flag set in a Subprogram_Body block to indicate that it is the
1105 -- implemenation of a protected subprogram. Such a body needs a
1106 -- cleanup handler to make sure that the associated protected object
1107 -- is unlocked when the subprogram completes.
1109 -- Is_Static_Expression (Flag6-Sem)
1110 -- Indicates that an expression is a static expression (RM 4.9). See
1111 -- spec of package Sem_Eval for full details on the use of this flag.
1113 -- Is_Subprogram_Descriptor (Flag16-Sem)
1114 -- Present in N_Object_Declaration, and set only for the object
1115 -- declaration generated for a subprogram descriptor in fast exception
1116 -- mode. See Exp_Ch11 for details of use.
1118 -- Is_Task_Allocation_Block (Flag6-Sem)
1119 -- A flag set in a Block_Statement node to indicate that it is the
1120 -- expansion of a task allocator, or the allocator of an object
1121 -- containing tasks. Such a block requires a cleanup handler to call
1122 -- Expunge_Unactivted_Tasks to complete any tasks that have been
1123 -- allocated but not activated when the allocator completes abnormally.
1125 -- Is_Task_Master (Flag5-Sem)
1126 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node
1127 -- to indicate that the construct is a task master (i.e. has declared
1128 -- tasks or declares an access to a task type).
1130 -- Itype (Node1-Sem)
1131 -- Used in N_Itype_Reference node to reference an itype for which it
1132 -- is important to ensure that it is defined. See description of this
1133 -- node for further details.
1135 -- Kill_Range_Check (Flag11-Sem)
1136 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1137 -- result should not be subjected to range checks. This is used for
1138 -- the implementation of Normalize_Scalars.
1140 -- Label_Construct (Node2-Sem)
1141 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1142 -- N_Block_Statement or N_Loop_Statement node to which the label
1143 -- declaration applies. This is not currently used in the compiler
1144 -- itself, but it is useful in the implementation of ASIS queries.
1146 -- Library_Unit (Node4-Sem)
1147 -- In a stub node, the Library_Unit field points to the compilation unit
1148 -- node of the corresponding subunit.
1150 -- In a with clause node, the Library_Unit field points to the spec
1151 -- of the with'ed unit.
1153 -- In a compilation unit node, the use of this field depends on
1154 -- the unit type:
1156 -- For a subprogram body, the Library_Unit field points to the
1157 -- compilation unit node of the corresponding spec, unless
1158 -- Acts_As_Spec is set, in which case it points to itself.
1160 -- For a package body, the Library_Unit field points to the
1161 -- compilation unit node of the corresponding spec.
1163 -- For a subprogram spec to which pragma Inline applies, the
1164 -- Library_Unit field points to the compilation unit node of
1165 -- the corresponding body, if inlining is active.
1167 -- For a generic declaration, the Library_Unit field points
1168 -- to the compilation unit node of the corresponding generic body.
1170 -- For a subunit, the Library_Unit field points to the compilation
1171 -- unit node of the parent body.
1173 -- Note that this field is not used to hold the parent pointer for a
1174 -- child unit (which might in any case need to use it for some other
1175 -- purpose as described above). Instead for a child unit, implicit
1176 -- with's are generated for all parents.
1178 -- Loop_Actions (List2-Sem)
1179 -- A list present in Component_Association nodes in array aggregates.
1180 -- Used to collect actions that must be executed within the loop because
1181 -- they may need to be evaluated anew each time through.
1183 -- Must_Not_Freeze (Flag8-Sem)
1184 -- A flag present in all expression nodes. Normally expressions cause
1185 -- freezing as described in the RM. If this flag is set, then this
1186 -- is inhibited. This is used by the analyzer and expander to label
1187 -- nodes that are created by semantic analysis or expansion and which
1188 -- must not cause freezing even though they normally would. This flag
1189 -- is also present in an N_Subtype_Indication node, since we also use
1190 -- these in calls to Freeze_Expression.
1192 -- Next_Entity (Node2-Sem)
1193 -- Present in defining identifiers, defining character literals and
1194 -- defining operator symbols (i.e. in all entities). The entities of
1195 -- a scope are chained, and this field is used as the forward pointer
1196 -- for this list. See Einfo for further details.
1198 -- Next_Named_Actual (Node4-Sem)
1199 -- Present in parameter association node. Set during semantic
1200 -- analysis to point to the next named parameter, where parameters
1201 -- are ordered by declaration order (as opposed to the actual order
1202 -- in the call, which may be different due to named associations).
1203 -- Not that this field points to the explicit actual parameter itself,
1204 -- not to the N_Parameter_Association node (its parent).
1206 -- Next_Rep_Item (Node4-Sem)
1207 -- Present in pragma nodes and attribute definition nodes. Used to
1208 -- link representation items that apply to an entity. See description
1209 -- of First_Rep_Item field in Einfo for full details.
1211 -- Next_Use_Clause (Node3-Sem)
1212 -- While use clauses are active during semantic processing, they
1213 -- are chained from the scope stack entry, using Next_Use_Clause
1214 -- as a link pointer, with Empty marking the end of the list. The
1215 -- head pointer is in the scope stack entry (First_Use_Clause). At
1216 -- the end of semantic processing (i.e. when Gigi sees the tree,
1217 -- the contents of this field is undefined and should not be read).
1219 -- No_Ctrl_Actions (Flag7-Sem)
1220 -- Present in N_Assignment_Statement to indicate that no finalize nor
1221 -- nor adjust should take place on this assignment eventhough the rhs
1222 -- is controlled. This is used in init_procs and aggregate expansions
1223 -- where the generated assignments are more initialisations than real
1224 -- assignments.
1226 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1227 -- Present in N_With_Clause nodes. Set if the with clause is on the
1228 -- package or subprogram spec where the main unit is the corresponding
1229 -- body, and no entities of the with'ed unit are referenced by the spec
1230 -- (an entity may still be referenced in the body, so this flag is used
1231 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1232 -- full details)
1234 -- No_Initialization (Flag13-Sem)
1235 -- Present in N_Object_Declaration & N_Allocator to indicate
1236 -- that the object must not be initialized (by Initialize or a
1237 -- call to _init_proc). This is needed for controlled aggregates.
1238 -- When the Object declaration has an expression, this flag means
1239 -- that this expression should not be taken into account (needed
1240 -- for in place initialization with aggregates)
1242 -- OK_For_Stream (Flag4-Sem)
1243 -- Present in N_Attribute_Definition clauses for stream attributes. If
1244 -- set, indicates that the attribute is permitted even though the type
1245 -- involved is a limited type. In the case of a protected type, the
1246 -- result is to stream all components (including discriminants) in
1247 -- lexical order. For other limited types, the effect is simply to
1248 -- use the corresponding stream routine for the full type. This flag
1249 -- is used for internally generated code, where the streaming of these
1250 -- types is required, even though not normally allowed by the language.
1252 -- Original_Discriminant (Node2-Sem)
1253 -- Present in identifiers. Used in references to discriminants that
1254 -- appear in generic units. Because the names of the discriminants
1255 -- may be different in an instance, we use this field to recover the
1256 -- position of the discriminant in the original type, and replace it
1257 -- with the discriminant at the same position in the instantiated type.
1259 -- Others_Discrete_Choices (List1-Sem)
1260 -- When a case statement or variant is analyzed, the semantic checks
1261 -- determine the actual list of choices that correspond to an others
1262 -- choice. This list is materialized for later use by the expander
1263 -- and the Others_Discrete_Choices field of an N_Others_Choice node
1264 -- points to this materialized list of choices, which is in standard
1265 -- format for a list of discrete choices, except that of course it
1266 -- cannot contain an N_Others_Choice entry.
1268 -- Parameter_List_Truncated (Flag17-Sem)
1269 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes.
1270 -- Set (for OpenVMS ports of GNAT only) if the parameter list is
1271 -- truncated as a result of a First_Optional_Parameter specification
1272 -- in an Import_Function, Import_Procedure, or Import_Valued_Procedure
1273 -- pragma. The truncation is done by the expander by removing trailing
1274 -- parameters from the argument list, in accordance with the set of
1275 -- rules allowing such parameter removal. In particular, parameters
1276 -- can be removed working from the end of the parameter list backwards
1277 -- up to and including the entry designated by First_Optional_Parameter
1278 -- in the Import pragma. Parameters can be removed if they are implicit
1279 -- and the default value is a known-at-compile-time value, including
1280 -- the use of the Null_Parameter attribute, or if explicit parameter
1281 -- values are present that match the corresponding defaults.
1283 -- Parent_Spec (Node4-Sem)
1284 -- For a library unit that is a child unit spec (package or subprogram
1285 -- declaration, generic declaration or instantiation, or library level
1286 -- rename, this field points to the compilation unit node for the parent
1287 -- package specification. This field is Empty for library bodies (the
1288 -- parent spec in this case can be found from the corresponding spec).
1290 -- Present_Expr (Uint3-Sem)
1291 -- Present in an N_Variant node. This has a meaningful value only after
1292 -- Gigi has back annotated the tree with representation information.
1293 -- At this point, it contains a reference to a gcc expression that
1294 -- depends on the values of one or more discriminants. Give a set of
1295 -- discriminant values, this expression evaluates to False (zero) if
1296 -- variant is not present, and True (non-zero) if it is present. See
1297 -- unit Repinfo for further details on gigi back annotation. This
1298 -- field is used during ASIS processing (data decomposition annex)
1299 -- to determine if a field is present or not.
1301 -- Print_In_Hex (Flag13-Sem)
1302 -- Set on an N_Integer_Literal node to indicate that the value should
1303 -- be printed in hexadecimal in the sprint listing. Has no effect on
1304 -- legality or semantics of program, only on the displayed output.
1305 -- This is used to clarify output from the packed array cases.
1307 -- Procedure_To_Call (Node4-Sem)
1308 -- Present in N_Allocator. N_Free_Statement, and N_Return_Statement
1309 -- nodes. References the entity for the declaration of the procedure
1310 -- to be called to accomplish the required operation (i.e. for the
1311 -- Allocate procedure in the case of N_Allocator and N_Return_Statement
1312 -- (for allocating the return value), and for the Deallocate procedure
1313 -- in the case of N_Free_Statement.
1315 -- Raises_Constraint_Error (Flag7-Sem)
1316 -- Set on an expression whose evaluation will definitely fail a
1317 -- constraint error check. In the case of static expressions, this
1318 -- flag must be set accurately (and if it is set, the expression is
1319 -- typically illegal unless it appears as a non-elaborated branch of
1320 -- a short-circuit form). For a non-static expression, this flag may
1321 -- be set whenever an expression (e.g. an aggregate) is known to raise
1322 -- constraint error. If set, the expression definitely will raise CE
1323 -- if elaborated at runtime. If not set, the expression may or may
1324 -- not raise CE. In other words, on static expressions, the flag is
1325 -- set accurately, on non-static expressions it is set conservatively.
1327 -- Redundant_Use (Flag13-Sem)
1328 -- A flag present in nodes that can appear as an operand in a use
1329 -- clause or use type clause (identifiers, expanded names, attribute
1330 -- references). Set to indicate that a use is redundant (and therefore
1331 -- need not be undone on scope exit).
1333 -- Return_Type (Node2-Sem)
1334 -- Present in N_Return_Statement node. For a procedure, this is set
1335 -- to Standard_Void_Type. For a function it references the entity
1336 -- for the returned type.
1338 -- Rounded_Result (Flag18-Sem)
1339 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1340 -- Used in the fixed-point cases to indicate that the result must be
1341 -- rounded as a result of the use of the 'Round attribute. Also used
1342 -- for integer N_Op_Divide nodes to indicate that the result should
1343 -- be rounded to the nearest integer (breaking ties away from zero),
1344 -- rather than truncated towards zero as usual. These rounded integer
1345 -- operations are the result of expansion of rounded fixed-point
1346 -- divide, conersion and multiplication operations.
1348 -- Scope (Node3-Sem)
1349 -- Present in defining identifiers, defining character literals and
1350 -- defining operator symbols (i.e. in all entities). The entities of
1351 -- a scope all use this field to reference the corresponding scope
1352 -- entity. See Einfo for further details.
1354 -- Shift_Count_OK (Flag4-Sem)
1355 -- A flag present in shift nodes to indicate that the shift count is
1356 -- known to be in range, i.e. is in the range from zero to word length
1357 -- minus one. If this flag is not set, then the shift count may be
1358 -- outside this range, i.e. larger than the word length, and the code
1359 -- must ensure that such shift counts give the appropriate result.
1361 -- Source_Type (Node1-Sem)
1362 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1363 -- source type entity for the unchecked conversion instantiation
1364 -- which gigi must do size validation for.
1366 -- Static_Processing_OK (Flag4-Sem)
1367 -- Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate
1368 -- flag is set, the full value of the aggregate can be determined at
1369 -- compile time and the aggregate can be passed as is to the back-end.
1370 -- In this event it is irrelevant whether this flag is set or not.
1371 -- However, if the Compile_Time_Known_Aggregate flag is not set but
1372 -- Static_Processing_OK is set, the aggregate can (but need not) be
1373 -- converted into a compile time known aggregate by the expander.
1374 -- See Sem_Aggr for the specific conditions under which an aggregate
1375 -- has its Static_Processing_OK flag set.
1377 -- Storage_Pool (Node1-Sem)
1378 -- Present in N_Allocator, N_Free_Statement and N_Return_Statement
1379 -- nodes. References the entity for the storage pool to be used for
1380 -- the allocate or free call or for the allocation of the returned
1381 -- value from a function. Empty indicates that the global default
1382 -- default pool is to be used. Note that in the case of a return
1383 -- statement, this field is set only if the function returns a
1384 -- value of a type whose size is not known at compile time on the
1385 -- secondary stack. It is never set on targets for which the target
1386 -- parameter Targparm.Functions_Return_By_DSP_On_Target is True.
1388 -- Target_Type (Node2-Sem)
1389 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1390 -- target type entity for the unchecked conversion instantiation
1391 -- which gigi must do size validation for.
1393 -- Task_Body_Procedure (Node2-Sem)
1394 -- Present in task type declaration nodes. Points to the entity for
1395 -- the task body procedure (as further described in Exp_Ch9, task
1396 -- bodies are expanded into procedures). A convenient function to
1397 -- retrieve this field is Sem_Util.Get_Task_Body_Procedure.
1399 -- Then_Actions (List3-Sem)
1400 -- This field is present in conditional expression nodes. During code
1401 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1402 -- actions at an appropriate place in the tree to get elaborated at the
1403 -- right time. For conditional expressions, we have to be sure that the
1404 -- actions for the Then branch are only elaborated if the condition is
1405 -- True. The Then_Actions field is used as a temporary parking place
1406 -- for these actions. The final tree is always rewritten to eliminate
1407 -- the need for this field, so in the tree passed to Gigi, this field
1408 -- is always set to No_List.
1410 -- Treat_Fixed_As_Integer (Flag14-Sem)
1411 -- This flag appears in operator nodes for divide, multiply, mod and
1412 -- rem on fixed-point operands. It indicates that the operands are
1413 -- to be treated as integer values, ignoring small values. This flag
1414 -- is only set as a result of expansion of fixed-point operations.
1415 -- Typically a fixed-point multplication in the source generates
1416 -- subsidiary multiplication and division operations that work with
1417 -- the underlying integer values and have this flag set. Note that
1418 -- this flag is not needed on other arithmetic operations (add, neg,
1419 -- subtract etc) since in these cases it is always the case that fixed
1420 -- is treated as integer. The Etype field MUST be set if this flag
1421 -- is set. The analyzer knows to leave such nodes alone, and whoever
1422 -- makes them must set the correct Etype value.
1424 -- TSS_Elist (Elist3-Sem)
1425 -- Present in N_Freeze_Entity nodes. Holds an element list containing
1426 -- entries for each TSS (type support subprogram) associated with the
1427 -- frozen type. The elements of the list are the entities for the
1428 -- subprograms (see package Exp_TSS for further details). Set to
1429 -- No_Elist if there are no type support subprograms for the type
1430 -- or if the freeze node is not for a type.
1432 -- Unreferenced_In_Spec (Flag7-Sem)
1433 -- Present in N_With_Clause nodes. Set if the with clause is on the
1434 -- package or subprogram spec where the main unit is the corresponding
1435 -- body, and is not referenced by the spec (it may still be referenced
1436 -- by the body, so this flag is used to generate the proper message
1437 -- (see Sem_Util.Check_Unused_Withs for details)
1439 -- Was_Originally_Stub (Flag13-Sem)
1440 -- This flag is set in the node for a proper body that replaces a
1441 -- stub. During the analysis procedure, stubs in some situations
1442 -- get rewritten by the corresponding bodies, and we set this flag
1443 -- to remember that this happened. Note that it is not good enough
1444 -- to rely on the use of Original_Tree here because of the case of
1445 -- nested instantiations where the substituted node can be copied.
1447 -- Zero_Cost_Handling (Flag5-Sem)
1448 -- This flag is set in all handled sequence of statement and exception
1449 -- handler nodes if eceptions are to be handled using the zero-cost
1450 -- mechanism (see Ada.Exceptions and System.Exceptions in files
1451 -- a-except.ads/adb and s-except.ads for full details). What gigi
1452 -- needs to do for such a handler is simply to put the code in the
1453 -- handler somewhere. The front end has generated all necessary labels.
1455 --------------------------------------------------
1456 -- Note on Use of End_Label and End_Span Fields --
1457 --------------------------------------------------
1459 -- Several constructs have end lines:
1461 -- Loop Statement end loop [loop_IDENTIFIER];
1462 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
1463 -- Task Definition end [task_IDENTIFIER]
1464 -- Protected Definition end [protected_IDENTIFIER]
1465 -- Protected Body end [protected_IDENTIFIER]
1467 -- Block Statement end [block_IDENTIFIER];
1468 -- Subprogram Body end [DESIGNATOR];
1469 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
1470 -- Task Body end [task_IDENTIFIER];
1471 -- Accept Statement end [entry_IDENTIFIER]];
1472 -- Entry Body end [entry_IDENTIFIER];
1474 -- If Statement end if;
1475 -- Case Statement end case;
1477 -- Record Definition end record;
1479 -- The End_Label and End_Span fields are used to mark the locations
1480 -- of these lines, and also keep track of the label in the case where
1481 -- a label is present.
1483 -- For the first group above, the End_Label field of the corresponding
1484 -- node is used to point to the label identifier. In the case where
1485 -- there is no label in the source, the parser supplies a dummy
1486 -- identifier (with Comes_From_Source set to False), and the Sloc
1487 -- of this dummy identifier marks the location of the token following
1488 -- the END token.
1490 -- For the second group, the use of End_Label is similar, but the
1491 -- End_Label is found in the N_Handled_Sequence_Of_Statements node.
1492 -- This is done simply because in some cases there is no room in
1493 -- the parent node.
1495 -- For the third group, there is never any label, and instead of
1496 -- using End_Label, we use the End_Span field which gives the
1497 -- location of the token following END, relative to the starting
1498 -- Sloc of the construct, i.e. add Sloc (Node) + End_Span (Node)
1499 -- to get the Sloc of the IF or CASE following the End_Label.
1501 -- The record definition case is handled specially, we treat it
1502 -- as though it required an optional label which is never present,
1503 -- and so the parser always builds a dummy identifier with Comes
1504 -- From Source set False. The reason we do this, rather than using
1505 -- End_Span in this case, is that we want to generate a cross-ref
1506 -- entry for the end of a record, since it represents a scope for
1507 -- name declaration purposes.
1509 -- Note: the reason we store the difference as a Uint, instead of
1510 -- storing the Source_Ptr value directly, is that Source_Ptr values
1511 -- cannot be distinguished from other types of values, and we count
1512 -- on all general use fields being self describing. To make things
1513 -- easier for clients, note that we provide function End_Location,
1514 -- and procedure Set_End_Location to allow access to the logical
1515 -- value (which is the Source_Ptr value for the end token).
1517 ---------------------
1518 -- Syntactic Nodes --
1519 ---------------------
1521 ---------------------
1522 -- 2.3 Identifier --
1523 ---------------------
1525 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
1526 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
1528 -- An IDENTIFIER shall not be a reserved word
1530 -- In the Ada grammar identifiers are the bottom level tokens which
1531 -- have very few semantics. Actual program identifiers are direct
1532 -- names. If we were being 100% honest with the grammar, then we would
1533 -- have a node called N_Direct_Name which would point to an identifier.
1534 -- However, that's too many extra nodes, so we just use the N_Identifier
1535 -- node directly as a direct name, and it contains the expression fields
1536 -- and Entity field that correspond to its use as a direct name. In
1537 -- those few cases where identifiers appear in contexts where they are
1538 -- not direct names (pragmas, pragma argument associations, attribute
1539 -- references and attribute definition clauses), the Chars field of the
1540 -- node contains the Name_Id for the identifier name.
1542 -- Note: in GNAT, a reserved word can be treated as an identifier
1543 -- in two cases. First, an incorrect use of a reserved word as an
1544 -- identifier is diagnosed and then treated as a normal identifier.
1545 -- Second, an attribute designator of the form of a reserved word
1546 -- (access, delta, digits, range) is treated as an identifier.
1548 -- Note: The set of letters that is permitted in an identifier depends
1549 -- on the character set in use. See package Csets for full details.
1551 -- N_Identifier
1552 -- Sloc points to identifier
1553 -- Chars (Name1) contains the Name_Id for the identifier
1554 -- Entity (Node4-Sem)
1555 -- Associated_Node (Node4-Sem)
1556 -- Original_Discriminant (Node2-Sem)
1557 -- Redundant_Use (Flag13-Sem)
1558 -- Has_Private_View (Flag11-Sem) (set in generic units)
1559 -- plus fields for expression
1561 --------------------------
1562 -- 2.4 Numeric Literal --
1563 --------------------------
1565 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
1567 ----------------------------
1568 -- 2.4.1 Decimal Literal --
1569 ----------------------------
1571 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
1573 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
1575 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
1577 -- Decimal literals appear in the tree as either integer literal nodes
1578 -- or real literal nodes, depending on whether a period is present.
1580 -- Note: literal nodes appear as a result of direct use of literals
1581 -- in the source program, and also as the result of evaluating
1582 -- expressions at compile time. In the latter case, it is possible
1583 -- to construct real literals that have no syntactic representation
1584 -- using the standard literal format. Such literals are listed by
1585 -- Sprint using the notation [numerator / denominator].
1587 -- N_Integer_Literal
1588 -- Sloc points to literal
1589 -- Intval (Uint3) contains integer value of literal
1590 -- plus fields for expression
1591 -- Print_In_Hex (Flag13-Sem)
1593 -- N_Real_Literal
1594 -- Sloc points to literal
1595 -- Realval (Ureal3) contains real value of literal
1596 -- Corresponding_Integer_Value (Uint4-Sem)
1597 -- Is_Machine_Number (Flag11-Sem)
1598 -- plus fields for expression
1600 --------------------------
1601 -- 2.4.2 Based Literal --
1602 --------------------------
1604 -- BASED_LITERAL ::=
1605 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
1607 -- BASE ::= NUMERAL
1609 -- BASED_NUMERAL ::=
1610 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
1612 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
1614 -- Based literals appear in the tree as either integer literal nodes
1615 -- or real literal nodes, depending on whether a period is present.
1617 ----------------------------
1618 -- 2.5 Character Literal --
1619 ----------------------------
1621 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
1623 -- N_Character_Literal
1624 -- Sloc points to literal
1625 -- Chars (Name1) contains the Name_Id for the identifier
1626 -- Char_Literal_Value (Char_Code2) contains the literal value
1627 -- Entity (Node4-Sem)
1628 -- Associated_Node (Node4-Sem)
1629 -- Has_Private_View (Flag11-Sem) set in generic units.
1630 -- plus fields for expression
1632 -- Note: the Entity field will be missing (and set to Empty) for
1633 -- character literals whose type is Standard.Wide_Character or
1634 -- Standard.Character or a type derived from one of these two.
1635 -- In this case the character literal stands for its own coding.
1636 -- The reason we take this irregular short cut is to avoid the
1637 -- need to build lots of junk defining character literal nodes.
1639 -------------------------
1640 -- 2.6 String Literal --
1641 -------------------------
1643 -- STRING LITERAL ::= "{STRING_ELEMENT}"
1645 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
1646 -- single GRAPHIC_CHARACTER other than a quotation mark.
1648 -- N_String_Literal
1649 -- Sloc points to literal
1650 -- Strval (Str3) contains Id of string value
1651 -- Has_Wide_Character (Flag11-Sem)
1652 -- plus fields for expression
1654 ------------------
1655 -- 2.7 Comment --
1656 ------------------
1658 -- A COMMENT starts with two adjacent hyphens and extends up to the
1659 -- end of the line. A COMMENT may appear on any line of a program.
1661 -- Comments are skipped by the scanner and do not appear in the tree.
1662 -- It is possible to reconstruct the position of comments with respect
1663 -- to the elements of the tree by using the source position (Sloc)
1664 -- pointers that appear in every tree node.
1666 -----------------
1667 -- 2.8 Pragma --
1668 -----------------
1670 -- PRAGMA ::= pragma IDENTIFIER
1671 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
1673 -- Note that a pragma may appear in the tree anywhere a declaration
1674 -- or a statement may appear, as well as in some other situations
1675 -- which are explicitly documented.
1677 -- N_Pragma
1678 -- Sloc points to PRAGMA
1679 -- Chars (Name1) identifier name from pragma identifier
1680 -- Pragma_Argument_Associations (List2) (set to No_List if none)
1681 -- Debug_Statement (Node3) (set to Empty if not Debug, Assert)
1682 -- Next_Rep_Item (Node4-Sem)
1684 --------------------------------------
1685 -- 2.8 Pragma Argument Association --
1686 --------------------------------------
1688 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
1689 -- [pragma_argument_IDENTIFIER =>] NAME
1690 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
1692 -- N_Pragma_Argument_Association
1693 -- Sloc points to first token in association
1694 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
1695 -- Expression (Node3)
1697 ------------------------
1698 -- 2.9 Reserved Word --
1699 ------------------------
1701 -- Reserved words are parsed by the scanner, and returned as the
1702 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
1704 ----------------------------
1705 -- 3.1 Basic Declaration --
1706 ----------------------------
1708 -- BASIC_DECLARATION ::=
1709 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
1710 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
1711 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
1712 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
1713 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
1714 -- | GENERIC_INSTANTIATION
1716 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
1717 -- see further description in section on semantic nodes.
1719 -- Also, in the tree that is constructed, a pragma may appear
1720 -- anywhere that a declaration may appear.
1722 ------------------------------
1723 -- 3.1 Defining Identifier --
1724 ------------------------------
1726 -- DEFINING_IDENTIFIER ::= IDENTIFIER
1728 -- A defining identifier is an entity, which has additional fields
1729 -- depending on the setting of the Ekind field. These additional
1730 -- fields are defined (and access subprograms declared) in package
1731 -- Einfo.
1733 -- Note: N_Defining_Identifier is an extended node whose fields are
1734 -- deliberate layed out to match the layout of fields in an ordinary
1735 -- N_Identifier node allowing for easy alteration of an identifier
1736 -- node into a defining identifier node. For details, see procedure
1737 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
1739 -- N_Defining_Identifier
1740 -- Sloc points to identifier
1741 -- Chars (Name1) contains the Name_Id for the identifier
1742 -- Next_Entity (Node2-Sem)
1743 -- Scope (Node3-Sem)
1744 -- Etype (Node5-Sem)
1746 -----------------------------
1747 -- 3.2.1 Type Declaration --
1748 -----------------------------
1750 -- TYPE_DECLARATION ::=
1751 -- FULL_TYPE_DECLARATION
1752 -- | INCOMPLETE_TYPE_DECLARATION
1753 -- | PRIVATE_TYPE_DECLARATION
1754 -- | PRIVATE_EXTENSION_DECLARATION
1756 ----------------------------------
1757 -- 3.2.1 Full Type Declaration --
1758 ----------------------------------
1760 -- FULL_TYPE_DECLARATION ::=
1761 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
1762 -- is TYPE_DEFINITION;
1763 -- | TASK_TYPE_DECLARATION
1764 -- | PROTECTED_TYPE_DECLARATION
1766 -- The full type declaration node is used only for the first case. The
1767 -- second case (concurrent type declaration), is represented directly
1768 -- by a task type declaration or a protected type declaration.
1770 -- N_Full_Type_Declaration
1771 -- Sloc points to TYPE
1772 -- Defining_Identifier (Node1)
1773 -- Discriminant_Specifications (List4) (set to No_List if none)
1774 -- Type_Definition (Node3)
1775 -- Discr_Check_Funcs_Built (Flag11-Sem)
1777 ----------------------------
1778 -- 3.2.1 Type Definition --
1779 ----------------------------
1781 -- TYPE_DEFINITION ::=
1782 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
1783 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
1784 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
1785 -- | DERIVED_TYPE_DEFINITION
1787 --------------------------------
1788 -- 3.2.2 Subtype Declaration --
1789 --------------------------------
1791 -- SUBTYPE_DECLARATION ::=
1792 -- subtype DEFINING_IDENTIFIER is SUBTYPE_INDICATION;
1794 -- The subtype indication field is set to Empty for subtypes
1795 -- declared in package Standard (Positive, Natural).
1797 -- N_Subtype_Declaration
1798 -- Sloc points to SUBTYPE
1799 -- Defining_Identifier (Node1)
1800 -- Subtype_Indication (Node5)
1801 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
1802 -- Exception_Junk (Flag11-Sem)
1804 -------------------------------
1805 -- 3.2.2 Subtype Indication --
1806 -------------------------------
1808 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
1810 -- Note: if no constraint is present, the subtype indication appears
1811 -- directly in the tree as a subtype mark. The N_Subtype_Indication
1812 -- node is used only if a constraint is present.
1814 -- Note: the reason that this node has expression fields is that a
1815 -- subtype indication can appear as an operand of a membership test.
1817 -- N_Subtype_Indication
1818 -- Sloc points to first token of subtype mark
1819 -- Subtype_Mark (Node4)
1820 -- Constraint (Node3)
1821 -- Etype (Node5-Sem)
1822 -- Must_Not_Freeze (Flag8-Sem)
1824 -- Note: Etype is a copy of the Etype field of the Subtype_Mark. The
1825 -- reason for this redundancy is so that in a list of array index types,
1826 -- the Etype can be uniformly accessed to determine the subscript type.
1827 -- This means that no Itype is constructed for the actual subtype that
1828 -- is created by the subtype indication. If such an Itype is required,
1829 -- it is constructed in the context in which the indication appears.
1831 -------------------------
1832 -- 3.2.2 Subtype Mark --
1833 -------------------------
1835 -- SUBTYPE_MARK ::= subtype_NAME
1837 -----------------------
1838 -- 3.2.2 Constraint --
1839 -----------------------
1841 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
1843 ------------------------------
1844 -- 3.2.2 Scalar Constraint --
1845 ------------------------------
1847 -- SCALAR_CONSTRAINT ::=
1848 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
1850 ---------------------------------
1851 -- 3.2.2 Composite Constraint --
1852 ---------------------------------
1854 -- COMPOSITE_CONSTRAINT ::=
1855 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
1857 -------------------------------
1858 -- 3.3.1 Object Declaration --
1859 -------------------------------
1861 -- OBJECT_DECLARATION ::=
1862 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
1863 -- SUBTYPE_INDICATION [:= EXPRESSION];
1864 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
1865 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION];
1866 -- | SINGLE_TASK_DECLARATION
1867 -- | SINGLE_PROTECTED_DECLARATION
1869 -- Note: aliased is not permitted in Ada 83 mode
1871 -- The N_Object_Declaration node is only for the first two cases.
1872 -- Single task declaration is handled by P_Task (9.1)
1873 -- Single protected declaration is handled by P_protected (9.5)
1875 -- Although the syntax allows multiple identifiers in the list, the
1876 -- semantics is as though successive declarations were given with
1877 -- identical type definition and expression components. To simplify
1878 -- semantic processing, the parser represents a multiple declaration
1879 -- case as a sequence of single declarations, using the More_Ids and
1880 -- Prev_Ids flags to preserve the original source form as described
1881 -- in the section on "Handling of Defining Identifier Lists".
1883 -- Note: if a range check is required for the initialization
1884 -- expression then the Do_Range_Check flag is set in the Expression,
1885 -- with the check being done against the type given by the object
1886 -- definition, which is also the Etype of the defining identifier.
1888 -- Note: the contents of the Expression field must be ignored (i.e.
1889 -- treated as though it were Empty) if No_Initialization is set True.
1891 -- N_Object_Declaration
1892 -- Sloc points to first identifier
1893 -- Defining_Identifier (Node1)
1894 -- Aliased_Present (Flag4) set if ALIASED appears
1895 -- Constant_Present (Flag17) set if CONSTANT appears
1896 -- Object_Definition (Node4) subtype indication/array type definition
1897 -- Expression (Node3) (set to Empty if not present)
1898 -- Handler_List_Entry (Node2-Sem)
1899 -- Corresponding_Generic_Association (Node5-Sem)
1900 -- More_Ids (Flag5) (set to False if no more identifiers in list)
1901 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
1902 -- No_Initialization (Flag13-Sem)
1903 -- Assignment_OK (Flag15-Sem)
1904 -- Exception_Junk (Flag11-Sem)
1905 -- Delay_Finalize_Attach (Flag14-Sem)
1906 -- Is_Subprogram_Descriptor (Flag16-Sem)
1908 -------------------------------------
1909 -- 3.3.1 Defining Identifier List --
1910 -------------------------------------
1912 -- DEFINING_IDENTIFIER_LIST ::=
1913 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
1915 -------------------------------
1916 -- 3.3.2 Number Declaration --
1917 -------------------------------
1919 -- NUMBER_DECLARATION ::=
1920 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
1922 -- Although the syntax allows multiple identifiers in the list, the
1923 -- semantics is as though successive declarations were given with
1924 -- identical expressions. To simplify semantic processing, the parser
1925 -- represents a multiple declaration case as a sequence of single
1926 -- declarations, using the More_Ids and Prev_Ids flags to preserve
1927 -- the original source form as described in the section on "Handling
1928 -- of Defining Identifier Lists".
1930 -- N_Number_Declaration
1931 -- Sloc points to first identifier
1932 -- Defining_Identifier (Node1)
1933 -- Expression (Node3)
1934 -- More_Ids (Flag5) (set to False if no more identifiers in list)
1935 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
1937 ----------------------------------
1938 -- 3.4 Derived Type Definition --
1939 ----------------------------------
1941 -- DERIVED_TYPE_DEFINITION ::=
1942 -- [abstract] new parent_SUBTYPE_INDICATION [RECORD_EXTENSION_PART]
1944 -- Note: ABSTRACT, record extension part not permitted in Ada 83 mode
1946 -- Note: a record extension part is required if ABSTRACT is present
1948 -- N_Derived_Type_Definition
1949 -- Sloc points to NEW
1950 -- Abstract_Present (Flag4)
1951 -- Subtype_Indication (Node5)
1952 -- Record_Extension_Part (Node3) (set to Empty if not present)
1954 ---------------------------
1955 -- 3.5 Range Constraint --
1956 ---------------------------
1958 -- RANGE_CONSTRAINT ::= range RANGE
1960 -- N_Range_Constraint
1961 -- Sloc points to RANGE
1962 -- Range_Expression (Node4)
1964 ----------------
1965 -- 3.5 Range --
1966 ----------------
1968 -- RANGE ::=
1969 -- RANGE_ATTRIBUTE_REFERENCE
1970 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
1972 -- Note: the case of a range given as a range attribute reference
1973 -- appears directly in the tree as an attribute reference.
1975 -- Note: the field name for a reference to a range is Range_Expression
1976 -- rather than Range, because range is a reserved keyword in Ada!
1978 -- Note: the reason that this node has expression fields is that a
1979 -- range can appear as an operand of a membership test. The Etype
1980 -- field is the type of the range (we do NOT construct an implicit
1981 -- subtype to represent the range exactly).
1983 -- N_Range
1984 -- Sloc points to ..
1985 -- Low_Bound (Node1)
1986 -- High_Bound (Node2)
1987 -- Includes_Infinities (Flag11)
1988 -- plus fields for expression
1990 -- Note: if the range appears in a context, such as a subtype
1991 -- declaration, where range checks are required on one or both of
1992 -- the expression fields, then type conversion nodes are inserted
1993 -- to represent the required checks.
1995 ----------------------------------------
1996 -- 3.5.1 Enumeration Type Definition --
1997 ----------------------------------------
1999 -- ENUMERATION_TYPE_DEFINITION ::=
2000 -- (ENUMERATION_LITERAL_SPECIFICATION
2001 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2003 -- Note: the Literals field in the node described below is null for
2004 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2005 -- which special processing handles these types as special cases.
2007 -- N_Enumeration_Type_Definition
2008 -- Sloc points to left parenthesis
2009 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2011 ----------------------------------------------
2012 -- 3.5.1 Enumeration Literal Specification --
2013 ----------------------------------------------
2015 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2016 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2018 ---------------------------------------
2019 -- 3.5.1 Defining Character Literal --
2020 ---------------------------------------
2022 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2024 -- A defining character literal is an entity, which has additional
2025 -- fields depending on the setting of the Ekind field. These
2026 -- additional fields are defined (and access subprograms declared)
2027 -- in package Einfo.
2029 -- Note: N_Defining_Character_Literal is an extended node whose fields
2030 -- are deliberate layed out to match the layout of fields in an ordinary
2031 -- N_Character_Literal node allowing for easy alteration of a character
2032 -- literal node into a defining character literal node. For details, see
2033 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2035 -- N_Defining_Character_Literal
2036 -- Sloc points to literal
2037 -- Chars (Name1) contains the Name_Id for the identifier
2038 -- Next_Entity (Node2-Sem)
2039 -- Scope (Node3-Sem)
2040 -- Etype (Node5-Sem)
2042 ------------------------------------
2043 -- 3.5.4 Integer Type Definition --
2044 ------------------------------------
2046 -- Note: there is an error in this rule in the latest version of the
2047 -- grammar, so we have retained the old rule pending clarification.
2049 -- INTEGER_TYPE_DEFINITION ::=
2050 -- SIGNED_INTEGER_TYPE_DEFINITION
2051 -- MODULAR_TYPE_DEFINITION
2053 -------------------------------------------
2054 -- 3.5.4 Signed Integer Type Definition --
2055 -------------------------------------------
2057 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2058 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2060 -- Note: the Low_Bound and High_Bound fields are set to Empty for
2061 -- integer types defined in package Standard.
2063 -- N_Signed_Integer_Type_Definition
2064 -- Sloc points to RANGE
2065 -- Low_Bound (Node1)
2066 -- High_Bound (Node2)
2068 -----------------------------------------
2069 -- 3.5.4 Unsigned Range Specification --
2070 -----------------------------------------
2072 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2074 -- N_Modular_Type_Definition
2075 -- Sloc points to MOD
2076 -- Expression (Node3)
2078 ---------------------------------
2079 -- 3.5.6 Real Type Definition --
2080 ---------------------------------
2082 -- REAL_TYPE_DEFINITION ::=
2083 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2085 --------------------------------------
2086 -- 3.5.7 Floating Point Definition --
2087 --------------------------------------
2089 -- FLOATING_POINT_DEFINITION ::=
2090 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2092 -- Note: The Digits_Expression and Real_Range_Specifications fields
2093 -- are set to Empty for floating-point types declared in Standard.
2095 -- N_Floating_Point_Definition
2096 -- Sloc points to DIGITS
2097 -- Digits_Expression (Node2)
2098 -- Real_Range_Specification (Node4) (set to Empty if not present)
2100 -------------------------------------
2101 -- 3.5.7 Real Range Specification --
2102 -------------------------------------
2104 -- REAL_RANGE_SPECIFICATION ::=
2105 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2107 -- N_Real_Range_Specification
2108 -- Sloc points to RANGE
2109 -- Low_Bound (Node1)
2110 -- High_Bound (Node2)
2112 -----------------------------------
2113 -- 3.5.9 Fixed Point Definition --
2114 -----------------------------------
2116 -- FIXED_POINT_DEFINITION ::=
2117 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2119 --------------------------------------------
2120 -- 3.5.9 Ordinary Fixed Point Definition --
2121 --------------------------------------------
2123 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2124 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2126 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2128 -- Note: the Delta_Expression and Real_Range_Specification fields
2129 -- are set to Empty for fixed point types declared in Standard.
2131 -- N_Ordinary_Fixed_Point_Definition
2132 -- Sloc points to DELTA
2133 -- Delta_Expression (Node3)
2134 -- Real_Range_Specification (Node4)
2136 -------------------------------------------
2137 -- 3.5.9 Decimal Fixed Point Definition --
2138 -------------------------------------------
2140 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2141 -- delta static_EXPRESSION
2142 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2144 -- Note: decimal types are not permitted in Ada 83 mode
2146 -- N_Decimal_Fixed_Point_Definition
2147 -- Sloc points to DELTA
2148 -- Delta_Expression (Node3)
2149 -- Digits_Expression (Node2)
2150 -- Real_Range_Specification (Node4) (set to Empty if not present)
2152 ------------------------------
2153 -- 3.5.9 Digits Constraint --
2154 ------------------------------
2156 -- DIGITS_CONSTRAINT ::=
2157 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2159 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2160 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2162 -- N_Digits_Constraint
2163 -- Sloc points to DIGITS
2164 -- Digits_Expression (Node2)
2165 -- Range_Constraint (Node4) (set to Empty if not present)
2167 --------------------------------
2168 -- 3.6 Array Type Definition --
2169 --------------------------------
2171 -- ARRAY_TYPE_DEFINITION ::=
2172 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2174 -----------------------------------------
2175 -- 3.6 Unconstrained Array Definition --
2176 -----------------------------------------
2178 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2179 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2180 -- COMPONENT_DEFINITION
2182 -- Note: dimensionality of array is indicated by number of entries in
2183 -- the Subtype_Marks list, which has one entry for each dimension.
2185 -- N_Unconstrained_Array_Definition
2186 -- Sloc points to ARRAY
2187 -- Subtype_Marks (List2)
2188 -- Aliased_Present (Flag4) from component definition
2189 -- Subtype_Indication (Node5) from component definition
2191 -----------------------------------
2192 -- 3.6 Index Subtype Definition --
2193 -----------------------------------
2195 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2197 -- There is no explicit node in the tree for an index subtype
2198 -- definition since the N_Unconstrained_Array_Definition node
2199 -- incorporates the type marks which appear in this context.
2201 ---------------------------------------
2202 -- 3.6 Constrained Array Definition --
2203 ---------------------------------------
2205 -- CONSTRAINED_ARRAY_DEFINITION ::=
2206 -- array (DISCRETE_SUBTYPE_DEFINITION
2207 -- {, DISCRETE_SUBTYPE_DEFINITION})
2208 -- of COMPONENT_DEFINITION
2210 -- Note: dimensionality of array is indicated by number of entries
2211 -- in the Discrete_Subtype_Definitions list, which has one entry
2212 -- for each dimension.
2214 -- N_Constrained_Array_Definition
2215 -- Sloc points to ARRAY
2216 -- Discrete_Subtype_Definitions (List2)
2217 -- Aliased_Present (Flag4) from component definition
2218 -- Subtype_Indication (Node5) from component definition
2220 --------------------------------------
2221 -- 3.6 Discrete Subtype Definition --
2222 --------------------------------------
2224 -- DISCRETE_SUBTYPE_DEFINITION ::=
2225 -- discrete_SUBTYPE_INDICATION | RANGE
2227 -------------------------------
2228 -- 3.6 Component Definition --
2229 -------------------------------
2231 -- COMPONENT_DEFINITION ::= [aliased] SUBTYPE_INDICATION
2233 -- There is no explicit node in the tree for a component definition.
2234 -- Instead the subtype indication appears directly, and the ALIASED
2235 -- indication (Aliased_Present flag) is in the parent node.
2237 -- Note: although the syntax does not permit a component definition to
2238 -- be an anonymous array (and the parser will diagnose such an attempt
2239 -- with an appropriate message), it is possible for anonymous arrays
2240 -- to appear as component definitions. The semantics and back end handle
2241 -- this case properly, and the expander in fact generates such cases.
2243 -----------------------------
2244 -- 3.6.1 Index Constraint --
2245 -----------------------------
2247 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
2249 -- It is not in general possible to distinguish between discriminant
2250 -- constraints and index constraints at parse time, since a simple
2251 -- name could be either the subtype mark of a discrete range, or an
2252 -- expression in a discriminant association with no name. Either
2253 -- entry appears simply as the name, and the semantic parse must
2254 -- distinguish between the two cases. Thus we use a common tree
2255 -- node format for both of these constraint types.
2257 -- See Discriminant_Constraint for format of node
2259 ---------------------------
2260 -- 3.6.1 Discrete Range --
2261 ---------------------------
2263 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
2265 ----------------------------
2266 -- 3.7 Discriminant Part --
2267 ----------------------------
2269 -- DISCRIMINANT_PART ::=
2270 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
2272 ------------------------------------
2273 -- 3.7 Unknown Discriminant Part --
2274 ------------------------------------
2276 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
2278 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
2280 -- There is no explicit node in the tree for an unknown discriminant
2281 -- part. Instead the Unknown_Discriminants_Present flag is set in the
2282 -- parent node.
2284 ----------------------------------
2285 -- 3.7 Known Discriminant Part --
2286 ----------------------------------
2288 -- KNOWN_DISCRIMINANT_PART ::=
2289 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
2291 -------------------------------------
2292 -- 3.7 Discriminant Specification --
2293 -------------------------------------
2295 -- DISCRIMINANT_SPECIFICATION ::=
2296 -- DEFINING_IDENTIFIER_LIST : SUBTYPE_MARK
2297 -- [:= DEFAULT_EXPRESSION]
2298 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
2299 -- [:= DEFAULT_EXPRESSION]
2301 -- Although the syntax allows multiple identifiers in the list, the
2302 -- semantics is as though successive specifications were given with
2303 -- identical type definition and expression components. To simplify
2304 -- semantic processing, the parser represents a multiple declaration
2305 -- case as a sequence of single specifications, using the More_Ids and
2306 -- Prev_Ids flags to preserve the original source form as described
2307 -- in the section on "Handling of Defining Identifier Lists".
2309 -- N_Discriminant_Specification
2310 -- Sloc points to first identifier
2311 -- Defining_Identifier (Node1)
2312 -- Discriminant_Type (Node5) subtype mark or
2313 -- access parameter definition
2314 -- Expression (Node3) (set to Empty if no default expression)
2315 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2316 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2318 -----------------------------
2319 -- 3.7 Default Expression --
2320 -----------------------------
2322 -- DEFAULT_EXPRESSION ::= EXPRESSION
2324 ------------------------------------
2325 -- 3.7.1 Discriminant Constraint --
2326 ------------------------------------
2328 -- DISCRIMINANT_CONSTRAINT ::=
2329 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
2331 -- It is not in general possible to distinguish between discriminant
2332 -- constraints and index constraints at parse time, since a simple
2333 -- name could be either the subtype mark of a discrete range, or an
2334 -- expression in a discriminant association with no name. Either
2335 -- entry appears simply as the name, and the semantic parse must
2336 -- distinguish between the two cases. Thus we use a common tree
2337 -- node format for both of these constraint types.
2339 -- N_Index_Or_Discriminant_Constraint
2340 -- Sloc points to left paren
2341 -- Constraints (List1) points to list of discrete ranges or
2342 -- discriminant associations
2344 -------------------------------------
2345 -- 3.7.1 Discriminant Association --
2346 -------------------------------------
2348 -- DISCRIMINANT_ASSOCIATION ::=
2349 -- [discriminant_SELECTOR_NAME
2350 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
2352 -- Note: a discriminant association that has no selector name list
2353 -- appears directly as an expression in the tree.
2355 -- N_Discriminant_Association
2356 -- Sloc points to first token of discriminant association
2357 -- Selector_Names (List1) (always non-empty, since if no selector
2358 -- names are present, this node is not used, see comment above)
2359 -- Expression (Node3)
2361 ---------------------------------
2362 -- 3.8 Record Type Definition --
2363 ---------------------------------
2365 -- RECORD_TYPE_DEFINITION ::=
2366 -- [[abstract] tagged] [limited] RECORD_DEFINITION
2368 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
2370 -- There is no explicit node in the tree for a record type definition.
2371 -- Instead the flags for Tagged_Present and Limited_Present appear in
2372 -- the N_Record_Definition node for a record definition appearing in
2373 -- the context of a record type definition.
2375 ----------------------------
2376 -- 3.8 Record Definition --
2377 ----------------------------
2379 -- RECORD_DEFINITION ::=
2380 -- record
2381 -- COMPONENT_LIST
2382 -- end record
2383 -- | null record
2385 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
2386 -- flags appear only for a record definition appearing in a record
2387 -- type definition.
2389 -- Note: the NULL RECORD case is not permitted in Ada 83
2391 -- N_Record_Definition
2392 -- Sloc points to RECORD or NULL
2393 -- End_Label (Node4) (set to Empty if internally generated record)
2394 -- Abstract_Present (Flag4)
2395 -- Tagged_Present (Flag15)
2396 -- Limited_Present (Flag17)
2397 -- Component_List (Node1) empty in null record case
2398 -- Null_Present (Flag13) set in null record case
2400 -------------------------
2401 -- 3.8 Component List --
2402 -------------------------
2404 -- COMPONENT_LIST ::=
2405 -- COMPONENT_ITEM {COMPONENT_ITEM}
2406 -- | {COMPONENT_ITEM} VARIANT_PART
2407 -- | null;
2409 -- N_Component_List
2410 -- Sloc points to first token of component list
2411 -- Component_Items (List3)
2412 -- Variant_Part (Node4) (set to Empty if no variant part)
2413 -- Null_Present (Flag13)
2415 -------------------------
2416 -- 3.8 Component Item --
2417 -------------------------
2419 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
2421 -- Note: A component item can also be a pragma, and in the tree
2422 -- that is obtained after semantic processing, a component item
2423 -- can be an N_Null node resulting from a non-recognized pragma.
2425 --------------------------------
2426 -- 3.8 Component Declaration --
2427 --------------------------------
2429 -- COMPONENT_DECLARATION ::=
2430 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
2431 -- [:= DEFAULT_EXPRESSION]
2433 -- Note: although the syntax does not permit a component definition to
2434 -- be an anonymous array (and the parser will diagnose such an attempt
2435 -- with an appropriate message), it is possible for anonymous arrays
2436 -- to appear as component definitions. The semantics and back end handle
2437 -- this case properly, and the expander in fact generates such cases.
2439 -- Although the syntax allows multiple identifiers in the list, the
2440 -- semantics is as though successive declarations were given with the
2441 -- same component definition and expression components. To simplify
2442 -- semantic processing, the parser represents a multiple declaration
2443 -- case as a sequence of single declarations, using the More_Ids and
2444 -- Prev_Ids flags to preserve the original source form as described
2445 -- in the section on "Handling of Defining Identifier Lists".
2447 -- N_Component_Declaration
2448 -- Sloc points to first identifier
2449 -- Defining_Identifier (Node1)
2450 -- Aliased_Present (Flag4) from component definition
2451 -- Subtype_Indication (Node5) from component definition
2452 -- Expression (Node3) (set to Empty if no default expression)
2453 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2454 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2456 -------------------------
2457 -- 3.8.1 Variant Part --
2458 -------------------------
2460 -- VARIANT_PART ::=
2461 -- case discriminant_DIRECT_NAME is
2462 -- VARIANT
2463 -- {VARIANT}
2464 -- end case;
2466 -- Note: the variants list can contain pragmas as well as variants.
2467 -- In a properly formed program there is at least one variant.
2469 -- N_Variant_Part
2470 -- Sloc points to CASE
2471 -- Name (Node2)
2472 -- Variants (List1)
2474 --------------------
2475 -- 3.8.1 Variant --
2476 --------------------
2478 -- VARIANT ::=
2479 -- when DISCRETE_CHOICE_LIST =>
2480 -- COMPONENT_LIST
2482 -- N_Variant
2483 -- Sloc points to WHEN
2484 -- Discrete_Choices (List4)
2485 -- Component_List (Node1)
2486 -- Enclosing_Variant (Node2-Sem)
2487 -- Present_Expr (Uint3-Sem)
2488 -- Dcheck_Function (Node5-Sem)
2490 ---------------------------------
2491 -- 3.8.1 Discrete Choice List --
2492 ---------------------------------
2494 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
2496 ----------------------------
2497 -- 3.8.1 Discrete Choice --
2498 ----------------------------
2500 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
2502 -- Note: in Ada 83 mode, the expression must be a simple expression
2504 -- The only choice that appears explicitly is the OTHERS choice, as
2505 -- defined here. Other cases of discrete choice (expression and
2506 -- discrete range) appear directly. This production is also used
2507 -- for the OTHERS possibility of an exception choice.
2509 -- Note: in accordance with the syntax, the parser does not check that
2510 -- OTHERS appears at the end on its own in a choice list context. This
2511 -- is a semantic check.
2513 -- N_Others_Choice
2514 -- Sloc points to OTHERS
2515 -- Others_Discrete_Choices (List1-Sem)
2516 -- All_Others (Flag11-Sem)
2518 ----------------------------------
2519 -- 3.9.1 Record Extension Part --
2520 ----------------------------------
2522 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
2524 -- Note: record extension parts are not permitted in Ada 83 mode
2526 ----------------------------------
2527 -- 3.10 Access Type Definition --
2528 ----------------------------------
2530 -- ACCESS_TYPE_DEFINITION ::=
2531 -- ACCESS_TO_OBJECT_DEFINITION
2532 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2534 ---------------------------------------
2535 -- 3.10 Access To Object Definition --
2536 ---------------------------------------
2538 -- ACCESS_TO_OBJECT_DEFINITION ::=
2539 -- access [GENERAL_ACCESS_MODIFIER] SUBTYPE_INDICATION
2541 -- N_Access_To_Object_Definition
2542 -- Sloc points to ACCESS
2543 -- All_Present (Flag15)
2544 -- Subtype_Indication (Node5)
2545 -- Constant_Present (Flag17)
2547 -----------------------------------
2548 -- 3.10 General Access Modifier --
2549 -----------------------------------
2551 -- GENERAL_ACCESS_MODIFIER ::= all | constant
2553 -- Note: general access modifiers are not permitted in Ada 83 mode
2555 -- There is no explicit node in the tree for general access modifier.
2556 -- Instead the All_Present or Constant_Present flags are set in the
2557 -- parent node.
2559 -------------------------------------------
2560 -- 3.10 Access To Subprogram Definition --
2561 -------------------------------------------
2563 -- ACCESS_TO_SUBPROGRAM_DEFINITION
2564 -- access [protected] procedure PARAMETER_PROFILE
2565 -- | access [protected] function PARAMETER_AND_RESULT_PROFILE
2567 -- Note: access to subprograms are not permitted in Ada 83 mode
2569 -- N_Access_Function_Definition
2570 -- Sloc points to ACCESS
2571 -- Protected_Present (Flag15)
2572 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2573 -- Subtype_Mark (Node4) result subtype
2575 -- N_Access_Procedure_Definition
2576 -- Sloc points to ACCESS
2577 -- Protected_Present (Flag15)
2578 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2580 -----------------------------
2581 -- 3.10 Access Definition --
2582 -----------------------------
2584 -- ACCESS_DEFINITION ::= access SUBTYPE_MARK
2586 -- N_Access_Definition
2587 -- Sloc points to ACCESS
2588 -- Subtype_Mark (Node4)
2590 -----------------------------------------
2591 -- 3.10.1 Incomplete Type Declaration --
2592 -----------------------------------------
2594 -- INCOMPLETE_TYPE_DECLARATION ::=
2595 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART];
2597 -- N_Incomplete_Type_Declaration
2598 -- Sloc points to TYPE
2599 -- Defining_Identifier (Node1)
2600 -- Discriminant_Specifications (List4) (set to No_List if no
2601 -- discriminant part, or if the discriminant part is an
2602 -- unknown discriminant part)
2603 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
2605 ----------------------------
2606 -- 3.11 Declarative Part --
2607 ----------------------------
2609 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
2611 -- Note: although the parser enforces the syntactic requirement that
2612 -- a declarative part can contain only declarations, the semantic
2613 -- processing may add statements to the list of actions in a
2614 -- declarative part, so the code generator should be prepared
2615 -- to accept a statement in this position.
2617 ----------------------------
2618 -- 3.11 Declarative Item --
2619 ----------------------------
2621 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
2623 ----------------------------------
2624 -- 3.11 Basic Declarative Item --
2625 ----------------------------------
2627 -- BASIC_DECLARATIVE_ITEM ::=
2628 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
2630 ----------------
2631 -- 3.11 Body --
2632 ----------------
2634 -- BODY ::= PROPER_BODY | BODY_STUB
2636 -----------------------
2637 -- 3.11 Proper Body --
2638 -----------------------
2640 -- PROPER_BODY ::=
2641 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
2643 ---------------
2644 -- 4.1 Name --
2645 ---------------
2647 -- NAME ::=
2648 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
2649 -- | INDEXED_COMPONENT | SLICE
2650 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
2651 -- | TYPE_CONVERSION | FUNCTION_CALL
2652 -- | CHARACTER_LITERAL
2654 ----------------------
2655 -- 4.1 Direct Name --
2656 ----------------------
2658 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
2660 -----------------
2661 -- 4.1 Prefix --
2662 -----------------
2664 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
2666 -------------------------------
2667 -- 4.1 Explicit Dereference --
2668 -------------------------------
2670 -- EXPLICIT_DEREFERENCE ::= NAME . all
2672 -- N_Explicit_Dereference
2673 -- Sloc points to ALL
2674 -- Prefix (Node3)
2675 -- Do_Access_Check (Flag11-Sem)
2676 -- plus fields for expression
2678 -------------------------------
2679 -- 4.1 Implicit Dereference --
2680 -------------------------------
2682 -- IMPLICIT_DEREFERENCE ::= NAME
2684 ------------------------------
2685 -- 4.1.1 Indexed Component --
2686 ------------------------------
2688 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
2690 -- Note: the parser may generate this node in some situations where it
2691 -- should be a function call. The semantic pass must correct this
2692 -- misidentification (which is inevitable at the parser level).
2694 -- N_Indexed_Component
2695 -- Sloc contains a copy of the Sloc value of the Prefix
2696 -- Prefix (Node3)
2697 -- Expressions (List1)
2698 -- Do_Access_Check (Flag11-Sem)
2699 -- plus fields for expression
2701 -- Note: if any of the subscripts requires a range check, then the
2702 -- Do_Range_Check flag is set on the corresponding expression, with
2703 -- the index type being determined from the type of the Prefix, which
2704 -- references the array being indexed.
2706 -- Note: in a fully analyzed and expanded indexed component node, and
2707 -- hence in any such node that gigi sees, if the prefix is an access
2708 -- type, then an explicit dereference operation has been inserted.
2710 ------------------
2711 -- 4.1.2 Slice --
2712 ------------------
2714 -- SLICE ::= PREFIX (DISCRETE_RANGE)
2716 -- Note: an implicit subtype is created to describe the resulting
2717 -- type, so that the bounds of this type are the bounds of the slice.
2719 -- N_Slice
2720 -- Sloc points to first token of prefix
2721 -- Prefix (Node3)
2722 -- Discrete_Range (Node4)
2723 -- Do_Access_Check (Flag11-Sem)
2724 -- plus fields for expression
2726 -------------------------------
2727 -- 4.1.3 Selected Component --
2728 -------------------------------
2730 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
2732 -- Note: selected components that are semantically expanded names get
2733 -- changed during semantic processing into the separate N_Expanded_Name
2734 -- node. See description of this node in the section on semantic nodes.
2736 -- N_Selected_Component
2737 -- Sloc points to period
2738 -- Prefix (Node3)
2739 -- Selector_Name (Node2)
2740 -- Associated_Node (Node4-Sem)
2741 -- Do_Access_Check (Flag11-Sem)
2742 -- Do_Discriminant_Check (Flag13-Sem)
2743 -- plus fields for expression
2745 --------------------------
2746 -- 4.1.3 Selector Name --
2747 --------------------------
2749 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
2751 --------------------------------
2752 -- 4.1.4 Attribute Reference --
2753 --------------------------------
2755 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
2757 -- Note: the syntax is quite ambiguous at this point. Consider:
2759 -- A'Length (X) X is part of the attribute designator
2760 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
2761 -- A'Class (X) X is the expression of a type conversion
2763 -- It would be possible for the parser to distinguish these cases
2764 -- by looking at the attribute identifier. However, that would mean
2765 -- more work in introducing new implementation defined attributes,
2766 -- and also it would mean that special processing for attributes
2767 -- would be scattered around, instead of being centralized in the
2768 -- semantic routine that handles an N_Attribute_Reference node.
2769 -- Consequently, the parser in all the above cases stores the
2770 -- expression (X in these examples) as a single element list in
2771 -- in the Expressions field of the N_Attribute_Reference node.
2773 -- Similarly, for attributes like Max which take two arguments,
2774 -- we store the two arguments as a two element list in the
2775 -- Expressions field. Of course it is clear at parse time that
2776 -- this case is really a function call with an attribute as the
2777 -- prefix, but it turns out to be convenient to handle the two
2778 -- argument case in a similar manner to the one argument case,
2779 -- and indeed in general the parser will accept any number of
2780 -- expressions in this position and store them as a list in the
2781 -- attribute reference node. This allows for future addition of
2782 -- attributes that take more than two arguments.
2784 -- Note: named associates are not permitted in function calls where
2785 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
2786 -- to skip the normal subprogram argument processing.
2788 -- Note: for the attributes whose designators are technically keywords,
2789 -- i.e. digits, access, delta, range, the Attribute_Name field contains
2790 -- the corresponding name, even though no identifier is involved.
2792 -- The flag OK_For_Stream is used in generated code to indicate that
2793 -- a stream attribute is permissible for a limited type, and results
2794 -- in the use of the stream attribute for the underlying full type,
2795 -- or in the case of a protected type, the components (including any
2796 -- disriminants) are merely streamed in order.
2798 -- See Exp_Attr for a complete description of which attributes are
2799 -- passed onto Gigi, and which are handled entirely by the front end.
2801 -- Gigi restriction: For the Pos attribute, the prefix cannot be
2802 -- a non-standard enumeration type or a nonzero/zero semantics
2803 -- boolean type, so the value is simply the stored representation.
2805 -- N_Attribute_Reference
2806 -- Sloc points to apostrophe
2807 -- Prefix (Node3)
2808 -- Attribute_Name (Name2) identifier name from attribute designator
2809 -- Expressions (List1) (set to No_List if no associated expressions)
2810 -- Entity (Node4-Sem) used if the attribute yields a type
2811 -- Associated_Node (Node4-Sem)
2812 -- Do_Access_Check (Flag11-Sem)
2813 -- Do_Overflow_Check (Flag17-Sem)
2814 -- Redundant_Use (Flag13-Sem)
2815 -- OK_For_Stream (Flag4-Sem)
2816 -- plus fields for expression
2818 ---------------------------------
2819 -- 4.1.4 Attribute Designator --
2820 ---------------------------------
2822 -- ATTRIBUTE_DESIGNATOR ::=
2823 -- IDENTIFIER [(static_EXPRESSION)]
2824 -- | access | delta | digits
2826 -- There is no explicit node in the tree for an attribute designator.
2827 -- Instead the Attribute_Name and Expressions fields of the parent
2828 -- node (N_Attribute_Reference node) hold the information.
2830 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
2831 -- designator, then they are treated as identifiers internally
2832 -- rather than the keywords of the same name.
2834 --------------------------------------
2835 -- 4.1.4 Range Attribute Reference --
2836 --------------------------------------
2838 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
2840 -- A range attribute reference is represented in the tree using the
2841 -- normal N_Attribute_Reference node.
2843 ---------------------------------------
2844 -- 4.1.4 Range Attribute Designator --
2845 ---------------------------------------
2847 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
2849 -- A range attribute designator is represented in the tree using the
2850 -- normal N_Attribute_Reference node.
2852 --------------------
2853 -- 4.3 Aggregate --
2854 --------------------
2856 -- AGGREGATE ::=
2857 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
2859 -----------------------------
2860 -- 4.3.1 Record Aggregate --
2861 -----------------------------
2863 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
2865 -- N_Aggregate
2866 -- Sloc points to left parenthesis
2867 -- Expressions (List1) (set to No_List if none or null record case)
2868 -- Component_Associations (List2) (set to No_List if none)
2869 -- Null_Record_Present (Flag17)
2870 -- Aggregate_Bounds (Node3-Sem)
2871 -- Associated_Node (Node4-Sem)
2872 -- Static_Processing_OK (Flag4-Sem)
2873 -- Compile_Time_Known_Aggregate (Flag18-Sem)
2874 -- Expansion_Delayed (Flag11-Sem)
2875 -- plus fields for expression
2877 -- Note: this structure is used for both record and array aggregates
2878 -- since the two cases are not separable by the parser. The parser
2879 -- makes no attempt to enforce consistency here, so it is up to the
2880 -- semantic phase to make sure that the aggregate is consistent (i.e.
2881 -- that it is not a "half-and-half" case that mixes record and array
2882 -- syntax. In particular, for a record aggregate, the expressions
2883 -- field will be set if there are positional associations.
2885 -- Note: gigi/gcc can handle array aggregates correctly providing that
2886 -- they are entirely positional, and the array subtype involved has a
2887 -- known at compile time length and is not bit packed, or a convention
2888 -- Fortran array with more than one dimension. If these conditions
2889 -- are not met, then the front end must translate the aggregate into
2890 -- an appropriate set of assignments into a temporary.
2892 -- Note: for the record aggregate case, gigi/gcc can handle all cases
2893 -- of record aggregates, including those for packed, and rep-claused
2894 -- records, and also variant records, providing that there are no
2895 -- variable length fields whose size is not known at runtime, and
2896 -- providing that the aggregate is presented in fully named form.
2898 ----------------------------------------------
2899 -- 4.3.1 Record Component Association List --
2900 ----------------------------------------------
2902 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
2903 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
2904 -- | null record
2906 -- There is no explicit node in the tree for a record component
2907 -- association list. Instead the Null_Record_Present flag is set in
2908 -- the parent node for the NULL RECORD case.
2910 ------------------------------------------------------
2911 -- 4.3.1 Record Component Association (also 4.3.3) --
2912 ------------------------------------------------------
2914 -- RECORD_COMPONENT_ASSOCIATION ::=
2915 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
2917 -- N_Component_Association
2918 -- Sloc points to first selector name
2919 -- Choices (List1)
2920 -- Loop_Actions (List2-Sem)
2921 -- Expression (Node3)
2923 -- Note: this structure is used for both record component associations
2924 -- and array component associations, since the two cases aren't always
2925 -- separable by the parser. The choices list may represent either a
2926 -- list of selector names in the record aggregate case, or a list of
2927 -- discrete choices in the array aggregate case or an N_Others_Choice
2928 -- node (which appears as a singleton list).
2930 ------------------------------------
2931 -- 4.3.1 Commponent Choice List --
2932 ------------------------------------
2934 -- COMPONENT_CHOICE_LIST ::=
2935 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
2936 -- | others
2938 -- The entries of a component choice list appear in the Choices list
2939 -- of the associated N_Component_Association, as either selector
2940 -- names, or as an N_Others_Choice node.
2942 --------------------------------
2943 -- 4.3.2 Extension Aggregate --
2944 --------------------------------
2946 -- EXTENSION_AGGREGATE ::=
2947 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
2949 -- Note: extension aggregates are not permitted in Ada 83 mode
2951 -- N_Extension_Aggregate
2952 -- Sloc points to left parenthesis
2953 -- Ancestor_Part (Node3)
2954 -- Associated_Node (Node4-Sem)
2955 -- Expressions (List1) (set to No_List if none or null record case)
2956 -- Component_Associations (List2) (set to No_List if none)
2957 -- Null_Record_Present (Flag17)
2958 -- Expansion_Delayed (Flag11-Sem)
2959 -- plus fields for expression
2961 --------------------------
2962 -- 4.3.2 Ancestor Part --
2963 --------------------------
2965 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
2967 ----------------------------
2968 -- 4.3.3 Array Aggregate --
2969 ----------------------------
2971 -- ARRAY_AGGREGATE ::=
2972 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
2974 ---------------------------------------
2975 -- 4.3.3 Positional Array Aggregate --
2976 ---------------------------------------
2978 -- POSITIONAL_ARRAY_AGGREGATE ::=
2979 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
2980 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
2982 -- See Record_Aggregate (4.3.1) for node structure
2984 ----------------------------------
2985 -- 4.3.3 Named Array Aggregate --
2986 ----------------------------------
2988 -- NAMED_ARRAY_AGGREGATE ::=
2989 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
2991 -- See Record_Aggregate (4.3.1) for node structure
2993 ----------------------------------------
2994 -- 4.3.3 Array Component Association --
2995 ----------------------------------------
2997 -- ARRAY_COMPONENT_ASSOCIATION ::=
2998 -- DISCRETE_CHOICE_LIST => EXPRESSION
3000 -- See Record_Component_Association (4.3.1) for node structure
3002 --------------------------------------------------
3003 -- 4.4 Expression/Relation/Term/Factor/Primary --
3004 --------------------------------------------------
3006 -- EXPRESSION ::=
3007 -- RELATION {and RELATION} | RELATION {and then RELATION}
3008 -- | RELATION {or RELATION} | RELATION {or else RELATION}
3009 -- | RELATION {xor RELATION}
3011 -- RELATION ::=
3012 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3013 -- | SIMPLE_EXPRESSION [not] in RANGE
3014 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3016 -- SIMPLE_EXPRESSION ::=
3017 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3019 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3021 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3023 -- No nodes are generated for any of these constructs. Instead, the
3024 -- node for the operator appears directly. When we refer to an
3025 -- expression in this description, we mean any of the possible
3026 -- consistuent components of an expression (e.g. identifier is
3027 -- an example of an expression).
3029 ------------------
3030 -- 4.4 Primary --
3031 ------------------
3033 -- PRIMARY ::=
3034 -- NUMERIC_LITERAL | null
3035 -- | STRING_LITERAL | AGGREGATE
3036 -- | NAME | QUALIFIED_EXPRESSION
3037 -- | ALLOCATOR | (EXPRESSION)
3039 -- Usually there is no explicit node in the tree for primary. Instead
3040 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3041 -- exceptions. First, there is an explicit node for a null primary.
3043 -- N_Null
3044 -- Sloc points to NULL
3045 -- plus fields for expression
3047 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3048 -- that the parser keep track of which subexpressions are enclosed
3049 -- in parentheses, and how many levels of parentheses are used. This
3050 -- information is required for optimization purposes, and also for
3051 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3052 -- conform with ((((1)))) in the body).
3054 -- The parentheses are recorded by keeping a Paren_Count field in every
3055 -- subexpression node (it is actually present in all nodes, but only
3056 -- used in subexpression nodes). This count records the number of
3057 -- levels of parentheses. If the number of levels in the source exceeds
3058 -- the maximum accomodated by this count, then the count is simply left
3059 -- at the maximum value. This means that there are some pathalogical
3060 -- cases of failure to detect conformance failures (e.g. an expression
3061 -- with 500 levels of parens will conform with one with 501 levels),
3062 -- but we do not need to lose sleep over this.
3064 -- Historical note: in versions of GNAT prior to 1.75, there was a node
3065 -- type N_Parenthesized_Expression used to accurately record unlimited
3066 -- numbers of levels of parentheses. However, it turned out to be a
3067 -- real nuisance to have to take into account the possible presence of
3068 -- this node during semantic analysis, since basically parentheses have
3069 -- zero relevance to semantic analysis.
3071 -- Note: the level of parentheses always present in things like
3072 -- aggregates does not count, only the parentheses in the primary
3073 -- (EXPRESSION) affect the setting of the Paren_Count field.
3075 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
3076 -- treated as though it were Empty) if No_Initialization is set True.
3078 --------------------------------------
3079 -- 4.5 Short Circuit Control Forms --
3080 --------------------------------------
3082 -- EXPRESSION ::=
3083 -- RELATION {and then RELATION} | RELATION {or else RELATION}
3085 -- Gigi restriction: For both these control forms, the operand and
3086 -- result types are always Standard.Boolean. The expander inserts the
3087 -- required conversion operations where needed to ensure this is the
3088 -- case.
3090 -- N_And_Then
3091 -- Sloc points to AND of AND THEN
3092 -- Left_Opnd (Node2)
3093 -- Right_Opnd (Node3)
3094 -- Actions (List1-Sem)
3095 -- plus fields for expression
3097 -- N_Or_Else
3098 -- Sloc points to OR of OR ELSE
3099 -- Left_Opnd (Node2)
3100 -- Right_Opnd (Node3)
3101 -- Actions (List1-Sem)
3102 -- plus fields for expression
3104 -- Note: The Actions field is used to hold actions associated with
3105 -- the right hand operand. These have to be treated specially since
3106 -- they are not unconditionally executed. See Insert_Actions for a
3107 -- more detailed description of how these actions are handled.
3109 ---------------------------
3110 -- 4.5 Membership Tests --
3111 ---------------------------
3113 -- RELATION ::=
3114 -- SIMPLE_EXPRESSION [not] in RANGE
3115 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3117 -- Note: although the grammar above allows only a range or a
3118 -- subtype mark, the parser in fact will accept any simple
3119 -- expression in place of a subtype mark. This means that the
3120 -- semantic analyzer must be prepared to deal with, and diagnose
3121 -- a simple expression other than a name for the right operand.
3122 -- This simplifies error recovery in the parser.
3124 -- N_In
3125 -- Sloc points to IN
3126 -- Left_Opnd (Node2)
3127 -- Right_Opnd (Node3)
3128 -- plus fields for expression
3130 -- N_Not_In
3131 -- Sloc points to NOT of NOT IN
3132 -- Left_Opnd (Node2)
3133 -- Right_Opnd (Node3)
3134 -- plus fields for expression
3136 --------------------
3137 -- 4.5 Operators --
3138 --------------------
3140 -- LOGICAL_OPERATOR ::= and | or | xor
3142 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
3144 -- BINARY_ADDING_OPERATOR ::= + | - | &
3146 -- UNARY_ADDING_OPERATOR ::= + | -
3148 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
3150 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
3152 -- Sprint syntax if Treat_Fixed_As_Integer is set:
3154 -- x #* y
3155 -- x #/ y
3156 -- x #mod y
3157 -- x #rem y
3159 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
3160 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
3161 -- All handling of smalls for multiplication and division is handled
3162 -- by the front end (mod and rem result only from expansion). Gigi
3163 -- thus never needs to worry about small values (for other operators
3164 -- operating on fixed-point, e.g. addition, the small value does not
3165 -- have any semantic effect anyway, these are always integer operations.
3167 -- Gigi restriction: For all operators taking Boolean operands, the
3168 -- type is always Standard.Boolean. The expander inserts the required
3169 -- conversion operations where needed to ensure this is the case.
3171 -- N_Op_And
3172 -- Sloc points to AND
3173 -- Do_Length_Check (Flag4-Sem)
3174 -- plus fields for binary operator
3175 -- plus fields for expression
3177 -- N_Op_Or
3178 -- Sloc points to OR
3179 -- Do_Length_Check (Flag4-Sem)
3180 -- plus fields for binary operator
3181 -- plus fields for expression
3183 -- N_Op_Xor
3184 -- Sloc points to XOR
3185 -- Do_Length_Check (Flag4-Sem)
3186 -- plus fields for binary operator
3187 -- plus fields for expression
3189 -- N_Op_Eq
3190 -- Sloc points to =
3191 -- plus fields for binary operator
3192 -- plus fields for expression
3194 -- N_Op_Ne
3195 -- Sloc points to /=
3196 -- plus fields for binary operator
3197 -- plus fields for expression
3199 -- N_Op_Lt
3200 -- Sloc points to <
3201 -- plus fields for binary operator
3202 -- plus fields for expression
3204 -- N_Op_Le
3205 -- Sloc points to <=
3206 -- plus fields for binary operator
3207 -- plus fields for expression
3209 -- N_Op_Gt
3210 -- Sloc points to >
3211 -- plus fields for binary operator
3212 -- plus fields for expression
3214 -- N_Op_Ge
3215 -- Sloc points to >=
3216 -- plus fields for binary operator
3217 -- plus fields for expression
3219 -- N_Op_Add
3220 -- Sloc points to + (binary)
3221 -- plus fields for binary operator
3222 -- plus fields for expression
3224 -- N_Op_Subtract
3225 -- Sloc points to - (binary)
3226 -- plus fields for binary operator
3227 -- plus fields for expression
3229 -- N_Op_Concat
3230 -- Sloc points to &
3231 -- Is_Component_Left_Opnd (Flag13-Sem)
3232 -- Is_Component_Right_Opnd (Flag14-Sem)
3233 -- plus fields for binary operator
3234 -- plus fields for expression
3236 -- N_Op_Multiply
3237 -- Sloc points to *
3238 -- Treat_Fixed_As_Integer (Flag14-Sem)
3239 -- Rounded_Result (Flag18-Sem)
3240 -- plus fields for binary operator
3241 -- plus fields for expression
3243 -- N_Op_Divide
3244 -- Sloc points to /
3245 -- Treat_Fixed_As_Integer (Flag14-Sem)
3246 -- Do_Division_Check (Flag13-Sem)
3247 -- Rounded_Result (Flag18-Sem)
3248 -- plus fields for binary operator
3249 -- plus fields for expression
3251 -- N_Op_Mod
3252 -- Sloc points to MOD
3253 -- Treat_Fixed_As_Integer (Flag14-Sem)
3254 -- Do_Division_Check (Flag13-Sem)
3255 -- plus fields for binary operator
3256 -- plus fields for expression
3258 -- N_Op_Rem
3259 -- Sloc points to REM
3260 -- Treat_Fixed_As_Integer (Flag14-Sem)
3261 -- Do_Division_Check (Flag13-Sem)
3262 -- plus fields for binary operator
3263 -- plus fields for expression
3265 -- N_Op_Expon
3266 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
3267 -- Sloc points to **
3268 -- plus fields for binary operator
3269 -- plus fields for expression
3271 -- N_Op_Plus
3272 -- Sloc points to + (unary)
3273 -- plus fields for unary operator
3274 -- plus fields for expression
3276 -- N_Op_Minus
3277 -- Sloc points to - (unary)
3278 -- plus fields for unary operator
3279 -- plus fields for expression
3281 -- N_Op_Abs
3282 -- Sloc points to ABS
3283 -- plus fields for unary operator
3284 -- plus fields for expression
3286 -- N_Op_Not
3287 -- Sloc points to NOT
3288 -- plus fields for unary operator
3289 -- plus fields for expression
3291 -- See also shift operators in section B.2
3293 -- Note on fixed-point operations passed to Gigi: For adding operators,
3294 -- the semantics is to treat these simply as integer operations, with
3295 -- the small values being ignored (the bounds are already stored in
3296 -- units of small, so that constraint checking works as usual). For the
3297 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
3298 -- point operands if the Treat_Fixed_As_Integer flag is set and will
3299 -- thus treat these nodes in identical manner, ignoring small values.
3301 --------------------------
3302 -- 4.6 Type Conversion --
3303 --------------------------
3305 -- TYPE_CONVERSION ::=
3306 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
3308 -- In the (NAME) case, the name is stored as the expression
3310 -- Note: the parser never generates a type conversion node, since it
3311 -- looks like an indexed component which is generated by preference.
3312 -- The semantic pass must correct this misidentification.
3314 -- Gigi handles conversions that involve no change in the root type,
3315 -- and also all conversions from integer to floating-point types.
3316 -- Conversions from floating-point to integer are only handled in
3317 -- the case where Float_Truncate flag set. Other conversions from
3318 -- floating-point to integer (involving rounding) and all conversions
3319 -- involving fixed-point types are handled by the expander.
3321 -- Sprint syntax if Float_Truncate set: X^(Y)
3322 -- Sprint syntax if Conversion_OK set X?(Y)
3323 -- Sprint syntax if both flags set X?^(Y)
3325 -- Note: If either the operand or result type is fixed-point, Gigi will
3326 -- only see a type conversion node with Conversion_OK set. The front end
3327 -- takes care of all handling of small's for fixed-point conversions.
3329 -- N_Type_Conversion
3330 -- Sloc points to first token of subtype mark
3331 -- Subtype_Mark (Node4)
3332 -- Expression (Node3)
3333 -- Do_Overflow_Check (Flag17-Sem)
3334 -- Do_Tag_Check (Flag13-Sem)
3335 -- Do_Length_Check (Flag4-Sem)
3336 -- Float_Truncate (Flag11-Sem)
3337 -- Rounded_Result (Flag18-Sem)
3338 -- Conversion_OK (Flag14-Sem)
3339 -- plus fields for expression
3341 -- Note: if a range check is required, then the Do_Range_Check flag
3342 -- is set in the Expression with the check being done against the
3343 -- target type range (after the base type conversion, if any).
3345 -------------------------------
3346 -- 4.7 Qualified Expression --
3347 -------------------------------
3349 -- QUALIFIED_EXPRESSION ::=
3350 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
3352 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
3353 -- the expression, so the Expression field of this node always points
3354 -- to a parenthesized expression in this case (i.e. Paren_Count will
3355 -- always be non-zero for the referenced expression if it is not an
3356 -- aggregate).
3358 -- N_Qualified_Expression
3359 -- Sloc points to apostrophe
3360 -- Subtype_Mark (Node4)
3361 -- Expression (Node3) expression or aggregate
3362 -- plus fields for expression
3364 --------------------
3365 -- 4.8 Allocator --
3366 --------------------
3368 -- ALLOCATOR ::=
3369 -- new SUBTYPE_INDICATION | new QUALIFIED_EXPRESSION
3371 -- Sprint syntax (when storage pool present)
3372 -- new xxx (storage_pool = pool)
3374 -- N_Allocator
3375 -- Sloc points to NEW
3376 -- Expression (Node3) subtype indication or qualified expression
3377 -- Storage_Pool (Node1-Sem)
3378 -- Procedure_To_Call (Node4-Sem)
3379 -- No_Initialization (Flag13-Sem)
3380 -- Do_Storage_Check (Flag17-Sem)
3381 -- plus fields for expression
3383 ---------------------------------
3384 -- 5.1 Sequence Of Statements --
3385 ---------------------------------
3387 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
3389 -- Note: Although the parser will not accept a declaration as a
3390 -- statement, the semantic analyzer may insert declarations (e.g.
3391 -- declarations of implicit types needed for execution of other
3392 -- statements) into a sequence of statements, so the code genmerator
3393 -- should be prepared to accept a declaration where a statement is
3394 -- expected. Note also that pragmas can appear as statements.
3396 --------------------
3397 -- 5.1 Statement --
3398 --------------------
3400 -- STATEMENT ::=
3401 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
3403 -- There is no explicit node in the tree for a statement. Instead, the
3404 -- individual statement appears directly. Labels are treated as a
3405 -- kind of statement, i.e. they are linked into a statement list at
3406 -- the point they appear, so the labeled statement appears following
3407 -- the label or labels in the statement list.
3409 ---------------------------
3410 -- 5.1 Simple Statement --
3411 ---------------------------
3413 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
3414 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
3415 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
3416 -- | RETURN_STATEMENT | ENTRY_CALL_STATEMENT
3417 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
3418 -- | ABORT_STATEMENT | RAISE_STATEMENT
3419 -- | CODE_STATEMENT
3421 -----------------------------
3422 -- 5.1 Compound Statement --
3423 -----------------------------
3425 -- COMPOUND_STATEMENT ::=
3426 -- IF_STATEMENT | CASE_STATEMENT
3427 -- | LOOP_STATEMENT | BLOCK_STATEMENT
3428 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
3430 -------------------------
3431 -- 5.1 Null Statement --
3432 -------------------------
3434 -- NULL_STATEMENT ::= null;
3436 -- N_Null_Statement
3437 -- Sloc points to NULL
3439 ----------------
3440 -- 5.1 Label --
3441 ----------------
3443 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
3445 -- Note that the occurrence of a label is not a defining identifier,
3446 -- but rather a referencing occurrence. The defining occurrence is
3447 -- in the implicit label declaration which occurs in the innermost
3448 -- enclosing block.
3450 -- N_Label
3451 -- Sloc points to <<
3452 -- Identifier (Node1) direct name of statement identifier
3453 -- Exception_Junk (Flag11-Sem)
3455 -------------------------------
3456 -- 5.1 Statement Identifier --
3457 -------------------------------
3459 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
3461 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
3462 -- (not an OPERATOR_SYMBOL)
3464 -------------------------------
3465 -- 5.2 Assignment Statement --
3466 -------------------------------
3468 -- ASSIGNMENT_STATEMENT ::=
3469 -- variable_NAME := EXPRESSION;
3471 -- N_Assignment_Statement
3472 -- Sloc points to :=
3473 -- Name (Node2)
3474 -- Expression (Node3)
3475 -- Do_Tag_Check (Flag13-Sem)
3476 -- Do_Length_Check (Flag4-Sem)
3477 -- Forwards_OK (Flag5-Sem)
3478 -- Backwards_OK (Flag6-Sem)
3479 -- No_Ctrl_Actions (Flag7-Sem)
3481 -- Note: if a range check is required, then the Do_Range_Check flag
3482 -- is set in the Expression (right hand side), with the check being
3483 -- done against the type of the Name (left hand side).
3485 -----------------------
3486 -- 5.3 If Statement --
3487 -----------------------
3489 -- IF_STATEMENT ::=
3490 -- if CONDITION then
3491 -- SEQUENCE_OF_STATEMENTS
3492 -- {elsif CONDITION then
3493 -- SEQUENCE_OF_STATEMENTS}
3494 -- [else
3495 -- SEQUENCE_OF_STATEMENTS]
3496 -- end if;
3498 -- Gigi restriction: This expander ensures that the type of the
3499 -- Condition fields is always Standard.Boolean, even if the type
3500 -- in the source is some non-standard boolean type.
3502 -- N_If_Statement
3503 -- Sloc points to IF
3504 -- Condition (Node1)
3505 -- Then_Statements (List2)
3506 -- Elsif_Parts (List3) (set to No_List if none present)
3507 -- Else_Statements (List4) (set to No_List if no else part present)
3508 -- End_Span (Uint5) (set to No_Uint if expander generated)
3510 -- N_Elsif_Part
3511 -- Sloc points to ELSIF
3512 -- Condition (Node1)
3513 -- Then_Statements (List2)
3514 -- Condition_Actions (List3-Sem)
3516 --------------------
3517 -- 5.3 Condition --
3518 --------------------
3520 -- CONDITION ::= boolean_EXPRESSION
3522 -------------------------
3523 -- 5.4 Case Statement --
3524 -------------------------
3526 -- CASE_STATEMENT ::=
3527 -- case EXPRESSION is
3528 -- CASE_STATEMENT_ALTERNATIVE
3529 -- {CASE_STATEMENT_ALTERNATIVE}
3530 -- end case;
3532 -- Note: the Alternatives can contain pragmas. These only occur at
3533 -- the start of the list, since any pragmas occurring after the first
3534 -- alternative are absorbed into the corresponding statement sequence.
3536 -- N_Case_Statement
3537 -- Sloc points to CASE
3538 -- Expression (Node3)
3539 -- Alternatives (List4)
3540 -- End_Span (Uint5) (set to No_Uint if expander generated)
3542 -------------------------------------
3543 -- 5.4 Case Statement Alternative --
3544 -------------------------------------
3546 -- CASE_STATEMENT_ALTERNATIVE ::=
3547 -- when DISCRETE_CHOICE_LIST =>
3548 -- SEQUENCE_OF_STATEMENTS
3550 -- N_Case_Statement_Alternative
3551 -- Sloc points to WHEN
3552 -- Discrete_Choices (List4)
3553 -- Statements (List3)
3555 -------------------------
3556 -- 5.5 Loop Statement --
3557 -------------------------
3559 -- LOOP_STATEMENT ::=
3560 -- [loop_STATEMENT_IDENTIFIER :]
3561 -- [ITERATION_SCHEME] loop
3562 -- SEQUENCE_OF_STATEMENTS
3563 -- end loop [loop_IDENTIFIER];
3565 -- Note: The occurrence of a loop label is not a defining identifier
3566 -- but rather a referencing occurrence. The defining occurrence is in
3567 -- the implicit label declaration which occurs in the innermost
3568 -- enclosing block.
3570 -- Note: there is always a loop statement identifier present in
3571 -- the tree, even if none was given in the source. In the case where
3572 -- no loop identifier is given in the source, the parser creates
3573 -- a name of the form _Loop_n, where n is a decimal integer (the
3574 -- two underlines ensure that the loop names created in this manner
3575 -- do not conflict with any user defined identifiers), and the flag
3576 -- Has_Created_Identifier is set to True. The only exception to the
3577 -- rule that all loop statement nodes have identifiers occurs for
3578 -- loops constructed by the expander, and the semantic analyzer will
3579 -- create and supply dummy loop identifiers in these cases.
3581 -- N_Loop_Statement
3582 -- Sloc points to LOOP
3583 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
3584 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
3585 -- Statements (List3)
3586 -- End_Label (Node4)
3587 -- Has_Created_Identifier (Flag15)
3589 --------------------------
3590 -- 5.5 Iteration Scheme --
3591 --------------------------
3593 -- ITERATION_SCHEME ::=
3594 -- while CONDITION | for LOOP_PARAMETER_SPECIFICATION
3596 -- Gigi restriction: This expander ensures that the type of the
3597 -- Condition field is always Standard.Boolean, even if the type
3598 -- in the source is some non-standard boolean type.
3600 -- N_Iteration_Scheme
3601 -- Sloc points to WHILE or FOR
3602 -- Condition (Node1) (set to Empty if FOR case)
3603 -- Condition_Actions (List3-Sem)
3604 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
3606 ---------------------------------------
3607 -- 5.5 Loop parameter specification --
3608 ---------------------------------------
3610 -- LOOP_PARAMETER_SPECIFICATION ::=
3611 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
3613 -- N_Loop_Parameter_Specification
3614 -- Sloc points to first identifier
3615 -- Defining_Identifier (Node1)
3616 -- Reverse_Present (Flag15)
3617 -- Discrete_Subtype_Definition (Node4)
3619 --------------------------
3620 -- 5.6 Block Statement --
3621 --------------------------
3623 -- BLOCK_STATEMENT ::=
3624 -- [block_STATEMENT_IDENTIFIER:]
3625 -- [declare
3626 -- DECLARATIVE_PART]
3627 -- begin
3628 -- HANDLED_SEQUENCE_OF_STATEMENTS
3629 -- end [block_IDENTIFIER];
3631 -- Note that the occurrence of a block identifier is not a defining
3632 -- identifier, but rather a referencing occurrence. The defining
3633 -- occurrence is in the implicit label declaration which occurs in
3634 -- the innermost enclosing block.
3636 -- Note: there is always a block statement identifier present in
3637 -- the tree, even if none was given in the source. In the case where
3638 -- no block identifier is given in the source, the parser creates
3639 -- a name of the form _Block_n, where n is a decimal integer (the
3640 -- two underlines ensure that the block names created in this manner
3641 -- do not conflict with any user defined identifiers), and the flag
3642 -- Has_Created_Identifier is set to True. The only exception to the
3643 -- rule that all loop statement nodes have identifiers occurs for
3644 -- blocks constructed by the expander, and the semantic analyzer
3645 -- creates and supplies dummy names for the blocks).
3647 -- N_Block_Statement
3648 -- Sloc points to DECLARE or BEGIN
3649 -- Identifier (Node1) block direct name (set to Empty if not present)
3650 -- Declarations (List2) (set to No_List if no DECLARE part)
3651 -- Handled_Statement_Sequence (Node4)
3652 -- Is_Task_Master (Flag5-Sem)
3653 -- Activation_Chain_Entity (Node3-Sem)
3654 -- Has_Created_Identifier (Flag15)
3655 -- Is_Task_Allocation_Block (Flag6)
3656 -- Is_Asynchronous_Call_Block (Flag7)
3658 -------------------------
3659 -- 5.7 Exit Statement --
3660 -------------------------
3662 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
3664 -- Gigi restriction: This expander ensures that the type of the
3665 -- Condition field is always Standard.Boolean, even if the type
3666 -- in the source is some non-standard boolean type.
3668 -- N_Exit_Statement
3669 -- Sloc points to EXIT
3670 -- Name (Node2) (set to Empty if no loop name present)
3671 -- Condition (Node1) (set to Empty if no when part present)
3673 -------------------------
3674 -- 5.9 Goto Statement --
3675 -------------------------
3677 -- GOTO_STATEMENT ::= goto label_NAME;
3679 -- N_Goto_Statement
3680 -- Sloc points to GOTO
3681 -- Name (Node2)
3682 -- Exception_Junk (Flag11-Sem)
3684 ---------------------------------
3685 -- 6.1 Subprogram Declaration --
3686 ---------------------------------
3688 -- SUBPROGRAM_DECLARATION ::= SUBPROGRAM_SPECIFICATION;
3690 -- N_Subprogram_Declaration
3691 -- Sloc points to FUNCTION or PROCEDURE
3692 -- Specification (Node1)
3693 -- Body_To_Inline (Node3-Sem)
3694 -- Corresponding_Body (Node5-Sem)
3695 -- Parent_Spec (Node4-Sem)
3697 ------------------------------------------
3698 -- 6.1 Abstract Subprogram Declaration --
3699 ------------------------------------------
3701 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
3702 -- SUBPROGRAM_SPECIFICATION is abstract;
3704 -- N_Abstract_Subprogram_Declaration
3705 -- Sloc points to ABSTRACT
3706 -- Specification (Node1)
3708 -----------------------------------
3709 -- 6.1 Subprogram Specification --
3710 -----------------------------------
3712 -- SUBPROGRAM_SPECIFICATION ::=
3713 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
3714 -- | function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
3716 -- Note: there are no separate nodes for the profiles, instead the
3717 -- information appears directly in the following nodes.
3719 -- N_Function_Specification
3720 -- Sloc points to FUNCTION
3721 -- Defining_Unit_Name (Node1) (the designator)
3722 -- Elaboration_Boolean (Node2-Sem)
3723 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3724 -- Subtype_Mark (Node4) for return type
3725 -- Generic_Parent (Node5-Sem)
3727 -- N_Procedure_Specification
3728 -- Sloc points to PROCEDURE
3729 -- Defining_Unit_Name (Node1)
3730 -- Elaboration_Boolean (Node2-Sem)
3731 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3732 -- Generic_Parent (Node5-Sem)
3734 ---------------------
3735 -- 6.1 Designator --
3736 ---------------------
3738 -- DESIGNATOR ::=
3739 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
3741 -- Designators that are simply identifiers or operator symbols appear
3742 -- directly in the tree in this form. The following node is used only
3743 -- in the case where the designator has a parent unit name component.
3745 -- N_Designator
3746 -- Sloc points to period
3747 -- Name (Node2) holds the parent unit name. Note that this is always
3748 -- non-Empty, since this node is only used for the case where a
3749 -- parent library unit package name is present.
3750 -- Identifier (Node1)
3752 -- Note that the identifier can also be an operator symbol here.
3754 ------------------------------
3755 -- 6.1 Defining Designator --
3756 ------------------------------
3758 -- DEFINING_DESIGNATOR ::=
3759 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
3761 -------------------------------------
3762 -- 6.1 Defining Program Unit Name --
3763 -------------------------------------
3765 -- DEFINING_PROGRAM_UNIT_NAME ::=
3766 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
3768 -- The parent unit name is present only in the case of a child unit
3769 -- name (permissible only for Ada 95 for a library level unit, i.e.
3770 -- a unit at scope level one). If no such name is present, the defining
3771 -- program unit name is represented simply as the defining identifier.
3772 -- In the child unit case, the following node is used to represent the
3773 -- child unit name.
3775 -- N_Defining_Program_Unit_Name
3776 -- Sloc points to period
3777 -- Name (Node2) holds the parent unit name. Note that this is always
3778 -- non-Empty, since this node is only used for the case where a
3779 -- parent unit name is present.
3780 -- Defining_Identifier (Node1)
3782 --------------------------
3783 -- 6.1 Operator Symbol --
3784 --------------------------
3786 -- OPERATOR_SYMBOL ::= STRING_LITERAL
3788 -- Note: the fields of the N_Operator_Symbol node are laid out to
3789 -- match the corresponding fields of an N_Character_Literal node. This
3790 -- allows easy conversion of the operator symbol node into a character
3791 -- literal node in the case where a string constant of the form of an
3792 -- operator symbol is scanned out as such, but turns out semantically
3793 -- to be a string literal that is not an operator. For details see
3794 -- Sinfo.CN.Change_Operator_Symbol_To_String_Literal.
3796 -- N_Operator_Symbol
3797 -- Sloc points to literal
3798 -- Chars (Name1) contains the Name_Id for the operator symbol
3799 -- Strval (Str3) Id of string value. This is used if the operator
3800 -- symbol turns out to be a normal string after all.
3801 -- Entity (Node4-Sem)
3802 -- Associated_Node (Node4-Sem)
3803 -- Has_Private_View (Flag11-Sem) set in generic units.
3804 -- Etype (Node5-Sem)
3806 -- Note: the Strval field may be set to No_String for generated
3807 -- operator symbols that are known not to be string literals
3808 -- semantically.
3810 -----------------------------------
3811 -- 6.1 Defining Operator Symbol --
3812 -----------------------------------
3814 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
3816 -- A defining operator symbol is an entity, which has additional
3817 -- fields depending on the setting of the Ekind field. These
3818 -- additional fields are defined (and access subprograms declared)
3819 -- in package Einfo.
3821 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
3822 -- are deliberately layed out to match the layout of fields in an
3823 -- ordinary N_Operator_Symbol node allowing for easy alteration of
3824 -- an operator symbol node into a defining operator symbol node.
3825 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
3826 -- for further details.
3828 -- N_Defining_Operator_Symbol
3829 -- Sloc points to literal
3830 -- Chars (Name1) contains the Name_Id for the operator symbol
3831 -- Next_Entity (Node2-Sem)
3832 -- Scope (Node3-Sem)
3833 -- Etype (Node5-Sem)
3835 ----------------------------
3836 -- 6.1 Parameter Profile --
3837 ----------------------------
3839 -- PARAMETER_PROFILE ::= [FORMAL_PART]
3841 ---------------------------------------
3842 -- 6.1 Parameter and Result Profile --
3843 ---------------------------------------
3845 -- PARAMETER_AND_RESULT_PROFILE ::= [FORMAL_PART] return SUBTYPE_MARK
3847 -- There is no explicit node in the tree for a parameter and result
3848 -- profile. Instead the information appears directly in the parent.
3850 ----------------------
3851 -- 6.1 Formal part --
3852 ----------------------
3854 -- FORMAL_PART ::=
3855 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
3857 ----------------------------------
3858 -- 6.1 Parameter specification --
3859 ----------------------------------
3861 -- PARAMETER_SPECIFICATION ::=
3862 -- DEFINING_IDENTIFIER_LIST : MODE SUBTYPE_MARK
3863 -- [:= DEFAULT_EXPRESSION]
3864 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
3865 -- [:= DEFAULT_EXPRESSION]
3867 -- Although the syntax allows multiple identifiers in the list, the
3868 -- semantics is as though successive specifications were given with
3869 -- identical type definition and expression components. To simplify
3870 -- semantic processing, the parser represents a multiple declaration
3871 -- case as a sequence of single Specifications, using the More_Ids and
3872 -- Prev_Ids flags to preserve the original source form as described
3873 -- in the section on "Handling of Defining Identifier Lists".
3875 -- N_Parameter_Specification
3876 -- Sloc points to first identifier
3877 -- Defining_Identifier (Node1)
3878 -- In_Present (Flag15)
3879 -- Out_Present (Flag17)
3880 -- Parameter_Type (Node2) subtype mark or access definition
3881 -- Expression (Node3) (set to Empty if no default expression present)
3882 -- Do_Accessibility_Check (Flag13-Sem)
3883 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3884 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3885 -- Default_Expression (Node5-Sem)
3887 ---------------
3888 -- 6.1 Mode --
3889 ---------------
3891 -- MODE ::= [in] | in out | out
3893 -- There is no explicit node in the tree for the Mode. Instead the
3894 -- In_Present and Out_Present flags are set in the parent node to
3895 -- record the presence of keywords specifying the mode.
3897 --------------------------
3898 -- 6.3 Subprogram Body --
3899 --------------------------
3901 -- SUBPROGRAM_BODY ::=
3902 -- SUBPROGRAM_SPECIFICATION is
3903 -- DECLARATIVE_PART
3904 -- begin
3905 -- HANDLED_SEQUENCE_OF_STATEMENTS
3906 -- end [DESIGNATOR];
3908 -- N_Subprogram_Body
3909 -- Sloc points to FUNCTION or PROCEDURE
3910 -- Specification (Node1)
3911 -- Declarations (List2)
3912 -- Handled_Statement_Sequence (Node4)
3913 -- Activation_Chain_Entity (Node3-Sem)
3914 -- Corresponding_Spec (Node5-Sem)
3915 -- Acts_As_Spec (Flag4-Sem)
3916 -- Bad_Is_Detected (Flag15) used only by parser
3917 -- Do_Storage_Check (Flag17-Sem)
3918 -- Has_Priority_Pragma (Flag6-Sem)
3919 -- Is_Protected_Subprogram_Body (Flag7-Sem)
3920 -- Is_Task_Master (Flag5-Sem)
3921 -- Was_Originally_Stub (Flag13-Sem)
3923 -----------------------------------
3924 -- 6.4 Procedure Call Statement --
3925 -----------------------------------
3927 -- PROCEDURE_CALL_STATEMENT ::=
3928 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
3930 -- Note: the reason that a procedure call has expression fields is
3931 -- that it semantically resembles an expression, e.g. overloading is
3932 -- allowed and a type is concocted for semantic processing purposes.
3933 -- Certain of these fields, such as Parens are not relevant, but it
3934 -- is easier to just supply all of them together!
3936 -- N_Procedure_Call_Statement
3937 -- Sloc points to first token of name or prefix
3938 -- Name (Node2) stores name or prefix
3939 -- Parameter_Associations (List3) (set to No_List if no
3940 -- actual parameter part)
3941 -- First_Named_Actual (Node4-Sem)
3942 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
3943 -- Do_Tag_Check (Flag13-Sem)
3944 -- Parameter_List_Truncated (Flag17-Sem)
3945 -- ABE_Is_Certain (Flag18-Sem)
3946 -- plus fields for expression
3948 -- If any IN parameter requires a range check, then the corresponding
3949 -- argument expression has the Do_Range_Check flag set, and the range
3950 -- check is done against the formal type. Note that this argument
3951 -- expression may appear directly in the Parameter_Associations list,
3952 -- or may be a descendent of an N_Parameter_Association node that
3953 -- appears in this list.
3955 ------------------------
3956 -- 6.4 Function Call --
3957 ------------------------
3959 -- FUNCTION_CALL ::=
3960 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
3962 -- Note: the parser may generate an indexed component node or simply
3963 -- a name node instead of a function call node. The semantic pass must
3964 -- correct this misidentification.
3966 -- N_Function_Call
3967 -- Sloc points to first token of name or prefix
3968 -- Name (Node2) stores name or prefix
3969 -- Parameter_Associations (List3) (set to No_List if no
3970 -- actual parameter part)
3971 -- First_Named_Actual (Node4-Sem)
3972 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
3973 -- Do_Tag_Check (Flag13-Sem)
3974 -- Parameter_List_Truncated (Flag17-Sem)
3975 -- ABE_Is_Certain (Flag18-Sem)
3976 -- plus fields for expression
3978 --------------------------------
3979 -- 6.4 Actual Parameter Part --
3980 --------------------------------
3982 -- ACTUAL_PARAMETER_PART ::=
3983 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
3985 --------------------------------
3986 -- 6.4 Parameter Association --
3987 --------------------------------
3989 -- PARAMETER_ASSOCIATION ::=
3990 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
3992 -- Note: the N_Parameter_Association node is built only if a formal
3993 -- parameter selector name is present, otherwise the parameter
3994 -- association appears in the tree simply as the node for the
3995 -- explicit actual parameter.
3997 -- N_Parameter_Association
3998 -- Sloc points to formal parameter
3999 -- Selector_Name (Node2) (always non-Empty, since this node is
4000 -- only used if a formal parameter selector name is present)
4001 -- Explicit_Actual_Parameter (Node3)
4002 -- Next_Named_Actual (Node4-Sem)
4004 ---------------------------
4005 -- 6.4 Actual Parameter --
4006 ---------------------------
4008 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
4010 ---------------------------
4011 -- 6.5 Return Statement --
4012 ---------------------------
4014 -- RETURN_STATEMENT ::= return [EXPRESSION];
4016 -- N_Return_Statement
4017 -- Sloc points to RETURN
4018 -- Expression (Node3) (set to Empty if no expression present)
4019 -- Storage_Pool (Node1-Sem)
4020 -- Procedure_To_Call (Node4-Sem)
4021 -- Do_Tag_Check (Flag13-Sem)
4022 -- Return_Type (Node2-Sem)
4023 -- By_Ref (Flag5-Sem)
4025 -- Note: if a range check is required, then Do_Range_Check is set
4026 -- on the Expression. The range check is against Return_Type.
4028 ------------------------------
4029 -- 7.1 Package Declaration --
4030 ------------------------------
4032 -- PACKAGE_DECLARATION ::= PACKAGE_SPECIFICATION;
4034 -- Note: the activation chain entity for a package spec is used for
4035 -- all tasks declared in the package spec, or in the package body.
4037 -- N_Package_Declaration
4038 -- Sloc points to PACKAGE
4039 -- Specification (Node1)
4040 -- Corresponding_Body (Node5-Sem)
4041 -- Parent_Spec (Node4-Sem)
4042 -- Activation_Chain_Entity (Node3-Sem)
4044 --------------------------------
4045 -- 7.1 Package Specification --
4046 --------------------------------
4048 -- PACKAGE_SPECIFICATION ::=
4049 -- package DEFINING_PROGRAM_UNIT_NAME is
4050 -- {BASIC_DECLARATIVE_ITEM}
4051 -- [private
4052 -- {BASIC_DECLARATIVE_ITEM}]
4053 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
4055 -- N_Package_Specification
4056 -- Sloc points to PACKAGE
4057 -- Defining_Unit_Name (Node1)
4058 -- Visible_Declarations (List2)
4059 -- Private_Declarations (List3) (set to No_List if no private
4060 -- part present)
4061 -- End_Label (Node4)
4062 -- Generic_Parent (Node5-Sem)
4064 -----------------------
4065 -- 7.1 Package Body --
4066 -----------------------
4068 -- PACKAGE_BODY ::=
4069 -- package body DEFINING_PROGRAM_UNIT_NAME is
4070 -- DECLARATIVE_PART
4071 -- [begin
4072 -- HANDLED_SEQUENCE_OF_STATEMENTS]
4073 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
4075 -- N_Package_Body
4076 -- Sloc points to PACKAGE
4077 -- Defining_Unit_Name (Node1)
4078 -- Declarations (List2)
4079 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
4080 -- Corresponding_Spec (Node5-Sem)
4081 -- Was_Originally_Stub (Flag13-Sem)
4083 -- Note: if a source level package does not contain a handled sequence
4084 -- of statements, then the parser supplies a dummy one with a null
4085 -- sequence of statements. Comes_From_Source will be False in this
4086 -- constructed sequence. The reason we need this is for the End_Label
4087 -- field in the HSS.
4089 -----------------------------------
4090 -- 7.4 Private Type Declaration --
4091 -----------------------------------
4093 -- PRIVATE_TYPE_DECLARATION ::=
4094 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
4095 -- is [[abstract] tagged] [limited] private;
4097 -- Note: TAGGED is not permitted in Ada 83 mode
4099 -- N_Private_Type_Declaration
4100 -- Sloc points to TYPE
4101 -- Defining_Identifier (Node1)
4102 -- Discriminant_Specifications (List4) (set to No_List if no
4103 -- discriminant part)
4104 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4105 -- Abstract_Present (Flag4)
4106 -- Tagged_Present (Flag15)
4107 -- Limited_Present (Flag17)
4109 ----------------------------------------
4110 -- 7.4 Private Extension Declaration --
4111 ----------------------------------------
4113 -- PRIVATE_EXTENSION_DECLARATION ::=
4114 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
4115 -- [abstract] new ancestor_SUBTYPE_INDICATION with private;
4117 -- Note: private extension declarations are not allowed in Ada 83 mode
4119 -- N_Private_Extension_Declaration
4120 -- Sloc points to TYPE
4121 -- Defining_Identifier (Node1)
4122 -- Discriminant_Specifications (List4) (set to No_List if no
4123 -- discriminant part)
4124 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4125 -- Abstract_Present (Flag4)
4126 -- Subtype_Indication (Node5)
4128 ---------------------
4129 -- 8.4 Use Clause --
4130 ---------------------
4132 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
4134 -----------------------------
4135 -- 8.4 Use Package Clause --
4136 -----------------------------
4138 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
4140 -- N_Use_Package_Clause
4141 -- Sloc points to USE
4142 -- Names (List2)
4143 -- Next_Use_Clause (Node3-Sem)
4144 -- Hidden_By_Use_Clause (Elist4-Sem)
4146 --------------------------
4147 -- 8.4 Use Type Clause --
4148 --------------------------
4150 -- USE_TYPE_CLAUSE ::= use type SUBTYPE_MARK {, SUBTYPE_MARK};
4152 -- Note: use type clause is not permitted in Ada 83 mode
4154 -- N_Use_Type_Clause
4155 -- Sloc points to USE
4156 -- Subtype_Marks (List2)
4157 -- Next_Use_Clause (Node3-Sem)
4158 -- Hidden_By_Use_Clause (Elist4-Sem)
4160 -------------------------------
4161 -- 8.5 Renaming Declaration --
4162 -------------------------------
4164 -- RENAMING_DECLARATION ::=
4165 -- OBJECT_RENAMING_DECLARATION
4166 -- | EXCEPTION_RENAMING_DECLARATION
4167 -- | PACKAGE_RENAMING_DECLARATION
4168 -- | SUBPROGRAM_RENAMING_DECLARATION
4169 -- | GENERIC_RENAMING_DECLARATION
4171 --------------------------------------
4172 -- 8.5 Object Renaming Declaration --
4173 --------------------------------------
4175 -- OBJECT_RENAMING_DECLARATION ::=
4176 -- DEFINING_IDENTIFIER : SUBTYPE_MARK renames object_NAME;
4178 -- N_Object_Renaming_Declaration
4179 -- Sloc points to first identifier
4180 -- Defining_Identifier (Node1)
4181 -- Subtype_Mark (Node4)
4182 -- Name (Node2)
4183 -- Corresponding_Generic_Association (Node5-Sem)
4185 -----------------------------------------
4186 -- 8.5 Exception Renaming Declaration --
4187 -----------------------------------------
4189 -- EXCEPTION_RENAMING_DECLARATION ::=
4190 -- DEFINING_IDENTIFIER : exception renames exception_NAME;
4192 -- N_Exception_Renaming_Declaration
4193 -- Sloc points to first identifier
4194 -- Defining_Identifier (Node1)
4195 -- Name (Node2)
4197 ---------------------------------------
4198 -- 8.5 Package Renaming Declaration --
4199 ---------------------------------------
4201 -- PACKAGE_RENAMING_DECLARATION ::=
4202 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME;
4204 -- N_Package_Renaming_Declaration
4205 -- Sloc points to PACKAGE
4206 -- Defining_Unit_Name (Node1)
4207 -- Name (Node2)
4208 -- Parent_Spec (Node4-Sem)
4210 ------------------------------------------
4211 -- 8.5 Subprogram Renaming Declaration --
4212 ------------------------------------------
4214 -- SUBPROGRAM_RENAMING_DECLARATION ::=
4215 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
4217 -- N_Subprogram_Renaming_Declaration
4218 -- Sloc points to RENAMES
4219 -- Specification (Node1)
4220 -- Name (Node2)
4221 -- Parent_Spec (Node4-Sem)
4222 -- Corresponding_Spec (Node5-Sem)
4224 -----------------------------------------
4225 -- 8.5.5 Generic Renaming Declaration --
4226 -----------------------------------------
4228 -- GENERIC_RENAMING_DECLARATION ::=
4229 -- generic package DEFINING_PROGRAM_UNIT_NAME
4230 -- renames generic_package_NAME
4231 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
4232 -- renames generic_procedure_NAME
4233 -- | generic function DEFINING_PROGRAM_UNIT_NAME
4234 -- renames generic_function_NAME
4236 -- N_Generic_Package_Renaming_Declaration
4237 -- Sloc points to GENERIC
4238 -- Defining_Unit_Name (Node1)
4239 -- Name (Node2)
4240 -- Parent_Spec (Node4-Sem)
4242 -- N_Generic_Procedure_Renaming_Declaration
4243 -- Sloc points to GENERIC
4244 -- Defining_Unit_Name (Node1)
4245 -- Name (Node2)
4246 -- Parent_Spec (Node4-Sem)
4248 -- N_Generic_Function_Renaming_Declaration
4249 -- Sloc points to GENERIC
4250 -- Defining_Unit_Name (Node1)
4251 -- Name (Node2)
4252 -- Parent_Spec (Node4-Sem)
4254 --------------------------------
4255 -- 9.1 Task Type Declaration --
4256 --------------------------------
4258 -- TASK_TYPE_DECLARATION ::=
4259 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4260 -- [is TASK_DEFINITITION];
4262 -- N_Task_Type_Declaration
4263 -- Sloc points to TASK
4264 -- Defining_Identifier (Node1)
4265 -- Task_Body_Procedure (Node2-Sem)
4266 -- Discriminant_Specifications (List4) (set to No_List if no
4267 -- discriminant part)
4268 -- Task_Definition (Node3) (set to Empty if not present)
4269 -- Corresponding_Body (Node5-Sem)
4271 ----------------------------------
4272 -- 9.1 Single Task Declaration --
4273 ----------------------------------
4275 -- SINGLE_TASK_DECLARATION ::=
4276 -- task DEFINING_IDENTIFIER [is TASK_DEFINITION];
4278 -- N_Single_Task_Declaration
4279 -- Sloc points to TASK
4280 -- Defining_Identifier (Node1)
4281 -- Task_Definition (Node3) (set to Empty if not present)
4283 --------------------------
4284 -- 9.1 Task Definition --
4285 --------------------------
4287 -- TASK_DEFINITION ::=
4288 -- {TASK_ITEM}
4289 -- [private
4290 -- {TASK_ITEM}]
4291 -- end [task_IDENTIFIER]
4293 -- Note: as a result of semantic analysis, the list of task items can
4294 -- include implicit type declarations resulting from entry families.
4296 -- N_Task_Definition
4297 -- Sloc points to first token of task definition
4298 -- Visible_Declarations (List2)
4299 -- Private_Declarations (List3) (set to No_List if no private part)
4300 -- End_Label (Node4)
4301 -- Has_Priority_Pragma (Flag6-Sem)
4302 -- Has_Storage_Size_Pragma (Flag5-Sem)
4303 -- Has_Task_Info_Pragma (Flag7-Sem)
4304 -- Has_Task_Name_Pragma (Flag8-Sem)
4306 --------------------
4307 -- 9.1 Task Item --
4308 --------------------
4310 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
4312 --------------------
4313 -- 9.1 Task Body --
4314 --------------------
4316 -- TASK_BODY ::=
4317 -- task body task_DEFINING_IDENTIFIER is
4318 -- DECLARATIVE_PART
4319 -- begin
4320 -- HANDLED_SEQUENCE_OF_STATEMENTS
4321 -- end [task_IDENTIFIER];
4323 -- Gigi restriction: This node never appears.
4325 -- N_Task_Body
4326 -- Sloc points to TASK
4327 -- Defining_Identifier (Node1)
4328 -- Declarations (List2)
4329 -- Handled_Statement_Sequence (Node4)
4330 -- Is_Task_Master (Flag5-Sem)
4331 -- Activation_Chain_Entity (Node3-Sem)
4332 -- Corresponding_Spec (Node5-Sem)
4333 -- Was_Originally_Stub (Flag13-Sem)
4335 -------------------------------------
4336 -- 9.4 Protected Type Declaration --
4337 -------------------------------------
4339 -- PROTECTED_TYPE_DECLARATION ::=
4340 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4341 -- is PROTECTED_DEFINITION;
4343 -- Note: protected type declarations are not permitted in Ada 83 mode
4345 -- N_Protected_Type_Declaration
4346 -- Sloc points to PROTECTED
4347 -- Defining_Identifier (Node1)
4348 -- Discriminant_Specifications (List4) (set to No_List if no
4349 -- discriminant part)
4350 -- Protected_Definition (Node3)
4351 -- Corresponding_Body (Node5-Sem)
4353 ---------------------------------------
4354 -- 9.4 Single Protected Declaration --
4355 ---------------------------------------
4357 -- SINGLE_PROTECTED_DECLARATION ::=
4358 -- protected DEFINING_IDENTIFIER is PROTECTED_DEFINITION;
4360 -- Note: single protected declarations are not allowed in Ada 83 mode
4362 -- N_Single_Protected_Declaration
4363 -- Sloc points to PROTECTED
4364 -- Defining_Identifier (Node1)
4365 -- Protected_Definition (Node3)
4367 -------------------------------
4368 -- 9.4 Protected Definition --
4369 -------------------------------
4371 -- PROTECTED_DEFINITION ::=
4372 -- {PROTECTED_OPERATION_DECLARATION}
4373 -- [private
4374 -- {PROTECTED_ELEMENT_DECLARATION}]
4375 -- end [protected_IDENTIFIER]
4377 -- N_Protected_Definition
4378 -- Sloc points to first token of protected definition
4379 -- Visible_Declarations (List2)
4380 -- Private_Declarations (List3) (set to No_List if no private part)
4381 -- End_Label (Node4)
4382 -- Has_Priority_Pragma (Flag6-Sem)
4384 ------------------------------------------
4385 -- 9.4 Protected Operation Declaration --
4386 ------------------------------------------
4388 -- PROTECTED_OPERATION_DECLARATION ::=
4389 -- SUBPROGRAM_DECLARATION
4390 -- | ENTRY_DECLARATION
4391 -- | REPRESENTATION_CLAUSE
4393 ----------------------------------------
4394 -- 9.4 Protected Element Declaration --
4395 ----------------------------------------
4397 -- PROTECTED_ELEMENT_DECLARATION ::=
4398 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
4400 -------------------------
4401 -- 9.4 Protected Body --
4402 -------------------------
4404 -- PROTECTED_BODY ::=
4405 -- protected body DEFINING_IDENTIFIER is
4406 -- {PROTECTED_OPERATION_ITEM}
4407 -- end [protected_IDENTIFIER];
4409 -- Note: protected bodies are not allowed in Ada 83 mode
4411 -- Gigi restriction: This node never appears.
4413 -- N_Protected_Body
4414 -- Sloc points to PROTECTED
4415 -- Defining_Identifier (Node1)
4416 -- Declarations (List2) protected operation items (and pragmas)
4417 -- End_Label (Node4)
4418 -- Corresponding_Spec (Node5-Sem)
4419 -- Was_Originally_Stub (Flag13-Sem)
4421 -----------------------------------
4422 -- 9.4 Protected Operation Item --
4423 -----------------------------------
4425 -- PROTECTED_OPERATION_ITEM ::=
4426 -- SUBPROGRAM_DECLARATION
4427 -- | SUBPROGRAM_BODY
4428 -- | ENTRY_BODY
4429 -- | REPRESENTATION_CLAUSE
4431 ------------------------------
4432 -- 9.5.2 Entry Declaration --
4433 ------------------------------
4435 -- ENTRY_DECLARATION ::=
4436 -- entry DEFINING_IDENTIFIER
4437 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE;
4439 -- N_Entry_Declaration
4440 -- Sloc points to ENTRY
4441 -- Defining_Identifier (Node1)
4442 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
4443 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4445 -----------------------------
4446 -- 9.5.2 Accept statement --
4447 -----------------------------
4449 -- ACCEPT_STATEMENT ::=
4450 -- accept entry_DIRECT_NAME
4451 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
4452 -- HANDLED_SEQUENCE_OF_STATEMENTS
4453 -- end [entry_IDENTIFIER]];
4455 -- Gigi restriction: This node never appears.
4457 -- Note: there are no explicit declarations allowed in an accept
4458 -- statement. However, the implicit declarations for any statement
4459 -- identifiers (labels and block/loop identifiers) are declarations
4460 -- that belong logically to the accept statement, and that is why
4461 -- there is a Declarations field in this node.
4463 -- N_Accept_Statement
4464 -- Sloc points to ACCEPT
4465 -- Entry_Direct_Name (Node1)
4466 -- Entry_Index (Node5) (set to Empty if not present)
4467 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4468 -- Handled_Statement_Sequence (Node4)
4469 -- Declarations (List2) (set to No_List if no declarations)
4471 ------------------------
4472 -- 9.5.2 Entry Index --
4473 ------------------------
4475 -- ENTRY_INDEX ::= EXPRESSION
4477 -----------------------
4478 -- 9.5.2 Entry Body --
4479 -----------------------
4481 -- ENTRY_BODY ::=
4482 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
4483 -- DECLARATIVE_PART
4484 -- begin
4485 -- HANDLED_SEQUENCE_OF_STATEMENTS
4486 -- end [entry_IDENTIFIER];
4488 -- ENTRY_BARRIER ::= when CONDITION
4490 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
4491 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
4492 -- too full (it would otherwise have too many fields)
4494 -- Gigi restriction: This node never appears.
4496 -- N_Entry_Body
4497 -- Sloc points to ENTRY
4498 -- Defining_Identifier (Node1)
4499 -- Entry_Body_Formal_Part (Node5)
4500 -- Declarations (List2)
4501 -- Handled_Statement_Sequence (Node4)
4502 -- Activation_Chain_Entity (Node3-Sem)
4504 -----------------------------------
4505 -- 9.5.2 Entry Body Formal Part --
4506 -----------------------------------
4508 -- ENTRY_BODY_FORMAL_PART ::=
4509 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
4511 -- Note that an entry body formal part node is present even if it is
4512 -- empty. This reflects the grammar, in which it is the components of
4513 -- the entry body formal part that are optional, not the entry body
4514 -- formal part itself. Also this means that the barrier condition
4515 -- always has somewhere to be stored.
4517 -- Gigi restriction: This node never appears.
4519 -- N_Entry_Body_Formal_Part
4520 -- Sloc points to first token
4521 -- Entry_Index_Specification (Node4) (set to Empty if not present)
4522 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4523 -- Condition (Node1) from entry barrier of entry body
4525 --------------------------
4526 -- 9.5.2 Entry Barrier --
4527 --------------------------
4529 -- ENTRY_BARRIER ::= when CONDITION
4531 --------------------------------------
4532 -- 9.5.2 Entry Index Specification --
4533 --------------------------------------
4535 -- ENTRY_INDEX_SPECIFICATION ::=
4536 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
4538 -- Gigi restriction: This node never appears.
4540 -- N_Entry_Index_Specification
4541 -- Sloc points to FOR
4542 -- Defining_Identifier (Node1)
4543 -- Discrete_Subtype_Definition (Node4)
4545 ---------------------------------
4546 -- 9.5.3 Entry Call Statement --
4547 ---------------------------------
4549 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
4551 -- The parser may generate a procedure call for this construct. The
4552 -- semantic pass must correct this misidentification where needed.
4554 -- Gigi restriction: This node never appears.
4556 -- N_Entry_Call_Statement
4557 -- Sloc points to first token of name
4558 -- Name (Node2)
4559 -- Parameter_Associations (List3) (set to No_List if no
4560 -- actual parameter part)
4561 -- First_Named_Actual (Node4-Sem)
4563 ------------------------------
4564 -- 9.5.4 Requeue Statement --
4565 ------------------------------
4567 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
4569 -- Note: requeue statements are not permitted in Ada 83 mode
4571 -- Gigi restriction: This node never appears.
4573 -- N_Requeue_Statement
4574 -- Sloc points to REQUEUE
4575 -- Name (Node2)
4576 -- Abort_Present (Flag15)
4578 --------------------------
4579 -- 9.6 Delay Statement --
4580 --------------------------
4582 -- DELAY_STATEMENT ::=
4583 -- DELAY_UNTIL_STATEMENT
4584 -- | DELAY_RELATIVE_STATEMENT
4586 --------------------------------
4587 -- 9.6 Delay Until Statement --
4588 --------------------------------
4590 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
4592 -- Note: delay until statements are not permitted in Ada 83 mode
4594 -- Gigi restriction: This node never appears.
4596 -- N_Delay_Until_Statement
4597 -- Sloc points to DELAY
4598 -- Expression (Node3)
4600 -----------------------------------
4601 -- 9.6 Delay Relative Statement --
4602 -----------------------------------
4604 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
4606 -- Gigi restriction: This node never appears.
4608 -- N_Delay_Relative_Statement
4609 -- Sloc points to DELAY
4610 -- Expression (Node3)
4612 ---------------------------
4613 -- 9.7 Select Statement --
4614 ---------------------------
4616 -- SELECT_STATEMENT ::=
4617 -- SELECTIVE_ACCEPT
4618 -- | TIMED_ENTRY_CALL
4619 -- | CONDITIONAL_ENTRY_CALL
4620 -- | ASYNCHRONOUS_SELECT
4622 -----------------------------
4623 -- 9.7.1 Selective Accept --
4624 -----------------------------
4626 -- SELECTIVE_ACCEPT ::=
4627 -- select
4628 -- [GUARD]
4629 -- SELECT_ALTERNATIVE
4630 -- {or
4631 -- [GUARD]
4632 -- SELECT_ALTERNATIVE}
4633 -- [else
4634 -- SEQUENCE_OF_STATEMENTS]
4635 -- end select;
4637 -- Gigi restriction: This node never appears.
4639 -- Note: the guard expression, if present, appears in the node for
4640 -- the select alternative.
4642 -- N_Selective_Accept
4643 -- Sloc points to SELECT
4644 -- Select_Alternatives (List1)
4645 -- Else_Statements (List4) (set to No_List if no else part)
4647 ------------------
4648 -- 9.7.1 Guard --
4649 ------------------
4651 -- GUARD ::= when CONDITION =>
4653 -- As noted above, the CONDITION that is part of a GUARD is included
4654 -- in the node for the select alernative for convenience.
4656 -------------------------------
4657 -- 9.7.1 Select Alternative --
4658 -------------------------------
4660 -- SELECT_ALTERNATIVE ::=
4661 -- ACCEPT_ALTERNATIVE
4662 -- | DELAY_ALTERNATIVE
4663 -- | TERMINATE_ALTERNATIVE
4665 -------------------------------
4666 -- 9.7.1 Accept Alternative --
4667 -------------------------------
4669 -- ACCEPT_ALTERNATIVE ::=
4670 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
4672 -- Gigi restriction: This node never appears.
4674 -- N_Accept_Alternative
4675 -- Sloc points to ACCEPT
4676 -- Accept_Statement (Node2)
4677 -- Condition (Node1) from the guard (set to Empty if no guard present)
4678 -- Statements (List3) (set to Empty_List if no statements)
4679 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4680 -- Accept_Handler_Records (List5-Sem)
4682 ------------------------------
4683 -- 9.7.1 Delay Alternative --
4684 ------------------------------
4686 -- DELAY_ALTERNATIVE ::=
4687 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
4689 -- Gigi restriction: This node never appears.
4691 -- N_Delay_Alternative
4692 -- Sloc points to DELAY
4693 -- Delay_Statement (Node2)
4694 -- Condition (Node1) from the guard (set to Empty if no guard present)
4695 -- Statements (List3) (set to Empty_List if no statements)
4696 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4698 ----------------------------------
4699 -- 9.7.1 Terminate Alternative --
4700 ----------------------------------
4702 -- TERMINATE_ALTERNATIVE ::= terminate;
4704 -- Gigi restriction: This node never appears.
4706 -- N_Terminate_Alternative
4707 -- Sloc points to TERMINATE
4708 -- Condition (Node1) from the guard (set to Empty if no guard present)
4709 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4710 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
4712 -----------------------------
4713 -- 9.7.2 Timed Entry Call --
4714 -----------------------------
4716 -- TIMED_ENTRY_CALL ::=
4717 -- select
4718 -- ENTRY_CALL_ALTERNATIVE
4719 -- or
4720 -- DELAY_ALTERNATIVE
4721 -- end select;
4723 -- Gigi restriction: This node never appears.
4725 -- N_Timed_Entry_Call
4726 -- Sloc points to SELECT
4727 -- Entry_Call_Alternative (Node1)
4728 -- Delay_Alternative (Node4)
4730 -----------------------------------
4731 -- 9.7.2 Entry Call Alternative --
4732 -----------------------------------
4734 -- ENTRY_CALL_ALTERNATIVE ::=
4735 -- ENTRY_CALL_STATEMENT [SEQUENCE_OF_STATEMENTS]
4737 -- Gigi restriction: This node never appears.
4739 -- N_Entry_Call_Alternative
4740 -- Sloc points to first token of entry call statement
4741 -- Entry_Call_Statement (Node1)
4742 -- Statements (List3) (set to Empty_List if no statements)
4743 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4745 -----------------------------------
4746 -- 9.7.3 Conditional Entry Call --
4747 -----------------------------------
4749 -- CONDITIONAL_ENTRY_CALL ::=
4750 -- select
4751 -- ENTRY_CALL_ALTERNATIVE
4752 -- else
4753 -- SEQUENCE_OF_STATEMENTS
4754 -- end select;
4756 -- Gigi restriction: This node never appears.
4758 -- N_Conditional_Entry_Call
4759 -- Sloc points to SELECT
4760 -- Entry_Call_Alternative (Node1)
4761 -- Else_Statements (List4)
4763 --------------------------------
4764 -- 9.7.4 Asynchronous Select --
4765 --------------------------------
4767 -- ASYNCHRONOUS_SELECT ::=
4768 -- select
4769 -- TRIGGERING_ALTERNATIVE
4770 -- then abort
4771 -- ABORTABLE_PART
4772 -- end select;
4774 -- Note: asynchronous select is not permitted in Ada 83 mode
4776 -- Gigi restriction: This node never appears.
4778 -- N_Asynchronous_Select
4779 -- Sloc points to SELECT
4780 -- Triggering_Alternative (Node1)
4781 -- Abortable_Part (Node2)
4783 -----------------------------------
4784 -- 9.7.4 Triggering Alternative --
4785 -----------------------------------
4787 -- TRIGGERING_ALTERNATIVE ::=
4788 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
4790 -- Gigi restriction: This node never appears.
4792 -- N_Triggering_Alternative
4793 -- Sloc points to first token of triggering statement
4794 -- Triggering_Statement (Node1)
4795 -- Statements (List3) (set to Empty_List if no statements)
4796 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4798 ---------------------------------
4799 -- 9.7.4 Triggering Statement --
4800 ---------------------------------
4802 -- TRIGGERING_STATEMENT ::= ENTRY_CALL_STATEMENT | DELAY_STATEMENT
4804 ---------------------------
4805 -- 9.7.4 Abortable Part --
4806 ---------------------------
4808 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
4810 -- Gigi restriction: This node never appears.
4812 -- N_Abortable_Part
4813 -- Sloc points to ABORT
4814 -- Statements (List3)
4816 --------------------------
4817 -- 9.8 Abort Statement --
4818 --------------------------
4820 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
4822 -- Gigi restriction: This node never appears.
4824 -- N_Abort_Statement
4825 -- Sloc points to ABORT
4826 -- Names (List2)
4828 -------------------------
4829 -- 10.1.1 Compilation --
4830 -------------------------
4832 -- COMPILATION ::= {COMPILATION_UNIT}
4834 -- There is no explicit node in the tree for a compilation, since in
4835 -- general the compiler is processing only a single compilation unit
4836 -- at a time. It is possible to parse multiple units in syntax check
4837 -- only mode, but they the trees are discarded in any case.
4839 ------------------------------
4840 -- 10.1.1 Compilation Unit --
4841 ------------------------------
4843 -- COMPILATION_UNIT ::=
4844 -- CONTEXT_CLAUSE LIBRARY_ITEM
4845 -- | CONTEXT_CLAUSE SUBUNIT
4847 -- The N_Compilation_Unit node itself respresents the above syntax.
4848 -- However, there are two additional items not reflected in the above
4849 -- syntax. First we have the global declarations that are added by the
4850 -- code generator. These are outer level declarations (so they cannot
4851 -- be represented as being inside the units). An example is the wrapper
4852 -- subprograms that are created to do ABE checking. As always a list of
4853 -- declarations can contain actions as well (i.e. statements), and such
4854 -- statements are executed as part of the elaboration of the unit. Note
4855 -- that all such declarations are elaborated before the library unit.
4857 -- Similarly, certain actions need to be elaborated at the completion
4858 -- of elaboration of the library unit (notably the statement that sets
4859 -- the Boolean flag indicating that elaboration is complete).
4861 -- The third item not reflected in the syntax is pragmas that appear
4862 -- after the compilation unit. As always pragmas are a problem since
4863 -- they are not part of the formal syntax, but can be stuck into the
4864 -- source following a set of ad hoc rules, and we have to find an ad
4865 -- hoc way of sticking them into the tree. For pragmas that appear
4866 -- before the library unit, we just consider them to be part of the
4867 -- context clause, and pragmas can appear in the Context_Items list
4868 -- of the compilation unit. However, pragmas can also appear after
4869 -- the library item.
4871 -- To deal with all these problems, we create an auxiliary node for
4872 -- a compilation unit, referenced from the N_Compilation_Unit node
4873 -- that contains these three items.
4875 -- N_Compilation_Unit
4876 -- Sloc points to first token of defining unit name
4877 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
4878 -- Context_Items (List1) context items and pragmas preceding unit
4879 -- Private_Present (Flag15) set if library unit has private keyword
4880 -- Unit (Node2) library item or subunit
4881 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
4882 -- Has_No_Elaboration_Code (Flag17-Sem)
4883 -- Body_Required (Flag13-Sem) set for spec if body is required
4884 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
4885 -- First_Inlined_Subprogram (Node3-Sem)
4887 -- N_Compilation_Unit_Aux
4888 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
4889 -- Declarations (List2) (set to No_List if no global declarations)
4890 -- Actions (List1) (set to No_List if no actions)
4891 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
4893 --------------------------
4894 -- 10.1.1 Library Item --
4895 --------------------------
4897 -- LIBRARY_ITEM ::=
4898 -- [private] LIBRARY_UNIT_DECLARATION
4899 -- | LIBRARY_UNIT_BODY
4900 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
4902 -- Note: PRIVATE is not allowed in Ada 83 mode
4904 -- There is no explicit node in the tree for library item, instead
4905 -- the declaration or body, and the flag for private if present,
4906 -- appear in the N_Compilation_Unit clause.
4908 ----------------------------------------
4909 -- 10.1.1 Library Unit Declararation --
4910 ----------------------------------------
4912 -- LIBRARY_UNIT_DECLARATION ::=
4913 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
4914 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
4916 -------------------------------------------------
4917 -- 10.1.1 Library Unit Renaming Declararation --
4918 -------------------------------------------------
4920 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
4921 -- PACKAGE_RENAMING_DECLARATION
4922 -- | GENERIC_RENAMING_DECLARATION
4923 -- | SUBPROGRAM_RENAMING_DECLARATION
4925 -------------------------------
4926 -- 10.1.1 Library unit body --
4927 -------------------------------
4929 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
4931 ------------------------------
4932 -- 10.1.1 Parent Unit Name --
4933 ------------------------------
4935 -- PARENT_UNIT_NAME ::= NAME
4937 ----------------------------
4938 -- 10.1.2 Context clause --
4939 ----------------------------
4941 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
4943 -- The context clause can include pragmas, and any pragmas that appear
4944 -- before the context clause proper (i.e. all configuration pragmas,
4945 -- also appear at the front of this list).
4947 --------------------------
4948 -- 10.1.2 Context_Item --
4949 --------------------------
4951 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
4953 -------------------------
4954 -- 10.1.2 With clause --
4955 -------------------------
4957 -- WITH_CLAUSE ::=
4958 -- with library_unit_NAME {,library_unit_NAME};
4960 -- A separate With clause is built for each name, so that we have
4961 -- a Corresponding_Spec field for each with'ed spec. The flags
4962 -- First_Name and Last_Name are used to reconstruct the exact
4963 -- source form. When a list of names appears in one with clause,
4964 -- the first name in the list has First_Name set, and the last
4965 -- has Last_Name set. If the with clause has only one name, then
4966 -- both of the flags First_Name and Last_Name are set in this name.
4968 -- Note: in the case of implicit with's that are installed by the
4969 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
4970 -- set to Standard_Location, but it is incorrect to test the Sloc
4971 -- to find out if a with clause is implicit, test the flag instead.
4973 -- N_With_Clause
4974 -- Sloc points to first token of library unit name
4975 -- Name (Node2)
4976 -- Library_Unit (Node4-Sem)
4977 -- Corresponding_Spec (Node5-Sem)
4978 -- First_Name (Flag5) (set to True if first name or only one name)
4979 -- Last_Name (Flag6) (set to True if last name or only one name)
4980 -- Context_Installed (Flag13-Sem)
4981 -- Elaborate_Present (Flag4-Sem)
4982 -- Elaborate_All_Present (Flag15-Sem)
4983 -- Implicit_With (Flag17-Sem)
4984 -- Unreferenced_In_Spec (Flag7-Sem)
4985 -- No_Entities_Ref_In_Spec (Flag8-Sem)
4987 ----------------------
4988 -- With_Type clause --
4989 ----------------------
4991 -- This is a GNAT extension, used to implement mutually recursive
4992 -- types declared in different packages.
4994 -- WITH_TYPE_CLAUSE ::=
4995 -- with type type_NAME is access | with type type_NAME is tagged
4997 -- N_With_Type_Clause
4998 -- Sloc points to first token of type name
4999 -- Name (Node2)
5000 -- Tagged_Present (Flag15)
5002 ---------------------
5003 -- 10.2 Body stub --
5004 ---------------------
5006 -- BODY_STUB ::=
5007 -- SUBPROGRAM_BODY_STUB
5008 -- | PACKAGE_BODY_STUB
5009 -- | TASK_BODY_STUB
5010 -- | PROTECTED_BODY_STUB
5012 ----------------------------------
5013 -- 10.1.3 Subprogram Body Stub --
5014 ----------------------------------
5016 -- SUBPROGRAM_BODY_STUB ::=
5017 -- SUBPROGRAM_SPECIFICATION is separate;
5019 -- N_Subprogram_Body_Stub
5020 -- Sloc points to FUNCTION or PROCEDURE
5021 -- Specification (Node1)
5022 -- Library_Unit (Node4-Sem) points to the subunit
5023 -- Corresponding_Body (Node5-Sem)
5025 -------------------------------
5026 -- 10.1.3 Package Body Stub --
5027 -------------------------------
5029 -- PACKAGE_BODY_STUB ::=
5030 -- package body DEFINING_IDENTIFIER is separate;
5032 -- N_Package_Body_Stub
5033 -- Sloc points to PACKAGE
5034 -- Defining_Identifier (Node1)
5035 -- Library_Unit (Node4-Sem) points to the subunit
5036 -- Corresponding_Body (Node5-Sem)
5038 ----------------------------
5039 -- 10.1.3 Task Body Stub --
5040 ----------------------------
5042 -- TASK_BODY_STUB ::=
5043 -- task body DEFINING_IDENTIFIER is separate;
5045 -- N_Task_Body_Stub
5046 -- Sloc points to TASK
5047 -- Defining_Identifier (Node1)
5048 -- Library_Unit (Node4-Sem) points to the subunit
5049 -- Corresponding_Body (Node5-Sem)
5051 ---------------------------------
5052 -- 10.1.3 Protected Body Stub --
5053 ---------------------------------
5055 -- PROTECTED_BODY_STUB ::=
5056 -- protected body DEFINING_IDENTIFIER is separate;
5058 -- Note: protected body stubs are not allowed in Ada 83 mode
5060 -- N_Protected_Body_Stub
5061 -- Sloc points to PROTECTED
5062 -- Defining_Identifier (Node1)
5063 -- Library_Unit (Node4-Sem) points to the subunit
5064 -- Corresponding_Body (Node5-Sem)
5066 ---------------------
5067 -- 10.1.3 Subunit --
5068 ---------------------
5070 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
5072 -- N_Subunit
5073 -- Sloc points to SEPARATE
5074 -- Name (Node2) is the name of the parent unit
5075 -- Proper_Body (Node1) is the subunit body
5076 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
5078 ---------------------------------
5079 -- 11.1 Exception Declaration --
5080 ---------------------------------
5082 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception;
5084 -- For consistency with object declarations etc, the parser converts
5085 -- the case of multiple identifiers being declared to a series of
5086 -- declarations in which the expression is copied, using the More_Ids
5087 -- and Prev_Ids flags to remember the souce form as described in the
5088 -- section on "Handling of Defining Identifier Lists".
5090 -- N_Exception_Declaration
5091 -- Sloc points to EXCEPTION
5092 -- Defining_Identifier (Node1)
5093 -- Expression (Node3-Sem)
5094 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5095 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5097 ------------------------------------------
5098 -- 11.2 Handled Sequence Of Statements --
5099 ------------------------------------------
5101 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
5102 -- SEQUENCE_OF_STATEMENTS
5103 -- [exception
5104 -- EXCEPTION_HANDLER
5105 -- {EXCEPTION_HANDLER}]
5106 -- [at end
5107 -- cleanup_procedure_call (param, param, param, ...);]
5109 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
5110 -- used only internally currently, but is considered to be syntactic.
5111 -- At the moment, the only cleanup action allowed is a single call to
5112 -- a parameterless procedure, and the Identifier field of the node is
5113 -- the procedure to be called. Also there is a current restriction
5114 -- that exception handles and a cleanup cannot be present in the same
5115 -- frame, so at least one of Exception_Handlers or the Identifier must
5116 -- be missing.
5118 -- Actually, more accurately, this restriction applies to the original
5119 -- source program. In the expanded tree, if the At_End_Proc field is
5120 -- present, then there will also be an exception handler of the form:
5122 -- when all others =>
5123 -- cleanup;
5124 -- raise;
5126 -- where cleanup is the procedure to be generated. The reason we do
5127 -- this is so that the front end can handle the necessary entries in
5128 -- the exception tables, and other exception handler actions required
5129 -- as part of the normal handling for exception handlers.
5131 -- The AT END cleanup handler protects only the sequence of statements
5132 -- (not the associated declarations of the parent), just like exception
5133 -- handlers. The big difference is that the cleanup procedure is called
5134 -- on either a normal or an abnormal exit from the statement sequence.
5136 -- Note: the list of Exception_Handlers can contain pragmas as well
5137 -- as actual handlers. In practice these pragmas can only occur at
5138 -- the start of the list, since any pragmas occurring later on will
5139 -- be included in the statement list of the corresponding handler.
5141 -- Note: although in the Ada syntax, the sequence of statements in
5142 -- a handled sequence of statements can only contain statements, we
5143 -- allow free mixing of declarations and statements in the resulting
5144 -- expanded tree. This is for example used to deal with the case of
5145 -- a cleanup procedure that must handle declarations as well as the
5146 -- statements of a block.
5148 -- N_Handled_Sequence_Of_Statements
5149 -- Sloc points to first token of first statement
5150 -- Statements (List3)
5151 -- End_Label (Node4) (set to Empty if expander generated)
5152 -- Exception_Handlers (List5) (set to No_List if none present)
5153 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
5154 -- First_Real_Statement (Node2-Sem)
5155 -- Zero_Cost_Handling (Flag5-Sem)
5157 -- Note: the parent always contains a Declarations field which contains
5158 -- declarations associated with the handled sequence of statements. This
5159 -- is true even in the case of an accept statement (see description of
5160 -- the N_Accept_Statement node).
5162 -- End_Label refers to the containing construct.
5164 -----------------------------
5165 -- 11.2 Exception Handler --
5166 -----------------------------
5168 -- EXCEPTION_HANDLER ::=
5169 -- when [CHOICE_PARAMETER_SPECIFICATION :]
5170 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
5171 -- SEQUENCE_OF_STATEMENTS
5173 -- Note: choice parameter specification is not allowed in Ada 83 mode
5175 -- N_Exception_Handler
5176 -- Sloc points to WHEN
5177 -- Choice_Parameter (Node2) (set to Empty if not present)
5178 -- Exception_Choices (List4)
5179 -- Statements (List3)
5180 -- Zero_Cost_Handling (Flag5-Sem)
5182 ------------------------------------------
5183 -- 11.2 Choice parameter specification --
5184 ------------------------------------------
5186 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
5188 ----------------------------
5189 -- 11.2 Exception Choice --
5190 ----------------------------
5192 -- EXCEPTION_CHOICE ::= exception_NAME | others
5194 -- Except in the case of OTHERS, no explicit node appears in the tree
5195 -- for exception choice. Instead the exception name appears directly.
5196 -- An OTHERS choice is represented by a N_Others_Choice node (see
5197 -- section 3.8.1.
5199 -- Note: for the exception choice created for an at end handler, the
5200 -- exception choice is an N_Others_Choice node with All_Others set.
5202 ---------------------------
5203 -- 11.3 Raise Statement --
5204 ---------------------------
5206 -- RAISE_STATEMENT ::= raise [exception_NAME];
5208 -- N_Raise_Statement
5209 -- Sloc points to RAISE
5210 -- Name (Node2) (set to Empty if no exception name present)
5212 -------------------------------
5213 -- 12.1 Generic Declaration --
5214 -------------------------------
5216 -- GENERIC_DECLARATION ::=
5217 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
5219 ------------------------------------------
5220 -- 12.1 Generic Subprogram Declaration --
5221 ------------------------------------------
5223 -- GENERIC_SUBPROGRAM_DECLARATION ::=
5224 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION;
5226 -- Note: Generic_Formal_Declarations can include pragmas
5228 -- N_Generic_Subprogram_Declaration
5229 -- Sloc points to GENERIC
5230 -- Specification (Node1) subprogram specification
5231 -- Corresponding_Body (Node5-Sem)
5232 -- Generic_Formal_Declarations (List2) from generic formal part
5233 -- Parent_Spec (Node4-Sem)
5235 ---------------------------------------
5236 -- 12.1 Generic Package Declaration --
5237 ---------------------------------------
5239 -- GENERIC_PACKAGE_DECLARATION ::=
5240 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION;
5242 -- Note: when we do generics right, the Activation_Chain_Entity entry
5243 -- for this node can be removed (since the expander won't see generic
5244 -- units any more)???.
5246 -- Note: Generic_Formal_Declarations can include pragmas
5248 -- N_Generic_Package_Declaration
5249 -- Sloc points to GENERIC
5250 -- Specification (Node1) package specification
5251 -- Corresponding_Body (Node5-Sem)
5252 -- Generic_Formal_Declarations (List2) from generic formal part
5253 -- Parent_Spec (Node4-Sem)
5254 -- Activation_Chain_Entity (Node3-Sem)
5256 -------------------------------
5257 -- 12.1 Generic Formal Part --
5258 -------------------------------
5260 -- GENERIC_FORMAL_PART ::=
5261 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
5263 ------------------------------------------------
5264 -- 12.1 Generic Formal Parameter Declaration --
5265 ------------------------------------------------
5267 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
5268 -- FORMAL_OBJECT_DECLARATION
5269 -- | FORMAL_TYPE_DECLARATION
5270 -- | FORMAL_SUBPROGRAM_DECLARATION
5271 -- | FORMAL_PACKAGE_DECLARATION
5273 ---------------------------------
5274 -- 12.3 Generic Instantiation --
5275 ---------------------------------
5277 -- GENERIC_INSTANTIATION ::=
5278 -- package DEFINING_PROGRAM_UNIT_NAME is
5279 -- new generic_package_NAME [GENERIC_ACTUAL_PART];
5280 -- | procedure DEFINING_PROGRAM_UNIT_NAME is
5281 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART];
5282 -- | function DEFINING_DESIGNATOR is
5283 -- new generic_function_NAME [GENERIC_ACTUAL_PART];
5285 -- N_Package_Instantiation
5286 -- Sloc points to PACKAGE
5287 -- Defining_Unit_Name (Node1)
5288 -- Name (Node2)
5289 -- Generic_Associations (List3) (set to No_List if no
5290 -- generic actual part)
5291 -- Parent_Spec (Node4-Sem)
5292 -- Instance_Spec (Node5-Sem)
5293 -- ABE_Is_Certain (Flag18-Sem)
5295 -- N_Procedure_Instantiation
5296 -- Sloc points to PROCEDURE
5297 -- Defining_Unit_Name (Node1)
5298 -- Name (Node2)
5299 -- Parent_Spec (Node4-Sem)
5300 -- Generic_Associations (List3) (set to No_List if no
5301 -- generic actual part)
5302 -- Instance_Spec (Node5-Sem)
5303 -- ABE_Is_Certain (Flag18-Sem)
5305 -- N_Function_Instantiation
5306 -- Sloc points to FUNCTION
5307 -- Defining_Unit_Name (Node1)
5308 -- Name (Node2)
5309 -- Generic_Associations (List3) (set to No_List if no
5310 -- generic actual part)
5311 -- Parent_Spec (Node4-Sem)
5312 -- Instance_Spec (Node5-Sem)
5313 -- ABE_Is_Certain (Flag18-Sem)
5315 ------------------------------
5316 -- 12.3 Generic Actual Part --
5317 ------------------------------
5319 -- GENERIC_ACTUAL_PART ::=
5320 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
5322 -------------------------------
5323 -- 12.3 Generic Association --
5324 -------------------------------
5326 -- GENERIC_ASSOCIATION ::=
5327 -- [generic_formal_parameter_SELECTOR_NAME =>]
5328 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER
5330 -- Note: unlike the procedure call case, a generic association node
5331 -- is generated for every association, even if no formal is present.
5332 -- In this case the parser will leave the Selector_Name field set
5333 -- to Empty, to be filled in later by the semantic pass.
5335 -- N_Generic_Association
5336 -- Sloc points to first token of generic association
5337 -- Selector_Name (Node2) (set to Empty if no formal
5338 -- parameter selector name)
5339 -- Explicit_Generic_Actual_Parameter (Node1)
5341 ---------------------------------------------
5342 -- 12.3 Explicit Generic Actual Parameter --
5343 ---------------------------------------------
5345 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
5346 -- EXPRESSION | variable_NAME | subprogram_NAME
5347 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
5349 -------------------------------------
5350 -- 12.4 Formal Object Declaration --
5351 -------------------------------------
5353 -- FORMAL_OBJECT_DECLARATION ::=
5354 -- DEFINING_IDENTIFIER_LIST :
5355 -- MODE SUBTYPE_MARK [:= DEFAULT_EXPRESSION];
5357 -- Although the syntax allows multiple identifiers in the list, the
5358 -- semantics is as though successive declarations were given with
5359 -- identical type definition and expression components. To simplify
5360 -- semantic processing, the parser represents a multiple declaration
5361 -- case as a sequence of single declarations, using the More_Ids and
5362 -- Prev_Ids flags to preserve the original source form as described
5363 -- in the section on "Handling of Defining Identifier Lists".
5365 -- N_Formal_Object_Declaration
5366 -- Sloc points to first identifier
5367 -- Defining_Identifier (Node1)
5368 -- In_Present (Flag15)
5369 -- Out_Present (Flag17)
5370 -- Subtype_Mark (Node4)
5371 -- Expression (Node3) (set to Empty if no default expression)
5372 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5373 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5375 -----------------------------------
5376 -- 12.5 Formal Type Declaration --
5377 -----------------------------------
5379 -- FORMAL_TYPE_DECLARATION ::=
5380 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5381 -- is FORMAL_TYPE_DEFINITION;
5383 -- N_Formal_Type_Declaration
5384 -- Sloc points to TYPE
5385 -- Defining_Identifier (Node1)
5386 -- Formal_Type_Definition (Node3)
5387 -- Discriminant_Specifications (List4) (set to No_List if no
5388 -- discriminant part)
5389 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5391 ----------------------------------
5392 -- 12.5 Formal type definition --
5393 ----------------------------------
5395 -- FORMAL_TYPE_DEFINITION ::=
5396 -- FORMAL_PRIVATE_TYPE_DEFINITION
5397 -- | FORMAL_DERIVED_TYPE_DEFINITION
5398 -- | FORMAL_DISCRETE_TYPE_DEFINITION
5399 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
5400 -- | FORMAL_MODULAR_TYPE_DEFINITION
5401 -- | FORMAL_FLOATING_POINT_DEFINITION
5402 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
5403 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
5404 -- | FORMAL_ARRAY_TYPE_DEFINITION
5405 -- | FORMAL_ACCESS_TYPE_DEFINITION
5407 ---------------------------------------------
5408 -- 12.5.1 Formal Private Type Definition --
5409 ---------------------------------------------
5411 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
5412 -- [[abstract] tagged] [limited] private
5414 -- Note: TAGGED is not allowed in Ada 83 mode
5416 -- N_Formal_Private_Type_Definition
5417 -- Sloc points to PRIVATE
5418 -- Abstract_Present (Flag4)
5419 -- Tagged_Present (Flag15)
5420 -- Limited_Present (Flag17)
5422 --------------------------------------------
5423 -- 12.5.1 Formal Derived Type Definition --
5424 --------------------------------------------
5426 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
5427 -- [abstract] new SUBTYPE_MARK [with private]
5429 -- Note: this construct is not allowed in Ada 83 mode
5431 -- N_Formal_Derived_Type_Definition
5432 -- Sloc points to NEW
5433 -- Subtype_Mark (Node4)
5434 -- Private_Present (Flag15)
5435 -- Abstract_Present (Flag4)
5437 ---------------------------------------------
5438 -- 12.5.2 Formal Discrete Type Definition --
5439 ---------------------------------------------
5441 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
5443 -- N_Formal_Discrete_Type_Definition
5444 -- Sloc points to (
5446 ---------------------------------------------------
5447 -- 12.5.2 Formal Signed Integer Type Definition --
5448 ---------------------------------------------------
5450 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
5452 -- N_Formal_Signed_Integer_Type_Definition
5453 -- Sloc points to RANGE
5455 --------------------------------------------
5456 -- 12.5.2 Formal Modular Type Definition --
5457 --------------------------------------------
5459 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
5461 -- N_Formal_Modular_Type_Definition
5462 -- Sloc points to MOD
5464 ----------------------------------------------
5465 -- 12.5.2 Formal Floating Point Definition --
5466 ----------------------------------------------
5468 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
5470 -- N_Formal_Floating_Point_Definition
5471 -- Sloc points to DIGITS
5473 ----------------------------------------------------
5474 -- 12.5.2 Formal Ordinary Fixed Point Definition --
5475 ----------------------------------------------------
5477 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
5479 -- N_Formal_Ordinary_Fixed_Point_Definition
5480 -- Sloc points to DELTA
5482 ---------------------------------------------------
5483 -- 12.5.2 Formal Decimal Fixed Point Definition --
5484 ---------------------------------------------------
5486 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
5488 -- Note: formal decimal fixed point definition not allowed in Ada 83
5490 -- N_Formal_Decimal_Fixed_Point_Definition
5491 -- Sloc points to DELTA
5493 ------------------------------------------
5494 -- 12.5.3 Formal Array Type Definition --
5495 ------------------------------------------
5497 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
5499 -------------------------------------------
5500 -- 12.5.4 Formal Access Type Definition --
5501 -------------------------------------------
5503 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
5505 -----------------------------------------
5506 -- 12.6 Formal Subprogram Declaration --
5507 -----------------------------------------
5509 -- FORMAL_SUBPROGRAM_DECLARATION ::=
5510 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT];
5512 -- N_Formal_Subprogram_Declaration
5513 -- Sloc points to WITH
5514 -- Specification (Node1)
5515 -- Default_Name (Node2) (set to Empty if no subprogram default)
5516 -- Box_Present (Flag15)
5518 -- Note: if no subprogram default is present, then Name is set
5519 -- to Empty, and Box_Present is False.
5521 ------------------------------
5522 -- 12.6 Subprogram Default --
5523 ------------------------------
5525 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
5527 -- There is no separate node in the tree for a subprogram default.
5528 -- Instead the parent (N_Formal_Subprogram_Declaration) node contains
5529 -- the default name or box indication, as needed.
5531 ------------------------
5532 -- 12.6 Default Name --
5533 ------------------------
5535 -- DEFAULT_NAME ::= NAME
5537 --------------------------------------
5538 -- 12.7 Formal Package Declaration --
5539 --------------------------------------
5541 -- FORMAL_PACKAGE_DECLARATION ::=
5542 -- with package DEFINING_IDENTIFIER
5543 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART;
5545 -- Note: formal package declarations not allowed in Ada 83 mode
5547 -- N_Formal_Package_Declaration
5548 -- Sloc points to WITH
5549 -- Defining_Identifier (Node1)
5550 -- Name (Node2)
5551 -- Generic_Associations (List3) (set to No_List if (<>) case or
5552 -- empty generic actual part)
5553 -- Box_Present (Flag15)
5554 -- Instance_Spec (Node5-Sem)
5555 -- ABE_Is_Certain (Flag18-Sem)
5557 --------------------------------------
5558 -- 12.7 Formal Package Actual Part --
5559 --------------------------------------
5561 -- FORMAL_PACKAGE_ACTUAL_PART ::=
5562 -- (<>) | [GENERIC_ACTUAL_PART]
5564 -- There is no explicit node in the tree for a formal package
5565 -- actual part. Instead the information appears in the parent node
5566 -- (i.e. the formal package declaration node itself).
5568 ---------------------------------
5569 -- 13.1 Representation clause --
5570 ---------------------------------
5572 -- REPRESENTATION_CLAUSE ::=
5573 -- ATTRIBUTE_DEFINITION_CLAUSE
5574 -- | ENUMERATION_REPRESENTATION_CLAUSE
5575 -- | RECORD_REPRESENTATION_CLAUSE
5576 -- | AT_CLAUSE
5578 ----------------------
5579 -- 13.1 Local Name --
5580 ----------------------
5582 -- LOCAL_NAME :=
5583 -- DIRECT_NAME
5584 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
5585 -- | library_unit_NAME
5587 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
5588 -- as an attribute reference, which has essentially the same form.
5590 ---------------------------------------
5591 -- 13.3 Attribute definition clause --
5592 ---------------------------------------
5594 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
5595 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
5596 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
5598 -- In Ada 83, the expression must be a simple expression and the
5599 -- local name must be a direct name.
5601 -- Note: The only attribute definition clause that is processed
5602 -- by Gigi is the alignment clause (for all other cases, the
5603 -- information is extracted by the front end and either results
5604 -- in setting entity information, e.g. Esize for the Size case,
5605 -- or in appropriate expansion actions (e.g. in the storage size
5606 -- case). For the alignment case, Gigi requires that the expression
5607 -- be an integer literal.
5609 -- N_Attribute_Definition_Clause
5610 -- Sloc points to FOR
5611 -- Name (Node2) the local name
5612 -- Chars (Name1) the identifier name from the attribute designator
5613 -- Expression (Node3) the expression or name
5614 -- Next_Rep_Item (Node4-Sem)
5615 -- From_At_Mod (Flag4-Sem)
5617 ---------------------------------------------
5618 -- 13.4 Enumeration representation clause --
5619 ---------------------------------------------
5621 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
5622 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
5624 -- In Ada 83, the name must be a direct name
5626 -- N_Enumeration_Representation_Clause
5627 -- Sloc points to FOR
5628 -- Identifier (Node1) direct name
5629 -- Array_Aggregate (Node3)
5630 -- Next_Rep_Item (Node4-Sem)
5632 ---------------------------------
5633 -- 13.4 Enumeration aggregate --
5634 ---------------------------------
5636 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
5638 ------------------------------------------
5639 -- 13.5.1 Record representation clause --
5640 ------------------------------------------
5642 -- RECORD_REPRESENTATION_CLAUSE ::=
5643 -- for first_subtype_LOCAL_NAME use
5644 -- record [MOD_CLAUSE]
5645 -- {COMPONENT_CLAUSE}
5646 -- end record;
5648 -- Gigi restriction: Mod_Clause is always Empty (if present it is
5649 -- replaced by a corresponding Alignment attribute definition clause).
5651 -- Note: Component_Clauses can include pragmas
5653 -- N_Record_Representation_Clause
5654 -- Sloc points to FOR
5655 -- Identifier (Node1) direct name
5656 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
5657 -- Component_Clauses (List3)
5658 -- Next_Rep_Item (Node4-Sem)
5660 ------------------------------
5661 -- 13.5.1 Component clause --
5662 ------------------------------
5664 -- COMPONENT_CLAUSE ::=
5665 -- component_LOCAL_NAME at POSITION
5666 -- range FIRST_BIT .. LAST_BIT;
5668 -- N_Component_Clause
5669 -- Sloc points to AT
5670 -- Component_Name (Node1) points to Name or Attribute_Reference
5671 -- Position (Node2)
5672 -- First_Bit (Node3)
5673 -- Last_Bit (Node4)
5675 ----------------------
5676 -- 13.5.1 Position --
5677 ----------------------
5679 -- POSITION ::= static_EXPRESSION
5681 -----------------------
5682 -- 13.5.1 First_Bit --
5683 -----------------------
5685 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
5687 ----------------------
5688 -- 13.5.1 Last_Bit --
5689 ----------------------
5691 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
5693 --------------------------
5694 -- 13.8 Code statement --
5695 --------------------------
5697 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
5699 -- Note: in GNAT, the qualified expression has the form
5701 -- Asm_Insn'(Asm (...));
5703 -- or
5705 -- Asm_Insn'(Asm_Volatile (...))
5707 -- See package System.Machine_Code in file s-maccod.ads for details
5708 -- on the allowed parameters to Asm[_Volatile]. There are two ways
5709 -- this node can arise, as a code statement, in which case the
5710 -- expression is the qualified expression, or as a result of the
5711 -- expansion of an intrinsic call to the Asm or Asm_Input procedure.
5713 -- N_Code_Statement
5714 -- Sloc points to first token of the expression
5715 -- Expression (Node3)
5717 -- Note: package Exp_Code contains an abstract functional interface
5718 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
5720 ------------------------
5721 -- 13.12 Restriction --
5722 ------------------------
5724 -- RESTRICTION ::=
5725 -- restriction_IDENTIFIER
5726 -- | restriction_parameter_IDENTIFIER => EXPRESSION
5728 -- There is no explicit node for restrictions. Instead the restriction
5729 -- appears in normal pragma syntax as a pragma argument association,
5730 -- which has the same syntactic form.
5732 --------------------------
5733 -- B.2 Shift Operators --
5734 --------------------------
5736 -- Calls to the intrinsic shift functions are converted to one of
5737 -- the following shift nodes, which have the form of normal binary
5738 -- operator names. Note that for a given shift operation, one node
5739 -- covers all possible types, as for normal operators.
5741 -- Note: it is perfectly permissible for the expander to generate
5742 -- shift operation nodes directly, in which case they will be analyzed
5743 -- and parsed in the usual manner.
5745 -- Sprint syntax: shift-function-name!(expr, count)
5747 -- Note: the Left_Opnd field holds the first argument (the value to
5748 -- be shifted). The Right_Opnd field holds the second argument (the
5749 -- shift count). The Chars field is the name of the intrinsic function.
5751 -- N_Op_Rotate_Left
5752 -- Sloc points to the function name
5753 -- plus fields for binary operator
5754 -- plus fields for expression
5755 -- Shift_Count_OK (Flag4-Sem)
5757 -- N_Op_Rotate_Right
5758 -- Sloc points to the function name
5759 -- plus fields for binary operator
5760 -- plus fields for expression
5761 -- Shift_Count_OK (Flag4-Sem)
5763 -- N_Op_Shift_Left
5764 -- Sloc points to the function name
5765 -- plus fields for binary operator
5766 -- plus fields for expression
5767 -- Shift_Count_OK (Flag4-Sem)
5769 -- N_Op_Shift_Right_Arithmetic
5770 -- Sloc points to the function name
5771 -- plus fields for binary operator
5772 -- plus fields for expression
5773 -- Shift_Count_OK (Flag4-Sem)
5775 -- N_Op_Shift_Right
5776 -- Sloc points to the function name
5777 -- plus fields for binary operator
5778 -- plus fields for expression
5779 -- Shift_Count_OK (Flag4-Sem)
5781 --------------------------
5782 -- Obsolescent Features --
5783 --------------------------
5785 -- The syntax descriptions and tree nodes for obsolescent features are
5786 -- grouped together, corresponding to their location in appendix I in
5787 -- the RM. However, parsing and semantic analysis for these constructs
5788 -- is located in an appropriate chapter (see individual notes).
5790 ---------------------------
5791 -- J.3 Delta Constraint --
5792 ---------------------------
5794 -- Note: the parse routine for this construct is located in section
5795 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
5796 -- where delta constraint logically belongs.
5798 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
5800 -- N_Delta_Constraint
5801 -- Sloc points to DELTA
5802 -- Delta_Expression (Node3)
5803 -- Range_Constraint (Node4) (set to Empty if not present)
5805 --------------------
5806 -- J.7 At Clause --
5807 --------------------
5809 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
5811 -- Note: the parse routine for this construct is located in Par-Ch13,
5812 -- and the semantic analysis is in Sem_Ch13, where at clause logically
5813 -- belongs if it were not obsolescent.
5815 -- Note: in Ada 83 the expression must be a simple expression
5817 -- Gigi restriction: This node never appears, it is rewritten as an
5818 -- address attribute definition clause.
5820 -- N_At_Clause
5821 -- Sloc points to FOR
5822 -- Identifier (Node1)
5823 -- Expression (Node3)
5825 ---------------------
5826 -- J.8 Mod clause --
5827 ---------------------
5829 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
5831 -- Note: the parse routine for this construct is located in Par-Ch13,
5832 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
5833 -- belongs if it were not obsolescent.
5835 -- Note: in Ada 83, the expression must be a simple expression
5837 -- Gigi restriction: this node never appears. It is replaced
5838 -- by a corresponding Alignment attribute definition clause.
5840 -- Note: pragmas can appear before and after the MOD_CLAUSE since
5841 -- its name has "clause" in it. This is rather strange, but is quite
5842 -- definitely specified. The pragmas before are collected in the
5843 -- Pragmas_Before field of the mod clause node itself, and pragmas
5844 -- after are simply swallowed up in the list of component clauses.
5846 -- N_Mod_Clause
5847 -- Sloc points to AT
5848 -- Expression (Node3)
5849 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
5851 --------------------
5852 -- Semantic Nodes --
5853 --------------------
5855 -- These semantic nodes are used to hold additional semantic information.
5856 -- They are inserted into the tree as a result of semantic processing.
5857 -- Although there are no legitimate source syntax constructions that
5858 -- correspond directly to these nodes, we need a source syntax for the
5859 -- reconstructed tree printed by Sprint, and the node descriptions here
5860 -- show this syntax.
5862 ----------------------------
5863 -- Conditional Expression --
5864 ----------------------------
5866 -- This node is used to represent an expression corresponding to the
5867 -- C construct (condition ? then-expression : else_expression), where
5868 -- Expressions is a three element list, whose first expression is the
5869 -- condition, and whose second and third expressions are the then and
5870 -- else expressions respectively.
5872 -- Note: the Then_Actions and Else_Actions fields are always set to
5873 -- No_List in the tree passed to Gigi. These fields are used only
5874 -- for temporary processing purposes in the expander.
5876 -- Sprint syntax: (if expr then expr else expr)
5878 -- N_Conditional_Expression
5879 -- Sloc points to related node
5880 -- Expressions (List1)
5881 -- Then_Actions (List2-Sem)
5882 -- Else_Actions (List3-Sem)
5883 -- plus fields for expression
5885 -- Note: in the case where a debug source file is generated, the Sloc
5886 -- for this node points to the IF keyword in the Sprint file output.
5888 -------------------
5889 -- Expanded_Name --
5890 -------------------
5892 -- The N_Expanded_Name node is used to represent a selected component
5893 -- name that has been resolved to an expanded name. The semantic phase
5894 -- replaces N_Selected_Component nodes that represent names by the use
5895 -- of this node, leaving the N_Selected_Component node used only when
5896 -- the prefix is a record or protected type.
5898 -- The fields of the N_Expanded_Name node are layed out identically
5899 -- to those of the N_Selected_Component node, allowing conversion of
5900 -- an expanded name node to a selected component node to be done
5901 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
5903 -- There is no special sprint syntax for an expanded name.
5905 -- N_Expanded_Name
5906 -- Sloc points to the period
5907 -- Chars (Name1) copy of Chars field of selector name
5908 -- Prefix (Node3)
5909 -- Selector_Name (Node2)
5910 -- Entity (Node4-Sem)
5911 -- Associated_Node (Node4-Sem)
5912 -- Redundant_Use (Flag13-Sem)
5913 -- Has_Private_View (Flag11-Sem) set in generic units.
5914 -- plus fields for expression
5916 --------------------
5917 -- Free Statement --
5918 --------------------
5920 -- The N_Free_Statement node is generated as a result of a call to an
5921 -- instantiation of Unchecked_Deallocation. The instantiation of this
5922 -- generic is handled specially and generates this node directly.
5924 -- Sprint syntax: free expression
5926 -- N_Free_Statement
5927 -- Sloc is copied from the unchecked deallocation call
5928 -- Expression (Node3) argument to unchecked deallocation call
5929 -- Storage_Pool (Node1-Sem)
5930 -- Procedure_To_Call (Node4-Sem)
5932 -- Note: in the case where a debug source file is generated, the Sloc
5933 -- for this node points to the FREE keyword in the Sprint file output.
5935 -------------------
5936 -- Freeze Entity --
5937 -------------------
5939 -- This node marks the point in a declarative part at which an entity
5940 -- declared therein becomes frozen. The expander places initialization
5941 -- procedures for types at those points. Gigi uses the freezing point
5942 -- to elaborate entities that may depend on previous private types.
5944 -- See the section in Einfo "Delayed Freezing and Elaboration" for
5945 -- a full description of the use of this node.
5947 -- The Entity field points back to the entity for the type (whose
5948 -- Freeze_Node field points back to this freeze node).
5950 -- The Actions field contains a list of declarations and statements
5951 -- generated by the expander which are associated with the freeze
5952 -- node, and are elaborated as though the freeze node were replaced
5953 -- by this sequence of actions.
5955 -- Note: the Sloc field in the freeze node references a construct
5956 -- associated with the freezing point. This is used for posting
5957 -- messages in some error/warning situations, e.g. the case where
5958 -- a primitive operation of a tagged type is declared too late.
5960 -- Sprint syntax: freeze entity-name [
5961 -- freeze actions
5962 -- ]
5964 -- N_Freeze_Entity
5965 -- Sloc points near freeze point (see above special note)
5966 -- Entity (Node4-Sem)
5967 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
5968 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
5969 -- Actions (List1) (set to No_List if no freeze actions)
5970 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
5972 -- The Actions field holds actions associated with the freeze. These
5973 -- actions are elaborated at the point where the type is frozen.
5975 -- Note: in the case where a debug source file is generated, the Sloc
5976 -- for this node points to the FREEZE keyword in the Sprint file output.
5978 --------------------------------
5979 -- Implicit Label Declaration --
5980 --------------------------------
5982 -- An implicit label declaration is created for every occurrence of a
5983 -- label on a statement or a label on a block or loop. It is chained
5984 -- in the declarations of the innermost enclosing block as specified
5985 -- in RM section 5.1 (3).
5987 -- The Defining_Identifier is the actual identifier for the
5988 -- statement identifier. Note that the occurrence of the label
5989 -- is a reference, NOT the defining occurrence. The defining
5990 -- occurrence occurs at the head of the innermost enclosing
5991 -- block, and is represented by this node.
5993 -- Note: from the grammar, this might better be called an implicit
5994 -- statement identifier declaration, but the term we choose seems
5995 -- friendlier, since at least informally statement identifiers are
5996 -- called labels in both cases (i.e. when used in labels, and when
5997 -- used as the identifiers of blocks and loops).
5999 -- Note: although this is logically a semantic node, since it does
6000 -- not correspond directly to a source syntax construction, these
6001 -- nodes are actually created by the parser in a post pass done just
6002 -- after parsing is complete, before semantic analysis is started (see
6003 -- the Par.Labl subunit in file par-labl.adb).
6005 -- Sprint syntax: labelname : label;
6007 -- N_Implicit_Label_Declaration
6008 -- Sloc points to the << of the label
6009 -- Defining_Identifier (Node1)
6010 -- Label_Construct (Node2-Sem)
6012 -- Note: in the case where a debug source file is generated, the Sloc
6013 -- for this node points to the label name in the generated declaration.
6015 ---------------------
6016 -- Itype_Reference --
6017 ---------------------
6019 -- This node is used to create a reference to an Itype. The only
6020 -- purpose is to make sure that the Itype is defined if this is the
6021 -- first reference.
6023 -- A typical use of this node is when an Itype is to be referenced in
6024 -- two branches of an if statement. In this case it is important that
6025 -- the first use of the Itype not be inside the conditional, since
6026 -- then it might not be defined if the wrong branch of the if is
6027 -- taken in the case where the definition generates elaboration code.
6029 -- The Itype field points to the referenced Itype
6031 -- sprint syntax: reference itype-name
6033 -- N_Itype_Reference
6034 -- Sloc points to the node generating the reference
6035 -- Itype (Node1-Sem)
6037 -- Note: in the case where a debug source file is generated, the Sloc
6038 -- for this node points to the REFERENCE keyword in the file output.
6040 ---------------------
6041 -- Raise_xxx_Error --
6042 ---------------------
6044 -- One of these nodes is created during semantic analysis to replace
6045 -- a node for an expression that is determined to definitely raise
6046 -- the corresponding exception.
6048 -- The N_Raise_xxx_Error node may also stand alone in place
6049 -- of a declaration or statement, in which case it simply causes
6050 -- the exception to be raised (i.e. it is equivalent to a raise
6051 -- statement that raises the corresponding exception). This use
6052 -- is distinguished by the fact that the Etype in this case is
6053 -- Standard_Void_Type, In the subexprssion case, the Etype is the
6054 -- same as the type of the subexpression which it replaces.
6056 -- If Condition is empty, then the raise is unconditional. If the
6057 -- Condition field is non-empty, it is a boolean expression which
6058 -- is first evaluated, and the exception is raised only if the
6059 -- value of the expression is True. In the unconditional case, the
6060 -- creation of this node is usually accompanied by a warning message
6061 -- error. The creation of this node will usually be accompanied by a
6062 -- message (unless it appears within the right operand of a short
6063 -- circuit form whose left argument is static and decisively
6064 -- eliminates elaboration of the raise operation.
6066 -- Gigi restriction: This expander ensures that the type of the
6067 -- Condition field is always Standard.Boolean, even if the type
6068 -- in the source is some non-standard boolean type.
6070 -- Sprint syntax: [xxx_error]
6071 -- or: [xxx_error when condition]
6073 -- N_Raise_Constraint_Error
6074 -- Sloc references related construct
6075 -- Condition (Node1) (set to Empty if no condition)
6076 -- Sloc is copied from the expression generating the exception
6077 -- plus fields for expression
6079 -- N_Raise_Program_Error
6080 -- Sloc references related construct
6081 -- Condition (Node1) (set to Empty if no condition)
6082 -- Sloc is copied from the construct generating the exception
6083 -- plus fields for expression
6085 -- N_Raise_Storage_Error
6086 -- Sloc references related construct
6087 -- Condition (Node1) (set to Empty if no condition)
6088 -- Sloc is copied from the construct generating the exception
6089 -- plus fields for expression
6091 -- Note: in the case where a debug source file is generated, the Sloc
6092 -- for this node points to the left bracket in the Sprint file output.
6094 ---------------
6095 -- Reference --
6096 ---------------
6098 -- For a number of purposes, we need to construct references to objects.
6099 -- These references are subsequently treated as normal access values.
6100 -- An example is the construction of the parameter block passed to a
6101 -- task entry. The N_Reference node is provided for this purpose. It is
6102 -- similar in effect to the use of the Unrestricted_Access attribute,
6103 -- and like Unrestricted_Access can be applied to objects which would
6104 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
6105 -- objects which are not aliased, and slices). In addition it can be
6106 -- applied to composite type values as well as objects, including string
6107 -- values and aggregates.
6109 -- Note: we use the Prefix field for this expression so that the
6110 -- resulting node can be treated using common code with the attribute
6111 -- nodes for the 'Access and related attributes. Logically it would make
6112 -- more sense to call it an Expression field, but then we would have to
6113 -- special case the treatment of the N_Reference node.
6115 -- Sprint syntax: prefix'reference
6117 -- N_Reference
6118 -- Sloc is copied from the expression
6119 -- Prefix (Node3)
6120 -- plus fields for expression
6122 -- Note: in the case where a debug source file is generated, the Sloc
6123 -- for this node points to the quote in the Sprint file output.
6125 ---------------------
6126 -- Subprogram_Info --
6127 ---------------------
6129 -- This node generates the appropriate Subprogram_Info value for a
6130 -- given procedure. See Ada.Exceptions for further details
6132 -- Sprint syntax: subprog'subprogram_info
6134 -- N_Subprogram_Info
6135 -- Sloc points to the entity for the procedure
6136 -- Identifier (Node1) identifier referencing the procedure
6137 -- Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc
6139 -- Note: in the case where a debug source file is generated, the Sloc
6140 -- for this node points to the quote in the Sprint file output.
6142 --------------------------
6143 -- Unchecked Expression --
6144 --------------------------
6146 -- An unchecked expression is one that must be analyzed and resolved
6147 -- with all checks off, regardless of the current setting of scope
6148 -- suppress flags.
6150 -- Sprint syntax: `(expression).
6152 -- Note: this node is always removed from the tree (and replaced by
6153 -- its constituent expression) on completion of analysis, so it only
6154 -- appears in intermediate trees, and will never be seen by Gigi.
6156 -- N_Unchecked_Expression
6157 -- Sloc is a copy of the Sloc of the expression
6158 -- Expression (Node3)
6159 -- plus fields for expression
6161 -- Note: in the case where a debug source file is generated, the Sloc
6162 -- for this node points to the back quote in the Sprint file output.
6164 -------------------------------
6165 -- Unchecked Type Conversion --
6166 -------------------------------
6168 -- An unchecked type conversion node represents the semantic action
6169 -- corresponding to a call to an instantiation of Unchecked_Conversion.
6170 -- It is generated as a result of actual use of Unchecked_Conversion
6171 -- and also the expander generates unchecked type conversion nodes
6172 -- directly for expansion of complex semantic actions.
6174 -- Note: an unchecked type conversion is a variable as far as the
6175 -- semantics are concerned, which is convenient for the expander.
6176 -- This does not change what Ada source programs are legal, since
6177 -- clearly a function call to an instantiation of Unchecked_Conversion
6178 -- is not a variable in any case.
6180 -- Sprint syntax: subtype-mark!(expression).
6182 -- N_Unchecked_Type_Conversion
6183 -- Sloc points to related node in source
6184 -- Subtype_Mark (Node4)
6185 -- Expression (Node3)
6186 -- Kill_Range_Check (Flag11-Sem)
6187 -- plus fields for expression
6189 -- Note: in the case where a debug source file is generated, the Sloc
6190 -- for this node points to the exclamation in the Sprint file output.
6192 -----------------------------------
6193 -- Validate_Unchecked_Conversion --
6194 -----------------------------------
6196 -- The front end does most of the validation of unchecked conversion,
6197 -- including checking sizes (this is done after the back end is called
6198 -- to take advantage of back-annotation of calculated sizes).
6200 -- The front end also deals with specific cases that are not allowed
6201 -- e.g. involving unconstrained array types.
6203 -- For the case of the standard gigi backend, this means that all
6204 -- checks are done in the front-end.
6206 -- However, in the case of specialized back-ends, notably the JVM
6207 -- backend for JGNAT, additional requirements and restrictions apply
6208 -- to unchecked conversion, and these are most conveniently performed
6209 -- in the specialized back-end.
6211 -- To accommodate this requirement, for such back ends, the following
6212 -- special node is generated recording an unchecked conversion that
6213 -- needs to be validated. The back end should post an appropriate
6214 -- error message if the unchecked conversion is invalid or warrants
6215 -- a special warning message.
6217 -- Source_Type and Target_Type point to the entities for the two
6218 -- types involved in the unchecked conversion instantiation that
6219 -- is to be validated.
6221 -- Sprint syntax: validate Unchecked_Conversion (source, target);
6223 -- N_Validate_Unchecked_Conversion
6224 -- Sloc points to instantiation (location for warning message)
6225 -- Source_Type (Node1-Sem)
6226 -- Target_Type (Node2-Sem)
6228 -- Note: in the case where a debug source file is generated, the Sloc
6229 -- for this node points to the VALIDATE keyword in the file output.
6231 -----------
6232 -- Empty --
6233 -----------
6235 -- Used as the contents of the Nkind field of the dummy Empty node
6236 -- and in some other situations to indicate an uninitialized value.
6238 -- N_Empty
6239 -- Chars (Name1) is set to No_Name
6241 -----------
6242 -- Error --
6243 -----------
6245 -- Used as the contents of the Nkind field of the dummy Error node.
6246 -- Has an Etype field, which gets set to Any_Type later on, to help
6247 -- error recovery (Error_Posted is also set in the Error node).
6249 -- N_Error
6250 -- Chars (Name1) is set to Error_Name
6251 -- Etype (Node5-Sem)
6253 --------------------------
6254 -- Node Type Definition --
6255 --------------------------
6257 -- The following is the definition of the Node_Kind type. As previously
6258 -- discussed, this is separated off to allow rearrangement of the order
6259 -- to facilitiate definition of subtype ranges. The comments show the
6260 -- subtype classes which apply to each set of node kinds. The first
6261 -- entry in the comment characterizes the following list of nodes.
6263 type Node_Kind is (
6264 N_Unused_At_Start,
6266 -- N_Representation_Clause
6267 N_At_Clause,
6268 N_Component_Clause,
6269 N_Enumeration_Representation_Clause,
6270 N_Mod_Clause,
6271 N_Record_Representation_Clause,
6273 -- N_Representation_Clause, N_Has_Chars
6274 N_Attribute_Definition_Clause,
6276 -- N_Has_Chars
6277 N_Empty,
6278 N_Pragma,
6279 N_Pragma_Argument_Association,
6281 -- N_Has_Etype
6282 N_Error,
6284 -- N_Entity, N_Has_Etype, N_Has_Chars
6285 N_Defining_Character_Literal,
6286 N_Defining_Identifier,
6287 N_Defining_Operator_Symbol,
6289 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
6290 N_Expanded_Name,
6292 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
6293 -- N_Has_Chars, N_Has_Entity
6294 N_Identifier,
6295 N_Operator_Symbol,
6297 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
6298 -- N_Has_Chars, N_Has_Entity
6299 N_Character_Literal,
6301 -- N_Binary_Op, N_Op, N_Subexpr,
6302 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
6303 N_Op_Add,
6304 N_Op_Concat,
6305 N_Op_Divide,
6306 N_Op_Expon,
6307 N_Op_Mod,
6308 N_Op_Multiply,
6309 N_Op_Rem,
6310 N_Op_Subtract,
6312 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
6313 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
6314 N_Op_And,
6316 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
6317 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean,
6318 -- N_Op_Compare
6319 N_Op_Eq,
6320 N_Op_Ge,
6321 N_Op_Gt,
6322 N_Op_Le,
6323 N_Op_Lt,
6324 N_Op_Ne,
6326 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
6327 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
6328 N_Op_Or,
6329 N_Op_Xor,
6331 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
6332 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
6333 N_Op_Rotate_Left,
6334 N_Op_Rotate_Right,
6335 N_Op_Shift_Left,
6336 N_Op_Shift_Right,
6337 N_Op_Shift_Right_Arithmetic,
6339 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
6340 -- N_Has_Chars, N_Has_Entity
6341 N_Op_Abs,
6342 N_Op_Minus,
6343 N_Op_Not,
6344 N_Op_Plus,
6346 -- N_Subexpr, N_Has_Etype, N_Has_Entity
6347 N_Attribute_Reference,
6349 -- N_Subexpr, N_Has_Etype
6350 N_And_Then,
6351 N_Conditional_Expression,
6352 N_Explicit_Dereference,
6353 N_Function_Call,
6354 N_In,
6355 N_Indexed_Component,
6356 N_Integer_Literal,
6357 N_Not_In,
6358 N_Null,
6359 N_Or_Else,
6360 N_Procedure_Call_Statement,
6361 N_Qualified_Expression,
6363 -- N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
6365 N_Raise_Constraint_Error,
6366 N_Raise_Program_Error,
6367 N_Raise_Storage_Error,
6369 -- N_Subexpr, N_Has_Etype
6371 N_Aggregate,
6372 N_Allocator,
6373 N_Extension_Aggregate,
6374 N_Range,
6375 N_Real_Literal,
6376 N_Reference,
6377 N_Selected_Component,
6378 N_Slice,
6379 N_String_Literal,
6380 N_Subprogram_Info,
6381 N_Type_Conversion,
6382 N_Unchecked_Expression,
6383 N_Unchecked_Type_Conversion,
6385 -- N_Has_Etype
6386 N_Subtype_Indication,
6388 -- N_Declaration
6389 N_Component_Declaration,
6390 N_Entry_Declaration,
6391 N_Formal_Object_Declaration,
6392 N_Formal_Type_Declaration,
6393 N_Full_Type_Declaration,
6394 N_Incomplete_Type_Declaration,
6395 N_Loop_Parameter_Specification,
6396 N_Object_Declaration,
6397 N_Protected_Type_Declaration,
6398 N_Private_Extension_Declaration,
6399 N_Private_Type_Declaration,
6400 N_Subtype_Declaration,
6402 -- N_Subprogram_Specification, N_Declaration
6403 N_Function_Specification,
6404 N_Procedure_Specification,
6406 -- (nothing special)
6407 N_Entry_Index_Specification,
6408 N_Freeze_Entity,
6410 -- N_Access_To_Subprogram_Definition
6411 N_Access_Function_Definition,
6412 N_Access_Procedure_Definition,
6414 -- N_Later_Decl_Item,
6415 N_Task_Type_Declaration,
6417 -- N_Body_Stub, N_Later_Decl_Item
6418 N_Package_Body_Stub,
6419 N_Protected_Body_Stub,
6420 N_Subprogram_Body_Stub,
6421 N_Task_Body_Stub,
6423 -- N_Generic_Instantiation, N_Later_Decl_Item
6424 N_Function_Instantiation,
6425 N_Package_Instantiation,
6426 N_Procedure_Instantiation,
6428 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
6429 N_Package_Body,
6430 N_Subprogram_Body,
6432 -- N_Later_Decl_Item, N_Proper_Body
6433 N_Protected_Body,
6434 N_Task_Body,
6436 -- N_Later_Decl_Item
6437 N_Implicit_Label_Declaration,
6438 N_Package_Declaration,
6439 N_Single_Task_Declaration,
6440 N_Subprogram_Declaration,
6441 N_Use_Package_Clause,
6443 -- N_Generic_Declaration, N_Later_Decl_Item
6444 N_Generic_Package_Declaration,
6445 N_Generic_Subprogram_Declaration,
6447 -- N_Array_Type_Definition
6448 N_Constrained_Array_Definition,
6449 N_Unconstrained_Array_Definition,
6451 -- N_Renaming_Declaration
6452 N_Exception_Renaming_Declaration,
6453 N_Object_Renaming_Declaration,
6454 N_Package_Renaming_Declaration,
6455 N_Subprogram_Renaming_Declaration,
6457 -- N_Generic_Renaming_Declarations, N_Renaming_Declaration
6458 N_Generic_Function_Renaming_Declaration,
6459 N_Generic_Package_Renaming_Declaration,
6460 N_Generic_Procedure_Renaming_Declaration,
6462 -- N_Statement_Other_Than_Procedure_Call
6463 N_Abort_Statement,
6464 N_Accept_Statement,
6465 N_Assignment_Statement,
6466 N_Asynchronous_Select,
6467 N_Block_Statement,
6468 N_Case_Statement,
6469 N_Code_Statement,
6470 N_Conditional_Entry_Call,
6471 N_Delay_Relative_Statement,
6472 N_Delay_Until_Statement,
6473 N_Entry_Call_Statement,
6474 N_Free_Statement,
6475 N_Goto_Statement,
6476 N_Loop_Statement,
6477 N_Null_Statement,
6478 N_Raise_Statement,
6479 N_Requeue_Statement,
6480 N_Return_Statement,
6481 N_Selective_Accept,
6482 N_Timed_Entry_Call,
6484 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
6485 N_Exit_Statement,
6486 N_If_Statement,
6488 -- N_Has_Condition
6489 N_Accept_Alternative,
6490 N_Delay_Alternative,
6491 N_Elsif_Part,
6492 N_Entry_Body_Formal_Part,
6493 N_Iteration_Scheme,
6494 N_Terminate_Alternative,
6496 -- Other nodes (not part of any subtype class)
6497 N_Abortable_Part,
6498 N_Abstract_Subprogram_Declaration,
6499 N_Access_Definition,
6500 N_Access_To_Object_Definition,
6501 N_Case_Statement_Alternative,
6502 N_Compilation_Unit,
6503 N_Compilation_Unit_Aux,
6504 N_Component_Association,
6505 N_Component_List,
6506 N_Derived_Type_Definition,
6507 N_Decimal_Fixed_Point_Definition,
6508 N_Defining_Program_Unit_Name,
6509 N_Delta_Constraint,
6510 N_Designator,
6511 N_Digits_Constraint,
6512 N_Discriminant_Association,
6513 N_Discriminant_Specification,
6514 N_Enumeration_Type_Definition,
6515 N_Entry_Body,
6516 N_Entry_Call_Alternative,
6517 N_Exception_Declaration,
6518 N_Exception_Handler,
6519 N_Floating_Point_Definition,
6520 N_Formal_Decimal_Fixed_Point_Definition,
6521 N_Formal_Derived_Type_Definition,
6522 N_Formal_Discrete_Type_Definition,
6523 N_Formal_Floating_Point_Definition,
6524 N_Formal_Modular_Type_Definition,
6525 N_Formal_Ordinary_Fixed_Point_Definition,
6526 N_Formal_Package_Declaration,
6527 N_Formal_Private_Type_Definition,
6528 N_Formal_Signed_Integer_Type_Definition,
6529 N_Formal_Subprogram_Declaration,
6530 N_Generic_Association,
6531 N_Handled_Sequence_Of_Statements,
6532 N_Index_Or_Discriminant_Constraint,
6533 N_Itype_Reference,
6534 N_Label,
6535 N_Modular_Type_Definition,
6536 N_Number_Declaration,
6537 N_Ordinary_Fixed_Point_Definition,
6538 N_Others_Choice,
6539 N_Package_Specification,
6540 N_Parameter_Association,
6541 N_Parameter_Specification,
6542 N_Protected_Definition,
6543 N_Range_Constraint,
6544 N_Real_Range_Specification,
6545 N_Record_Definition,
6546 N_Signed_Integer_Type_Definition,
6547 N_Single_Protected_Declaration,
6548 N_Subunit,
6549 N_Task_Definition,
6550 N_Triggering_Alternative,
6551 N_Use_Type_Clause,
6552 N_Validate_Unchecked_Conversion,
6553 N_Variant,
6554 N_Variant_Part,
6555 N_With_Clause,
6556 N_With_Type_Clause,
6557 N_Unused_At_End);
6559 for Node_Kind'Size use 8;
6560 -- The data structures in Atree assume this!
6562 ----------------------------
6563 -- Node Class Definitions --
6564 ----------------------------
6566 subtype N_Access_To_Subprogram_Definition is Node_Kind range
6567 N_Access_Function_Definition ..
6568 N_Access_Procedure_Definition;
6570 subtype N_Array_Type_Definition is Node_Kind range
6571 N_Constrained_Array_Definition ..
6572 N_Unconstrained_Array_Definition;
6574 subtype N_Binary_Op is Node_Kind range
6575 N_Op_Add ..
6576 N_Op_Shift_Right_Arithmetic;
6578 subtype N_Body_Stub is Node_Kind range
6579 N_Package_Body_Stub ..
6580 N_Task_Body_Stub;
6582 subtype N_Declaration is Node_Kind range
6583 N_Component_Declaration ..
6584 N_Procedure_Specification;
6585 -- Note: this includes all constructs normally thought of as declarations
6586 -- except those which are separately grouped as later declarations.
6588 subtype N_Direct_Name is Node_Kind range
6589 N_Identifier ..
6590 N_Character_Literal;
6592 subtype N_Entity is Node_Kind range
6593 N_Defining_Character_Literal ..
6594 N_Defining_Operator_Symbol;
6596 subtype N_Generic_Declaration is Node_Kind range
6597 N_Generic_Package_Declaration ..
6598 N_Generic_Subprogram_Declaration;
6600 subtype N_Generic_Instantiation is Node_Kind range
6601 N_Function_Instantiation ..
6602 N_Procedure_Instantiation;
6604 subtype N_Generic_Renaming_Declaration is Node_Kind range
6605 N_Generic_Function_Renaming_Declaration ..
6606 N_Generic_Procedure_Renaming_Declaration;
6608 subtype N_Has_Chars is Node_Kind range
6609 N_Attribute_Definition_Clause ..
6610 N_Op_Plus;
6612 subtype N_Has_Entity is Node_Kind range
6613 N_Expanded_Name ..
6614 N_Attribute_Reference;
6615 -- Nodes that have Entity fields
6616 -- Warning: DOES NOT INCLUDE N_Freeze_Entity!
6618 subtype N_Has_Etype is Node_Kind range
6619 N_Error ..
6620 N_Subtype_Indication;
6622 subtype N_Later_Decl_Item is Node_Kind range
6623 N_Task_Type_Declaration ..
6624 N_Generic_Subprogram_Declaration;
6625 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and
6626 -- includes only those items which can appear as later declarative
6627 -- items. This also includes N_Implicit_Label_Declaration which is
6628 -- not specifically in the grammar but may appear as a valid later
6629 -- declarative items. It does NOT include N_Pragma which can also
6630 -- appear among later declarative items. It does however include
6631 -- N_Protected_Body, which is a bit peculiar, but harmless since
6632 -- this cannot appear in Ada 83 mode anyway.
6634 subtype N_Op is Node_Kind range
6635 N_Op_Add ..
6636 N_Op_Plus;
6638 subtype N_Op_Boolean is Node_Kind range
6639 N_Op_And ..
6640 N_Op_Xor;
6641 -- Binary operators which take operands of a boolean type, and yield
6642 -- a result of a boolean type.
6644 subtype N_Op_Compare is Node_Kind range
6645 N_Op_Eq ..
6646 N_Op_Ne;
6648 subtype N_Op_Shift is Node_Kind range
6649 N_Op_Rotate_Left ..
6650 N_Op_Shift_Right_Arithmetic;
6652 subtype N_Proper_Body is Node_Kind range
6653 N_Package_Body ..
6654 N_Task_Body;
6656 subtype N_Raise_xxx_Error is Node_Kind range
6657 N_Raise_Constraint_Error ..
6658 N_Raise_Storage_Error;
6660 subtype N_Renaming_Declaration is Node_Kind range
6661 N_Exception_Renaming_Declaration ..
6662 N_Generic_Procedure_Renaming_Declaration;
6664 subtype N_Representation_Clause is Node_Kind range
6665 N_At_Clause ..
6666 N_Attribute_Definition_Clause;
6668 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
6669 N_Abort_Statement ..
6670 N_If_Statement;
6671 -- Note that this includes all statement types except for the cases of the
6672 -- N_Procedure_Call_Statement which is considered to be a subexpression
6673 -- (since overloading is possible, so it needs to go through the normal
6674 -- overloading resolution for expressions).
6676 subtype N_Has_Condition is Node_Kind range
6677 N_Exit_Statement ..
6678 N_Terminate_Alternative;
6679 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
6681 subtype N_Subexpr is Node_Kind range
6682 N_Expanded_Name ..
6683 N_Unchecked_Type_Conversion;
6684 -- Nodes with expression fields
6686 subtype N_Subprogram_Specification is Node_Kind range
6687 N_Function_Specification ..
6688 N_Procedure_Specification;
6690 subtype N_Unary_Op is Node_Kind range
6691 N_Op_Abs ..
6692 N_Op_Plus;
6694 subtype N_Unit_Body is Node_Kind range
6695 N_Package_Body ..
6696 N_Subprogram_Body;
6698 ---------------------------
6699 -- Node Access Functions --
6700 ---------------------------
6702 -- The following functions return the contents of the indicated field of
6703 -- the node referenced by the argument, which is a Node_Id. They provide
6704 -- logical access to fields in the node which could be accessed using the
6705 -- Atree.Unchecked_Access package, but the idea is always to use these
6706 -- higher level routines which preserve strong typing. In debug mode,
6707 -- these routines check that they are being applied to an appropriate
6708 -- node, as well as checking that the node is in range.
6710 function ABE_Is_Certain
6711 (N : Node_Id) return Boolean; -- Flag18
6713 function Abort_Present
6714 (N : Node_Id) return Boolean; -- Flag15
6716 function Abortable_Part
6717 (N : Node_Id) return Node_Id; -- Node2
6719 function Abstract_Present
6720 (N : Node_Id) return Boolean; -- Flag4
6722 function Accept_Handler_Records
6723 (N : Node_Id) return List_Id; -- List5
6725 function Accept_Statement
6726 (N : Node_Id) return Node_Id; -- Node2
6728 function Access_Types_To_Process
6729 (N : Node_Id) return Elist_Id; -- Elist2
6731 function Actions
6732 (N : Node_Id) return List_Id; -- List1
6734 function Activation_Chain_Entity
6735 (N : Node_Id) return Node_Id; -- Node3
6737 function Acts_As_Spec
6738 (N : Node_Id) return Boolean; -- Flag4
6740 function Aggregate_Bounds
6741 (N : Node_Id) return Node_Id; -- Node3
6743 function Aliased_Present
6744 (N : Node_Id) return Boolean; -- Flag4
6746 function All_Others
6747 (N : Node_Id) return Boolean; -- Flag11
6749 function All_Present
6750 (N : Node_Id) return Boolean; -- Flag15
6752 function Alternatives
6753 (N : Node_Id) return List_Id; -- List4
6755 function Ancestor_Part
6756 (N : Node_Id) return Node_Id; -- Node3
6758 function Array_Aggregate
6759 (N : Node_Id) return Node_Id; -- Node3
6761 function Assignment_OK
6762 (N : Node_Id) return Boolean; -- Flag15
6764 function Associated_Node
6765 (N : Node_Id) return Node_Id; -- Node4
6767 function At_End_Proc
6768 (N : Node_Id) return Node_Id; -- Node1
6770 function Attribute_Name
6771 (N : Node_Id) return Name_Id; -- Name2
6773 function Aux_Decls_Node
6774 (N : Node_Id) return Node_Id; -- Node5
6776 function Backwards_OK
6777 (N : Node_Id) return Boolean; -- Flag6
6779 function Bad_Is_Detected
6780 (N : Node_Id) return Boolean; -- Flag15
6782 function By_Ref
6783 (N : Node_Id) return Boolean; -- Flag5
6785 function Body_Required
6786 (N : Node_Id) return Boolean; -- Flag13
6788 function Body_To_Inline
6789 (N : Node_Id) return Node_Id; -- Node3
6791 function Box_Present
6792 (N : Node_Id) return Boolean; -- Flag15
6794 function Char_Literal_Value
6795 (N : Node_Id) return Char_Code; -- Char_Code2
6797 function Chars
6798 (N : Node_Id) return Name_Id; -- Name1
6800 function Choice_Parameter
6801 (N : Node_Id) return Node_Id; -- Node2
6803 function Choices
6804 (N : Node_Id) return List_Id; -- List1
6806 function Compile_Time_Known_Aggregate
6807 (N : Node_Id) return Boolean; -- Flag18
6809 function Component_Associations
6810 (N : Node_Id) return List_Id; -- List2
6812 function Component_Clauses
6813 (N : Node_Id) return List_Id; -- List3
6815 function Component_Items
6816 (N : Node_Id) return List_Id; -- List3
6818 function Component_List
6819 (N : Node_Id) return Node_Id; -- Node1
6821 function Component_Name
6822 (N : Node_Id) return Node_Id; -- Node1
6824 function Condition
6825 (N : Node_Id) return Node_Id; -- Node1
6827 function Condition_Actions
6828 (N : Node_Id) return List_Id; -- List3
6830 function Constant_Present
6831 (N : Node_Id) return Boolean; -- Flag17
6833 function Constraint
6834 (N : Node_Id) return Node_Id; -- Node3
6836 function Constraints
6837 (N : Node_Id) return List_Id; -- List1
6839 function Context_Installed
6840 (N : Node_Id) return Boolean; -- Flag13
6842 function Context_Items
6843 (N : Node_Id) return List_Id; -- List1
6845 function Controlling_Argument
6846 (N : Node_Id) return Node_Id; -- Node1
6848 function Conversion_OK
6849 (N : Node_Id) return Boolean; -- Flag14
6851 function Corresponding_Body
6852 (N : Node_Id) return Node_Id; -- Node5
6854 function Corresponding_Generic_Association
6855 (N : Node_Id) return Node_Id; -- Node5
6857 function Corresponding_Integer_Value
6858 (N : Node_Id) return Uint; -- Uint4
6860 function Corresponding_Spec
6861 (N : Node_Id) return Node_Id; -- Node5
6863 function Corresponding_Stub
6864 (N : Node_Id) return Node_Id; -- Node3
6866 function Dcheck_Function
6867 (N : Node_Id) return Entity_Id; -- Node5
6869 function Debug_Statement
6870 (N : Node_Id) return Node_Id; -- Node3
6872 function Declarations
6873 (N : Node_Id) return List_Id; -- List2
6875 function Default_Expression
6876 (N : Node_Id) return Node_Id; -- Node5
6878 function Default_Name
6879 (N : Node_Id) return Node_Id; -- Node2
6881 function Defining_Identifier
6882 (N : Node_Id) return Entity_Id; -- Node1
6884 function Defining_Unit_Name
6885 (N : Node_Id) return Node_Id; -- Node1
6887 function Delay_Alternative
6888 (N : Node_Id) return Node_Id; -- Node4
6890 function Delay_Finalize_Attach
6891 (N : Node_Id) return Boolean; -- Flag14
6893 function Delay_Statement
6894 (N : Node_Id) return Node_Id; -- Node2
6896 function Delta_Expression
6897 (N : Node_Id) return Node_Id; -- Node3
6899 function Digits_Expression
6900 (N : Node_Id) return Node_Id; -- Node2
6902 function Discr_Check_Funcs_Built
6903 (N : Node_Id) return Boolean; -- Flag11
6905 function Discrete_Choices
6906 (N : Node_Id) return List_Id; -- List4
6908 function Discrete_Range
6909 (N : Node_Id) return Node_Id; -- Node4
6911 function Discrete_Subtype_Definition
6912 (N : Node_Id) return Node_Id; -- Node4
6914 function Discrete_Subtype_Definitions
6915 (N : Node_Id) return List_Id; -- List2
6917 function Discriminant_Specifications
6918 (N : Node_Id) return List_Id; -- List4
6920 function Discriminant_Type
6921 (N : Node_Id) return Node_Id; -- Node5
6923 function Do_Access_Check
6924 (N : Node_Id) return Boolean; -- Flag11
6926 function Do_Accessibility_Check
6927 (N : Node_Id) return Boolean; -- Flag13
6929 function Do_Discriminant_Check
6930 (N : Node_Id) return Boolean; -- Flag13
6932 function Do_Division_Check
6933 (N : Node_Id) return Boolean; -- Flag13
6935 function Do_Length_Check
6936 (N : Node_Id) return Boolean; -- Flag4
6938 function Do_Overflow_Check
6939 (N : Node_Id) return Boolean; -- Flag17
6941 function Do_Range_Check
6942 (N : Node_Id) return Boolean; -- Flag9
6944 function Do_Storage_Check
6945 (N : Node_Id) return Boolean; -- Flag17
6947 function Do_Tag_Check
6948 (N : Node_Id) return Boolean; -- Flag13
6950 function Elaborate_All_Present
6951 (N : Node_Id) return Boolean; -- Flag15
6953 function Elaborate_Present
6954 (N : Node_Id) return Boolean; -- Flag4
6956 function Elaboration_Boolean
6957 (N : Node_Id) return Node_Id; -- Node2
6959 function Else_Actions
6960 (N : Node_Id) return List_Id; -- List3
6962 function Else_Statements
6963 (N : Node_Id) return List_Id; -- List4
6965 function Elsif_Parts
6966 (N : Node_Id) return List_Id; -- List3
6968 function Enclosing_Variant
6969 (N : Node_Id) return Node_Id; -- Node2
6971 function End_Label
6972 (N : Node_Id) return Node_Id; -- Node4
6974 function End_Span
6975 (N : Node_Id) return Uint; -- Uint5
6977 function Entity
6978 (N : Node_Id) return Node_Id; -- Node4
6980 function Entry_Body_Formal_Part
6981 (N : Node_Id) return Node_Id; -- Node5
6983 function Entry_Call_Alternative
6984 (N : Node_Id) return Node_Id; -- Node1
6986 function Entry_Call_Statement
6987 (N : Node_Id) return Node_Id; -- Node1
6989 function Entry_Direct_Name
6990 (N : Node_Id) return Node_Id; -- Node1
6992 function Entry_Index
6993 (N : Node_Id) return Node_Id; -- Node5
6995 function Entry_Index_Specification
6996 (N : Node_Id) return Node_Id; -- Node4
6998 function Etype
6999 (N : Node_Id) return Node_Id; -- Node5
7001 function Exception_Choices
7002 (N : Node_Id) return List_Id; -- List4
7004 function Exception_Handlers
7005 (N : Node_Id) return List_Id; -- List5
7007 function Exception_Junk
7008 (N : Node_Id) return Boolean; -- Flag11
7010 function Explicit_Actual_Parameter
7011 (N : Node_Id) return Node_Id; -- Node3
7013 function Expansion_Delayed
7014 (N : Node_Id) return Boolean; -- Flag11
7016 function Explicit_Generic_Actual_Parameter
7017 (N : Node_Id) return Node_Id; -- Node1
7019 function Expression
7020 (N : Node_Id) return Node_Id; -- Node3
7022 function Expressions
7023 (N : Node_Id) return List_Id; -- List1
7025 function First_Bit
7026 (N : Node_Id) return Node_Id; -- Node3
7028 function First_Inlined_Subprogram
7029 (N : Node_Id) return Entity_Id; -- Node3
7031 function First_Name
7032 (N : Node_Id) return Boolean; -- Flag5
7034 function First_Named_Actual
7035 (N : Node_Id) return Node_Id; -- Node4
7037 function First_Real_Statement
7038 (N : Node_Id) return Node_Id; -- Node2
7040 function First_Subtype_Link
7041 (N : Node_Id) return Entity_Id; -- Node5
7043 function Float_Truncate
7044 (N : Node_Id) return Boolean; -- Flag11
7046 function Formal_Type_Definition
7047 (N : Node_Id) return Node_Id; -- Node3
7049 function Forwards_OK
7050 (N : Node_Id) return Boolean; -- Flag5
7052 function From_At_Mod
7053 (N : Node_Id) return Boolean; -- Flag4
7055 function Generic_Associations
7056 (N : Node_Id) return List_Id; -- List3
7058 function Generic_Formal_Declarations
7059 (N : Node_Id) return List_Id; -- List2
7061 function Generic_Parent
7062 (N : Node_Id) return Node_Id; -- Node5
7064 function Generic_Parent_Type
7065 (N : Node_Id) return Node_Id; -- Node4
7067 function Handled_Statement_Sequence
7068 (N : Node_Id) return Node_Id; -- Node4
7070 function Handler_List_Entry
7071 (N : Node_Id) return Node_Id; -- Node2
7073 function Has_Created_Identifier
7074 (N : Node_Id) return Boolean; -- Flag15
7076 function Has_Dynamic_Length_Check
7077 (N : Node_Id) return Boolean; -- Flag10
7079 function Has_Dynamic_Range_Check
7080 (N : Node_Id) return Boolean; -- Flag12
7082 function Has_No_Elaboration_Code
7083 (N : Node_Id) return Boolean; -- Flag17
7085 function Has_Priority_Pragma
7086 (N : Node_Id) return Boolean; -- Flag6
7088 function Has_Private_View
7089 (N : Node_Id) return Boolean; -- Flag11
7091 function Has_Storage_Size_Pragma
7092 (N : Node_Id) return Boolean; -- Flag5
7094 function Has_Task_Info_Pragma
7095 (N : Node_Id) return Boolean; -- Flag7
7097 function Has_Task_Name_Pragma
7098 (N : Node_Id) return Boolean; -- Flag8
7100 function Has_Wide_Character
7101 (N : Node_Id) return Boolean; -- Flag11
7103 function Hidden_By_Use_Clause
7104 (N : Node_Id) return Elist_Id; -- Elist4
7106 function High_Bound
7107 (N : Node_Id) return Node_Id; -- Node2
7109 function Identifier
7110 (N : Node_Id) return Node_Id; -- Node1
7112 function Implicit_With
7113 (N : Node_Id) return Boolean; -- Flag17
7115 function In_Present
7116 (N : Node_Id) return Boolean; -- Flag15
7118 function Includes_Infinities
7119 (N : Node_Id) return Boolean; -- Flag11
7121 function Instance_Spec
7122 (N : Node_Id) return Node_Id; -- Node5
7124 function Intval
7125 (N : Node_Id) return Uint; -- Uint3
7127 function Is_Asynchronous_Call_Block
7128 (N : Node_Id) return Boolean; -- Flag7
7130 function Is_Component_Left_Opnd
7131 (N : Node_Id) return Boolean; -- Flag13
7133 function Is_Component_Right_Opnd
7134 (N : Node_Id) return Boolean; -- Flag14
7136 function Is_Controlling_Actual
7137 (N : Node_Id) return Boolean; -- Flag16
7139 function Is_Machine_Number
7140 (N : Node_Id) return Boolean; -- Flag11
7142 function Is_Overloaded
7143 (N : Node_Id) return Boolean; -- Flag5
7145 function Is_Power_Of_2_For_Shift
7146 (N : Node_Id) return Boolean; -- Flag13
7148 function Is_Protected_Subprogram_Body
7149 (N : Node_Id) return Boolean; -- Flag7
7151 function Is_Static_Expression
7152 (N : Node_Id) return Boolean; -- Flag6
7154 function Is_Subprogram_Descriptor
7155 (N : Node_Id) return Boolean; -- Flag16
7157 function Is_Task_Allocation_Block
7158 (N : Node_Id) return Boolean; -- Flag6
7160 function Is_Task_Master
7161 (N : Node_Id) return Boolean; -- Flag5
7163 function Iteration_Scheme
7164 (N : Node_Id) return Node_Id; -- Node2
7166 function Itype
7167 (N : Node_Id) return Entity_Id; -- Node1
7169 function Kill_Range_Check
7170 (N : Node_Id) return Boolean; -- Flag11
7172 function Label_Construct
7173 (N : Node_Id) return Node_Id; -- Node2
7175 function Left_Opnd
7176 (N : Node_Id) return Node_Id; -- Node2
7178 function Last_Bit
7179 (N : Node_Id) return Node_Id; -- Node4
7181 function Last_Name
7182 (N : Node_Id) return Boolean; -- Flag6
7184 function Library_Unit
7185 (N : Node_Id) return Node_Id; -- Node4
7187 function Limited_Present
7188 (N : Node_Id) return Boolean; -- Flag17
7190 function Literals
7191 (N : Node_Id) return List_Id; -- List1
7193 function Loop_Actions
7194 (N : Node_Id) return List_Id; -- List2
7196 function Loop_Parameter_Specification
7197 (N : Node_Id) return Node_Id; -- Node4
7199 function Low_Bound
7200 (N : Node_Id) return Node_Id; -- Node1
7202 function Mod_Clause
7203 (N : Node_Id) return Node_Id; -- Node2
7205 function More_Ids
7206 (N : Node_Id) return Boolean; -- Flag5
7208 function Must_Not_Freeze
7209 (N : Node_Id) return Boolean; -- Flag8
7211 function Name
7212 (N : Node_Id) return Node_Id; -- Node2
7214 function Names
7215 (N : Node_Id) return List_Id; -- List2
7217 function Next_Entity
7218 (N : Node_Id) return Node_Id; -- Node2
7220 function Next_Named_Actual
7221 (N : Node_Id) return Node_Id; -- Node4
7223 function Next_Rep_Item
7224 (N : Node_Id) return Node_Id; -- Node4
7226 function Next_Use_Clause
7227 (N : Node_Id) return Node_Id; -- Node3
7229 function No_Ctrl_Actions
7230 (N : Node_Id) return Boolean; -- Flag7
7232 function No_Entities_Ref_In_Spec
7233 (N : Node_Id) return Boolean; -- Flag8
7235 function No_Initialization
7236 (N : Node_Id) return Boolean; -- Flag13
7238 function Null_Present
7239 (N : Node_Id) return Boolean; -- Flag13
7241 function Null_Record_Present
7242 (N : Node_Id) return Boolean; -- Flag17
7244 function Object_Definition
7245 (N : Node_Id) return Node_Id; -- Node4
7247 function OK_For_Stream
7248 (N : Node_Id) return Boolean; -- Flag4
7250 function Original_Discriminant
7251 (N : Node_Id) return Node_Id; -- Node2
7253 function Others_Discrete_Choices
7254 (N : Node_Id) return List_Id; -- List1
7256 function Out_Present
7257 (N : Node_Id) return Boolean; -- Flag17
7259 function Parameter_Associations
7260 (N : Node_Id) return List_Id; -- List3
7262 function Parameter_List_Truncated
7263 (N : Node_Id) return Boolean; -- Flag17
7265 function Parameter_Specifications
7266 (N : Node_Id) return List_Id; -- List3
7268 function Parameter_Type
7269 (N : Node_Id) return Node_Id; -- Node2
7271 function Parent_Spec
7272 (N : Node_Id) return Node_Id; -- Node4
7274 function Position
7275 (N : Node_Id) return Node_Id; -- Node2
7277 function Pragma_Argument_Associations
7278 (N : Node_Id) return List_Id; -- List2
7280 function Pragmas_After
7281 (N : Node_Id) return List_Id; -- List5
7283 function Pragmas_Before
7284 (N : Node_Id) return List_Id; -- List4
7286 function Prefix
7287 (N : Node_Id) return Node_Id; -- Node3
7289 function Present_Expr
7290 (N : Node_Id) return Uint; -- Uint3
7292 function Prev_Ids
7293 (N : Node_Id) return Boolean; -- Flag6
7295 function Print_In_Hex
7296 (N : Node_Id) return Boolean; -- Flag13
7298 function Private_Declarations
7299 (N : Node_Id) return List_Id; -- List3
7301 function Private_Present
7302 (N : Node_Id) return Boolean; -- Flag15
7304 function Procedure_To_Call
7305 (N : Node_Id) return Node_Id; -- Node4
7307 function Proper_Body
7308 (N : Node_Id) return Node_Id; -- Node1
7310 function Protected_Definition
7311 (N : Node_Id) return Node_Id; -- Node3
7313 function Protected_Present
7314 (N : Node_Id) return Boolean; -- Flag15
7316 function Raises_Constraint_Error
7317 (N : Node_Id) return Boolean; -- Flag7
7319 function Range_Constraint
7320 (N : Node_Id) return Node_Id; -- Node4
7322 function Range_Expression
7323 (N : Node_Id) return Node_Id; -- Node4
7325 function Real_Range_Specification
7326 (N : Node_Id) return Node_Id; -- Node4
7328 function Realval
7329 (N : Node_Id) return Ureal; -- Ureal3
7331 function Record_Extension_Part
7332 (N : Node_Id) return Node_Id; -- Node3
7334 function Redundant_Use
7335 (N : Node_Id) return Boolean; -- Flag13
7337 function Return_Type
7338 (N : Node_Id) return Node_Id; -- Node2
7340 function Reverse_Present
7341 (N : Node_Id) return Boolean; -- Flag15
7343 function Right_Opnd
7344 (N : Node_Id) return Node_Id; -- Node3
7346 function Rounded_Result
7347 (N : Node_Id) return Boolean; -- Flag18
7349 function Scope
7350 (N : Node_Id) return Node_Id; -- Node3
7352 function Select_Alternatives
7353 (N : Node_Id) return List_Id; -- List1
7355 function Selector_Name
7356 (N : Node_Id) return Node_Id; -- Node2
7358 function Selector_Names
7359 (N : Node_Id) return List_Id; -- List1
7361 function Shift_Count_OK
7362 (N : Node_Id) return Boolean; -- Flag4
7364 function Source_Type
7365 (N : Node_Id) return Entity_Id; -- Node1
7367 function Specification
7368 (N : Node_Id) return Node_Id; -- Node1
7370 function Statements
7371 (N : Node_Id) return List_Id; -- List3
7373 function Static_Processing_OK
7374 (N : Node_Id) return Boolean; -- Flag4
7376 function Storage_Pool
7377 (N : Node_Id) return Node_Id; -- Node1
7379 function Strval
7380 (N : Node_Id) return String_Id; -- Str3
7382 function Subtype_Indication
7383 (N : Node_Id) return Node_Id; -- Node5
7385 function Subtype_Mark
7386 (N : Node_Id) return Node_Id; -- Node4
7388 function Subtype_Marks
7389 (N : Node_Id) return List_Id; -- List2
7391 function Tagged_Present
7392 (N : Node_Id) return Boolean; -- Flag15
7394 function Target_Type
7395 (N : Node_Id) return Entity_Id; -- Node2
7397 function Task_Body_Procedure
7398 (N : Node_Id) return Entity_Id; -- Node2
7400 function Task_Definition
7401 (N : Node_Id) return Node_Id; -- Node3
7403 function Then_Actions
7404 (N : Node_Id) return List_Id; -- List2
7406 function Then_Statements
7407 (N : Node_Id) return List_Id; -- List2
7409 function Treat_Fixed_As_Integer
7410 (N : Node_Id) return Boolean; -- Flag14
7412 function Triggering_Alternative
7413 (N : Node_Id) return Node_Id; -- Node1
7415 function Triggering_Statement
7416 (N : Node_Id) return Node_Id; -- Node1
7418 function TSS_Elist
7419 (N : Node_Id) return Elist_Id; -- Elist3
7421 function Type_Definition
7422 (N : Node_Id) return Node_Id; -- Node3
7424 function Unit
7425 (N : Node_Id) return Node_Id; -- Node2
7427 function Unknown_Discriminants_Present
7428 (N : Node_Id) return Boolean; -- Flag13
7430 function Unreferenced_In_Spec
7431 (N : Node_Id) return Boolean; -- Flag7
7433 function Variant_Part
7434 (N : Node_Id) return Node_Id; -- Node4
7436 function Variants
7437 (N : Node_Id) return List_Id; -- List1
7439 function Visible_Declarations
7440 (N : Node_Id) return List_Id; -- List2
7442 function Was_Originally_Stub
7443 (N : Node_Id) return Boolean; -- Flag13
7445 function Zero_Cost_Handling
7446 (N : Node_Id) return Boolean; -- Flag5
7448 -- End functions (note used by xsinfo utility program to end processing)
7450 ----------------------------
7451 -- Node Update Procedures --
7452 ----------------------------
7454 -- These are the corresponding node update routines, which again provide
7455 -- a high level logical access with type checking. In addition to setting
7456 -- the indicated field of the node N to the given Val, in the case of
7457 -- tree pointers (List1-4), the parent pointer of the Val node is set to
7458 -- point back to node N. This automates the setting of the parent pointer.
7460 procedure Set_ABE_Is_Certain
7461 (N : Node_Id; Val : Boolean := True); -- Flag18
7463 procedure Set_Abort_Present
7464 (N : Node_Id; Val : Boolean := True); -- Flag15
7466 procedure Set_Abortable_Part
7467 (N : Node_Id; Val : Node_Id); -- Node2
7469 procedure Set_Abstract_Present
7470 (N : Node_Id; Val : Boolean := True); -- Flag4
7472 procedure Set_Accept_Handler_Records
7473 (N : Node_Id; Val : List_Id); -- List5
7475 procedure Set_Accept_Statement
7476 (N : Node_Id; Val : Node_Id); -- Node2
7478 procedure Set_Access_Types_To_Process
7479 (N : Node_Id; Val : Elist_Id); -- Elist2
7481 procedure Set_Actions
7482 (N : Node_Id; Val : List_Id); -- List1
7484 procedure Set_Activation_Chain_Entity
7485 (N : Node_Id; Val : Node_Id); -- Node3
7487 procedure Set_Acts_As_Spec
7488 (N : Node_Id; Val : Boolean := True); -- Flag4
7490 procedure Set_Aggregate_Bounds
7491 (N : Node_Id; Val : Node_Id); -- Node3
7493 procedure Set_Aliased_Present
7494 (N : Node_Id; Val : Boolean := True); -- Flag4
7496 procedure Set_All_Others
7497 (N : Node_Id; Val : Boolean := True); -- Flag11
7499 procedure Set_All_Present
7500 (N : Node_Id; Val : Boolean := True); -- Flag15
7502 procedure Set_Alternatives
7503 (N : Node_Id; Val : List_Id); -- List4
7505 procedure Set_Ancestor_Part
7506 (N : Node_Id; Val : Node_Id); -- Node3
7508 procedure Set_Array_Aggregate
7509 (N : Node_Id; Val : Node_Id); -- Node3
7511 procedure Set_Assignment_OK
7512 (N : Node_Id; Val : Boolean := True); -- Flag15
7514 procedure Set_Associated_Node
7515 (N : Node_Id; Val : Node_Id); -- Node4
7517 procedure Set_Attribute_Name
7518 (N : Node_Id; Val : Name_Id); -- Name2
7520 procedure Set_At_End_Proc
7521 (N : Node_Id; Val : Node_Id); -- Node1
7523 procedure Set_Aux_Decls_Node
7524 (N : Node_Id; Val : Node_Id); -- Node5
7526 procedure Set_Backwards_OK
7527 (N : Node_Id; Val : Boolean := True); -- Flag6
7529 procedure Set_Bad_Is_Detected
7530 (N : Node_Id; Val : Boolean := True); -- Flag15
7532 procedure Set_Body_Required
7533 (N : Node_Id; Val : Boolean := True); -- Flag13
7535 procedure Set_Body_To_Inline
7536 (N : Node_Id; Val : Node_Id); -- Node3
7538 procedure Set_Box_Present
7539 (N : Node_Id; Val : Boolean := True); -- Flag15
7541 procedure Set_By_Ref
7542 (N : Node_Id; Val : Boolean := True); -- Flag5
7544 procedure Set_Char_Literal_Value
7545 (N : Node_Id; Val : Char_Code); -- Char_Code2
7547 procedure Set_Chars
7548 (N : Node_Id; Val : Name_Id); -- Name1
7550 procedure Set_Choice_Parameter
7551 (N : Node_Id; Val : Node_Id); -- Node2
7553 procedure Set_Choices
7554 (N : Node_Id; Val : List_Id); -- List1
7556 procedure Set_Compile_Time_Known_Aggregate
7557 (N : Node_Id; Val : Boolean := True); -- Flag18
7559 procedure Set_Component_Associations
7560 (N : Node_Id; Val : List_Id); -- List2
7562 procedure Set_Component_Clauses
7563 (N : Node_Id; Val : List_Id); -- List3
7565 procedure Set_Component_Items
7566 (N : Node_Id; Val : List_Id); -- List3
7568 procedure Set_Component_List
7569 (N : Node_Id; Val : Node_Id); -- Node1
7571 procedure Set_Component_Name
7572 (N : Node_Id; Val : Node_Id); -- Node1
7574 procedure Set_Condition
7575 (N : Node_Id; Val : Node_Id); -- Node1
7577 procedure Set_Condition_Actions
7578 (N : Node_Id; Val : List_Id); -- List3
7580 procedure Set_Constant_Present
7581 (N : Node_Id; Val : Boolean := True); -- Flag17
7583 procedure Set_Constraint
7584 (N : Node_Id; Val : Node_Id); -- Node3
7586 procedure Set_Constraints
7587 (N : Node_Id; Val : List_Id); -- List1
7589 procedure Set_Context_Installed
7590 (N : Node_Id; Val : Boolean := True); -- Flag13
7592 procedure Set_Context_Items
7593 (N : Node_Id; Val : List_Id); -- List1
7595 procedure Set_Controlling_Argument
7596 (N : Node_Id; Val : Node_Id); -- Node1
7598 procedure Set_Conversion_OK
7599 (N : Node_Id; Val : Boolean := True); -- Flag14
7601 procedure Set_Corresponding_Body
7602 (N : Node_Id; Val : Node_Id); -- Node5
7604 procedure Set_Corresponding_Generic_Association
7605 (N : Node_Id; Val : Node_Id); -- Node5
7607 procedure Set_Corresponding_Integer_Value
7608 (N : Node_Id; Val : Uint); -- Uint4
7610 procedure Set_Corresponding_Spec
7611 (N : Node_Id; Val : Node_Id); -- Node5
7613 procedure Set_Corresponding_Stub
7614 (N : Node_Id; Val : Node_Id); -- Node3
7616 procedure Set_Dcheck_Function
7617 (N : Node_Id; Val : Entity_Id); -- Node5
7619 procedure Set_Debug_Statement
7620 (N : Node_Id; Val : Node_Id); -- Node3
7622 procedure Set_Declarations
7623 (N : Node_Id; Val : List_Id); -- List2
7625 procedure Set_Default_Expression
7626 (N : Node_Id; Val : Node_Id); -- Node5
7628 procedure Set_Default_Name
7629 (N : Node_Id; Val : Node_Id); -- Node2
7631 procedure Set_Defining_Identifier
7632 (N : Node_Id; Val : Entity_Id); -- Node1
7634 procedure Set_Defining_Unit_Name
7635 (N : Node_Id; Val : Node_Id); -- Node1
7637 procedure Set_Delay_Alternative
7638 (N : Node_Id; Val : Node_Id); -- Node4
7640 procedure Set_Delay_Finalize_Attach
7641 (N : Node_Id; Val : Boolean := True); -- Flag14
7643 procedure Set_Delay_Statement
7644 (N : Node_Id; Val : Node_Id); -- Node2
7646 procedure Set_Delta_Expression
7647 (N : Node_Id; Val : Node_Id); -- Node3
7649 procedure Set_Digits_Expression
7650 (N : Node_Id; Val : Node_Id); -- Node2
7652 procedure Set_Discr_Check_Funcs_Built
7653 (N : Node_Id; Val : Boolean := True); -- Flag11
7655 procedure Set_Discrete_Choices
7656 (N : Node_Id; Val : List_Id); -- List4
7658 procedure Set_Discrete_Range
7659 (N : Node_Id; Val : Node_Id); -- Node4
7661 procedure Set_Discrete_Subtype_Definition
7662 (N : Node_Id; Val : Node_Id); -- Node4
7664 procedure Set_Discrete_Subtype_Definitions
7665 (N : Node_Id; Val : List_Id); -- List2
7667 procedure Set_Discriminant_Specifications
7668 (N : Node_Id; Val : List_Id); -- List4
7670 procedure Set_Discriminant_Type
7671 (N : Node_Id; Val : Node_Id); -- Node5
7673 procedure Set_Do_Access_Check
7674 (N : Node_Id; Val : Boolean := True); -- Flag11
7676 procedure Set_Do_Accessibility_Check
7677 (N : Node_Id; Val : Boolean := True); -- Flag13
7679 procedure Set_Do_Discriminant_Check
7680 (N : Node_Id; Val : Boolean := True); -- Flag13
7682 procedure Set_Do_Division_Check
7683 (N : Node_Id; Val : Boolean := True); -- Flag13
7685 procedure Set_Do_Length_Check
7686 (N : Node_Id; Val : Boolean := True); -- Flag4
7688 procedure Set_Do_Overflow_Check
7689 (N : Node_Id; Val : Boolean := True); -- Flag17
7691 procedure Set_Do_Range_Check
7692 (N : Node_Id; Val : Boolean := True); -- Flag9
7694 procedure Set_Do_Storage_Check
7695 (N : Node_Id; Val : Boolean := True); -- Flag17
7697 procedure Set_Do_Tag_Check
7698 (N : Node_Id; Val : Boolean := True); -- Flag13
7700 procedure Set_Elaborate_All_Present
7701 (N : Node_Id; Val : Boolean := True); -- Flag15
7703 procedure Set_Elaborate_Present
7704 (N : Node_Id; Val : Boolean := True); -- Flag4
7706 procedure Set_Elaboration_Boolean
7707 (N : Node_Id; Val : Node_Id); -- Node2
7709 procedure Set_Else_Actions
7710 (N : Node_Id; Val : List_Id); -- List3
7712 procedure Set_Else_Statements
7713 (N : Node_Id; Val : List_Id); -- List4
7715 procedure Set_Elsif_Parts
7716 (N : Node_Id; Val : List_Id); -- List3
7718 procedure Set_Enclosing_Variant
7719 (N : Node_Id; Val : Node_Id); -- Node2
7721 procedure Set_End_Label
7722 (N : Node_Id; Val : Node_Id); -- Node4
7724 procedure Set_End_Span
7725 (N : Node_Id; Val : Uint); -- Uint5
7727 procedure Set_Entity
7728 (N : Node_Id; Val : Node_Id); -- Node4
7730 procedure Set_Entry_Body_Formal_Part
7731 (N : Node_Id; Val : Node_Id); -- Node5
7733 procedure Set_Entry_Call_Alternative
7734 (N : Node_Id; Val : Node_Id); -- Node1
7736 procedure Set_Entry_Call_Statement
7737 (N : Node_Id; Val : Node_Id); -- Node1
7739 procedure Set_Entry_Direct_Name
7740 (N : Node_Id; Val : Node_Id); -- Node1
7742 procedure Set_Entry_Index
7743 (N : Node_Id; Val : Node_Id); -- Node5
7745 procedure Set_Entry_Index_Specification
7746 (N : Node_Id; Val : Node_Id); -- Node4
7748 procedure Set_Etype
7749 (N : Node_Id; Val : Node_Id); -- Node5
7751 procedure Set_Exception_Choices
7752 (N : Node_Id; Val : List_Id); -- List4
7754 procedure Set_Exception_Handlers
7755 (N : Node_Id; Val : List_Id); -- List5
7757 procedure Set_Exception_Junk
7758 (N : Node_Id; Val : Boolean := True); -- Flag11
7760 procedure Set_Expansion_Delayed
7761 (N : Node_Id; Val : Boolean := True); -- Flag11
7763 procedure Set_Explicit_Actual_Parameter
7764 (N : Node_Id; Val : Node_Id); -- Node3
7766 procedure Set_Explicit_Generic_Actual_Parameter
7767 (N : Node_Id; Val : Node_Id); -- Node1
7769 procedure Set_Expression
7770 (N : Node_Id; Val : Node_Id); -- Node3
7772 procedure Set_Expressions
7773 (N : Node_Id; Val : List_Id); -- List1
7775 procedure Set_First_Bit
7776 (N : Node_Id; Val : Node_Id); -- Node3
7778 procedure Set_First_Inlined_Subprogram
7779 (N : Node_Id; Val : Entity_Id); -- Node3
7781 procedure Set_First_Name
7782 (N : Node_Id; Val : Boolean := True); -- Flag5
7784 procedure Set_First_Named_Actual
7785 (N : Node_Id; Val : Node_Id); -- Node4
7787 procedure Set_First_Real_Statement
7788 (N : Node_Id; Val : Node_Id); -- Node2
7790 procedure Set_First_Subtype_Link
7791 (N : Node_Id; Val : Entity_Id); -- Node5
7793 procedure Set_Float_Truncate
7794 (N : Node_Id; Val : Boolean := True); -- Flag11
7796 procedure Set_Formal_Type_Definition
7797 (N : Node_Id; Val : Node_Id); -- Node3
7799 procedure Set_Forwards_OK
7800 (N : Node_Id; Val : Boolean := True); -- Flag5
7802 procedure Set_From_At_Mod
7803 (N : Node_Id; Val : Boolean := True); -- Flag4
7805 procedure Set_Generic_Associations
7806 (N : Node_Id; Val : List_Id); -- List3
7808 procedure Set_Generic_Formal_Declarations
7809 (N : Node_Id; Val : List_Id); -- List2
7811 procedure Set_Generic_Parent
7812 (N : Node_Id; Val : Node_Id); -- Node5
7814 procedure Set_Generic_Parent_Type
7815 (N : Node_Id; Val : Node_Id); -- Node4
7817 procedure Set_Handled_Statement_Sequence
7818 (N : Node_Id; Val : Node_Id); -- Node4
7820 procedure Set_Handler_List_Entry
7821 (N : Node_Id; Val : Node_Id); -- Node2
7823 procedure Set_Has_Created_Identifier
7824 (N : Node_Id; Val : Boolean := True); -- Flag15
7826 procedure Set_Has_Dynamic_Length_Check
7827 (N : Node_Id; Val : Boolean := True); -- Flag10
7829 procedure Set_Has_Dynamic_Range_Check
7830 (N : Node_Id; Val : Boolean := True); -- Flag12
7832 procedure Set_Has_No_Elaboration_Code
7833 (N : Node_Id; Val : Boolean := True); -- Flag17
7835 procedure Set_Has_Priority_Pragma
7836 (N : Node_Id; Val : Boolean := True); -- Flag6
7838 procedure Set_Has_Private_View
7839 (N : Node_Id; Val : Boolean := True); -- Flag11
7841 procedure Set_Has_Storage_Size_Pragma
7842 (N : Node_Id; Val : Boolean := True); -- Flag5
7844 procedure Set_Has_Task_Info_Pragma
7845 (N : Node_Id; Val : Boolean := True); -- Flag7
7847 procedure Set_Has_Task_Name_Pragma
7848 (N : Node_Id; Val : Boolean := True); -- Flag8
7850 procedure Set_Has_Wide_Character
7851 (N : Node_Id; Val : Boolean := True); -- Flag11
7853 procedure Set_Hidden_By_Use_Clause
7854 (N : Node_Id; Val : Elist_Id); -- Elist4
7856 procedure Set_High_Bound
7857 (N : Node_Id; Val : Node_Id); -- Node2
7859 procedure Set_Identifier
7860 (N : Node_Id; Val : Node_Id); -- Node1
7862 procedure Set_Implicit_With
7863 (N : Node_Id; Val : Boolean := True); -- Flag17
7865 procedure Set_In_Present
7866 (N : Node_Id; Val : Boolean := True); -- Flag15
7868 procedure Set_Includes_Infinities
7869 (N : Node_Id; Val : Boolean := True); -- Flag11
7871 procedure Set_Instance_Spec
7872 (N : Node_Id; Val : Node_Id); -- Node5
7874 procedure Set_Intval
7875 (N : Node_Id; Val : Uint); -- Uint3
7877 procedure Set_Is_Asynchronous_Call_Block
7878 (N : Node_Id; Val : Boolean := True); -- Flag7
7880 procedure Set_Is_Component_Left_Opnd
7881 (N : Node_Id; Val : Boolean := True); -- Flag13
7883 procedure Set_Is_Component_Right_Opnd
7884 (N : Node_Id; Val : Boolean := True); -- Flag14
7886 procedure Set_Is_Controlling_Actual
7887 (N : Node_Id; Val : Boolean := True); -- Flag16
7889 procedure Set_Is_Machine_Number
7890 (N : Node_Id; Val : Boolean := True); -- Flag11
7892 procedure Set_Is_Overloaded
7893 (N : Node_Id; Val : Boolean := True); -- Flag5
7895 procedure Set_Is_Power_Of_2_For_Shift
7896 (N : Node_Id; Val : Boolean := True); -- Flag13
7898 procedure Set_Is_Protected_Subprogram_Body
7899 (N : Node_Id; Val : Boolean := True); -- Flag7
7901 procedure Set_Is_Static_Expression
7902 (N : Node_Id; Val : Boolean := True); -- Flag6
7904 procedure Set_Is_Subprogram_Descriptor
7905 (N : Node_Id; Val : Boolean := True); -- Flag16
7907 procedure Set_Is_Task_Allocation_Block
7908 (N : Node_Id; Val : Boolean := True); -- Flag6
7910 procedure Set_Is_Task_Master
7911 (N : Node_Id; Val : Boolean := True); -- Flag5
7913 procedure Set_Iteration_Scheme
7914 (N : Node_Id; Val : Node_Id); -- Node2
7916 procedure Set_Itype
7917 (N : Node_Id; Val : Entity_Id); -- Node1
7919 procedure Set_Kill_Range_Check
7920 (N : Node_Id; Val : Boolean := True); -- Flag11
7922 procedure Set_Last_Bit
7923 (N : Node_Id; Val : Node_Id); -- Node4
7925 procedure Set_Last_Name
7926 (N : Node_Id; Val : Boolean := True); -- Flag6
7928 procedure Set_Library_Unit
7929 (N : Node_Id; Val : Node_Id); -- Node4
7931 procedure Set_Label_Construct
7932 (N : Node_Id; Val : Node_Id); -- Node2
7934 procedure Set_Left_Opnd
7935 (N : Node_Id; Val : Node_Id); -- Node2
7937 procedure Set_Limited_Present
7938 (N : Node_Id; Val : Boolean := True); -- Flag17
7940 procedure Set_Literals
7941 (N : Node_Id; Val : List_Id); -- List1
7943 procedure Set_Loop_Actions
7944 (N : Node_Id; Val : List_Id); -- List2
7946 procedure Set_Loop_Parameter_Specification
7947 (N : Node_Id; Val : Node_Id); -- Node4
7949 procedure Set_Low_Bound
7950 (N : Node_Id; Val : Node_Id); -- Node1
7952 procedure Set_Mod_Clause
7953 (N : Node_Id; Val : Node_Id); -- Node2
7955 procedure Set_More_Ids
7956 (N : Node_Id; Val : Boolean := True); -- Flag5
7958 procedure Set_Must_Not_Freeze
7959 (N : Node_Id; Val : Boolean := True); -- Flag8
7961 procedure Set_Name
7962 (N : Node_Id; Val : Node_Id); -- Node2
7964 procedure Set_Names
7965 (N : Node_Id; Val : List_Id); -- List2
7967 procedure Set_Next_Entity
7968 (N : Node_Id; Val : Node_Id); -- Node2
7970 procedure Set_Next_Named_Actual
7971 (N : Node_Id; Val : Node_Id); -- Node4
7973 procedure Set_Next_Rep_Item
7974 (N : Node_Id; Val : Node_Id); -- Node4
7976 procedure Set_Next_Use_Clause
7977 (N : Node_Id; Val : Node_Id); -- Node3
7979 procedure Set_No_Ctrl_Actions
7980 (N : Node_Id; Val : Boolean := True); -- Flag7
7982 procedure Set_No_Entities_Ref_In_Spec
7983 (N : Node_Id; Val : Boolean := True); -- Flag8
7985 procedure Set_No_Initialization
7986 (N : Node_Id; Val : Boolean := True); -- Flag13
7988 procedure Set_Null_Present
7989 (N : Node_Id; Val : Boolean := True); -- Flag13
7991 procedure Set_Null_Record_Present
7992 (N : Node_Id; Val : Boolean := True); -- Flag17
7994 procedure Set_Object_Definition
7995 (N : Node_Id; Val : Node_Id); -- Node4
7997 procedure Set_OK_For_Stream
7998 (N : Node_Id; Val : Boolean := True); -- Flag4
8000 procedure Set_Original_Discriminant
8001 (N : Node_Id; Val : Node_Id); -- Node2
8003 procedure Set_Others_Discrete_Choices
8004 (N : Node_Id; Val : List_Id); -- List1
8006 procedure Set_Out_Present
8007 (N : Node_Id; Val : Boolean := True); -- Flag17
8009 procedure Set_Parameter_Associations
8010 (N : Node_Id; Val : List_Id); -- List3
8012 procedure Set_Parameter_List_Truncated
8013 (N : Node_Id; Val : Boolean := True); -- Flag17
8015 procedure Set_Parameter_Specifications
8016 (N : Node_Id; Val : List_Id); -- List3
8018 procedure Set_Parameter_Type
8019 (N : Node_Id; Val : Node_Id); -- Node2
8021 procedure Set_Parent_Spec
8022 (N : Node_Id; Val : Node_Id); -- Node4
8024 procedure Set_Position
8025 (N : Node_Id; Val : Node_Id); -- Node2
8027 procedure Set_Pragma_Argument_Associations
8028 (N : Node_Id; Val : List_Id); -- List2
8030 procedure Set_Pragmas_After
8031 (N : Node_Id; Val : List_Id); -- List5
8033 procedure Set_Pragmas_Before
8034 (N : Node_Id; Val : List_Id); -- List4
8036 procedure Set_Prefix
8037 (N : Node_Id; Val : Node_Id); -- Node3
8039 procedure Set_Present_Expr
8040 (N : Node_Id; Val : Uint); -- Uint3
8042 procedure Set_Prev_Ids
8043 (N : Node_Id; Val : Boolean := True); -- Flag6
8045 procedure Set_Print_In_Hex
8046 (N : Node_Id; Val : Boolean := True); -- Flag13
8048 procedure Set_Private_Declarations
8049 (N : Node_Id; Val : List_Id); -- List3
8051 procedure Set_Private_Present
8052 (N : Node_Id; Val : Boolean := True); -- Flag15
8054 procedure Set_Procedure_To_Call
8055 (N : Node_Id; Val : Node_Id); -- Node4
8057 procedure Set_Proper_Body
8058 (N : Node_Id; Val : Node_Id); -- Node1
8060 procedure Set_Protected_Definition
8061 (N : Node_Id; Val : Node_Id); -- Node3
8063 procedure Set_Protected_Present
8064 (N : Node_Id; Val : Boolean := True); -- Flag15
8066 procedure Set_Raises_Constraint_Error
8067 (N : Node_Id; Val : Boolean := True); -- Flag7
8069 procedure Set_Range_Constraint
8070 (N : Node_Id; Val : Node_Id); -- Node4
8072 procedure Set_Range_Expression
8073 (N : Node_Id; Val : Node_Id); -- Node4
8075 procedure Set_Real_Range_Specification
8076 (N : Node_Id; Val : Node_Id); -- Node4
8078 procedure Set_Realval
8079 (N : Node_Id; Val : Ureal); -- Ureal3
8081 procedure Set_Record_Extension_Part
8082 (N : Node_Id; Val : Node_Id); -- Node3
8084 procedure Set_Redundant_Use
8085 (N : Node_Id; Val : Boolean := True); -- Flag13
8087 procedure Set_Return_Type
8088 (N : Node_Id; Val : Node_Id); -- Node2
8090 procedure Set_Reverse_Present
8091 (N : Node_Id; Val : Boolean := True); -- Flag15
8093 procedure Set_Right_Opnd
8094 (N : Node_Id; Val : Node_Id); -- Node3
8096 procedure Set_Rounded_Result
8097 (N : Node_Id; Val : Boolean := True); -- Flag18
8099 procedure Set_Scope
8100 (N : Node_Id; Val : Node_Id); -- Node3
8102 procedure Set_Select_Alternatives
8103 (N : Node_Id; Val : List_Id); -- List1
8105 procedure Set_Selector_Name
8106 (N : Node_Id; Val : Node_Id); -- Node2
8108 procedure Set_Selector_Names
8109 (N : Node_Id; Val : List_Id); -- List1
8111 procedure Set_Shift_Count_OK
8112 (N : Node_Id; Val : Boolean := True); -- Flag4
8114 procedure Set_Source_Type
8115 (N : Node_Id; Val : Entity_Id); -- Node1
8117 procedure Set_Specification
8118 (N : Node_Id; Val : Node_Id); -- Node1
8120 procedure Set_Statements
8121 (N : Node_Id; Val : List_Id); -- List3
8123 procedure Set_Static_Processing_OK
8124 (N : Node_Id; Val : Boolean); -- Flag4
8126 procedure Set_Storage_Pool
8127 (N : Node_Id; Val : Node_Id); -- Node1
8129 procedure Set_Strval
8130 (N : Node_Id; Val : String_Id); -- Str3
8132 procedure Set_Subtype_Indication
8133 (N : Node_Id; Val : Node_Id); -- Node5
8135 procedure Set_Subtype_Mark
8136 (N : Node_Id; Val : Node_Id); -- Node4
8138 procedure Set_Subtype_Marks
8139 (N : Node_Id; Val : List_Id); -- List2
8141 procedure Set_Tagged_Present
8142 (N : Node_Id; Val : Boolean := True); -- Flag15
8144 procedure Set_Target_Type
8145 (N : Node_Id; Val : Entity_Id); -- Node2
8147 procedure Set_Task_Body_Procedure
8148 (N : Node_Id; Val : Entity_Id); -- Node2
8150 procedure Set_Task_Definition
8151 (N : Node_Id; Val : Node_Id); -- Node3
8153 procedure Set_Then_Actions
8154 (N : Node_Id; Val : List_Id); -- List2
8156 procedure Set_Then_Statements
8157 (N : Node_Id; Val : List_Id); -- List2
8159 procedure Set_Treat_Fixed_As_Integer
8160 (N : Node_Id; Val : Boolean := True); -- Flag14
8162 procedure Set_Triggering_Alternative
8163 (N : Node_Id; Val : Node_Id); -- Node1
8165 procedure Set_Triggering_Statement
8166 (N : Node_Id; Val : Node_Id); -- Node1
8168 procedure Set_TSS_Elist
8169 (N : Node_Id; Val : Elist_Id); -- Elist3
8171 procedure Set_Type_Definition
8172 (N : Node_Id; Val : Node_Id); -- Node3
8174 procedure Set_Unit
8175 (N : Node_Id; Val : Node_Id); -- Node2
8177 procedure Set_Unknown_Discriminants_Present
8178 (N : Node_Id; Val : Boolean := True); -- Flag13
8180 procedure Set_Unreferenced_In_Spec
8181 (N : Node_Id; Val : Boolean := True); -- Flag7
8183 procedure Set_Variant_Part
8184 (N : Node_Id; Val : Node_Id); -- Node4
8186 procedure Set_Variants
8187 (N : Node_Id; Val : List_Id); -- List1
8189 procedure Set_Visible_Declarations
8190 (N : Node_Id; Val : List_Id); -- List2
8192 procedure Set_Was_Originally_Stub
8193 (N : Node_Id; Val : Boolean := True); -- Flag13
8195 procedure Set_Zero_Cost_Handling
8196 (N : Node_Id; Val : Boolean := True); -- Flag5
8198 -------------------------
8199 -- Iterator Procedures --
8200 -------------------------
8202 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
8204 procedure Next_Entity (N : in out Node_Id);
8205 procedure Next_Named_Actual (N : in out Node_Id);
8206 procedure Next_Rep_Item (N : in out Node_Id);
8207 procedure Next_Use_Clause (N : in out Node_Id);
8209 --------------------------------------
8210 -- Logical Access to End_Span Field --
8211 --------------------------------------
8213 function End_Location (N : Node_Id) return Source_Ptr;
8214 -- N is an N_If_Statement or N_Case_Statement node, and this
8215 -- function returns the location of the IF token in the END IF
8216 -- sequence by translating the value of the End_Span field.
8218 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
8219 -- N is an N_If_Statement or N_Case_Statement node. This procedure
8220 -- sets the End_Span field to correspond to the given value S. In
8221 -- other words, End_Span is set to the difference between S and
8222 -- Sloc (N), the starting location.
8224 --------------------
8225 -- Inline Pragmas --
8226 --------------------
8228 pragma Inline (ABE_Is_Certain);
8229 pragma Inline (Abort_Present);
8230 pragma Inline (Abortable_Part);
8231 pragma Inline (Abstract_Present);
8232 pragma Inline (Accept_Handler_Records);
8233 pragma Inline (Accept_Statement);
8234 pragma Inline (Access_Types_To_Process);
8235 pragma Inline (Actions);
8236 pragma Inline (Activation_Chain_Entity);
8237 pragma Inline (Acts_As_Spec);
8238 pragma Inline (Aggregate_Bounds);
8239 pragma Inline (Aliased_Present);
8240 pragma Inline (All_Others);
8241 pragma Inline (All_Present);
8242 pragma Inline (Alternatives);
8243 pragma Inline (Ancestor_Part);
8244 pragma Inline (Array_Aggregate);
8245 pragma Inline (Assignment_OK);
8246 pragma Inline (Associated_Node);
8247 pragma Inline (At_End_Proc);
8248 pragma Inline (Attribute_Name);
8249 pragma Inline (Aux_Decls_Node);
8250 pragma Inline (Backwards_OK);
8251 pragma Inline (Bad_Is_Detected);
8252 pragma Inline (Body_To_Inline);
8253 pragma Inline (Body_Required);
8254 pragma Inline (By_Ref);
8255 pragma Inline (Box_Present);
8256 pragma Inline (Char_Literal_Value);
8257 pragma Inline (Chars);
8258 pragma Inline (Choice_Parameter);
8259 pragma Inline (Choices);
8260 pragma Inline (Compile_Time_Known_Aggregate);
8261 pragma Inline (Component_Associations);
8262 pragma Inline (Component_Clauses);
8263 pragma Inline (Component_Items);
8264 pragma Inline (Component_List);
8265 pragma Inline (Component_Name);
8266 pragma Inline (Condition);
8267 pragma Inline (Condition_Actions);
8268 pragma Inline (Constant_Present);
8269 pragma Inline (Constraint);
8270 pragma Inline (Constraints);
8271 pragma Inline (Context_Installed);
8272 pragma Inline (Context_Items);
8273 pragma Inline (Controlling_Argument);
8274 pragma Inline (Conversion_OK);
8275 pragma Inline (Corresponding_Body);
8276 pragma Inline (Corresponding_Generic_Association);
8277 pragma Inline (Corresponding_Integer_Value);
8278 pragma Inline (Corresponding_Spec);
8279 pragma Inline (Corresponding_Stub);
8280 pragma Inline (Dcheck_Function);
8281 pragma Inline (Debug_Statement);
8282 pragma Inline (Declarations);
8283 pragma Inline (Default_Expression);
8284 pragma Inline (Default_Name);
8285 pragma Inline (Defining_Identifier);
8286 pragma Inline (Defining_Unit_Name);
8287 pragma Inline (Delay_Alternative);
8288 pragma Inline (Delay_Finalize_Attach);
8289 pragma Inline (Delay_Statement);
8290 pragma Inline (Delta_Expression);
8291 pragma Inline (Digits_Expression);
8292 pragma Inline (Discr_Check_Funcs_Built);
8293 pragma Inline (Discrete_Choices);
8294 pragma Inline (Discrete_Range);
8295 pragma Inline (Discrete_Subtype_Definition);
8296 pragma Inline (Discrete_Subtype_Definitions);
8297 pragma Inline (Discriminant_Specifications);
8298 pragma Inline (Discriminant_Type);
8299 pragma Inline (Do_Access_Check);
8300 pragma Inline (Do_Accessibility_Check);
8301 pragma Inline (Do_Discriminant_Check);
8302 pragma Inline (Do_Length_Check);
8303 pragma Inline (Do_Division_Check);
8304 pragma Inline (Do_Overflow_Check);
8305 pragma Inline (Do_Range_Check);
8306 pragma Inline (Do_Storage_Check);
8307 pragma Inline (Do_Tag_Check);
8308 pragma Inline (Elaborate_Present);
8309 pragma Inline (Elaborate_All_Present);
8310 pragma Inline (Elaboration_Boolean);
8311 pragma Inline (Else_Actions);
8312 pragma Inline (Else_Statements);
8313 pragma Inline (Elsif_Parts);
8314 pragma Inline (Enclosing_Variant);
8315 pragma Inline (End_Label);
8316 pragma Inline (End_Span);
8317 pragma Inline (Entity);
8318 pragma Inline (Entry_Body_Formal_Part);
8319 pragma Inline (Entry_Call_Alternative);
8320 pragma Inline (Entry_Call_Statement);
8321 pragma Inline (Entry_Direct_Name);
8322 pragma Inline (Entry_Index);
8323 pragma Inline (Entry_Index_Specification);
8324 pragma Inline (Etype);
8325 pragma Inline (Exception_Choices);
8326 pragma Inline (Exception_Junk);
8327 pragma Inline (Exception_Handlers);
8328 pragma Inline (Expansion_Delayed);
8329 pragma Inline (Explicit_Actual_Parameter);
8330 pragma Inline (Explicit_Generic_Actual_Parameter);
8331 pragma Inline (Expression);
8332 pragma Inline (Expressions);
8333 pragma Inline (First_Bit);
8334 pragma Inline (First_Inlined_Subprogram);
8335 pragma Inline (First_Name);
8336 pragma Inline (First_Named_Actual);
8337 pragma Inline (First_Real_Statement);
8338 pragma Inline (First_Subtype_Link);
8339 pragma Inline (Float_Truncate);
8340 pragma Inline (Formal_Type_Definition);
8341 pragma Inline (Forwards_OK);
8342 pragma Inline (From_At_Mod);
8343 pragma Inline (Generic_Associations);
8344 pragma Inline (Generic_Formal_Declarations);
8345 pragma Inline (Generic_Parent);
8346 pragma Inline (Generic_Parent_Type);
8347 pragma Inline (Handled_Statement_Sequence);
8348 pragma Inline (Handler_List_Entry);
8349 pragma Inline (Has_Created_Identifier);
8350 pragma Inline (Has_Dynamic_Length_Check);
8351 pragma Inline (Has_Dynamic_Range_Check);
8352 pragma Inline (Has_No_Elaboration_Code);
8353 pragma Inline (Has_Priority_Pragma);
8354 pragma Inline (Has_Private_View);
8355 pragma Inline (Has_Storage_Size_Pragma);
8356 pragma Inline (Has_Task_Info_Pragma);
8357 pragma Inline (Has_Task_Name_Pragma);
8358 pragma Inline (Has_Wide_Character);
8359 pragma Inline (Hidden_By_Use_Clause);
8360 pragma Inline (High_Bound);
8361 pragma Inline (Identifier);
8362 pragma Inline (Implicit_With);
8363 pragma Inline (Includes_Infinities);
8364 pragma Inline (In_Present);
8365 pragma Inline (Instance_Spec);
8366 pragma Inline (Intval);
8367 pragma Inline (Is_Asynchronous_Call_Block);
8368 pragma Inline (Is_Component_Left_Opnd);
8369 pragma Inline (Is_Component_Right_Opnd);
8370 pragma Inline (Is_Controlling_Actual);
8371 pragma Inline (Is_Machine_Number);
8372 pragma Inline (Is_Overloaded);
8373 pragma Inline (Is_Power_Of_2_For_Shift);
8374 pragma Inline (Is_Protected_Subprogram_Body);
8375 pragma Inline (Is_Static_Expression);
8376 pragma Inline (Is_Subprogram_Descriptor);
8377 pragma Inline (Is_Task_Allocation_Block);
8378 pragma Inline (Is_Task_Master);
8379 pragma Inline (Iteration_Scheme);
8380 pragma Inline (Itype);
8381 pragma Inline (Kill_Range_Check);
8382 pragma Inline (Last_Bit);
8383 pragma Inline (Last_Name);
8384 pragma Inline (Library_Unit);
8385 pragma Inline (Label_Construct);
8386 pragma Inline (Left_Opnd);
8387 pragma Inline (Limited_Present);
8388 pragma Inline (Literals);
8389 pragma Inline (Loop_Actions);
8390 pragma Inline (Loop_Parameter_Specification);
8391 pragma Inline (Low_Bound);
8392 pragma Inline (Mod_Clause);
8393 pragma Inline (More_Ids);
8394 pragma Inline (Must_Not_Freeze);
8395 pragma Inline (Name);
8396 pragma Inline (Names);
8397 pragma Inline (Next_Entity);
8398 pragma Inline (Next_Named_Actual);
8399 pragma Inline (Next_Rep_Item);
8400 pragma Inline (Next_Use_Clause);
8401 pragma Inline (No_Ctrl_Actions);
8402 pragma Inline (No_Entities_Ref_In_Spec);
8403 pragma Inline (No_Initialization);
8404 pragma Inline (Null_Present);
8405 pragma Inline (Null_Record_Present);
8406 pragma Inline (Object_Definition);
8407 pragma Inline (OK_For_Stream);
8408 pragma Inline (Original_Discriminant);
8409 pragma Inline (Others_Discrete_Choices);
8410 pragma Inline (Out_Present);
8411 pragma Inline (Parameter_Associations);
8412 pragma Inline (Parameter_Specifications);
8413 pragma Inline (Parameter_List_Truncated);
8414 pragma Inline (Parameter_Type);
8415 pragma Inline (Parent_Spec);
8416 pragma Inline (Position);
8417 pragma Inline (Pragma_Argument_Associations);
8418 pragma Inline (Pragmas_After);
8419 pragma Inline (Pragmas_Before);
8420 pragma Inline (Prefix);
8421 pragma Inline (Present_Expr);
8422 pragma Inline (Prev_Ids);
8423 pragma Inline (Print_In_Hex);
8424 pragma Inline (Private_Declarations);
8425 pragma Inline (Private_Present);
8426 pragma Inline (Procedure_To_Call);
8427 pragma Inline (Proper_Body);
8428 pragma Inline (Protected_Definition);
8429 pragma Inline (Protected_Present);
8430 pragma Inline (Raises_Constraint_Error);
8431 pragma Inline (Range_Constraint);
8432 pragma Inline (Range_Expression);
8433 pragma Inline (Realval);
8434 pragma Inline (Real_Range_Specification);
8435 pragma Inline (Record_Extension_Part);
8436 pragma Inline (Redundant_Use);
8437 pragma Inline (Return_Type);
8438 pragma Inline (Reverse_Present);
8439 pragma Inline (Right_Opnd);
8440 pragma Inline (Rounded_Result);
8441 pragma Inline (Scope);
8442 pragma Inline (Select_Alternatives);
8443 pragma Inline (Selector_Name);
8444 pragma Inline (Selector_Names);
8445 pragma Inline (Shift_Count_OK);
8446 pragma Inline (Source_Type);
8447 pragma Inline (Specification);
8448 pragma Inline (Statements);
8449 pragma Inline (Static_Processing_OK);
8450 pragma Inline (Storage_Pool);
8451 pragma Inline (Strval);
8452 pragma Inline (Subtype_Indication);
8453 pragma Inline (Subtype_Mark);
8454 pragma Inline (Subtype_Marks);
8455 pragma Inline (Tagged_Present);
8456 pragma Inline (Target_Type);
8457 pragma Inline (Task_Body_Procedure);
8458 pragma Inline (Task_Definition);
8459 pragma Inline (Then_Actions);
8460 pragma Inline (Then_Statements);
8461 pragma Inline (Triggering_Alternative);
8462 pragma Inline (Triggering_Statement);
8463 pragma Inline (Treat_Fixed_As_Integer);
8464 pragma Inline (TSS_Elist);
8465 pragma Inline (Type_Definition);
8466 pragma Inline (Unit);
8467 pragma Inline (Unknown_Discriminants_Present);
8468 pragma Inline (Unreferenced_In_Spec);
8469 pragma Inline (Variant_Part);
8470 pragma Inline (Variants);
8471 pragma Inline (Visible_Declarations);
8472 pragma Inline (Was_Originally_Stub);
8473 pragma Inline (Zero_Cost_Handling);
8475 pragma Inline (Set_ABE_Is_Certain);
8476 pragma Inline (Set_Abort_Present);
8477 pragma Inline (Set_Abortable_Part);
8478 pragma Inline (Set_Abstract_Present);
8479 pragma Inline (Set_Accept_Handler_Records);
8480 pragma Inline (Set_Accept_Statement);
8481 pragma Inline (Set_Access_Types_To_Process);
8482 pragma Inline (Set_Actions);
8483 pragma Inline (Set_Activation_Chain_Entity);
8484 pragma Inline (Set_Acts_As_Spec);
8485 pragma Inline (Set_Aggregate_Bounds);
8486 pragma Inline (Set_Aliased_Present);
8487 pragma Inline (Set_All_Others);
8488 pragma Inline (Set_All_Present);
8489 pragma Inline (Set_Alternatives);
8490 pragma Inline (Set_Ancestor_Part);
8491 pragma Inline (Set_Array_Aggregate);
8492 pragma Inline (Set_Assignment_OK);
8493 pragma Inline (Set_Associated_Node);
8494 pragma Inline (Set_At_End_Proc);
8495 pragma Inline (Set_Attribute_Name);
8496 pragma Inline (Set_Aux_Decls_Node);
8497 pragma Inline (Set_Backwards_OK);
8498 pragma Inline (Set_Bad_Is_Detected);
8499 pragma Inline (Set_Body_To_Inline);
8500 pragma Inline (Set_Body_Required);
8501 pragma Inline (Set_By_Ref);
8502 pragma Inline (Set_Box_Present);
8503 pragma Inline (Set_Char_Literal_Value);
8504 pragma Inline (Set_Chars);
8505 pragma Inline (Set_Choice_Parameter);
8506 pragma Inline (Set_Choices);
8507 pragma Inline (Set_Compile_Time_Known_Aggregate);
8508 pragma Inline (Set_Component_Associations);
8509 pragma Inline (Set_Component_Clauses);
8510 pragma Inline (Set_Component_Items);
8511 pragma Inline (Set_Component_List);
8512 pragma Inline (Set_Component_Name);
8513 pragma Inline (Set_Condition);
8514 pragma Inline (Set_Condition_Actions);
8515 pragma Inline (Set_Constant_Present);
8516 pragma Inline (Set_Constraint);
8517 pragma Inline (Set_Constraints);
8518 pragma Inline (Set_Context_Installed);
8519 pragma Inline (Set_Context_Items);
8520 pragma Inline (Set_Controlling_Argument);
8521 pragma Inline (Set_Conversion_OK);
8522 pragma Inline (Set_Corresponding_Body);
8523 pragma Inline (Set_Corresponding_Generic_Association);
8524 pragma Inline (Set_Corresponding_Integer_Value);
8525 pragma Inline (Set_Corresponding_Spec);
8526 pragma Inline (Set_Corresponding_Stub);
8527 pragma Inline (Set_Dcheck_Function);
8528 pragma Inline (Set_Debug_Statement);
8529 pragma Inline (Set_Declarations);
8530 pragma Inline (Set_Default_Expression);
8531 pragma Inline (Set_Default_Name);
8532 pragma Inline (Set_Defining_Identifier);
8533 pragma Inline (Set_Defining_Unit_Name);
8534 pragma Inline (Set_Delay_Alternative);
8535 pragma Inline (Set_Delay_Finalize_Attach);
8536 pragma Inline (Set_Delay_Statement);
8537 pragma Inline (Set_Delta_Expression);
8538 pragma Inline (Set_Digits_Expression);
8539 pragma Inline (Set_Discr_Check_Funcs_Built);
8540 pragma Inline (Set_Discrete_Choices);
8541 pragma Inline (Set_Discrete_Range);
8542 pragma Inline (Set_Discrete_Subtype_Definition);
8543 pragma Inline (Set_Discrete_Subtype_Definitions);
8544 pragma Inline (Set_Discriminant_Specifications);
8545 pragma Inline (Set_Discriminant_Type);
8546 pragma Inline (Set_Do_Access_Check);
8547 pragma Inline (Set_Do_Accessibility_Check);
8548 pragma Inline (Set_Do_Discriminant_Check);
8549 pragma Inline (Set_Do_Length_Check);
8550 pragma Inline (Set_Do_Division_Check);
8551 pragma Inline (Set_Do_Overflow_Check);
8552 pragma Inline (Set_Do_Range_Check);
8553 pragma Inline (Set_Do_Storage_Check);
8554 pragma Inline (Set_Do_Tag_Check);
8555 pragma Inline (Set_Elaborate_Present);
8556 pragma Inline (Set_Elaborate_All_Present);
8557 pragma Inline (Set_Elaboration_Boolean);
8558 pragma Inline (Set_Else_Actions);
8559 pragma Inline (Set_Else_Statements);
8560 pragma Inline (Set_Elsif_Parts);
8561 pragma Inline (Set_Enclosing_Variant);
8562 pragma Inline (Set_End_Label);
8563 pragma Inline (Set_End_Span);
8564 pragma Inline (Set_Entity);
8565 pragma Inline (Set_Entry_Body_Formal_Part);
8566 pragma Inline (Set_Entry_Call_Alternative);
8567 pragma Inline (Set_Entry_Call_Statement);
8568 pragma Inline (Set_Entry_Direct_Name);
8569 pragma Inline (Set_Entry_Index);
8570 pragma Inline (Set_Entry_Index_Specification);
8571 pragma Inline (Set_Etype);
8572 pragma Inline (Set_Exception_Choices);
8573 pragma Inline (Set_Exception_Junk);
8574 pragma Inline (Set_Exception_Handlers);
8575 pragma Inline (Set_Expansion_Delayed);
8576 pragma Inline (Set_Explicit_Actual_Parameter);
8577 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
8578 pragma Inline (Set_Expression);
8579 pragma Inline (Set_Expressions);
8580 pragma Inline (Set_First_Bit);
8581 pragma Inline (Set_First_Inlined_Subprogram);
8582 pragma Inline (Set_First_Name);
8583 pragma Inline (Set_First_Named_Actual);
8584 pragma Inline (Set_First_Real_Statement);
8585 pragma Inline (Set_First_Subtype_Link);
8586 pragma Inline (Set_Float_Truncate);
8587 pragma Inline (Set_Formal_Type_Definition);
8588 pragma Inline (Set_Forwards_OK);
8589 pragma Inline (Set_From_At_Mod);
8590 pragma Inline (Set_Generic_Associations);
8591 pragma Inline (Set_Generic_Formal_Declarations);
8592 pragma Inline (Set_Generic_Parent);
8593 pragma Inline (Set_Generic_Parent_Type);
8594 pragma Inline (Set_Handled_Statement_Sequence);
8595 pragma Inline (Set_Handler_List_Entry);
8596 pragma Inline (Set_Has_Created_Identifier);
8597 pragma Inline (Set_Has_Dynamic_Length_Check);
8598 pragma Inline (Set_Has_Dynamic_Range_Check);
8599 pragma Inline (Set_Has_No_Elaboration_Code);
8600 pragma Inline (Set_Has_Priority_Pragma);
8601 pragma Inline (Set_Has_Private_View);
8602 pragma Inline (Set_Has_Storage_Size_Pragma);
8603 pragma Inline (Set_Has_Task_Info_Pragma);
8604 pragma Inline (Set_Has_Task_Name_Pragma);
8605 pragma Inline (Set_Has_Wide_Character);
8606 pragma Inline (Set_Hidden_By_Use_Clause);
8607 pragma Inline (Set_High_Bound);
8608 pragma Inline (Set_Identifier);
8609 pragma Inline (Set_Implicit_With);
8610 pragma Inline (Set_Includes_Infinities);
8611 pragma Inline (Set_In_Present);
8612 pragma Inline (Set_Instance_Spec);
8613 pragma Inline (Set_Intval);
8614 pragma Inline (Set_Is_Asynchronous_Call_Block);
8615 pragma Inline (Set_Is_Component_Left_Opnd);
8616 pragma Inline (Set_Is_Component_Right_Opnd);
8617 pragma Inline (Set_Is_Controlling_Actual);
8618 pragma Inline (Set_Is_Machine_Number);
8619 pragma Inline (Set_Is_Overloaded);
8620 pragma Inline (Set_Is_Power_Of_2_For_Shift);
8621 pragma Inline (Set_Is_Protected_Subprogram_Body);
8622 pragma Inline (Set_Is_Static_Expression);
8623 pragma Inline (Set_Is_Subprogram_Descriptor);
8624 pragma Inline (Set_Is_Task_Allocation_Block);
8625 pragma Inline (Set_Is_Task_Master);
8626 pragma Inline (Set_Iteration_Scheme);
8627 pragma Inline (Set_Itype);
8628 pragma Inline (Set_Kill_Range_Check);
8629 pragma Inline (Set_Last_Bit);
8630 pragma Inline (Set_Last_Name);
8631 pragma Inline (Set_Library_Unit);
8632 pragma Inline (Set_Label_Construct);
8633 pragma Inline (Set_Left_Opnd);
8634 pragma Inline (Set_Limited_Present);
8635 pragma Inline (Set_Literals);
8636 pragma Inline (Set_Loop_Actions);
8637 pragma Inline (Set_Loop_Parameter_Specification);
8638 pragma Inline (Set_Low_Bound);
8639 pragma Inline (Set_Mod_Clause);
8640 pragma Inline (Set_More_Ids);
8641 pragma Inline (Set_Must_Not_Freeze);
8642 pragma Inline (Set_Name);
8643 pragma Inline (Set_Names);
8644 pragma Inline (Set_Next_Entity);
8645 pragma Inline (Set_Next_Named_Actual);
8646 pragma Inline (Set_Next_Use_Clause);
8647 pragma Inline (Set_No_Ctrl_Actions);
8648 pragma Inline (Set_No_Entities_Ref_In_Spec);
8649 pragma Inline (Set_No_Initialization);
8650 pragma Inline (Set_Null_Present);
8651 pragma Inline (Set_Null_Record_Present);
8652 pragma Inline (Set_Object_Definition);
8653 pragma Inline (Set_OK_For_Stream);
8654 pragma Inline (Set_Original_Discriminant);
8655 pragma Inline (Set_Others_Discrete_Choices);
8656 pragma Inline (Set_Out_Present);
8657 pragma Inline (Set_Parameter_Associations);
8658 pragma Inline (Set_Parameter_Specifications);
8659 pragma Inline (Set_Parameter_List_Truncated);
8660 pragma Inline (Set_Parameter_Type);
8661 pragma Inline (Set_Parent_Spec);
8662 pragma Inline (Set_Position);
8663 pragma Inline (Set_Pragma_Argument_Associations);
8664 pragma Inline (Set_Pragmas_After);
8665 pragma Inline (Set_Pragmas_Before);
8666 pragma Inline (Set_Prefix);
8667 pragma Inline (Set_Present_Expr);
8668 pragma Inline (Set_Prev_Ids);
8669 pragma Inline (Set_Print_In_Hex);
8670 pragma Inline (Set_Private_Declarations);
8671 pragma Inline (Set_Private_Present);
8672 pragma Inline (Set_Procedure_To_Call);
8673 pragma Inline (Set_Proper_Body);
8674 pragma Inline (Set_Protected_Definition);
8675 pragma Inline (Set_Protected_Present);
8676 pragma Inline (Set_Raises_Constraint_Error);
8677 pragma Inline (Set_Range_Constraint);
8678 pragma Inline (Set_Range_Expression);
8679 pragma Inline (Set_Realval);
8680 pragma Inline (Set_Real_Range_Specification);
8681 pragma Inline (Set_Record_Extension_Part);
8682 pragma Inline (Set_Redundant_Use);
8683 pragma Inline (Set_Return_Type);
8684 pragma Inline (Set_Reverse_Present);
8685 pragma Inline (Set_Right_Opnd);
8686 pragma Inline (Set_Rounded_Result);
8687 pragma Inline (Set_Scope);
8688 pragma Inline (Set_Select_Alternatives);
8689 pragma Inline (Set_Selector_Name);
8690 pragma Inline (Set_Selector_Names);
8691 pragma Inline (Set_Shift_Count_OK);
8692 pragma Inline (Set_Source_Type);
8693 pragma Inline (Set_Specification);
8694 pragma Inline (Set_Statements);
8695 pragma Inline (Set_Static_Processing_OK);
8696 pragma Inline (Set_Storage_Pool);
8697 pragma Inline (Set_Strval);
8698 pragma Inline (Set_Subtype_Indication);
8699 pragma Inline (Set_Subtype_Mark);
8700 pragma Inline (Set_Subtype_Marks);
8701 pragma Inline (Set_Tagged_Present);
8702 pragma Inline (Set_Target_Type);
8703 pragma Inline (Set_Task_Body_Procedure);
8704 pragma Inline (Set_Task_Definition);
8705 pragma Inline (Set_Then_Actions);
8706 pragma Inline (Set_Then_Statements);
8707 pragma Inline (Set_Triggering_Alternative);
8708 pragma Inline (Set_Triggering_Statement);
8709 pragma Inline (Set_Treat_Fixed_As_Integer);
8710 pragma Inline (Set_TSS_Elist);
8711 pragma Inline (Set_Type_Definition);
8712 pragma Inline (Set_Unit);
8713 pragma Inline (Set_Unknown_Discriminants_Present);
8714 pragma Inline (Set_Unreferenced_In_Spec);
8715 pragma Inline (Set_Variant_Part);
8716 pragma Inline (Set_Variants);
8717 pragma Inline (Set_Visible_Declarations);
8718 pragma Inline (Set_Was_Originally_Stub);
8719 pragma Inline (Set_Zero_Cost_Handling);
8721 end Sinfo;