OSDN Git Service

* sem_prag.adb: Add processing for pragma External.
[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      "project#" &
570      "modifying#" &
571      "naming#" &
572      "object_dir#" &
573      "source_dirs#" &
574      "specification#" &
575      "body_part#" &
576      "specification_append#" &
577      "body_append#" &
578      "separate_append#" &
579      "source_files#" &
580      "source_list_file#" &
581      "switches#" &
582      "library_dir#" &
583      "library_name#" &
584      "library_kind#" &
585      "library_version#" &
586      "library_elaboration#" &
587      "gnatmake#" &
588      "gnatls#" &
589      "gnatxref#" &
590      "gnatfind#" &
591      "gnatbind#" &
592      "gnatlink#" &
593      "compiler#" &
594      "binder#" &
595      "linker#" &
596       "#";
597
598    ---------------------
599    -- Generated Names --
600    ---------------------
601
602    --  This section lists the various cases of generated names which are
603    --  built from existing names by adding unique leading and/or trailing
604    --  upper case letters. In some cases these names are built recursively,
605    --  in particular names built from types may be built from types which
606    --  themselves have generated names. In this list, xxx represents an
607    --  existing name to which identifying letters are prepended or appended,
608    --  and a trailing n represents a serial number in an external name that
609    --  has some semantic significance (e.g. the n'th index type of an array).
610
611    --    xxxA    access type for formal xxx in entry param record   (Exp_Ch9)
612    --    xxxB    tag table for tagged type xxx                      (Exp_Ch3)
613    --    xxxB    task body procedure for task xxx                   (Exp_Ch9)
614    --    xxxD    dispatch table for tagged type xxx                 (Exp_Ch3)
615    --    xxxD    discriminal for discriminant xxx                   (Sem_Ch3)
616    --    xxxDn   n'th discr check function for rec type xxx         (Exp_Ch3)
617    --    xxxE    elaboration boolean flag for task xxx              (Exp_Ch9)
618    --    xxxE    dispatch table pointer type for tagged type xxx    (Exp_Ch3)
619    --    xxxE    parameters for accept body for entry xxx           (Exp_Ch9)
620    --    xxxFn   n'th primitive of a tagged type (named xxx)        (Exp_Ch3)
621    --    xxxI    initialization procedure for type xxx              (Exp_Ch3)
622    --    xxxJ    tag table type index for tagged type xxx           (Exp_Ch3)
623    --    xxxM    master Id value for access type xxx                (Exp_Ch3)
624    --    xxxP    tag table pointer type for tagged type xxx         (Exp_Ch3)
625    --    xxxP    parameter record type for entry xxx                (Exp_Ch9)
626    --    xxxPA   access to parameter record type for entry xxx      (Exp_Ch9)
627    --    xxxPn   pointer type for n'th primitive of tagged type xxx (Exp_Ch3)
628    --    xxxR    dispatch table pointer for tagged type xxx         (Exp_Ch3)
629    --    xxxT    tag table type for tagged type xxx                 (Exp_Ch3)
630    --    xxxT    literal table for enumeration type xxx             (Sem_Ch3)
631    --    xxxV    type for task value record for task xxx            (Exp_Ch9)
632    --    xxxX    entry index constant                               (Exp_Ch9)
633    --    xxxY    dispatch table type for tagged type xxx            (Exp_Ch3)
634    --    xxxZ    size variable for task xxx                         (Exp_Ch9)
635
636    --  Implicit type names
637
638    --    TxxxT   type of literal table for enumeration type xxx     (Sem_Ch3)
639
640    --  (list not yet complete ???)
641
642    ----------------------
643    -- Get_Attribute_Id --
644    ----------------------
645
646    function Get_Attribute_Id (N : Name_Id) return Attribute_Id is
647    begin
648       return Attribute_Id'Val (N - First_Attribute_Name);
649    end Get_Attribute_Id;
650
651    ------------------
652    -- Get_Check_Id --
653    ------------------
654
655    function Get_Check_Id (N : Name_Id) return Check_Id is
656    begin
657       return Check_Id'Val (N - First_Check_Name);
658    end Get_Check_Id;
659
660    -----------------------
661    -- Get_Convention_Id --
662    -----------------------
663
664    function Get_Convention_Id (N : Name_Id) return Convention_Id is
665    begin
666       case N is
667          when Name_Ada        => return Convention_Ada;
668          when Name_Asm        => return Convention_Assembler;
669          when Name_Assembler  => return Convention_Assembler;
670          when Name_C          => return Convention_C;
671          when Name_COBOL      => return Convention_COBOL;
672          when Name_CPP        => return Convention_CPP;
673          when Name_DLL        => return Convention_Stdcall;
674          when Name_Fortran    => return Convention_Fortran;
675          when Name_Intrinsic  => return Convention_Intrinsic;
676          when Name_Java       => return Convention_Java;
677          when Name_Stdcall    => return Convention_Stdcall;
678          when Name_Stubbed    => return Convention_Stubbed;
679          when Name_Win32      => return Convention_Stdcall;
680          when others          =>
681             raise Program_Error;
682       end case;
683    end Get_Convention_Id;
684
685    ---------------------------
686    -- Get_Locking_Policy_Id --
687    ---------------------------
688
689    function Get_Locking_Policy_Id (N : Name_Id) return Locking_Policy_Id is
690    begin
691       return Locking_Policy_Id'Val (N - First_Locking_Policy_Name);
692    end Get_Locking_Policy_Id;
693
694    -------------------
695    -- Get_Pragma_Id --
696    -------------------
697
698    function Get_Pragma_Id (N : Name_Id) return Pragma_Id is
699    begin
700       if N = Name_AST_Entry then
701          return Pragma_AST_Entry;
702       elsif N = Name_Storage_Size then
703          return Pragma_Storage_Size;
704       elsif N = Name_Storage_Unit then
705          return Pragma_Storage_Unit;
706       else
707          return Pragma_Id'Val (N - First_Pragma_Name);
708       end if;
709    end Get_Pragma_Id;
710
711    ---------------------------
712    -- Get_Queuing_Policy_Id --
713    ---------------------------
714
715    function Get_Queuing_Policy_Id (N : Name_Id) return Queuing_Policy_Id is
716    begin
717       return Queuing_Policy_Id'Val (N - First_Queuing_Policy_Name);
718    end Get_Queuing_Policy_Id;
719
720    ------------------------------------
721    -- Get_Task_Dispatching_Policy_Id --
722    ------------------------------------
723
724    function Get_Task_Dispatching_Policy_Id (N : Name_Id)
725      return Task_Dispatching_Policy_Id is
726    begin
727       return Task_Dispatching_Policy_Id'Val
728         (N - First_Task_Dispatching_Policy_Name);
729    end Get_Task_Dispatching_Policy_Id;
730
731    ----------------
732    -- Initialize --
733    ----------------
734
735    procedure Initialize is
736       P_Index      : Natural;
737       Discard_Name : Name_Id;
738
739    begin
740       P_Index := Preset_Names'First;
741
742       loop
743          Name_Len := 0;
744
745          while Preset_Names (P_Index) /= '#' loop
746             Name_Len := Name_Len + 1;
747             Name_Buffer (Name_Len) := Preset_Names (P_Index);
748             P_Index := P_Index + 1;
749          end loop;
750
751          --  We do the Name_Find call to enter the name into the table, but
752          --  we don't need to do anything with the result, since we already
753          --  initialized all the preset names to have the right value (we
754          --  are depending on the order of the names and Preset_Names).
755
756          Discard_Name := Name_Find;
757          P_Index := P_Index + 1;
758          exit when Preset_Names (P_Index) = '#';
759       end loop;
760
761       --  Make sure that number of names in standard table is correct. If
762       --  this check fails, run utility program XSNAMES to construct a new
763       --  properly matching version of the body.
764
765       pragma Assert (Discard_Name = Last_Predefined_Name);
766    end Initialize;
767
768    -----------------------
769    -- Is_Attribute_Name --
770    -----------------------
771
772    function Is_Attribute_Name (N : Name_Id) return Boolean is
773    begin
774       return N in First_Attribute_Name .. Last_Attribute_Name;
775    end Is_Attribute_Name;
776
777    -------------------
778    -- Is_Check_Name --
779    -------------------
780
781    function Is_Check_Name (N : Name_Id) return Boolean is
782    begin
783       return N in First_Check_Name .. Last_Check_Name;
784    end Is_Check_Name;
785
786    ------------------------
787    -- Is_Convention_Name --
788    ------------------------
789
790    function Is_Convention_Name (N : Name_Id) return Boolean is
791    begin
792       return N in First_Convention_Name .. Last_Convention_Name
793         or else N = Name_C;
794    end Is_Convention_Name;
795
796    ------------------------------
797    -- Is_Entity_Attribute_Name --
798    ------------------------------
799
800    function Is_Entity_Attribute_Name (N : Name_Id) return Boolean is
801    begin
802       return N in First_Entity_Attribute_Name .. Last_Entity_Attribute_Name;
803    end Is_Entity_Attribute_Name;
804
805    --------------------------------
806    -- Is_Function_Attribute_Name --
807    --------------------------------
808
809    function Is_Function_Attribute_Name (N : Name_Id) return Boolean is
810    begin
811       return N in
812         First_Renamable_Function_Attribute ..
813           Last_Renamable_Function_Attribute;
814    end Is_Function_Attribute_Name;
815
816    ----------------------------
817    -- Is_Locking_Policy_Name --
818    ----------------------------
819
820    function Is_Locking_Policy_Name (N : Name_Id) return Boolean is
821    begin
822       return N in First_Locking_Policy_Name .. Last_Locking_Policy_Name;
823    end Is_Locking_Policy_Name;
824
825    -----------------------------
826    -- Is_Operator_Symbol_Name --
827    -----------------------------
828
829    function Is_Operator_Symbol_Name (N : Name_Id) return Boolean is
830    begin
831       return N in First_Operator_Name .. Last_Operator_Name;
832    end Is_Operator_Symbol_Name;
833
834    --------------------
835    -- Is_Pragma_Name --
836    --------------------
837
838    function Is_Pragma_Name (N : Name_Id) return Boolean is
839    begin
840       return N in First_Pragma_Name .. Last_Pragma_Name
841         or else N = Name_AST_Entry
842         or else N = Name_Storage_Size
843         or else N = Name_Storage_Unit;
844    end Is_Pragma_Name;
845
846    ---------------------------------
847    -- Is_Procedure_Attribute_Name --
848    ---------------------------------
849
850    function Is_Procedure_Attribute_Name (N : Name_Id) return Boolean is
851    begin
852       return N in First_Procedure_Attribute .. Last_Procedure_Attribute;
853    end Is_Procedure_Attribute_Name;
854
855    ----------------------------
856    -- Is_Queuing_Policy_Name --
857    ----------------------------
858
859    function Is_Queuing_Policy_Name (N : Name_Id) return Boolean is
860    begin
861       return N in First_Queuing_Policy_Name .. Last_Queuing_Policy_Name;
862    end Is_Queuing_Policy_Name;
863
864    -------------------------------------
865    -- Is_Task_Dispatching_Policy_Name --
866    -------------------------------------
867
868    function Is_Task_Dispatching_Policy_Name (N : Name_Id) return Boolean is
869    begin
870       return N in First_Task_Dispatching_Policy_Name ..
871                   Last_Task_Dispatching_Policy_Name;
872    end Is_Task_Dispatching_Policy_Name;
873
874    ----------------------------
875    -- Is_Type_Attribute_Name --
876    ----------------------------
877
878    function Is_Type_Attribute_Name (N : Name_Id) return Boolean is
879    begin
880       return N in First_Type_Attribute_Name .. Last_Type_Attribute_Name;
881    end Is_Type_Attribute_Name;
882
883 end Snames;