home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / adav313.zip / gnat-3_13p-os2-bin-20010916.zip / emx / gnatlib / a-swmwco.ads < prev    next >
Text File  |  2000-07-19  |  24KB  |  456 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT RUN-TIME COMPONENTS                         --
  4. --                                                                          --
  5. -- A D A . S T R I N G S . W I D E _ M A P S . W I D E _ C O N S T A N T S  --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.18 $                             --
  10. --                                                                          --
  11. --          Copyright (C) 1992-1998 Free Software Foundation, Inc.          --
  12. --                                                                          --
  13. -- This specification is derived from the Ada Reference Manual for use with --
  14. -- GNAT. The copyright notice above, and the license provisions that follow --
  15. -- apply solely to the  contents of the part following the private keyword. --
  16. --                                                                          --
  17. -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  18. -- terms of the  GNU General Public License as published  by the Free Soft- --
  19. -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
  20. -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
  21. -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  22. -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
  23. -- for  more details.  You should have  received  a copy of the GNU General --
  24. -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
  25. -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
  26. -- MA 02111-1307, USA.                                                      --
  27. --                                                                          --
  28. -- As a special exception,  if other files  instantiate  generics from this --
  29. -- unit, or you link  this unit with other files  to produce an executable, --
  30. -- this  unit  does not  by itself cause  the resulting  executable  to  be --
  31. -- covered  by the  GNU  General  Public  License.  This exception does not --
  32. -- however invalidate  any other reasons why  the executable file  might be --
  33. -- covered by the  GNU Public License.                                      --
  34. --                                                                          --
  35. -- GNAT was originally developed  by the GNAT team at  New York University. --
  36. -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
  37. --                                                                          --
  38. ------------------------------------------------------------------------------
  39.  
  40. with Ada.Characters.Wide_Latin_1;
  41.  
  42. package Ada.Strings.Wide_Maps.Wide_Constants is
  43. pragma Preelaborate (Wide_Constants);
  44.  
  45.    package W renames Ada.Characters.Wide_Latin_1;
  46.  
  47.    Control_Set           : constant Wide_Maps.Wide_Character_Set;
  48.    Graphic_Set           : constant Wide_Maps.Wide_Character_Set;
  49.    Letter_Set            : constant Wide_Maps.Wide_Character_Set;
  50.    Lower_Set             : constant Wide_Maps.Wide_Character_Set;
  51.    Upper_Set             : constant Wide_Maps.Wide_Character_Set;
  52.    Basic_Set             : constant Wide_Maps.Wide_Character_Set;
  53.    Decimal_Digit_Set     : constant Wide_Maps.Wide_Character_Set;
  54.    Hexadecimal_Digit_Set : constant Wide_Maps.Wide_Character_Set;
  55.    Alphanumeric_Set      : constant Wide_Maps.Wide_Character_Set;
  56.    Special_Graphic_Set   : constant Wide_Maps.Wide_Character_Set;
  57.    ISO_646_Set           : constant Wide_Maps.Wide_Character_Set;
  58.    Character_Set         : constant Wide_Maps.Wide_Character_Set;
  59.  
  60.    Lower_Case_Map        : constant Wide_Maps.Wide_Character_Mapping;
  61.    --  Maps to lower case for letters, else identity
  62.  
  63.    Upper_Case_Map        : constant Wide_Maps.Wide_Character_Mapping;
  64.    --  Maps to upper case for letters, else identity
  65.  
  66.    Basic_Map             : constant Wide_Maps.Wide_Character_Mapping;
  67.    --  Maps to basic letter for letters, else identity
  68.  
  69. private
  70.    subtype WC is Wide_Character;
  71.  
  72.    Control_Ranges           : aliased constant Wide_Character_Ranges :=
  73.      ((W.NUL, W.US),
  74.       (W.DEL, W.APC));
  75.  
  76.    Control_Set              : constant Wide_Character_Set :=
  77.                                 (AF.Controlled with
  78.                                  Control_Ranges'Unrestricted_Access);
  79.  
  80.    Graphic_Ranges           : aliased constant Wide_Character_Ranges :=
  81.      ((W.Space,       W.Tilde),
  82.       (WC'Val (256), WC'Last));
  83.  
  84.    Graphic_Set              : constant Wide_Character_Set :=
  85.                                 (AF.Controlled with
  86.                                  Graphic_Ranges'Unrestricted_Access);
  87.  
  88.    Letter_Ranges            : aliased constant Wide_Character_Ranges :=
  89.      ((W.'A',                 W.'Z'),
  90.       (W.LC_A,                W.LC_Z),
  91.       (W.UC_A_Grave,          W.UC_O_Diaeresis),
  92.       (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis),
  93.       (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis));
  94.  
  95.    Letter_Set               : constant Wide_Character_Set :=
  96.                                 (AF.Controlled with
  97.                                  Letter_Ranges'Unrestricted_Access);
  98.  
  99.    Lower_Ranges             : aliased constant Wide_Character_Ranges :=
  100.      (1 => (W.LC_A,                 W.LC_Z),
  101.       2 => (W.LC_German_Sharp_S,   W.LC_O_Diaeresis),
  102.       3 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis));
  103.  
  104.    Lower_Set                : constant Wide_Character_Set :=
  105.                                 (AF.Controlled with
  106.                                  Lower_Ranges'Unrestricted_Access);
  107.  
  108.    Upper_Ranges             : aliased constant Wide_Character_Ranges :=
  109.      (1 => (W.'A',                 W.'Z'),
  110.       2 => (W.UC_A_Grave,          W.UC_O_Diaeresis),
  111.       3 => (W.UC_O_Oblique_Stroke, W.UC_Icelandic_Thorn));
  112.  
  113.    Upper_Set                : constant Wide_Character_Set :=
  114.                                 (AF.Controlled with
  115.                                  Upper_Ranges'Unrestricted_Access);
  116.  
  117.    Basic_Ranges             : aliased constant Wide_Character_Ranges :=
  118.      (1 => (W.'A',                 W.'Z'),
  119.       2 => (W.LC_A,                W.LC_Z),
  120.       3 => (W.UC_AE_Diphthong,     W.UC_AE_Diphthong),
  121.       4 => (W.LC_AE_Diphthong,     W.LC_AE_Diphthong),
  122.       5 => (W.LC_German_Sharp_S,   W.LC_German_Sharp_S),
  123.       6 => (W.UC_Icelandic_Thorn,  W.UC_Icelandic_Thorn),
  124.       7 => (W.LC_Icelandic_Thorn,  W.LC_Icelandic_Thorn),
  125.       8 => (W.UC_Icelandic_Eth,    W.UC_Icelandic_Eth),
  126.       9 => (W.LC_Icelandic_Eth,    W.LC_Icelandic_Eth));
  127.  
  128.    Basic_Set                : constant Wide_Character_Set :=
  129.                                 (AF.Controlled with
  130.                                  Basic_Ranges'Unrestricted_Access);
  131.  
  132.    Decimal_Digit_Ranges     : aliased constant Wide_Character_Ranges :=
  133.      (1 => (W.'0', W.'9'));
  134.  
  135.    Decimal_Digit_Set        : constant Wide_Character_Set :=
  136.                                 (AF.Controlled with
  137.                                  Decimal_Digit_Ranges'Unrestricted_Access);
  138.  
  139.    Hexadecimal_Digit_Ranges : aliased constant Wide_Character_Ranges :=
  140.      (1 => (W.'0', W.'9'),
  141.       2 => (W.'A', W.'F'),
  142.       3 => (W.LC_A, W.LC_F));
  143.  
  144.    Hexadecimal_Digit_Set    : constant Wide_Character_Set :=
  145.                                 (AF.Controlled with
  146.                                  Hexadecimal_Digit_Ranges'Unrestricted_Access);
  147.  
  148.    Alphanumeric_Ranges      : aliased constant Wide_Character_Ranges :=
  149.      (1 => (W.'0',                 W.'9'),
  150.       2 => (W.'A',                 W.'Z'),
  151.       3 => (W.LC_A,                W.LC_Z),
  152.       4 => (W.UC_A_Grave,          W.UC_O_Diaeresis),
  153.       5 => (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis),
  154.       6 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis));
  155.  
  156.    Alphanumeric_Set         : constant Wide_Character_Set :=
  157.                                 (AF.Controlled with
  158.                                  Alphanumeric_Ranges'Unrestricted_Access);
  159.  
  160.    Special_Graphic_Ranges   : aliased constant Wide_Character_Ranges :=
  161.      (1 => (Wide_Space,            W.Solidus),
  162.       2 => (W.Colon,               W.Commercial_At),
  163.       3 => (W.Left_Square_Bracket, W.Grave),
  164.       4 => (W.Left_Curly_Bracket,  W.Tilde),
  165.       5 => (W.No_Break_Space,      W.Inverted_Question),
  166.       6 => (W.Multiplication_Sign, W.Multiplication_Sign),
  167.       7 => (W.Division_Sign,       W.Division_Sign));
  168.  
  169.    Special_Graphic_Set      : constant Wide_Character_Set :=
  170.                                 (AF.Controlled with
  171.                                  Special_Graphic_Ranges'Unrestricted_Access);
  172.  
  173.    ISO_646_Ranges           : aliased constant Wide_Character_Ranges :=
  174.      (1 => (W.NUL, W.DEL));
  175.  
  176.    ISO_646_Set              : constant Wide_Character_Set :=
  177.                                 (AF.Controlled with
  178.                                  ISO_646_Ranges'Unrestricted_Access);
  179.  
  180.    Character_Ranges         : aliased constant Wide_Character_Ranges :=
  181.      (1 => (W.NUL, WC'Val (255)));
  182.  
  183.    Character_Set            : constant Wide_Character_Set :=
  184.                                 (AF.Controlled with
  185.                                  Character_Ranges'Unrestricted_Access);
  186.  
  187.  
  188.    Lower_Case_Mapping : aliased constant Wide_Character_Mapping_Values :=
  189.                           (Length => 56,
  190.  
  191.                            Domain =>
  192.                              "ABCDEFGHIJKLMNOPQRSTUVWXYZ" &
  193.                               W.UC_A_Grave                &
  194.                               W.UC_A_Acute                &
  195.                               W.UC_A_Circumflex           &
  196.                               W.UC_A_Tilde                &
  197.                               W.UC_A_Diaeresis            &
  198.                               W.UC_A_Ring                 &
  199.                               W.UC_AE_Diphthong           &
  200.                               W.UC_C_Cedilla              &
  201.                               W.UC_E_Grave                &
  202.                               W.UC_E_Acute                &
  203.                               W.UC_E_Circumflex           &
  204.                               W.UC_E_Diaeresis            &
  205.                               W.UC_I_Grave                &
  206.                               W.UC_I_Acute                &
  207.                               W.UC_I_Circumflex           &
  208.                               W.UC_I_Diaeresis            &
  209.                               W.UC_Icelandic_Eth          &
  210.                               W.UC_N_Tilde                &
  211.                               W.UC_O_Grave                &
  212.                               W.UC_O_Acute                &
  213.                               W.UC_O_Circumflex           &
  214.                               W.UC_O_Tilde                &
  215.                               W.UC_O_Diaeresis            &
  216.                               W.UC_O_Oblique_Stroke       &
  217.                               W.UC_U_Grave                &
  218.                               W.UC_U_Acute                &
  219.                               W.UC_U_Circumflex           &
  220.                               W.UC_U_Diaeresis            &
  221.                               W.UC_Y_Acute                &
  222.                               W.UC_Icelandic_Thorn,
  223.  
  224.                            Rangev =>
  225.                              "abcdefghijklmnopqrstuvwxyz" &
  226.                               W.LC_A_Grave                &
  227.                               W.LC_A_Acute                &
  228.                               W.LC_A_Circumflex           &
  229.                               W.LC_A_Tilde                &
  230.                               W.LC_A_Diaeresis            &
  231.                               W.LC_A_Ring                 &
  232.                               W.LC_AE_Diphthong           &
  233.                               W.LC_C_Cedilla              &
  234.                               W.LC_E_Grave                &
  235.                               W.LC_E_Acute                &
  236.                               W.LC_E_Circumflex           &
  237.                               W.LC_E_Diaeresis            &
  238.                               W.LC_I_Grave                &
  239.                               W.LC_I_Acute                &
  240.                               W.LC_I_Circumflex           &
  241.                               W.LC_I_Diaeresis            &
  242.                               W.LC_Icelandic_Eth          &
  243.                               W.LC_N_Tilde                &
  244.                               W.LC_O_Grave                &
  245.                               W.LC_O_Acute                &
  246.                               W.LC_O_Circumflex           &
  247.                               W.LC_O_Tilde                &
  248.                               W.LC_O_Diaeresis            &
  249.                               W.LC_O_Oblique_Stroke       &
  250.                               W.LC_U_Grave                &
  251.                               W.LC_U_Acute                &
  252.                               W.LC_U_Circumflex           &
  253.                               W.LC_U_Diaeresis            &
  254.                               W.LC_Y_Acute                &
  255.                               W.LC_Icelandic_Thorn);
  256.  
  257.    Lower_Case_Map : constant Wide_Character_Mapping :=
  258.                       (AF.Controlled with
  259.                        Map => Lower_Case_Mapping'Unrestricted_Access);
  260.  
  261.    Upper_Case_Mapping : aliased constant Wide_Character_Mapping_Values :=
  262.                           (Length => 56,
  263.  
  264.                            Domain =>
  265.                              "abcdefghijklmnopqrstuvwxyz" &
  266.                               W.LC_A_Grave                &
  267.                               W.LC_A_Acute                &
  268.                               W.LC_A_Circumflex           &
  269.                               W.LC_A_Tilde                &
  270.                               W.LC_A_Diaeresis            &
  271.                               W.LC_A_Ring                 &
  272.                               W.LC_AE_Diphthong           &
  273.                               W.LC_C_Cedilla              &
  274.                               W.LC_E_Grave                &
  275.                               W.LC_E_Acute                &
  276.                               W.LC_E_Circumflex           &
  277.                               W.LC_E_Diaeresis            &
  278.                               W.LC_I_Grave                &
  279.                               W.LC_I_Acute                &
  280.                               W.LC_I_Circumflex           &
  281.                               W.LC_I_Diaeresis            &
  282.                               W.LC_Icelandic_Eth          &
  283.                               W.LC_N_Tilde                &
  284.                               W.LC_O_Grave                &
  285.                               W.LC_O_Acute                &
  286.                               W.LC_O_Circumflex           &
  287.                               W.LC_O_Tilde                &
  288.                               W.LC_O_Diaeresis            &
  289.                               W.LC_O_Oblique_Stroke       &
  290.                               W.LC_U_Grave                &
  291.                               W.LC_U_Acute                &
  292.                               W.LC_U_Circumflex           &
  293.                               W.LC_U_Diaeresis            &
  294.                               W.LC_Y_Acute                &
  295.                               W.LC_Icelandic_Thorn,
  296.  
  297.                            Rangev =>
  298.                              "ABCDEFGHIJKLMNOPQRSTUVWXYZ" &
  299.                               W.UC_A_Grave                &
  300.                               W.UC_A_Acute                &
  301.                               W.UC_A_Circumflex           &
  302.                               W.UC_A_Tilde                &
  303.                               W.UC_A_Diaeresis            &
  304.                               W.UC_A_Ring                 &
  305.                               W.UC_AE_Diphthong           &
  306.                               W.UC_C_Cedilla              &
  307.                               W.UC_E_Grave                &
  308.                               W.UC_E_Acute                &
  309.                               W.UC_E_Circumflex           &
  310.                               W.UC_E_Diaeresis            &
  311.                               W.UC_I_Grave                &
  312.                               W.UC_I_Acute                &
  313.                               W.UC_I_Circumflex           &
  314.                               W.UC_I_Diaeresis            &
  315.                               W.UC_Icelandic_Eth          &
  316.                               W.UC_N_Tilde                &
  317.                               W.UC_O_Grave                &
  318.                               W.UC_O_Acute                &
  319.                               W.UC_O_Circumflex           &
  320.                               W.UC_O_Tilde                &
  321.                               W.UC_O_Diaeresis            &
  322.                               W.UC_O_Oblique_Stroke       &
  323.                               W.UC_U_Grave                &
  324.                               W.UC_U_Acute                &
  325.                               W.UC_U_Circumflex           &
  326.                               W.UC_U_Diaeresis            &
  327.                               W.UC_Y_Acute                &
  328.                               W.UC_Icelandic_Thorn);
  329.  
  330.    Upper_Case_Map : constant Wide_Character_Mapping :=
  331.                       (AF.Controlled with
  332.                        Upper_Case_Mapping'Unrestricted_Access);
  333.  
  334.    Basic_Mapping : aliased constant Wide_Character_Mapping_Values :=
  335.                      (Length => 55,
  336.  
  337.                       Domain =>
  338.                         W.UC_A_Grave          &
  339.                         W.UC_A_Acute          &
  340.                         W.UC_A_Circumflex     &
  341.                         W.UC_A_Tilde          &
  342.                         W.UC_A_Diaeresis      &
  343.                         W.UC_A_Ring           &
  344.                         W.UC_C_Cedilla        &
  345.                         W.UC_E_Grave          &
  346.                         W.UC_E_Acute          &
  347.                         W.UC_E_Circumflex     &
  348.                         W.UC_E_Diaeresis      &
  349.                         W.UC_I_Grave          &
  350.                         W.UC_I_Acute          &
  351.                         W.UC_I_Circumflex     &
  352.                         W.UC_I_Diaeresis      &
  353.                         W.UC_N_Tilde          &
  354.                         W.UC_O_Grave          &
  355.                         W.UC_O_Acute          &
  356.                         W.UC_O_Circumflex     &
  357.                         W.UC_O_Tilde          &
  358.                         W.UC_O_Diaeresis      &
  359.                         W.UC_O_Oblique_Stroke &
  360.                         W.UC_U_Grave          &
  361.                         W.UC_U_Acute          &
  362.                         W.UC_U_Circumflex     &
  363.                         W.UC_U_Diaeresis      &
  364.                         W.UC_Y_Acute          &
  365.                         W.LC_A_Grave          &
  366.                         W.LC_A_Acute          &
  367.                         W.LC_A_Circumflex     &
  368.                         W.LC_A_Tilde          &
  369.                         W.LC_A_Diaeresis      &
  370.                         W.LC_A_Ring           &
  371.                         W.LC_C_Cedilla        &
  372.                         W.LC_E_Grave          &
  373.                         W.LC_E_Acute          &
  374.                         W.LC_E_Circumflex     &
  375.                         W.LC_E_Diaeresis      &
  376.                         W.LC_I_Grave          &
  377.                         W.LC_I_Acute          &
  378.                         W.LC_I_Circumflex     &
  379.                         W.LC_I_Diaeresis      &
  380.                         W.LC_N_Tilde          &
  381.                         W.LC_O_Grave          &
  382.                         W.LC_O_Acute          &
  383.                         W.LC_O_Circumflex     &
  384.                         W.LC_O_Tilde          &
  385.                         W.LC_O_Diaeresis      &
  386.                         W.LC_O_Oblique_Stroke &
  387.                         W.LC_U_Grave          &
  388.                         W.LC_U_Acute          &
  389.                         W.LC_U_Circumflex     &
  390.                         W.LC_U_Diaeresis      &
  391.                         W.LC_Y_Acute          &
  392.                         W.LC_Y_Diaeresis,
  393.  
  394.                       Rangev =>
  395.                         'A'        &  -- UC_A_Grave
  396.                         'A'        &  -- UC_A_Acute
  397.                         'A'        &  -- UC_A_Circumflex
  398.                         'A'        &  -- UC_A_Tilde
  399.                         'A'        &  -- UC_A_Diaeresis
  400.                         'A'        &  -- UC_A_Ring
  401.                         'C'        &  -- UC_C_Cedilla
  402.                         'E'        &  -- UC_E_Grave
  403.                         'E'        &  -- UC_E_Acute
  404.                         'E'        &  -- UC_E_Circumflex
  405.                         'E'        &  -- UC_E_Diaeresis
  406.                         'I'        &  -- UC_I_Grave
  407.                         'I'        &  -- UC_I_Acute
  408.                         'I'        &  -- UC_I_Circumflex
  409.                         'I'        &  -- UC_I_Diaeresis
  410.                         'N'        &  -- UC_N_Tilde
  411.                         'O'        &  -- UC_O_Grave
  412.                         'O'        &  -- UC_O_Acute
  413.                         'O'        &  -- UC_O_Circumflex
  414.                         'O'        &  -- UC_O_Tilde
  415.                         'O'        &  -- UC_O_Diaeresis
  416.                         'O'        &  -- UC_O_Oblique_Stroke
  417.                         'U'        &  -- UC_U_Grave
  418.                         'U'        &  -- UC_U_Acute
  419.                         'U'        &  -- UC_U_Circumflex
  420.                         'U'        &  -- UC_U_Diaeresis
  421.                         'Y'        &  -- UC_Y_Acute
  422.                         'a'        &  -- LC_A_Grave
  423.                         'a'        &  -- LC_A_Acute
  424.                         'a'        &  -- LC_A_Circumflex
  425.                         'a'        &  -- LC_A_Tilde
  426.                         'a'        &  -- LC_A_Diaeresis
  427.                         'a'        &  -- LC_A_Ring
  428.                         'c'        &  -- LC_C_Cedilla
  429.                         'e'        &  -- LC_E_Grave
  430.                         'e'        &  -- LC_E_Acute
  431.                         'e'        &  -- LC_E_Circumflex
  432.                         'e'        &  -- LC_E_Diaeresis
  433.                         'i'        &  -- LC_I_Grave
  434.                         'i'        &  -- LC_I_Acute
  435.                         'i'        &  -- LC_I_Circumflex
  436.                         'i'        &  -- LC_I_Diaeresis
  437.                         'n'        &  -- LC_N_Tilde
  438.                         'o'        &  -- LC_O_Grave
  439.                         'o'        &  -- LC_O_Acute
  440.                         'o'        &  -- LC_O_Circumflex
  441.                         'o'        &  -- LC_O_Tilde
  442.                         'o'        &  -- LC_O_Diaeresis
  443.                         'o'        &  -- LC_O_Oblique_Stroke
  444.                         'u'        &  -- LC_U_Grave
  445.                         'u'        &  -- LC_U_Acute
  446.                         'u'        &  -- LC_U_Circumflex
  447.                         'u'        &  -- LC_U_Diaeresis
  448.                         'y'        &  -- LC_Y_Acute
  449.                         'y');         -- LC_Y_Diaeresis
  450.  
  451.    Basic_Map : constant Wide_Character_Mapping :=
  452.                  (AF.Controlled with
  453.                   Basic_Mapping'Unrestricted_Access);
  454.  
  455. end Ada.Strings.Wide_Maps.Wide_Constants;
  456.