Patchwork [Ada] Change spelling parametrize(d) => parameterize(d)

login
register
mail settings
Submitter Arnaud Charlet
Date Oct. 7, 2010, 1 p.m.
Message ID <20101007130022.GA7449@adacore.com>
Download mbox | patch
Permalink /patch/67052/
State New
Headers show

Comments

Arnaud Charlet - Oct. 7, 2010, 1 p.m.
This patch changes the spelling of parameterize(d) to the more usual
American spelling with an E. This also matches the RM and AI usage.
Generally this has no effect, except in error messages as shown by
this example, compiled with -gnatld7 -gnat2012:

     1. package parameterize is
     2.    function F return integer is 3;
                                        |
        >>> parameterized expression must be enclosed in parentheses

     3. end;

Tested on x86_64-pc-linux-gnu, committed on trunk

2010-10-07  Robert Dewar  <dewar@adacore.com>

	* gnat_rm.texi, exp_util.adb, sinfo.adb, sinfo.ads, sem_ch12.adb,
	sem.adb, gnat_ugn.texi, sem_util.ads, par-ch6.adb, targparm.ads,
	restrict.adb, sem_ch6.adb, sem_ch6.ads, sprint.adb, i-c.ads: Change
	spelling parametrize(d) => parameterize(d).

Patch

Index: gnat_rm.texi
===================================================================
--- gnat_rm.texi	(revision 165083)
+++ gnat_rm.texi	(working copy)
@@ -1544,7 +1544,7 @@  pragma Convention_Identifier (Fortran77,
 @noindent
 would allow the use of the convention identifier @code{Fortran77} in
 subsequent code, avoiding the need to modify the sources. As another
-example, you could use this to parametrize convention requirements
+example, you could use this to parameterize convention requirements
 according to systems. Suppose you needed to use @code{Stdcall} on
 windows systems, and @code{C} on some other system, then you could
 define a convention identifier @code{Library} and use a single
Index: exp_util.adb
===================================================================
--- exp_util.adb	(revision 165098)
+++ exp_util.adb	(working copy)
@@ -2592,7 +2592,7 @@  package body Exp_Util is
                N_Package_Declaration                    |
                N_Package_Instantiation                  |
                N_Package_Renaming_Declaration           |
-               N_Parametrized_Expression                |
+               N_Parameterized_Expression               |
                N_Private_Extension_Declaration          |
                N_Private_Type_Declaration               |
                N_Procedure_Instantiation                |
Index: sinfo.adb
===================================================================
--- sinfo.adb	(revision 165098)
+++ sinfo.adb	(working copy)
@@ -1191,7 +1191,7 @@  package body Sinfo is
         or else NT (N).Nkind = N_Number_Declaration
         or else NT (N).Nkind = N_Object_Declaration
         or else NT (N).Nkind = N_Parameter_Specification
-        or else NT (N).Nkind = N_Parametrized_Expression
+        or else NT (N).Nkind = N_Parameterized_Expression
         or else NT (N).Nkind = N_Pragma_Argument_Association
         or else NT (N).Nkind = N_Qualified_Expression
         or else NT (N).Nkind = N_Raise_Statement
@@ -2682,7 +2682,7 @@  package body Sinfo is
         or else NT (N).Nkind = N_Generic_Package_Declaration
         or else NT (N).Nkind = N_Generic_Subprogram_Declaration
         or else NT (N).Nkind = N_Package_Declaration
-        or else NT (N).Nkind = N_Parametrized_Expression
+        or else NT (N).Nkind = N_Parameterized_Expression
         or else NT (N).Nkind = N_Subprogram_Body
         or else NT (N).Nkind = N_Subprogram_Body_Stub
         or else NT (N).Nkind = N_Subprogram_Declaration
@@ -4096,7 +4096,7 @@  package body Sinfo is
         or else NT (N).Nkind = N_Number_Declaration
         or else NT (N).Nkind = N_Object_Declaration
         or else NT (N).Nkind = N_Parameter_Specification
-        or else NT (N).Nkind = N_Parametrized_Expression
+        or else NT (N).Nkind = N_Parameterized_Expression
         or else NT (N).Nkind = N_Pragma_Argument_Association
         or else NT (N).Nkind = N_Qualified_Expression
         or else NT (N).Nkind = N_Raise_Statement
@@ -5587,7 +5587,7 @@  package body Sinfo is
         or else NT (N).Nkind = N_Generic_Package_Declaration
         or else NT (N).Nkind = N_Generic_Subprogram_Declaration
         or else NT (N).Nkind = N_Package_Declaration
-        or else NT (N).Nkind = N_Parametrized_Expression
+        or else NT (N).Nkind = N_Parameterized_Expression
         or else NT (N).Nkind = N_Subprogram_Body
         or else NT (N).Nkind = N_Subprogram_Body_Stub
         or else NT (N).Nkind = N_Subprogram_Declaration
Index: sinfo.ads
===================================================================
--- sinfo.ads	(revision 165100)
+++ sinfo.ads	(working copy)
@@ -4427,17 +4427,17 @@  package Sinfo is
       --  Was_Originally_Stub (Flag13-Sem)
       --  Has_Relative_Deadline_Pragma (Flag9-Sem)
 
-      -----------------------------
-      -- Parametrized Expression --
-      -----------------------------
+      ------------------------------
+      -- Parameterized Expression --
+      ------------------------------
 
       --  This is an Ada 2012 extension, we put it here for now, to be labeled
       --  and put in its proper section when we know exactly where that is!
 
-      --  PARAMETRIZED_EXPRESSION ::=
+      --  PARAMETERIZED_EXPRESSION ::=
       --    FUNCTION SPECIFICATION IS (EXPRESSION);
 
-      --  N_Parametrized_Expression
+      --  N_Parameterized_Expression
       --  Sloc points to FUNCTION
       --  Specification (Node1)
       --  Expression (Node3)
@@ -7329,7 +7329,7 @@  package Sinfo is
       N_Incomplete_Type_Declaration,
       N_Loop_Parameter_Specification,
       N_Object_Declaration,
-      N_Parametrized_Expression,
+      N_Parameterized_Expression,
       N_Protected_Type_Declaration,
       N_Private_Extension_Declaration,
       N_Private_Type_Declaration,
@@ -10438,7 +10438,7 @@  package Sinfo is
         4 => True,    --  Handled_Statement_Sequence (Node4)
         5 => False),  --  Corresponding_Spec (Node5-Sem)
 
-     N_Parametrized_Expression =>
+     N_Parameterized_Expression =>
        (1 => True,    --  Specification (Node1)
         2 => False,   --  unused
         3 => True,    --  Expression (Node3)
Index: sem_ch12.adb
===================================================================
--- sem_ch12.adb	(revision 165102)
+++ sem_ch12.adb	(working copy)
@@ -608,11 +608,11 @@  package body Sem_Ch12 is
    --  formals: the visible and private declarations themselves need not be
    --  created.
 
-   --  In Ada 2005, the formal package may be only partially parametrized. In
-   --  that case the visibility step must make visible those actuals whose
+   --  In Ada 2005, the formal package may be only partially parameterized.
+   --  In that case the visibility step must make visible those actuals whose
    --  corresponding formals were given with a box. A final complication
-   --  involves inherited operations from formal derived types, which must be
-   --  visible if the type is.
+   --  involves inherited operations from formal derived types, which must
+   --  be visible if the type is.
 
    function Is_In_Main_Unit (N : Node_Id) return Boolean;
    --  Test if given node is in the main unit
@@ -4753,7 +4753,7 @@  package body Sem_Ch12 is
             --  that are attributes are rewritten as subprograms. If the
             --  subprogram in the formal package is defaulted, no check is
             --  needed. Note that this can only happen in Ada 2005 when the
-            --  formal package can be partially parametrized.
+            --  formal package can be partially parameterized.
 
             if Nkind (Unit_Declaration_Node (E1)) =
                                            N_Subprogram_Renaming_Declaration
Index: sem.adb
===================================================================
--- sem.adb	(revision 165098)
+++ sem.adb	(working copy)
@@ -437,8 +437,8 @@  package body Sem is
          when N_Parameter_Association =>
             Analyze_Parameter_Association (N);
 
-         when N_Parametrized_Expression =>
-            Analyze_Parametrized_Expression (N);
+         when N_Parameterized_Expression =>
+            Analyze_Parameterized_Expression (N);
 
          when N_Pragma =>
             Analyze_Pragma (N);
Index: gnat_ugn.texi
===================================================================
--- gnat_ugn.texi	(revision 165099)
+++ gnat_ugn.texi	(working copy)
@@ -2918,7 +2918,7 @@  should provide a stub body that raises @
 
 @noindent
 GNAT additionally provides a useful pragma @code{Convention_Identifier}
-that can be used to parametrize conventions and allow additional synonyms
+that can be used to parameterize conventions and allow additional synonyms
 to be specified. For example if you have legacy code in which the convention
 identifier Fortran77 was used for Fortran, you can use the configuration
 pragma:
Index: sem_util.ads
===================================================================
--- sem_util.ads	(revision 165092)
+++ sem_util.ads	(working copy)
@@ -84,7 +84,7 @@  package Sem_Util is
    --  node that is built is normally Etype (N), but if the Typ parameter
    --  is present, this is used instead. Warn is normally False. If it is
    --  True then the message is treated as a warning even though it does
-   --  not end with a ? (this is used when the caller wants to parametrize
+   --  not end with a ? (this is used when the caller wants to parameterize
    --  whether an error or warning is given.
 
    function Build_Actual_Subtype
Index: par-ch6.adb
===================================================================
--- par-ch6.adb	(revision 165100)
+++ par-ch6.adb	(working copy)
@@ -82,7 +82,7 @@  package body Ch6 is
 
    --  This routine scans out a subprogram declaration, subprogram body,
    --  subprogram renaming declaration or subprogram generic instantiation.
-   --  It also handles the new Ada 2012 parametrized expression form
+   --  It also handles the new Ada 2012 parameterized expression form
 
    --  SUBPROGRAM_DECLARATION ::= SUBPROGRAM_SPECIFICATION;
 
@@ -123,7 +123,7 @@  package body Ch6 is
    --  is classified as a basic declarative item, but it is parsed here, with
    --  other subprogram constructs.
 
-   --  PARAMETRIZED_EXPRESSION ::=
+   --  PARAMETERIZED_EXPRESSION ::=
    --    FUNCTION SPECIFICATION IS (EXPRESSION);
 
    --  The value in Pf_Flags indicates which of these possible declarations
@@ -134,7 +134,7 @@  package body Ch6 is
    --    Pf_Flags.Pbod                 Set if proper body OK
    --    Pf_Flags.Rnam                 Set if renaming declaration OK
    --    Pf_Flags.Stub                 Set if body stub OK
-   --    Pf_Flags.Pexp                 Set if parametrized expression OK
+   --    Pf_Flags.Pexp                 Set if parameterized expression OK
 
    --  If an inappropriate form is encountered, it is scanned out but an
    --  error message indicating that it is appearing in an inappropriate
@@ -584,7 +584,7 @@  package body Ch6 is
          end if;
       end if;
 
-      --  Processing for stub or subprogram body or parametrized expression
+      --  Processing for stub or subprogram body or parameterized expression
 
       <<Subprogram_Body>>
 
@@ -609,21 +609,21 @@  package body Ch6 is
             TF_Semicolon;
             return Stub_Node;
 
-         --  Subprogram body or parametrized expression case
+         --  Subprogram body or parameterized expression case
 
          else
-            Scan_Body_Or_Parametrized_Expression : declare
+            Scan_Body_Or_Parameterized_Expression : declare
 
-               function Likely_Parametrized_Expression return Boolean;
-               --  Returns True if we have a probably case of a parametrized
+               function Likely_Parameterized_Expression return Boolean;
+               --  Returns True if we have a probably case of a parameterized
                --  expression omitting the parentheses, if so, returns True
                --  and emits an appropriate error message, else returns False.
 
-               ------------------------------------
-               -- Likely_Parametrized_Expression --
-               ------------------------------------
+               -------------------------------------
+               -- Likely_Parameterized_Expression --
+               -------------------------------------
 
-               function Likely_Parametrized_Expression return Boolean is
+               function Likely_Parameterized_Expression return Boolean is
                begin
                   --  If currently pointing to BEGIN or a declaration keyword
                   --  or a pragma, then we definitely have a subprogram body.
@@ -636,7 +636,7 @@  package body Ch6 is
                      return False;
 
                   --  Test for tokens which could only start an expression and
-                  --  thus signal the case of a parametrized expression.
+                  --  thus signal the case of a parameterized expression.
 
                   elsif Token in Token_Class_Literal
                     or else Token in Token_Class_Unary_Addop
@@ -666,7 +666,7 @@  package body Ch6 is
                      --  Otherwise we have to scan ahead. If the identifier is
                      --  followed by a colon or a comma, it is a declaration
                      --  and hence we have a subprogram body. Otherwise assume
-                     --  a parametrized expression.
+                     --  a parameterized expression.
 
                      else
                         declare
@@ -685,43 +685,43 @@  package body Ch6 is
                      end if;
                   end if;
 
-                  --  Fall through if we have a likely parametrized expression
+                  --  Fall through if we have a likely parameterized expression
 
                   Error_Msg_SC
-                    ("parametrized expression must be "
+                    ("parameterized expression must be "
                      & "enclosed in parentheses");
                   return True;
-               end Likely_Parametrized_Expression;
+               end Likely_Parameterized_Expression;
 
-            --  Start of processing for Scan_Body_Or_Parametrized_Expression
+            --  Start of processing for Scan_Body_Or_Parameterized_Expression
 
             begin
-               --  Parametrized_Expression case
+               --  Parameterized_Expression case
 
                if Token = Tok_Left_Paren
-                 or else Likely_Parametrized_Expression
+                 or else Likely_Parameterized_Expression
                then
-                  --  Check parametrized expression allowed here
+                  --  Check parameterized expression allowed here
 
                   if not Pf_Flags.Pexp then
                      Error_Msg_SC
-                       ("parametrized expression not allowed here!");
+                       ("parameterized expression not allowed here!");
                   end if;
 
                   --  Check we are in Ada 2012 mode
 
                   if Ada_Version < Ada_12 then
                      Error_Msg_SC
-                       ("parametrized expression is an Ada 2012 feature!");
+                       ("parameterized expression is an Ada 2012 feature!");
                      Error_Msg_SC
                        ("\unit must be compiled with -gnat2012 switch!");
                   end if;
 
-                  --  Parse out expression and build parametrized expression
+                  --  Parse out expression and build parameterized expression
 
                   Body_Node :=
                     New_Node
-                      (N_Parametrized_Expression, Sloc (Specification_Node));
+                      (N_Parameterized_Expression, Sloc (Specification_Node));
                   Set_Specification (Body_Node, Specification_Node);
                   Set_Expression (Body_Node, P_Expression);
                   T_Semicolon;
@@ -761,7 +761,7 @@  package body Ch6 is
                end if;
 
                return Body_Node;
-            end Scan_Body_Or_Parametrized_Expression;
+            end Scan_Body_Or_Parameterized_Expression;
          end if;
 
       --  Processing for subprogram declaration
Index: targparm.ads
===================================================================
--- targparm.ads	(revision 165080)
+++ targparm.ads	(working copy)
@@ -157,7 +157,7 @@  package Targparm is
    Run_Time_Name_On_Target : Name_Id := No_Name;
    --  Set to appropriate names table entry Id value if a Run_Time_Name
    --  string constant is defined in system.ads. This name is used only
-   --  for the configurable run-time case, and is used to parametrize
+   --  for the configurable run-time case, and is used to parameterize
    --  messages that complain about non-supported run-time features.
    --  The name should contain only letters A-Z, digits 1-9, spaces,
    --  and underscores.
Index: restrict.adb
===================================================================
--- restrict.adb	(revision 165080)
+++ restrict.adb	(working copy)
@@ -685,7 +685,7 @@  package body Restrict is
          Error_Msg_Sloc := No_Location;
       end if;
 
-      --  Case of parametrized restriction
+      --  Case of parameterized restriction
 
       if R in All_Parameter_Restrictions then
          Add_Char ('`');
Index: sem_ch6.adb
===================================================================
--- sem_ch6.adb	(revision 165102)
+++ sem_ch6.adb	(working copy)
@@ -1038,17 +1038,17 @@  package body Sem_Ch6 is
       Analyze (Explicit_Actual_Parameter (N));
    end Analyze_Parameter_Association;
 
-   -------------------------------------
-   -- Analyze_Parametrized_Expression --
-   -------------------------------------
+   --------------------------------------
+   -- Analyze_Parameterized_Expression --
+   --------------------------------------
 
-   procedure Analyze_Parametrized_Expression (N : Node_Id) is
+   procedure Analyze_Parameterized_Expression (N : Node_Id) is
       Loc  : constant Source_Ptr := Sloc (N);
       LocX : constant Source_Ptr := Sloc (Expression (N));
 
    begin
       --  This is one of the occasions on which we write things during semantic
-      --  analysis. We transform the parametrized expression into an equivalent
+      --  analysis. Transform the parameterized expression into an equivalent
       --  subprogram body, and then analyze that.
 
       Rewrite (N,
@@ -1061,7 +1061,7 @@  package body Sem_Ch6 is
                 Make_Simple_Return_Statement (LocX,
                   Expression => Expression (N))))));
       Analyze (N);
-   end Analyze_Parametrized_Expression;
+   end Analyze_Parameterized_Expression;
 
    ----------------------------
    -- Analyze_Procedure_Call --
Index: sem_ch6.ads
===================================================================
--- sem_ch6.ads	(revision 165098)
+++ sem_ch6.ads	(working copy)
@@ -39,7 +39,7 @@  package Sem_Ch6 is
    procedure Analyze_Function_Call                   (N : Node_Id);
    procedure Analyze_Operator_Symbol                 (N : Node_Id);
    procedure Analyze_Parameter_Association           (N : Node_Id);
-   procedure Analyze_Parametrized_Expression         (N : Node_Id);
+   procedure Analyze_Parameterized_Expression        (N : Node_Id);
    procedure Analyze_Procedure_Call                  (N : Node_Id);
    procedure Analyze_Simple_Return_Statement         (N : Node_Id);
    procedure Analyze_Subprogram_Declaration          (N : Node_Id);
Index: sprint.adb
===================================================================
--- sprint.adb	(revision 165098)
+++ sprint.adb	(working copy)
@@ -2388,7 +2388,7 @@  package body Sprint is
                Write_Str (", ");
             end if;
 
-         when N_Parametrized_Expression =>
+         when N_Parameterized_Expression =>
             Write_Indent;
             Sprint_Node_Sloc (Specification (Node));
 
Index: i-c.ads
===================================================================
--- i-c.ads	(revision 165080)
+++ i-c.ads	(working copy)
@@ -47,7 +47,7 @@  package Interfaces.C is
    type unsigned_char is mod (UCHAR_MAX + 1);
    for unsigned_char'Size use CHAR_BIT;
 
-   subtype plain_char is unsigned_char; -- ??? should be parametrized
+   subtype plain_char is unsigned_char; -- ??? should be parameterized
 
    --  Note: the Integer qualifications used in the declaration of ptrdiff_t
    --  avoid ambiguities when compiling in the presence of s-auxdec.ads and