OSDN Git Service

2007-04-20 Robert Dewar <dewar@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / snames.adb
index b8c20bb..9981725 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2004, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -16,8 +16,8 @@
 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
 -- for  more details.  You should have  received  a copy of the GNU General --
 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
--- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
--- MA 02111-1307, USA.                                                      --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
 --                                                                          --
 -- As a special exception,  if other files  instantiate  generics from this --
 -- unit, or you link  this unit with other files  to produce an executable, --
@@ -32,6 +32,7 @@
 ------------------------------------------------------------------------------
 
 with Namet; use Namet;
+with Opt;   use Opt;
 with Table;
 
 package body Snames is
@@ -65,6 +66,7 @@ package body Snames is
      "_abort_signal#" &
      "_alignment#" &
      "_assign#" &
+     "_atcb#" &
      "_chain#" &
      "_clean#" &
      "_controller#" &
@@ -81,12 +83,18 @@ package body Snames is
      "_secondary_stack#" &
      "_service#" &
      "_size#" &
+     "_stack#" &
      "_tags#" &
      "_task#" &
      "_task_id#" &
      "_task_info#" &
      "_task_name#" &
      "_trace_sp#" &
+     "_disp_asynchronous_select#" &
+     "_disp_conditional_select#" &
+     "_disp_get_prim_op_kind#" &
+     "_disp_timed_select#" &
+     "_disp_get_task_id#" &
      "initialize#" &
      "adjust#" &
      "finalize#" &
@@ -104,8 +112,6 @@ package body Snames is
      "float_io#" &
      "integer_io#" &
      "modular_io#" &
-     "a_textio#" &
-     "a_witeio#" &
      "const#" &
      "<error>#" &
      "go#" &
@@ -119,8 +125,9 @@ package body Snames is
      "system#" &
      "text_io#" &
      "wide_text_io#" &
+     "wide_wide_text_io#" &
      "no_dsa#" &
-     "glade_dsa#" &
+     "garlic_dsa#" &
      "polyorb_dsa#" &
      "addr#" &
      "async#" &
@@ -132,7 +139,7 @@ package body Snames is
      "partition#" &
      "partition_interface#" &
      "ras#" &
-     "call#" &
+     "_call#" &
      "rci_name#" &
      "receiver#" &
      "result#" &
@@ -145,6 +152,7 @@ package body Snames is
      "target#" &
      "req#" &
      "obj_typecode#" &
+     "stub#" &
      "Oabs#" &
      "Oand#" &
      "Omod#" &
@@ -167,10 +175,15 @@ package body Snames is
      "ada_83#" &
      "ada_95#" &
      "ada_05#" &
+     "ada_2005#" &
+     "assertion_policy#" &
      "c_pass_by_copy#" &
+     "compile_time_error#" &
      "compile_time_warning#" &
      "component_alignment#" &
      "convention_identifier#" &
+     "debug_policy#" &
+     "detect_blocking#" &
      "discard_names#" &
      "elaboration_checks#" &
      "eliminate#" &
@@ -188,9 +201,10 @@ package body Snames is
      "no_strict_aliasing#" &
      "normalize_scalars#" &
      "polling#" &
-     "persistent_data#" &
-     "persistent_object#" &
+     "persistent_bss#" &
+     "priority_specific_dispatching#" &
      "profile#" &
+     "profile_warnings#" &
      "propagate_exceptions#" &
      "queuing_policy#" &
      "ravenscar#" &
@@ -209,6 +223,7 @@ package body Snames is
      "use_vads_size#" &
      "validity_checks#" &
      "warnings#" &
+     "wide_character_encoding#" &
      "abort_defer#" &
      "all_calls_remote#" &
      "annotate#" &
@@ -219,6 +234,7 @@ package body Snames is
      "attach_handler#" &
      "comment#" &
      "common_object#" &
+     "complete_representation#" &
      "complex_representation#" &
      "controlled#" &
      "convention#" &
@@ -250,7 +266,6 @@ package body Snames is
      "inline_always#" &
      "inline_generic#" &
      "inspection_point#" &
-     "interface#" &
      "interface_name#" &
      "interrupt_handler#" &
      "interrupt_priority#" &
@@ -259,6 +274,8 @@ package body Snames is
      "keep_names#" &
      "link_with#" &
      "linker_alias#" &
+     "linker_constructor#" &
+     "linker_destructor#" &
      "linker_options#" &
      "linker_section#" &
      "list#" &
@@ -270,14 +287,15 @@ package body Snames is
      "obsolescent#" &
      "optimize#" &
      "optional_overriding#" &
-     "overriding#" &
      "pack#" &
      "page#" &
      "passive#" &
+     "preelaborable_initialization#" &
      "preelaborate#" &
-     "priority#" &
+     "preelaborate_05#" &
      "psect_object#" &
      "pure#" &
+     "pure_05#" &
      "pure_function#" &
      "remote_call_interface#" &
      "remote_types#" &
@@ -300,6 +318,7 @@ package body Snames is
      "unchecked_union#" &
      "unimplemented_unit#" &
      "unreferenced#" &
+     "unreferenced_objects#" &
      "unreserve_all_interrupts#" &
      "volatile#" &
      "volatile_components#" &
@@ -316,11 +335,14 @@ package body Snames is
      "asm#" &
      "assembly#" &
      "default#" &
+     "c_plus_plus#" &
      "dll#" &
      "win32#" &
      "as_is#" &
+     "attribute_name#" &
      "body_file_name#" &
      "boolean_entry_barriers#" &
+     "check#" &
      "casing#" &
      "code#" &
      "component#" &
@@ -331,6 +353,7 @@ package body Snames is
      "dot_replacement#" &
      "dynamic#" &
      "entity#" &
+     "entry_count#" &
      "external_name#" &
      "first_optional_parameter#" &
      "form#" &
@@ -339,6 +362,8 @@ package body Snames is
      "gnat#" &
      "gpl#" &
      "ieee_float#" &
+     "ignore#" &
+     "info#" &
      "internal#" &
      "link_name#" &
      "lowercase#" &
@@ -346,20 +371,22 @@ package body Snames is
      "max_entry_queue_length#" &
      "max_size#" &
      "mechanism#" &
+     "message#" &
      "mixedcase#" &
      "modified_gpl#" &
      "name#" &
      "nca#" &
      "no#" &
-     "on#" &
-     "parameter_types#" &
-     "reference#" &
+     "no_dependence#" &
      "no_dynamic_attachment#" &
      "no_dynamic_interrupts#" &
      "no_requeue#" &
      "no_requeue_statements#" &
      "no_task_attributes#" &
      "no_task_attributes_package#" &
+     "on#" &
+     "parameter_types#" &
+     "reference#" &
      "restricted#" &
      "result_mechanism#" &
      "result_type#" &
@@ -370,6 +397,7 @@ package body Snames is
      "semaphore#" &
      "simple_barriers#" &
      "spec_file_name#" &
+     "state#" &
      "static#" &
      "stack_size#" &
      "subunit_file_name#" &
@@ -387,6 +415,7 @@ package body Snames is
      "user#" &
      "vax_float#" &
      "vms#" &
+     "vtable_ptr#" &
      "working_storage#" &
      "abort_signal#" &
      "access#" &
@@ -423,6 +452,7 @@ package body Snames is
      "first_bit#" &
      "fixed_value#" &
      "fore#" &
+     "has_access_values#" &
      "has_discriminants#" &
      "identity#" &
      "img#" &
@@ -437,12 +467,14 @@ package body Snames is
      "machine_mantissa#" &
      "machine_overflows#" &
      "machine_radix#" &
+     "machine_rounding#" &
      "machine_rounds#" &
      "machine_size#" &
      "mantissa#" &
      "max_size_in_storage_elements#" &
      "maximum_alignment#" &
      "mechanism_code#" &
+     "mod#" &
      "model_emin#" &
      "model_epsilon#" &
      "model_mantissa#" &
@@ -455,6 +487,7 @@ package body Snames is
      "pool_address#" &
      "pos#" &
      "position#" &
+     "priority#" &
      "range#" &
      "range_length#" &
      "round#" &
@@ -470,6 +503,7 @@ package body Snames is
      "small#" &
      "storage_size#" &
      "storage_unit#" &
+     "stream_size#" &
      "tag#" &
      "target_name#" &
      "terminated#" &
@@ -487,6 +521,7 @@ package body Snames is
      "value_size#" &
      "version#" &
      "wchar_t_size#" &
+     "wide_wide_width#" &
      "wide_width#" &
      "width#" &
      "word_size#" &
@@ -508,7 +543,9 @@ package body Snames is
      "truncation#" &
      "value#" &
      "wide_image#" &
+     "wide_wide_image#" &
      "wide_value#" &
+     "wide_wide_value#" &
      "output#" &
      "read#" &
      "write#" &
@@ -517,13 +554,18 @@ package body Snames is
      "storage_pool#" &
      "base#" &
      "class#" &
+     "stub_type#" &
      "ceiling_locking#" &
      "inheritance_locking#" &
      "fifo_queuing#" &
      "priority_queuing#" &
+     "edf_across_priorities#" &
      "fifo_within_priorities#" &
+     "non_preemptive_within_priorities#" &
+     "round_robin_within_priorities#" &
      "access_check#" &
      "accessibility_check#" &
+     "alignment_check#" &
      "discriminant_check#" &
      "division_check#" &
      "elaboration_check#" &
@@ -533,6 +575,7 @@ package body Snames is
      "range_check#" &
      "storage_check#" &
      "tag_check#" &
+     "validity_check#" &
      "all_checks#" &
      "abort#" &
      "abs#" &
@@ -563,7 +606,6 @@ package body Snames is
      "is#" &
      "limited#" &
      "loop#" &
-     "mod#" &
      "new#" &
      "not#" &
      "null#" &
@@ -599,6 +641,7 @@ package body Snames is
      "exception_message#" &
      "exception_name#" &
      "file#" &
+     "generic_dispatching_constructor#" &
      "import_address#" &
      "import_largest_value#" &
      "import_value#" &
@@ -613,6 +656,7 @@ package body Snames is
      "unchecked_conversion#" &
      "unchecked_deallocation#" &
      "to_pointer#" &
+     "free#" &
      "abstract#" &
      "aliased#" &
      "protected#" &
@@ -620,44 +664,97 @@ package body Snames is
      "requeue#" &
      "tagged#" &
      "raise_exception#" &
+     "ada_roots#" &
+     "archive_builder#" &
+     "archive_indexer#" &
+     "archive_suffix#" &
      "binder#" &
+     "binder_driver#" &
      "body_suffix#" &
      "builder#" &
+     "builder_switches#" &
      "compiler#" &
+     "compiler_driver#" &
+     "compiler_kind#" &
+     "compiler_minimum_options#" &
+     "compiler_pic_option#" &
+     "compute_dependency#" &
+     "config_body_file_name#" &
+     "config_body_file_name_pattern#" &
+     "config_file_switches#" &
+     "config_file_unique#" &
+     "config_spec_file_name#" &
+     "config_spec_file_name_pattern#" &
      "cross_reference#" &
+     "default_builder_switches#" &
+     "default_global_compiler_switches#" &
+     "default_language#" &
+     "default_linker#" &
      "default_switches#" &
+     "dependency_file_kind#" &
+     "dependency_option#" &
      "exec_dir#" &
      "executable#" &
      "executable_suffix#" &
      "extends#" &
+     "externally_built#" &
      "finder#" &
+     "global_compiler_switches#" &
      "global_configuration_pragmas#" &
+     "global_config_file#" &
      "gnatls#" &
      "gnatstub#" &
      "implementation#" &
      "implementation_exceptions#" &
      "implementation_suffix#" &
+     "include_option#" &
+     "include_path#" &
+     "include_path_file#" &
+     "language_kind#" &
+     "language_processing#" &
      "languages#" &
-     "library_dir#" &
+     "library_ali_dir#" &
      "library_auto_init#" &
+     "library_auto_init_supported#" &
+     "library_builder#" &
+     "library_dir#" &
      "library_gcc#" &
      "library_interface#" &
      "library_kind#" &
      "library_name#" &
+     "library_major_minor_id_supported#" &
      "library_options#" &
      "library_reference_symbol_file#" &
      "library_src_dir#" &
+     "library_support#" &
      "library_symbol_file#" &
      "library_symbol_policy#" &
      "library_version#" &
+     "library_version_options#" &
      "linker#" &
+     "linker_executable_option#" &
+     "linker_lib_dir_option#" &
+     "linker_lib_name_option#" &
+     "local_config_file#" &
      "local_configuration_pragmas#" &
      "locally_removed_files#" &
+     "mapping_file_switches#" &
+     "mapping_spec_suffix#" &
+     "mapping_body_suffix#" &
      "metrics#" &
+     "minimum_binder_options#" &
      "naming#" &
+     "objects_path#" &
+     "objects_path_file#" &
      "object_dir#" &
      "pretty_printer#" &
      "project#" &
+     "roots#" &
+     "run_path_option#" &
+     "runtime_project#" &
+     "shared_library_minimum_options#" &
+     "shared_library_prefix#" &
+     "shared_library_suffix#" &
      "separate_suffix#" &
      "source_dirs#" &
      "source_files#" &
@@ -667,9 +764,15 @@ package body Snames is
      "specification#" &
      "specification_exceptions#" &
      "specification_suffix#" &
+     "stack#" &
      "switches#" &
+     "symbolic_link_supported#" &
+     "toolchain_version#" &
      "unaligned_valid#" &
-      "#";
+     "interface#" &
+     "overriding#" &
+     "synchronized#" &
+     "#";
 
    ---------------------
    -- Generated Names --
@@ -714,15 +817,18 @@ package body Snames is
    --    xxxDF   deep finalize routine for type xxx                 (Exp_TSS)
    --    xxxDI   deep initialize routine for type xxx               (Exp_TSS)
    --    xxxEQ   composite equality routine for record type xxx     (Exp_TSS)
+   --    xxxFA   PolyORB/DSA From_Any converter for type xxx        (Exp_TSS)
    --    xxxIP   initialization procedure for type xxx              (Exp_TSS)
-   --    xxxRA   RAs type access routine for type xxx               (Exp_TSS)
-   --    xxxRD   RAs type dereference routine for type xxx          (Exp_TSS)
+   --    xxxRA   RAS type access routine for type xxx               (Exp_TSS)
+   --    xxxRD   RAS type dereference routine for type xxx          (Exp_TSS)
    --    xxxRP   Rep to Pos conversion for enumeration type xxx     (Exp_TSS)
    --    xxxSA   array/slice assignment for controlled comp. arrays (Exp_TSS)
    --    xxxSI   stream input attribute subprogram for type xxx     (Exp_TSS)
    --    xxxSO   stream output attribute subprogram for type xxx    (Exp_TSS)
    --    xxxSR   stream read attribute subprogram for type xxx      (Exp_TSS)
    --    xxxSW   stream write attribute subprogram for type xxx     (Exp_TSS)
+   --    xxxTA   PolyORB/DSA To_Any converter for type xxx          (Exp_TSS)
+   --    xxxTC   PolyORB/DSA Typecode for type xxx                  (Exp_TSS)
 
    --  Implicit type names
 
@@ -780,6 +886,28 @@ package body Snames is
       end case;
    end Get_Convention_Id;
 
+   -------------------------
+   -- Get_Convention_Name --
+   -------------------------
+
+   function Get_Convention_Name (C : Convention_Id) return Name_Id is
+   begin
+      case C is
+         when Convention_Ada       => return Name_Ada;
+         when Convention_Assembler => return Name_Assembler;
+         when Convention_C         => return Name_C;
+         when Convention_COBOL     => return Name_COBOL;
+         when Convention_CPP       => return Name_CPP;
+         when Convention_Entry     => return Name_Entry;
+         when Convention_Fortran   => return Name_Fortran;
+         when Convention_Intrinsic => return Name_Intrinsic;
+         when Convention_Java      => return Name_Java;
+         when Convention_Protected => return Name_Protected;
+         when Convention_Stdcall   => return Name_Stdcall;
+         when Convention_Stubbed   => return Name_Stubbed;
+      end case;
+   end Get_Convention_Name;
+
    ---------------------------
    -- Get_Locking_Policy_Id --
    ---------------------------
@@ -797,6 +925,10 @@ package body Snames is
    begin
       if N = Name_AST_Entry then
          return Pragma_AST_Entry;
+      elsif N = Name_Interface then
+         return Pragma_Interface;
+      elsif N = Name_Priority then
+         return Pragma_Priority;
       elsif N = Name_Storage_Size then
          return Pragma_Storage_Size;
       elsif N = Name_Storage_Unit then
@@ -869,14 +1001,16 @@ package body Snames is
 
       Convention_Identifiers.Init;
 
-      Convention_Identifiers.Append ((Name_Asm,      Convention_Assembler));
-      Convention_Identifiers.Append ((Name_Assembly, Convention_Assembler));
+      Convention_Identifiers.Append ((Name_Asm,         Convention_Assembler));
+      Convention_Identifiers.Append ((Name_Assembly,    Convention_Assembler));
 
-      Convention_Identifiers.Append ((Name_Default,  Convention_C));
-      Convention_Identifiers.Append ((Name_External, Convention_C));
+      Convention_Identifiers.Append ((Name_Default,     Convention_C));
+      Convention_Identifiers.Append ((Name_External,    Convention_C));
 
-      Convention_Identifiers.Append ((Name_DLL,      Convention_Stdcall));
-      Convention_Identifiers.Append ((Name_Win32,    Convention_Stdcall));
+      Convention_Identifiers.Append ((Name_C_Plus_Plus, Convention_CPP));
+
+      Convention_Identifiers.Append ((Name_DLL,         Convention_Stdcall));
+      Convention_Identifiers.Append ((Name_Win32,       Convention_Stdcall));
    end Initialize;
 
    -----------------------
@@ -943,6 +1077,19 @@ package body Snames is
           Last_Renamable_Function_Attribute;
    end Is_Function_Attribute_Name;
 
+   ---------------------
+   -- Is_Keyword_Name --
+   ---------------------
+
+   function Is_Keyword_Name (N : Name_Id) return Boolean is
+   begin
+      return Get_Name_Table_Byte (N) /= 0
+        and then (Ada_Version >= Ada_95
+                  or else N not in Ada_95_Reserved_Words)
+        and then (Ada_Version >= Ada_05
+                  or else N not in Ada_2005_Reserved_Words);
+   end Is_Keyword_Name;
+
    ----------------------------
    -- Is_Locking_Policy_Name --
    ----------------------------
@@ -969,6 +1116,8 @@ package body Snames is
    begin
       return N in First_Pragma_Name .. Last_Pragma_Name
         or else N = Name_AST_Entry
+        or else N = Name_Interface
+        or else N = Name_Priority
         or else N = Name_Storage_Size
         or else N = Name_Storage_Unit;
    end Is_Pragma_Name;