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).
+
+2010-10-07 Robert Dewar <dewar@adacore.com>
+
* sem_ch12.adb: Add comment.
* sem_ch6.adb: Minor reformatting.
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 |
@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
@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:
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
-- 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;
-- 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
-- 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
end if;
end if;
- -- Processing for stub or subprogram body or parametrized expression
+ -- Processing for stub or subprogram body or parameterized expression
<<Subprogram_Body>>
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.
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
-- 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
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;
end if;
return Body_Node;
- end Scan_Body_Or_Parametrized_Expression;
+ end Scan_Body_Or_Parameterized_Expression;
end if;
-- Processing for subprogram declaration
Error_Msg_Sloc := No_Location;
end if;
- -- Case of parametrized restriction
+ -- Case of parameterized restriction
if R in All_Parameter_Restrictions then
Add_Char ('`');
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);
-- 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
-- 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
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,
Make_Simple_Return_Statement (LocX,
Expression => Expression (N))))));
Analyze (N);
- end Analyze_Parametrized_Expression;
+ end Analyze_Parameterized_Expression;
----------------------------
-- Analyze_Procedure_Call --
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);
-- 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
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
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
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
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
-- 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)
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,
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)
Write_Str (", ");
end if;
- when N_Parametrized_Expression =>
+ when N_Parameterized_Expression =>
Write_Indent;
Sprint_Node_Sloc (Specification (Node));
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.