OSDN Git Service

* make.adb:
[pf3gnuchains/gcc-fork.git] / gcc / ada / snames.adb
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                               S N A M E S                                --
6 --                                                                          --
7 --                                 B o d y                                  --
8 --                                                                          --
9 --                            $Revision$                            --
10 --                                                                          --
11 --          Copyright (C) 1992-2001, Free Software Foundation, Inc.         --
12 --                                                                          --
13 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
14 -- terms of the  GNU General Public License as published  by the Free Soft- --
15 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
16 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
19 -- for  more details.  You should have  received  a copy of the GNU General --
20 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
21 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
22 -- MA 02111-1307, USA.                                                      --
23 --                                                                          --
24 -- As a special exception,  if other files  instantiate  generics from this --
25 -- unit, or you link  this unit with other files  to produce an executable, --
26 -- this  unit  does not  by itself cause  the resulting  executable  to  be --
27 -- covered  by the  GNU  General  Public  License.  This exception does not --
28 -- however invalidate  any other reasons why  the executable file  might be --
29 -- covered by the  GNU Public License.                                      --
30 --                                                                          --
31 -- GNAT was originally developed  by the GNAT team at  New York University. --
32 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
33 --                                                                          --
34 ------------------------------------------------------------------------------
35
36 with Namet; use Namet;
37
38 package body Snames is
39
40    --  Table of names to be set by Initialize. Each name is terminated by a
41    --  single #, and the end of the list is marked by a null entry, i.e. by
42    --  two # marks in succession. Note that the table does not include the
43    --  entries for a-z, since these are initialized by Namet itself.
44
45    Preset_Names : constant String :=
46      "_parent#" &
47      "_tag#" &
48      "off#" &
49      "space#" &
50      "time#" &
51      "_init_proc#" &
52      "_size#" &
53      "_abort_signal#" &
54      "_address_resolver#" &
55      "_assign#" &
56      "_chain#" &
57      "_clean#" &
58      "_controller#" &
59      "_entry_bodies#" &
60      "_expunge#" &
61      "_final_list#" &
62      "_idepth#" &
63      "_init#" &
64      "_local_final_list#" &
65      "_master#" &
66      "_object#" &
67      "_priority#" &
68      "_service#" &
69      "_tags#" &
70      "_task#" &
71      "_task_id#" &
72      "_task_info#" &
73      "_task_name#" &
74      "_trace_sp#" &
75      "initialize#" &
76      "adjust#" &
77      "finalize#" &
78      "next#" &
79      "prev#" &
80      "_deep_adjust#" &
81      "_equality#" &
82      "_deep_finalize#" &
83      "_deep_initialize#" &
84      "_input#" &
85      "_output#" &
86      "_ras_access#" &
87      "_ras_dereference#" &
88      "_read#" &
89      "_rep_to_pos#" &
90      "_write#" &
91      "allocate#" &
92      "deallocate#" &
93      "dereference#" &
94      "decimal_io#" &
95      "enumeration_io#" &
96      "fixed_io#" &
97      "float_io#" &
98      "integer_io#" &
99      "modular_io#" &
100      "a_textio#" &
101      "a_witeio#" &
102      "const#" &
103      "<error>#" &
104      "go#" &
105      "put#" &
106      "put_line#" &
107      "to#" &
108      "finalization#" &
109      "finalization_root#" &
110      "interfaces#" &
111      "standard#" &
112      "system#" &
113      "text_io#" &
114      "wide_text_io#" &
115      "addr#" &
116      "async#" &
117      "get_active_partition_id#" &
118      "get_rci_package_receiver#" &
119      "origin#" &
120      "params#" &
121      "partition#" &
122      "partition_interface#" &
123      "ras#" &
124      "rci_name#" &
125      "receiver#" &
126      "result#" &
127      "rpc#" &
128      "subp_id#" &
129      "Oabs#" &
130      "Oand#" &
131      "Omod#" &
132      "Onot#" &
133      "Oor#" &
134      "Orem#" &
135      "Oxor#" &
136      "Oeq#" &
137      "One#" &
138      "Olt#" &
139      "Ole#" &
140      "Ogt#" &
141      "Oge#" &
142      "Oadd#" &
143      "Osubtract#" &
144      "Oconcat#" &
145      "Omultiply#" &
146      "Odivide#" &
147      "Oexpon#" &
148      "ada_83#" &
149      "ada_95#" &
150      "c_pass_by_copy#" &
151      "component_alignment#" &
152      "discard_names#" &
153      "elaboration_checks#" &
154      "eliminate#" &
155      "extend_system#" &
156      "extensions_allowed#" &
157      "external_name_casing#" &
158      "float_representation#" &
159      "initialize_scalars#" &
160      "license#" &
161      "locking_policy#" &
162      "long_float#" &
163      "no_run_time#" &
164      "normalize_scalars#" &
165      "polling#" &
166      "propagate_exceptions#" &
167      "queuing_policy#" &
168      "ravenscar#" &
169      "restricted_run_time#" &
170      "restrictions#" &
171      "reviewable#" &
172      "source_file_name#" &
173      "style_checks#" &
174      "suppress#" &
175      "task_dispatching_policy#" &
176      "unsuppress#" &
177      "use_vads_size#" &
178      "warnings#" &
179      "validity_checks#" &
180      "abort_defer#" &
181      "all_calls_remote#" &
182      "annotate#" &
183      "assert#" &
184      "asynchronous#" &
185      "atomic#" &
186      "atomic_components#" &
187      "attach_handler#" &
188      "comment#" &
189      "common_object#" &
190      "complex_representation#" &
191      "controlled#" &
192      "convention#" &
193      "cpp_class#" &
194      "cpp_constructor#" &
195      "cpp_virtual#" &
196      "cpp_vtable#" &
197      "debug#" &
198      "elaborate#" &
199      "elaborate_all#" &
200      "elaborate_body#" &
201      "export#" &
202      "export_exception#" &
203      "export_function#" &
204      "export_object#" &
205      "export_procedure#" &
206      "export_valued_procedure#" &
207      "external#" &
208      "finalize_storage_only#" &
209      "ident#" &
210      "import#" &
211      "import_exception#" &
212      "import_function#" &
213      "import_object#" &
214      "import_procedure#" &
215      "import_valued_procedure#" &
216      "inline#" &
217      "inline_always#" &
218      "inline_generic#" &
219      "inspection_point#" &
220      "interface#" &
221      "interface_name#" &
222      "interrupt_handler#" &
223      "interrupt_priority#" &
224      "java_constructor#" &
225      "java_interface#" &
226      "link_with#" &
227      "linker_alias#" &
228      "linker_options#" &
229      "linker_section#" &
230      "list#" &
231      "machine_attribute#" &
232      "main#" &
233      "main_storage#" &
234      "memory_size#" &
235      "no_return#" &
236      "optimize#" &
237      "pack#" &
238      "page#" &
239      "passive#" &
240      "preelaborate#" &
241      "priority#" &
242      "psect_object#" &
243      "pure#" &
244      "pure_function#" &
245      "remote_call_interface#" &
246      "remote_types#" &
247      "share_generic#" &
248      "shared#" &
249      "shared_passive#" &
250      "source_reference#" &
251      "stream_convert#" &
252      "subtitle#" &
253      "suppress_all#" &
254      "suppress_debug_info#" &
255      "suppress_initialization#" &
256      "system_name#" &
257      "task_info#" &
258      "task_name#" &
259      "task_storage#" &
260      "time_slice#" &
261      "title#" &
262      "unchecked_union#" &
263      "unimplemented_unit#" &
264      "unreserve_all_interrupts#" &
265      "volatile#" &
266      "volatile_components#" &
267      "weak_external#" &
268      "ada#" &
269      "asm#" &
270      "assembler#" &
271      "cobol#" &
272      "cpp#" &
273      "dll#" &
274      "fortran#" &
275      "intrinsic#" &
276      "java#" &
277      "stdcall#" &
278      "stubbed#" &
279      "win32#" &
280      "as_is#" &
281      "body_file_name#" &
282      "casing#" &
283      "code#" &
284      "component#" &
285      "component_size_4#" &
286      "copy#" &
287      "d_float#" &
288      "descriptor#" &
289      "default#" &
290      "dot_replacement#" &
291      "dynamic#" &
292      "entity#" &
293      "external_name#" &
294      "first_optional_parameter#" &
295      "form#" &
296      "g_float#" &
297      "gcc#" &
298      "gnat#" &
299      "gpl#" &
300      "ieee_float#" &
301      "internal#" &
302      "link_name#" &
303      "lowercase#" &
304      "max_size#" &
305      "mechanism#" &
306      "mixedcase#" &
307      "modified_gpl#" &
308      "name#" &
309      "nca#" &
310      "no#" &
311      "on#" &
312      "parameter_types#" &
313      "reference#" &
314      "restricted#" &
315      "result_mechanism#" &
316      "result_type#" &
317      "sb#" &
318      "section#" &
319      "semaphore#" &
320      "spec_file_name#" &
321      "static#" &
322      "stack_size#" &
323      "subunit_file_name#" &
324      "task_stack_size_default#" &
325      "task_type#" &
326      "time_slicing_enabled#" &
327      "top_guard#" &
328      "uba#" &
329      "ubs#" &
330      "ubsb#" &
331      "unit_name#" &
332      "unknown#" &
333      "unrestricted#" &
334      "uppercase#" &
335      "vax_float#" &
336      "vms#" &
337      "working_storage#" &
338      "abort_signal#" &
339      "access#" &
340      "address#" &
341      "address_size#" &
342      "aft#" &
343      "alignment#" &
344      "asm_input#" &
345      "asm_output#" &
346      "ast_entry#" &
347      "bit#" &
348      "bit_order#" &
349      "bit_position#" &
350      "body_version#" &
351      "callable#" &
352      "caller#" &
353      "code_address#" &
354      "component_size#" &
355      "compose#" &
356      "constrained#" &
357      "count#" &
358      "default_bit_order#" &
359      "definite#" &
360      "delta#" &
361      "denorm#" &
362      "digits#" &
363      "elaborated#" &
364      "emax#" &
365      "enum_rep#" &
366      "epsilon#" &
367      "exponent#" &
368      "external_tag#" &
369      "first#" &
370      "first_bit#" &
371      "fixed_value#" &
372      "fore#" &
373      "has_discriminants#" &
374      "identity#" &
375      "img#" &
376      "integer_value#" &
377      "large#" &
378      "last#" &
379      "last_bit#" &
380      "leading_part#" &
381      "length#" &
382      "machine_emax#" &
383      "machine_emin#" &
384      "machine_mantissa#" &
385      "machine_overflows#" &
386      "machine_radix#" &
387      "machine_rounds#" &
388      "machine_size#" &
389      "mantissa#" &
390      "max_interrupt_priority#" &
391      "max_priority#" &
392      "max_size_in_storage_elements#" &
393      "maximum_alignment#" &
394      "mechanism_code#" &
395      "model_emin#" &
396      "model_epsilon#" &
397      "model_mantissa#" &
398      "model_small#" &
399      "modulus#" &
400      "null_parameter#" &
401      "object_size#" &
402      "partition_id#" &
403      "passed_by_reference#" &
404      "pos#" &
405      "position#" &
406      "range#" &
407      "range_length#" &
408      "round#" &
409      "safe_emax#" &
410      "safe_first#" &
411      "safe_large#" &
412      "safe_last#" &
413      "safe_small#" &
414      "scale#" &
415      "scaling#" &
416      "signed_zeros#" &
417      "size#" &
418      "small#" &
419      "storage_size#" &
420      "storage_unit#" &
421      "tag#" &
422      "terminated#" &
423      "tick#" &
424      "to_address#" &
425      "type_class#" &
426      "uet_address#" &
427      "unbiased_rounding#" &
428      "unchecked_access#" &
429      "universal_literal_string#" &
430      "unrestricted_access#" &
431      "vads_size#" &
432      "val#" &
433      "valid#" &
434      "value_size#" &
435      "version#" &
436      "wchar_t_size#" &
437      "wide_width#" &
438      "width#" &
439      "word_size#" &
440      "adjacent#" &
441      "ceiling#" &
442      "copy_sign#" &
443      "floor#" &
444      "fraction#" &
445      "image#" &
446      "input#" &
447      "machine#" &
448      "max#" &
449      "min#" &
450      "model#" &
451      "pred#" &
452      "remainder#" &
453      "rounding#" &
454      "succ#" &
455      "truncation#" &
456      "value#" &
457      "wide_image#" &
458      "wide_value#" &
459      "output#" &
460      "read#" &
461      "write#" &
462      "elab_body#" &
463      "elab_spec#" &
464      "storage_pool#" &
465      "base#" &
466      "class#" &
467      "ceiling_locking#" &
468      "inheritance_locking#" &
469      "fifo_queuing#" &
470      "priority_queuing#" &
471      "fifo_within_priorities#" &
472      "access_check#" &
473      "accessibility_check#" &
474      "discriminant_check#" &
475      "division_check#" &
476      "elaboration_check#" &
477      "index_check#" &
478      "length_check#" &
479      "overflow_check#" &
480      "range_check#" &
481      "storage_check#" &
482      "tag_check#" &
483      "all_checks#" &
484      "abort#" &
485      "abs#" &
486      "accept#" &
487      "and#" &
488      "all#" &
489      "array#" &
490      "at#" &
491      "begin#" &
492      "body#" &
493      "case#" &
494      "constant#" &
495      "declare#" &
496      "delay#" &
497      "do#" &
498      "else#" &
499      "elsif#" &
500      "end#" &
501      "entry#" &
502      "exception#" &
503      "exit#" &
504      "for#" &
505      "function#" &
506      "generic#" &
507      "goto#" &
508      "if#" &
509      "in#" &
510      "is#" &
511      "limited#" &
512      "loop#" &
513      "mod#" &
514      "new#" &
515      "not#" &
516      "null#" &
517      "of#" &
518      "or#" &
519      "others#" &
520      "out#" &
521      "package#" &
522      "pragma#" &
523      "private#" &
524      "procedure#" &
525      "raise#" &
526      "record#" &
527      "rem#" &
528      "renames#" &
529      "return#" &
530      "reverse#" &
531      "select#" &
532      "separate#" &
533      "subtype#" &
534      "task#" &
535      "terminate#" &
536      "then#" &
537      "type#" &
538      "use#" &
539      "when#" &
540      "while#" &
541      "with#" &
542      "xor#" &
543      "divide#" &
544      "enclosing_entity#" &
545      "exception_information#" &
546      "exception_message#" &
547      "exception_name#" &
548      "file#" &
549      "import_address#" &
550      "import_largest_value#" &
551      "import_value#" &
552      "is_negative#" &
553      "line#" &
554      "rotate_left#" &
555      "rotate_right#" &
556      "shift_left#" &
557      "shift_right#" &
558      "shift_right_arithmetic#" &
559      "source_location#" &
560      "unchecked_conversion#" &
561      "unchecked_deallocation#" &
562      "abstract#" &
563      "aliased#" &
564      "protected#" &
565      "until#" &
566      "requeue#" &
567      "tagged#" &
568      "raise_exception#" &
569      "binder#" &
570      "builder#" &
571      "compiler#" &
572      "cross_reference#" &
573      "default_switches#" &
574      "exec_dir#" &
575      "extends#" &
576      "finder#" &
577      "gnatls#" &
578      "gnatstub#" &
579      "implementation#" &
580      "implementation_exceptions#" &
581      "implementation_suffix#" &
582      "languages#" &
583      "library_dir#" &
584      "library_elaboration#" &
585      "library_kind#" &
586      "library_name#" &
587      "library_version#" &
588      "linker#" &
589      "naming#" &
590      "object_dir#" &
591      "project#" &
592      "separate_suffix#" &
593      "source_dirs#" &
594      "source_files#" &
595      "source_list_file#" &
596      "specification#" &
597      "specification_exceptions#" &
598      "specification_suffix#" &
599      "switches#" &
600       "#";
601
602    ---------------------
603    -- Generated Names --
604    ---------------------
605
606    --  This section lists the various cases of generated names which are
607    --  built from existing names by adding unique leading and/or trailing
608    --  upper case letters. In some cases these names are built recursively,
609    --  in particular names built from types may be built from types which
610    --  themselves have generated names. In this list, xxx represents an
611    --  existing name to which identifying letters are prepended or appended,
612    --  and a trailing n represents a serial number in an external name that
613    --  has some semantic significance (e.g. the n'th index type of an array).
614
615    --    xxxA    access type for formal xxx in entry param record   (Exp_Ch9)
616    --    xxxB    tag table for tagged type xxx                      (Exp_Ch3)
617    --    xxxB    task body procedure for task xxx                   (Exp_Ch9)
618    --    xxxD    dispatch table for tagged type xxx                 (Exp_Ch3)
619    --    xxxD    discriminal for discriminant xxx                   (Sem_Ch3)
620    --    xxxDn   n'th discr check function for rec type xxx         (Exp_Ch3)
621    --    xxxE    elaboration boolean flag for task xxx              (Exp_Ch9)
622    --    xxxE    dispatch table pointer type for tagged type xxx    (Exp_Ch3)
623    --    xxxE    parameters for accept body for entry xxx           (Exp_Ch9)
624    --    xxxFn   n'th primitive of a tagged type (named xxx)        (Exp_Ch3)
625    --    xxxI    initialization procedure for type xxx              (Exp_Ch3)
626    --    xxxJ    tag table type index for tagged type xxx           (Exp_Ch3)
627    --    xxxM    master Id value for access type xxx                (Exp_Ch3)
628    --    xxxP    tag table pointer type for tagged type xxx         (Exp_Ch3)
629    --    xxxP    parameter record type for entry xxx                (Exp_Ch9)
630    --    xxxPA   access to parameter record type for entry xxx      (Exp_Ch9)
631    --    xxxPn   pointer type for n'th primitive of tagged type xxx (Exp_Ch3)
632    --    xxxR    dispatch table pointer for tagged type xxx         (Exp_Ch3)
633    --    xxxT    tag table type for tagged type xxx                 (Exp_Ch3)
634    --    xxxT    literal table for enumeration type xxx             (Sem_Ch3)
635    --    xxxV    type for task value record for task xxx            (Exp_Ch9)
636    --    xxxX    entry index constant                               (Exp_Ch9)
637    --    xxxY    dispatch table type for tagged type xxx            (Exp_Ch3)
638    --    xxxZ    size variable for task xxx                         (Exp_Ch9)
639
640    --  Implicit type names
641
642    --    TxxxT   type of literal table for enumeration type xxx     (Sem_Ch3)
643
644    --  (list not yet complete ???)
645
646    ----------------------
647    -- Get_Attribute_Id --
648    ----------------------
649
650    function Get_Attribute_Id (N : Name_Id) return Attribute_Id is
651    begin
652       return Attribute_Id'Val (N - First_Attribute_Name);
653    end Get_Attribute_Id;
654
655    ------------------
656    -- Get_Check_Id --
657    ------------------
658
659    function Get_Check_Id (N : Name_Id) return Check_Id is
660    begin
661       return Check_Id'Val (N - First_Check_Name);
662    end Get_Check_Id;
663
664    -----------------------
665    -- Get_Convention_Id --
666    -----------------------
667
668    function Get_Convention_Id (N : Name_Id) return Convention_Id is
669    begin
670       case N is
671          when Name_Ada        => return Convention_Ada;
672          when Name_Asm        => return Convention_Assembler;
673          when Name_Assembler  => return Convention_Assembler;
674          when Name_C          => return Convention_C;
675          when Name_COBOL      => return Convention_COBOL;
676          when Name_CPP        => return Convention_CPP;
677          when Name_DLL        => return Convention_Stdcall;
678          when Name_Fortran    => return Convention_Fortran;
679          when Name_Intrinsic  => return Convention_Intrinsic;
680          when Name_Java       => return Convention_Java;
681          when Name_Stdcall    => return Convention_Stdcall;
682          when Name_Stubbed    => return Convention_Stubbed;
683          when Name_Win32      => return Convention_Stdcall;
684          when others          =>
685             raise Program_Error;
686       end case;
687    end Get_Convention_Id;
688
689    ---------------------------
690    -- Get_Locking_Policy_Id --
691    ---------------------------
692
693    function Get_Locking_Policy_Id (N : Name_Id) return Locking_Policy_Id is
694    begin
695       return Locking_Policy_Id'Val (N - First_Locking_Policy_Name);
696    end Get_Locking_Policy_Id;
697
698    -------------------
699    -- Get_Pragma_Id --
700    -------------------
701
702    function Get_Pragma_Id (N : Name_Id) return Pragma_Id is
703    begin
704       if N = Name_AST_Entry then
705          return Pragma_AST_Entry;
706       elsif N = Name_Storage_Size then
707          return Pragma_Storage_Size;
708       elsif N = Name_Storage_Unit then
709          return Pragma_Storage_Unit;
710       else
711          return Pragma_Id'Val (N - First_Pragma_Name);
712       end if;
713    end Get_Pragma_Id;
714
715    ---------------------------
716    -- Get_Queuing_Policy_Id --
717    ---------------------------
718
719    function Get_Queuing_Policy_Id (N : Name_Id) return Queuing_Policy_Id is
720    begin
721       return Queuing_Policy_Id'Val (N - First_Queuing_Policy_Name);
722    end Get_Queuing_Policy_Id;
723
724    ------------------------------------
725    -- Get_Task_Dispatching_Policy_Id --
726    ------------------------------------
727
728    function Get_Task_Dispatching_Policy_Id (N : Name_Id)
729      return Task_Dispatching_Policy_Id is
730    begin
731       return Task_Dispatching_Policy_Id'Val
732         (N - First_Task_Dispatching_Policy_Name);
733    end Get_Task_Dispatching_Policy_Id;
734
735    ----------------
736    -- Initialize --
737    ----------------
738
739    procedure Initialize is
740       P_Index      : Natural;
741       Discard_Name : Name_Id;
742
743    begin
744       P_Index := Preset_Names'First;
745
746       loop
747          Name_Len := 0;
748
749          while Preset_Names (P_Index) /= '#' loop
750             Name_Len := Name_Len + 1;
751             Name_Buffer (Name_Len) := Preset_Names (P_Index);
752             P_Index := P_Index + 1;
753          end loop;
754
755          --  We do the Name_Find call to enter the name into the table, but
756          --  we don't need to do anything with the result, since we already
757          --  initialized all the preset names to have the right value (we
758          --  are depending on the order of the names and Preset_Names).
759
760          Discard_Name := Name_Find;
761          P_Index := P_Index + 1;
762          exit when Preset_Names (P_Index) = '#';
763       end loop;
764
765       --  Make sure that number of names in standard table is correct. If
766       --  this check fails, run utility program XSNAMES to construct a new
767       --  properly matching version of the body.
768
769       pragma Assert (Discard_Name = Last_Predefined_Name);
770    end Initialize;
771
772    -----------------------
773    -- Is_Attribute_Name --
774    -----------------------
775
776    function Is_Attribute_Name (N : Name_Id) return Boolean is
777    begin
778       return N in First_Attribute_Name .. Last_Attribute_Name;
779    end Is_Attribute_Name;
780
781    -------------------
782    -- Is_Check_Name --
783    -------------------
784
785    function Is_Check_Name (N : Name_Id) return Boolean is
786    begin
787       return N in First_Check_Name .. Last_Check_Name;
788    end Is_Check_Name;
789
790    ------------------------
791    -- Is_Convention_Name --
792    ------------------------
793
794    function Is_Convention_Name (N : Name_Id) return Boolean is
795    begin
796       return N in First_Convention_Name .. Last_Convention_Name
797         or else N = Name_C;
798    end Is_Convention_Name;
799
800    ------------------------------
801    -- Is_Entity_Attribute_Name --
802    ------------------------------
803
804    function Is_Entity_Attribute_Name (N : Name_Id) return Boolean is
805    begin
806       return N in First_Entity_Attribute_Name .. Last_Entity_Attribute_Name;
807    end Is_Entity_Attribute_Name;
808
809    --------------------------------
810    -- Is_Function_Attribute_Name --
811    --------------------------------
812
813    function Is_Function_Attribute_Name (N : Name_Id) return Boolean is
814    begin
815       return N in
816         First_Renamable_Function_Attribute ..
817           Last_Renamable_Function_Attribute;
818    end Is_Function_Attribute_Name;
819
820    ----------------------------
821    -- Is_Locking_Policy_Name --
822    ----------------------------
823
824    function Is_Locking_Policy_Name (N : Name_Id) return Boolean is
825    begin
826       return N in First_Locking_Policy_Name .. Last_Locking_Policy_Name;
827    end Is_Locking_Policy_Name;
828
829    -----------------------------
830    -- Is_Operator_Symbol_Name --
831    -----------------------------
832
833    function Is_Operator_Symbol_Name (N : Name_Id) return Boolean is
834    begin
835       return N in First_Operator_Name .. Last_Operator_Name;
836    end Is_Operator_Symbol_Name;
837
838    --------------------
839    -- Is_Pragma_Name --
840    --------------------
841
842    function Is_Pragma_Name (N : Name_Id) return Boolean is
843    begin
844       return N in First_Pragma_Name .. Last_Pragma_Name
845         or else N = Name_AST_Entry
846         or else N = Name_Storage_Size
847         or else N = Name_Storage_Unit;
848    end Is_Pragma_Name;
849
850    ---------------------------------
851    -- Is_Procedure_Attribute_Name --
852    ---------------------------------
853
854    function Is_Procedure_Attribute_Name (N : Name_Id) return Boolean is
855    begin
856       return N in First_Procedure_Attribute .. Last_Procedure_Attribute;
857    end Is_Procedure_Attribute_Name;
858
859    ----------------------------
860    -- Is_Queuing_Policy_Name --
861    ----------------------------
862
863    function Is_Queuing_Policy_Name (N : Name_Id) return Boolean is
864    begin
865       return N in First_Queuing_Policy_Name .. Last_Queuing_Policy_Name;
866    end Is_Queuing_Policy_Name;
867
868    -------------------------------------
869    -- Is_Task_Dispatching_Policy_Name --
870    -------------------------------------
871
872    function Is_Task_Dispatching_Policy_Name (N : Name_Id) return Boolean is
873    begin
874       return N in First_Task_Dispatching_Policy_Name ..
875                   Last_Task_Dispatching_Policy_Name;
876    end Is_Task_Dispatching_Policy_Name;
877
878    ----------------------------
879    -- Is_Type_Attribute_Name --
880    ----------------------------
881
882    function Is_Type_Attribute_Name (N : Name_Id) return Boolean is
883    begin
884       return N in First_Type_Attribute_Name .. Last_Type_Attribute_Name;
885    end Is_Type_Attribute_Name;
886
887 end Snames;