* combine.c (apply_distributive_law): Correct comment.
[official-gcc.git] / gcc / ada / sinfo.ads
blob7f3fe5cf6c4cc9331b4d4b168889527533302293
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S I N F O --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2002, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
20 -- MA 02111-1307, USA. --
21 -- --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
28 -- --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
31 -- --
32 ------------------------------------------------------------------------------
34 -- This package defines the structure of the abstract syntax tree. The Tree
35 -- package provides a basic tree structure. Sinfo describes how this
36 -- structure is used to represent the syntax of an Ada program.
38 -- Note: the grammar used here is taken from Version 5.95 of the RM, dated
39 -- November 1994. The grammar in the RM is followed very closely in the tree
40 -- design, and is repeated as part of this source file.
42 -- The tree contains not only the full syntactic representation of the
43 -- program, but also the results of semantic analysis. In particular, the
44 -- nodes for defining identifiers, defining character literals and defining
45 -- operator symbols, collectively referred to as entities, represent what
46 -- would normally be regarded as the symbol table information. In addition
47 -- a number of the tree nodes contain semantic information.
49 -- WARNING: There is a C version of this package. Any changes to this
50 -- source file must be properly reflected in this C header file sinfo.h
51 -- which is created automatically from sinfo.ads using xsinfo.spt.
53 with Types; use Types;
54 with Uintp; use Uintp;
55 with Urealp; use Urealp;
57 package Sinfo is
59 ---------------------------------
60 -- Making Changes to This File --
61 ---------------------------------
63 -- If changes are made to this file, a number of related steps must be
64 -- carried out to ensure consistency. First, if a field access function
65 -- is added, it appears in seven places:
67 -- The documentation associated with the node
68 -- The spec of the access function in sinfo.ads
69 -- The body of the access function in sinfo.adb
70 -- The pragma Inline at the end of sinfo.ads for the access function
71 -- The spec of the set procedure in sinfo.ads
72 -- The body of the set procedure in sinfo.adb
73 -- The pragma Inline at the end of sinfo.ads for the set procedure
75 -- The field chosen must be consistent in all places, and, for a node
76 -- that is a subexpression, must not overlap any of the standard
77 -- expression fields. In the body, the calls to the Dcheck_Node debug
78 -- procedure will need cross-references adding in alphabetical order.
80 -- In addition, if any of the standard expression fields is changed, then
81 -- the utiliy program which creates the Treeprs spec (in file treeprs.ads)
82 -- must be updated appropriately, since it special cases expression fields.
84 -- If a new tree node is added, then the following changes are made
86 -- Add it to the documentation in the appropriate place
87 -- Add its fields to this documentation section
88 -- Define it in the appropriate classification in Node_Kind
89 -- In the body (sinfo), add entries to the Dcheck calls for all
90 -- its fields (except standard expression fields) to include
91 -- the new node in the debug cross-reference list
92 -- Add an appropriate section to the case statement in sprint.adb
93 -- Add an appropriate section to the case statement in sem.adb
94 -- Add an appropraite section to the case statement in exp_util.adb
95 -- (Insert_Actions procedure)
96 -- For a subexpression, add an appropriate sections to the case
97 -- statement in sem_eval.adb
98 -- For a subexpression, add an appropriate sections to the case
99 -- statement in sem_res.adb
101 -- Finally, four utility programs must be run:
103 -- Run CSinfo to check that you have made the changes consistently.
104 -- It checks most of the rules given above, with clear error messages.
105 -- This utility reads sinfo.ads and sinfo.adb and generates a report
106 -- to standard output.
108 -- Run XSinfo to create a-sinfo.h, the corresponding C header. This
109 -- utility reads sinfo.ads and generates a-sinfo.h. Note that it
110 -- does not need to read sinfo.adb, since the contents of the body
111 -- are algorithmically determinable from the spec.
113 -- Run XTreeprs to create treeprs.ads, an updated version of
114 -- the module that is used to drive the tree print routine. This
115 -- utility reads (but does not modify) treeprs.adt, the template
116 -- that provides the basic structure of the file, and then fills
117 -- in the data from the comments in sinfo.ads.
119 -- Run XNmake to create nmake.ads and nmake.adb, the package body
120 -- and spec of the Nmake package which contains functions for
121 -- constructing nodes.
123 -- Note: sometime we could write a utility that actually generated the
124 -- body of sinfo from the spec instead of simply checking it, since, as
125 -- noted above, the contents of the body can be determined from the spec.
127 --------------------------------
128 -- Implicit Nodes in the Tree --
129 --------------------------------
131 -- Generally the structure of the tree very closely follows the grammar
132 -- as defined in the RM. However, certain nodes are omitted to save
133 -- space and simplify semantic processing. Two general classes of such
134 -- omitted nodes are as follows:
136 -- If the only possibilities for a non-terminal are one or more other
137 -- non terminals (i.e. the rule is a "skinny" rule), then usually the
138 -- corresponding node is omitted from the tree, and the target construct
139 -- appears directly. For example, a real type definition is either a
140 -- floating point definition or a fixed point definition. No explicit
141 -- node appears for real type definition. Instead either the floating
142 -- point definition or fixed point definition appears directly.
144 -- If a non-terminal corresponds to a list of some other non-terminal
145 -- (possibly with separating punctuation), then usually it is omitted
146 -- from the tree, and a list of components appears instead. For
147 -- example, sequence of statements does not appear explicitly in the
148 -- tree. Instead a list of statements appears directly.
150 -- Some additional cases of omitted nodes occur and are documented
151 -- individually. In particular, many nodes are omitted in the tree
152 -- generated for an expression.
154 -------------------------------------------
155 -- Handling of Defining Identifier Lists --
156 -------------------------------------------
158 -- In several declarative forms in the syntax, lists of defining
159 -- identifiers appear (object declarations, component declarations,
160 -- number declarations etc.)
162 -- The semantics of such statements are equivalent to a series of
163 -- identical declarations of single defining identifiers (except that
164 -- conformance checks require the same grouping of identifiers in the
165 -- parameter case).
167 -- To simplify semantic processing, the parser breaks down such multiple
168 -- declaration cases into sequences of single declarations, duplicating
169 -- type and initialization information as required. The flags More_Ids
170 -- and Prev_Ids are used to record the original form of the source in
171 -- the case where the original source used a list of names, More_Ids
172 -- being set on all but the last name and Prev_Ids being set on all
173 -- but the first name. These flags are used to reconstruct the original
174 -- source (e.g. in the Sprint package), and also are included in the
175 -- conformance checks, but otherwise have no semantic significance.
177 -- Note: the reason that we use More_Ids and Prev_Ids rather than
178 -- First_Name and Last_Name flags is so that the flags are off in the
179 -- normal one identifier case, which minimizes tree print output.
181 -----------------------
182 -- Use of Node Lists --
183 -----------------------
185 -- With a few exceptions, if a construction of the form {non-terminal}
186 -- appears in the tree, lists are used in the corresponding tree node
187 -- (see package Nlists for handling of node lists). In this case a field
188 -- of the parent node points to a list of nodes for the non-terminal. The
189 -- field name for such fields has a plural name which always ends in "s".
190 -- For example, a case statement has a field Alternatives pointing to a
191 -- list of case statement alternative nodes.
193 -- Only fields pointing to lists have names ending in "s", so generally
194 -- the structure is strongly typed, fields not ending in s point to
195 -- single nodes, and fields ending in s point to lists.
197 -- The following example shows how a traversal of a list is written. We
198 -- suppose here that Stmt points to a N_Case_Statement node which has
199 -- a list field called Alternatives:
201 -- Alt := First (Alternatives (Stmt));
202 -- while Present (Alt) loop
203 -- ..
204 -- -- processing for case statement alternative Alt
205 -- ..
206 -- Alt := Next (Alt);
207 -- end loop;
209 -- The Present function tests for Empty, which in this case signals the
210 -- end of the list. First returns Empty immediately if the list is empty.
211 -- Present is defined in Atree, First and Next are defined in Nlists.
213 -- The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
214 -- contexts, which is handled as described in the previous section, and
215 -- with {,library_unit_NAME} in the N_With_Clause mode, which is handled
216 -- using the First_Name and Last_Name flags, as further detailed in the
217 -- description of the N_With_Clause node.
219 -------------
220 -- Pragmas --
221 -------------
223 -- Pragmas can appear in many different context, but are not included
224 -- in the grammar. Still they must appear in the tree, so they can be
225 -- properly processed.
227 -- Two approaches are used. In some cases, an extra field is defined
228 -- in an appropriate node that contains a list of pragmas appearing
229 -- in the expected context. For example pragmas can appear before an
230 -- Accept_Alternative in a Selective_Accept_Statement, and these pragmas
231 -- appear in the Pragmas_Before field of the N_Accept_Alternative node.
233 -- The other approach is to simply allow pragmas to appear in syntactic
234 -- lists where the grammar (of course) does not include the possibility.
235 -- For example, the Variants field of an N_Variant_Part node points to
236 -- a list that can contain both N_Pragma and N_Variant nodes.
238 -- To make processing easier in the latter case, the Nlists package
239 -- provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
240 -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be
241 -- handled ignoring all pragmas.
243 -- In the case of the variants list, we can either write:
245 -- Variant := First (Variants (N));
246 -- while Present (Variant) loop
247 -- ...
248 -- Alt := Next (Alt);
249 -- end loop;
251 -- or
253 -- Variant := First_Non_Pragma (Variants (N));
254 -- while Present (Variant) loop
255 -- ...
256 -- Alt := Next_Non_Pragma (Alt);
257 -- end loop;
259 -- In the first form of the loop, Variant can either be an N_Pragma or
260 -- an N_Variant node. In the second form, Variant can only be N_Variant
261 -- since all pragmas are skipped.
263 ---------------------
264 -- Optional Fields --
265 ---------------------
267 -- Fields which correspond to a section of the syntax enclosed in square
268 -- brackets are generally omitted (and the corresponding field set to
269 -- Empty for a node, or No_List for a list). The documentation of such
270 -- fields notes these cases. One exception to this rule occurs in the
271 -- case of possibly empty statement sequences (such as the sequence of
272 -- statements in an entry call alternative). Such cases appear in the
273 -- syntax rules as [SEQUENCE_OF_STATEMENTS] and the fields corresponding
274 -- to such optional statement sequences always contain an empty list (not
275 -- No_List) if no statements are present.
277 -- Note: the utility program that constructs the body and spec of the
278 -- Nmake package relies on the format of the comments to determine if
279 -- a field should have a default value in the corresponding make routine.
280 -- The rule is that if the first line of the description of the field
281 -- contains the string "(set to xxx if", then a default value of xxx is
282 -- provided for this field in the corresponding Make_yyy routine.
284 -----------------------------------
285 -- Note on Body/Spec Terminology --
286 -----------------------------------
288 -- In informal discussions about Ada, it is customary to refer to package
289 -- and subprogram specs and bodies. However, this is not technically
290 -- correct, what is normally referred to as a spec or specification is in
291 -- fact a package declaration or subprogram declaration. We are careful
292 -- in GNAT to use the correct terminology and in particular, the full
293 -- word specification is never used as an incorrect substitute for
294 -- declaration. The structure and terminology used in the tree also
295 -- reflects the grammar and thus uses declaration and specification in
296 -- the technically correct manner.
298 -- However, there are contexts in which the informal terminology is
299 -- useful. We have the word "body" to refer to the Interp_Etype declared by
300 -- the declaration of a unit body, and in some contexts we need a
301 -- similar term to refer to the entity declared by the package or
302 -- subprogram declaration, and simply using declaration can be confusing
303 -- since the body also has a declaration.
305 -- An example of such a context is the link between the package body
306 -- and its declaration. With_Declaration is confusing, since
307 -- the package body itself is a declaration.
309 -- To deal with this problem, we reserve the informal term Spec, i.e.
310 -- the popular abbreviation used in this context, to refer to the entity
311 -- declared by the package or subprogram declaration. So in the above
312 -- example case, the field in the body is called With_Spec.
314 -- Another important context for the use of the word Spec is in error
315 -- messages, where a hyper-correct use of declaration would be confusing
316 -- to a typical Ada programmer, and even for an expert programmer can
317 -- cause confusion since the body has a declaration as well.
319 -- So, to summarize:
321 -- Declaration always refers to the syntactic entity that is called
322 -- a declaration. In particular, subprogram declaration
323 -- and package declaration are used to describe the
324 -- syntactic entity that includes the semicolon.
326 -- Specification always refers to the syntactic entity that is called
327 -- a specification. In particular, the terms procedure
328 -- specification, function specification, package
329 -- specification, subprogram specification always refer
330 -- to the syntactic entity that has no semicolon.
332 -- Spec is an informal term, used to refer to the entity
333 -- that is declared by a task declaration, protected
334 -- declaration, generic declaration, subprogram
335 -- declaration or package declaration.
337 -- This convention is followed throughout the GNAT documentation
338 -- both internal and external, and in all error message text.
340 ------------------------
341 -- Internal Use Nodes --
342 ------------------------
344 -- These are Node_Kind settings used in the internal implementation
345 -- which are not logically part of the specification.
347 -- N_Unused_At_Start
348 -- Completely unused entry at the start of the enumeration type. This
349 -- is inserted so that no legitimate value is zero, which helps to get
350 -- better debugging behavior, since zero is a likely uninitialized value).
352 -- N_Unused_At_End
353 -- Completely unused entry at the end of the enumeration type. This is
354 -- handy so that arrays with Node_Kind as the index type have an extra
355 -- entry at the end (see for example the use of the Pchar_Pos_Array in
356 -- Treepr, where the extra entry provides the limit value when dealing
357 -- with the last used entry in the array).
359 -----------------------------------------
360 -- Note on the settings of Sloc fields --
361 -----------------------------------------
363 -- The Sloc field of nodes that come from the source is set by the
364 -- parser. For internal nodes, and nodes generated during expansion
365 -- the Sloc is usually set in the call to the constructor for the node.
366 -- In general the Sloc value chosen for an internal node is the Sloc of
367 -- the source node whose processing is responsible for the expansion. For
368 -- example, the Sloc of an inherited primitive operation is the Sloc of
369 -- the corresponding derived type declaration.
371 -- For the nodes of a generic instantiation, the Sloc value is encoded
372 -- to represent both the original Sloc in the generic unit, and the Sloc
373 -- of the instantiation itself. See Sinput.ads for details.
375 -- Subprogram instances create two callable entities: one is the visible
376 -- subprogram instance, and the other is an anonymous subprogram nested
377 -- within a wrapper package that contains the renamings for the actuals.
378 -- Both of these entities have the Sloc of the defining entity in the
379 -- instantiation node. This simplifies some ASIS queries.
381 -----------------------
382 -- Field Definitions --
383 -----------------------
385 -- In the following node definitions, all fields, both syntactic and
386 -- semantic, are documented. The one exception is in the case of entities
387 -- (defining indentifiers, character literals and operator symbols),
388 -- where the usage of the fields depends on the entity kind. Entity
389 -- fields are fully documented in the separate package Einfo.
391 -- In the node definitions, three common sets of fields are abbreviated
392 -- to save both space in the documentation, and also space in the string
393 -- (defined in Tree_Print_Strings) used to print trees. The following
394 -- abbreviations are used:
396 -- Note: the utility program that creates the Treeprs spec (in the file
397 -- treeprs.ads) knows about the special fields here, so it must be
398 -- modified if any change is made to these fields.
400 -- "plus fields for binary operator"
401 -- Chars (Name1) Name_Id for the operator
402 -- Left_Opnd (Node2) left operand expression
403 -- Right_Opnd (Node3) right operand expression
404 -- Entity (Node4-Sem) defining entity for operator
405 -- Associated_Node (Node4-Sem) for generic processing
406 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
407 -- Has_Private_View (Flag11-Sem) set in generic units.
409 -- "plus fields for unary operator"
410 -- Chars (Name1) Name_Id for the operator
411 -- Right_Opnd (Node3) right operand expression
412 -- Entity (Node4-Sem) defining entity for operator
413 -- Associated_Node (Node4-Sem) for generic processing
414 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
415 -- Has_Private_View (Flag11-Sem) set in generic units.
417 -- "plus fields for expression"
418 -- Paren_Count number of parentheses levels
419 -- Etype (Node5-Sem) type of the expression
420 -- Is_Overloaded (Flag5-Sem) >1 type interpretation exists
421 -- Is_Static_Expression (Flag6-Sem) set for static expression
422 -- Raises_Constraint_Error (Flag7-Sem) evaluation raises CE
423 -- Must_Not_Freeze (Flag8-Sem) set if must not freeze
424 -- Do_Range_Check (Flag9-Sem) set if a range check needed
425 -- Assignment_OK (Flag15-Sem) set if modification is OK
426 -- Is_Controlling_Actual (Flag16-Sem) set for controlling argument
428 -- Note: see under (EXPRESSION) for further details on the use of
429 -- the Paren_Count field to record the number of parentheses levels.
431 -- Node_Kind is the type used in the Nkind field to indicate the node
432 -- kind. The actual definition of this type is given later (the reason
433 -- for this is that we want the descriptions ordered by logical chapter
434 -- in the RM, but the type definition is reordered to facilitate the
435 -- definition of some subtype ranges. The individual descriptions of
436 -- the nodes show how the various fields are used in each node kind,
437 -- as well as providing logical names for the fields. Functions and
438 -- procedures are provided for accessing and setting these fields
439 -- using these logical names.
441 -----------------------
442 -- Gigi Restrictions --
443 -----------------------
445 -- The tree passed to Gigi is more restricted than the general tree form.
446 -- For example, as a result of expansion, most of the tasking nodes can
447 -- never appear. For each node to which either a complete or partial
448 -- restriction applies, a note entitled "Gigi restriction" appears which
449 -- documents the restriction.
451 -- Note that most of these restrictions apply only to trees generated when
452 -- code is being generated, since they involved expander actions that
453 -- destroy the tree.
455 ------------------------
456 -- Common Flag Fields --
457 ------------------------
459 -- The following flag fields appear in all nodes
461 -- Analyzed
462 -- This flag is used to indicate that a node (and all its children
463 -- have been analyzed. It is used to avoid reanalysis of a node that
464 -- has already been analyzed, both for efficiency and functional
465 -- correctness reasons.
467 -- Error_Posted
468 -- This flag is used to avoid multiple error messages being posted
469 -- on or referring to the same node. This flag is set if an error
470 -- message refers to a node or is posted on its source location,
471 -- and has the effect of inhibiting further messages involving
472 -- this same node.
474 -- Comes_From_Source
475 -- This flag is on for any nodes built by the scanner or parser from
476 -- the source program, and off for any nodes built by the analyzer or
477 -- expander. It indicates that a node comes from the original source.
478 -- This flag is defined in Atree.
480 -- Has_Dynamic_Length_Check and Has_Dynamic_Range_Check also appear on
481 -- all nodes. They are fully described in the next section.
483 ------------------------------------
484 -- Description of Semantic Fields --
485 ------------------------------------
487 -- The meaning of the syntactic fields is generally clear from their
488 -- names without any further description, since the names are chosen
489 -- to correspond very closely to the syntax in the reference manual.
490 -- This section describes the usage of the semantic fields, which are
491 -- used to contain additional information determined during semantic
492 -- analysis.
494 -- ABE_Is_Certain (Flag18-Sem)
495 -- This flag is set in an instantiation node or a call node is
496 -- determined to be sure to raise an ABE. This is used to trigger
497 -- special handling of such cases, particularly in the instantiation
498 -- case where we avoid instantiating the body if this flag is set.
499 -- This flag is also present in an N_Formal_Package_Declaration_Node
500 -- since formal package declarations are treated like instantiations,
501 -- but it is always set to False in this context.
503 -- Accept_Handler_Records (List5-Sem)
504 -- This field is present only in an N_Accept_Alternative node. It is
505 -- used to temporarily hold the exception handler records from an
506 -- accept statement in a selective accept. These exception handlers
507 -- will eventually be placed in the Handler_Records list of the
508 -- procedure built for this accept (see Expand_N_Selective_Accept
509 -- procedure in Exp_Ch9 for further details).
511 -- Access_Types_To_Process (Elist2-Sem)
512 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
513 -- Contains the list of access types which may require specific
514 -- treatment when the nature of the type completion is completely
515 -- known. An example of such treatement is the generation of the
516 -- associated_final_chain.
518 -- Actions (List1-Sem)
519 -- This field contains a sequence of actions that are associated
520 -- with the node holding the field. See the individual node types
521 -- for details of how this field is used, as well as the description
522 -- of the specific use for a particular node type.
524 -- Activation_Chain_Entity (Node3-Sem)
525 -- This is used in tree nodes representing task activators (blocks,
526 -- subprogram bodies, package declarations, and task bodies). It is
527 -- initially Empty, and then gets set to point to the entity for the
528 -- declared Activation_Chain variable when the first task is declared.
529 -- When tasks are declared in the corresponding declarative region
530 -- this entity is located by name (its name is always _Chain) and
531 -- the declared tasks are added to the chain.
533 -- Acts_As_Spec (Flag4-Sem)
534 -- A flag set in the N_Subprogram_Body node for a subprogram body
535 -- which is acting as its own spec. This flag also appears in the
536 -- compilation unit node at the library level for such a subprogram
537 -- (see further description in spec of Lib package).
539 -- Aggregate_Bounds (Node3-Sem)
540 -- Present in array N_Aggregate nodes. If the aggregate contains
541 -- component associations this field points to an N_Range node whose
542 -- bounds give the lowest and highest discrete choice values. If the
543 -- named aggregate contains a dynamic or null choice this field is
544 -- empty. If the aggregate contains positional elements this field
545 -- points to an N_Integer_Literal node giving the number of positional
546 -- elements. Note that if the aggregate contains positional elements
547 -- and an other choice the N_Integer_Literal only accounts for the
548 -- number of positional elements.
550 -- All_Others (Flag11-Sem)
551 -- Present in an N_Others_Choice node. This flag is set in the case
552 -- of an others exception where all exceptions are to be caught, even
553 -- those that are not normally handled (in particular the tasking abort
554 -- signal). This is used for translation of the at end handler into
555 -- a normal exception handler.
557 -- Assignment_OK (Flag15-Sem)
558 -- This flag is set in a subexpression node for an object, indicating
559 -- that the associated object can be modified, even if this would not
560 -- normally be permissible (either by direct assignment, or by being
561 -- passed as an out or in-out parameter). This is used by the expander
562 -- for a number of purposes, including initialzation of constants and
563 -- limited type objects (such as tasks), setting discriminant fields,
564 -- setting tag values, etc. N_Object_Declaration nodes also have this
565 -- flag defined. Here it is used to indicate that an initialization
566 -- expression is valid, even where it would normally not be allowed
567 -- (e.g. where the type involved is limited).
569 -- Associated_Node (Node4-Sem)
570 -- Present in nodes that can denote an entity: identifiers, character
571 -- literals, operator symbols, expanded names, operator nodes and
572 -- attribute reference nodes (all these nodes have an Entity field).
573 -- This field is also present in N_Aggregate, N_Selected_Component,
574 -- and N_Extension_Aggregate nodes. This field is used during generic
575 -- processing to relate nodes in the original template to nodes in the
576 -- generic copy. It overlaps the Entity field, and is used to capture
577 -- global references in the analyzed copy and place them in the template.
578 -- See description in Sem_Ch12 for further details on this usage.
580 -- At_End_Proc (Node1)
581 -- This field is present in an N_Handled_Sequence_Of_Statements node.
582 -- It contains an identifier reference for the cleanup procedure to
583 -- be called. See description of this node for further details.
585 -- Backwards_OK (Flag6-Sem)
586 -- A flag present in the N_Assignment_Statement node. It is used only
587 -- if the type being assigned is an array type, and is set if analysis
588 -- determines that it is definitely safe to do the copy backwards, i.e.
589 -- starting at the highest addressed element. Note that if neither of
590 -- the flags Forwards_OK or Backwards_OK is set, it means that the
591 -- front end could not determine that either direction is definitely
592 -- safe, and a runtime check is required.
594 -- Body_To_Inline (Node3-Sem)
595 -- present in subprogram declarations. Denotes analyzed but unexpanded
596 -- body of subprogram, to be used when inlining calls. Present when the
597 -- subprogram has an Inline pragma and inlining is enabled. If the
598 -- declaration is completed by a renaming_as_body, and the renamed en-
599 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
600 -- which is used directly in later calls to the original subprogram.
602 -- Body_Required (Flag13-Sem)
603 -- A flag that appears in the N_Compilation_Unit node indicating that
604 -- the corresponding unit requires a body. For the package case, this
605 -- indicates that a completion is required. In Ada 95, if the flag
606 -- is not set for the package case, then a body may not be present.
607 -- In Ada 83, if the flag is not set for the package case, then a
608 -- body is optional. For a subprogram declaration, the flag is set
609 -- except in the case where a pragma Import or Interface applies,
610 -- in which case no body is permitted (in Ada 83 or Ada 95).
612 -- By_Ref (Flag5-Sem)
613 -- A flag present in the N_Return_Statement_Node. It is set when the
614 -- returned expression is already allocated on the secondary stack
615 -- and thus the result is passed by reference rather than copied
616 -- another time.
618 -- Compile_Time_Known_Aggregate (Flag18-Sem)
619 -- Present in N_Aggregate nodes. Set for aggregates which can be
620 -- fully evaluated at compile time without raising constraint error.
621 -- Such aggregates can be passed as is to Gigi without any expansion.
622 -- See Sem_Aggr for the specific conditions under which an aggregate
623 -- has this flag set. See also the flag Static_Processing_OK.
625 -- Condition_Actions (List3-Sem)
626 -- This field appears in else-if nodes and in the iteration scheme
627 -- node for while loops. This field is only used during semantic
628 -- processing to temporarily hold actions inserted into the tree.
629 -- In the tree passed to gigi, the condition actions field is always
630 -- set to No_List. For details on how this field is used, see the
631 -- routine Insert_Actions in package Exp_Util, and also the expansion
632 -- routines for the relevant nodes.
634 -- Controlling_Argument (Node1-Sem)
635 -- This field is set in procedure and function call nodes if the call
636 -- is a dispatching call (it is Empty for a non-dispatching call).
637 -- It indicates the source of the controlling tag for the call. For
638 -- Procedure calls, the Controlling_Argument is one of the actuals.
639 -- For a function that has a dispatching result, it is an entity in
640 -- the context of the call that can provide a tag, or else it is the
641 -- tag of the root type of the class.
643 -- Conversion_OK (Flag14-Sem)
644 -- A flag set on type conversion nodes to indicate that the conversion
645 -- is to be considered as being valid, even though it is the case that
646 -- the conversion is not valid Ada. This is used for the Enum_Rep,
647 -- Fixed_Value and Integer_Value attributes, for internal conversions
648 -- done for fixed-point operations, and for certain conversions for
649 -- calls to initialization procedures. If Conversion_OK is set, then
650 -- Etype must be set (the analyzer assumes that Etype has been set).
651 -- For the case of fixed-point operands, it also indicates that the
652 -- conversion is to be a direct conversion of the underlying integer
653 -- result, with no regard to the small operand.
655 -- Corresponding_Body (Node5-Sem)
656 -- This field is set in subprogram declarations, where it is needed
657 -- if a pragma Inline is present and the subprogram is called, in
658 -- generic declarations if the generic is instantiated, and also in
659 -- package declarations that contain inlined subprograms that are
660 -- called, or generic declarations that are instantiated. It points
661 -- to the defining entity for the corresponding body.
663 -- Corresponding_Generic_Association (Node5-Sem)
664 -- This field is defined for object declarations and object renaming
665 -- declarations. It is set for the declarations within an instance that
666 -- map generic formals to their actuals. If set, the field points to
667 -- a generic_association which is the original parent of the expression
668 -- or name appearing in the declaration. This simplifies ASIS queries.
670 -- Corresponding_Integer_Value (Uint4-Sem)
671 -- This field is set in real literals of fixed-point types (it is not
672 -- used for floating-point types). It contains the integer value used
673 -- to represent the fixed-point value. It is also set on the universal
674 -- real literals used to represent bounds of fixed-point base types
675 -- and their first named subtypes.
677 -- Corresponding_Spec (Node5-Sem)
678 -- This field is set in subprogram, package, task, and protected body
679 -- nodes, where it points to the defining entity in the corresponding
680 -- spec. The attribute is also set in N_With_Clause nodes, where
681 -- it points to the defining entity for the with'ed spec, and in
682 -- a subprogram renaming declaration when it is a Renaming_As_Body.
683 -- The field is Empty if there is no corresponding spec, as in the
684 -- case of a subprogram body that serves as its own spec.
686 -- Corresponding_Stub (Node3-Sem)
687 -- This field is present in an N_Subunit node. It holds the node in
688 -- the parent unit that is the stub declaration for the subunit. it is
689 -- set when analysis of the stub forces loading of the proper body. If
690 -- expansion of the proper body creates new declarative nodes, they are
691 -- inserted at the point of the corresponding_stub.
693 -- Dcheck_Function (Node5-Sem)
694 -- This field is present in an N_Variant node, It references the entity
695 -- for the discriminant checking function for the variant.
697 -- Debug_Statement (Node3)
698 -- This field is present in an N_Pragma node. It is used only for
699 -- a Debug pragma or pragma Assert with a second parameter. The
700 -- parameter is of the form of an expression, as required by the
701 -- pragma syntax, but is actually a procedure call. To simplify
702 -- semantic processing, the parser creates a copy of the argument
703 -- rearranged into a procedure call statement and places it in the
704 -- Debug_Statement field. Note that this field is considered a
705 -- syntactic field, since it is created by the parser.
707 -- Default_Expression (Node5-Sem)
708 -- This field is Empty if there is no default expression. If there
709 -- is a simple default expression (one with no side effects), then
710 -- this field simply contains a copy of the Expression field (both
711 -- point to the tree for the default expression). Default_Expression
712 -- is used for conformance checking.
714 -- Delay_Finalize_Attach (Flag14-Sem)
715 -- This flag is present in an N_Object_Declaration node. If it is set,
716 -- then in the case of a controlled type being declared and initialized,
717 -- the normal code for attaching the result to the appropriate local
718 -- finalization list is suppressed. This is used for functions that
719 -- return controlled types without using the secondary stack, where
720 -- it is the caller who must do the attachment.
722 -- Discr_Check_Funcs_Built (Flag11-Sem)
723 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
724 -- discriminant checking functions are constructed. The purpose is to
725 -- avoid attempting to set these functions more than once.
727 -- Do_Access_Check (Flag11-Sem)
728 -- This flag is set on nodes with a Prefix field that can be an object
729 -- of an access type. If the flag is set, it indicates that a check is
730 -- required to ensure that the value of the referenced object is not
731 -- null. The actual check (which may be explicit or implicit by means
732 -- of some trap), is generated by Gigi (all the front end does is to
733 -- set this flag to request the trap).
735 -- Do_Accessibility_Check (Flag13-Sem)
736 -- This flag is set on N_Parameter_Specification nodes to indicate
737 -- that an accessibility check is required for the parameter. It is
738 -- not yet decided who takes care of this check (TBD ???).
740 -- Do_Discriminant_Check (Flag13-Sem)
741 -- This flag is set on N_Selected_Component nodes to indicate that a
742 -- discriminant check is required using the discriminant check routine
743 -- associated with the selector. The actual check is dealt with by
744 -- Gigi (all the front end does is to set the flag).
746 -- Do_Division_Check (Flag13-Sem)
747 -- This flag is set on a division operator (/ mod rem) to indicate
748 -- that a zero divide check is required. The actual check is dealt
749 -- with by the backend (all the front end does is to set the flag).
751 -- Do_Length_Check (Flag4-Sem)
752 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
753 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
754 -- is required. It is not determined who deals with this flag (???).
756 -- Do_Overflow_Check (Flag17-Sem)
757 -- This flag is set on an operator where an overflow check is required
758 -- on the operation. The actual check is dealt with by the backend
759 -- (all the front end does is to set the flag). The other cases where
760 -- this flag is used is on a Type_Conversion node and for attribute
761 -- reference nodes. For a type conversion, it means that the conversion
762 -- is from one base type to another, and the value may not fit in the
763 -- target base type. See also the description of Do_Range_Check for
764 -- this case. The only attribute references which use this flag are
765 -- Pred and Succ, where it means that the result should be checked
766 -- for going outside the base range.
768 -- Do_Range_Check (Flag9-Sem)
769 -- This flag is set on an expression which appears in a context where
770 -- a range check is required. The target type is clear from the
771 -- context. The contexts in which this flag can appear are limited to
772 -- the following.
774 -- Right side of an assignment. In this case the target type is
775 -- taken from the left side of the assignment, which is referenced
776 -- by the Name of the N_Assignment_Statement node.
778 -- Subscript expressions in an indexed component. In this case the
779 -- target type is determined from the type of the array, which is
780 -- referenced by the Prefix of the N_Indexed_Component node.
782 -- Argument expression for a parameter, appearing either directly
783 -- in the Parameter_Associations list of a call or as the Expression
784 -- of an N_Parameter_Association node that appears in this list. In
785 -- either case, the check is against the type of the formal. Note
786 -- that the flag is relevant only in IN and IN OUT parameters, and
787 -- will be ignored for OUT parameters, where no check is required
788 -- in the call, and if a check is required on the return, it is
789 -- generated explicitly with a type conversion.
791 -- Initialization expression for the initial value in an object
792 -- declaration. In this case the Do_Range_Check flag is set on
793 -- the initialization expression, and the check is against the
794 -- range of the type of the object being declared.
796 -- The expression of a type conversion. In this case the range check
797 -- is against the target type of the conversion. See also the use of
798 -- Do_Overflow_Check on a type conversion. The distinction is that
799 -- the ovrflow check protects against a value that is outside the
800 -- range of the target base type, whereas a range check checks that
801 -- the resulting value (which is a value of the base type of the
802 -- target type), satisfies the range constraint of the target type.
804 -- Note: when a range check is required in contexts other than those
805 -- listed above (e.g. in a return statement), an additional type
806 -- conversion node is introduced to represent the required check.
808 -- Do_Storage_Check (Flag17-Sem)
809 -- This flag is set in an N_Allocator node to indicate that a storage
810 -- check is required for the allocation, or in an N_Subprogram_Body
811 -- node to indicate that a stack check is required in the subprogram
812 -- prolog. The N_Allocator case is handled by the routine that expands
813 -- the call to the runtime routine. The N_Subprogram_Body case is
814 -- handled by the backend, and all the semantics does is set the flag.
816 -- Do_Tag_Check (Flag13-Sem)
817 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
818 -- N_Procedure_Call_Statement, N_Type_Conversion or N_Return_Statememt
819 -- node to indicate that the tag check can be suppressed. It is not
820 -- yet decided how this flag is used (TBD ???).
822 -- Elaborate_Present (Flag4-Sem)
823 -- This flag is set in the N_With_Clause node to indicate that a
824 -- pragma Elaborate pragma appears for the with'ed units.
826 -- Elaborate_All_Present (Flag15-Sem)
827 -- This flag is set in the N_With_Clause node to indicate that a
828 -- pragma Elaborate_All pragma appears for the with'ed units.
830 -- Elaboration_Boolean (Node2-Sem)
831 -- This field is present in function and procedure specification
832 -- nodes. If set, it points to the entity for a Boolean flag that
833 -- must be tested for certain calls to check for access before
834 -- elaboration. See body of Sem_Elab for further details. This
835 -- field is Empty if no elaboration boolean is required.
837 -- Else_Actions (List3-Sem)
838 -- This field is present in conditional expression nodes. During code
839 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
840 -- actions at an appropriate place in the tree to get elaborated at the
841 -- right time. For conditional expressions, we have to be sure that the
842 -- actions for the Else branch are only elaborated if the condition is
843 -- False. The Else_Actions field is used as a temporary parking place
844 -- for these actions. The final tree is always rewritten to eliminate
845 -- the need for this field, so in the tree passed to Gigi, this field
846 -- is always set to No_List.
848 -- Enclosing_Variant (Node2-Sem)
849 -- This field is present in the N_Variant node and identifies the
850 -- Node_Id corresponding to the immediately enclosing variant when
851 -- the variant is nested, and N_Empty otherwise. Set during semantic
852 -- processing of the variant part of a record type.
854 -- Entity (Node4-Sem)
855 -- Appears in all direct names (identifier, character literal,
856 -- operator symbol), as well as expanded names, and attributes that
857 -- denote entities, such as 'Class. Points to the entity for the
858 -- corresponding defining occurrence. Set after name resolution.
859 -- In the case of identifiers in a WITH list, the corresponding
860 -- defining occurrence is in a separately compiled file, and this
861 -- pointer must be set using the library Load procedure. Note that
862 -- during name resolution, the value in Entity may be temporarily
863 -- incorrect (e.g. during overload resolution, Entity is initially
864 -- set to the first possible correct interpretation, and then later
865 -- modified if necessary to contain the correct value after resolution).
866 -- Note that Associated_Node overlays this field during the processing
867 -- of generics. See Sem_Ch12 for further details.
869 -- Etype (Node5-Sem)
870 -- Appears in all expression nodes, all direct names, and all
871 -- entities. Points to the entity for the related type. Set after
872 -- type resolution. Normally this is the actual subtype of the
873 -- expression. However, in certain contexts such as the right side
874 -- of an assignment, subscripts, arguments to calls, returned value
875 -- in a function, initial value etc. it is the desired target type.
876 -- In the event that this is different from the actual type, the
877 -- Do_Range_Check flag will be set if a range check is required.
878 -- Note: if the Is_Overloaded flag is set, then Etype points to
879 -- an essentially arbitrary choice from the possible set of types.
881 -- Exception_Junk (Flag11-Sem)
882 -- This flag is set in a various nodes appearing in a statement
883 -- sequence to indicate that the corresponding node is an artifact
884 -- of the generated code for exception handling, and should be
885 -- ignored when analyzing the control flow of the relevant sequence
886 -- of statements (e.g. to check that it does not end with a bad
887 -- return statement).
889 -- Expansion_Delayed (Flag11-Sem)
890 -- Set on aggregates and extension aggregates that need a top-down
891 -- rather than bottom up expansion. Typically aggregate expansion
892 -- happens bottom up. For nested aggregates the expansion is delayed
893 -- until the enclosing aggregate itself is expanded, e.g. in the context
894 -- of a declaration. To delay it we set this flag. This is done to
895 -- avoid creating a temporary for each level of a nested aggregates,
896 -- and also to prevent the premature generation of constraint checks.
897 -- This is also a requirement if we want to generate the proper
898 -- attachment to the internal finalization lists (for record with
899 -- controlled components). Top down expansion of aggregates is also
900 -- used for in-place array aggregate assignment or initialization.
901 -- When the full context is known, the target of the assignment or
902 -- initialization is used to generate the left-hand side of individual
903 -- assignment to each sub-component.
905 -- First_Inlined_Subprogram (Node3-Sem)
906 -- Present in the N_Compilation_Unit node for the main program. Points
907 -- to a chain of entities for subprograms that are to be inlined. The
908 -- Next_Inlined_Subprogram field of these entities is used as a link
909 -- pointer with Empty marking the end of the list. This field is Empty
910 -- if there are no inlined subprograms or inlining is not active.
912 -- First_Named_Actual (Node4-Sem)
913 -- Present in procedure call statement and function call nodes, and
914 -- also in Intrinsic nodes. Set during semantic analysis to point to
915 -- the first named parameter where parameters are ordered by declaration
916 -- order (as opposed to the actual order in the call which may be
917 -- different due to named associations). Note: this field points to the
918 -- explicit actual parameter itself, not the N_Parameter_Association
919 -- node (its parent).
921 -- First_Real_Statement (Node2-Sem)
922 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
923 -- Empty. Used only when declarations are moved into the statement
924 -- part of a construct as a result of wrapping an AT END handler that
925 -- is required to cover the declarations. In this case, this field is
926 -- used to remember the location in the statements list of the first
927 -- real statement, i.e. the statement that used to be first in the
928 -- statement list before the declarations were prepended.
930 -- First_Subtype_Link (Node5-Sem)
931 -- Present in N_Freeze_Entity node for an anonymous base type that
932 -- is implicitly created by the declaration of a first subtype. It
933 -- points to the entity for the first subtype.
935 -- Float_Truncate (Flag11-Sem)
936 -- A flag present in type conversion nodes. This is used for float
937 -- to integer conversions where truncation is required rather than
938 -- rounding. Note that Gigi does not handle type conversions from real
939 -- to integer with rounding (see Expand_N_Type_Conversion).
941 -- Forwards_OK (Flag5-Sem)
942 -- A flag present in the N_Assignment_Statement node. It is used only
943 -- if the type being assigned is an array type, and is set if analysis
944 -- determines that it is definitely safe to do the copy forwards, i.e.
945 -- starting at the lowest addressed element. Note that if neither of
946 -- the flags Forwards_OK or Backwards_OK is set, it means that the
947 -- front end could not determine that either direction is definitely
948 -- safe, and a runtime check is required.
950 -- From_At_Mod (Flag4-Sem)
951 -- This flag is set on the attribute definition clause node that is
952 -- generated by a transformation of an at mod phrase in a record
953 -- representation clause. This is used to give slightly different
954 -- (Ada 83 compatible) semantics to such a clause, namely it is
955 -- used to specify a minimum acceptable alignment for the base type
956 -- and all subtypes. In Ada 95 terms, the actual alignment of the
957 -- base type and all subtypes must be a multiple of the given value,
958 -- and the representation clause is considered to be type specific
959 -- instead of subtype specific.
961 -- Generic_Parent (Node5-Sem)
962 -- Generic_parent is defined on declaration nodes that are instances.
963 -- The value of Generic_Parent is the generic entity from which the
964 -- instance is obtained. Generic_Parent is also defined for the renaming
965 -- declarations and object declarations created for the actuals in an
966 -- instantiation. The generic parent of such a declaration is the
967 -- corresponding generic association in the Instantiation node.
969 -- Generic_Parent_Type (Node4-Sem)
970 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for
971 -- the actuals of formal private and derived types. Within the instance,
972 -- the operations on the actual are those inherited from the parent.
973 -- For a formal private type, the parent type is the generic type
974 -- itself. The Generic_Parent_Type is also used in an instance to
975 -- determine whether a private operation overrides an inherited one.
977 -- Handler_List_Entry (Node2-Sem)
978 -- This field is present in N_Object_Declaration nodes. It is set only
979 -- for the Handler_Record entry generated for an exception in zero cost
980 -- exception handling mode. It references the corresponding item in the
981 -- handler list, and is used to delete this entry if the corresponding
982 -- handler is deleted during optimization. For further details on why
983 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
985 -- Has_Dynamic_Length_Check (Flag10-Sem)
986 -- This flag is present on all nodes. It is set to indicate that one
987 -- of the routines in unit Checks has generated a length check action
988 -- which has been inserted at the flagged node. This is used to avoid
989 -- the generation of duplicate checks.
991 -- Has_Dynamic_Range_Check (Flag12-Sem)
992 -- This flag is present on all nodes. It is set to indicate that one
993 -- of the routines in unit Checks has generated a range check action
994 -- which has been inserted at the flagged node. This is used to avoid
995 -- the generation of duplicate checks.
997 -- Has_No_Elaboration_Code (Flag17-Sem)
998 -- A flag that appears in the N_Compilation_Unit node to indicate
999 -- whether or not elaboration code is present for this unit. It is
1000 -- initially set true for subprogram specs and bodies and for all
1001 -- generic units and false for non-generic package specs and bodies.
1002 -- Gigi may set the flag in the non-generic package case if it
1003 -- determines that no elaboration code is generated. Note that this
1004 -- flag is not related to the Is_Preelaborated status, there can be
1005 -- preelaborated packages that generate elaboration code, and non-
1006 -- preelaborated packages which do not generate elaboration code.
1008 -- Has_Priority_Pragma (Flag6-Sem)
1009 -- A flag present in N_Subprogram_Body, N_Task_Definition and
1010 -- N_Protected_Definition nodes to flag the presence of either
1011 -- a Priority or Interrupt_Priority pragma in the declaration
1012 -- sequence (public or private in the task and protected cases)
1014 -- Has_Private_View (Flag11-Sem)
1015 -- A flag present in generic nodes that have an entity, to indicate
1016 -- that the node has a private type. Used to exchange private
1017 -- and full declarations if the visibility at instantiation is
1018 -- different from the visibility at generic definition.
1020 -- Has_Storage_Size_Pragma (Flag5-Sem)
1021 -- A flag present in an N_Task_Definition node to flag the presence
1022 -- of a Storage_Size pragma
1024 -- Has_Task_Info_Pragma (Flag7-Sem)
1025 -- A flag present in an N_Task_Definition node to flag the presence
1026 -- of a Task_Info pragma. Used to detect duplicate pragmas.
1028 -- Has_Task_Name_Pragma (Flag8-Sem)
1029 -- A flag present in N_Task_Definition nodes to flag the presence
1030 -- of a Task_Name pragma in the declaration sequence for the task.
1032 -- Has_Wide_Character (Flag11-Sem)
1033 -- Present in string literals, set if any wide character (i.e. a
1034 -- character code outside the Character range) appears in the string.
1036 -- Hidden_By_Use_Clause (Elist4-Sem)
1037 -- An entity list present in use clauses that appear within
1038 -- instantiations. For the resolution of local entities, entities
1039 -- introduced by these use clauses have priority over global ones,
1040 -- and outer entities must be explicitly hidden/restored on exit.
1042 -- Implicit_With (Flag17-Sem)
1043 -- This flag is set in the N_With_Clause node that is implicitly
1044 -- generated for runtime units that are loaded by the expander, and
1045 -- also for package System, if it is loaded implicitly by a use of
1046 -- the 'Address or 'Tag attribute
1048 -- Includes_Infinities (Flag11-Sem)
1049 -- This flag is present in N_Range nodes. It is set for the range
1050 -- of unconstrained float types defined in Standard, which include
1051 -- not only the given range of values, but also legtitimately can
1052 -- include infinite values. This flag is false for any float type
1053 -- for which an explicit range is given by the programmer, even if
1054 -- that range is identical to the range for float.
1056 -- Instance_Spec (Node5-Sem)
1057 -- This field is present in generic instantiation nodes, and also in
1058 -- formal package declaration nodes (formal package declarations are
1059 -- treated in a manner very similar to package instantiations). It
1060 -- points to the node for the spec of the instance, inserted as part
1061 -- of the semantic processing for instantiations in Sem_Ch12.
1063 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1064 -- A flag set in a Block_Statement node to indicate that it is the
1065 -- expansion of an asynchronous entry call. Such a block needs a
1066 -- cleanup handler to assure that the call is cancelled.
1068 -- Is_Component_Left_Opnd (Flag13-Sem)
1069 -- Is_Component_Right_Opnd (Flag14-Sem)
1070 -- Present in concatenation nodes, to indicate that the corresponding
1071 -- operand is of the component type of the result. Used in resolving
1072 -- concatenation nodes in instances.
1074 -- Is_Controlling_Actual (Flag16-Sem)
1075 -- This flag is set on in an expression that is a controlling argument
1076 -- in a dispatching call. It is off in all other cases. See Sem_Disp
1077 -- for details of its use.
1079 -- Is_Machine_Number (Flag11-Sem)
1080 -- This flag is set in an N_Real_Literal node to indicate that the
1081 -- value is a machine number. This avoids some unnecessary cases
1082 -- of converting real literals to machine numbers.
1084 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1085 -- A flag present only in N_Op_Expon nodes. It is set when the
1086 -- exponentiation is of the forma 2 ** N, where the type of N is
1087 -- an unsigned integral subtype whose size does not exceed the size
1088 -- of Standard_Integer (i.e. a type that can be safely converted to
1089 -- Natural), and the exponentiation appears as the right operand of
1090 -- an integer multiplication or an integer division where the dividend
1091 -- is unsigned. It is also required that overflow checking is off for
1092 -- both the exponentiation and the multiply/divide node. If this set
1093 -- of conditions holds, and the flag is set, then the division or
1094 -- multiplication can be (and is) converted to a shift.
1096 -- Is_Overloaded (Flag5-Sem)
1097 -- A flag present in all expression nodes. Used temporarily during
1098 -- overloading determination. The setting of this flag is not
1099 -- relevant once overloading analysis is complete.
1101 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1102 -- A flag set in a Subprogram_Body block to indicate that it is the
1103 -- implemenation of a protected subprogram. Such a body needs a
1104 -- cleanup handler to make sure that the associated protected object
1105 -- is unlocked when the subprogram completes.
1107 -- Is_Static_Expression (Flag6-Sem)
1108 -- Indicates that an expression is a static expression (RM 4.9). See
1109 -- spec of package Sem_Eval for full details on the use of this flag.
1111 -- Is_Subprogram_Descriptor (Flag16-Sem)
1112 -- Present in N_Object_Declaration, and set only for the object
1113 -- declaration generated for a subprogram descriptor in fast exception
1114 -- mode. See Exp_Ch11 for details of use.
1116 -- Is_Task_Allocation_Block (Flag6-Sem)
1117 -- A flag set in a Block_Statement node to indicate that it is the
1118 -- expansion of a task allocator, or the allocator of an object
1119 -- containing tasks. Such a block requires a cleanup handler to call
1120 -- Expunge_Unactivted_Tasks to complete any tasks that have been
1121 -- allocated but not activated when the allocator completes abnormally.
1123 -- Is_Task_Master (Flag5-Sem)
1124 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node
1125 -- to indicate that the construct is a task master (i.e. has declared
1126 -- tasks or declares an access to a task type).
1128 -- Itype (Node1-Sem)
1129 -- Used in N_Itype_Reference node to reference an itype for which it
1130 -- is important to ensure that it is defined. See description of this
1131 -- node for further details.
1133 -- Kill_Range_Check (Flag11-Sem)
1134 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1135 -- result should not be subjected to range checks. This is used for
1136 -- the implementation of Normalize_Scalars.
1138 -- Label_Construct (Node2-Sem)
1139 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1140 -- N_Block_Statement or N_Loop_Statement node to which the label
1141 -- declaration applies. This is not currently used in the compiler
1142 -- itself, but it is useful in the implementation of ASIS queries.
1144 -- Library_Unit (Node4-Sem)
1145 -- In a stub node, the Library_Unit field points to the compilation unit
1146 -- node of the corresponding subunit.
1148 -- In a with clause node, the Library_Unit field points to the spec
1149 -- of the with'ed unit.
1151 -- In a compilation unit node, the use of this field depends on
1152 -- the unit type:
1154 -- For a subprogram body, the Library_Unit field points to the
1155 -- compilation unit node of the corresponding spec, unless
1156 -- Acts_As_Spec is set, in which case it points to itself.
1158 -- For a package body, the Library_Unit field points to the
1159 -- compilation unit node of the corresponding spec.
1161 -- For a subprogram spec to which pragma Inline applies, the
1162 -- Library_Unit field points to the compilation unit node of
1163 -- the corresponding body, if inlining is active.
1165 -- For a generic declaration, the Library_Unit field points
1166 -- to the compilation unit node of the corresponding generic body.
1168 -- For a subunit, the Library_Unit field points to the compilation
1169 -- unit node of the parent body.
1171 -- Note that this field is not used to hold the parent pointer for a
1172 -- child unit (which might in any case need to use it for some other
1173 -- purpose as described above). Instead for a child unit, implicit
1174 -- with's are generated for all parents.
1176 -- Loop_Actions (List2-Sem)
1177 -- A list present in Component_Association nodes in array aggregates.
1178 -- Used to collect actions that must be executed within the loop because
1179 -- they may need to be evaluated anew each time through.
1181 -- Must_Be_Byte_Aligned (Flag14-Sem)
1182 -- This flag is present in N_Attribute_Reference nodes. It can be set
1183 -- only for the Address and Unrestricted_Access attributes. If set it
1184 -- means that the object for which the address/access is given must be
1185 -- on a byte (more accurately a storage unit) boundary. If necessary,
1186 -- a copy of the object is to be made before taking the address (this
1187 -- copy is in the current scope on the stack frame). This is used for
1188 -- certainly cases of code generated by the expander that passes
1189 -- parameters by address.
1191 -- Must_Not_Freeze (Flag8-Sem)
1192 -- A flag present in all expression nodes. Normally expressions cause
1193 -- freezing as described in the RM. If this flag is set, then this
1194 -- is inhibited. This is used by the analyzer and expander to label
1195 -- nodes that are created by semantic analysis or expansion and which
1196 -- must not cause freezing even though they normally would. This flag
1197 -- is also present in an N_Subtype_Indication node, since we also use
1198 -- these in calls to Freeze_Expression.
1200 -- Next_Entity (Node2-Sem)
1201 -- Present in defining identifiers, defining character literals and
1202 -- defining operator symbols (i.e. in all entities). The entities of
1203 -- a scope are chained, and this field is used as the forward pointer
1204 -- for this list. See Einfo for further details.
1206 -- Next_Named_Actual (Node4-Sem)
1207 -- Present in parameter association node. Set during semantic
1208 -- analysis to point to the next named parameter, where parameters
1209 -- are ordered by declaration order (as opposed to the actual order
1210 -- in the call, which may be different due to named associations).
1211 -- Not that this field points to the explicit actual parameter itself,
1212 -- not to the N_Parameter_Association node (its parent).
1214 -- Next_Rep_Item (Node4-Sem)
1215 -- Present in pragma nodes and attribute definition nodes. Used to
1216 -- link representation items that apply to an entity. See description
1217 -- of First_Rep_Item field in Einfo for full details.
1219 -- Next_Use_Clause (Node3-Sem)
1220 -- While use clauses are active during semantic processing, they
1221 -- are chained from the scope stack entry, using Next_Use_Clause
1222 -- as a link pointer, with Empty marking the end of the list. The
1223 -- head pointer is in the scope stack entry (First_Use_Clause). At
1224 -- the end of semantic processing (i.e. when Gigi sees the tree,
1225 -- the contents of this field is undefined and should not be read).
1227 -- No_Ctrl_Actions (Flag7-Sem)
1228 -- Present in N_Assignment_Statement to indicate that no finalize nor
1229 -- nor adjust should take place on this assignment eventhough the rhs
1230 -- is controlled. This is used in init_procs and aggregate expansions
1231 -- where the generated assignments are more initialisations than real
1232 -- assignments.
1234 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1235 -- Present in N_With_Clause nodes. Set if the with clause is on the
1236 -- package or subprogram spec where the main unit is the corresponding
1237 -- body, and no entities of the with'ed unit are referenced by the spec
1238 -- (an entity may still be referenced in the body, so this flag is used
1239 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1240 -- full details)
1242 -- No_Initialization (Flag13-Sem)
1243 -- Present in N_Object_Declaration & N_Allocator to indicate
1244 -- that the object must not be initialized (by Initialize or a
1245 -- call to _init_proc). This is needed for controlled aggregates.
1246 -- When the Object declaration has an expression, this flag means
1247 -- that this expression should not be taken into account (needed
1248 -- for in place initialization with aggregates)
1250 -- OK_For_Stream (Flag4-Sem)
1251 -- Present in N_Attribute_Definition clauses for stream attributes. If
1252 -- set, indicates that the attribute is permitted even though the type
1253 -- involved is a limited type. In the case of a protected type, the
1254 -- result is to stream all components (including discriminants) in
1255 -- lexical order. For other limited types, the effect is simply to
1256 -- use the corresponding stream routine for the full type. This flag
1257 -- is used for internally generated code, where the streaming of these
1258 -- types is required, even though not normally allowed by the language.
1260 -- Original_Discriminant (Node2-Sem)
1261 -- Present in identifiers. Used in references to discriminants that
1262 -- appear in generic units. Because the names of the discriminants
1263 -- may be different in an instance, we use this field to recover the
1264 -- position of the discriminant in the original type, and replace it
1265 -- with the discriminant at the same position in the instantiated type.
1267 -- Others_Discrete_Choices (List1-Sem)
1268 -- When a case statement or variant is analyzed, the semantic checks
1269 -- determine the actual list of choices that correspond to an others
1270 -- choice. This list is materialized for later use by the expander
1271 -- and the Others_Discrete_Choices field of an N_Others_Choice node
1272 -- points to this materialized list of choices, which is in standard
1273 -- format for a list of discrete choices, except that of course it
1274 -- cannot contain an N_Others_Choice entry.
1276 -- Parameter_List_Truncated (Flag17-Sem)
1277 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes.
1278 -- Set (for OpenVMS ports of GNAT only) if the parameter list is
1279 -- truncated as a result of a First_Optional_Parameter specification
1280 -- in an Import_Function, Import_Procedure, or Import_Valued_Procedure
1281 -- pragma. The truncation is done by the expander by removing trailing
1282 -- parameters from the argument list, in accordance with the set of
1283 -- rules allowing such parameter removal. In particular, parameters
1284 -- can be removed working from the end of the parameter list backwards
1285 -- up to and including the entry designated by First_Optional_Parameter
1286 -- in the Import pragma. Parameters can be removed if they are implicit
1287 -- and the default value is a known-at-compile-time value, including
1288 -- the use of the Null_Parameter attribute, or if explicit parameter
1289 -- values are present that match the corresponding defaults.
1291 -- Parent_Spec (Node4-Sem)
1292 -- For a library unit that is a child unit spec (package or subprogram
1293 -- declaration, generic declaration or instantiation, or library level
1294 -- rename, this field points to the compilation unit node for the parent
1295 -- package specification. This field is Empty for library bodies (the
1296 -- parent spec in this case can be found from the corresponding spec).
1298 -- Present_Expr (Uint3-Sem)
1299 -- Present in an N_Variant node. This has a meaningful value only after
1300 -- Gigi has back annotated the tree with representation information.
1301 -- At this point, it contains a reference to a gcc expression that
1302 -- depends on the values of one or more discriminants. Give a set of
1303 -- discriminant values, this expression evaluates to False (zero) if
1304 -- variant is not present, and True (non-zero) if it is present. See
1305 -- unit Repinfo for further details on gigi back annotation. This
1306 -- field is used during ASIS processing (data decomposition annex)
1307 -- to determine if a field is present or not.
1309 -- Print_In_Hex (Flag13-Sem)
1310 -- Set on an N_Integer_Literal node to indicate that the value should
1311 -- be printed in hexadecimal in the sprint listing. Has no effect on
1312 -- legality or semantics of program, only on the displayed output.
1313 -- This is used to clarify output from the packed array cases.
1315 -- Procedure_To_Call (Node4-Sem)
1316 -- Present in N_Allocator. N_Free_Statement, and N_Return_Statement
1317 -- nodes. References the entity for the declaration of the procedure
1318 -- to be called to accomplish the required operation (i.e. for the
1319 -- Allocate procedure in the case of N_Allocator and N_Return_Statement
1320 -- (for allocating the return value), and for the Deallocate procedure
1321 -- in the case of N_Free_Statement.
1323 -- Raises_Constraint_Error (Flag7-Sem)
1324 -- Set on an expression whose evaluation will definitely fail a
1325 -- constraint error check. In the case of static expressions, this
1326 -- flag must be set accurately (and if it is set, the expression is
1327 -- typically illegal unless it appears as a non-elaborated branch of
1328 -- a short-circuit form). For a non-static expression, this flag may
1329 -- be set whenever an expression (e.g. an aggregate) is known to raise
1330 -- constraint error. If set, the expression definitely will raise CE
1331 -- if elaborated at runtime. If not set, the expression may or may
1332 -- not raise CE. In other words, on static expressions, the flag is
1333 -- set accurately, on non-static expressions it is set conservatively.
1335 -- Redundant_Use (Flag13-Sem)
1336 -- A flag present in nodes that can appear as an operand in a use
1337 -- clause or use type clause (identifiers, expanded names, attribute
1338 -- references). Set to indicate that a use is redundant (and therefore
1339 -- need not be undone on scope exit).
1341 -- Return_Type (Node2-Sem)
1342 -- Present in N_Return_Statement node. For a procedure, this is set
1343 -- to Standard_Void_Type. For a function it references the entity
1344 -- for the returned type.
1346 -- Rounded_Result (Flag18-Sem)
1347 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1348 -- Used in the fixed-point cases to indicate that the result must be
1349 -- rounded as a result of the use of the 'Round attribute. Also used
1350 -- for integer N_Op_Divide nodes to indicate that the result should
1351 -- be rounded to the nearest integer (breaking ties away from zero),
1352 -- rather than truncated towards zero as usual. These rounded integer
1353 -- operations are the result of expansion of rounded fixed-point
1354 -- divide, conersion and multiplication operations.
1356 -- Scope (Node3-Sem)
1357 -- Present in defining identifiers, defining character literals and
1358 -- defining operator symbols (i.e. in all entities). The entities of
1359 -- a scope all use this field to reference the corresponding scope
1360 -- entity. See Einfo for further details.
1362 -- Shift_Count_OK (Flag4-Sem)
1363 -- A flag present in shift nodes to indicate that the shift count is
1364 -- known to be in range, i.e. is in the range from zero to word length
1365 -- minus one. If this flag is not set, then the shift count may be
1366 -- outside this range, i.e. larger than the word length, and the code
1367 -- must ensure that such shift counts give the appropriate result.
1369 -- Source_Type (Node1-Sem)
1370 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1371 -- source type entity for the unchecked conversion instantiation
1372 -- which gigi must do size validation for.
1374 -- Static_Processing_OK (Flag4-Sem)
1375 -- Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate
1376 -- flag is set, the full value of the aggregate can be determined at
1377 -- compile time and the aggregate can be passed as is to the back-end.
1378 -- In this event it is irrelevant whether this flag is set or not.
1379 -- However, if the Compile_Time_Known_Aggregate flag is not set but
1380 -- Static_Processing_OK is set, the aggregate can (but need not) be
1381 -- converted into a compile time known aggregate by the expander.
1382 -- See Sem_Aggr for the specific conditions under which an aggregate
1383 -- has its Static_Processing_OK flag set.
1385 -- Storage_Pool (Node1-Sem)
1386 -- Present in N_Allocator, N_Free_Statement and N_Return_Statement
1387 -- nodes. References the entity for the storage pool to be used for
1388 -- the allocate or free call or for the allocation of the returned
1389 -- value from a function. Empty indicates that the global default
1390 -- default pool is to be used. Note that in the case of a return
1391 -- statement, this field is set only if the function returns a
1392 -- value of a type whose size is not known at compile time on the
1393 -- secondary stack. It is never set on targets for which the target
1394 -- parameter Targparm.Functions_Return_By_DSP_On_Target is True.
1396 -- Target_Type (Node2-Sem)
1397 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1398 -- target type entity for the unchecked conversion instantiation
1399 -- which gigi must do size validation for.
1401 -- Task_Body_Procedure (Node2-Sem)
1402 -- Present in task type declaration nodes. Points to the entity for
1403 -- the task body procedure (as further described in Exp_Ch9, task
1404 -- bodies are expanded into procedures). A convenient function to
1405 -- retrieve this field is Sem_Util.Get_Task_Body_Procedure.
1407 -- Then_Actions (List3-Sem)
1408 -- This field is present in conditional expression nodes. During code
1409 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1410 -- actions at an appropriate place in the tree to get elaborated at the
1411 -- right time. For conditional expressions, we have to be sure that the
1412 -- actions for the Then branch are only elaborated if the condition is
1413 -- True. The Then_Actions field is used as a temporary parking place
1414 -- for these actions. The final tree is always rewritten to eliminate
1415 -- the need for this field, so in the tree passed to Gigi, this field
1416 -- is always set to No_List.
1418 -- Treat_Fixed_As_Integer (Flag14-Sem)
1419 -- This flag appears in operator nodes for divide, multiply, mod and
1420 -- rem on fixed-point operands. It indicates that the operands are
1421 -- to be treated as integer values, ignoring small values. This flag
1422 -- is only set as a result of expansion of fixed-point operations.
1423 -- Typically a fixed-point multplication in the source generates
1424 -- subsidiary multiplication and division operations that work with
1425 -- the underlying integer values and have this flag set. Note that
1426 -- this flag is not needed on other arithmetic operations (add, neg,
1427 -- subtract etc) since in these cases it is always the case that fixed
1428 -- is treated as integer. The Etype field MUST be set if this flag
1429 -- is set. The analyzer knows to leave such nodes alone, and whoever
1430 -- makes them must set the correct Etype value.
1432 -- TSS_Elist (Elist3-Sem)
1433 -- Present in N_Freeze_Entity nodes. Holds an element list containing
1434 -- entries for each TSS (type support subprogram) associated with the
1435 -- frozen type. The elements of the list are the entities for the
1436 -- subprograms (see package Exp_TSS for further details). Set to
1437 -- No_Elist if there are no type support subprograms for the type
1438 -- or if the freeze node is not for a type.
1440 -- Unreferenced_In_Spec (Flag7-Sem)
1441 -- Present in N_With_Clause nodes. Set if the with clause is on the
1442 -- package or subprogram spec where the main unit is the corresponding
1443 -- body, and is not referenced by the spec (it may still be referenced
1444 -- by the body, so this flag is used to generate the proper message
1445 -- (see Sem_Util.Check_Unused_Withs for details)
1447 -- Was_Originally_Stub (Flag13-Sem)
1448 -- This flag is set in the node for a proper body that replaces a
1449 -- stub. During the analysis procedure, stubs in some situations
1450 -- get rewritten by the corresponding bodies, and we set this flag
1451 -- to remember that this happened. Note that it is not good enough
1452 -- to rely on the use of Original_Tree here because of the case of
1453 -- nested instantiations where the substituted node can be copied.
1455 -- Zero_Cost_Handling (Flag5-Sem)
1456 -- This flag is set in all handled sequence of statement and exception
1457 -- handler nodes if eceptions are to be handled using the zero-cost
1458 -- mechanism (see Ada.Exceptions and System.Exceptions in files
1459 -- a-except.ads/adb and s-except.ads for full details). What gigi
1460 -- needs to do for such a handler is simply to put the code in the
1461 -- handler somewhere. The front end has generated all necessary labels.
1463 --------------------------------------------------
1464 -- Note on Use of End_Label and End_Span Fields --
1465 --------------------------------------------------
1467 -- Several constructs have end lines:
1469 -- Loop Statement end loop [loop_IDENTIFIER];
1470 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
1471 -- Task Definition end [task_IDENTIFIER]
1472 -- Protected Definition end [protected_IDENTIFIER]
1473 -- Protected Body end [protected_IDENTIFIER]
1475 -- Block Statement end [block_IDENTIFIER];
1476 -- Subprogram Body end [DESIGNATOR];
1477 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
1478 -- Task Body end [task_IDENTIFIER];
1479 -- Accept Statement end [entry_IDENTIFIER]];
1480 -- Entry Body end [entry_IDENTIFIER];
1482 -- If Statement end if;
1483 -- Case Statement end case;
1485 -- Record Definition end record;
1486 -- Enumeration Definition );
1488 -- The End_Label and End_Span fields are used to mark the locations
1489 -- of these lines, and also keep track of the label in the case where
1490 -- a label is present.
1492 -- For the first group above, the End_Label field of the corresponding
1493 -- node is used to point to the label identifier. In the case where
1494 -- there is no label in the source, the parser supplies a dummy
1495 -- identifier (with Comes_From_Source set to False), and the Sloc
1496 -- of this dummy identifier marks the location of the token following
1497 -- the END token.
1499 -- For the second group, the use of End_Label is similar, but the
1500 -- End_Label is found in the N_Handled_Sequence_Of_Statements node.
1501 -- This is done simply because in some cases there is no room in
1502 -- the parent node.
1504 -- For the third group, there is never any label, and instead of
1505 -- using End_Label, we use the End_Span field which gives the
1506 -- location of the token following END, relative to the starting
1507 -- Sloc of the construct, i.e. add Sloc (Node) + End_Span (Node)
1508 -- to get the Sloc of the IF or CASE following the End_Label.
1510 -- The record definition case is handled specially, we treat it
1511 -- as though it required an optional label which is never present,
1512 -- and so the parser always builds a dummy identifier with Comes
1513 -- From Source set False. The reason we do this, rather than using
1514 -- End_Span in this case, is that we want to generate a cross-ref
1515 -- entry for the end of a record, since it represents a scope for
1516 -- name declaration purposes.
1518 -- The enumeration definition case is handled in an exactly similar
1519 -- manner, building a dummy identifier to get a cross-reference.
1521 -- Note: the reason we store the difference as a Uint, instead of
1522 -- storing the Source_Ptr value directly, is that Source_Ptr values
1523 -- cannot be distinguished from other types of values, and we count
1524 -- on all general use fields being self describing. To make things
1525 -- easier for clients, note that we provide function End_Location,
1526 -- and procedure Set_End_Location to allow access to the logical
1527 -- value (which is the Source_Ptr value for the end token).
1529 ---------------------
1530 -- Syntactic Nodes --
1531 ---------------------
1533 ---------------------
1534 -- 2.3 Identifier --
1535 ---------------------
1537 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
1538 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
1540 -- An IDENTIFIER shall not be a reserved word
1542 -- In the Ada grammar identifiers are the bottom level tokens which
1543 -- have very few semantics. Actual program identifiers are direct
1544 -- names. If we were being 100% honest with the grammar, then we would
1545 -- have a node called N_Direct_Name which would point to an identifier.
1546 -- However, that's too many extra nodes, so we just use the N_Identifier
1547 -- node directly as a direct name, and it contains the expression fields
1548 -- and Entity field that correspond to its use as a direct name. In
1549 -- those few cases where identifiers appear in contexts where they are
1550 -- not direct names (pragmas, pragma argument associations, attribute
1551 -- references and attribute definition clauses), the Chars field of the
1552 -- node contains the Name_Id for the identifier name.
1554 -- Note: in GNAT, a reserved word can be treated as an identifier
1555 -- in two cases. First, an incorrect use of a reserved word as an
1556 -- identifier is diagnosed and then treated as a normal identifier.
1557 -- Second, an attribute designator of the form of a reserved word
1558 -- (access, delta, digits, range) is treated as an identifier.
1560 -- Note: The set of letters that is permitted in an identifier depends
1561 -- on the character set in use. See package Csets for full details.
1563 -- N_Identifier
1564 -- Sloc points to identifier
1565 -- Chars (Name1) contains the Name_Id for the identifier
1566 -- Entity (Node4-Sem)
1567 -- Associated_Node (Node4-Sem)
1568 -- Original_Discriminant (Node2-Sem)
1569 -- Redundant_Use (Flag13-Sem)
1570 -- Has_Private_View (Flag11-Sem) (set in generic units)
1571 -- plus fields for expression
1573 --------------------------
1574 -- 2.4 Numeric Literal --
1575 --------------------------
1577 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
1579 ----------------------------
1580 -- 2.4.1 Decimal Literal --
1581 ----------------------------
1583 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
1585 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
1587 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
1589 -- Decimal literals appear in the tree as either integer literal nodes
1590 -- or real literal nodes, depending on whether a period is present.
1592 -- Note: literal nodes appear as a result of direct use of literals
1593 -- in the source program, and also as the result of evaluating
1594 -- expressions at compile time. In the latter case, it is possible
1595 -- to construct real literals that have no syntactic representation
1596 -- using the standard literal format. Such literals are listed by
1597 -- Sprint using the notation [numerator / denominator].
1599 -- N_Integer_Literal
1600 -- Sloc points to literal
1601 -- Intval (Uint3) contains integer value of literal
1602 -- plus fields for expression
1603 -- Print_In_Hex (Flag13-Sem)
1605 -- N_Real_Literal
1606 -- Sloc points to literal
1607 -- Realval (Ureal3) contains real value of literal
1608 -- Corresponding_Integer_Value (Uint4-Sem)
1609 -- Is_Machine_Number (Flag11-Sem)
1610 -- plus fields for expression
1612 --------------------------
1613 -- 2.4.2 Based Literal --
1614 --------------------------
1616 -- BASED_LITERAL ::=
1617 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
1619 -- BASE ::= NUMERAL
1621 -- BASED_NUMERAL ::=
1622 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
1624 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
1626 -- Based literals appear in the tree as either integer literal nodes
1627 -- or real literal nodes, depending on whether a period is present.
1629 ----------------------------
1630 -- 2.5 Character Literal --
1631 ----------------------------
1633 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
1635 -- N_Character_Literal
1636 -- Sloc points to literal
1637 -- Chars (Name1) contains the Name_Id for the identifier
1638 -- Char_Literal_Value (Char_Code2) contains the literal value
1639 -- Entity (Node4-Sem)
1640 -- Associated_Node (Node4-Sem)
1641 -- Has_Private_View (Flag11-Sem) set in generic units.
1642 -- plus fields for expression
1644 -- Note: the Entity field will be missing (and set to Empty) for
1645 -- character literals whose type is Standard.Wide_Character or
1646 -- Standard.Character or a type derived from one of these two.
1647 -- In this case the character literal stands for its own coding.
1648 -- The reason we take this irregular short cut is to avoid the
1649 -- need to build lots of junk defining character literal nodes.
1651 -------------------------
1652 -- 2.6 String Literal --
1653 -------------------------
1655 -- STRING LITERAL ::= "{STRING_ELEMENT}"
1657 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
1658 -- single GRAPHIC_CHARACTER other than a quotation mark.
1660 -- N_String_Literal
1661 -- Sloc points to literal
1662 -- Strval (Str3) contains Id of string value
1663 -- Has_Wide_Character (Flag11-Sem)
1664 -- plus fields for expression
1666 ------------------
1667 -- 2.7 Comment --
1668 ------------------
1670 -- A COMMENT starts with two adjacent hyphens and extends up to the
1671 -- end of the line. A COMMENT may appear on any line of a program.
1673 -- Comments are skipped by the scanner and do not appear in the tree.
1674 -- It is possible to reconstruct the position of comments with respect
1675 -- to the elements of the tree by using the source position (Sloc)
1676 -- pointers that appear in every tree node.
1678 -----------------
1679 -- 2.8 Pragma --
1680 -----------------
1682 -- PRAGMA ::= pragma IDENTIFIER
1683 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
1685 -- Note that a pragma may appear in the tree anywhere a declaration
1686 -- or a statement may appear, as well as in some other situations
1687 -- which are explicitly documented.
1689 -- N_Pragma
1690 -- Sloc points to PRAGMA
1691 -- Chars (Name1) identifier name from pragma identifier
1692 -- Pragma_Argument_Associations (List2) (set to No_List if none)
1693 -- Debug_Statement (Node3) (set to Empty if not Debug, Assert)
1694 -- Next_Rep_Item (Node4-Sem)
1696 --------------------------------------
1697 -- 2.8 Pragma Argument Association --
1698 --------------------------------------
1700 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
1701 -- [pragma_argument_IDENTIFIER =>] NAME
1702 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
1704 -- N_Pragma_Argument_Association
1705 -- Sloc points to first token in association
1706 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
1707 -- Expression (Node3)
1709 ------------------------
1710 -- 2.9 Reserved Word --
1711 ------------------------
1713 -- Reserved words are parsed by the scanner, and returned as the
1714 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
1716 ----------------------------
1717 -- 3.1 Basic Declaration --
1718 ----------------------------
1720 -- BASIC_DECLARATION ::=
1721 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
1722 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
1723 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
1724 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
1725 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
1726 -- | GENERIC_INSTANTIATION
1728 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
1729 -- see further description in section on semantic nodes.
1731 -- Also, in the tree that is constructed, a pragma may appear
1732 -- anywhere that a declaration may appear.
1734 ------------------------------
1735 -- 3.1 Defining Identifier --
1736 ------------------------------
1738 -- DEFINING_IDENTIFIER ::= IDENTIFIER
1740 -- A defining identifier is an entity, which has additional fields
1741 -- depending on the setting of the Ekind field. These additional
1742 -- fields are defined (and access subprograms declared) in package
1743 -- Einfo.
1745 -- Note: N_Defining_Identifier is an extended node whose fields are
1746 -- deliberate layed out to match the layout of fields in an ordinary
1747 -- N_Identifier node allowing for easy alteration of an identifier
1748 -- node into a defining identifier node. For details, see procedure
1749 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
1751 -- N_Defining_Identifier
1752 -- Sloc points to identifier
1753 -- Chars (Name1) contains the Name_Id for the identifier
1754 -- Next_Entity (Node2-Sem)
1755 -- Scope (Node3-Sem)
1756 -- Etype (Node5-Sem)
1758 -----------------------------
1759 -- 3.2.1 Type Declaration --
1760 -----------------------------
1762 -- TYPE_DECLARATION ::=
1763 -- FULL_TYPE_DECLARATION
1764 -- | INCOMPLETE_TYPE_DECLARATION
1765 -- | PRIVATE_TYPE_DECLARATION
1766 -- | PRIVATE_EXTENSION_DECLARATION
1768 ----------------------------------
1769 -- 3.2.1 Full Type Declaration --
1770 ----------------------------------
1772 -- FULL_TYPE_DECLARATION ::=
1773 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
1774 -- is TYPE_DEFINITION;
1775 -- | TASK_TYPE_DECLARATION
1776 -- | PROTECTED_TYPE_DECLARATION
1778 -- The full type declaration node is used only for the first case. The
1779 -- second case (concurrent type declaration), is represented directly
1780 -- by a task type declaration or a protected type declaration.
1782 -- N_Full_Type_Declaration
1783 -- Sloc points to TYPE
1784 -- Defining_Identifier (Node1)
1785 -- Discriminant_Specifications (List4) (set to No_List if none)
1786 -- Type_Definition (Node3)
1787 -- Discr_Check_Funcs_Built (Flag11-Sem)
1789 ----------------------------
1790 -- 3.2.1 Type Definition --
1791 ----------------------------
1793 -- TYPE_DEFINITION ::=
1794 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
1795 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
1796 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
1797 -- | DERIVED_TYPE_DEFINITION
1799 --------------------------------
1800 -- 3.2.2 Subtype Declaration --
1801 --------------------------------
1803 -- SUBTYPE_DECLARATION ::=
1804 -- subtype DEFINING_IDENTIFIER is SUBTYPE_INDICATION;
1806 -- The subtype indication field is set to Empty for subtypes
1807 -- declared in package Standard (Positive, Natural).
1809 -- N_Subtype_Declaration
1810 -- Sloc points to SUBTYPE
1811 -- Defining_Identifier (Node1)
1812 -- Subtype_Indication (Node5)
1813 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
1814 -- Exception_Junk (Flag11-Sem)
1816 -------------------------------
1817 -- 3.2.2 Subtype Indication --
1818 -------------------------------
1820 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
1822 -- Note: if no constraint is present, the subtype indication appears
1823 -- directly in the tree as a subtype mark. The N_Subtype_Indication
1824 -- node is used only if a constraint is present.
1826 -- Note: the reason that this node has expression fields is that a
1827 -- subtype indication can appear as an operand of a membership test.
1829 -- N_Subtype_Indication
1830 -- Sloc points to first token of subtype mark
1831 -- Subtype_Mark (Node4)
1832 -- Constraint (Node3)
1833 -- Etype (Node5-Sem)
1834 -- Must_Not_Freeze (Flag8-Sem)
1836 -- Note: Etype is a copy of the Etype field of the Subtype_Mark. The
1837 -- reason for this redundancy is so that in a list of array index types,
1838 -- the Etype can be uniformly accessed to determine the subscript type.
1839 -- This means that no Itype is constructed for the actual subtype that
1840 -- is created by the subtype indication. If such an Itype is required,
1841 -- it is constructed in the context in which the indication appears.
1843 -------------------------
1844 -- 3.2.2 Subtype Mark --
1845 -------------------------
1847 -- SUBTYPE_MARK ::= subtype_NAME
1849 -----------------------
1850 -- 3.2.2 Constraint --
1851 -----------------------
1853 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
1855 ------------------------------
1856 -- 3.2.2 Scalar Constraint --
1857 ------------------------------
1859 -- SCALAR_CONSTRAINT ::=
1860 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
1862 ---------------------------------
1863 -- 3.2.2 Composite Constraint --
1864 ---------------------------------
1866 -- COMPOSITE_CONSTRAINT ::=
1867 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
1869 -------------------------------
1870 -- 3.3.1 Object Declaration --
1871 -------------------------------
1873 -- OBJECT_DECLARATION ::=
1874 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
1875 -- SUBTYPE_INDICATION [:= EXPRESSION];
1876 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
1877 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION];
1878 -- | SINGLE_TASK_DECLARATION
1879 -- | SINGLE_PROTECTED_DECLARATION
1881 -- Note: aliased is not permitted in Ada 83 mode
1883 -- The N_Object_Declaration node is only for the first two cases.
1884 -- Single task declaration is handled by P_Task (9.1)
1885 -- Single protected declaration is handled by P_protected (9.5)
1887 -- Although the syntax allows multiple identifiers in the list, the
1888 -- semantics is as though successive declarations were given with
1889 -- identical type definition and expression components. To simplify
1890 -- semantic processing, the parser represents a multiple declaration
1891 -- case as a sequence of single declarations, using the More_Ids and
1892 -- Prev_Ids flags to preserve the original source form as described
1893 -- in the section on "Handling of Defining Identifier Lists".
1895 -- Note: if a range check is required for the initialization
1896 -- expression then the Do_Range_Check flag is set in the Expression,
1897 -- with the check being done against the type given by the object
1898 -- definition, which is also the Etype of the defining identifier.
1900 -- Note: the contents of the Expression field must be ignored (i.e.
1901 -- treated as though it were Empty) if No_Initialization is set True.
1903 -- N_Object_Declaration
1904 -- Sloc points to first identifier
1905 -- Defining_Identifier (Node1)
1906 -- Aliased_Present (Flag4) set if ALIASED appears
1907 -- Constant_Present (Flag17) set if CONSTANT appears
1908 -- Object_Definition (Node4) subtype indication/array type definition
1909 -- Expression (Node3) (set to Empty if not present)
1910 -- Handler_List_Entry (Node2-Sem)
1911 -- Corresponding_Generic_Association (Node5-Sem)
1912 -- More_Ids (Flag5) (set to False if no more identifiers in list)
1913 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
1914 -- No_Initialization (Flag13-Sem)
1915 -- Assignment_OK (Flag15-Sem)
1916 -- Exception_Junk (Flag11-Sem)
1917 -- Delay_Finalize_Attach (Flag14-Sem)
1918 -- Is_Subprogram_Descriptor (Flag16-Sem)
1920 -------------------------------------
1921 -- 3.3.1 Defining Identifier List --
1922 -------------------------------------
1924 -- DEFINING_IDENTIFIER_LIST ::=
1925 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
1927 -------------------------------
1928 -- 3.3.2 Number Declaration --
1929 -------------------------------
1931 -- NUMBER_DECLARATION ::=
1932 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
1934 -- Although the syntax allows multiple identifiers in the list, the
1935 -- semantics is as though successive declarations were given with
1936 -- identical expressions. To simplify semantic processing, the parser
1937 -- represents a multiple declaration case as a sequence of single
1938 -- declarations, using the More_Ids and Prev_Ids flags to preserve
1939 -- the original source form as described in the section on "Handling
1940 -- of Defining Identifier Lists".
1942 -- N_Number_Declaration
1943 -- Sloc points to first identifier
1944 -- Defining_Identifier (Node1)
1945 -- Expression (Node3)
1946 -- More_Ids (Flag5) (set to False if no more identifiers in list)
1947 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
1949 ----------------------------------
1950 -- 3.4 Derived Type Definition --
1951 ----------------------------------
1953 -- DERIVED_TYPE_DEFINITION ::=
1954 -- [abstract] new parent_SUBTYPE_INDICATION [RECORD_EXTENSION_PART]
1956 -- Note: ABSTRACT, record extension part not permitted in Ada 83 mode
1958 -- Note: a record extension part is required if ABSTRACT is present
1960 -- N_Derived_Type_Definition
1961 -- Sloc points to NEW
1962 -- Abstract_Present (Flag4)
1963 -- Subtype_Indication (Node5)
1964 -- Record_Extension_Part (Node3) (set to Empty if not present)
1966 ---------------------------
1967 -- 3.5 Range Constraint --
1968 ---------------------------
1970 -- RANGE_CONSTRAINT ::= range RANGE
1972 -- N_Range_Constraint
1973 -- Sloc points to RANGE
1974 -- Range_Expression (Node4)
1976 ----------------
1977 -- 3.5 Range --
1978 ----------------
1980 -- RANGE ::=
1981 -- RANGE_ATTRIBUTE_REFERENCE
1982 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
1984 -- Note: the case of a range given as a range attribute reference
1985 -- appears directly in the tree as an attribute reference.
1987 -- Note: the field name for a reference to a range is Range_Expression
1988 -- rather than Range, because range is a reserved keyword in Ada!
1990 -- Note: the reason that this node has expression fields is that a
1991 -- range can appear as an operand of a membership test. The Etype
1992 -- field is the type of the range (we do NOT construct an implicit
1993 -- subtype to represent the range exactly).
1995 -- N_Range
1996 -- Sloc points to ..
1997 -- Low_Bound (Node1)
1998 -- High_Bound (Node2)
1999 -- Includes_Infinities (Flag11)
2000 -- plus fields for expression
2002 -- Note: if the range appears in a context, such as a subtype
2003 -- declaration, where range checks are required on one or both of
2004 -- the expression fields, then type conversion nodes are inserted
2005 -- to represent the required checks.
2007 ----------------------------------------
2008 -- 3.5.1 Enumeration Type Definition --
2009 ----------------------------------------
2011 -- ENUMERATION_TYPE_DEFINITION ::=
2012 -- (ENUMERATION_LITERAL_SPECIFICATION
2013 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2015 -- Note: the Literals field in the node described below is null for
2016 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2017 -- which special processing handles these types as special cases.
2019 -- N_Enumeration_Type_Definition
2020 -- Sloc points to left parenthesis
2021 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2022 -- End_Label (Node4) (set to Empty if internally generated record)
2024 ----------------------------------------------
2025 -- 3.5.1 Enumeration Literal Specification --
2026 ----------------------------------------------
2028 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2029 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2031 ---------------------------------------
2032 -- 3.5.1 Defining Character Literal --
2033 ---------------------------------------
2035 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2037 -- A defining character literal is an entity, which has additional
2038 -- fields depending on the setting of the Ekind field. These
2039 -- additional fields are defined (and access subprograms declared)
2040 -- in package Einfo.
2042 -- Note: N_Defining_Character_Literal is an extended node whose fields
2043 -- are deliberate layed out to match the layout of fields in an ordinary
2044 -- N_Character_Literal node allowing for easy alteration of a character
2045 -- literal node into a defining character literal node. For details, see
2046 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2048 -- N_Defining_Character_Literal
2049 -- Sloc points to literal
2050 -- Chars (Name1) contains the Name_Id for the identifier
2051 -- Next_Entity (Node2-Sem)
2052 -- Scope (Node3-Sem)
2053 -- Etype (Node5-Sem)
2055 ------------------------------------
2056 -- 3.5.4 Integer Type Definition --
2057 ------------------------------------
2059 -- Note: there is an error in this rule in the latest version of the
2060 -- grammar, so we have retained the old rule pending clarification.
2062 -- INTEGER_TYPE_DEFINITION ::=
2063 -- SIGNED_INTEGER_TYPE_DEFINITION
2064 -- MODULAR_TYPE_DEFINITION
2066 -------------------------------------------
2067 -- 3.5.4 Signed Integer Type Definition --
2068 -------------------------------------------
2070 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2071 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2073 -- Note: the Low_Bound and High_Bound fields are set to Empty for
2074 -- integer types defined in package Standard.
2076 -- N_Signed_Integer_Type_Definition
2077 -- Sloc points to RANGE
2078 -- Low_Bound (Node1)
2079 -- High_Bound (Node2)
2081 -----------------------------------------
2082 -- 3.5.4 Unsigned Range Specification --
2083 -----------------------------------------
2085 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2087 -- N_Modular_Type_Definition
2088 -- Sloc points to MOD
2089 -- Expression (Node3)
2091 ---------------------------------
2092 -- 3.5.6 Real Type Definition --
2093 ---------------------------------
2095 -- REAL_TYPE_DEFINITION ::=
2096 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2098 --------------------------------------
2099 -- 3.5.7 Floating Point Definition --
2100 --------------------------------------
2102 -- FLOATING_POINT_DEFINITION ::=
2103 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2105 -- Note: The Digits_Expression and Real_Range_Specifications fields
2106 -- are set to Empty for floating-point types declared in Standard.
2108 -- N_Floating_Point_Definition
2109 -- Sloc points to DIGITS
2110 -- Digits_Expression (Node2)
2111 -- Real_Range_Specification (Node4) (set to Empty if not present)
2113 -------------------------------------
2114 -- 3.5.7 Real Range Specification --
2115 -------------------------------------
2117 -- REAL_RANGE_SPECIFICATION ::=
2118 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2120 -- N_Real_Range_Specification
2121 -- Sloc points to RANGE
2122 -- Low_Bound (Node1)
2123 -- High_Bound (Node2)
2125 -----------------------------------
2126 -- 3.5.9 Fixed Point Definition --
2127 -----------------------------------
2129 -- FIXED_POINT_DEFINITION ::=
2130 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2132 --------------------------------------------
2133 -- 3.5.9 Ordinary Fixed Point Definition --
2134 --------------------------------------------
2136 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2137 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2139 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2141 -- Note: the Delta_Expression and Real_Range_Specification fields
2142 -- are set to Empty for fixed point types declared in Standard.
2144 -- N_Ordinary_Fixed_Point_Definition
2145 -- Sloc points to DELTA
2146 -- Delta_Expression (Node3)
2147 -- Real_Range_Specification (Node4)
2149 -------------------------------------------
2150 -- 3.5.9 Decimal Fixed Point Definition --
2151 -------------------------------------------
2153 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2154 -- delta static_EXPRESSION
2155 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2157 -- Note: decimal types are not permitted in Ada 83 mode
2159 -- N_Decimal_Fixed_Point_Definition
2160 -- Sloc points to DELTA
2161 -- Delta_Expression (Node3)
2162 -- Digits_Expression (Node2)
2163 -- Real_Range_Specification (Node4) (set to Empty if not present)
2165 ------------------------------
2166 -- 3.5.9 Digits Constraint --
2167 ------------------------------
2169 -- DIGITS_CONSTRAINT ::=
2170 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2172 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2173 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2175 -- N_Digits_Constraint
2176 -- Sloc points to DIGITS
2177 -- Digits_Expression (Node2)
2178 -- Range_Constraint (Node4) (set to Empty if not present)
2180 --------------------------------
2181 -- 3.6 Array Type Definition --
2182 --------------------------------
2184 -- ARRAY_TYPE_DEFINITION ::=
2185 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2187 -----------------------------------------
2188 -- 3.6 Unconstrained Array Definition --
2189 -----------------------------------------
2191 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2192 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2193 -- COMPONENT_DEFINITION
2195 -- Note: dimensionality of array is indicated by number of entries in
2196 -- the Subtype_Marks list, which has one entry for each dimension.
2198 -- N_Unconstrained_Array_Definition
2199 -- Sloc points to ARRAY
2200 -- Subtype_Marks (List2)
2201 -- Aliased_Present (Flag4) from component definition
2202 -- Subtype_Indication (Node5) from component definition
2204 -----------------------------------
2205 -- 3.6 Index Subtype Definition --
2206 -----------------------------------
2208 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2210 -- There is no explicit node in the tree for an index subtype
2211 -- definition since the N_Unconstrained_Array_Definition node
2212 -- incorporates the type marks which appear in this context.
2214 ---------------------------------------
2215 -- 3.6 Constrained Array Definition --
2216 ---------------------------------------
2218 -- CONSTRAINED_ARRAY_DEFINITION ::=
2219 -- array (DISCRETE_SUBTYPE_DEFINITION
2220 -- {, DISCRETE_SUBTYPE_DEFINITION})
2221 -- of COMPONENT_DEFINITION
2223 -- Note: dimensionality of array is indicated by number of entries
2224 -- in the Discrete_Subtype_Definitions list, which has one entry
2225 -- for each dimension.
2227 -- N_Constrained_Array_Definition
2228 -- Sloc points to ARRAY
2229 -- Discrete_Subtype_Definitions (List2)
2230 -- Aliased_Present (Flag4) from component definition
2231 -- Subtype_Indication (Node5) from component definition
2233 --------------------------------------
2234 -- 3.6 Discrete Subtype Definition --
2235 --------------------------------------
2237 -- DISCRETE_SUBTYPE_DEFINITION ::=
2238 -- discrete_SUBTYPE_INDICATION | RANGE
2240 -------------------------------
2241 -- 3.6 Component Definition --
2242 -------------------------------
2244 -- COMPONENT_DEFINITION ::= [aliased] SUBTYPE_INDICATION
2246 -- There is no explicit node in the tree for a component definition.
2247 -- Instead the subtype indication appears directly, and the ALIASED
2248 -- indication (Aliased_Present flag) is in the parent node.
2250 -- Note: although the syntax does not permit a component definition to
2251 -- be an anonymous array (and the parser will diagnose such an attempt
2252 -- with an appropriate message), it is possible for anonymous arrays
2253 -- to appear as component definitions. The semantics and back end handle
2254 -- this case properly, and the expander in fact generates such cases.
2256 -----------------------------
2257 -- 3.6.1 Index Constraint --
2258 -----------------------------
2260 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
2262 -- It is not in general possible to distinguish between discriminant
2263 -- constraints and index constraints at parse time, since a simple
2264 -- name could be either the subtype mark of a discrete range, or an
2265 -- expression in a discriminant association with no name. Either
2266 -- entry appears simply as the name, and the semantic parse must
2267 -- distinguish between the two cases. Thus we use a common tree
2268 -- node format for both of these constraint types.
2270 -- See Discriminant_Constraint for format of node
2272 ---------------------------
2273 -- 3.6.1 Discrete Range --
2274 ---------------------------
2276 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
2278 ----------------------------
2279 -- 3.7 Discriminant Part --
2280 ----------------------------
2282 -- DISCRIMINANT_PART ::=
2283 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
2285 ------------------------------------
2286 -- 3.7 Unknown Discriminant Part --
2287 ------------------------------------
2289 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
2291 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
2293 -- There is no explicit node in the tree for an unknown discriminant
2294 -- part. Instead the Unknown_Discriminants_Present flag is set in the
2295 -- parent node.
2297 ----------------------------------
2298 -- 3.7 Known Discriminant Part --
2299 ----------------------------------
2301 -- KNOWN_DISCRIMINANT_PART ::=
2302 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
2304 -------------------------------------
2305 -- 3.7 Discriminant Specification --
2306 -------------------------------------
2308 -- DISCRIMINANT_SPECIFICATION ::=
2309 -- DEFINING_IDENTIFIER_LIST : SUBTYPE_MARK
2310 -- [:= DEFAULT_EXPRESSION]
2311 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
2312 -- [:= DEFAULT_EXPRESSION]
2314 -- Although the syntax allows multiple identifiers in the list, the
2315 -- semantics is as though successive specifications were given with
2316 -- identical type definition and expression components. To simplify
2317 -- semantic processing, the parser represents a multiple declaration
2318 -- case as a sequence of single specifications, using the More_Ids and
2319 -- Prev_Ids flags to preserve the original source form as described
2320 -- in the section on "Handling of Defining Identifier Lists".
2322 -- N_Discriminant_Specification
2323 -- Sloc points to first identifier
2324 -- Defining_Identifier (Node1)
2325 -- Discriminant_Type (Node5) subtype mark or
2326 -- access parameter definition
2327 -- Expression (Node3) (set to Empty if no default expression)
2328 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2329 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2331 -----------------------------
2332 -- 3.7 Default Expression --
2333 -----------------------------
2335 -- DEFAULT_EXPRESSION ::= EXPRESSION
2337 ------------------------------------
2338 -- 3.7.1 Discriminant Constraint --
2339 ------------------------------------
2341 -- DISCRIMINANT_CONSTRAINT ::=
2342 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
2344 -- It is not in general possible to distinguish between discriminant
2345 -- constraints and index constraints at parse time, since a simple
2346 -- name could be either the subtype mark of a discrete range, or an
2347 -- expression in a discriminant association with no name. Either
2348 -- entry appears simply as the name, and the semantic parse must
2349 -- distinguish between the two cases. Thus we use a common tree
2350 -- node format for both of these constraint types.
2352 -- N_Index_Or_Discriminant_Constraint
2353 -- Sloc points to left paren
2354 -- Constraints (List1) points to list of discrete ranges or
2355 -- discriminant associations
2357 -------------------------------------
2358 -- 3.7.1 Discriminant Association --
2359 -------------------------------------
2361 -- DISCRIMINANT_ASSOCIATION ::=
2362 -- [discriminant_SELECTOR_NAME
2363 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
2365 -- Note: a discriminant association that has no selector name list
2366 -- appears directly as an expression in the tree.
2368 -- N_Discriminant_Association
2369 -- Sloc points to first token of discriminant association
2370 -- Selector_Names (List1) (always non-empty, since if no selector
2371 -- names are present, this node is not used, see comment above)
2372 -- Expression (Node3)
2374 ---------------------------------
2375 -- 3.8 Record Type Definition --
2376 ---------------------------------
2378 -- RECORD_TYPE_DEFINITION ::=
2379 -- [[abstract] tagged] [limited] RECORD_DEFINITION
2381 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
2383 -- There is no explicit node in the tree for a record type definition.
2384 -- Instead the flags for Tagged_Present and Limited_Present appear in
2385 -- the N_Record_Definition node for a record definition appearing in
2386 -- the context of a record type definition.
2388 ----------------------------
2389 -- 3.8 Record Definition --
2390 ----------------------------
2392 -- RECORD_DEFINITION ::=
2393 -- record
2394 -- COMPONENT_LIST
2395 -- end record
2396 -- | null record
2398 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
2399 -- flags appear only for a record definition appearing in a record
2400 -- type definition.
2402 -- Note: the NULL RECORD case is not permitted in Ada 83
2404 -- N_Record_Definition
2405 -- Sloc points to RECORD or NULL
2406 -- End_Label (Node4) (set to Empty if internally generated record)
2407 -- Abstract_Present (Flag4)
2408 -- Tagged_Present (Flag15)
2409 -- Limited_Present (Flag17)
2410 -- Component_List (Node1) empty in null record case
2411 -- Null_Present (Flag13) set in null record case
2413 -------------------------
2414 -- 3.8 Component List --
2415 -------------------------
2417 -- COMPONENT_LIST ::=
2418 -- COMPONENT_ITEM {COMPONENT_ITEM}
2419 -- | {COMPONENT_ITEM} VARIANT_PART
2420 -- | null;
2422 -- N_Component_List
2423 -- Sloc points to first token of component list
2424 -- Component_Items (List3)
2425 -- Variant_Part (Node4) (set to Empty if no variant part)
2426 -- Null_Present (Flag13)
2428 -------------------------
2429 -- 3.8 Component Item --
2430 -------------------------
2432 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
2434 -- Note: A component item can also be a pragma, and in the tree
2435 -- that is obtained after semantic processing, a component item
2436 -- can be an N_Null node resulting from a non-recognized pragma.
2438 --------------------------------
2439 -- 3.8 Component Declaration --
2440 --------------------------------
2442 -- COMPONENT_DECLARATION ::=
2443 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
2444 -- [:= DEFAULT_EXPRESSION]
2446 -- Note: although the syntax does not permit a component definition to
2447 -- be an anonymous array (and the parser will diagnose such an attempt
2448 -- with an appropriate message), it is possible for anonymous arrays
2449 -- to appear as component definitions. The semantics and back end handle
2450 -- this case properly, and the expander in fact generates such cases.
2452 -- Although the syntax allows multiple identifiers in the list, the
2453 -- semantics is as though successive declarations were given with the
2454 -- same component definition and expression components. To simplify
2455 -- semantic processing, the parser represents a multiple declaration
2456 -- case as a sequence of single declarations, using the More_Ids and
2457 -- Prev_Ids flags to preserve the original source form as described
2458 -- in the section on "Handling of Defining Identifier Lists".
2460 -- N_Component_Declaration
2461 -- Sloc points to first identifier
2462 -- Defining_Identifier (Node1)
2463 -- Aliased_Present (Flag4) from component definition
2464 -- Subtype_Indication (Node5) from component definition
2465 -- Expression (Node3) (set to Empty if no default expression)
2466 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2467 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2469 -------------------------
2470 -- 3.8.1 Variant Part --
2471 -------------------------
2473 -- VARIANT_PART ::=
2474 -- case discriminant_DIRECT_NAME is
2475 -- VARIANT
2476 -- {VARIANT}
2477 -- end case;
2479 -- Note: the variants list can contain pragmas as well as variants.
2480 -- In a properly formed program there is at least one variant.
2482 -- N_Variant_Part
2483 -- Sloc points to CASE
2484 -- Name (Node2)
2485 -- Variants (List1)
2487 --------------------
2488 -- 3.8.1 Variant --
2489 --------------------
2491 -- VARIANT ::=
2492 -- when DISCRETE_CHOICE_LIST =>
2493 -- COMPONENT_LIST
2495 -- N_Variant
2496 -- Sloc points to WHEN
2497 -- Discrete_Choices (List4)
2498 -- Component_List (Node1)
2499 -- Enclosing_Variant (Node2-Sem)
2500 -- Present_Expr (Uint3-Sem)
2501 -- Dcheck_Function (Node5-Sem)
2503 ---------------------------------
2504 -- 3.8.1 Discrete Choice List --
2505 ---------------------------------
2507 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
2509 ----------------------------
2510 -- 3.8.1 Discrete Choice --
2511 ----------------------------
2513 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
2515 -- Note: in Ada 83 mode, the expression must be a simple expression
2517 -- The only choice that appears explicitly is the OTHERS choice, as
2518 -- defined here. Other cases of discrete choice (expression and
2519 -- discrete range) appear directly. This production is also used
2520 -- for the OTHERS possibility of an exception choice.
2522 -- Note: in accordance with the syntax, the parser does not check that
2523 -- OTHERS appears at the end on its own in a choice list context. This
2524 -- is a semantic check.
2526 -- N_Others_Choice
2527 -- Sloc points to OTHERS
2528 -- Others_Discrete_Choices (List1-Sem)
2529 -- All_Others (Flag11-Sem)
2531 ----------------------------------
2532 -- 3.9.1 Record Extension Part --
2533 ----------------------------------
2535 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
2537 -- Note: record extension parts are not permitted in Ada 83 mode
2539 ----------------------------------
2540 -- 3.10 Access Type Definition --
2541 ----------------------------------
2543 -- ACCESS_TYPE_DEFINITION ::=
2544 -- ACCESS_TO_OBJECT_DEFINITION
2545 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
2547 ---------------------------------------
2548 -- 3.10 Access To Object Definition --
2549 ---------------------------------------
2551 -- ACCESS_TO_OBJECT_DEFINITION ::=
2552 -- access [GENERAL_ACCESS_MODIFIER] SUBTYPE_INDICATION
2554 -- N_Access_To_Object_Definition
2555 -- Sloc points to ACCESS
2556 -- All_Present (Flag15)
2557 -- Subtype_Indication (Node5)
2558 -- Constant_Present (Flag17)
2560 -----------------------------------
2561 -- 3.10 General Access Modifier --
2562 -----------------------------------
2564 -- GENERAL_ACCESS_MODIFIER ::= all | constant
2566 -- Note: general access modifiers are not permitted in Ada 83 mode
2568 -- There is no explicit node in the tree for general access modifier.
2569 -- Instead the All_Present or Constant_Present flags are set in the
2570 -- parent node.
2572 -------------------------------------------
2573 -- 3.10 Access To Subprogram Definition --
2574 -------------------------------------------
2576 -- ACCESS_TO_SUBPROGRAM_DEFINITION
2577 -- access [protected] procedure PARAMETER_PROFILE
2578 -- | access [protected] function PARAMETER_AND_RESULT_PROFILE
2580 -- Note: access to subprograms are not permitted in Ada 83 mode
2582 -- N_Access_Function_Definition
2583 -- Sloc points to ACCESS
2584 -- Protected_Present (Flag15)
2585 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2586 -- Subtype_Mark (Node4) result subtype
2588 -- N_Access_Procedure_Definition
2589 -- Sloc points to ACCESS
2590 -- Protected_Present (Flag15)
2591 -- Parameter_Specifications (List3) (set to No_List if no formal part)
2593 -----------------------------
2594 -- 3.10 Access Definition --
2595 -----------------------------
2597 -- ACCESS_DEFINITION ::= access SUBTYPE_MARK
2599 -- N_Access_Definition
2600 -- Sloc points to ACCESS
2601 -- Subtype_Mark (Node4)
2603 -----------------------------------------
2604 -- 3.10.1 Incomplete Type Declaration --
2605 -----------------------------------------
2607 -- INCOMPLETE_TYPE_DECLARATION ::=
2608 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART];
2610 -- N_Incomplete_Type_Declaration
2611 -- Sloc points to TYPE
2612 -- Defining_Identifier (Node1)
2613 -- Discriminant_Specifications (List4) (set to No_List if no
2614 -- discriminant part, or if the discriminant part is an
2615 -- unknown discriminant part)
2616 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
2618 ----------------------------
2619 -- 3.11 Declarative Part --
2620 ----------------------------
2622 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
2624 -- Note: although the parser enforces the syntactic requirement that
2625 -- a declarative part can contain only declarations, the semantic
2626 -- processing may add statements to the list of actions in a
2627 -- declarative part, so the code generator should be prepared
2628 -- to accept a statement in this position.
2630 ----------------------------
2631 -- 3.11 Declarative Item --
2632 ----------------------------
2634 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
2636 ----------------------------------
2637 -- 3.11 Basic Declarative Item --
2638 ----------------------------------
2640 -- BASIC_DECLARATIVE_ITEM ::=
2641 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
2643 ----------------
2644 -- 3.11 Body --
2645 ----------------
2647 -- BODY ::= PROPER_BODY | BODY_STUB
2649 -----------------------
2650 -- 3.11 Proper Body --
2651 -----------------------
2653 -- PROPER_BODY ::=
2654 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
2656 ---------------
2657 -- 4.1 Name --
2658 ---------------
2660 -- NAME ::=
2661 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
2662 -- | INDEXED_COMPONENT | SLICE
2663 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
2664 -- | TYPE_CONVERSION | FUNCTION_CALL
2665 -- | CHARACTER_LITERAL
2667 ----------------------
2668 -- 4.1 Direct Name --
2669 ----------------------
2671 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
2673 -----------------
2674 -- 4.1 Prefix --
2675 -----------------
2677 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
2679 -------------------------------
2680 -- 4.1 Explicit Dereference --
2681 -------------------------------
2683 -- EXPLICIT_DEREFERENCE ::= NAME . all
2685 -- N_Explicit_Dereference
2686 -- Sloc points to ALL
2687 -- Prefix (Node3)
2688 -- Do_Access_Check (Flag11-Sem)
2689 -- plus fields for expression
2691 -------------------------------
2692 -- 4.1 Implicit Dereference --
2693 -------------------------------
2695 -- IMPLICIT_DEREFERENCE ::= NAME
2697 ------------------------------
2698 -- 4.1.1 Indexed Component --
2699 ------------------------------
2701 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
2703 -- Note: the parser may generate this node in some situations where it
2704 -- should be a function call. The semantic pass must correct this
2705 -- misidentification (which is inevitable at the parser level).
2707 -- N_Indexed_Component
2708 -- Sloc contains a copy of the Sloc value of the Prefix
2709 -- Prefix (Node3)
2710 -- Expressions (List1)
2711 -- Do_Access_Check (Flag11-Sem)
2712 -- plus fields for expression
2714 -- Note: if any of the subscripts requires a range check, then the
2715 -- Do_Range_Check flag is set on the corresponding expression, with
2716 -- the index type being determined from the type of the Prefix, which
2717 -- references the array being indexed.
2719 -- Note: in a fully analyzed and expanded indexed component node, and
2720 -- hence in any such node that gigi sees, if the prefix is an access
2721 -- type, then an explicit dereference operation has been inserted.
2723 ------------------
2724 -- 4.1.2 Slice --
2725 ------------------
2727 -- SLICE ::= PREFIX (DISCRETE_RANGE)
2729 -- Note: an implicit subtype is created to describe the resulting
2730 -- type, so that the bounds of this type are the bounds of the slice.
2732 -- N_Slice
2733 -- Sloc points to first token of prefix
2734 -- Prefix (Node3)
2735 -- Discrete_Range (Node4)
2736 -- Do_Access_Check (Flag11-Sem)
2737 -- plus fields for expression
2739 -------------------------------
2740 -- 4.1.3 Selected Component --
2741 -------------------------------
2743 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
2745 -- Note: selected components that are semantically expanded names get
2746 -- changed during semantic processing into the separate N_Expanded_Name
2747 -- node. See description of this node in the section on semantic nodes.
2749 -- N_Selected_Component
2750 -- Sloc points to period
2751 -- Prefix (Node3)
2752 -- Selector_Name (Node2)
2753 -- Associated_Node (Node4-Sem)
2754 -- Do_Access_Check (Flag11-Sem)
2755 -- Do_Discriminant_Check (Flag13-Sem)
2756 -- plus fields for expression
2758 --------------------------
2759 -- 4.1.3 Selector Name --
2760 --------------------------
2762 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
2764 --------------------------------
2765 -- 4.1.4 Attribute Reference --
2766 --------------------------------
2768 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
2770 -- Note: the syntax is quite ambiguous at this point. Consider:
2772 -- A'Length (X) X is part of the attribute designator
2773 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
2774 -- A'Class (X) X is the expression of a type conversion
2776 -- It would be possible for the parser to distinguish these cases
2777 -- by looking at the attribute identifier. However, that would mean
2778 -- more work in introducing new implementation defined attributes,
2779 -- and also it would mean that special processing for attributes
2780 -- would be scattered around, instead of being centralized in the
2781 -- semantic routine that handles an N_Attribute_Reference node.
2782 -- Consequently, the parser in all the above cases stores the
2783 -- expression (X in these examples) as a single element list in
2784 -- in the Expressions field of the N_Attribute_Reference node.
2786 -- Similarly, for attributes like Max which take two arguments,
2787 -- we store the two arguments as a two element list in the
2788 -- Expressions field. Of course it is clear at parse time that
2789 -- this case is really a function call with an attribute as the
2790 -- prefix, but it turns out to be convenient to handle the two
2791 -- argument case in a similar manner to the one argument case,
2792 -- and indeed in general the parser will accept any number of
2793 -- expressions in this position and store them as a list in the
2794 -- attribute reference node. This allows for future addition of
2795 -- attributes that take more than two arguments.
2797 -- Note: named associates are not permitted in function calls where
2798 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
2799 -- to skip the normal subprogram argument processing.
2801 -- Note: for the attributes whose designators are technically keywords,
2802 -- i.e. digits, access, delta, range, the Attribute_Name field contains
2803 -- the corresponding name, even though no identifier is involved.
2805 -- The flag OK_For_Stream is used in generated code to indicate that
2806 -- a stream attribute is permissible for a limited type, and results
2807 -- in the use of the stream attribute for the underlying full type,
2808 -- or in the case of a protected type, the components (including any
2809 -- disriminants) are merely streamed in order.
2811 -- See Exp_Attr for a complete description of which attributes are
2812 -- passed onto Gigi, and which are handled entirely by the front end.
2814 -- Gigi restriction: For the Pos attribute, the prefix cannot be
2815 -- a non-standard enumeration type or a nonzero/zero semantics
2816 -- boolean type, so the value is simply the stored representation.
2818 -- Note: In generated code, the Address and Unrestricted_Access
2819 -- attributes can be applied to any expression, and the meaning is
2820 -- to create an object containing the value (the object is in the
2821 -- current stack frame), and pass the address of this value. If the
2822 -- Must_Be_Byte_Aligned flag is set, then the object whose address
2823 -- is taken must be on a byte (storage unit) boundary, and if it is
2824 -- not (or may not be), then the generated code must create a copy
2825 -- that is byte aligned, and pass the address of this copy.
2827 -- N_Attribute_Reference
2828 -- Sloc points to apostrophe
2829 -- Prefix (Node3)
2830 -- Attribute_Name (Name2) identifier name from attribute designator
2831 -- Expressions (List1) (set to No_List if no associated expressions)
2832 -- Entity (Node4-Sem) used if the attribute yields a type
2833 -- Associated_Node (Node4-Sem)
2834 -- Do_Access_Check (Flag11-Sem)
2835 -- Do_Overflow_Check (Flag17-Sem)
2836 -- Redundant_Use (Flag13-Sem)
2837 -- OK_For_Stream (Flag4-Sem)
2838 -- Must_Be_Byte_Aligned (Flag14)
2839 -- plus fields for expression
2841 ---------------------------------
2842 -- 4.1.4 Attribute Designator --
2843 ---------------------------------
2845 -- ATTRIBUTE_DESIGNATOR ::=
2846 -- IDENTIFIER [(static_EXPRESSION)]
2847 -- | access | delta | digits
2849 -- There is no explicit node in the tree for an attribute designator.
2850 -- Instead the Attribute_Name and Expressions fields of the parent
2851 -- node (N_Attribute_Reference node) hold the information.
2853 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
2854 -- designator, then they are treated as identifiers internally
2855 -- rather than the keywords of the same name.
2857 --------------------------------------
2858 -- 4.1.4 Range Attribute Reference --
2859 --------------------------------------
2861 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
2863 -- A range attribute reference is represented in the tree using the
2864 -- normal N_Attribute_Reference node.
2866 ---------------------------------------
2867 -- 4.1.4 Range Attribute Designator --
2868 ---------------------------------------
2870 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
2872 -- A range attribute designator is represented in the tree using the
2873 -- normal N_Attribute_Reference node.
2875 --------------------
2876 -- 4.3 Aggregate --
2877 --------------------
2879 -- AGGREGATE ::=
2880 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
2882 -----------------------------
2883 -- 4.3.1 Record Aggregate --
2884 -----------------------------
2886 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
2888 -- N_Aggregate
2889 -- Sloc points to left parenthesis
2890 -- Expressions (List1) (set to No_List if none or null record case)
2891 -- Component_Associations (List2) (set to No_List if none)
2892 -- Null_Record_Present (Flag17)
2893 -- Aggregate_Bounds (Node3-Sem)
2894 -- Associated_Node (Node4-Sem)
2895 -- Static_Processing_OK (Flag4-Sem)
2896 -- Compile_Time_Known_Aggregate (Flag18-Sem)
2897 -- Expansion_Delayed (Flag11-Sem)
2898 -- plus fields for expression
2900 -- Note: this structure is used for both record and array aggregates
2901 -- since the two cases are not separable by the parser. The parser
2902 -- makes no attempt to enforce consistency here, so it is up to the
2903 -- semantic phase to make sure that the aggregate is consistent (i.e.
2904 -- that it is not a "half-and-half" case that mixes record and array
2905 -- syntax. In particular, for a record aggregate, the expressions
2906 -- field will be set if there are positional associations.
2908 -- Note: gigi/gcc can handle array aggregates correctly providing that
2909 -- they are entirely positional, and the array subtype involved has a
2910 -- known at compile time length and is not bit packed, or a convention
2911 -- Fortran array with more than one dimension. If these conditions
2912 -- are not met, then the front end must translate the aggregate into
2913 -- an appropriate set of assignments into a temporary.
2915 -- Note: for the record aggregate case, gigi/gcc can handle all cases
2916 -- of record aggregates, including those for packed, and rep-claused
2917 -- records, and also variant records, providing that there are no
2918 -- variable length fields whose size is not known at runtime, and
2919 -- providing that the aggregate is presented in fully named form.
2921 ----------------------------------------------
2922 -- 4.3.1 Record Component Association List --
2923 ----------------------------------------------
2925 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
2926 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
2927 -- | null record
2929 -- There is no explicit node in the tree for a record component
2930 -- association list. Instead the Null_Record_Present flag is set in
2931 -- the parent node for the NULL RECORD case.
2933 ------------------------------------------------------
2934 -- 4.3.1 Record Component Association (also 4.3.3) --
2935 ------------------------------------------------------
2937 -- RECORD_COMPONENT_ASSOCIATION ::=
2938 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
2940 -- N_Component_Association
2941 -- Sloc points to first selector name
2942 -- Choices (List1)
2943 -- Loop_Actions (List2-Sem)
2944 -- Expression (Node3)
2946 -- Note: this structure is used for both record component associations
2947 -- and array component associations, since the two cases aren't always
2948 -- separable by the parser. The choices list may represent either a
2949 -- list of selector names in the record aggregate case, or a list of
2950 -- discrete choices in the array aggregate case or an N_Others_Choice
2951 -- node (which appears as a singleton list).
2953 ------------------------------------
2954 -- 4.3.1 Commponent Choice List --
2955 ------------------------------------
2957 -- COMPONENT_CHOICE_LIST ::=
2958 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
2959 -- | others
2961 -- The entries of a component choice list appear in the Choices list
2962 -- of the associated N_Component_Association, as either selector
2963 -- names, or as an N_Others_Choice node.
2965 --------------------------------
2966 -- 4.3.2 Extension Aggregate --
2967 --------------------------------
2969 -- EXTENSION_AGGREGATE ::=
2970 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
2972 -- Note: extension aggregates are not permitted in Ada 83 mode
2974 -- N_Extension_Aggregate
2975 -- Sloc points to left parenthesis
2976 -- Ancestor_Part (Node3)
2977 -- Associated_Node (Node4-Sem)
2978 -- Expressions (List1) (set to No_List if none or null record case)
2979 -- Component_Associations (List2) (set to No_List if none)
2980 -- Null_Record_Present (Flag17)
2981 -- Expansion_Delayed (Flag11-Sem)
2982 -- plus fields for expression
2984 --------------------------
2985 -- 4.3.2 Ancestor Part --
2986 --------------------------
2988 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
2990 ----------------------------
2991 -- 4.3.3 Array Aggregate --
2992 ----------------------------
2994 -- ARRAY_AGGREGATE ::=
2995 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
2997 ---------------------------------------
2998 -- 4.3.3 Positional Array Aggregate --
2999 ---------------------------------------
3001 -- POSITIONAL_ARRAY_AGGREGATE ::=
3002 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3003 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3005 -- See Record_Aggregate (4.3.1) for node structure
3007 ----------------------------------
3008 -- 4.3.3 Named Array Aggregate --
3009 ----------------------------------
3011 -- NAMED_ARRAY_AGGREGATE ::=
3012 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3014 -- See Record_Aggregate (4.3.1) for node structure
3016 ----------------------------------------
3017 -- 4.3.3 Array Component Association --
3018 ----------------------------------------
3020 -- ARRAY_COMPONENT_ASSOCIATION ::=
3021 -- DISCRETE_CHOICE_LIST => EXPRESSION
3023 -- See Record_Component_Association (4.3.1) for node structure
3025 --------------------------------------------------
3026 -- 4.4 Expression/Relation/Term/Factor/Primary --
3027 --------------------------------------------------
3029 -- EXPRESSION ::=
3030 -- RELATION {and RELATION} | RELATION {and then RELATION}
3031 -- | RELATION {or RELATION} | RELATION {or else RELATION}
3032 -- | RELATION {xor RELATION}
3034 -- RELATION ::=
3035 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3036 -- | SIMPLE_EXPRESSION [not] in RANGE
3037 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3039 -- SIMPLE_EXPRESSION ::=
3040 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3042 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3044 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3046 -- No nodes are generated for any of these constructs. Instead, the
3047 -- node for the operator appears directly. When we refer to an
3048 -- expression in this description, we mean any of the possible
3049 -- consistuent components of an expression (e.g. identifier is
3050 -- an example of an expression).
3052 ------------------
3053 -- 4.4 Primary --
3054 ------------------
3056 -- PRIMARY ::=
3057 -- NUMERIC_LITERAL | null
3058 -- | STRING_LITERAL | AGGREGATE
3059 -- | NAME | QUALIFIED_EXPRESSION
3060 -- | ALLOCATOR | (EXPRESSION)
3062 -- Usually there is no explicit node in the tree for primary. Instead
3063 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3064 -- exceptions. First, there is an explicit node for a null primary.
3066 -- N_Null
3067 -- Sloc points to NULL
3068 -- plus fields for expression
3070 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3071 -- that the parser keep track of which subexpressions are enclosed
3072 -- in parentheses, and how many levels of parentheses are used. This
3073 -- information is required for optimization purposes, and also for
3074 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3075 -- conform with ((((1)))) in the body).
3077 -- The parentheses are recorded by keeping a Paren_Count field in every
3078 -- subexpression node (it is actually present in all nodes, but only
3079 -- used in subexpression nodes). This count records the number of
3080 -- levels of parentheses. If the number of levels in the source exceeds
3081 -- the maximum accomodated by this count, then the count is simply left
3082 -- at the maximum value. This means that there are some pathalogical
3083 -- cases of failure to detect conformance failures (e.g. an expression
3084 -- with 500 levels of parens will conform with one with 501 levels),
3085 -- but we do not need to lose sleep over this.
3087 -- Historical note: in versions of GNAT prior to 1.75, there was a node
3088 -- type N_Parenthesized_Expression used to accurately record unlimited
3089 -- numbers of levels of parentheses. However, it turned out to be a
3090 -- real nuisance to have to take into account the possible presence of
3091 -- this node during semantic analysis, since basically parentheses have
3092 -- zero relevance to semantic analysis.
3094 -- Note: the level of parentheses always present in things like
3095 -- aggregates does not count, only the parentheses in the primary
3096 -- (EXPRESSION) affect the setting of the Paren_Count field.
3098 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
3099 -- treated as though it were Empty) if No_Initialization is set True.
3101 --------------------------------------
3102 -- 4.5 Short Circuit Control Forms --
3103 --------------------------------------
3105 -- EXPRESSION ::=
3106 -- RELATION {and then RELATION} | RELATION {or else RELATION}
3108 -- Gigi restriction: For both these control forms, the operand and
3109 -- result types are always Standard.Boolean. The expander inserts the
3110 -- required conversion operations where needed to ensure this is the
3111 -- case.
3113 -- N_And_Then
3114 -- Sloc points to AND of AND THEN
3115 -- Left_Opnd (Node2)
3116 -- Right_Opnd (Node3)
3117 -- Actions (List1-Sem)
3118 -- plus fields for expression
3120 -- N_Or_Else
3121 -- Sloc points to OR of OR ELSE
3122 -- Left_Opnd (Node2)
3123 -- Right_Opnd (Node3)
3124 -- Actions (List1-Sem)
3125 -- plus fields for expression
3127 -- Note: The Actions field is used to hold actions associated with
3128 -- the right hand operand. These have to be treated specially since
3129 -- they are not unconditionally executed. See Insert_Actions for a
3130 -- more detailed description of how these actions are handled.
3132 ---------------------------
3133 -- 4.5 Membership Tests --
3134 ---------------------------
3136 -- RELATION ::=
3137 -- SIMPLE_EXPRESSION [not] in RANGE
3138 -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3140 -- Note: although the grammar above allows only a range or a
3141 -- subtype mark, the parser in fact will accept any simple
3142 -- expression in place of a subtype mark. This means that the
3143 -- semantic analyzer must be prepared to deal with, and diagnose
3144 -- a simple expression other than a name for the right operand.
3145 -- This simplifies error recovery in the parser.
3147 -- N_In
3148 -- Sloc points to IN
3149 -- Left_Opnd (Node2)
3150 -- Right_Opnd (Node3)
3151 -- plus fields for expression
3153 -- N_Not_In
3154 -- Sloc points to NOT of NOT IN
3155 -- Left_Opnd (Node2)
3156 -- Right_Opnd (Node3)
3157 -- plus fields for expression
3159 --------------------
3160 -- 4.5 Operators --
3161 --------------------
3163 -- LOGICAL_OPERATOR ::= and | or | xor
3165 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
3167 -- BINARY_ADDING_OPERATOR ::= + | - | &
3169 -- UNARY_ADDING_OPERATOR ::= + | -
3171 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
3173 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
3175 -- Sprint syntax if Treat_Fixed_As_Integer is set:
3177 -- x #* y
3178 -- x #/ y
3179 -- x #mod y
3180 -- x #rem y
3182 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
3183 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
3184 -- All handling of smalls for multiplication and division is handled
3185 -- by the front end (mod and rem result only from expansion). Gigi
3186 -- thus never needs to worry about small values (for other operators
3187 -- operating on fixed-point, e.g. addition, the small value does not
3188 -- have any semantic effect anyway, these are always integer operations.
3190 -- Gigi restriction: For all operators taking Boolean operands, the
3191 -- type is always Standard.Boolean. The expander inserts the required
3192 -- conversion operations where needed to ensure this is the case.
3194 -- N_Op_And
3195 -- Sloc points to AND
3196 -- Do_Length_Check (Flag4-Sem)
3197 -- plus fields for binary operator
3198 -- plus fields for expression
3200 -- N_Op_Or
3201 -- Sloc points to OR
3202 -- Do_Length_Check (Flag4-Sem)
3203 -- plus fields for binary operator
3204 -- plus fields for expression
3206 -- N_Op_Xor
3207 -- Sloc points to XOR
3208 -- Do_Length_Check (Flag4-Sem)
3209 -- plus fields for binary operator
3210 -- plus fields for expression
3212 -- N_Op_Eq
3213 -- Sloc points to =
3214 -- plus fields for binary operator
3215 -- plus fields for expression
3217 -- N_Op_Ne
3218 -- Sloc points to /=
3219 -- plus fields for binary operator
3220 -- plus fields for expression
3222 -- N_Op_Lt
3223 -- Sloc points to <
3224 -- plus fields for binary operator
3225 -- plus fields for expression
3227 -- N_Op_Le
3228 -- Sloc points to <=
3229 -- plus fields for binary operator
3230 -- plus fields for expression
3232 -- N_Op_Gt
3233 -- Sloc points to >
3234 -- plus fields for binary operator
3235 -- plus fields for expression
3237 -- N_Op_Ge
3238 -- Sloc points to >=
3239 -- plus fields for binary operator
3240 -- plus fields for expression
3242 -- N_Op_Add
3243 -- Sloc points to + (binary)
3244 -- plus fields for binary operator
3245 -- plus fields for expression
3247 -- N_Op_Subtract
3248 -- Sloc points to - (binary)
3249 -- plus fields for binary operator
3250 -- plus fields for expression
3252 -- N_Op_Concat
3253 -- Sloc points to &
3254 -- Is_Component_Left_Opnd (Flag13-Sem)
3255 -- Is_Component_Right_Opnd (Flag14-Sem)
3256 -- plus fields for binary operator
3257 -- plus fields for expression
3259 -- N_Op_Multiply
3260 -- Sloc points to *
3261 -- Treat_Fixed_As_Integer (Flag14-Sem)
3262 -- Rounded_Result (Flag18-Sem)
3263 -- plus fields for binary operator
3264 -- plus fields for expression
3266 -- N_Op_Divide
3267 -- Sloc points to /
3268 -- Treat_Fixed_As_Integer (Flag14-Sem)
3269 -- Do_Division_Check (Flag13-Sem)
3270 -- Rounded_Result (Flag18-Sem)
3271 -- plus fields for binary operator
3272 -- plus fields for expression
3274 -- N_Op_Mod
3275 -- Sloc points to MOD
3276 -- Treat_Fixed_As_Integer (Flag14-Sem)
3277 -- Do_Division_Check (Flag13-Sem)
3278 -- plus fields for binary operator
3279 -- plus fields for expression
3281 -- N_Op_Rem
3282 -- Sloc points to REM
3283 -- Treat_Fixed_As_Integer (Flag14-Sem)
3284 -- Do_Division_Check (Flag13-Sem)
3285 -- plus fields for binary operator
3286 -- plus fields for expression
3288 -- N_Op_Expon
3289 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
3290 -- Sloc points to **
3291 -- plus fields for binary operator
3292 -- plus fields for expression
3294 -- N_Op_Plus
3295 -- Sloc points to + (unary)
3296 -- plus fields for unary operator
3297 -- plus fields for expression
3299 -- N_Op_Minus
3300 -- Sloc points to - (unary)
3301 -- plus fields for unary operator
3302 -- plus fields for expression
3304 -- N_Op_Abs
3305 -- Sloc points to ABS
3306 -- plus fields for unary operator
3307 -- plus fields for expression
3309 -- N_Op_Not
3310 -- Sloc points to NOT
3311 -- plus fields for unary operator
3312 -- plus fields for expression
3314 -- See also shift operators in section B.2
3316 -- Note on fixed-point operations passed to Gigi: For adding operators,
3317 -- the semantics is to treat these simply as integer operations, with
3318 -- the small values being ignored (the bounds are already stored in
3319 -- units of small, so that constraint checking works as usual). For the
3320 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
3321 -- point operands if the Treat_Fixed_As_Integer flag is set and will
3322 -- thus treat these nodes in identical manner, ignoring small values.
3324 --------------------------
3325 -- 4.6 Type Conversion --
3326 --------------------------
3328 -- TYPE_CONVERSION ::=
3329 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
3331 -- In the (NAME) case, the name is stored as the expression
3333 -- Note: the parser never generates a type conversion node, since it
3334 -- looks like an indexed component which is generated by preference.
3335 -- The semantic pass must correct this misidentification.
3337 -- Gigi handles conversions that involve no change in the root type,
3338 -- and also all conversions from integer to floating-point types.
3339 -- Conversions from floating-point to integer are only handled in
3340 -- the case where Float_Truncate flag set. Other conversions from
3341 -- floating-point to integer (involving rounding) and all conversions
3342 -- involving fixed-point types are handled by the expander.
3344 -- Sprint syntax if Float_Truncate set: X^(Y)
3345 -- Sprint syntax if Conversion_OK set X?(Y)
3346 -- Sprint syntax if both flags set X?^(Y)
3348 -- Note: If either the operand or result type is fixed-point, Gigi will
3349 -- only see a type conversion node with Conversion_OK set. The front end
3350 -- takes care of all handling of small's for fixed-point conversions.
3352 -- N_Type_Conversion
3353 -- Sloc points to first token of subtype mark
3354 -- Subtype_Mark (Node4)
3355 -- Expression (Node3)
3356 -- Do_Overflow_Check (Flag17-Sem)
3357 -- Do_Tag_Check (Flag13-Sem)
3358 -- Do_Length_Check (Flag4-Sem)
3359 -- Float_Truncate (Flag11-Sem)
3360 -- Rounded_Result (Flag18-Sem)
3361 -- Conversion_OK (Flag14-Sem)
3362 -- plus fields for expression
3364 -- Note: if a range check is required, then the Do_Range_Check flag
3365 -- is set in the Expression with the check being done against the
3366 -- target type range (after the base type conversion, if any).
3368 -------------------------------
3369 -- 4.7 Qualified Expression --
3370 -------------------------------
3372 -- QUALIFIED_EXPRESSION ::=
3373 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
3375 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
3376 -- the expression, so the Expression field of this node always points
3377 -- to a parenthesized expression in this case (i.e. Paren_Count will
3378 -- always be non-zero for the referenced expression if it is not an
3379 -- aggregate).
3381 -- N_Qualified_Expression
3382 -- Sloc points to apostrophe
3383 -- Subtype_Mark (Node4)
3384 -- Expression (Node3) expression or aggregate
3385 -- plus fields for expression
3387 --------------------
3388 -- 4.8 Allocator --
3389 --------------------
3391 -- ALLOCATOR ::=
3392 -- new SUBTYPE_INDICATION | new QUALIFIED_EXPRESSION
3394 -- Sprint syntax (when storage pool present)
3395 -- new xxx (storage_pool = pool)
3397 -- N_Allocator
3398 -- Sloc points to NEW
3399 -- Expression (Node3) subtype indication or qualified expression
3400 -- Storage_Pool (Node1-Sem)
3401 -- Procedure_To_Call (Node4-Sem)
3402 -- No_Initialization (Flag13-Sem)
3403 -- Do_Storage_Check (Flag17-Sem)
3404 -- plus fields for expression
3406 ---------------------------------
3407 -- 5.1 Sequence Of Statements --
3408 ---------------------------------
3410 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
3412 -- Note: Although the parser will not accept a declaration as a
3413 -- statement, the semantic analyzer may insert declarations (e.g.
3414 -- declarations of implicit types needed for execution of other
3415 -- statements) into a sequence of statements, so the code genmerator
3416 -- should be prepared to accept a declaration where a statement is
3417 -- expected. Note also that pragmas can appear as statements.
3419 --------------------
3420 -- 5.1 Statement --
3421 --------------------
3423 -- STATEMENT ::=
3424 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
3426 -- There is no explicit node in the tree for a statement. Instead, the
3427 -- individual statement appears directly. Labels are treated as a
3428 -- kind of statement, i.e. they are linked into a statement list at
3429 -- the point they appear, so the labeled statement appears following
3430 -- the label or labels in the statement list.
3432 ---------------------------
3433 -- 5.1 Simple Statement --
3434 ---------------------------
3436 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
3437 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
3438 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
3439 -- | RETURN_STATEMENT | ENTRY_CALL_STATEMENT
3440 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
3441 -- | ABORT_STATEMENT | RAISE_STATEMENT
3442 -- | CODE_STATEMENT
3444 -----------------------------
3445 -- 5.1 Compound Statement --
3446 -----------------------------
3448 -- COMPOUND_STATEMENT ::=
3449 -- IF_STATEMENT | CASE_STATEMENT
3450 -- | LOOP_STATEMENT | BLOCK_STATEMENT
3451 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
3453 -------------------------
3454 -- 5.1 Null Statement --
3455 -------------------------
3457 -- NULL_STATEMENT ::= null;
3459 -- N_Null_Statement
3460 -- Sloc points to NULL
3462 ----------------
3463 -- 5.1 Label --
3464 ----------------
3466 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
3468 -- Note that the occurrence of a label is not a defining identifier,
3469 -- but rather a referencing occurrence. The defining occurrence is
3470 -- in the implicit label declaration which occurs in the innermost
3471 -- enclosing block.
3473 -- N_Label
3474 -- Sloc points to <<
3475 -- Identifier (Node1) direct name of statement identifier
3476 -- Exception_Junk (Flag11-Sem)
3478 -------------------------------
3479 -- 5.1 Statement Identifier --
3480 -------------------------------
3482 -- STATEMENT_INDENTIFIER ::= DIRECT_NAME
3484 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
3485 -- (not an OPERATOR_SYMBOL)
3487 -------------------------------
3488 -- 5.2 Assignment Statement --
3489 -------------------------------
3491 -- ASSIGNMENT_STATEMENT ::=
3492 -- variable_NAME := EXPRESSION;
3494 -- N_Assignment_Statement
3495 -- Sloc points to :=
3496 -- Name (Node2)
3497 -- Expression (Node3)
3498 -- Do_Tag_Check (Flag13-Sem)
3499 -- Do_Length_Check (Flag4-Sem)
3500 -- Forwards_OK (Flag5-Sem)
3501 -- Backwards_OK (Flag6-Sem)
3502 -- No_Ctrl_Actions (Flag7-Sem)
3504 -- Note: if a range check is required, then the Do_Range_Check flag
3505 -- is set in the Expression (right hand side), with the check being
3506 -- done against the type of the Name (left hand side).
3508 -----------------------
3509 -- 5.3 If Statement --
3510 -----------------------
3512 -- IF_STATEMENT ::=
3513 -- if CONDITION then
3514 -- SEQUENCE_OF_STATEMENTS
3515 -- {elsif CONDITION then
3516 -- SEQUENCE_OF_STATEMENTS}
3517 -- [else
3518 -- SEQUENCE_OF_STATEMENTS]
3519 -- end if;
3521 -- Gigi restriction: This expander ensures that the type of the
3522 -- Condition fields is always Standard.Boolean, even if the type
3523 -- in the source is some non-standard boolean type.
3525 -- N_If_Statement
3526 -- Sloc points to IF
3527 -- Condition (Node1)
3528 -- Then_Statements (List2)
3529 -- Elsif_Parts (List3) (set to No_List if none present)
3530 -- Else_Statements (List4) (set to No_List if no else part present)
3531 -- End_Span (Uint5) (set to No_Uint if expander generated)
3533 -- N_Elsif_Part
3534 -- Sloc points to ELSIF
3535 -- Condition (Node1)
3536 -- Then_Statements (List2)
3537 -- Condition_Actions (List3-Sem)
3539 --------------------
3540 -- 5.3 Condition --
3541 --------------------
3543 -- CONDITION ::= boolean_EXPRESSION
3545 -------------------------
3546 -- 5.4 Case Statement --
3547 -------------------------
3549 -- CASE_STATEMENT ::=
3550 -- case EXPRESSION is
3551 -- CASE_STATEMENT_ALTERNATIVE
3552 -- {CASE_STATEMENT_ALTERNATIVE}
3553 -- end case;
3555 -- Note: the Alternatives can contain pragmas. These only occur at
3556 -- the start of the list, since any pragmas occurring after the first
3557 -- alternative are absorbed into the corresponding statement sequence.
3559 -- N_Case_Statement
3560 -- Sloc points to CASE
3561 -- Expression (Node3)
3562 -- Alternatives (List4)
3563 -- End_Span (Uint5) (set to No_Uint if expander generated)
3565 -------------------------------------
3566 -- 5.4 Case Statement Alternative --
3567 -------------------------------------
3569 -- CASE_STATEMENT_ALTERNATIVE ::=
3570 -- when DISCRETE_CHOICE_LIST =>
3571 -- SEQUENCE_OF_STATEMENTS
3573 -- N_Case_Statement_Alternative
3574 -- Sloc points to WHEN
3575 -- Discrete_Choices (List4)
3576 -- Statements (List3)
3578 -------------------------
3579 -- 5.5 Loop Statement --
3580 -------------------------
3582 -- LOOP_STATEMENT ::=
3583 -- [loop_STATEMENT_IDENTIFIER :]
3584 -- [ITERATION_SCHEME] loop
3585 -- SEQUENCE_OF_STATEMENTS
3586 -- end loop [loop_IDENTIFIER];
3588 -- Note: The occurrence of a loop label is not a defining identifier
3589 -- but rather a referencing occurrence. The defining occurrence is in
3590 -- the implicit label declaration which occurs in the innermost
3591 -- enclosing block.
3593 -- Note: there is always a loop statement identifier present in
3594 -- the tree, even if none was given in the source. In the case where
3595 -- no loop identifier is given in the source, the parser creates
3596 -- a name of the form _Loop_n, where n is a decimal integer (the
3597 -- two underlines ensure that the loop names created in this manner
3598 -- do not conflict with any user defined identifiers), and the flag
3599 -- Has_Created_Identifier is set to True. The only exception to the
3600 -- rule that all loop statement nodes have identifiers occurs for
3601 -- loops constructed by the expander, and the semantic analyzer will
3602 -- create and supply dummy loop identifiers in these cases.
3604 -- N_Loop_Statement
3605 -- Sloc points to LOOP
3606 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
3607 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
3608 -- Statements (List3)
3609 -- End_Label (Node4)
3610 -- Has_Created_Identifier (Flag15)
3612 --------------------------
3613 -- 5.5 Iteration Scheme --
3614 --------------------------
3616 -- ITERATION_SCHEME ::=
3617 -- while CONDITION | for LOOP_PARAMETER_SPECIFICATION
3619 -- Gigi restriction: This expander ensures that the type of the
3620 -- Condition field is always Standard.Boolean, even if the type
3621 -- in the source is some non-standard boolean type.
3623 -- N_Iteration_Scheme
3624 -- Sloc points to WHILE or FOR
3625 -- Condition (Node1) (set to Empty if FOR case)
3626 -- Condition_Actions (List3-Sem)
3627 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
3629 ---------------------------------------
3630 -- 5.5 Loop parameter specification --
3631 ---------------------------------------
3633 -- LOOP_PARAMETER_SPECIFICATION ::=
3634 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
3636 -- N_Loop_Parameter_Specification
3637 -- Sloc points to first identifier
3638 -- Defining_Identifier (Node1)
3639 -- Reverse_Present (Flag15)
3640 -- Discrete_Subtype_Definition (Node4)
3642 --------------------------
3643 -- 5.6 Block Statement --
3644 --------------------------
3646 -- BLOCK_STATEMENT ::=
3647 -- [block_STATEMENT_IDENTIFIER:]
3648 -- [declare
3649 -- DECLARATIVE_PART]
3650 -- begin
3651 -- HANDLED_SEQUENCE_OF_STATEMENTS
3652 -- end [block_IDENTIFIER];
3654 -- Note that the occurrence of a block identifier is not a defining
3655 -- identifier, but rather a referencing occurrence. The defining
3656 -- occurrence is in the implicit label declaration which occurs in
3657 -- the innermost enclosing block.
3659 -- Note: there is always a block statement identifier present in
3660 -- the tree, even if none was given in the source. In the case where
3661 -- no block identifier is given in the source, the parser creates
3662 -- a name of the form _Block_n, where n is a decimal integer (the
3663 -- two underlines ensure that the block names created in this manner
3664 -- do not conflict with any user defined identifiers), and the flag
3665 -- Has_Created_Identifier is set to True. The only exception to the
3666 -- rule that all loop statement nodes have identifiers occurs for
3667 -- blocks constructed by the expander, and the semantic analyzer
3668 -- creates and supplies dummy names for the blocks).
3670 -- N_Block_Statement
3671 -- Sloc points to DECLARE or BEGIN
3672 -- Identifier (Node1) block direct name (set to Empty if not present)
3673 -- Declarations (List2) (set to No_List if no DECLARE part)
3674 -- Handled_Statement_Sequence (Node4)
3675 -- Is_Task_Master (Flag5-Sem)
3676 -- Activation_Chain_Entity (Node3-Sem)
3677 -- Has_Created_Identifier (Flag15)
3678 -- Is_Task_Allocation_Block (Flag6)
3679 -- Is_Asynchronous_Call_Block (Flag7)
3681 -------------------------
3682 -- 5.7 Exit Statement --
3683 -------------------------
3685 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
3687 -- Gigi restriction: This expander ensures that the type of the
3688 -- Condition field is always Standard.Boolean, even if the type
3689 -- in the source is some non-standard boolean type.
3691 -- N_Exit_Statement
3692 -- Sloc points to EXIT
3693 -- Name (Node2) (set to Empty if no loop name present)
3694 -- Condition (Node1) (set to Empty if no when part present)
3696 -------------------------
3697 -- 5.9 Goto Statement --
3698 -------------------------
3700 -- GOTO_STATEMENT ::= goto label_NAME;
3702 -- N_Goto_Statement
3703 -- Sloc points to GOTO
3704 -- Name (Node2)
3705 -- Exception_Junk (Flag11-Sem)
3707 ---------------------------------
3708 -- 6.1 Subprogram Declaration --
3709 ---------------------------------
3711 -- SUBPROGRAM_DECLARATION ::= SUBPROGRAM_SPECIFICATION;
3713 -- N_Subprogram_Declaration
3714 -- Sloc points to FUNCTION or PROCEDURE
3715 -- Specification (Node1)
3716 -- Body_To_Inline (Node3-Sem)
3717 -- Corresponding_Body (Node5-Sem)
3718 -- Parent_Spec (Node4-Sem)
3720 ------------------------------------------
3721 -- 6.1 Abstract Subprogram Declaration --
3722 ------------------------------------------
3724 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
3725 -- SUBPROGRAM_SPECIFICATION is abstract;
3727 -- N_Abstract_Subprogram_Declaration
3728 -- Sloc points to ABSTRACT
3729 -- Specification (Node1)
3731 -----------------------------------
3732 -- 6.1 Subprogram Specification --
3733 -----------------------------------
3735 -- SUBPROGRAM_SPECIFICATION ::=
3736 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
3737 -- | function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
3739 -- Note: there are no separate nodes for the profiles, instead the
3740 -- information appears directly in the following nodes.
3742 -- N_Function_Specification
3743 -- Sloc points to FUNCTION
3744 -- Defining_Unit_Name (Node1) (the designator)
3745 -- Elaboration_Boolean (Node2-Sem)
3746 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3747 -- Subtype_Mark (Node4) for return type
3748 -- Generic_Parent (Node5-Sem)
3750 -- N_Procedure_Specification
3751 -- Sloc points to PROCEDURE
3752 -- Defining_Unit_Name (Node1)
3753 -- Elaboration_Boolean (Node2-Sem)
3754 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3755 -- Generic_Parent (Node5-Sem)
3757 ---------------------
3758 -- 6.1 Designator --
3759 ---------------------
3761 -- DESIGNATOR ::=
3762 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
3764 -- Designators that are simply identifiers or operator symbols appear
3765 -- directly in the tree in this form. The following node is used only
3766 -- in the case where the designator has a parent unit name component.
3768 -- N_Designator
3769 -- Sloc points to period
3770 -- Name (Node2) holds the parent unit name. Note that this is always
3771 -- non-Empty, since this node is only used for the case where a
3772 -- parent library unit package name is present.
3773 -- Identifier (Node1)
3775 -- Note that the identifier can also be an operator symbol here.
3777 ------------------------------
3778 -- 6.1 Defining Designator --
3779 ------------------------------
3781 -- DEFINING_DESIGNATOR ::=
3782 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
3784 -------------------------------------
3785 -- 6.1 Defining Program Unit Name --
3786 -------------------------------------
3788 -- DEFINING_PROGRAM_UNIT_NAME ::=
3789 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
3791 -- The parent unit name is present only in the case of a child unit
3792 -- name (permissible only for Ada 95 for a library level unit, i.e.
3793 -- a unit at scope level one). If no such name is present, the defining
3794 -- program unit name is represented simply as the defining identifier.
3795 -- In the child unit case, the following node is used to represent the
3796 -- child unit name.
3798 -- N_Defining_Program_Unit_Name
3799 -- Sloc points to period
3800 -- Name (Node2) holds the parent unit name. Note that this is always
3801 -- non-Empty, since this node is only used for the case where a
3802 -- parent unit name is present.
3803 -- Defining_Identifier (Node1)
3805 --------------------------
3806 -- 6.1 Operator Symbol --
3807 --------------------------
3809 -- OPERATOR_SYMBOL ::= STRING_LITERAL
3811 -- Note: the fields of the N_Operator_Symbol node are laid out to
3812 -- match the corresponding fields of an N_Character_Literal node. This
3813 -- allows easy conversion of the operator symbol node into a character
3814 -- literal node in the case where a string constant of the form of an
3815 -- operator symbol is scanned out as such, but turns out semantically
3816 -- to be a string literal that is not an operator. For details see
3817 -- Sinfo.CN.Change_Operator_Symbol_To_String_Literal.
3819 -- N_Operator_Symbol
3820 -- Sloc points to literal
3821 -- Chars (Name1) contains the Name_Id for the operator symbol
3822 -- Strval (Str3) Id of string value. This is used if the operator
3823 -- symbol turns out to be a normal string after all.
3824 -- Entity (Node4-Sem)
3825 -- Associated_Node (Node4-Sem)
3826 -- Has_Private_View (Flag11-Sem) set in generic units.
3827 -- Etype (Node5-Sem)
3829 -- Note: the Strval field may be set to No_String for generated
3830 -- operator symbols that are known not to be string literals
3831 -- semantically.
3833 -----------------------------------
3834 -- 6.1 Defining Operator Symbol --
3835 -----------------------------------
3837 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
3839 -- A defining operator symbol is an entity, which has additional
3840 -- fields depending on the setting of the Ekind field. These
3841 -- additional fields are defined (and access subprograms declared)
3842 -- in package Einfo.
3844 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
3845 -- are deliberately layed out to match the layout of fields in an
3846 -- ordinary N_Operator_Symbol node allowing for easy alteration of
3847 -- an operator symbol node into a defining operator symbol node.
3848 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
3849 -- for further details.
3851 -- N_Defining_Operator_Symbol
3852 -- Sloc points to literal
3853 -- Chars (Name1) contains the Name_Id for the operator symbol
3854 -- Next_Entity (Node2-Sem)
3855 -- Scope (Node3-Sem)
3856 -- Etype (Node5-Sem)
3858 ----------------------------
3859 -- 6.1 Parameter Profile --
3860 ----------------------------
3862 -- PARAMETER_PROFILE ::= [FORMAL_PART]
3864 ---------------------------------------
3865 -- 6.1 Parameter and Result Profile --
3866 ---------------------------------------
3868 -- PARAMETER_AND_RESULT_PROFILE ::= [FORMAL_PART] return SUBTYPE_MARK
3870 -- There is no explicit node in the tree for a parameter and result
3871 -- profile. Instead the information appears directly in the parent.
3873 ----------------------
3874 -- 6.1 Formal part --
3875 ----------------------
3877 -- FORMAL_PART ::=
3878 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
3880 ----------------------------------
3881 -- 6.1 Parameter specification --
3882 ----------------------------------
3884 -- PARAMETER_SPECIFICATION ::=
3885 -- DEFINING_IDENTIFIER_LIST : MODE SUBTYPE_MARK
3886 -- [:= DEFAULT_EXPRESSION]
3887 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
3888 -- [:= DEFAULT_EXPRESSION]
3890 -- Although the syntax allows multiple identifiers in the list, the
3891 -- semantics is as though successive specifications were given with
3892 -- identical type definition and expression components. To simplify
3893 -- semantic processing, the parser represents a multiple declaration
3894 -- case as a sequence of single Specifications, using the More_Ids and
3895 -- Prev_Ids flags to preserve the original source form as described
3896 -- in the section on "Handling of Defining Identifier Lists".
3898 -- N_Parameter_Specification
3899 -- Sloc points to first identifier
3900 -- Defining_Identifier (Node1)
3901 -- In_Present (Flag15)
3902 -- Out_Present (Flag17)
3903 -- Parameter_Type (Node2) subtype mark or access definition
3904 -- Expression (Node3) (set to Empty if no default expression present)
3905 -- Do_Accessibility_Check (Flag13-Sem)
3906 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3907 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3908 -- Default_Expression (Node5-Sem)
3910 ---------------
3911 -- 6.1 Mode --
3912 ---------------
3914 -- MODE ::= [in] | in out | out
3916 -- There is no explicit node in the tree for the Mode. Instead the
3917 -- In_Present and Out_Present flags are set in the parent node to
3918 -- record the presence of keywords specifying the mode.
3920 --------------------------
3921 -- 6.3 Subprogram Body --
3922 --------------------------
3924 -- SUBPROGRAM_BODY ::=
3925 -- SUBPROGRAM_SPECIFICATION is
3926 -- DECLARATIVE_PART
3927 -- begin
3928 -- HANDLED_SEQUENCE_OF_STATEMENTS
3929 -- end [DESIGNATOR];
3931 -- N_Subprogram_Body
3932 -- Sloc points to FUNCTION or PROCEDURE
3933 -- Specification (Node1)
3934 -- Declarations (List2)
3935 -- Handled_Statement_Sequence (Node4)
3936 -- Activation_Chain_Entity (Node3-Sem)
3937 -- Corresponding_Spec (Node5-Sem)
3938 -- Acts_As_Spec (Flag4-Sem)
3939 -- Bad_Is_Detected (Flag15) used only by parser
3940 -- Do_Storage_Check (Flag17-Sem)
3941 -- Has_Priority_Pragma (Flag6-Sem)
3942 -- Is_Protected_Subprogram_Body (Flag7-Sem)
3943 -- Is_Task_Master (Flag5-Sem)
3944 -- Was_Originally_Stub (Flag13-Sem)
3946 -----------------------------------
3947 -- 6.4 Procedure Call Statement --
3948 -----------------------------------
3950 -- PROCEDURE_CALL_STATEMENT ::=
3951 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
3953 -- Note: the reason that a procedure call has expression fields is
3954 -- that it semantically resembles an expression, e.g. overloading is
3955 -- allowed and a type is concocted for semantic processing purposes.
3956 -- Certain of these fields, such as Parens are not relevant, but it
3957 -- is easier to just supply all of them together!
3959 -- N_Procedure_Call_Statement
3960 -- Sloc points to first token of name or prefix
3961 -- Name (Node2) stores name or prefix
3962 -- Parameter_Associations (List3) (set to No_List if no
3963 -- actual parameter part)
3964 -- First_Named_Actual (Node4-Sem)
3965 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
3966 -- Do_Tag_Check (Flag13-Sem)
3967 -- Parameter_List_Truncated (Flag17-Sem)
3968 -- ABE_Is_Certain (Flag18-Sem)
3969 -- plus fields for expression
3971 -- If any IN parameter requires a range check, then the corresponding
3972 -- argument expression has the Do_Range_Check flag set, and the range
3973 -- check is done against the formal type. Note that this argument
3974 -- expression may appear directly in the Parameter_Associations list,
3975 -- or may be a descendent of an N_Parameter_Association node that
3976 -- appears in this list.
3978 ------------------------
3979 -- 6.4 Function Call --
3980 ------------------------
3982 -- FUNCTION_CALL ::=
3983 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
3985 -- Note: the parser may generate an indexed component node or simply
3986 -- a name node instead of a function call node. The semantic pass must
3987 -- correct this misidentification.
3989 -- N_Function_Call
3990 -- Sloc points to first token of name or prefix
3991 -- Name (Node2) stores name or prefix
3992 -- Parameter_Associations (List3) (set to No_List if no
3993 -- actual parameter part)
3994 -- First_Named_Actual (Node4-Sem)
3995 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
3996 -- Do_Tag_Check (Flag13-Sem)
3997 -- Parameter_List_Truncated (Flag17-Sem)
3998 -- ABE_Is_Certain (Flag18-Sem)
3999 -- plus fields for expression
4001 --------------------------------
4002 -- 6.4 Actual Parameter Part --
4003 --------------------------------
4005 -- ACTUAL_PARAMETER_PART ::=
4006 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
4008 --------------------------------
4009 -- 6.4 Parameter Association --
4010 --------------------------------
4012 -- PARAMETER_ASSOCIATION ::=
4013 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
4015 -- Note: the N_Parameter_Association node is built only if a formal
4016 -- parameter selector name is present, otherwise the parameter
4017 -- association appears in the tree simply as the node for the
4018 -- explicit actual parameter.
4020 -- N_Parameter_Association
4021 -- Sloc points to formal parameter
4022 -- Selector_Name (Node2) (always non-Empty, since this node is
4023 -- only used if a formal parameter selector name is present)
4024 -- Explicit_Actual_Parameter (Node3)
4025 -- Next_Named_Actual (Node4-Sem)
4027 ---------------------------
4028 -- 6.4 Actual Parameter --
4029 ---------------------------
4031 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
4033 ---------------------------
4034 -- 6.5 Return Statement --
4035 ---------------------------
4037 -- RETURN_STATEMENT ::= return [EXPRESSION];
4039 -- N_Return_Statement
4040 -- Sloc points to RETURN
4041 -- Expression (Node3) (set to Empty if no expression present)
4042 -- Storage_Pool (Node1-Sem)
4043 -- Procedure_To_Call (Node4-Sem)
4044 -- Do_Tag_Check (Flag13-Sem)
4045 -- Return_Type (Node2-Sem)
4046 -- By_Ref (Flag5-Sem)
4048 -- Note: if a range check is required, then Do_Range_Check is set
4049 -- on the Expression. The range check is against Return_Type.
4051 ------------------------------
4052 -- 7.1 Package Declaration --
4053 ------------------------------
4055 -- PACKAGE_DECLARATION ::= PACKAGE_SPECIFICATION;
4057 -- Note: the activation chain entity for a package spec is used for
4058 -- all tasks declared in the package spec, or in the package body.
4060 -- N_Package_Declaration
4061 -- Sloc points to PACKAGE
4062 -- Specification (Node1)
4063 -- Corresponding_Body (Node5-Sem)
4064 -- Parent_Spec (Node4-Sem)
4065 -- Activation_Chain_Entity (Node3-Sem)
4067 --------------------------------
4068 -- 7.1 Package Specification --
4069 --------------------------------
4071 -- PACKAGE_SPECIFICATION ::=
4072 -- package DEFINING_PROGRAM_UNIT_NAME is
4073 -- {BASIC_DECLARATIVE_ITEM}
4074 -- [private
4075 -- {BASIC_DECLARATIVE_ITEM}]
4076 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
4078 -- N_Package_Specification
4079 -- Sloc points to PACKAGE
4080 -- Defining_Unit_Name (Node1)
4081 -- Visible_Declarations (List2)
4082 -- Private_Declarations (List3) (set to No_List if no private
4083 -- part present)
4084 -- End_Label (Node4)
4085 -- Generic_Parent (Node5-Sem)
4087 -----------------------
4088 -- 7.1 Package Body --
4089 -----------------------
4091 -- PACKAGE_BODY ::=
4092 -- package body DEFINING_PROGRAM_UNIT_NAME is
4093 -- DECLARATIVE_PART
4094 -- [begin
4095 -- HANDLED_SEQUENCE_OF_STATEMENTS]
4096 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
4098 -- N_Package_Body
4099 -- Sloc points to PACKAGE
4100 -- Defining_Unit_Name (Node1)
4101 -- Declarations (List2)
4102 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
4103 -- Corresponding_Spec (Node5-Sem)
4104 -- Was_Originally_Stub (Flag13-Sem)
4106 -- Note: if a source level package does not contain a handled sequence
4107 -- of statements, then the parser supplies a dummy one with a null
4108 -- sequence of statements. Comes_From_Source will be False in this
4109 -- constructed sequence. The reason we need this is for the End_Label
4110 -- field in the HSS.
4112 -----------------------------------
4113 -- 7.4 Private Type Declaration --
4114 -----------------------------------
4116 -- PRIVATE_TYPE_DECLARATION ::=
4117 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
4118 -- is [[abstract] tagged] [limited] private;
4120 -- Note: TAGGED is not permitted in Ada 83 mode
4122 -- N_Private_Type_Declaration
4123 -- Sloc points to TYPE
4124 -- Defining_Identifier (Node1)
4125 -- Discriminant_Specifications (List4) (set to No_List if no
4126 -- discriminant part)
4127 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4128 -- Abstract_Present (Flag4)
4129 -- Tagged_Present (Flag15)
4130 -- Limited_Present (Flag17)
4132 ----------------------------------------
4133 -- 7.4 Private Extension Declaration --
4134 ----------------------------------------
4136 -- PRIVATE_EXTENSION_DECLARATION ::=
4137 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
4138 -- [abstract] new ancestor_SUBTYPE_INDICATION with private;
4140 -- Note: private extension declarations are not allowed in Ada 83 mode
4142 -- N_Private_Extension_Declaration
4143 -- Sloc points to TYPE
4144 -- Defining_Identifier (Node1)
4145 -- Discriminant_Specifications (List4) (set to No_List if no
4146 -- discriminant part)
4147 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4148 -- Abstract_Present (Flag4)
4149 -- Subtype_Indication (Node5)
4151 ---------------------
4152 -- 8.4 Use Clause --
4153 ---------------------
4155 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
4157 -----------------------------
4158 -- 8.4 Use Package Clause --
4159 -----------------------------
4161 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
4163 -- N_Use_Package_Clause
4164 -- Sloc points to USE
4165 -- Names (List2)
4166 -- Next_Use_Clause (Node3-Sem)
4167 -- Hidden_By_Use_Clause (Elist4-Sem)
4169 --------------------------
4170 -- 8.4 Use Type Clause --
4171 --------------------------
4173 -- USE_TYPE_CLAUSE ::= use type SUBTYPE_MARK {, SUBTYPE_MARK};
4175 -- Note: use type clause is not permitted in Ada 83 mode
4177 -- N_Use_Type_Clause
4178 -- Sloc points to USE
4179 -- Subtype_Marks (List2)
4180 -- Next_Use_Clause (Node3-Sem)
4181 -- Hidden_By_Use_Clause (Elist4-Sem)
4183 -------------------------------
4184 -- 8.5 Renaming Declaration --
4185 -------------------------------
4187 -- RENAMING_DECLARATION ::=
4188 -- OBJECT_RENAMING_DECLARATION
4189 -- | EXCEPTION_RENAMING_DECLARATION
4190 -- | PACKAGE_RENAMING_DECLARATION
4191 -- | SUBPROGRAM_RENAMING_DECLARATION
4192 -- | GENERIC_RENAMING_DECLARATION
4194 --------------------------------------
4195 -- 8.5 Object Renaming Declaration --
4196 --------------------------------------
4198 -- OBJECT_RENAMING_DECLARATION ::=
4199 -- DEFINING_IDENTIFIER : SUBTYPE_MARK renames object_NAME;
4201 -- N_Object_Renaming_Declaration
4202 -- Sloc points to first identifier
4203 -- Defining_Identifier (Node1)
4204 -- Subtype_Mark (Node4)
4205 -- Name (Node2)
4206 -- Corresponding_Generic_Association (Node5-Sem)
4208 -----------------------------------------
4209 -- 8.5 Exception Renaming Declaration --
4210 -----------------------------------------
4212 -- EXCEPTION_RENAMING_DECLARATION ::=
4213 -- DEFINING_IDENTIFIER : exception renames exception_NAME;
4215 -- N_Exception_Renaming_Declaration
4216 -- Sloc points to first identifier
4217 -- Defining_Identifier (Node1)
4218 -- Name (Node2)
4220 ---------------------------------------
4221 -- 8.5 Package Renaming Declaration --
4222 ---------------------------------------
4224 -- PACKAGE_RENAMING_DECLARATION ::=
4225 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME;
4227 -- N_Package_Renaming_Declaration
4228 -- Sloc points to PACKAGE
4229 -- Defining_Unit_Name (Node1)
4230 -- Name (Node2)
4231 -- Parent_Spec (Node4-Sem)
4233 ------------------------------------------
4234 -- 8.5 Subprogram Renaming Declaration --
4235 ------------------------------------------
4237 -- SUBPROGRAM_RENAMING_DECLARATION ::=
4238 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
4240 -- N_Subprogram_Renaming_Declaration
4241 -- Sloc points to RENAMES
4242 -- Specification (Node1)
4243 -- Name (Node2)
4244 -- Parent_Spec (Node4-Sem)
4245 -- Corresponding_Spec (Node5-Sem)
4247 -----------------------------------------
4248 -- 8.5.5 Generic Renaming Declaration --
4249 -----------------------------------------
4251 -- GENERIC_RENAMING_DECLARATION ::=
4252 -- generic package DEFINING_PROGRAM_UNIT_NAME
4253 -- renames generic_package_NAME
4254 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
4255 -- renames generic_procedure_NAME
4256 -- | generic function DEFINING_PROGRAM_UNIT_NAME
4257 -- renames generic_function_NAME
4259 -- N_Generic_Package_Renaming_Declaration
4260 -- Sloc points to GENERIC
4261 -- Defining_Unit_Name (Node1)
4262 -- Name (Node2)
4263 -- Parent_Spec (Node4-Sem)
4265 -- N_Generic_Procedure_Renaming_Declaration
4266 -- Sloc points to GENERIC
4267 -- Defining_Unit_Name (Node1)
4268 -- Name (Node2)
4269 -- Parent_Spec (Node4-Sem)
4271 -- N_Generic_Function_Renaming_Declaration
4272 -- Sloc points to GENERIC
4273 -- Defining_Unit_Name (Node1)
4274 -- Name (Node2)
4275 -- Parent_Spec (Node4-Sem)
4277 --------------------------------
4278 -- 9.1 Task Type Declaration --
4279 --------------------------------
4281 -- TASK_TYPE_DECLARATION ::=
4282 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4283 -- [is TASK_DEFINITITION];
4285 -- N_Task_Type_Declaration
4286 -- Sloc points to TASK
4287 -- Defining_Identifier (Node1)
4288 -- Task_Body_Procedure (Node2-Sem)
4289 -- Discriminant_Specifications (List4) (set to No_List if no
4290 -- discriminant part)
4291 -- Task_Definition (Node3) (set to Empty if not present)
4292 -- Corresponding_Body (Node5-Sem)
4294 ----------------------------------
4295 -- 9.1 Single Task Declaration --
4296 ----------------------------------
4298 -- SINGLE_TASK_DECLARATION ::=
4299 -- task DEFINING_IDENTIFIER [is TASK_DEFINITION];
4301 -- N_Single_Task_Declaration
4302 -- Sloc points to TASK
4303 -- Defining_Identifier (Node1)
4304 -- Task_Definition (Node3) (set to Empty if not present)
4306 --------------------------
4307 -- 9.1 Task Definition --
4308 --------------------------
4310 -- TASK_DEFINITION ::=
4311 -- {TASK_ITEM}
4312 -- [private
4313 -- {TASK_ITEM}]
4314 -- end [task_IDENTIFIER]
4316 -- Note: as a result of semantic analysis, the list of task items can
4317 -- include implicit type declarations resulting from entry families.
4319 -- N_Task_Definition
4320 -- Sloc points to first token of task definition
4321 -- Visible_Declarations (List2)
4322 -- Private_Declarations (List3) (set to No_List if no private part)
4323 -- End_Label (Node4)
4324 -- Has_Priority_Pragma (Flag6-Sem)
4325 -- Has_Storage_Size_Pragma (Flag5-Sem)
4326 -- Has_Task_Info_Pragma (Flag7-Sem)
4327 -- Has_Task_Name_Pragma (Flag8-Sem)
4329 --------------------
4330 -- 9.1 Task Item --
4331 --------------------
4333 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
4335 --------------------
4336 -- 9.1 Task Body --
4337 --------------------
4339 -- TASK_BODY ::=
4340 -- task body task_DEFINING_IDENTIFIER is
4341 -- DECLARATIVE_PART
4342 -- begin
4343 -- HANDLED_SEQUENCE_OF_STATEMENTS
4344 -- end [task_IDENTIFIER];
4346 -- Gigi restriction: This node never appears.
4348 -- N_Task_Body
4349 -- Sloc points to TASK
4350 -- Defining_Identifier (Node1)
4351 -- Declarations (List2)
4352 -- Handled_Statement_Sequence (Node4)
4353 -- Is_Task_Master (Flag5-Sem)
4354 -- Activation_Chain_Entity (Node3-Sem)
4355 -- Corresponding_Spec (Node5-Sem)
4356 -- Was_Originally_Stub (Flag13-Sem)
4358 -------------------------------------
4359 -- 9.4 Protected Type Declaration --
4360 -------------------------------------
4362 -- PROTECTED_TYPE_DECLARATION ::=
4363 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4364 -- is PROTECTED_DEFINITION;
4366 -- Note: protected type declarations are not permitted in Ada 83 mode
4368 -- N_Protected_Type_Declaration
4369 -- Sloc points to PROTECTED
4370 -- Defining_Identifier (Node1)
4371 -- Discriminant_Specifications (List4) (set to No_List if no
4372 -- discriminant part)
4373 -- Protected_Definition (Node3)
4374 -- Corresponding_Body (Node5-Sem)
4376 ---------------------------------------
4377 -- 9.4 Single Protected Declaration --
4378 ---------------------------------------
4380 -- SINGLE_PROTECTED_DECLARATION ::=
4381 -- protected DEFINING_IDENTIFIER is PROTECTED_DEFINITION;
4383 -- Note: single protected declarations are not allowed in Ada 83 mode
4385 -- N_Single_Protected_Declaration
4386 -- Sloc points to PROTECTED
4387 -- Defining_Identifier (Node1)
4388 -- Protected_Definition (Node3)
4390 -------------------------------
4391 -- 9.4 Protected Definition --
4392 -------------------------------
4394 -- PROTECTED_DEFINITION ::=
4395 -- {PROTECTED_OPERATION_DECLARATION}
4396 -- [private
4397 -- {PROTECTED_ELEMENT_DECLARATION}]
4398 -- end [protected_IDENTIFIER]
4400 -- N_Protected_Definition
4401 -- Sloc points to first token of protected definition
4402 -- Visible_Declarations (List2)
4403 -- Private_Declarations (List3) (set to No_List if no private part)
4404 -- End_Label (Node4)
4405 -- Has_Priority_Pragma (Flag6-Sem)
4407 ------------------------------------------
4408 -- 9.4 Protected Operation Declaration --
4409 ------------------------------------------
4411 -- PROTECTED_OPERATION_DECLARATION ::=
4412 -- SUBPROGRAM_DECLARATION
4413 -- | ENTRY_DECLARATION
4414 -- | REPRESENTATION_CLAUSE
4416 ----------------------------------------
4417 -- 9.4 Protected Element Declaration --
4418 ----------------------------------------
4420 -- PROTECTED_ELEMENT_DECLARATION ::=
4421 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
4423 -------------------------
4424 -- 9.4 Protected Body --
4425 -------------------------
4427 -- PROTECTED_BODY ::=
4428 -- protected body DEFINING_IDENTIFIER is
4429 -- {PROTECTED_OPERATION_ITEM}
4430 -- end [protected_IDENTIFIER];
4432 -- Note: protected bodies are not allowed in Ada 83 mode
4434 -- Gigi restriction: This node never appears.
4436 -- N_Protected_Body
4437 -- Sloc points to PROTECTED
4438 -- Defining_Identifier (Node1)
4439 -- Declarations (List2) protected operation items (and pragmas)
4440 -- End_Label (Node4)
4441 -- Corresponding_Spec (Node5-Sem)
4442 -- Was_Originally_Stub (Flag13-Sem)
4444 -----------------------------------
4445 -- 9.4 Protected Operation Item --
4446 -----------------------------------
4448 -- PROTECTED_OPERATION_ITEM ::=
4449 -- SUBPROGRAM_DECLARATION
4450 -- | SUBPROGRAM_BODY
4451 -- | ENTRY_BODY
4452 -- | REPRESENTATION_CLAUSE
4454 ------------------------------
4455 -- 9.5.2 Entry Declaration --
4456 ------------------------------
4458 -- ENTRY_DECLARATION ::=
4459 -- entry DEFINING_IDENTIFIER
4460 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE;
4462 -- N_Entry_Declaration
4463 -- Sloc points to ENTRY
4464 -- Defining_Identifier (Node1)
4465 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
4466 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4468 -----------------------------
4469 -- 9.5.2 Accept statement --
4470 -----------------------------
4472 -- ACCEPT_STATEMENT ::=
4473 -- accept entry_DIRECT_NAME
4474 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
4475 -- HANDLED_SEQUENCE_OF_STATEMENTS
4476 -- end [entry_IDENTIFIER]];
4478 -- Gigi restriction: This node never appears.
4480 -- Note: there are no explicit declarations allowed in an accept
4481 -- statement. However, the implicit declarations for any statement
4482 -- identifiers (labels and block/loop identifiers) are declarations
4483 -- that belong logically to the accept statement, and that is why
4484 -- there is a Declarations field in this node.
4486 -- N_Accept_Statement
4487 -- Sloc points to ACCEPT
4488 -- Entry_Direct_Name (Node1)
4489 -- Entry_Index (Node5) (set to Empty if not present)
4490 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4491 -- Handled_Statement_Sequence (Node4)
4492 -- Declarations (List2) (set to No_List if no declarations)
4494 ------------------------
4495 -- 9.5.2 Entry Index --
4496 ------------------------
4498 -- ENTRY_INDEX ::= EXPRESSION
4500 -----------------------
4501 -- 9.5.2 Entry Body --
4502 -----------------------
4504 -- ENTRY_BODY ::=
4505 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
4506 -- DECLARATIVE_PART
4507 -- begin
4508 -- HANDLED_SEQUENCE_OF_STATEMENTS
4509 -- end [entry_IDENTIFIER];
4511 -- ENTRY_BARRIER ::= when CONDITION
4513 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
4514 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
4515 -- too full (it would otherwise have too many fields)
4517 -- Gigi restriction: This node never appears.
4519 -- N_Entry_Body
4520 -- Sloc points to ENTRY
4521 -- Defining_Identifier (Node1)
4522 -- Entry_Body_Formal_Part (Node5)
4523 -- Declarations (List2)
4524 -- Handled_Statement_Sequence (Node4)
4525 -- Activation_Chain_Entity (Node3-Sem)
4527 -----------------------------------
4528 -- 9.5.2 Entry Body Formal Part --
4529 -----------------------------------
4531 -- ENTRY_BODY_FORMAL_PART ::=
4532 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
4534 -- Note that an entry body formal part node is present even if it is
4535 -- empty. This reflects the grammar, in which it is the components of
4536 -- the entry body formal part that are optional, not the entry body
4537 -- formal part itself. Also this means that the barrier condition
4538 -- always has somewhere to be stored.
4540 -- Gigi restriction: This node never appears.
4542 -- N_Entry_Body_Formal_Part
4543 -- Sloc points to first token
4544 -- Entry_Index_Specification (Node4) (set to Empty if not present)
4545 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4546 -- Condition (Node1) from entry barrier of entry body
4548 --------------------------
4549 -- 9.5.2 Entry Barrier --
4550 --------------------------
4552 -- ENTRY_BARRIER ::= when CONDITION
4554 --------------------------------------
4555 -- 9.5.2 Entry Index Specification --
4556 --------------------------------------
4558 -- ENTRY_INDEX_SPECIFICATION ::=
4559 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
4561 -- Gigi restriction: This node never appears.
4563 -- N_Entry_Index_Specification
4564 -- Sloc points to FOR
4565 -- Defining_Identifier (Node1)
4566 -- Discrete_Subtype_Definition (Node4)
4568 ---------------------------------
4569 -- 9.5.3 Entry Call Statement --
4570 ---------------------------------
4572 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
4574 -- The parser may generate a procedure call for this construct. The
4575 -- semantic pass must correct this misidentification where needed.
4577 -- Gigi restriction: This node never appears.
4579 -- N_Entry_Call_Statement
4580 -- Sloc points to first token of name
4581 -- Name (Node2)
4582 -- Parameter_Associations (List3) (set to No_List if no
4583 -- actual parameter part)
4584 -- First_Named_Actual (Node4-Sem)
4586 ------------------------------
4587 -- 9.5.4 Requeue Statement --
4588 ------------------------------
4590 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
4592 -- Note: requeue statements are not permitted in Ada 83 mode
4594 -- Gigi restriction: This node never appears.
4596 -- N_Requeue_Statement
4597 -- Sloc points to REQUEUE
4598 -- Name (Node2)
4599 -- Abort_Present (Flag15)
4601 --------------------------
4602 -- 9.6 Delay Statement --
4603 --------------------------
4605 -- DELAY_STATEMENT ::=
4606 -- DELAY_UNTIL_STATEMENT
4607 -- | DELAY_RELATIVE_STATEMENT
4609 --------------------------------
4610 -- 9.6 Delay Until Statement --
4611 --------------------------------
4613 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
4615 -- Note: delay until statements are not permitted in Ada 83 mode
4617 -- Gigi restriction: This node never appears.
4619 -- N_Delay_Until_Statement
4620 -- Sloc points to DELAY
4621 -- Expression (Node3)
4623 -----------------------------------
4624 -- 9.6 Delay Relative Statement --
4625 -----------------------------------
4627 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
4629 -- Gigi restriction: This node never appears.
4631 -- N_Delay_Relative_Statement
4632 -- Sloc points to DELAY
4633 -- Expression (Node3)
4635 ---------------------------
4636 -- 9.7 Select Statement --
4637 ---------------------------
4639 -- SELECT_STATEMENT ::=
4640 -- SELECTIVE_ACCEPT
4641 -- | TIMED_ENTRY_CALL
4642 -- | CONDITIONAL_ENTRY_CALL
4643 -- | ASYNCHRONOUS_SELECT
4645 -----------------------------
4646 -- 9.7.1 Selective Accept --
4647 -----------------------------
4649 -- SELECTIVE_ACCEPT ::=
4650 -- select
4651 -- [GUARD]
4652 -- SELECT_ALTERNATIVE
4653 -- {or
4654 -- [GUARD]
4655 -- SELECT_ALTERNATIVE}
4656 -- [else
4657 -- SEQUENCE_OF_STATEMENTS]
4658 -- end select;
4660 -- Gigi restriction: This node never appears.
4662 -- Note: the guard expression, if present, appears in the node for
4663 -- the select alternative.
4665 -- N_Selective_Accept
4666 -- Sloc points to SELECT
4667 -- Select_Alternatives (List1)
4668 -- Else_Statements (List4) (set to No_List if no else part)
4670 ------------------
4671 -- 9.7.1 Guard --
4672 ------------------
4674 -- GUARD ::= when CONDITION =>
4676 -- As noted above, the CONDITION that is part of a GUARD is included
4677 -- in the node for the select alernative for convenience.
4679 -------------------------------
4680 -- 9.7.1 Select Alternative --
4681 -------------------------------
4683 -- SELECT_ALTERNATIVE ::=
4684 -- ACCEPT_ALTERNATIVE
4685 -- | DELAY_ALTERNATIVE
4686 -- | TERMINATE_ALTERNATIVE
4688 -------------------------------
4689 -- 9.7.1 Accept Alternative --
4690 -------------------------------
4692 -- ACCEPT_ALTERNATIVE ::=
4693 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
4695 -- Gigi restriction: This node never appears.
4697 -- N_Accept_Alternative
4698 -- Sloc points to ACCEPT
4699 -- Accept_Statement (Node2)
4700 -- Condition (Node1) from the guard (set to Empty if no guard present)
4701 -- Statements (List3) (set to Empty_List if no statements)
4702 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4703 -- Accept_Handler_Records (List5-Sem)
4705 ------------------------------
4706 -- 9.7.1 Delay Alternative --
4707 ------------------------------
4709 -- DELAY_ALTERNATIVE ::=
4710 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
4712 -- Gigi restriction: This node never appears.
4714 -- N_Delay_Alternative
4715 -- Sloc points to DELAY
4716 -- Delay_Statement (Node2)
4717 -- Condition (Node1) from the guard (set to Empty if no guard present)
4718 -- Statements (List3) (set to Empty_List if no statements)
4719 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4721 ----------------------------------
4722 -- 9.7.1 Terminate Alternative --
4723 ----------------------------------
4725 -- TERMINATE_ALTERNATIVE ::= terminate;
4727 -- Gigi restriction: This node never appears.
4729 -- N_Terminate_Alternative
4730 -- Sloc points to TERMINATE
4731 -- Condition (Node1) from the guard (set to Empty if no guard present)
4732 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4733 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
4735 -----------------------------
4736 -- 9.7.2 Timed Entry Call --
4737 -----------------------------
4739 -- TIMED_ENTRY_CALL ::=
4740 -- select
4741 -- ENTRY_CALL_ALTERNATIVE
4742 -- or
4743 -- DELAY_ALTERNATIVE
4744 -- end select;
4746 -- Gigi restriction: This node never appears.
4748 -- N_Timed_Entry_Call
4749 -- Sloc points to SELECT
4750 -- Entry_Call_Alternative (Node1)
4751 -- Delay_Alternative (Node4)
4753 -----------------------------------
4754 -- 9.7.2 Entry Call Alternative --
4755 -----------------------------------
4757 -- ENTRY_CALL_ALTERNATIVE ::=
4758 -- ENTRY_CALL_STATEMENT [SEQUENCE_OF_STATEMENTS]
4760 -- Gigi restriction: This node never appears.
4762 -- N_Entry_Call_Alternative
4763 -- Sloc points to first token of entry call statement
4764 -- Entry_Call_Statement (Node1)
4765 -- Statements (List3) (set to Empty_List if no statements)
4766 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4768 -----------------------------------
4769 -- 9.7.3 Conditional Entry Call --
4770 -----------------------------------
4772 -- CONDITIONAL_ENTRY_CALL ::=
4773 -- select
4774 -- ENTRY_CALL_ALTERNATIVE
4775 -- else
4776 -- SEQUENCE_OF_STATEMENTS
4777 -- end select;
4779 -- Gigi restriction: This node never appears.
4781 -- N_Conditional_Entry_Call
4782 -- Sloc points to SELECT
4783 -- Entry_Call_Alternative (Node1)
4784 -- Else_Statements (List4)
4786 --------------------------------
4787 -- 9.7.4 Asynchronous Select --
4788 --------------------------------
4790 -- ASYNCHRONOUS_SELECT ::=
4791 -- select
4792 -- TRIGGERING_ALTERNATIVE
4793 -- then abort
4794 -- ABORTABLE_PART
4795 -- end select;
4797 -- Note: asynchronous select is not permitted in Ada 83 mode
4799 -- Gigi restriction: This node never appears.
4801 -- N_Asynchronous_Select
4802 -- Sloc points to SELECT
4803 -- Triggering_Alternative (Node1)
4804 -- Abortable_Part (Node2)
4806 -----------------------------------
4807 -- 9.7.4 Triggering Alternative --
4808 -----------------------------------
4810 -- TRIGGERING_ALTERNATIVE ::=
4811 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
4813 -- Gigi restriction: This node never appears.
4815 -- N_Triggering_Alternative
4816 -- Sloc points to first token of triggering statement
4817 -- Triggering_Statement (Node1)
4818 -- Statements (List3) (set to Empty_List if no statements)
4819 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4821 ---------------------------------
4822 -- 9.7.4 Triggering Statement --
4823 ---------------------------------
4825 -- TRIGGERING_STATEMENT ::= ENTRY_CALL_STATEMENT | DELAY_STATEMENT
4827 ---------------------------
4828 -- 9.7.4 Abortable Part --
4829 ---------------------------
4831 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
4833 -- Gigi restriction: This node never appears.
4835 -- N_Abortable_Part
4836 -- Sloc points to ABORT
4837 -- Statements (List3)
4839 --------------------------
4840 -- 9.8 Abort Statement --
4841 --------------------------
4843 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
4845 -- Gigi restriction: This node never appears.
4847 -- N_Abort_Statement
4848 -- Sloc points to ABORT
4849 -- Names (List2)
4851 -------------------------
4852 -- 10.1.1 Compilation --
4853 -------------------------
4855 -- COMPILATION ::= {COMPILATION_UNIT}
4857 -- There is no explicit node in the tree for a compilation, since in
4858 -- general the compiler is processing only a single compilation unit
4859 -- at a time. It is possible to parse multiple units in syntax check
4860 -- only mode, but they the trees are discarded in any case.
4862 ------------------------------
4863 -- 10.1.1 Compilation Unit --
4864 ------------------------------
4866 -- COMPILATION_UNIT ::=
4867 -- CONTEXT_CLAUSE LIBRARY_ITEM
4868 -- | CONTEXT_CLAUSE SUBUNIT
4870 -- The N_Compilation_Unit node itself respresents the above syntax.
4871 -- However, there are two additional items not reflected in the above
4872 -- syntax. First we have the global declarations that are added by the
4873 -- code generator. These are outer level declarations (so they cannot
4874 -- be represented as being inside the units). An example is the wrapper
4875 -- subprograms that are created to do ABE checking. As always a list of
4876 -- declarations can contain actions as well (i.e. statements), and such
4877 -- statements are executed as part of the elaboration of the unit. Note
4878 -- that all such declarations are elaborated before the library unit.
4880 -- Similarly, certain actions need to be elaborated at the completion
4881 -- of elaboration of the library unit (notably the statement that sets
4882 -- the Boolean flag indicating that elaboration is complete).
4884 -- The third item not reflected in the syntax is pragmas that appear
4885 -- after the compilation unit. As always pragmas are a problem since
4886 -- they are not part of the formal syntax, but can be stuck into the
4887 -- source following a set of ad hoc rules, and we have to find an ad
4888 -- hoc way of sticking them into the tree. For pragmas that appear
4889 -- before the library unit, we just consider them to be part of the
4890 -- context clause, and pragmas can appear in the Context_Items list
4891 -- of the compilation unit. However, pragmas can also appear after
4892 -- the library item.
4894 -- To deal with all these problems, we create an auxiliary node for
4895 -- a compilation unit, referenced from the N_Compilation_Unit node
4896 -- that contains these three items.
4898 -- N_Compilation_Unit
4899 -- Sloc points to first token of defining unit name
4900 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
4901 -- Context_Items (List1) context items and pragmas preceding unit
4902 -- Private_Present (Flag15) set if library unit has private keyword
4903 -- Unit (Node2) library item or subunit
4904 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
4905 -- Has_No_Elaboration_Code (Flag17-Sem)
4906 -- Body_Required (Flag13-Sem) set for spec if body is required
4907 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
4908 -- First_Inlined_Subprogram (Node3-Sem)
4910 -- N_Compilation_Unit_Aux
4911 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
4912 -- Declarations (List2) (set to No_List if no global declarations)
4913 -- Actions (List1) (set to No_List if no actions)
4914 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
4916 --------------------------
4917 -- 10.1.1 Library Item --
4918 --------------------------
4920 -- LIBRARY_ITEM ::=
4921 -- [private] LIBRARY_UNIT_DECLARATION
4922 -- | LIBRARY_UNIT_BODY
4923 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
4925 -- Note: PRIVATE is not allowed in Ada 83 mode
4927 -- There is no explicit node in the tree for library item, instead
4928 -- the declaration or body, and the flag for private if present,
4929 -- appear in the N_Compilation_Unit clause.
4931 ----------------------------------------
4932 -- 10.1.1 Library Unit Declararation --
4933 ----------------------------------------
4935 -- LIBRARY_UNIT_DECLARATION ::=
4936 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
4937 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
4939 -------------------------------------------------
4940 -- 10.1.1 Library Unit Renaming Declararation --
4941 -------------------------------------------------
4943 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
4944 -- PACKAGE_RENAMING_DECLARATION
4945 -- | GENERIC_RENAMING_DECLARATION
4946 -- | SUBPROGRAM_RENAMING_DECLARATION
4948 -------------------------------
4949 -- 10.1.1 Library unit body --
4950 -------------------------------
4952 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
4954 ------------------------------
4955 -- 10.1.1 Parent Unit Name --
4956 ------------------------------
4958 -- PARENT_UNIT_NAME ::= NAME
4960 ----------------------------
4961 -- 10.1.2 Context clause --
4962 ----------------------------
4964 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
4966 -- The context clause can include pragmas, and any pragmas that appear
4967 -- before the context clause proper (i.e. all configuration pragmas,
4968 -- also appear at the front of this list).
4970 --------------------------
4971 -- 10.1.2 Context_Item --
4972 --------------------------
4974 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
4976 -------------------------
4977 -- 10.1.2 With clause --
4978 -------------------------
4980 -- WITH_CLAUSE ::=
4981 -- with library_unit_NAME {,library_unit_NAME};
4983 -- A separate With clause is built for each name, so that we have
4984 -- a Corresponding_Spec field for each with'ed spec. The flags
4985 -- First_Name and Last_Name are used to reconstruct the exact
4986 -- source form. When a list of names appears in one with clause,
4987 -- the first name in the list has First_Name set, and the last
4988 -- has Last_Name set. If the with clause has only one name, then
4989 -- both of the flags First_Name and Last_Name are set in this name.
4991 -- Note: in the case of implicit with's that are installed by the
4992 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
4993 -- set to Standard_Location, but it is incorrect to test the Sloc
4994 -- to find out if a with clause is implicit, test the flag instead.
4996 -- N_With_Clause
4997 -- Sloc points to first token of library unit name
4998 -- Name (Node2)
4999 -- Library_Unit (Node4-Sem)
5000 -- Corresponding_Spec (Node5-Sem)
5001 -- First_Name (Flag5) (set to True if first name or only one name)
5002 -- Last_Name (Flag6) (set to True if last name or only one name)
5003 -- Context_Installed (Flag13-Sem)
5004 -- Elaborate_Present (Flag4-Sem)
5005 -- Elaborate_All_Present (Flag15-Sem)
5006 -- Implicit_With (Flag17-Sem)
5007 -- Unreferenced_In_Spec (Flag7-Sem)
5008 -- No_Entities_Ref_In_Spec (Flag8-Sem)
5010 ----------------------
5011 -- With_Type clause --
5012 ----------------------
5014 -- This is a GNAT extension, used to implement mutually recursive
5015 -- types declared in different packages.
5017 -- WITH_TYPE_CLAUSE ::=
5018 -- with type type_NAME is access | with type type_NAME is tagged
5020 -- N_With_Type_Clause
5021 -- Sloc points to first token of type name
5022 -- Name (Node2)
5023 -- Tagged_Present (Flag15)
5025 ---------------------
5026 -- 10.2 Body stub --
5027 ---------------------
5029 -- BODY_STUB ::=
5030 -- SUBPROGRAM_BODY_STUB
5031 -- | PACKAGE_BODY_STUB
5032 -- | TASK_BODY_STUB
5033 -- | PROTECTED_BODY_STUB
5035 ----------------------------------
5036 -- 10.1.3 Subprogram Body Stub --
5037 ----------------------------------
5039 -- SUBPROGRAM_BODY_STUB ::=
5040 -- SUBPROGRAM_SPECIFICATION is separate;
5042 -- N_Subprogram_Body_Stub
5043 -- Sloc points to FUNCTION or PROCEDURE
5044 -- Specification (Node1)
5045 -- Library_Unit (Node4-Sem) points to the subunit
5046 -- Corresponding_Body (Node5-Sem)
5048 -------------------------------
5049 -- 10.1.3 Package Body Stub --
5050 -------------------------------
5052 -- PACKAGE_BODY_STUB ::=
5053 -- package body DEFINING_IDENTIFIER is separate;
5055 -- N_Package_Body_Stub
5056 -- Sloc points to PACKAGE
5057 -- Defining_Identifier (Node1)
5058 -- Library_Unit (Node4-Sem) points to the subunit
5059 -- Corresponding_Body (Node5-Sem)
5061 ----------------------------
5062 -- 10.1.3 Task Body Stub --
5063 ----------------------------
5065 -- TASK_BODY_STUB ::=
5066 -- task body DEFINING_IDENTIFIER is separate;
5068 -- N_Task_Body_Stub
5069 -- Sloc points to TASK
5070 -- Defining_Identifier (Node1)
5071 -- Library_Unit (Node4-Sem) points to the subunit
5072 -- Corresponding_Body (Node5-Sem)
5074 ---------------------------------
5075 -- 10.1.3 Protected Body Stub --
5076 ---------------------------------
5078 -- PROTECTED_BODY_STUB ::=
5079 -- protected body DEFINING_IDENTIFIER is separate;
5081 -- Note: protected body stubs are not allowed in Ada 83 mode
5083 -- N_Protected_Body_Stub
5084 -- Sloc points to PROTECTED
5085 -- Defining_Identifier (Node1)
5086 -- Library_Unit (Node4-Sem) points to the subunit
5087 -- Corresponding_Body (Node5-Sem)
5089 ---------------------
5090 -- 10.1.3 Subunit --
5091 ---------------------
5093 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
5095 -- N_Subunit
5096 -- Sloc points to SEPARATE
5097 -- Name (Node2) is the name of the parent unit
5098 -- Proper_Body (Node1) is the subunit body
5099 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
5101 ---------------------------------
5102 -- 11.1 Exception Declaration --
5103 ---------------------------------
5105 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception;
5107 -- For consistency with object declarations etc, the parser converts
5108 -- the case of multiple identifiers being declared to a series of
5109 -- declarations in which the expression is copied, using the More_Ids
5110 -- and Prev_Ids flags to remember the souce form as described in the
5111 -- section on "Handling of Defining Identifier Lists".
5113 -- N_Exception_Declaration
5114 -- Sloc points to EXCEPTION
5115 -- Defining_Identifier (Node1)
5116 -- Expression (Node3-Sem)
5117 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5118 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5120 ------------------------------------------
5121 -- 11.2 Handled Sequence Of Statements --
5122 ------------------------------------------
5124 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
5125 -- SEQUENCE_OF_STATEMENTS
5126 -- [exception
5127 -- EXCEPTION_HANDLER
5128 -- {EXCEPTION_HANDLER}]
5129 -- [at end
5130 -- cleanup_procedure_call (param, param, param, ...);]
5132 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
5133 -- used only internally currently, but is considered to be syntactic.
5134 -- At the moment, the only cleanup action allowed is a single call to
5135 -- a parameterless procedure, and the Identifier field of the node is
5136 -- the procedure to be called. Also there is a current restriction
5137 -- that exception handles and a cleanup cannot be present in the same
5138 -- frame, so at least one of Exception_Handlers or the Identifier must
5139 -- be missing.
5141 -- Actually, more accurately, this restriction applies to the original
5142 -- source program. In the expanded tree, if the At_End_Proc field is
5143 -- present, then there will also be an exception handler of the form:
5145 -- when all others =>
5146 -- cleanup;
5147 -- raise;
5149 -- where cleanup is the procedure to be generated. The reason we do
5150 -- this is so that the front end can handle the necessary entries in
5151 -- the exception tables, and other exception handler actions required
5152 -- as part of the normal handling for exception handlers.
5154 -- The AT END cleanup handler protects only the sequence of statements
5155 -- (not the associated declarations of the parent), just like exception
5156 -- handlers. The big difference is that the cleanup procedure is called
5157 -- on either a normal or an abnormal exit from the statement sequence.
5159 -- Note: the list of Exception_Handlers can contain pragmas as well
5160 -- as actual handlers. In practice these pragmas can only occur at
5161 -- the start of the list, since any pragmas occurring later on will
5162 -- be included in the statement list of the corresponding handler.
5164 -- Note: although in the Ada syntax, the sequence of statements in
5165 -- a handled sequence of statements can only contain statements, we
5166 -- allow free mixing of declarations and statements in the resulting
5167 -- expanded tree. This is for example used to deal with the case of
5168 -- a cleanup procedure that must handle declarations as well as the
5169 -- statements of a block.
5171 -- N_Handled_Sequence_Of_Statements
5172 -- Sloc points to first token of first statement
5173 -- Statements (List3)
5174 -- End_Label (Node4) (set to Empty if expander generated)
5175 -- Exception_Handlers (List5) (set to No_List if none present)
5176 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
5177 -- First_Real_Statement (Node2-Sem)
5178 -- Zero_Cost_Handling (Flag5-Sem)
5180 -- Note: the parent always contains a Declarations field which contains
5181 -- declarations associated with the handled sequence of statements. This
5182 -- is true even in the case of an accept statement (see description of
5183 -- the N_Accept_Statement node).
5185 -- End_Label refers to the containing construct.
5187 -----------------------------
5188 -- 11.2 Exception Handler --
5189 -----------------------------
5191 -- EXCEPTION_HANDLER ::=
5192 -- when [CHOICE_PARAMETER_SPECIFICATION :]
5193 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
5194 -- SEQUENCE_OF_STATEMENTS
5196 -- Note: choice parameter specification is not allowed in Ada 83 mode
5198 -- N_Exception_Handler
5199 -- Sloc points to WHEN
5200 -- Choice_Parameter (Node2) (set to Empty if not present)
5201 -- Exception_Choices (List4)
5202 -- Statements (List3)
5203 -- Zero_Cost_Handling (Flag5-Sem)
5205 ------------------------------------------
5206 -- 11.2 Choice parameter specification --
5207 ------------------------------------------
5209 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
5211 ----------------------------
5212 -- 11.2 Exception Choice --
5213 ----------------------------
5215 -- EXCEPTION_CHOICE ::= exception_NAME | others
5217 -- Except in the case of OTHERS, no explicit node appears in the tree
5218 -- for exception choice. Instead the exception name appears directly.
5219 -- An OTHERS choice is represented by a N_Others_Choice node (see
5220 -- section 3.8.1.
5222 -- Note: for the exception choice created for an at end handler, the
5223 -- exception choice is an N_Others_Choice node with All_Others set.
5225 ---------------------------
5226 -- 11.3 Raise Statement --
5227 ---------------------------
5229 -- RAISE_STATEMENT ::= raise [exception_NAME];
5231 -- N_Raise_Statement
5232 -- Sloc points to RAISE
5233 -- Name (Node2) (set to Empty if no exception name present)
5235 -------------------------------
5236 -- 12.1 Generic Declaration --
5237 -------------------------------
5239 -- GENERIC_DECLARATION ::=
5240 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
5242 ------------------------------------------
5243 -- 12.1 Generic Subprogram Declaration --
5244 ------------------------------------------
5246 -- GENERIC_SUBPROGRAM_DECLARATION ::=
5247 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION;
5249 -- Note: Generic_Formal_Declarations can include pragmas
5251 -- N_Generic_Subprogram_Declaration
5252 -- Sloc points to GENERIC
5253 -- Specification (Node1) subprogram specification
5254 -- Corresponding_Body (Node5-Sem)
5255 -- Generic_Formal_Declarations (List2) from generic formal part
5256 -- Parent_Spec (Node4-Sem)
5258 ---------------------------------------
5259 -- 12.1 Generic Package Declaration --
5260 ---------------------------------------
5262 -- GENERIC_PACKAGE_DECLARATION ::=
5263 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION;
5265 -- Note: when we do generics right, the Activation_Chain_Entity entry
5266 -- for this node can be removed (since the expander won't see generic
5267 -- units any more)???.
5269 -- Note: Generic_Formal_Declarations can include pragmas
5271 -- N_Generic_Package_Declaration
5272 -- Sloc points to GENERIC
5273 -- Specification (Node1) package specification
5274 -- Corresponding_Body (Node5-Sem)
5275 -- Generic_Formal_Declarations (List2) from generic formal part
5276 -- Parent_Spec (Node4-Sem)
5277 -- Activation_Chain_Entity (Node3-Sem)
5279 -------------------------------
5280 -- 12.1 Generic Formal Part --
5281 -------------------------------
5283 -- GENERIC_FORMAL_PART ::=
5284 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
5286 ------------------------------------------------
5287 -- 12.1 Generic Formal Parameter Declaration --
5288 ------------------------------------------------
5290 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
5291 -- FORMAL_OBJECT_DECLARATION
5292 -- | FORMAL_TYPE_DECLARATION
5293 -- | FORMAL_SUBPROGRAM_DECLARATION
5294 -- | FORMAL_PACKAGE_DECLARATION
5296 ---------------------------------
5297 -- 12.3 Generic Instantiation --
5298 ---------------------------------
5300 -- GENERIC_INSTANTIATION ::=
5301 -- package DEFINING_PROGRAM_UNIT_NAME is
5302 -- new generic_package_NAME [GENERIC_ACTUAL_PART];
5303 -- | procedure DEFINING_PROGRAM_UNIT_NAME is
5304 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART];
5305 -- | function DEFINING_DESIGNATOR is
5306 -- new generic_function_NAME [GENERIC_ACTUAL_PART];
5308 -- N_Package_Instantiation
5309 -- Sloc points to PACKAGE
5310 -- Defining_Unit_Name (Node1)
5311 -- Name (Node2)
5312 -- Generic_Associations (List3) (set to No_List if no
5313 -- generic actual part)
5314 -- Parent_Spec (Node4-Sem)
5315 -- Instance_Spec (Node5-Sem)
5316 -- ABE_Is_Certain (Flag18-Sem)
5318 -- N_Procedure_Instantiation
5319 -- Sloc points to PROCEDURE
5320 -- Defining_Unit_Name (Node1)
5321 -- Name (Node2)
5322 -- Parent_Spec (Node4-Sem)
5323 -- Generic_Associations (List3) (set to No_List if no
5324 -- generic actual part)
5325 -- Instance_Spec (Node5-Sem)
5326 -- ABE_Is_Certain (Flag18-Sem)
5328 -- N_Function_Instantiation
5329 -- Sloc points to FUNCTION
5330 -- Defining_Unit_Name (Node1)
5331 -- Name (Node2)
5332 -- Generic_Associations (List3) (set to No_List if no
5333 -- generic actual part)
5334 -- Parent_Spec (Node4-Sem)
5335 -- Instance_Spec (Node5-Sem)
5336 -- ABE_Is_Certain (Flag18-Sem)
5338 ------------------------------
5339 -- 12.3 Generic Actual Part --
5340 ------------------------------
5342 -- GENERIC_ACTUAL_PART ::=
5343 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
5345 -------------------------------
5346 -- 12.3 Generic Association --
5347 -------------------------------
5349 -- GENERIC_ASSOCIATION ::=
5350 -- [generic_formal_parameter_SELECTOR_NAME =>]
5351 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER
5353 -- Note: unlike the procedure call case, a generic association node
5354 -- is generated for every association, even if no formal is present.
5355 -- In this case the parser will leave the Selector_Name field set
5356 -- to Empty, to be filled in later by the semantic pass.
5358 -- N_Generic_Association
5359 -- Sloc points to first token of generic association
5360 -- Selector_Name (Node2) (set to Empty if no formal
5361 -- parameter selector name)
5362 -- Explicit_Generic_Actual_Parameter (Node1)
5364 ---------------------------------------------
5365 -- 12.3 Explicit Generic Actual Parameter --
5366 ---------------------------------------------
5368 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
5369 -- EXPRESSION | variable_NAME | subprogram_NAME
5370 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
5372 -------------------------------------
5373 -- 12.4 Formal Object Declaration --
5374 -------------------------------------
5376 -- FORMAL_OBJECT_DECLARATION ::=
5377 -- DEFINING_IDENTIFIER_LIST :
5378 -- MODE SUBTYPE_MARK [:= DEFAULT_EXPRESSION];
5380 -- Although the syntax allows multiple identifiers in the list, the
5381 -- semantics is as though successive declarations were given with
5382 -- identical type definition and expression components. To simplify
5383 -- semantic processing, the parser represents a multiple declaration
5384 -- case as a sequence of single declarations, using the More_Ids and
5385 -- Prev_Ids flags to preserve the original source form as described
5386 -- in the section on "Handling of Defining Identifier Lists".
5388 -- N_Formal_Object_Declaration
5389 -- Sloc points to first identifier
5390 -- Defining_Identifier (Node1)
5391 -- In_Present (Flag15)
5392 -- Out_Present (Flag17)
5393 -- Subtype_Mark (Node4)
5394 -- Expression (Node3) (set to Empty if no default expression)
5395 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5396 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5398 -----------------------------------
5399 -- 12.5 Formal Type Declaration --
5400 -----------------------------------
5402 -- FORMAL_TYPE_DECLARATION ::=
5403 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5404 -- is FORMAL_TYPE_DEFINITION;
5406 -- N_Formal_Type_Declaration
5407 -- Sloc points to TYPE
5408 -- Defining_Identifier (Node1)
5409 -- Formal_Type_Definition (Node3)
5410 -- Discriminant_Specifications (List4) (set to No_List if no
5411 -- discriminant part)
5412 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5414 ----------------------------------
5415 -- 12.5 Formal type definition --
5416 ----------------------------------
5418 -- FORMAL_TYPE_DEFINITION ::=
5419 -- FORMAL_PRIVATE_TYPE_DEFINITION
5420 -- | FORMAL_DERIVED_TYPE_DEFINITION
5421 -- | FORMAL_DISCRETE_TYPE_DEFINITION
5422 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
5423 -- | FORMAL_MODULAR_TYPE_DEFINITION
5424 -- | FORMAL_FLOATING_POINT_DEFINITION
5425 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
5426 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
5427 -- | FORMAL_ARRAY_TYPE_DEFINITION
5428 -- | FORMAL_ACCESS_TYPE_DEFINITION
5430 ---------------------------------------------
5431 -- 12.5.1 Formal Private Type Definition --
5432 ---------------------------------------------
5434 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
5435 -- [[abstract] tagged] [limited] private
5437 -- Note: TAGGED is not allowed in Ada 83 mode
5439 -- N_Formal_Private_Type_Definition
5440 -- Sloc points to PRIVATE
5441 -- Abstract_Present (Flag4)
5442 -- Tagged_Present (Flag15)
5443 -- Limited_Present (Flag17)
5445 --------------------------------------------
5446 -- 12.5.1 Formal Derived Type Definition --
5447 --------------------------------------------
5449 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
5450 -- [abstract] new SUBTYPE_MARK [with private]
5452 -- Note: this construct is not allowed in Ada 83 mode
5454 -- N_Formal_Derived_Type_Definition
5455 -- Sloc points to NEW
5456 -- Subtype_Mark (Node4)
5457 -- Private_Present (Flag15)
5458 -- Abstract_Present (Flag4)
5460 ---------------------------------------------
5461 -- 12.5.2 Formal Discrete Type Definition --
5462 ---------------------------------------------
5464 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
5466 -- N_Formal_Discrete_Type_Definition
5467 -- Sloc points to (
5469 ---------------------------------------------------
5470 -- 12.5.2 Formal Signed Integer Type Definition --
5471 ---------------------------------------------------
5473 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
5475 -- N_Formal_Signed_Integer_Type_Definition
5476 -- Sloc points to RANGE
5478 --------------------------------------------
5479 -- 12.5.2 Formal Modular Type Definition --
5480 --------------------------------------------
5482 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
5484 -- N_Formal_Modular_Type_Definition
5485 -- Sloc points to MOD
5487 ----------------------------------------------
5488 -- 12.5.2 Formal Floating Point Definition --
5489 ----------------------------------------------
5491 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
5493 -- N_Formal_Floating_Point_Definition
5494 -- Sloc points to DIGITS
5496 ----------------------------------------------------
5497 -- 12.5.2 Formal Ordinary Fixed Point Definition --
5498 ----------------------------------------------------
5500 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
5502 -- N_Formal_Ordinary_Fixed_Point_Definition
5503 -- Sloc points to DELTA
5505 ---------------------------------------------------
5506 -- 12.5.2 Formal Decimal Fixed Point Definition --
5507 ---------------------------------------------------
5509 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
5511 -- Note: formal decimal fixed point definition not allowed in Ada 83
5513 -- N_Formal_Decimal_Fixed_Point_Definition
5514 -- Sloc points to DELTA
5516 ------------------------------------------
5517 -- 12.5.3 Formal Array Type Definition --
5518 ------------------------------------------
5520 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
5522 -------------------------------------------
5523 -- 12.5.4 Formal Access Type Definition --
5524 -------------------------------------------
5526 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
5528 -----------------------------------------
5529 -- 12.6 Formal Subprogram Declaration --
5530 -----------------------------------------
5532 -- FORMAL_SUBPROGRAM_DECLARATION ::=
5533 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT];
5535 -- N_Formal_Subprogram_Declaration
5536 -- Sloc points to WITH
5537 -- Specification (Node1)
5538 -- Default_Name (Node2) (set to Empty if no subprogram default)
5539 -- Box_Present (Flag15)
5541 -- Note: if no subprogram default is present, then Name is set
5542 -- to Empty, and Box_Present is False.
5544 ------------------------------
5545 -- 12.6 Subprogram Default --
5546 ------------------------------
5548 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
5550 -- There is no separate node in the tree for a subprogram default.
5551 -- Instead the parent (N_Formal_Subprogram_Declaration) node contains
5552 -- the default name or box indication, as needed.
5554 ------------------------
5555 -- 12.6 Default Name --
5556 ------------------------
5558 -- DEFAULT_NAME ::= NAME
5560 --------------------------------------
5561 -- 12.7 Formal Package Declaration --
5562 --------------------------------------
5564 -- FORMAL_PACKAGE_DECLARATION ::=
5565 -- with package DEFINING_IDENTIFIER
5566 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART;
5568 -- Note: formal package declarations not allowed in Ada 83 mode
5570 -- N_Formal_Package_Declaration
5571 -- Sloc points to WITH
5572 -- Defining_Identifier (Node1)
5573 -- Name (Node2)
5574 -- Generic_Associations (List3) (set to No_List if (<>) case or
5575 -- empty generic actual part)
5576 -- Box_Present (Flag15)
5577 -- Instance_Spec (Node5-Sem)
5578 -- ABE_Is_Certain (Flag18-Sem)
5580 --------------------------------------
5581 -- 12.7 Formal Package Actual Part --
5582 --------------------------------------
5584 -- FORMAL_PACKAGE_ACTUAL_PART ::=
5585 -- (<>) | [GENERIC_ACTUAL_PART]
5587 -- There is no explicit node in the tree for a formal package
5588 -- actual part. Instead the information appears in the parent node
5589 -- (i.e. the formal package declaration node itself).
5591 ---------------------------------
5592 -- 13.1 Representation clause --
5593 ---------------------------------
5595 -- REPRESENTATION_CLAUSE ::=
5596 -- ATTRIBUTE_DEFINITION_CLAUSE
5597 -- | ENUMERATION_REPRESENTATION_CLAUSE
5598 -- | RECORD_REPRESENTATION_CLAUSE
5599 -- | AT_CLAUSE
5601 ----------------------
5602 -- 13.1 Local Name --
5603 ----------------------
5605 -- LOCAL_NAME :=
5606 -- DIRECT_NAME
5607 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
5608 -- | library_unit_NAME
5610 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
5611 -- as an attribute reference, which has essentially the same form.
5613 ---------------------------------------
5614 -- 13.3 Attribute definition clause --
5615 ---------------------------------------
5617 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
5618 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
5619 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
5621 -- In Ada 83, the expression must be a simple expression and the
5622 -- local name must be a direct name.
5624 -- Note: The only attribute definition clause that is processed
5625 -- by Gigi is the alignment clause (for all other cases, the
5626 -- information is extracted by the front end and either results
5627 -- in setting entity information, e.g. Esize for the Size case,
5628 -- or in appropriate expansion actions (e.g. in the storage size
5629 -- case). For the alignment case, Gigi requires that the expression
5630 -- be an integer literal.
5632 -- N_Attribute_Definition_Clause
5633 -- Sloc points to FOR
5634 -- Name (Node2) the local name
5635 -- Chars (Name1) the identifier name from the attribute designator
5636 -- Expression (Node3) the expression or name
5637 -- Next_Rep_Item (Node4-Sem)
5638 -- From_At_Mod (Flag4-Sem)
5640 ---------------------------------------------
5641 -- 13.4 Enumeration representation clause --
5642 ---------------------------------------------
5644 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
5645 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
5647 -- In Ada 83, the name must be a direct name
5649 -- N_Enumeration_Representation_Clause
5650 -- Sloc points to FOR
5651 -- Identifier (Node1) direct name
5652 -- Array_Aggregate (Node3)
5653 -- Next_Rep_Item (Node4-Sem)
5655 ---------------------------------
5656 -- 13.4 Enumeration aggregate --
5657 ---------------------------------
5659 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
5661 ------------------------------------------
5662 -- 13.5.1 Record representation clause --
5663 ------------------------------------------
5665 -- RECORD_REPRESENTATION_CLAUSE ::=
5666 -- for first_subtype_LOCAL_NAME use
5667 -- record [MOD_CLAUSE]
5668 -- {COMPONENT_CLAUSE}
5669 -- end record;
5671 -- Gigi restriction: Mod_Clause is always Empty (if present it is
5672 -- replaced by a corresponding Alignment attribute definition clause).
5674 -- Note: Component_Clauses can include pragmas
5676 -- N_Record_Representation_Clause
5677 -- Sloc points to FOR
5678 -- Identifier (Node1) direct name
5679 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
5680 -- Component_Clauses (List3)
5681 -- Next_Rep_Item (Node4-Sem)
5683 ------------------------------
5684 -- 13.5.1 Component clause --
5685 ------------------------------
5687 -- COMPONENT_CLAUSE ::=
5688 -- component_LOCAL_NAME at POSITION
5689 -- range FIRST_BIT .. LAST_BIT;
5691 -- N_Component_Clause
5692 -- Sloc points to AT
5693 -- Component_Name (Node1) points to Name or Attribute_Reference
5694 -- Position (Node2)
5695 -- First_Bit (Node3)
5696 -- Last_Bit (Node4)
5698 ----------------------
5699 -- 13.5.1 Position --
5700 ----------------------
5702 -- POSITION ::= static_EXPRESSION
5704 -----------------------
5705 -- 13.5.1 First_Bit --
5706 -----------------------
5708 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
5710 ----------------------
5711 -- 13.5.1 Last_Bit --
5712 ----------------------
5714 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
5716 --------------------------
5717 -- 13.8 Code statement --
5718 --------------------------
5720 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
5722 -- Note: in GNAT, the qualified expression has the form
5724 -- Asm_Insn'(Asm (...));
5726 -- or
5728 -- Asm_Insn'(Asm_Volatile (...))
5730 -- See package System.Machine_Code in file s-maccod.ads for details
5731 -- on the allowed parameters to Asm[_Volatile]. There are two ways
5732 -- this node can arise, as a code statement, in which case the
5733 -- expression is the qualified expression, or as a result of the
5734 -- expansion of an intrinsic call to the Asm or Asm_Input procedure.
5736 -- N_Code_Statement
5737 -- Sloc points to first token of the expression
5738 -- Expression (Node3)
5740 -- Note: package Exp_Code contains an abstract functional interface
5741 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
5743 ------------------------
5744 -- 13.12 Restriction --
5745 ------------------------
5747 -- RESTRICTION ::=
5748 -- restriction_IDENTIFIER
5749 -- | restriction_parameter_IDENTIFIER => EXPRESSION
5751 -- There is no explicit node for restrictions. Instead the restriction
5752 -- appears in normal pragma syntax as a pragma argument association,
5753 -- which has the same syntactic form.
5755 --------------------------
5756 -- B.2 Shift Operators --
5757 --------------------------
5759 -- Calls to the intrinsic shift functions are converted to one of
5760 -- the following shift nodes, which have the form of normal binary
5761 -- operator names. Note that for a given shift operation, one node
5762 -- covers all possible types, as for normal operators.
5764 -- Note: it is perfectly permissible for the expander to generate
5765 -- shift operation nodes directly, in which case they will be analyzed
5766 -- and parsed in the usual manner.
5768 -- Sprint syntax: shift-function-name!(expr, count)
5770 -- Note: the Left_Opnd field holds the first argument (the value to
5771 -- be shifted). The Right_Opnd field holds the second argument (the
5772 -- shift count). The Chars field is the name of the intrinsic function.
5774 -- N_Op_Rotate_Left
5775 -- Sloc points to the function name
5776 -- plus fields for binary operator
5777 -- plus fields for expression
5778 -- Shift_Count_OK (Flag4-Sem)
5780 -- N_Op_Rotate_Right
5781 -- Sloc points to the function name
5782 -- plus fields for binary operator
5783 -- plus fields for expression
5784 -- Shift_Count_OK (Flag4-Sem)
5786 -- N_Op_Shift_Left
5787 -- Sloc points to the function name
5788 -- plus fields for binary operator
5789 -- plus fields for expression
5790 -- Shift_Count_OK (Flag4-Sem)
5792 -- N_Op_Shift_Right_Arithmetic
5793 -- Sloc points to the function name
5794 -- plus fields for binary operator
5795 -- plus fields for expression
5796 -- Shift_Count_OK (Flag4-Sem)
5798 -- N_Op_Shift_Right
5799 -- Sloc points to the function name
5800 -- plus fields for binary operator
5801 -- plus fields for expression
5802 -- Shift_Count_OK (Flag4-Sem)
5804 --------------------------
5805 -- Obsolescent Features --
5806 --------------------------
5808 -- The syntax descriptions and tree nodes for obsolescent features are
5809 -- grouped together, corresponding to their location in appendix I in
5810 -- the RM. However, parsing and semantic analysis for these constructs
5811 -- is located in an appropriate chapter (see individual notes).
5813 ---------------------------
5814 -- J.3 Delta Constraint --
5815 ---------------------------
5817 -- Note: the parse routine for this construct is located in section
5818 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
5819 -- where delta constraint logically belongs.
5821 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
5823 -- N_Delta_Constraint
5824 -- Sloc points to DELTA
5825 -- Delta_Expression (Node3)
5826 -- Range_Constraint (Node4) (set to Empty if not present)
5828 --------------------
5829 -- J.7 At Clause --
5830 --------------------
5832 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
5834 -- Note: the parse routine for this construct is located in Par-Ch13,
5835 -- and the semantic analysis is in Sem_Ch13, where at clause logically
5836 -- belongs if it were not obsolescent.
5838 -- Note: in Ada 83 the expression must be a simple expression
5840 -- Gigi restriction: This node never appears, it is rewritten as an
5841 -- address attribute definition clause.
5843 -- N_At_Clause
5844 -- Sloc points to FOR
5845 -- Identifier (Node1)
5846 -- Expression (Node3)
5848 ---------------------
5849 -- J.8 Mod clause --
5850 ---------------------
5852 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
5854 -- Note: the parse routine for this construct is located in Par-Ch13,
5855 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
5856 -- belongs if it were not obsolescent.
5858 -- Note: in Ada 83, the expression must be a simple expression
5860 -- Gigi restriction: this node never appears. It is replaced
5861 -- by a corresponding Alignment attribute definition clause.
5863 -- Note: pragmas can appear before and after the MOD_CLAUSE since
5864 -- its name has "clause" in it. This is rather strange, but is quite
5865 -- definitely specified. The pragmas before are collected in the
5866 -- Pragmas_Before field of the mod clause node itself, and pragmas
5867 -- after are simply swallowed up in the list of component clauses.
5869 -- N_Mod_Clause
5870 -- Sloc points to AT
5871 -- Expression (Node3)
5872 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
5874 --------------------
5875 -- Semantic Nodes --
5876 --------------------
5878 -- These semantic nodes are used to hold additional semantic information.
5879 -- They are inserted into the tree as a result of semantic processing.
5880 -- Although there are no legitimate source syntax constructions that
5881 -- correspond directly to these nodes, we need a source syntax for the
5882 -- reconstructed tree printed by Sprint, and the node descriptions here
5883 -- show this syntax.
5885 ----------------------------
5886 -- Conditional Expression --
5887 ----------------------------
5889 -- This node is used to represent an expression corresponding to the
5890 -- C construct (condition ? then-expression : else_expression), where
5891 -- Expressions is a three element list, whose first expression is the
5892 -- condition, and whose second and third expressions are the then and
5893 -- else expressions respectively.
5895 -- Note: the Then_Actions and Else_Actions fields are always set to
5896 -- No_List in the tree passed to Gigi. These fields are used only
5897 -- for temporary processing purposes in the expander.
5899 -- Sprint syntax: (if expr then expr else expr)
5901 -- N_Conditional_Expression
5902 -- Sloc points to related node
5903 -- Expressions (List1)
5904 -- Then_Actions (List2-Sem)
5905 -- Else_Actions (List3-Sem)
5906 -- plus fields for expression
5908 -- Note: in the case where a debug source file is generated, the Sloc
5909 -- for this node points to the IF keyword in the Sprint file output.
5911 -------------------
5912 -- Expanded_Name --
5913 -------------------
5915 -- The N_Expanded_Name node is used to represent a selected component
5916 -- name that has been resolved to an expanded name. The semantic phase
5917 -- replaces N_Selected_Component nodes that represent names by the use
5918 -- of this node, leaving the N_Selected_Component node used only when
5919 -- the prefix is a record or protected type.
5921 -- The fields of the N_Expanded_Name node are layed out identically
5922 -- to those of the N_Selected_Component node, allowing conversion of
5923 -- an expanded name node to a selected component node to be done
5924 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
5926 -- There is no special sprint syntax for an expanded name.
5928 -- N_Expanded_Name
5929 -- Sloc points to the period
5930 -- Chars (Name1) copy of Chars field of selector name
5931 -- Prefix (Node3)
5932 -- Selector_Name (Node2)
5933 -- Entity (Node4-Sem)
5934 -- Associated_Node (Node4-Sem)
5935 -- Redundant_Use (Flag13-Sem)
5936 -- Has_Private_View (Flag11-Sem) set in generic units.
5937 -- plus fields for expression
5939 --------------------
5940 -- Free Statement --
5941 --------------------
5943 -- The N_Free_Statement node is generated as a result of a call to an
5944 -- instantiation of Unchecked_Deallocation. The instantiation of this
5945 -- generic is handled specially and generates this node directly.
5947 -- Sprint syntax: free expression
5949 -- N_Free_Statement
5950 -- Sloc is copied from the unchecked deallocation call
5951 -- Expression (Node3) argument to unchecked deallocation call
5952 -- Storage_Pool (Node1-Sem)
5953 -- Procedure_To_Call (Node4-Sem)
5955 -- Note: in the case where a debug source file is generated, the Sloc
5956 -- for this node points to the FREE keyword in the Sprint file output.
5958 -------------------
5959 -- Freeze Entity --
5960 -------------------
5962 -- This node marks the point in a declarative part at which an entity
5963 -- declared therein becomes frozen. The expander places initialization
5964 -- procedures for types at those points. Gigi uses the freezing point
5965 -- to elaborate entities that may depend on previous private types.
5967 -- See the section in Einfo "Delayed Freezing and Elaboration" for
5968 -- a full description of the use of this node.
5970 -- The Entity field points back to the entity for the type (whose
5971 -- Freeze_Node field points back to this freeze node).
5973 -- The Actions field contains a list of declarations and statements
5974 -- generated by the expander which are associated with the freeze
5975 -- node, and are elaborated as though the freeze node were replaced
5976 -- by this sequence of actions.
5978 -- Note: the Sloc field in the freeze node references a construct
5979 -- associated with the freezing point. This is used for posting
5980 -- messages in some error/warning situations, e.g. the case where
5981 -- a primitive operation of a tagged type is declared too late.
5983 -- Sprint syntax: freeze entity-name [
5984 -- freeze actions
5985 -- ]
5987 -- N_Freeze_Entity
5988 -- Sloc points near freeze point (see above special note)
5989 -- Entity (Node4-Sem)
5990 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
5991 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
5992 -- Actions (List1) (set to No_List if no freeze actions)
5993 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
5995 -- The Actions field holds actions associated with the freeze. These
5996 -- actions are elaborated at the point where the type is frozen.
5998 -- Note: in the case where a debug source file is generated, the Sloc
5999 -- for this node points to the FREEZE keyword in the Sprint file output.
6001 --------------------------------
6002 -- Implicit Label Declaration --
6003 --------------------------------
6005 -- An implicit label declaration is created for every occurrence of a
6006 -- label on a statement or a label on a block or loop. It is chained
6007 -- in the declarations of the innermost enclosing block as specified
6008 -- in RM section 5.1 (3).
6010 -- The Defining_Identifier is the actual identifier for the
6011 -- statement identifier. Note that the occurrence of the label
6012 -- is a reference, NOT the defining occurrence. The defining
6013 -- occurrence occurs at the head of the innermost enclosing
6014 -- block, and is represented by this node.
6016 -- Note: from the grammar, this might better be called an implicit
6017 -- statement identifier declaration, but the term we choose seems
6018 -- friendlier, since at least informally statement identifiers are
6019 -- called labels in both cases (i.e. when used in labels, and when
6020 -- used as the identifiers of blocks and loops).
6022 -- Note: although this is logically a semantic node, since it does
6023 -- not correspond directly to a source syntax construction, these
6024 -- nodes are actually created by the parser in a post pass done just
6025 -- after parsing is complete, before semantic analysis is started (see
6026 -- the Par.Labl subunit in file par-labl.adb).
6028 -- Sprint syntax: labelname : label;
6030 -- N_Implicit_Label_Declaration
6031 -- Sloc points to the << of the label
6032 -- Defining_Identifier (Node1)
6033 -- Label_Construct (Node2-Sem)
6035 -- Note: in the case where a debug source file is generated, the Sloc
6036 -- for this node points to the label name in the generated declaration.
6038 ---------------------
6039 -- Itype_Reference --
6040 ---------------------
6042 -- This node is used to create a reference to an Itype. The only
6043 -- purpose is to make sure that the Itype is defined if this is the
6044 -- first reference.
6046 -- A typical use of this node is when an Itype is to be referenced in
6047 -- two branches of an if statement. In this case it is important that
6048 -- the first use of the Itype not be inside the conditional, since
6049 -- then it might not be defined if the wrong branch of the if is
6050 -- taken in the case where the definition generates elaboration code.
6052 -- The Itype field points to the referenced Itype
6054 -- sprint syntax: reference itype-name
6056 -- N_Itype_Reference
6057 -- Sloc points to the node generating the reference
6058 -- Itype (Node1-Sem)
6060 -- Note: in the case where a debug source file is generated, the Sloc
6061 -- for this node points to the REFERENCE keyword in the file output.
6063 ---------------------
6064 -- Raise_xxx_Error --
6065 ---------------------
6067 -- One of these nodes is created during semantic analysis to replace
6068 -- a node for an expression that is determined to definitely raise
6069 -- the corresponding exception.
6071 -- The N_Raise_xxx_Error node may also stand alone in place
6072 -- of a declaration or statement, in which case it simply causes
6073 -- the exception to be raised (i.e. it is equivalent to a raise
6074 -- statement that raises the corresponding exception). This use
6075 -- is distinguished by the fact that the Etype in this case is
6076 -- Standard_Void_Type, In the subexprssion case, the Etype is the
6077 -- same as the type of the subexpression which it replaces.
6079 -- If Condition is empty, then the raise is unconditional. If the
6080 -- Condition field is non-empty, it is a boolean expression which
6081 -- is first evaluated, and the exception is raised only if the
6082 -- value of the expression is True. In the unconditional case, the
6083 -- creation of this node is usually accompanied by a warning message
6084 -- error. The creation of this node will usually be accompanied by a
6085 -- message (unless it appears within the right operand of a short
6086 -- circuit form whose left argument is static and decisively
6087 -- eliminates elaboration of the raise operation.
6089 -- The exception is generated with a message that contains the
6090 -- file name and line number, and then appended text. The Reason
6091 -- code shows the text to be added. The Reason code is an element
6092 -- of the type Types.RT_Exception_Code, and indicates both the
6093 -- message to be added, and the exception to be raised (which must
6094 -- match the node type). The value is stored by storing a Uint which
6095 -- is the Pos value of the enumeration element in this type.
6097 -- Gigi restriction: This expander ensures that the type of the
6098 -- Condition field is always Standard.Boolean, even if the type
6099 -- in the source is some non-standard boolean type.
6101 -- Sprint syntax: [xxx_error "msg"]
6102 -- or: [xxx_error when condition "msg"]
6104 -- N_Raise_Constraint_Error
6105 -- Sloc references related construct
6106 -- Condition (Node1) (set to Empty if no condition)
6107 -- Reason (Uint3)
6108 -- plus fields for expression
6110 -- N_Raise_Program_Error
6111 -- Sloc references related construct
6112 -- Condition (Node1) (set to Empty if no condition)
6113 -- Reason (Uint3)
6114 -- plus fields for expression
6116 -- N_Raise_Storage_Error
6117 -- Sloc references related construct
6118 -- Condition (Node1) (set to Empty if no condition)
6119 -- Reason (Uint3)
6120 -- plus fields for expression
6122 -- Note: Sloc is copied from the expression generating the exception.
6123 -- In the case where a debug source file is generated, the Sloc for
6124 -- this node points to the left bracket in the Sprint file output.
6126 ---------------
6127 -- Reference --
6128 ---------------
6130 -- For a number of purposes, we need to construct references to objects.
6131 -- These references are subsequently treated as normal access values.
6132 -- An example is the construction of the parameter block passed to a
6133 -- task entry. The N_Reference node is provided for this purpose. It is
6134 -- similar in effect to the use of the Unrestricted_Access attribute,
6135 -- and like Unrestricted_Access can be applied to objects which would
6136 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
6137 -- objects which are not aliased, and slices). In addition it can be
6138 -- applied to composite type values as well as objects, including string
6139 -- values and aggregates.
6141 -- Note: we use the Prefix field for this expression so that the
6142 -- resulting node can be treated using common code with the attribute
6143 -- nodes for the 'Access and related attributes. Logically it would make
6144 -- more sense to call it an Expression field, but then we would have to
6145 -- special case the treatment of the N_Reference node.
6147 -- Sprint syntax: prefix'reference
6149 -- N_Reference
6150 -- Sloc is copied from the expression
6151 -- Prefix (Node3)
6152 -- plus fields for expression
6154 -- Note: in the case where a debug source file is generated, the Sloc
6155 -- for this node points to the quote in the Sprint file output.
6157 ---------------------
6158 -- Subprogram_Info --
6159 ---------------------
6161 -- This node generates the appropriate Subprogram_Info value for a
6162 -- given procedure. See Ada.Exceptions for further details
6164 -- Sprint syntax: subprog'subprogram_info
6166 -- N_Subprogram_Info
6167 -- Sloc points to the entity for the procedure
6168 -- Identifier (Node1) identifier referencing the procedure
6169 -- Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc
6171 -- Note: in the case where a debug source file is generated, the Sloc
6172 -- for this node points to the quote in the Sprint file output.
6174 --------------------------
6175 -- Unchecked Expression --
6176 --------------------------
6178 -- An unchecked expression is one that must be analyzed and resolved
6179 -- with all checks off, regardless of the current setting of scope
6180 -- suppress flags.
6182 -- Sprint syntax: `(expression).
6184 -- Note: this node is always removed from the tree (and replaced by
6185 -- its constituent expression) on completion of analysis, so it only
6186 -- appears in intermediate trees, and will never be seen by Gigi.
6188 -- N_Unchecked_Expression
6189 -- Sloc is a copy of the Sloc of the expression
6190 -- Expression (Node3)
6191 -- plus fields for expression
6193 -- Note: in the case where a debug source file is generated, the Sloc
6194 -- for this node points to the back quote in the Sprint file output.
6196 -------------------------------
6197 -- Unchecked Type Conversion --
6198 -------------------------------
6200 -- An unchecked type conversion node represents the semantic action
6201 -- corresponding to a call to an instantiation of Unchecked_Conversion.
6202 -- It is generated as a result of actual use of Unchecked_Conversion
6203 -- and also the expander generates unchecked type conversion nodes
6204 -- directly for expansion of complex semantic actions.
6206 -- Note: an unchecked type conversion is a variable as far as the
6207 -- semantics are concerned, which is convenient for the expander.
6208 -- This does not change what Ada source programs are legal, since
6209 -- clearly a function call to an instantiation of Unchecked_Conversion
6210 -- is not a variable in any case.
6212 -- Sprint syntax: subtype-mark!(expression).
6214 -- N_Unchecked_Type_Conversion
6215 -- Sloc points to related node in source
6216 -- Subtype_Mark (Node4)
6217 -- Expression (Node3)
6218 -- Kill_Range_Check (Flag11-Sem)
6219 -- plus fields for expression
6221 -- Note: in the case where a debug source file is generated, the Sloc
6222 -- for this node points to the exclamation in the Sprint file output.
6224 -----------------------------------
6225 -- Validate_Unchecked_Conversion --
6226 -----------------------------------
6228 -- The front end does most of the validation of unchecked conversion,
6229 -- including checking sizes (this is done after the back end is called
6230 -- to take advantage of back-annotation of calculated sizes).
6232 -- The front end also deals with specific cases that are not allowed
6233 -- e.g. involving unconstrained array types.
6235 -- For the case of the standard gigi backend, this means that all
6236 -- checks are done in the front-end.
6238 -- However, in the case of specialized back-ends, notably the JVM
6239 -- backend for JGNAT, additional requirements and restrictions apply
6240 -- to unchecked conversion, and these are most conveniently performed
6241 -- in the specialized back-end.
6243 -- To accommodate this requirement, for such back ends, the following
6244 -- special node is generated recording an unchecked conversion that
6245 -- needs to be validated. The back end should post an appropriate
6246 -- error message if the unchecked conversion is invalid or warrants
6247 -- a special warning message.
6249 -- Source_Type and Target_Type point to the entities for the two
6250 -- types involved in the unchecked conversion instantiation that
6251 -- is to be validated.
6253 -- Sprint syntax: validate Unchecked_Conversion (source, target);
6255 -- N_Validate_Unchecked_Conversion
6256 -- Sloc points to instantiation (location for warning message)
6257 -- Source_Type (Node1-Sem)
6258 -- Target_Type (Node2-Sem)
6260 -- Note: in the case where a debug source file is generated, the Sloc
6261 -- for this node points to the VALIDATE keyword in the file output.
6263 -----------
6264 -- Empty --
6265 -----------
6267 -- Used as the contents of the Nkind field of the dummy Empty node
6268 -- and in some other situations to indicate an uninitialized value.
6270 -- N_Empty
6271 -- Chars (Name1) is set to No_Name
6273 -----------
6274 -- Error --
6275 -----------
6277 -- Used as the contents of the Nkind field of the dummy Error node.
6278 -- Has an Etype field, which gets set to Any_Type later on, to help
6279 -- error recovery (Error_Posted is also set in the Error node).
6281 -- N_Error
6282 -- Chars (Name1) is set to Error_Name
6283 -- Etype (Node5-Sem)
6285 --------------------------
6286 -- Node Type Definition --
6287 --------------------------
6289 -- The following is the definition of the Node_Kind type. As previously
6290 -- discussed, this is separated off to allow rearrangement of the order
6291 -- to facilitiate definition of subtype ranges. The comments show the
6292 -- subtype classes which apply to each set of node kinds. The first
6293 -- entry in the comment characterizes the following list of nodes.
6295 type Node_Kind is (
6296 N_Unused_At_Start,
6298 -- N_Representation_Clause
6299 N_At_Clause,
6300 N_Component_Clause,
6301 N_Enumeration_Representation_Clause,
6302 N_Mod_Clause,
6303 N_Record_Representation_Clause,
6305 -- N_Representation_Clause, N_Has_Chars
6306 N_Attribute_Definition_Clause,
6308 -- N_Has_Chars
6309 N_Empty,
6310 N_Pragma,
6311 N_Pragma_Argument_Association,
6313 -- N_Has_Etype
6314 N_Error,
6316 -- N_Entity, N_Has_Etype, N_Has_Chars
6317 N_Defining_Character_Literal,
6318 N_Defining_Identifier,
6319 N_Defining_Operator_Symbol,
6321 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
6322 N_Expanded_Name,
6324 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
6325 -- N_Has_Chars, N_Has_Entity
6326 N_Identifier,
6327 N_Operator_Symbol,
6329 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
6330 -- N_Has_Chars, N_Has_Entity
6331 N_Character_Literal,
6333 -- N_Binary_Op, N_Op, N_Subexpr,
6334 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
6335 N_Op_Add,
6336 N_Op_Concat,
6337 N_Op_Divide,
6338 N_Op_Expon,
6339 N_Op_Mod,
6340 N_Op_Multiply,
6341 N_Op_Rem,
6342 N_Op_Subtract,
6344 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
6345 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
6346 N_Op_And,
6348 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
6349 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean,
6350 -- N_Op_Compare
6351 N_Op_Eq,
6352 N_Op_Ge,
6353 N_Op_Gt,
6354 N_Op_Le,
6355 N_Op_Lt,
6356 N_Op_Ne,
6358 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
6359 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
6360 N_Op_Or,
6361 N_Op_Xor,
6363 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
6364 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
6365 N_Op_Rotate_Left,
6366 N_Op_Rotate_Right,
6367 N_Op_Shift_Left,
6368 N_Op_Shift_Right,
6369 N_Op_Shift_Right_Arithmetic,
6371 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
6372 -- N_Has_Chars, N_Has_Entity
6373 N_Op_Abs,
6374 N_Op_Minus,
6375 N_Op_Not,
6376 N_Op_Plus,
6378 -- N_Subexpr, N_Has_Etype, N_Has_Entity
6379 N_Attribute_Reference,
6381 -- N_Subexpr, N_Has_Etype
6382 N_And_Then,
6383 N_Conditional_Expression,
6384 N_Explicit_Dereference,
6385 N_Function_Call,
6386 N_In,
6387 N_Indexed_Component,
6388 N_Integer_Literal,
6389 N_Not_In,
6390 N_Null,
6391 N_Or_Else,
6392 N_Procedure_Call_Statement,
6393 N_Qualified_Expression,
6395 -- N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
6397 N_Raise_Constraint_Error,
6398 N_Raise_Program_Error,
6399 N_Raise_Storage_Error,
6401 -- N_Subexpr, N_Has_Etype
6403 N_Aggregate,
6404 N_Allocator,
6405 N_Extension_Aggregate,
6406 N_Range,
6407 N_Real_Literal,
6408 N_Reference,
6409 N_Selected_Component,
6410 N_Slice,
6411 N_String_Literal,
6412 N_Subprogram_Info,
6413 N_Type_Conversion,
6414 N_Unchecked_Expression,
6415 N_Unchecked_Type_Conversion,
6417 -- N_Has_Etype
6418 N_Subtype_Indication,
6420 -- N_Declaration
6421 N_Component_Declaration,
6422 N_Entry_Declaration,
6423 N_Formal_Object_Declaration,
6424 N_Formal_Type_Declaration,
6425 N_Full_Type_Declaration,
6426 N_Incomplete_Type_Declaration,
6427 N_Loop_Parameter_Specification,
6428 N_Object_Declaration,
6429 N_Protected_Type_Declaration,
6430 N_Private_Extension_Declaration,
6431 N_Private_Type_Declaration,
6432 N_Subtype_Declaration,
6434 -- N_Subprogram_Specification, N_Declaration
6435 N_Function_Specification,
6436 N_Procedure_Specification,
6438 -- (nothing special)
6439 N_Entry_Index_Specification,
6440 N_Freeze_Entity,
6442 -- N_Access_To_Subprogram_Definition
6443 N_Access_Function_Definition,
6444 N_Access_Procedure_Definition,
6446 -- N_Later_Decl_Item,
6447 N_Task_Type_Declaration,
6449 -- N_Body_Stub, N_Later_Decl_Item
6450 N_Package_Body_Stub,
6451 N_Protected_Body_Stub,
6452 N_Subprogram_Body_Stub,
6453 N_Task_Body_Stub,
6455 -- N_Generic_Instantiation, N_Later_Decl_Item
6456 N_Function_Instantiation,
6457 N_Package_Instantiation,
6458 N_Procedure_Instantiation,
6460 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
6461 N_Package_Body,
6462 N_Subprogram_Body,
6464 -- N_Later_Decl_Item, N_Proper_Body
6465 N_Protected_Body,
6466 N_Task_Body,
6468 -- N_Later_Decl_Item
6469 N_Implicit_Label_Declaration,
6470 N_Package_Declaration,
6471 N_Single_Task_Declaration,
6472 N_Subprogram_Declaration,
6473 N_Use_Package_Clause,
6475 -- N_Generic_Declaration, N_Later_Decl_Item
6476 N_Generic_Package_Declaration,
6477 N_Generic_Subprogram_Declaration,
6479 -- N_Array_Type_Definition
6480 N_Constrained_Array_Definition,
6481 N_Unconstrained_Array_Definition,
6483 -- N_Renaming_Declaration
6484 N_Exception_Renaming_Declaration,
6485 N_Object_Renaming_Declaration,
6486 N_Package_Renaming_Declaration,
6487 N_Subprogram_Renaming_Declaration,
6489 -- N_Generic_Renaming_Declarations, N_Renaming_Declaration
6490 N_Generic_Function_Renaming_Declaration,
6491 N_Generic_Package_Renaming_Declaration,
6492 N_Generic_Procedure_Renaming_Declaration,
6494 -- N_Statement_Other_Than_Procedure_Call
6495 N_Abort_Statement,
6496 N_Accept_Statement,
6497 N_Assignment_Statement,
6498 N_Asynchronous_Select,
6499 N_Block_Statement,
6500 N_Case_Statement,
6501 N_Code_Statement,
6502 N_Conditional_Entry_Call,
6503 N_Delay_Relative_Statement,
6504 N_Delay_Until_Statement,
6505 N_Entry_Call_Statement,
6506 N_Free_Statement,
6507 N_Goto_Statement,
6508 N_Loop_Statement,
6509 N_Null_Statement,
6510 N_Raise_Statement,
6511 N_Requeue_Statement,
6512 N_Return_Statement,
6513 N_Selective_Accept,
6514 N_Timed_Entry_Call,
6516 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
6517 N_Exit_Statement,
6518 N_If_Statement,
6520 -- N_Has_Condition
6521 N_Accept_Alternative,
6522 N_Delay_Alternative,
6523 N_Elsif_Part,
6524 N_Entry_Body_Formal_Part,
6525 N_Iteration_Scheme,
6526 N_Terminate_Alternative,
6528 -- Other nodes (not part of any subtype class)
6529 N_Abortable_Part,
6530 N_Abstract_Subprogram_Declaration,
6531 N_Access_Definition,
6532 N_Access_To_Object_Definition,
6533 N_Case_Statement_Alternative,
6534 N_Compilation_Unit,
6535 N_Compilation_Unit_Aux,
6536 N_Component_Association,
6537 N_Component_List,
6538 N_Derived_Type_Definition,
6539 N_Decimal_Fixed_Point_Definition,
6540 N_Defining_Program_Unit_Name,
6541 N_Delta_Constraint,
6542 N_Designator,
6543 N_Digits_Constraint,
6544 N_Discriminant_Association,
6545 N_Discriminant_Specification,
6546 N_Enumeration_Type_Definition,
6547 N_Entry_Body,
6548 N_Entry_Call_Alternative,
6549 N_Exception_Declaration,
6550 N_Exception_Handler,
6551 N_Floating_Point_Definition,
6552 N_Formal_Decimal_Fixed_Point_Definition,
6553 N_Formal_Derived_Type_Definition,
6554 N_Formal_Discrete_Type_Definition,
6555 N_Formal_Floating_Point_Definition,
6556 N_Formal_Modular_Type_Definition,
6557 N_Formal_Ordinary_Fixed_Point_Definition,
6558 N_Formal_Package_Declaration,
6559 N_Formal_Private_Type_Definition,
6560 N_Formal_Signed_Integer_Type_Definition,
6561 N_Formal_Subprogram_Declaration,
6562 N_Generic_Association,
6563 N_Handled_Sequence_Of_Statements,
6564 N_Index_Or_Discriminant_Constraint,
6565 N_Itype_Reference,
6566 N_Label,
6567 N_Modular_Type_Definition,
6568 N_Number_Declaration,
6569 N_Ordinary_Fixed_Point_Definition,
6570 N_Others_Choice,
6571 N_Package_Specification,
6572 N_Parameter_Association,
6573 N_Parameter_Specification,
6574 N_Protected_Definition,
6575 N_Range_Constraint,
6576 N_Real_Range_Specification,
6577 N_Record_Definition,
6578 N_Signed_Integer_Type_Definition,
6579 N_Single_Protected_Declaration,
6580 N_Subunit,
6581 N_Task_Definition,
6582 N_Triggering_Alternative,
6583 N_Use_Type_Clause,
6584 N_Validate_Unchecked_Conversion,
6585 N_Variant,
6586 N_Variant_Part,
6587 N_With_Clause,
6588 N_With_Type_Clause,
6589 N_Unused_At_End);
6591 for Node_Kind'Size use 8;
6592 -- The data structures in Atree assume this!
6594 ----------------------------
6595 -- Node Class Definitions --
6596 ----------------------------
6598 subtype N_Access_To_Subprogram_Definition is Node_Kind range
6599 N_Access_Function_Definition ..
6600 N_Access_Procedure_Definition;
6602 subtype N_Array_Type_Definition is Node_Kind range
6603 N_Constrained_Array_Definition ..
6604 N_Unconstrained_Array_Definition;
6606 subtype N_Binary_Op is Node_Kind range
6607 N_Op_Add ..
6608 N_Op_Shift_Right_Arithmetic;
6610 subtype N_Body_Stub is Node_Kind range
6611 N_Package_Body_Stub ..
6612 N_Task_Body_Stub;
6614 subtype N_Declaration is Node_Kind range
6615 N_Component_Declaration ..
6616 N_Procedure_Specification;
6617 -- Note: this includes all constructs normally thought of as declarations
6618 -- except those which are separately grouped as later declarations.
6620 subtype N_Direct_Name is Node_Kind range
6621 N_Identifier ..
6622 N_Character_Literal;
6624 subtype N_Entity is Node_Kind range
6625 N_Defining_Character_Literal ..
6626 N_Defining_Operator_Symbol;
6628 subtype N_Generic_Declaration is Node_Kind range
6629 N_Generic_Package_Declaration ..
6630 N_Generic_Subprogram_Declaration;
6632 subtype N_Generic_Instantiation is Node_Kind range
6633 N_Function_Instantiation ..
6634 N_Procedure_Instantiation;
6636 subtype N_Generic_Renaming_Declaration is Node_Kind range
6637 N_Generic_Function_Renaming_Declaration ..
6638 N_Generic_Procedure_Renaming_Declaration;
6640 subtype N_Has_Chars is Node_Kind range
6641 N_Attribute_Definition_Clause ..
6642 N_Op_Plus;
6644 subtype N_Has_Entity is Node_Kind range
6645 N_Expanded_Name ..
6646 N_Attribute_Reference;
6647 -- Nodes that have Entity fields
6648 -- Warning: DOES NOT INCLUDE N_Freeze_Entity!
6650 subtype N_Has_Etype is Node_Kind range
6651 N_Error ..
6652 N_Subtype_Indication;
6654 subtype N_Later_Decl_Item is Node_Kind range
6655 N_Task_Type_Declaration ..
6656 N_Generic_Subprogram_Declaration;
6657 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and
6658 -- includes only those items which can appear as later declarative
6659 -- items. This also includes N_Implicit_Label_Declaration which is
6660 -- not specifically in the grammar but may appear as a valid later
6661 -- declarative items. It does NOT include N_Pragma which can also
6662 -- appear among later declarative items. It does however include
6663 -- N_Protected_Body, which is a bit peculiar, but harmless since
6664 -- this cannot appear in Ada 83 mode anyway.
6666 subtype N_Op is Node_Kind range
6667 N_Op_Add ..
6668 N_Op_Plus;
6670 subtype N_Op_Boolean is Node_Kind range
6671 N_Op_And ..
6672 N_Op_Xor;
6673 -- Binary operators which take operands of a boolean type, and yield
6674 -- a result of a boolean type.
6676 subtype N_Op_Compare is Node_Kind range
6677 N_Op_Eq ..
6678 N_Op_Ne;
6680 subtype N_Op_Shift is Node_Kind range
6681 N_Op_Rotate_Left ..
6682 N_Op_Shift_Right_Arithmetic;
6684 subtype N_Proper_Body is Node_Kind range
6685 N_Package_Body ..
6686 N_Task_Body;
6688 subtype N_Raise_xxx_Error is Node_Kind range
6689 N_Raise_Constraint_Error ..
6690 N_Raise_Storage_Error;
6692 subtype N_Renaming_Declaration is Node_Kind range
6693 N_Exception_Renaming_Declaration ..
6694 N_Generic_Procedure_Renaming_Declaration;
6696 subtype N_Representation_Clause is Node_Kind range
6697 N_At_Clause ..
6698 N_Attribute_Definition_Clause;
6700 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
6701 N_Abort_Statement ..
6702 N_If_Statement;
6703 -- Note that this includes all statement types except for the cases of the
6704 -- N_Procedure_Call_Statement which is considered to be a subexpression
6705 -- (since overloading is possible, so it needs to go through the normal
6706 -- overloading resolution for expressions).
6708 subtype N_Has_Condition is Node_Kind range
6709 N_Exit_Statement ..
6710 N_Terminate_Alternative;
6711 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
6713 subtype N_Subexpr is Node_Kind range
6714 N_Expanded_Name ..
6715 N_Unchecked_Type_Conversion;
6716 -- Nodes with expression fields
6718 subtype N_Subprogram_Specification is Node_Kind range
6719 N_Function_Specification ..
6720 N_Procedure_Specification;
6722 subtype N_Unary_Op is Node_Kind range
6723 N_Op_Abs ..
6724 N_Op_Plus;
6726 subtype N_Unit_Body is Node_Kind range
6727 N_Package_Body ..
6728 N_Subprogram_Body;
6730 ---------------------------
6731 -- Node Access Functions --
6732 ---------------------------
6734 -- The following functions return the contents of the indicated field of
6735 -- the node referenced by the argument, which is a Node_Id. They provide
6736 -- logical access to fields in the node which could be accessed using the
6737 -- Atree.Unchecked_Access package, but the idea is always to use these
6738 -- higher level routines which preserve strong typing. In debug mode,
6739 -- these routines check that they are being applied to an appropriate
6740 -- node, as well as checking that the node is in range.
6742 function ABE_Is_Certain
6743 (N : Node_Id) return Boolean; -- Flag18
6745 function Abort_Present
6746 (N : Node_Id) return Boolean; -- Flag15
6748 function Abortable_Part
6749 (N : Node_Id) return Node_Id; -- Node2
6751 function Abstract_Present
6752 (N : Node_Id) return Boolean; -- Flag4
6754 function Accept_Handler_Records
6755 (N : Node_Id) return List_Id; -- List5
6757 function Accept_Statement
6758 (N : Node_Id) return Node_Id; -- Node2
6760 function Access_Types_To_Process
6761 (N : Node_Id) return Elist_Id; -- Elist2
6763 function Actions
6764 (N : Node_Id) return List_Id; -- List1
6766 function Activation_Chain_Entity
6767 (N : Node_Id) return Node_Id; -- Node3
6769 function Acts_As_Spec
6770 (N : Node_Id) return Boolean; -- Flag4
6772 function Aggregate_Bounds
6773 (N : Node_Id) return Node_Id; -- Node3
6775 function Aliased_Present
6776 (N : Node_Id) return Boolean; -- Flag4
6778 function All_Others
6779 (N : Node_Id) return Boolean; -- Flag11
6781 function All_Present
6782 (N : Node_Id) return Boolean; -- Flag15
6784 function Alternatives
6785 (N : Node_Id) return List_Id; -- List4
6787 function Ancestor_Part
6788 (N : Node_Id) return Node_Id; -- Node3
6790 function Array_Aggregate
6791 (N : Node_Id) return Node_Id; -- Node3
6793 function Assignment_OK
6794 (N : Node_Id) return Boolean; -- Flag15
6796 function Associated_Node
6797 (N : Node_Id) return Node_Id; -- Node4
6799 function At_End_Proc
6800 (N : Node_Id) return Node_Id; -- Node1
6802 function Attribute_Name
6803 (N : Node_Id) return Name_Id; -- Name2
6805 function Aux_Decls_Node
6806 (N : Node_Id) return Node_Id; -- Node5
6808 function Backwards_OK
6809 (N : Node_Id) return Boolean; -- Flag6
6811 function Bad_Is_Detected
6812 (N : Node_Id) return Boolean; -- Flag15
6814 function By_Ref
6815 (N : Node_Id) return Boolean; -- Flag5
6817 function Body_Required
6818 (N : Node_Id) return Boolean; -- Flag13
6820 function Body_To_Inline
6821 (N : Node_Id) return Node_Id; -- Node3
6823 function Box_Present
6824 (N : Node_Id) return Boolean; -- Flag15
6826 function Char_Literal_Value
6827 (N : Node_Id) return Char_Code; -- Char_Code2
6829 function Chars
6830 (N : Node_Id) return Name_Id; -- Name1
6832 function Choice_Parameter
6833 (N : Node_Id) return Node_Id; -- Node2
6835 function Choices
6836 (N : Node_Id) return List_Id; -- List1
6838 function Compile_Time_Known_Aggregate
6839 (N : Node_Id) return Boolean; -- Flag18
6841 function Component_Associations
6842 (N : Node_Id) return List_Id; -- List2
6844 function Component_Clauses
6845 (N : Node_Id) return List_Id; -- List3
6847 function Component_Items
6848 (N : Node_Id) return List_Id; -- List3
6850 function Component_List
6851 (N : Node_Id) return Node_Id; -- Node1
6853 function Component_Name
6854 (N : Node_Id) return Node_Id; -- Node1
6856 function Condition
6857 (N : Node_Id) return Node_Id; -- Node1
6859 function Condition_Actions
6860 (N : Node_Id) return List_Id; -- List3
6862 function Constant_Present
6863 (N : Node_Id) return Boolean; -- Flag17
6865 function Constraint
6866 (N : Node_Id) return Node_Id; -- Node3
6868 function Constraints
6869 (N : Node_Id) return List_Id; -- List1
6871 function Context_Installed
6872 (N : Node_Id) return Boolean; -- Flag13
6874 function Context_Items
6875 (N : Node_Id) return List_Id; -- List1
6877 function Controlling_Argument
6878 (N : Node_Id) return Node_Id; -- Node1
6880 function Conversion_OK
6881 (N : Node_Id) return Boolean; -- Flag14
6883 function Corresponding_Body
6884 (N : Node_Id) return Node_Id; -- Node5
6886 function Corresponding_Generic_Association
6887 (N : Node_Id) return Node_Id; -- Node5
6889 function Corresponding_Integer_Value
6890 (N : Node_Id) return Uint; -- Uint4
6892 function Corresponding_Spec
6893 (N : Node_Id) return Node_Id; -- Node5
6895 function Corresponding_Stub
6896 (N : Node_Id) return Node_Id; -- Node3
6898 function Dcheck_Function
6899 (N : Node_Id) return Entity_Id; -- Node5
6901 function Debug_Statement
6902 (N : Node_Id) return Node_Id; -- Node3
6904 function Declarations
6905 (N : Node_Id) return List_Id; -- List2
6907 function Default_Expression
6908 (N : Node_Id) return Node_Id; -- Node5
6910 function Default_Name
6911 (N : Node_Id) return Node_Id; -- Node2
6913 function Defining_Identifier
6914 (N : Node_Id) return Entity_Id; -- Node1
6916 function Defining_Unit_Name
6917 (N : Node_Id) return Node_Id; -- Node1
6919 function Delay_Alternative
6920 (N : Node_Id) return Node_Id; -- Node4
6922 function Delay_Finalize_Attach
6923 (N : Node_Id) return Boolean; -- Flag14
6925 function Delay_Statement
6926 (N : Node_Id) return Node_Id; -- Node2
6928 function Delta_Expression
6929 (N : Node_Id) return Node_Id; -- Node3
6931 function Digits_Expression
6932 (N : Node_Id) return Node_Id; -- Node2
6934 function Discr_Check_Funcs_Built
6935 (N : Node_Id) return Boolean; -- Flag11
6937 function Discrete_Choices
6938 (N : Node_Id) return List_Id; -- List4
6940 function Discrete_Range
6941 (N : Node_Id) return Node_Id; -- Node4
6943 function Discrete_Subtype_Definition
6944 (N : Node_Id) return Node_Id; -- Node4
6946 function Discrete_Subtype_Definitions
6947 (N : Node_Id) return List_Id; -- List2
6949 function Discriminant_Specifications
6950 (N : Node_Id) return List_Id; -- List4
6952 function Discriminant_Type
6953 (N : Node_Id) return Node_Id; -- Node5
6955 function Do_Access_Check
6956 (N : Node_Id) return Boolean; -- Flag11
6958 function Do_Accessibility_Check
6959 (N : Node_Id) return Boolean; -- Flag13
6961 function Do_Discriminant_Check
6962 (N : Node_Id) return Boolean; -- Flag13
6964 function Do_Division_Check
6965 (N : Node_Id) return Boolean; -- Flag13
6967 function Do_Length_Check
6968 (N : Node_Id) return Boolean; -- Flag4
6970 function Do_Overflow_Check
6971 (N : Node_Id) return Boolean; -- Flag17
6973 function Do_Range_Check
6974 (N : Node_Id) return Boolean; -- Flag9
6976 function Do_Storage_Check
6977 (N : Node_Id) return Boolean; -- Flag17
6979 function Do_Tag_Check
6980 (N : Node_Id) return Boolean; -- Flag13
6982 function Elaborate_All_Present
6983 (N : Node_Id) return Boolean; -- Flag15
6985 function Elaborate_Present
6986 (N : Node_Id) return Boolean; -- Flag4
6988 function Elaboration_Boolean
6989 (N : Node_Id) return Node_Id; -- Node2
6991 function Else_Actions
6992 (N : Node_Id) return List_Id; -- List3
6994 function Else_Statements
6995 (N : Node_Id) return List_Id; -- List4
6997 function Elsif_Parts
6998 (N : Node_Id) return List_Id; -- List3
7000 function Enclosing_Variant
7001 (N : Node_Id) return Node_Id; -- Node2
7003 function End_Label
7004 (N : Node_Id) return Node_Id; -- Node4
7006 function End_Span
7007 (N : Node_Id) return Uint; -- Uint5
7009 function Entity
7010 (N : Node_Id) return Node_Id; -- Node4
7012 function Entry_Body_Formal_Part
7013 (N : Node_Id) return Node_Id; -- Node5
7015 function Entry_Call_Alternative
7016 (N : Node_Id) return Node_Id; -- Node1
7018 function Entry_Call_Statement
7019 (N : Node_Id) return Node_Id; -- Node1
7021 function Entry_Direct_Name
7022 (N : Node_Id) return Node_Id; -- Node1
7024 function Entry_Index
7025 (N : Node_Id) return Node_Id; -- Node5
7027 function Entry_Index_Specification
7028 (N : Node_Id) return Node_Id; -- Node4
7030 function Etype
7031 (N : Node_Id) return Node_Id; -- Node5
7033 function Exception_Choices
7034 (N : Node_Id) return List_Id; -- List4
7036 function Exception_Handlers
7037 (N : Node_Id) return List_Id; -- List5
7039 function Exception_Junk
7040 (N : Node_Id) return Boolean; -- Flag11
7042 function Explicit_Actual_Parameter
7043 (N : Node_Id) return Node_Id; -- Node3
7045 function Expansion_Delayed
7046 (N : Node_Id) return Boolean; -- Flag11
7048 function Explicit_Generic_Actual_Parameter
7049 (N : Node_Id) return Node_Id; -- Node1
7051 function Expression
7052 (N : Node_Id) return Node_Id; -- Node3
7054 function Expressions
7055 (N : Node_Id) return List_Id; -- List1
7057 function First_Bit
7058 (N : Node_Id) return Node_Id; -- Node3
7060 function First_Inlined_Subprogram
7061 (N : Node_Id) return Entity_Id; -- Node3
7063 function First_Name
7064 (N : Node_Id) return Boolean; -- Flag5
7066 function First_Named_Actual
7067 (N : Node_Id) return Node_Id; -- Node4
7069 function First_Real_Statement
7070 (N : Node_Id) return Node_Id; -- Node2
7072 function First_Subtype_Link
7073 (N : Node_Id) return Entity_Id; -- Node5
7075 function Float_Truncate
7076 (N : Node_Id) return Boolean; -- Flag11
7078 function Formal_Type_Definition
7079 (N : Node_Id) return Node_Id; -- Node3
7081 function Forwards_OK
7082 (N : Node_Id) return Boolean; -- Flag5
7084 function From_At_Mod
7085 (N : Node_Id) return Boolean; -- Flag4
7087 function Generic_Associations
7088 (N : Node_Id) return List_Id; -- List3
7090 function Generic_Formal_Declarations
7091 (N : Node_Id) return List_Id; -- List2
7093 function Generic_Parent
7094 (N : Node_Id) return Node_Id; -- Node5
7096 function Generic_Parent_Type
7097 (N : Node_Id) return Node_Id; -- Node4
7099 function Handled_Statement_Sequence
7100 (N : Node_Id) return Node_Id; -- Node4
7102 function Handler_List_Entry
7103 (N : Node_Id) return Node_Id; -- Node2
7105 function Has_Created_Identifier
7106 (N : Node_Id) return Boolean; -- Flag15
7108 function Has_Dynamic_Length_Check
7109 (N : Node_Id) return Boolean; -- Flag10
7111 function Has_Dynamic_Range_Check
7112 (N : Node_Id) return Boolean; -- Flag12
7114 function Has_No_Elaboration_Code
7115 (N : Node_Id) return Boolean; -- Flag17
7117 function Has_Priority_Pragma
7118 (N : Node_Id) return Boolean; -- Flag6
7120 function Has_Private_View
7121 (N : Node_Id) return Boolean; -- Flag11
7123 function Has_Storage_Size_Pragma
7124 (N : Node_Id) return Boolean; -- Flag5
7126 function Has_Task_Info_Pragma
7127 (N : Node_Id) return Boolean; -- Flag7
7129 function Has_Task_Name_Pragma
7130 (N : Node_Id) return Boolean; -- Flag8
7132 function Has_Wide_Character
7133 (N : Node_Id) return Boolean; -- Flag11
7135 function Hidden_By_Use_Clause
7136 (N : Node_Id) return Elist_Id; -- Elist4
7138 function High_Bound
7139 (N : Node_Id) return Node_Id; -- Node2
7141 function Identifier
7142 (N : Node_Id) return Node_Id; -- Node1
7144 function Implicit_With
7145 (N : Node_Id) return Boolean; -- Flag17
7147 function In_Present
7148 (N : Node_Id) return Boolean; -- Flag15
7150 function Includes_Infinities
7151 (N : Node_Id) return Boolean; -- Flag11
7153 function Instance_Spec
7154 (N : Node_Id) return Node_Id; -- Node5
7156 function Intval
7157 (N : Node_Id) return Uint; -- Uint3
7159 function Is_Asynchronous_Call_Block
7160 (N : Node_Id) return Boolean; -- Flag7
7162 function Is_Component_Left_Opnd
7163 (N : Node_Id) return Boolean; -- Flag13
7165 function Is_Component_Right_Opnd
7166 (N : Node_Id) return Boolean; -- Flag14
7168 function Is_Controlling_Actual
7169 (N : Node_Id) return Boolean; -- Flag16
7171 function Is_Machine_Number
7172 (N : Node_Id) return Boolean; -- Flag11
7174 function Is_Overloaded
7175 (N : Node_Id) return Boolean; -- Flag5
7177 function Is_Power_Of_2_For_Shift
7178 (N : Node_Id) return Boolean; -- Flag13
7180 function Is_Protected_Subprogram_Body
7181 (N : Node_Id) return Boolean; -- Flag7
7183 function Is_Static_Expression
7184 (N : Node_Id) return Boolean; -- Flag6
7186 function Is_Subprogram_Descriptor
7187 (N : Node_Id) return Boolean; -- Flag16
7189 function Is_Task_Allocation_Block
7190 (N : Node_Id) return Boolean; -- Flag6
7192 function Is_Task_Master
7193 (N : Node_Id) return Boolean; -- Flag5
7195 function Iteration_Scheme
7196 (N : Node_Id) return Node_Id; -- Node2
7198 function Itype
7199 (N : Node_Id) return Entity_Id; -- Node1
7201 function Kill_Range_Check
7202 (N : Node_Id) return Boolean; -- Flag11
7204 function Label_Construct
7205 (N : Node_Id) return Node_Id; -- Node2
7207 function Left_Opnd
7208 (N : Node_Id) return Node_Id; -- Node2
7210 function Last_Bit
7211 (N : Node_Id) return Node_Id; -- Node4
7213 function Last_Name
7214 (N : Node_Id) return Boolean; -- Flag6
7216 function Library_Unit
7217 (N : Node_Id) return Node_Id; -- Node4
7219 function Limited_Present
7220 (N : Node_Id) return Boolean; -- Flag17
7222 function Literals
7223 (N : Node_Id) return List_Id; -- List1
7225 function Loop_Actions
7226 (N : Node_Id) return List_Id; -- List2
7228 function Loop_Parameter_Specification
7229 (N : Node_Id) return Node_Id; -- Node4
7231 function Low_Bound
7232 (N : Node_Id) return Node_Id; -- Node1
7234 function Mod_Clause
7235 (N : Node_Id) return Node_Id; -- Node2
7237 function More_Ids
7238 (N : Node_Id) return Boolean; -- Flag5
7240 function Must_Be_Byte_Aligned
7241 (N : Node_Id) return Boolean; -- Flag14
7243 function Must_Not_Freeze
7244 (N : Node_Id) return Boolean; -- Flag8
7246 function Name
7247 (N : Node_Id) return Node_Id; -- Node2
7249 function Names
7250 (N : Node_Id) return List_Id; -- List2
7252 function Next_Entity
7253 (N : Node_Id) return Node_Id; -- Node2
7255 function Next_Named_Actual
7256 (N : Node_Id) return Node_Id; -- Node4
7258 function Next_Rep_Item
7259 (N : Node_Id) return Node_Id; -- Node4
7261 function Next_Use_Clause
7262 (N : Node_Id) return Node_Id; -- Node3
7264 function No_Ctrl_Actions
7265 (N : Node_Id) return Boolean; -- Flag7
7267 function No_Entities_Ref_In_Spec
7268 (N : Node_Id) return Boolean; -- Flag8
7270 function No_Initialization
7271 (N : Node_Id) return Boolean; -- Flag13
7273 function Null_Present
7274 (N : Node_Id) return Boolean; -- Flag13
7276 function Null_Record_Present
7277 (N : Node_Id) return Boolean; -- Flag17
7279 function Object_Definition
7280 (N : Node_Id) return Node_Id; -- Node4
7282 function OK_For_Stream
7283 (N : Node_Id) return Boolean; -- Flag4
7285 function Original_Discriminant
7286 (N : Node_Id) return Node_Id; -- Node2
7288 function Others_Discrete_Choices
7289 (N : Node_Id) return List_Id; -- List1
7291 function Out_Present
7292 (N : Node_Id) return Boolean; -- Flag17
7294 function Parameter_Associations
7295 (N : Node_Id) return List_Id; -- List3
7297 function Parameter_List_Truncated
7298 (N : Node_Id) return Boolean; -- Flag17
7300 function Parameter_Specifications
7301 (N : Node_Id) return List_Id; -- List3
7303 function Parameter_Type
7304 (N : Node_Id) return Node_Id; -- Node2
7306 function Parent_Spec
7307 (N : Node_Id) return Node_Id; -- Node4
7309 function Position
7310 (N : Node_Id) return Node_Id; -- Node2
7312 function Pragma_Argument_Associations
7313 (N : Node_Id) return List_Id; -- List2
7315 function Pragmas_After
7316 (N : Node_Id) return List_Id; -- List5
7318 function Pragmas_Before
7319 (N : Node_Id) return List_Id; -- List4
7321 function Prefix
7322 (N : Node_Id) return Node_Id; -- Node3
7324 function Present_Expr
7325 (N : Node_Id) return Uint; -- Uint3
7327 function Prev_Ids
7328 (N : Node_Id) return Boolean; -- Flag6
7330 function Print_In_Hex
7331 (N : Node_Id) return Boolean; -- Flag13
7333 function Private_Declarations
7334 (N : Node_Id) return List_Id; -- List3
7336 function Private_Present
7337 (N : Node_Id) return Boolean; -- Flag15
7339 function Procedure_To_Call
7340 (N : Node_Id) return Node_Id; -- Node4
7342 function Proper_Body
7343 (N : Node_Id) return Node_Id; -- Node1
7345 function Protected_Definition
7346 (N : Node_Id) return Node_Id; -- Node3
7348 function Protected_Present
7349 (N : Node_Id) return Boolean; -- Flag15
7351 function Raises_Constraint_Error
7352 (N : Node_Id) return Boolean; -- Flag7
7354 function Range_Constraint
7355 (N : Node_Id) return Node_Id; -- Node4
7357 function Range_Expression
7358 (N : Node_Id) return Node_Id; -- Node4
7360 function Real_Range_Specification
7361 (N : Node_Id) return Node_Id; -- Node4
7363 function Realval
7364 (N : Node_Id) return Ureal; -- Ureal3
7366 function Reason
7367 (N : Node_Id) return Uint; -- Uint3
7369 function Record_Extension_Part
7370 (N : Node_Id) return Node_Id; -- Node3
7372 function Redundant_Use
7373 (N : Node_Id) return Boolean; -- Flag13
7375 function Return_Type
7376 (N : Node_Id) return Node_Id; -- Node2
7378 function Reverse_Present
7379 (N : Node_Id) return Boolean; -- Flag15
7381 function Right_Opnd
7382 (N : Node_Id) return Node_Id; -- Node3
7384 function Rounded_Result
7385 (N : Node_Id) return Boolean; -- Flag18
7387 function Scope
7388 (N : Node_Id) return Node_Id; -- Node3
7390 function Select_Alternatives
7391 (N : Node_Id) return List_Id; -- List1
7393 function Selector_Name
7394 (N : Node_Id) return Node_Id; -- Node2
7396 function Selector_Names
7397 (N : Node_Id) return List_Id; -- List1
7399 function Shift_Count_OK
7400 (N : Node_Id) return Boolean; -- Flag4
7402 function Source_Type
7403 (N : Node_Id) return Entity_Id; -- Node1
7405 function Specification
7406 (N : Node_Id) return Node_Id; -- Node1
7408 function Statements
7409 (N : Node_Id) return List_Id; -- List3
7411 function Static_Processing_OK
7412 (N : Node_Id) return Boolean; -- Flag4
7414 function Storage_Pool
7415 (N : Node_Id) return Node_Id; -- Node1
7417 function Strval
7418 (N : Node_Id) return String_Id; -- Str3
7420 function Subtype_Indication
7421 (N : Node_Id) return Node_Id; -- Node5
7423 function Subtype_Mark
7424 (N : Node_Id) return Node_Id; -- Node4
7426 function Subtype_Marks
7427 (N : Node_Id) return List_Id; -- List2
7429 function Tagged_Present
7430 (N : Node_Id) return Boolean; -- Flag15
7432 function Target_Type
7433 (N : Node_Id) return Entity_Id; -- Node2
7435 function Task_Body_Procedure
7436 (N : Node_Id) return Entity_Id; -- Node2
7438 function Task_Definition
7439 (N : Node_Id) return Node_Id; -- Node3
7441 function Then_Actions
7442 (N : Node_Id) return List_Id; -- List2
7444 function Then_Statements
7445 (N : Node_Id) return List_Id; -- List2
7447 function Treat_Fixed_As_Integer
7448 (N : Node_Id) return Boolean; -- Flag14
7450 function Triggering_Alternative
7451 (N : Node_Id) return Node_Id; -- Node1
7453 function Triggering_Statement
7454 (N : Node_Id) return Node_Id; -- Node1
7456 function TSS_Elist
7457 (N : Node_Id) return Elist_Id; -- Elist3
7459 function Type_Definition
7460 (N : Node_Id) return Node_Id; -- Node3
7462 function Unit
7463 (N : Node_Id) return Node_Id; -- Node2
7465 function Unknown_Discriminants_Present
7466 (N : Node_Id) return Boolean; -- Flag13
7468 function Unreferenced_In_Spec
7469 (N : Node_Id) return Boolean; -- Flag7
7471 function Variant_Part
7472 (N : Node_Id) return Node_Id; -- Node4
7474 function Variants
7475 (N : Node_Id) return List_Id; -- List1
7477 function Visible_Declarations
7478 (N : Node_Id) return List_Id; -- List2
7480 function Was_Originally_Stub
7481 (N : Node_Id) return Boolean; -- Flag13
7483 function Zero_Cost_Handling
7484 (N : Node_Id) return Boolean; -- Flag5
7486 -- End functions (note used by xsinfo utility program to end processing)
7488 ----------------------------
7489 -- Node Update Procedures --
7490 ----------------------------
7492 -- These are the corresponding node update routines, which again provide
7493 -- a high level logical access with type checking. In addition to setting
7494 -- the indicated field of the node N to the given Val, in the case of
7495 -- tree pointers (List1-4), the parent pointer of the Val node is set to
7496 -- point back to node N. This automates the setting of the parent pointer.
7498 procedure Set_ABE_Is_Certain
7499 (N : Node_Id; Val : Boolean := True); -- Flag18
7501 procedure Set_Abort_Present
7502 (N : Node_Id; Val : Boolean := True); -- Flag15
7504 procedure Set_Abortable_Part
7505 (N : Node_Id; Val : Node_Id); -- Node2
7507 procedure Set_Abstract_Present
7508 (N : Node_Id; Val : Boolean := True); -- Flag4
7510 procedure Set_Accept_Handler_Records
7511 (N : Node_Id; Val : List_Id); -- List5
7513 procedure Set_Accept_Statement
7514 (N : Node_Id; Val : Node_Id); -- Node2
7516 procedure Set_Access_Types_To_Process
7517 (N : Node_Id; Val : Elist_Id); -- Elist2
7519 procedure Set_Actions
7520 (N : Node_Id; Val : List_Id); -- List1
7522 procedure Set_Activation_Chain_Entity
7523 (N : Node_Id; Val : Node_Id); -- Node3
7525 procedure Set_Acts_As_Spec
7526 (N : Node_Id; Val : Boolean := True); -- Flag4
7528 procedure Set_Aggregate_Bounds
7529 (N : Node_Id; Val : Node_Id); -- Node3
7531 procedure Set_Aliased_Present
7532 (N : Node_Id; Val : Boolean := True); -- Flag4
7534 procedure Set_All_Others
7535 (N : Node_Id; Val : Boolean := True); -- Flag11
7537 procedure Set_All_Present
7538 (N : Node_Id; Val : Boolean := True); -- Flag15
7540 procedure Set_Alternatives
7541 (N : Node_Id; Val : List_Id); -- List4
7543 procedure Set_Ancestor_Part
7544 (N : Node_Id; Val : Node_Id); -- Node3
7546 procedure Set_Array_Aggregate
7547 (N : Node_Id; Val : Node_Id); -- Node3
7549 procedure Set_Assignment_OK
7550 (N : Node_Id; Val : Boolean := True); -- Flag15
7552 procedure Set_Associated_Node
7553 (N : Node_Id; Val : Node_Id); -- Node4
7555 procedure Set_Attribute_Name
7556 (N : Node_Id; Val : Name_Id); -- Name2
7558 procedure Set_At_End_Proc
7559 (N : Node_Id; Val : Node_Id); -- Node1
7561 procedure Set_Aux_Decls_Node
7562 (N : Node_Id; Val : Node_Id); -- Node5
7564 procedure Set_Backwards_OK
7565 (N : Node_Id; Val : Boolean := True); -- Flag6
7567 procedure Set_Bad_Is_Detected
7568 (N : Node_Id; Val : Boolean := True); -- Flag15
7570 procedure Set_Body_Required
7571 (N : Node_Id; Val : Boolean := True); -- Flag13
7573 procedure Set_Body_To_Inline
7574 (N : Node_Id; Val : Node_Id); -- Node3
7576 procedure Set_Box_Present
7577 (N : Node_Id; Val : Boolean := True); -- Flag15
7579 procedure Set_By_Ref
7580 (N : Node_Id; Val : Boolean := True); -- Flag5
7582 procedure Set_Char_Literal_Value
7583 (N : Node_Id; Val : Char_Code); -- Char_Code2
7585 procedure Set_Chars
7586 (N : Node_Id; Val : Name_Id); -- Name1
7588 procedure Set_Choice_Parameter
7589 (N : Node_Id; Val : Node_Id); -- Node2
7591 procedure Set_Choices
7592 (N : Node_Id; Val : List_Id); -- List1
7594 procedure Set_Compile_Time_Known_Aggregate
7595 (N : Node_Id; Val : Boolean := True); -- Flag18
7597 procedure Set_Component_Associations
7598 (N : Node_Id; Val : List_Id); -- List2
7600 procedure Set_Component_Clauses
7601 (N : Node_Id; Val : List_Id); -- List3
7603 procedure Set_Component_Items
7604 (N : Node_Id; Val : List_Id); -- List3
7606 procedure Set_Component_List
7607 (N : Node_Id; Val : Node_Id); -- Node1
7609 procedure Set_Component_Name
7610 (N : Node_Id; Val : Node_Id); -- Node1
7612 procedure Set_Condition
7613 (N : Node_Id; Val : Node_Id); -- Node1
7615 procedure Set_Condition_Actions
7616 (N : Node_Id; Val : List_Id); -- List3
7618 procedure Set_Constant_Present
7619 (N : Node_Id; Val : Boolean := True); -- Flag17
7621 procedure Set_Constraint
7622 (N : Node_Id; Val : Node_Id); -- Node3
7624 procedure Set_Constraints
7625 (N : Node_Id; Val : List_Id); -- List1
7627 procedure Set_Context_Installed
7628 (N : Node_Id; Val : Boolean := True); -- Flag13
7630 procedure Set_Context_Items
7631 (N : Node_Id; Val : List_Id); -- List1
7633 procedure Set_Controlling_Argument
7634 (N : Node_Id; Val : Node_Id); -- Node1
7636 procedure Set_Conversion_OK
7637 (N : Node_Id; Val : Boolean := True); -- Flag14
7639 procedure Set_Corresponding_Body
7640 (N : Node_Id; Val : Node_Id); -- Node5
7642 procedure Set_Corresponding_Generic_Association
7643 (N : Node_Id; Val : Node_Id); -- Node5
7645 procedure Set_Corresponding_Integer_Value
7646 (N : Node_Id; Val : Uint); -- Uint4
7648 procedure Set_Corresponding_Spec
7649 (N : Node_Id; Val : Node_Id); -- Node5
7651 procedure Set_Corresponding_Stub
7652 (N : Node_Id; Val : Node_Id); -- Node3
7654 procedure Set_Dcheck_Function
7655 (N : Node_Id; Val : Entity_Id); -- Node5
7657 procedure Set_Debug_Statement
7658 (N : Node_Id; Val : Node_Id); -- Node3
7660 procedure Set_Declarations
7661 (N : Node_Id; Val : List_Id); -- List2
7663 procedure Set_Default_Expression
7664 (N : Node_Id; Val : Node_Id); -- Node5
7666 procedure Set_Default_Name
7667 (N : Node_Id; Val : Node_Id); -- Node2
7669 procedure Set_Defining_Identifier
7670 (N : Node_Id; Val : Entity_Id); -- Node1
7672 procedure Set_Defining_Unit_Name
7673 (N : Node_Id; Val : Node_Id); -- Node1
7675 procedure Set_Delay_Alternative
7676 (N : Node_Id; Val : Node_Id); -- Node4
7678 procedure Set_Delay_Finalize_Attach
7679 (N : Node_Id; Val : Boolean := True); -- Flag14
7681 procedure Set_Delay_Statement
7682 (N : Node_Id; Val : Node_Id); -- Node2
7684 procedure Set_Delta_Expression
7685 (N : Node_Id; Val : Node_Id); -- Node3
7687 procedure Set_Digits_Expression
7688 (N : Node_Id; Val : Node_Id); -- Node2
7690 procedure Set_Discr_Check_Funcs_Built
7691 (N : Node_Id; Val : Boolean := True); -- Flag11
7693 procedure Set_Discrete_Choices
7694 (N : Node_Id; Val : List_Id); -- List4
7696 procedure Set_Discrete_Range
7697 (N : Node_Id; Val : Node_Id); -- Node4
7699 procedure Set_Discrete_Subtype_Definition
7700 (N : Node_Id; Val : Node_Id); -- Node4
7702 procedure Set_Discrete_Subtype_Definitions
7703 (N : Node_Id; Val : List_Id); -- List2
7705 procedure Set_Discriminant_Specifications
7706 (N : Node_Id; Val : List_Id); -- List4
7708 procedure Set_Discriminant_Type
7709 (N : Node_Id; Val : Node_Id); -- Node5
7711 procedure Set_Do_Access_Check
7712 (N : Node_Id; Val : Boolean := True); -- Flag11
7714 procedure Set_Do_Accessibility_Check
7715 (N : Node_Id; Val : Boolean := True); -- Flag13
7717 procedure Set_Do_Discriminant_Check
7718 (N : Node_Id; Val : Boolean := True); -- Flag13
7720 procedure Set_Do_Division_Check
7721 (N : Node_Id; Val : Boolean := True); -- Flag13
7723 procedure Set_Do_Length_Check
7724 (N : Node_Id; Val : Boolean := True); -- Flag4
7726 procedure Set_Do_Overflow_Check
7727 (N : Node_Id; Val : Boolean := True); -- Flag17
7729 procedure Set_Do_Range_Check
7730 (N : Node_Id; Val : Boolean := True); -- Flag9
7732 procedure Set_Do_Storage_Check
7733 (N : Node_Id; Val : Boolean := True); -- Flag17
7735 procedure Set_Do_Tag_Check
7736 (N : Node_Id; Val : Boolean := True); -- Flag13
7738 procedure Set_Elaborate_All_Present
7739 (N : Node_Id; Val : Boolean := True); -- Flag15
7741 procedure Set_Elaborate_Present
7742 (N : Node_Id; Val : Boolean := True); -- Flag4
7744 procedure Set_Elaboration_Boolean
7745 (N : Node_Id; Val : Node_Id); -- Node2
7747 procedure Set_Else_Actions
7748 (N : Node_Id; Val : List_Id); -- List3
7750 procedure Set_Else_Statements
7751 (N : Node_Id; Val : List_Id); -- List4
7753 procedure Set_Elsif_Parts
7754 (N : Node_Id; Val : List_Id); -- List3
7756 procedure Set_Enclosing_Variant
7757 (N : Node_Id; Val : Node_Id); -- Node2
7759 procedure Set_End_Label
7760 (N : Node_Id; Val : Node_Id); -- Node4
7762 procedure Set_End_Span
7763 (N : Node_Id; Val : Uint); -- Uint5
7765 procedure Set_Entity
7766 (N : Node_Id; Val : Node_Id); -- Node4
7768 procedure Set_Entry_Body_Formal_Part
7769 (N : Node_Id; Val : Node_Id); -- Node5
7771 procedure Set_Entry_Call_Alternative
7772 (N : Node_Id; Val : Node_Id); -- Node1
7774 procedure Set_Entry_Call_Statement
7775 (N : Node_Id; Val : Node_Id); -- Node1
7777 procedure Set_Entry_Direct_Name
7778 (N : Node_Id; Val : Node_Id); -- Node1
7780 procedure Set_Entry_Index
7781 (N : Node_Id; Val : Node_Id); -- Node5
7783 procedure Set_Entry_Index_Specification
7784 (N : Node_Id; Val : Node_Id); -- Node4
7786 procedure Set_Etype
7787 (N : Node_Id; Val : Node_Id); -- Node5
7789 procedure Set_Exception_Choices
7790 (N : Node_Id; Val : List_Id); -- List4
7792 procedure Set_Exception_Handlers
7793 (N : Node_Id; Val : List_Id); -- List5
7795 procedure Set_Exception_Junk
7796 (N : Node_Id; Val : Boolean := True); -- Flag11
7798 procedure Set_Expansion_Delayed
7799 (N : Node_Id; Val : Boolean := True); -- Flag11
7801 procedure Set_Explicit_Actual_Parameter
7802 (N : Node_Id; Val : Node_Id); -- Node3
7804 procedure Set_Explicit_Generic_Actual_Parameter
7805 (N : Node_Id; Val : Node_Id); -- Node1
7807 procedure Set_Expression
7808 (N : Node_Id; Val : Node_Id); -- Node3
7810 procedure Set_Expressions
7811 (N : Node_Id; Val : List_Id); -- List1
7813 procedure Set_First_Bit
7814 (N : Node_Id; Val : Node_Id); -- Node3
7816 procedure Set_First_Inlined_Subprogram
7817 (N : Node_Id; Val : Entity_Id); -- Node3
7819 procedure Set_First_Name
7820 (N : Node_Id; Val : Boolean := True); -- Flag5
7822 procedure Set_First_Named_Actual
7823 (N : Node_Id; Val : Node_Id); -- Node4
7825 procedure Set_First_Real_Statement
7826 (N : Node_Id; Val : Node_Id); -- Node2
7828 procedure Set_First_Subtype_Link
7829 (N : Node_Id; Val : Entity_Id); -- Node5
7831 procedure Set_Float_Truncate
7832 (N : Node_Id; Val : Boolean := True); -- Flag11
7834 procedure Set_Formal_Type_Definition
7835 (N : Node_Id; Val : Node_Id); -- Node3
7837 procedure Set_Forwards_OK
7838 (N : Node_Id; Val : Boolean := True); -- Flag5
7840 procedure Set_From_At_Mod
7841 (N : Node_Id; Val : Boolean := True); -- Flag4
7843 procedure Set_Generic_Associations
7844 (N : Node_Id; Val : List_Id); -- List3
7846 procedure Set_Generic_Formal_Declarations
7847 (N : Node_Id; Val : List_Id); -- List2
7849 procedure Set_Generic_Parent
7850 (N : Node_Id; Val : Node_Id); -- Node5
7852 procedure Set_Generic_Parent_Type
7853 (N : Node_Id; Val : Node_Id); -- Node4
7855 procedure Set_Handled_Statement_Sequence
7856 (N : Node_Id; Val : Node_Id); -- Node4
7858 procedure Set_Handler_List_Entry
7859 (N : Node_Id; Val : Node_Id); -- Node2
7861 procedure Set_Has_Created_Identifier
7862 (N : Node_Id; Val : Boolean := True); -- Flag15
7864 procedure Set_Has_Dynamic_Length_Check
7865 (N : Node_Id; Val : Boolean := True); -- Flag10
7867 procedure Set_Has_Dynamic_Range_Check
7868 (N : Node_Id; Val : Boolean := True); -- Flag12
7870 procedure Set_Has_No_Elaboration_Code
7871 (N : Node_Id; Val : Boolean := True); -- Flag17
7873 procedure Set_Has_Priority_Pragma
7874 (N : Node_Id; Val : Boolean := True); -- Flag6
7876 procedure Set_Has_Private_View
7877 (N : Node_Id; Val : Boolean := True); -- Flag11
7879 procedure Set_Has_Storage_Size_Pragma
7880 (N : Node_Id; Val : Boolean := True); -- Flag5
7882 procedure Set_Has_Task_Info_Pragma
7883 (N : Node_Id; Val : Boolean := True); -- Flag7
7885 procedure Set_Has_Task_Name_Pragma
7886 (N : Node_Id; Val : Boolean := True); -- Flag8
7888 procedure Set_Has_Wide_Character
7889 (N : Node_Id; Val : Boolean := True); -- Flag11
7891 procedure Set_Hidden_By_Use_Clause
7892 (N : Node_Id; Val : Elist_Id); -- Elist4
7894 procedure Set_High_Bound
7895 (N : Node_Id; Val : Node_Id); -- Node2
7897 procedure Set_Identifier
7898 (N : Node_Id; Val : Node_Id); -- Node1
7900 procedure Set_Implicit_With
7901 (N : Node_Id; Val : Boolean := True); -- Flag17
7903 procedure Set_In_Present
7904 (N : Node_Id; Val : Boolean := True); -- Flag15
7906 procedure Set_Includes_Infinities
7907 (N : Node_Id; Val : Boolean := True); -- Flag11
7909 procedure Set_Instance_Spec
7910 (N : Node_Id; Val : Node_Id); -- Node5
7912 procedure Set_Intval
7913 (N : Node_Id; Val : Uint); -- Uint3
7915 procedure Set_Is_Asynchronous_Call_Block
7916 (N : Node_Id; Val : Boolean := True); -- Flag7
7918 procedure Set_Is_Component_Left_Opnd
7919 (N : Node_Id; Val : Boolean := True); -- Flag13
7921 procedure Set_Is_Component_Right_Opnd
7922 (N : Node_Id; Val : Boolean := True); -- Flag14
7924 procedure Set_Is_Controlling_Actual
7925 (N : Node_Id; Val : Boolean := True); -- Flag16
7927 procedure Set_Is_Machine_Number
7928 (N : Node_Id; Val : Boolean := True); -- Flag11
7930 procedure Set_Is_Overloaded
7931 (N : Node_Id; Val : Boolean := True); -- Flag5
7933 procedure Set_Is_Power_Of_2_For_Shift
7934 (N : Node_Id; Val : Boolean := True); -- Flag13
7936 procedure Set_Is_Protected_Subprogram_Body
7937 (N : Node_Id; Val : Boolean := True); -- Flag7
7939 procedure Set_Is_Static_Expression
7940 (N : Node_Id; Val : Boolean := True); -- Flag6
7942 procedure Set_Is_Subprogram_Descriptor
7943 (N : Node_Id; Val : Boolean := True); -- Flag16
7945 procedure Set_Is_Task_Allocation_Block
7946 (N : Node_Id; Val : Boolean := True); -- Flag6
7948 procedure Set_Is_Task_Master
7949 (N : Node_Id; Val : Boolean := True); -- Flag5
7951 procedure Set_Iteration_Scheme
7952 (N : Node_Id; Val : Node_Id); -- Node2
7954 procedure Set_Itype
7955 (N : Node_Id; Val : Entity_Id); -- Node1
7957 procedure Set_Kill_Range_Check
7958 (N : Node_Id; Val : Boolean := True); -- Flag11
7960 procedure Set_Last_Bit
7961 (N : Node_Id; Val : Node_Id); -- Node4
7963 procedure Set_Last_Name
7964 (N : Node_Id; Val : Boolean := True); -- Flag6
7966 procedure Set_Library_Unit
7967 (N : Node_Id; Val : Node_Id); -- Node4
7969 procedure Set_Label_Construct
7970 (N : Node_Id; Val : Node_Id); -- Node2
7972 procedure Set_Left_Opnd
7973 (N : Node_Id; Val : Node_Id); -- Node2
7975 procedure Set_Limited_Present
7976 (N : Node_Id; Val : Boolean := True); -- Flag17
7978 procedure Set_Literals
7979 (N : Node_Id; Val : List_Id); -- List1
7981 procedure Set_Loop_Actions
7982 (N : Node_Id; Val : List_Id); -- List2
7984 procedure Set_Loop_Parameter_Specification
7985 (N : Node_Id; Val : Node_Id); -- Node4
7987 procedure Set_Low_Bound
7988 (N : Node_Id; Val : Node_Id); -- Node1
7990 procedure Set_Mod_Clause
7991 (N : Node_Id; Val : Node_Id); -- Node2
7993 procedure Set_More_Ids
7994 (N : Node_Id; Val : Boolean := True); -- Flag5
7996 procedure Set_Must_Be_Byte_Aligned
7997 (N : Node_Id; Val : Boolean := True); -- Flag14
7999 procedure Set_Must_Not_Freeze
8000 (N : Node_Id; Val : Boolean := True); -- Flag8
8002 procedure Set_Name
8003 (N : Node_Id; Val : Node_Id); -- Node2
8005 procedure Set_Names
8006 (N : Node_Id; Val : List_Id); -- List2
8008 procedure Set_Next_Entity
8009 (N : Node_Id; Val : Node_Id); -- Node2
8011 procedure Set_Next_Named_Actual
8012 (N : Node_Id; Val : Node_Id); -- Node4
8014 procedure Set_Next_Rep_Item
8015 (N : Node_Id; Val : Node_Id); -- Node4
8017 procedure Set_Next_Use_Clause
8018 (N : Node_Id; Val : Node_Id); -- Node3
8020 procedure Set_No_Ctrl_Actions
8021 (N : Node_Id; Val : Boolean := True); -- Flag7
8023 procedure Set_No_Entities_Ref_In_Spec
8024 (N : Node_Id; Val : Boolean := True); -- Flag8
8026 procedure Set_No_Initialization
8027 (N : Node_Id; Val : Boolean := True); -- Flag13
8029 procedure Set_Null_Present
8030 (N : Node_Id; Val : Boolean := True); -- Flag13
8032 procedure Set_Null_Record_Present
8033 (N : Node_Id; Val : Boolean := True); -- Flag17
8035 procedure Set_Object_Definition
8036 (N : Node_Id; Val : Node_Id); -- Node4
8038 procedure Set_OK_For_Stream
8039 (N : Node_Id; Val : Boolean := True); -- Flag4
8041 procedure Set_Original_Discriminant
8042 (N : Node_Id; Val : Node_Id); -- Node2
8044 procedure Set_Others_Discrete_Choices
8045 (N : Node_Id; Val : List_Id); -- List1
8047 procedure Set_Out_Present
8048 (N : Node_Id; Val : Boolean := True); -- Flag17
8050 procedure Set_Parameter_Associations
8051 (N : Node_Id; Val : List_Id); -- List3
8053 procedure Set_Parameter_List_Truncated
8054 (N : Node_Id; Val : Boolean := True); -- Flag17
8056 procedure Set_Parameter_Specifications
8057 (N : Node_Id; Val : List_Id); -- List3
8059 procedure Set_Parameter_Type
8060 (N : Node_Id; Val : Node_Id); -- Node2
8062 procedure Set_Parent_Spec
8063 (N : Node_Id; Val : Node_Id); -- Node4
8065 procedure Set_Position
8066 (N : Node_Id; Val : Node_Id); -- Node2
8068 procedure Set_Pragma_Argument_Associations
8069 (N : Node_Id; Val : List_Id); -- List2
8071 procedure Set_Pragmas_After
8072 (N : Node_Id; Val : List_Id); -- List5
8074 procedure Set_Pragmas_Before
8075 (N : Node_Id; Val : List_Id); -- List4
8077 procedure Set_Prefix
8078 (N : Node_Id; Val : Node_Id); -- Node3
8080 procedure Set_Present_Expr
8081 (N : Node_Id; Val : Uint); -- Uint3
8083 procedure Set_Prev_Ids
8084 (N : Node_Id; Val : Boolean := True); -- Flag6
8086 procedure Set_Print_In_Hex
8087 (N : Node_Id; Val : Boolean := True); -- Flag13
8089 procedure Set_Private_Declarations
8090 (N : Node_Id; Val : List_Id); -- List3
8092 procedure Set_Private_Present
8093 (N : Node_Id; Val : Boolean := True); -- Flag15
8095 procedure Set_Procedure_To_Call
8096 (N : Node_Id; Val : Node_Id); -- Node4
8098 procedure Set_Proper_Body
8099 (N : Node_Id; Val : Node_Id); -- Node1
8101 procedure Set_Protected_Definition
8102 (N : Node_Id; Val : Node_Id); -- Node3
8104 procedure Set_Protected_Present
8105 (N : Node_Id; Val : Boolean := True); -- Flag15
8107 procedure Set_Raises_Constraint_Error
8108 (N : Node_Id; Val : Boolean := True); -- Flag7
8110 procedure Set_Range_Constraint
8111 (N : Node_Id; Val : Node_Id); -- Node4
8113 procedure Set_Range_Expression
8114 (N : Node_Id; Val : Node_Id); -- Node4
8116 procedure Set_Real_Range_Specification
8117 (N : Node_Id; Val : Node_Id); -- Node4
8119 procedure Set_Realval
8120 (N : Node_Id; Val : Ureal); -- Ureal3
8122 procedure Set_Reason
8123 (N : Node_Id; Val : Uint); -- Uint3
8125 procedure Set_Record_Extension_Part
8126 (N : Node_Id; Val : Node_Id); -- Node3
8128 procedure Set_Redundant_Use
8129 (N : Node_Id; Val : Boolean := True); -- Flag13
8131 procedure Set_Return_Type
8132 (N : Node_Id; Val : Node_Id); -- Node2
8134 procedure Set_Reverse_Present
8135 (N : Node_Id; Val : Boolean := True); -- Flag15
8137 procedure Set_Right_Opnd
8138 (N : Node_Id; Val : Node_Id); -- Node3
8140 procedure Set_Rounded_Result
8141 (N : Node_Id; Val : Boolean := True); -- Flag18
8143 procedure Set_Scope
8144 (N : Node_Id; Val : Node_Id); -- Node3
8146 procedure Set_Select_Alternatives
8147 (N : Node_Id; Val : List_Id); -- List1
8149 procedure Set_Selector_Name
8150 (N : Node_Id; Val : Node_Id); -- Node2
8152 procedure Set_Selector_Names
8153 (N : Node_Id; Val : List_Id); -- List1
8155 procedure Set_Shift_Count_OK
8156 (N : Node_Id; Val : Boolean := True); -- Flag4
8158 procedure Set_Source_Type
8159 (N : Node_Id; Val : Entity_Id); -- Node1
8161 procedure Set_Specification
8162 (N : Node_Id; Val : Node_Id); -- Node1
8164 procedure Set_Statements
8165 (N : Node_Id; Val : List_Id); -- List3
8167 procedure Set_Static_Processing_OK
8168 (N : Node_Id; Val : Boolean); -- Flag4
8170 procedure Set_Storage_Pool
8171 (N : Node_Id; Val : Node_Id); -- Node1
8173 procedure Set_Strval
8174 (N : Node_Id; Val : String_Id); -- Str3
8176 procedure Set_Subtype_Indication
8177 (N : Node_Id; Val : Node_Id); -- Node5
8179 procedure Set_Subtype_Mark
8180 (N : Node_Id; Val : Node_Id); -- Node4
8182 procedure Set_Subtype_Marks
8183 (N : Node_Id; Val : List_Id); -- List2
8185 procedure Set_Tagged_Present
8186 (N : Node_Id; Val : Boolean := True); -- Flag15
8188 procedure Set_Target_Type
8189 (N : Node_Id; Val : Entity_Id); -- Node2
8191 procedure Set_Task_Body_Procedure
8192 (N : Node_Id; Val : Entity_Id); -- Node2
8194 procedure Set_Task_Definition
8195 (N : Node_Id; Val : Node_Id); -- Node3
8197 procedure Set_Then_Actions
8198 (N : Node_Id; Val : List_Id); -- List2
8200 procedure Set_Then_Statements
8201 (N : Node_Id; Val : List_Id); -- List2
8203 procedure Set_Treat_Fixed_As_Integer
8204 (N : Node_Id; Val : Boolean := True); -- Flag14
8206 procedure Set_Triggering_Alternative
8207 (N : Node_Id; Val : Node_Id); -- Node1
8209 procedure Set_Triggering_Statement
8210 (N : Node_Id; Val : Node_Id); -- Node1
8212 procedure Set_TSS_Elist
8213 (N : Node_Id; Val : Elist_Id); -- Elist3
8215 procedure Set_Type_Definition
8216 (N : Node_Id; Val : Node_Id); -- Node3
8218 procedure Set_Unit
8219 (N : Node_Id; Val : Node_Id); -- Node2
8221 procedure Set_Unknown_Discriminants_Present
8222 (N : Node_Id; Val : Boolean := True); -- Flag13
8224 procedure Set_Unreferenced_In_Spec
8225 (N : Node_Id; Val : Boolean := True); -- Flag7
8227 procedure Set_Variant_Part
8228 (N : Node_Id; Val : Node_Id); -- Node4
8230 procedure Set_Variants
8231 (N : Node_Id; Val : List_Id); -- List1
8233 procedure Set_Visible_Declarations
8234 (N : Node_Id; Val : List_Id); -- List2
8236 procedure Set_Was_Originally_Stub
8237 (N : Node_Id; Val : Boolean := True); -- Flag13
8239 procedure Set_Zero_Cost_Handling
8240 (N : Node_Id; Val : Boolean := True); -- Flag5
8242 -------------------------
8243 -- Iterator Procedures --
8244 -------------------------
8246 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
8248 procedure Next_Entity (N : in out Node_Id);
8249 procedure Next_Named_Actual (N : in out Node_Id);
8250 procedure Next_Rep_Item (N : in out Node_Id);
8251 procedure Next_Use_Clause (N : in out Node_Id);
8253 --------------------------------------
8254 -- Logical Access to End_Span Field --
8255 --------------------------------------
8257 function End_Location (N : Node_Id) return Source_Ptr;
8258 -- N is an N_If_Statement or N_Case_Statement node, and this
8259 -- function returns the location of the IF token in the END IF
8260 -- sequence by translating the value of the End_Span field.
8262 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
8263 -- N is an N_If_Statement or N_Case_Statement node. This procedure
8264 -- sets the End_Span field to correspond to the given value S. In
8265 -- other words, End_Span is set to the difference between S and
8266 -- Sloc (N), the starting location.
8268 --------------------
8269 -- Inline Pragmas --
8270 --------------------
8272 pragma Inline (ABE_Is_Certain);
8273 pragma Inline (Abort_Present);
8274 pragma Inline (Abortable_Part);
8275 pragma Inline (Abstract_Present);
8276 pragma Inline (Accept_Handler_Records);
8277 pragma Inline (Accept_Statement);
8278 pragma Inline (Access_Types_To_Process);
8279 pragma Inline (Actions);
8280 pragma Inline (Activation_Chain_Entity);
8281 pragma Inline (Acts_As_Spec);
8282 pragma Inline (Aggregate_Bounds);
8283 pragma Inline (Aliased_Present);
8284 pragma Inline (All_Others);
8285 pragma Inline (All_Present);
8286 pragma Inline (Alternatives);
8287 pragma Inline (Ancestor_Part);
8288 pragma Inline (Array_Aggregate);
8289 pragma Inline (Assignment_OK);
8290 pragma Inline (Associated_Node);
8291 pragma Inline (At_End_Proc);
8292 pragma Inline (Attribute_Name);
8293 pragma Inline (Aux_Decls_Node);
8294 pragma Inline (Backwards_OK);
8295 pragma Inline (Bad_Is_Detected);
8296 pragma Inline (Body_To_Inline);
8297 pragma Inline (Body_Required);
8298 pragma Inline (By_Ref);
8299 pragma Inline (Box_Present);
8300 pragma Inline (Char_Literal_Value);
8301 pragma Inline (Chars);
8302 pragma Inline (Choice_Parameter);
8303 pragma Inline (Choices);
8304 pragma Inline (Compile_Time_Known_Aggregate);
8305 pragma Inline (Component_Associations);
8306 pragma Inline (Component_Clauses);
8307 pragma Inline (Component_Items);
8308 pragma Inline (Component_List);
8309 pragma Inline (Component_Name);
8310 pragma Inline (Condition);
8311 pragma Inline (Condition_Actions);
8312 pragma Inline (Constant_Present);
8313 pragma Inline (Constraint);
8314 pragma Inline (Constraints);
8315 pragma Inline (Context_Installed);
8316 pragma Inline (Context_Items);
8317 pragma Inline (Controlling_Argument);
8318 pragma Inline (Conversion_OK);
8319 pragma Inline (Corresponding_Body);
8320 pragma Inline (Corresponding_Generic_Association);
8321 pragma Inline (Corresponding_Integer_Value);
8322 pragma Inline (Corresponding_Spec);
8323 pragma Inline (Corresponding_Stub);
8324 pragma Inline (Dcheck_Function);
8325 pragma Inline (Debug_Statement);
8326 pragma Inline (Declarations);
8327 pragma Inline (Default_Expression);
8328 pragma Inline (Default_Name);
8329 pragma Inline (Defining_Identifier);
8330 pragma Inline (Defining_Unit_Name);
8331 pragma Inline (Delay_Alternative);
8332 pragma Inline (Delay_Finalize_Attach);
8333 pragma Inline (Delay_Statement);
8334 pragma Inline (Delta_Expression);
8335 pragma Inline (Digits_Expression);
8336 pragma Inline (Discr_Check_Funcs_Built);
8337 pragma Inline (Discrete_Choices);
8338 pragma Inline (Discrete_Range);
8339 pragma Inline (Discrete_Subtype_Definition);
8340 pragma Inline (Discrete_Subtype_Definitions);
8341 pragma Inline (Discriminant_Specifications);
8342 pragma Inline (Discriminant_Type);
8343 pragma Inline (Do_Access_Check);
8344 pragma Inline (Do_Accessibility_Check);
8345 pragma Inline (Do_Discriminant_Check);
8346 pragma Inline (Do_Length_Check);
8347 pragma Inline (Do_Division_Check);
8348 pragma Inline (Do_Overflow_Check);
8349 pragma Inline (Do_Range_Check);
8350 pragma Inline (Do_Storage_Check);
8351 pragma Inline (Do_Tag_Check);
8352 pragma Inline (Elaborate_Present);
8353 pragma Inline (Elaborate_All_Present);
8354 pragma Inline (Elaboration_Boolean);
8355 pragma Inline (Else_Actions);
8356 pragma Inline (Else_Statements);
8357 pragma Inline (Elsif_Parts);
8358 pragma Inline (Enclosing_Variant);
8359 pragma Inline (End_Label);
8360 pragma Inline (End_Span);
8361 pragma Inline (Entity);
8362 pragma Inline (Entry_Body_Formal_Part);
8363 pragma Inline (Entry_Call_Alternative);
8364 pragma Inline (Entry_Call_Statement);
8365 pragma Inline (Entry_Direct_Name);
8366 pragma Inline (Entry_Index);
8367 pragma Inline (Entry_Index_Specification);
8368 pragma Inline (Etype);
8369 pragma Inline (Exception_Choices);
8370 pragma Inline (Exception_Junk);
8371 pragma Inline (Exception_Handlers);
8372 pragma Inline (Expansion_Delayed);
8373 pragma Inline (Explicit_Actual_Parameter);
8374 pragma Inline (Explicit_Generic_Actual_Parameter);
8375 pragma Inline (Expression);
8376 pragma Inline (Expressions);
8377 pragma Inline (First_Bit);
8378 pragma Inline (First_Inlined_Subprogram);
8379 pragma Inline (First_Name);
8380 pragma Inline (First_Named_Actual);
8381 pragma Inline (First_Real_Statement);
8382 pragma Inline (First_Subtype_Link);
8383 pragma Inline (Float_Truncate);
8384 pragma Inline (Formal_Type_Definition);
8385 pragma Inline (Forwards_OK);
8386 pragma Inline (From_At_Mod);
8387 pragma Inline (Generic_Associations);
8388 pragma Inline (Generic_Formal_Declarations);
8389 pragma Inline (Generic_Parent);
8390 pragma Inline (Generic_Parent_Type);
8391 pragma Inline (Handled_Statement_Sequence);
8392 pragma Inline (Handler_List_Entry);
8393 pragma Inline (Has_Created_Identifier);
8394 pragma Inline (Has_Dynamic_Length_Check);
8395 pragma Inline (Has_Dynamic_Range_Check);
8396 pragma Inline (Has_No_Elaboration_Code);
8397 pragma Inline (Has_Priority_Pragma);
8398 pragma Inline (Has_Private_View);
8399 pragma Inline (Has_Storage_Size_Pragma);
8400 pragma Inline (Has_Task_Info_Pragma);
8401 pragma Inline (Has_Task_Name_Pragma);
8402 pragma Inline (Has_Wide_Character);
8403 pragma Inline (Hidden_By_Use_Clause);
8404 pragma Inline (High_Bound);
8405 pragma Inline (Identifier);
8406 pragma Inline (Implicit_With);
8407 pragma Inline (Includes_Infinities);
8408 pragma Inline (In_Present);
8409 pragma Inline (Instance_Spec);
8410 pragma Inline (Intval);
8411 pragma Inline (Is_Asynchronous_Call_Block);
8412 pragma Inline (Is_Component_Left_Opnd);
8413 pragma Inline (Is_Component_Right_Opnd);
8414 pragma Inline (Is_Controlling_Actual);
8415 pragma Inline (Is_Machine_Number);
8416 pragma Inline (Is_Overloaded);
8417 pragma Inline (Is_Power_Of_2_For_Shift);
8418 pragma Inline (Is_Protected_Subprogram_Body);
8419 pragma Inline (Is_Static_Expression);
8420 pragma Inline (Is_Subprogram_Descriptor);
8421 pragma Inline (Is_Task_Allocation_Block);
8422 pragma Inline (Is_Task_Master);
8423 pragma Inline (Iteration_Scheme);
8424 pragma Inline (Itype);
8425 pragma Inline (Kill_Range_Check);
8426 pragma Inline (Last_Bit);
8427 pragma Inline (Last_Name);
8428 pragma Inline (Library_Unit);
8429 pragma Inline (Label_Construct);
8430 pragma Inline (Left_Opnd);
8431 pragma Inline (Limited_Present);
8432 pragma Inline (Literals);
8433 pragma Inline (Loop_Actions);
8434 pragma Inline (Loop_Parameter_Specification);
8435 pragma Inline (Low_Bound);
8436 pragma Inline (Mod_Clause);
8437 pragma Inline (More_Ids);
8438 pragma Inline (Must_Be_Byte_Aligned);
8439 pragma Inline (Must_Not_Freeze);
8440 pragma Inline (Name);
8441 pragma Inline (Names);
8442 pragma Inline (Next_Entity);
8443 pragma Inline (Next_Named_Actual);
8444 pragma Inline (Next_Rep_Item);
8445 pragma Inline (Next_Use_Clause);
8446 pragma Inline (No_Ctrl_Actions);
8447 pragma Inline (No_Entities_Ref_In_Spec);
8448 pragma Inline (No_Initialization);
8449 pragma Inline (Null_Present);
8450 pragma Inline (Null_Record_Present);
8451 pragma Inline (Object_Definition);
8452 pragma Inline (OK_For_Stream);
8453 pragma Inline (Original_Discriminant);
8454 pragma Inline (Others_Discrete_Choices);
8455 pragma Inline (Out_Present);
8456 pragma Inline (Parameter_Associations);
8457 pragma Inline (Parameter_Specifications);
8458 pragma Inline (Parameter_List_Truncated);
8459 pragma Inline (Parameter_Type);
8460 pragma Inline (Parent_Spec);
8461 pragma Inline (Position);
8462 pragma Inline (Pragma_Argument_Associations);
8463 pragma Inline (Pragmas_After);
8464 pragma Inline (Pragmas_Before);
8465 pragma Inline (Prefix);
8466 pragma Inline (Present_Expr);
8467 pragma Inline (Prev_Ids);
8468 pragma Inline (Print_In_Hex);
8469 pragma Inline (Private_Declarations);
8470 pragma Inline (Private_Present);
8471 pragma Inline (Procedure_To_Call);
8472 pragma Inline (Proper_Body);
8473 pragma Inline (Protected_Definition);
8474 pragma Inline (Protected_Present);
8475 pragma Inline (Raises_Constraint_Error);
8476 pragma Inline (Range_Constraint);
8477 pragma Inline (Range_Expression);
8478 pragma Inline (Real_Range_Specification);
8479 pragma Inline (Realval);
8480 pragma Inline (Reason);
8481 pragma Inline (Record_Extension_Part);
8482 pragma Inline (Redundant_Use);
8483 pragma Inline (Return_Type);
8484 pragma Inline (Reverse_Present);
8485 pragma Inline (Right_Opnd);
8486 pragma Inline (Rounded_Result);
8487 pragma Inline (Scope);
8488 pragma Inline (Select_Alternatives);
8489 pragma Inline (Selector_Name);
8490 pragma Inline (Selector_Names);
8491 pragma Inline (Shift_Count_OK);
8492 pragma Inline (Source_Type);
8493 pragma Inline (Specification);
8494 pragma Inline (Statements);
8495 pragma Inline (Static_Processing_OK);
8496 pragma Inline (Storage_Pool);
8497 pragma Inline (Strval);
8498 pragma Inline (Subtype_Indication);
8499 pragma Inline (Subtype_Mark);
8500 pragma Inline (Subtype_Marks);
8501 pragma Inline (Tagged_Present);
8502 pragma Inline (Target_Type);
8503 pragma Inline (Task_Body_Procedure);
8504 pragma Inline (Task_Definition);
8505 pragma Inline (Then_Actions);
8506 pragma Inline (Then_Statements);
8507 pragma Inline (Triggering_Alternative);
8508 pragma Inline (Triggering_Statement);
8509 pragma Inline (Treat_Fixed_As_Integer);
8510 pragma Inline (TSS_Elist);
8511 pragma Inline (Type_Definition);
8512 pragma Inline (Unit);
8513 pragma Inline (Unknown_Discriminants_Present);
8514 pragma Inline (Unreferenced_In_Spec);
8515 pragma Inline (Variant_Part);
8516 pragma Inline (Variants);
8517 pragma Inline (Visible_Declarations);
8518 pragma Inline (Was_Originally_Stub);
8519 pragma Inline (Zero_Cost_Handling);
8521 pragma Inline (Set_ABE_Is_Certain);
8522 pragma Inline (Set_Abort_Present);
8523 pragma Inline (Set_Abortable_Part);
8524 pragma Inline (Set_Abstract_Present);
8525 pragma Inline (Set_Accept_Handler_Records);
8526 pragma Inline (Set_Accept_Statement);
8527 pragma Inline (Set_Access_Types_To_Process);
8528 pragma Inline (Set_Actions);
8529 pragma Inline (Set_Activation_Chain_Entity);
8530 pragma Inline (Set_Acts_As_Spec);
8531 pragma Inline (Set_Aggregate_Bounds);
8532 pragma Inline (Set_Aliased_Present);
8533 pragma Inline (Set_All_Others);
8534 pragma Inline (Set_All_Present);
8535 pragma Inline (Set_Alternatives);
8536 pragma Inline (Set_Ancestor_Part);
8537 pragma Inline (Set_Array_Aggregate);
8538 pragma Inline (Set_Assignment_OK);
8539 pragma Inline (Set_Associated_Node);
8540 pragma Inline (Set_At_End_Proc);
8541 pragma Inline (Set_Attribute_Name);
8542 pragma Inline (Set_Aux_Decls_Node);
8543 pragma Inline (Set_Backwards_OK);
8544 pragma Inline (Set_Bad_Is_Detected);
8545 pragma Inline (Set_Body_To_Inline);
8546 pragma Inline (Set_Body_Required);
8547 pragma Inline (Set_By_Ref);
8548 pragma Inline (Set_Box_Present);
8549 pragma Inline (Set_Char_Literal_Value);
8550 pragma Inline (Set_Chars);
8551 pragma Inline (Set_Choice_Parameter);
8552 pragma Inline (Set_Choices);
8553 pragma Inline (Set_Compile_Time_Known_Aggregate);
8554 pragma Inline (Set_Component_Associations);
8555 pragma Inline (Set_Component_Clauses);
8556 pragma Inline (Set_Component_Items);
8557 pragma Inline (Set_Component_List);
8558 pragma Inline (Set_Component_Name);
8559 pragma Inline (Set_Condition);
8560 pragma Inline (Set_Condition_Actions);
8561 pragma Inline (Set_Constant_Present);
8562 pragma Inline (Set_Constraint);
8563 pragma Inline (Set_Constraints);
8564 pragma Inline (Set_Context_Installed);
8565 pragma Inline (Set_Context_Items);
8566 pragma Inline (Set_Controlling_Argument);
8567 pragma Inline (Set_Conversion_OK);
8568 pragma Inline (Set_Corresponding_Body);
8569 pragma Inline (Set_Corresponding_Generic_Association);
8570 pragma Inline (Set_Corresponding_Integer_Value);
8571 pragma Inline (Set_Corresponding_Spec);
8572 pragma Inline (Set_Corresponding_Stub);
8573 pragma Inline (Set_Dcheck_Function);
8574 pragma Inline (Set_Debug_Statement);
8575 pragma Inline (Set_Declarations);
8576 pragma Inline (Set_Default_Expression);
8577 pragma Inline (Set_Default_Name);
8578 pragma Inline (Set_Defining_Identifier);
8579 pragma Inline (Set_Defining_Unit_Name);
8580 pragma Inline (Set_Delay_Alternative);
8581 pragma Inline (Set_Delay_Finalize_Attach);
8582 pragma Inline (Set_Delay_Statement);
8583 pragma Inline (Set_Delta_Expression);
8584 pragma Inline (Set_Digits_Expression);
8585 pragma Inline (Set_Discr_Check_Funcs_Built);
8586 pragma Inline (Set_Discrete_Choices);
8587 pragma Inline (Set_Discrete_Range);
8588 pragma Inline (Set_Discrete_Subtype_Definition);
8589 pragma Inline (Set_Discrete_Subtype_Definitions);
8590 pragma Inline (Set_Discriminant_Specifications);
8591 pragma Inline (Set_Discriminant_Type);
8592 pragma Inline (Set_Do_Access_Check);
8593 pragma Inline (Set_Do_Accessibility_Check);
8594 pragma Inline (Set_Do_Discriminant_Check);
8595 pragma Inline (Set_Do_Length_Check);
8596 pragma Inline (Set_Do_Division_Check);
8597 pragma Inline (Set_Do_Overflow_Check);
8598 pragma Inline (Set_Do_Range_Check);
8599 pragma Inline (Set_Do_Storage_Check);
8600 pragma Inline (Set_Do_Tag_Check);
8601 pragma Inline (Set_Elaborate_Present);
8602 pragma Inline (Set_Elaborate_All_Present);
8603 pragma Inline (Set_Elaboration_Boolean);
8604 pragma Inline (Set_Else_Actions);
8605 pragma Inline (Set_Else_Statements);
8606 pragma Inline (Set_Elsif_Parts);
8607 pragma Inline (Set_Enclosing_Variant);
8608 pragma Inline (Set_End_Label);
8609 pragma Inline (Set_End_Span);
8610 pragma Inline (Set_Entity);
8611 pragma Inline (Set_Entry_Body_Formal_Part);
8612 pragma Inline (Set_Entry_Call_Alternative);
8613 pragma Inline (Set_Entry_Call_Statement);
8614 pragma Inline (Set_Entry_Direct_Name);
8615 pragma Inline (Set_Entry_Index);
8616 pragma Inline (Set_Entry_Index_Specification);
8617 pragma Inline (Set_Etype);
8618 pragma Inline (Set_Exception_Choices);
8619 pragma Inline (Set_Exception_Junk);
8620 pragma Inline (Set_Exception_Handlers);
8621 pragma Inline (Set_Expansion_Delayed);
8622 pragma Inline (Set_Explicit_Actual_Parameter);
8623 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
8624 pragma Inline (Set_Expression);
8625 pragma Inline (Set_Expressions);
8626 pragma Inline (Set_First_Bit);
8627 pragma Inline (Set_First_Inlined_Subprogram);
8628 pragma Inline (Set_First_Name);
8629 pragma Inline (Set_First_Named_Actual);
8630 pragma Inline (Set_First_Real_Statement);
8631 pragma Inline (Set_First_Subtype_Link);
8632 pragma Inline (Set_Float_Truncate);
8633 pragma Inline (Set_Formal_Type_Definition);
8634 pragma Inline (Set_Forwards_OK);
8635 pragma Inline (Set_From_At_Mod);
8636 pragma Inline (Set_Generic_Associations);
8637 pragma Inline (Set_Generic_Formal_Declarations);
8638 pragma Inline (Set_Generic_Parent);
8639 pragma Inline (Set_Generic_Parent_Type);
8640 pragma Inline (Set_Handled_Statement_Sequence);
8641 pragma Inline (Set_Handler_List_Entry);
8642 pragma Inline (Set_Has_Created_Identifier);
8643 pragma Inline (Set_Has_Dynamic_Length_Check);
8644 pragma Inline (Set_Has_Dynamic_Range_Check);
8645 pragma Inline (Set_Has_No_Elaboration_Code);
8646 pragma Inline (Set_Has_Priority_Pragma);
8647 pragma Inline (Set_Has_Private_View);
8648 pragma Inline (Set_Has_Storage_Size_Pragma);
8649 pragma Inline (Set_Has_Task_Info_Pragma);
8650 pragma Inline (Set_Has_Task_Name_Pragma);
8651 pragma Inline (Set_Has_Wide_Character);
8652 pragma Inline (Set_Hidden_By_Use_Clause);
8653 pragma Inline (Set_High_Bound);
8654 pragma Inline (Set_Identifier);
8655 pragma Inline (Set_Implicit_With);
8656 pragma Inline (Set_Includes_Infinities);
8657 pragma Inline (Set_In_Present);
8658 pragma Inline (Set_Instance_Spec);
8659 pragma Inline (Set_Intval);
8660 pragma Inline (Set_Is_Asynchronous_Call_Block);
8661 pragma Inline (Set_Is_Component_Left_Opnd);
8662 pragma Inline (Set_Is_Component_Right_Opnd);
8663 pragma Inline (Set_Is_Controlling_Actual);
8664 pragma Inline (Set_Is_Machine_Number);
8665 pragma Inline (Set_Is_Overloaded);
8666 pragma Inline (Set_Is_Power_Of_2_For_Shift);
8667 pragma Inline (Set_Is_Protected_Subprogram_Body);
8668 pragma Inline (Set_Is_Static_Expression);
8669 pragma Inline (Set_Is_Subprogram_Descriptor);
8670 pragma Inline (Set_Is_Task_Allocation_Block);
8671 pragma Inline (Set_Is_Task_Master);
8672 pragma Inline (Set_Iteration_Scheme);
8673 pragma Inline (Set_Itype);
8674 pragma Inline (Set_Kill_Range_Check);
8675 pragma Inline (Set_Last_Bit);
8676 pragma Inline (Set_Last_Name);
8677 pragma Inline (Set_Library_Unit);
8678 pragma Inline (Set_Label_Construct);
8679 pragma Inline (Set_Left_Opnd);
8680 pragma Inline (Set_Limited_Present);
8681 pragma Inline (Set_Literals);
8682 pragma Inline (Set_Loop_Actions);
8683 pragma Inline (Set_Loop_Parameter_Specification);
8684 pragma Inline (Set_Low_Bound);
8685 pragma Inline (Set_Mod_Clause);
8686 pragma Inline (Set_More_Ids);
8687 pragma Inline (Set_Must_Be_Byte_Aligned);
8688 pragma Inline (Set_Must_Not_Freeze);
8689 pragma Inline (Set_Name);
8690 pragma Inline (Set_Names);
8691 pragma Inline (Set_Next_Entity);
8692 pragma Inline (Set_Next_Named_Actual);
8693 pragma Inline (Set_Next_Use_Clause);
8694 pragma Inline (Set_No_Ctrl_Actions);
8695 pragma Inline (Set_No_Entities_Ref_In_Spec);
8696 pragma Inline (Set_No_Initialization);
8697 pragma Inline (Set_Null_Present);
8698 pragma Inline (Set_Null_Record_Present);
8699 pragma Inline (Set_Object_Definition);
8700 pragma Inline (Set_OK_For_Stream);
8701 pragma Inline (Set_Original_Discriminant);
8702 pragma Inline (Set_Others_Discrete_Choices);
8703 pragma Inline (Set_Out_Present);
8704 pragma Inline (Set_Parameter_Associations);
8705 pragma Inline (Set_Parameter_Specifications);
8706 pragma Inline (Set_Parameter_List_Truncated);
8707 pragma Inline (Set_Parameter_Type);
8708 pragma Inline (Set_Parent_Spec);
8709 pragma Inline (Set_Position);
8710 pragma Inline (Set_Pragma_Argument_Associations);
8711 pragma Inline (Set_Pragmas_After);
8712 pragma Inline (Set_Pragmas_Before);
8713 pragma Inline (Set_Prefix);
8714 pragma Inline (Set_Present_Expr);
8715 pragma Inline (Set_Prev_Ids);
8716 pragma Inline (Set_Print_In_Hex);
8717 pragma Inline (Set_Private_Declarations);
8718 pragma Inline (Set_Private_Present);
8719 pragma Inline (Set_Procedure_To_Call);
8720 pragma Inline (Set_Proper_Body);
8721 pragma Inline (Set_Protected_Definition);
8722 pragma Inline (Set_Protected_Present);
8723 pragma Inline (Set_Raises_Constraint_Error);
8724 pragma Inline (Set_Range_Constraint);
8725 pragma Inline (Set_Range_Expression);
8726 pragma Inline (Set_Real_Range_Specification);
8727 pragma Inline (Set_Realval);
8728 pragma Inline (Set_Reason);
8729 pragma Inline (Set_Record_Extension_Part);
8730 pragma Inline (Set_Redundant_Use);
8731 pragma Inline (Set_Return_Type);
8732 pragma Inline (Set_Reverse_Present);
8733 pragma Inline (Set_Right_Opnd);
8734 pragma Inline (Set_Rounded_Result);
8735 pragma Inline (Set_Scope);
8736 pragma Inline (Set_Select_Alternatives);
8737 pragma Inline (Set_Selector_Name);
8738 pragma Inline (Set_Selector_Names);
8739 pragma Inline (Set_Shift_Count_OK);
8740 pragma Inline (Set_Source_Type);
8741 pragma Inline (Set_Specification);
8742 pragma Inline (Set_Statements);
8743 pragma Inline (Set_Static_Processing_OK);
8744 pragma Inline (Set_Storage_Pool);
8745 pragma Inline (Set_Strval);
8746 pragma Inline (Set_Subtype_Indication);
8747 pragma Inline (Set_Subtype_Mark);
8748 pragma Inline (Set_Subtype_Marks);
8749 pragma Inline (Set_Tagged_Present);
8750 pragma Inline (Set_Target_Type);
8751 pragma Inline (Set_Task_Body_Procedure);
8752 pragma Inline (Set_Task_Definition);
8753 pragma Inline (Set_Then_Actions);
8754 pragma Inline (Set_Then_Statements);
8755 pragma Inline (Set_Triggering_Alternative);
8756 pragma Inline (Set_Triggering_Statement);
8757 pragma Inline (Set_Treat_Fixed_As_Integer);
8758 pragma Inline (Set_TSS_Elist);
8759 pragma Inline (Set_Type_Definition);
8760 pragma Inline (Set_Unit);
8761 pragma Inline (Set_Unknown_Discriminants_Present);
8762 pragma Inline (Set_Unreferenced_In_Spec);
8763 pragma Inline (Set_Variant_Part);
8764 pragma Inline (Set_Variants);
8765 pragma Inline (Set_Visible_Declarations);
8766 pragma Inline (Set_Was_Originally_Stub);
8767 pragma Inline (Set_Zero_Cost_Handling);
8769 end Sinfo;