+2008-03-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * g-table.adb, g-tasloc.adb, g-traceb.ads,
+ g-trasym.adb, g-utf_32.adb, gen-soccon.c, gigi.h, gmem.c,
+ gnatbind.adb, gnatchop.adb, gnatcmd.adb,
+ gnatcmd.ads, gnatdll.adb, gnatfind.adb,
+ gnatlink.adb, gnatmem.adb, gprep.adb,
+ i-cstrea-vms.adb, i-cstrin.adb, i-pacdec.ads,
+ i-vxwork.ads, impunit.adb, init.c, initialize.c, inline.adb,
+ layout.adb, lib-writ.adb, lib-writ.ads, lib-xref.adb,
+ lib-xref.ads, lib.adb, link.c, live.ads,
+ make.adb, makegpr.adb, makeutl.adb, math_lib.adb,
+ mdll-utl.adb, mdll.ads, memroot.adb, memroot.ads,
+ misc.c, mlib-prj.adb, mlib-tgt-hpux.adb,
+ mlib-tgt-linux.adb, mlib-tgt-tru64.adb, mlib-tgt.ads,
+ namet.adb, namet.h, nlists.adb, nlists.ads,
+ nlists.h, opt.ads, osint-b.ads, osint-c.adb,
+ osint-c.ads, osint.adb, osint.ads, output.ads,
+ par-ch10.adb, par-ch12.adb, par-ch2.adb, par-ch3.adb,
+ par-ch4.adb, par-ch5.adb, par-ch6.adb, par-ch9.adb,
+ par-endh.adb, par-labl.adb, par-prag.adb,
+ par-sync.adb, par-tchk.adb, par-util.adb,
+ par.adb, prep.adb, prep.ads, prepcomp.adb, prj-attr.ads,
+ prj-dect.adb, prj-env.adb, prj-ext.adb, prj-nmsc.adb,
+ prj-nmsc.ads, prj-pp.adb, prj-proc.adb,
+ prj-strt.ads, prj-tree.ads, prj.adb, prj.ads: Fix comment typos.
+
2008-03-31 Eric Botcazou <ebotcazou@adacore.com>
* decl.c (gnat_to_gnu_entity) <object>: Do not force a non-null
-- current allocation). Range checks are suppressed because this unit
-- uses direct calls to System.Memory for allocation, and this can
-- yield misaligned storage (and we cannot rely on the bootstrap
- -- compiler supporting specifically disabling alignment cheks, so we
+ -- compiler supporting specifically disabling alignment checks, so we
-- need to suppress all range checks). It is safe to suppress this check
-- here because we know that a (possibly misaligned) object of that type
-- does actually exist at that address.
-- involve moving table contents around).
begin
- -- If we're going to reallocate, check wheter Item references an
+ -- If we're going to reallocate, check whether Item references an
-- element of the currently allocated table.
if Need_Realloc
-- This package does not require a body, since it is a package renaming. We
-- provide a dummy file containing a No_Body pragma so that previous versions
--- of the body (which did exist) will not intefere.
+-- of the body (which did exist) will not interfere.
pragma No_Body;
-- using the external addr2line utility, or from within GDB.
-- In order to use this facility, in some cases the binder must be invoked
--- with -E switch (store the backtrace with exception occurence). Please
+-- with -E switch (store the backtrace with exception occurrence). Please
-- refer to gnatbind documentation for more information.
-- To analyze the code locations later using addr2line or gdb, the necessary
-- be found. If the executable file name resolution fails, we have no
-- sensible basis to invoke the symbolizer at all.
- -- Protect all this against concurrent accesses explicitely, as the
+ -- Protect all this against concurrent accesses explicitly, as the
-- underlying services are potentially thread unsafe.
TSL.Lock_Task.all;
-- This package does not require a body, since it is a package renaming. We
-- provide a dummy file containing a No_Body pragma so that previous versions
--- of the body (which did exist) will not intefere.
+-- of the body (which did exist) will not interfere.
pragma No_Body;
CND(WSASYSNOTREADY, "System not ready")
CND(WSAVERNOTSUPPORTED, "Version not supported")
-CND(WSANOTINITIALISED, "Winsock not intialized")
+CND(WSANOTINITIALISED, "Winsock not initialized")
CND(WSAEDISCON, "Disconnected")
#endif
/* Build a GCC tree to call an allocation or deallocation function.
If GNU_OBJ is nonzero, it is an object to deallocate. Otherwise,
- genrate an allocator.
+ generate an allocator.
GNU_SIZE is the size of the object and ALIGN is the alignment.
GNAT_PROC, if present is a procedure to call and GNAT_POOL is the
routine. The latter examines debug info from a provided executable file
name to perform the translation into symbolic form of an input sequence of
raw binary addresses. It attempts to open the file from the provided name
- "as is", so an an absolute path must be provided to ensure the file is
+ "as is", so an absolute path must be provided to ensure the file is
always found. We compute this name once, at initialization time. */
static const char * exename = 0;
then
null;
- -- Invalid -S switch, let Switch give error, set defalut of IN
+ -- Invalid -S switch, let Switch give error, set default of IN
else
Scan_Binder_Switches (Argv);
function Report_Duplicate_Units return Boolean;
-- Output messages about duplicate units in the input files in Unit.Table
- -- Returns True if any duplicates found, Fals if no duplicates found.
+ -- Returns True if any duplicates found, False if no duplicates found.
function Scan_Arguments return Boolean;
-- Scan command line options and set global variables accordingly.
-- Note that the unit name can be an operator name in quotes.
-- This is of course illegal, but both GNAT and gnatchop handle
- -- the case so that this error does not intefere with chopping.
+ -- the case so that this error does not interfere with chopping.
-- The SR ir present indicates that a source reference pragma
-- was processed as part of this unit (and that therefore no
Old_Project_File_Used : Boolean := False;
-- This flag indicates a switch -p (for gnatxref and gnatfind) for
- -- an old fashioned project file. -p cannot be used in conjonction
+ -- an old fashioned project file. -p cannot be used in conjunction
-- with -P.
Max_Files_On_The_Command_Line : constant := 30; -- Arbitrary
declare
Current_Last : constant Integer := Last_Switches.Last;
begin
- -- Gnatstack needs to add the the .ci file for the binder
+ -- Gnatstack needs to add the .ci file for the binder
-- generated files corresponding to all of the library projects
-- and main units belonging to the application.
raise Error_Exit;
else
- -- Get each file name in the file, find its path and add it the the
+ -- Get each file name in the file, find its path and add it the
-- list of arguments.
while not End_Of_File (File) loop
-- For gnatmetric, the generated files should be put in the object
-- directory. This must be the first switch, because it may be
- -- overriden by a switch in package Metrics in the project file or
+ -- overridden by a switch in package Metrics in the project file or
-- by a command line option. Note that we don't add the -d= switch
-- if there is no object directory available.
-- style switches that are accepted directly.
-- The program is typically called GNAT when it is installed and
--- the two possibile styles of use are:
+-- the two possible styles of use are:
-- To call gcc:
-- Parse the command line arguments passed to gnatdll
procedure Check_Context;
- -- Check the context before runing any commands to build the library
+ -- Check the context before running any commands to build the library
Syntax_Error : exception;
-- Raised when a syntax error is detected, in this case a usage info will
-- be displayed.
Context_Error : exception;
- -- Raised when some files (specifed on the command line) are missing to
+ -- Raised when some files (specified on the command line) are missing to
-- build the DLL.
Help : Boolean := False;
-- List of objects to put inside the library
Ali_Files : Argument_List_Access := MDLL.Null_Argument_List_Access;
- -- For each Ada file specified, we keep arecord of the corresponding
+ -- For each Ada file specified, we keep a record of the corresponding
-- ALI file. This list of SLI files is used to build the binder program.
Options : Argument_List_Access := MDLL.Null_Argument_List_Access;
-- A list of -bargs options (B is next entry to be used)
Build_Import : Boolean := True;
- -- Set to Fals if option -n if specified (no-import)
+ -- Set to False if option -n if specified (no-import)
--------------
-- Add_File --
end if;
-- Special case to speed things up: if the user has a command line of the
- -- form 'gnatfind entity:file', ie has specified a file and only wants the
- -- bodies and specs, then we can restrict the search to the .ali file
+ -- form 'gnatfind entity:file', i.e. has specified a file and only wants
+ -- the bodies and specs, then we can restrict the search to the .ali file
-- associated with 'file'.
if Has_File_In_Entity
-- important because on the GNU linker command line the -L switch is not
-- used to look for objects files but -L switch is used to look for
-- objects listed in the response file. This is not a problem with the
- -- applications objects as they are specified with a fullname.
+ -- applications objects as they are specified with a full name.
package Response_File_Objects is new Table.Table (
Table_Component_Type => String_Access,
else
-- If gnatlib library not found, then
-- add it anyway in case some other
- -- mechanimsm may find it.
+ -- mechanism may find it.
Linker_Options.Increment_Last;
Linker_Options.Table (Linker_Options.Last) :=
-- switches:
-- -gnatA stops reading gnat.adc, since we don't know what
- -- pagmas would work, and we do not need it anyway.
+ -- pragmas would work, and we do not need it anyway.
-- -gnatWb allows brackets coding for wide characters
-- one. And any subsequent stack setting option will overwrite the
-- previous one. This is done especially for GNAT/NT where we set
-- the stack size for tasking programs by a pragma in the NT
- -- specific tasking package System.Task_Primitives.Oparations.
+ -- specific tasking package System.Task_Primitives.Operations.
-- Note: This is not a FOR loop that runs from Linker_Options.First
-- to Linker_Options.Last, since operations within the loop can
System.OS_Lib.Spawn (Linker_Path.all, Args, Success);
- -- Delete the temporary file used in conjuction with linking if
+ -- Delete the temporary file used in conjunction with linking if
-- one was created. See Process_Bind_File for details.
if Tname_FD /= Invalid_FD then
-- idea:
-- - Read the allocation log generated by the application linked using
--- instrumented memory allocation and dealocation (see memtrack.adb for
+-- instrumented memory allocation and deallocation (see memtrack.adb for
-- this circuitry). To get access to this functionality, the application
-- must be relinked with library libgmem.a:
Symbol := Index_Of (Data.Symbol);
- -- If symbol does not alrady exist, create a new entry in the mapping
+ -- If symbol does not already exist, create a new entry in the mapping
-- table.
if Symbol = No_Symbol then
-- In order for the above fwrite hack to work, we must always buffer
-- stdout and stderr. Is_regular_file on VMS cannot detect when
-- these are redirected to a file, so checking for that condition
- -- doesnt help.
+ -- doesn't help.
if mode = IONBF
and then (stream = stdout or else stream = stderr)
Pointer : chars_ptr;
begin
- -- Get index of position of null. If Index > Chars'last,
+ -- Get index of position of null. If Index > Chars'Last,
-- nul is absent and must be added explicitly.
Index := Position_Of_Nul (Into => Chars);
------------------------------------------------------------------------------
-- This unit defines the packed decimal format used by GNAT in response to
--- a specication of Machine_Radix 10 for a decimal fixed-point type. The
+-- a specification of Machine_Radix 10 for a decimal fixed-point type. The
-- format and operations are completely encapsulated in this unit, so all
-- that is necessary to compile using different packed decimal formats is
-- to replace this single unit.
pragma Warnings (Off, "*foreign convention*");
pragma Warnings (Off, "*add Convention pragma*");
--- These are temporary pragmas to supress warnings about mismatching
+-- These are temporary pragmas to suppress warnings about mismatching
-- conventions, which will be a problem when we get rid of trampolines ???
with System.VxWorks;
-- Binding to the C routine sysBusIntGen. Note that the T2
-- documentation implies that a vector address is the proper
-- argument - it's not. The interrupt number in the range
- -- 0 .. 255 (for 68K and PPC) is the correct agument.
+ -- 0 .. 255 (for 68K and PPC) is the correct argument.
procedure logMsg
(fmt : String; arg1, arg2, arg3, arg4, arg5, arg6 : int := 0);
-- attempt to WITH one of these units will be diagnosed as an error later
-- on, but for now we do not consider these internal implementation units
-- (if we did, then we would get a junk warning which would be confusing
- -- and unecessary, given that we generate a clear error message).
+ -- and unnecessary, given that we generate a clear error message).
"a-tideio", -- Ada.Text_IO.Decimal_IO
"a-tienio", -- Ada.Text_IO.Enumeration_IO
/* __gnat_set_globals */
/**********************/
-/* This routine is kept for boostrapping purposes, since the binder generated
+/* This routine is kept for bootstrapping purposes, since the binder generated
file now sets the __gl_* variables directly. */
void
dynamic unloader.
Note that since the tables shall be registered against a common
- datastructure, libgcc should be one of the modules (vs being partially
+ data structure, libgcc should be one of the modules (vs being partially
linked against all the others at build time) and shall be loaded first.
For applications linked with the kernel, the scheme above would lead to
if Pack = Standard_Standard then
- -- Library-level inlined function. Add function iself to
+ -- Library-level inlined function. Add function itself to
-- list of needed units.
Inlined_Bodies.Increment_Last;
-- mode it will lead to undefined symbols at link time.
--
-- b) If a body contains inlined function instances, it cannot be
- -- inlined under ZCX because the numerix suffix generated by gigi
+ -- inlined under ZCX because the numeric suffix generated by gigi
-- will be different in the body and the place of the inlined call.
--
-- This procedure must be carefully coordinated with the back end
Make_Size_Function : Boolean := False;
-- Indicates whether to request that SO_Ref_From_Expr should
- -- encapsulate the array size expresion in a function.
+ -- encapsulate the array size expression in a function.
procedure Discrimify (N : in out Node_Id);
-- If N represents a discriminant, then the Size.Status is set to
end;
end if;
- -- For non-discrete sclar types, if the RM_Size is not set,
+ -- For non-discrete scalar types, if the RM_Size is not set,
-- then set it now to a copy of the Esize if the Esize is set.
else
Set_Composite_Alignment (E);
end if;
- -- Procressing for array types
+ -- Processing for array types
elsif Is_Array_Type (E) then
-- the setting of the Optimize_Alignment mode.
-- If Optimize_Alignment is set to Space, then packed records always
- -- have an aligmment of 1. But don't do anything for atomic records
+ -- have an alignment of 1. But don't do anything for atomic records
-- since we may need higher alignment for indivisible access.
if Optimize_Alignment = 'S'
else
-- The only other cases we worry about here are where the size is
- -- staticallly known at compile time.
+ -- statically known at compile time.
if Known_Static_Esize (E) then
Siz := Esize (E);
-- Check components. If any component requires a higher alignment,
-- then we set that higher alignment in any case. Don't do this if
-- we have Optimize_Alignment set to Space. Note that that covers
- -- the case of packed records, where we arleady set alignment to 1.
+ -- the case of packed records, where we already set alignment to 1.
if Optimize_Alignment /= 'S' then
declare
-- Loop to build the with table. A with on the main unit itself
-- is ignored (AARM 10.2(14a)). Such a with-clause can occur if
-- the main unit is a subprogram with no spec, and a subunit of
- -- it unecessarily withs the parent.
+ -- it unnecessarily withs the parent.
for J in Units.First + 1 .. Last_Unit loop
end if;
end Output_Main_Program_Line;
- -- Write command argmument ('A') lines
+ -- Write command argument ('A') lines
for A in 1 .. Compilation_Switches.Last loop
Write_Info_Initiate ('A');
-- Adding entirely new lines (with a new key letter) to the ali
-- file is always safe, at any point (other than before the V
- -- line), since suchy lines will be ignored.
+ -- line), since such lines will be ignored.
-- Following the guidelines in this section should ensure that this
-- problem is minimized and that old tools will be able to deal
-- each compilation unit that appears in the corresponding object file.
-- In particular, when a package body or subprogram body is compiled,
-- there will be two sets of information, one for the spec and one for
- -- the body. with the entry for the body appearing first. This is the
+ -- the body, with the entry for the body appearing first. This is the
-- only case in which a single ALI file contains more than one unit (in
-- particular note that subunits do *not* count as compilation units for
-- this purpose, and generate no library information, since they are
-- Following the W lines (if any, or the U line if not), are an
-- optional series of lines that indicates the usage of the pragma
- -- Linker_Options in the associated unit. For each appearence of a
+ -- Linker_Options in the associated unit. For each appearance of a
-- pragma Linker_Options (or Link_With) in the unit, a line is
-- present with the form:
-- set to Empty, and Left/Right are set to space.
procedure Output_Import_Export_Info (Ent : Entity_Id);
- -- Ouput language and external name information for an interfaced
+ -- Output language and external name information for an interfaced
-- entity, using the format <language, external_name>,
------------------------
-- in the visible part of a generic package, and space otherwise.
-- entity is the name of the referenced entity, with casing in
- -- the canical casing for the source file where it is defined.
+ -- the canonical casing for the source file where it is defined.
-- renameref provides information on renaming. If the entity is
-- a package, object or overloadable entity which is declared by
-- Pq of this type, then an entry in the list of references to
-- Tx will point to the declaration of Pq. Note that this entry
-- type is unusual because it an implicit rather than explicit,
- -- and the name of the refrerence does not match the name of the
+ -- and the name of the reference does not match the name of the
-- entity for which a reference is generated. These entries are
-- generated only for entities declared in the extended main
-- source unit (main unit itself, its separate spec (if any).
-- instantiations, this can be nested [...[...[...]]] etc.
-- The reference is of the form [file|line] no column is
-- present since it is assumed that only one instantiation
- -- appears on a single source line. Note that the appearence
+ -- appears on a single source line. Note that the appearance
-- of file numbers in such references follows the normal
-- rules (present only if needed, and resets the current
-- file for subsequent references).
-- a reference (e.g. a call) at line 8 column 4 of the
-- of the current file.
- -- the END line of the body has an explict reference to
+ -- the END line of the body has an explicit reference to
-- the name of the procedure at line 12, column 13.
-- the body ends at line 12, column 15, just past this label
end if;
-- At this stage we know that neither is a subunit, so we deal
- -- with instantiations, since we culd have a common ancestor
+ -- with instantiations, since we could have a common ancestor
Inst1 := Instantiation (Sind1);
Inst2 := Instantiation (Sind2);
/* link_max is a conservative system specific threshold (in bytes) of the */
/* argument length passed to the linker which will trigger a file being */
/* used instead of the command line directly. If the argument length is */
-/* greater than this threshhold, then an objlist_file will be generated */
+/* greater than this threshold, then an objlist_file will be generated */
/* and object_file_option and objlist_file_supported must be set. If */
/* objlist_file_supported is set to 0 (unsupported), then link_max is */
/* set to 2**31-1 so that the limit will never be exceeded. */
/* run_path_option is the system dependent linker option which specifies */
/* the run time path to use when loading dynamic libraries. This should */
-/* be set to the null string if the system does not support dynmamic */
+/* be set to the null string if the system does not support dynamic */
/* loading of libraries. */
/* shared_libgnat_default gives the system dependent link method that */
procedure Collect_Garbage_Entities;
-- Eliminate unreachable entities using a mark-and-sweep from
- -- the set of root entities, ie. those having Is_Public set.
+ -- the set of root entities, i.e. those having Is_Public set.
end Live;
Do_Link_Step : Boolean := True;
-- Flags to indicate what step should be executed. Can be set to False
-- with the switches -c, -b and -l. These flags are reset to True for
- -- each invokation of procedure Gnatmake.
+ -- each invocation of procedure Gnatmake.
Shared_String : aliased String := "-shared";
Force_Elab_Flags_String : aliased String := "-F";
And_Save : Boolean := True);
-- Make invokes one of three programs (the compiler, the binder or the
-- linker). For the sake of convenience, some program specific switches
- -- can be passed directly on the gnatmake commande line. This procedure
- -- records these switches so that gnamake can pass them to the right
+ -- can be passed directly on the gnatmake command line. This procedure
+ -- records these switches so that gnatmake can pass them to the right
-- program. S is the switch to be added at the end of the command line
-- for Program if Append_Switch is True. If Append_Switch is False S is
-- added at the beginning of the command line.
File_Name : File_Name_Type;
begin
- -- Test whether Uname is the name of a body unit (ie ends with %b)
+ -- Test whether Uname is the name of a body unit (i.e. ends
+ -- with %b)
Get_Name_String (Uname);
pragma
-- Set -gnatpg for predefined files (for this purpose the renamings
-- such as Text_IO do not count as predefined). Note that we strip
- -- the directory name from the source file name becase the call to
+ -- the directory name from the source file name because the call to
-- Fname.Is_Predefined_File_Name cannot deal with directory prefixes.
declare
exit Make_Loop;
end if;
- -- PHASE 1: Check if there is more work that we can do (ie the Q
+ -- PHASE 1: Check if there is more work that we can do (i.e. the Q
-- is non empty). If there is, do it only if we have not yet used
-- up all the available processes.
-- If there are several mains, we always get the general
-- gnatmake switches (if any).
- -- Warn the user, if necessary, so that he is not surprized
+ -- Warn the user, if necessary, so that he is not surprised
-- that specific switches are not taken into account.
declare
-- Record the current last switch index for table Binder_Switches
-- and Linker_Switches, so that these tables may be reset before
- -- for each main, before adding swiches from the project file
+ -- for each main, before adding switches from the project file
-- and from the command line.
Last_Binder_Switch := Binder_Switches.Last;
else
-- If we are using a project file, we attempt to remove the
-- body (or spec) termination of the main subprogram. We find
- -- it the the naming scheme of the project file. This avoids
+ -- it the naming scheme of the project file. This avoids
-- generating an executable "main.2" for a main subprogram
-- "main.2.ada", when the body termination is ".2.ada".
begin
-- For directories, Normalize_Pathname may or may not put
-- a directory separator at the end, depending on its input.
- -- Remove any last directory separator before comparaison.
+ -- Remove any last directory separator before comparison.
-- Returns True only if the two directories are the same.
if Object_Directory (Olast) = Directory_Separator then
Write_Line ("*** Interrupted ***");
Delete_All_Temp_Files;
- -- Send SIGINT to all oustanding compilation processes spawned
+ -- Send SIGINT to all outstanding compilation processes spawned
for J in 1 .. Outstanding_Compiles loop
Kill (Running_Compile (J).Pid, SIGINT, 1);
-- Create the archive dependency file for a library project
procedure Create_Global_Archive_Dependency_File (Name : String);
- -- Create the archive depenency file for the main project
+ -- Create the archive dependency file for the main project
procedure Display_Command
(Name : String;
Project_Tree.Other_Sources.Table (Source_Id);
-- Only include object file name that have not been
- -- overriden in extending projects.
+ -- overridden in extending projects.
if Is_Included_In_Global_Archive
(Source.Object_Name, Proj)
-- Loop Big_Loop is executed several times only when the dependency file
-- contains several times
-- <object file>: <source1> ...
- -- When there is only one of such occurence, Big_Loop is exited
+ -- When there is only one of such occurrence, Big_Loop is exited
-- successfully at the beginning of the second loop.
Big_Loop :
-- Add the directory where gprmake is invoked in front of the path,
-- if gprmake is invoked from a bin directory or with directory
- -- information. information. Only do this if the platform is not VMS,
+ -- information. Only do this if the platform is not VMS,
-- where the notion of path does not really exist.
-- Below code shares nasty code duplication with make.adb code???
Exec_Name : constant String := Command_Name;
function Get_Install_Dir (S : String) return String;
- -- S is the executable name preceeded by the absolute or relative
+ -- S is the executable name preceded by the absolute or relative
-- path, e.g. "c:\usr\bin\gcc.exe". Returns the absolute directory
-- where "bin" lies (in the example "C:\usr").
-- If the executable is not in a "bin" directory, return "".
Start := Start - 1;
end loop;
- -- If there is no difits, or if the digits are not preceded by
+ -- If there are no digits, or if the digits are not preceded by
-- the character that precedes a unit index, this is not the ALI file
-- of a unit in a multi-unit source.
(Y : Real;
A : Real := 1.0)
return Real;
- -- Common code for arc tangent after cyele reduction
+ -- Common code for arc tangent after cycle reduction
function Log_Inverse_Epsilon return Real;
-- Function to provide constant: Log (1.0 / Epsilon)
procedure Print_Command
(Tool_Name : String;
Arguments : OS_Lib.Argument_List);
- -- display the command runned when in Verbose mode
+ -- display the command run when in Verbose mode
-------------------
-- Print_Command --
new Argument_List (1 .. 0);
Tools_Error : exception;
- -- Commment required
+ -- Comment required
Verbose : Boolean := False;
Quiet : Boolean := False;
-- Returns an image for F containing the file name, the Line number,
-- and if 'Short' is not true, the subprogram name. When possible, spaces
-- are inserted between the line number and the subprogram name in order
- -- to align images of the same frame. Alignement is cimputed with Max_Fil
+ -- to align images of the same frame. Alignment is computed with Max_Fil
-- & Max_Lin representing the max number of character in a filename or
-- length in a given frame.
-- Create an allocation root from the frames that compose it
function Frames_Of (B : Root_Id) return Frame_Array;
- -- Retreives the Frames of the root's backtrace
+ -- Retrieves the Frames of the root's backtrace
procedure Print_BT (B : Root_Id; Short : Boolean := False);
-- Prints on standard out the backtrace associated with the root B
case OPT_feliminate_unused_debug_types:
/* We arrange for post_option to be able to only set the corresponding
- flag to 1 when explicitely requested by the user. We expect the
+ flag to 1 when explicitly requested by the user. We expect the
default flag value to be either 0 or positive, and expose a positive
-f as a negative value to post_option. */
flag_eliminate_unused_debug_types = -value;
-- Start of processing for Add_Rpath
begin
- -- If firt path, allocate initial Rpath
+ -- If first path, allocate initial Rpath
if Rpath = null then
Rpath := new String (1 .. Initial_Rpath_Length);
Obj_TS := File_Stamp (File_Name_Type'(Name_Find));
-- If library file time stamp is earlier, set
- -- Need_To_Build_Lib and return. String comparaison is
+ -- Need_To_Build_Lib and return. String comparison is
-- used, otherwise time stamps may be too close and the
- -- comparaison would return True, which would trigger
+ -- comparison would return True, which would trigger
-- an unnecessary rebuild of the library.
if String (Lib_TS) < String (Obj_TS) then
-- Common set of options to the gcc command performing the link.
-- On HPUX, this command eventually resorts to collect2, which may
-- generate a C file and compile it on the fly. This compilation shall
- -- also generate position independant code for the final link to
+ -- also generate position independent code for the final link to
-- succeed.
begin
if Opt.Verbose_Mode then
pragma Unreferenced (Interfaces);
pragma Unreferenced (Symbol_Data);
pragma Unreferenced (Auto_Init);
- -- Initialization is done through the contructor mechanism
+ -- Initialization is done through the constructor mechanism
Lib_File : constant String :=
"lib" & Fil.Append_To (Lib_Filename, DLL_Ext);
-- GNAT COMPILER COMPONENTS --
-- --
-- M L I B . T G T . S P E C I F I C --
--- (True64 Version) --
+-- (Tru64 Version) --
-- --
-- B o d y --
-- --
-- --
------------------------------------------------------------------------------
--- This is the True64 version of the body
+-- This is the Tru64 version of the body
with MLib.Fil;
with MLib.Utl;
pragma Unreferenced (Interfaces);
pragma Unreferenced (Symbol_Data);
pragma Unreferenced (Auto_Init);
- -- Initialization is done through the contructor mechanism
+ -- Initialization is done through the constructor mechanism
Lib_File : constant String :=
"lib" & Fil.Append_To (Lib_Filename, DLL_Ext);
-- "libtoto.so" will be a symbolic link to "libtoto.so.2.1" which
-- will be the actual library file.
--
- -- Symbol_Data is used for some patforms, including VMS, to generate
+ -- Symbol_Data is used for some platforms, including VMS, to generate
-- the symbols to be exported by the library.
--
-- Note: Depending on the OS, some of the parameters may not be taken into
function Library_Major_Minor_Id_Supported return Boolean;
-- Indicates if major and minor ids are supported for libraries.
-- If they are supported, then a Library_Version such as libtoto.so.1.2
- -- will have a major id of 1 and a minor id of 2. Then litoto.so,
+ -- will have a major id of 1 and a minor id of 2. Then libtoto.so,
-- libtoto.so.1 and libtoto.so.1.2 will be created, all three designating
-- the same file.
Hash_Num : constant Int := 2**12;
-- Number of headers in the hash table. Current hash algorithm is closely
-- tailored to this choice, so it can only be changed if a corresponding
- -- change is made to the hash alogorithm.
+ -- change is made to the hash algorithm.
Hash_Max : constant Int := Hash_Num - 1;
-- Indexes in the hash header table run from 0 to Hash_Num - 1
/* Like Get_Decoded_Name_String, but the result has all qualification and
package body entity suffixes stripped, and also all letters are upper
- cased. This is used fo rbuilding the enumeration literal table. */
+ cased. This is used for building the enumeration literal table. */
extern void casing__set_all_upper_case (void);
Prev_Node.Set_Last (N);
-- Make sure we have no uninitialized junk in any new entires added.
- -- This ensures that Tree_Gen will not write out any unitialized junk.
+ -- This ensures that Tree_Gen will not write out any uninitialized junk.
for J in Old_Last + 1 .. N loop
Next_Node.Table (J) := Empty;
end if;
end Insert_List_Before_Debug;
- -- Start of prodcessing for Insert_List_Before
+ -- Start of processing for Insert_List_Before
begin
pragma Assert (Is_List_Member (Before));
-- returned. It is an error to call First_Non_Pragma with a Node_Id value
-- or No_List (No_List is not considered to be the same as an empty list).
-- This function also skips N_Null nodes which can result from rewriting
- -- unrecognized or incorrrect pragmas.
+ -- unrecognized or incorrect pragmas.
function Last (List : List_Id) return Node_Id;
pragma Inline (Last);
****************************************************************************/
/* This is the C header corresponding to the Ada package specification for
- Nlists. It also contains the implementations of inlined functions from the
+ Nlists. It also contains the implementations of inlined functions from
the package body for Nlists. It was generated manually from nlists.ads and
nlists.adb and must be kept synchronized with changes in these files.
-- The following mode values represent the current state of processing.
-- The values set here are the default values. Unless otherwise noted,
- -- the value may be reset in Switch-? with an appropropiate switch. In
+ -- the value may be reset in Switch-? with an appropriate switch. In
-- some cases, the values can also be modified by pragmas, and in the
-- case of some binder variables, Gnatbind.Scan_Bind_Arg may modify
-- the default values.
Generating_Code : Boolean := False;
-- GNAT
-- True if the frontend finished its work and has called the backend to
- -- processs the tree and generate the object file.
+ -- process the tree and generate the object file.
Global_Discard_Names : Boolean := False;
-- GNAT, GNATBIND
In_Place_Mode : Boolean := False;
-- GNATMAKE
- -- Set True to store ALI and object files in place ie in the object
+ -- Set True to store ALI and object files in place i.e. in the object
-- directory if these files already exist or in the source directory
-- if not.
-- Check_Semantics after generating an error message.
Optimize_Alignment : Character := 'O';
- -- Settinng of Optimize_Alignment, set to T/S/O for time/space/off. Can
+ -- Setting of Optimize_Alignment, set to T/S/O for time/space/off. Can
-- be modified by use of pragma Optimize_Alignment.
Original_Operating_Mode : Operating_Mode_Type := Generate_Code;
Preprocessing_Data_File : String_Ptr := null;
-- GNAT
- -- Set by switch -gnatep=. The file name of the prepocessing data file.
+ -- Set by switch -gnatep=. The file name of the preprocessing data file.
Print_Generated_Code : Boolean := False;
-- GNAT
Warn_On_Questionable_Missing_Parens : Boolean := True;
-- GNAT
- -- Set to True to generate warnings for cases where parenthese are missing
+ -- Set to True to generate warnings for cases where parentheses are missing
-- and the usage is questionable, because the intent is unclear.
Warn_On_Redundant_Constructs : Boolean := False;
-- This is set in the same manner as Ada_Version_Config. The difference is
-- that the setting of this flag is not ignored for internal and predefined
-- units, which for some purposes do indeed access this value, regardless
- -- of the fact that they are compiled the the most up to date ada version).
+ -- of the fact that they are compiled the most up to date ada version).
Assertions_Enabled_Config : Boolean;
-- GNAT
Use_VADS_Size_Config : Boolean;
-- GNAT
-- This is the value of the configuration switch that controls the use of
- -- VADS_Size instead of Size whereever the attribute Size is used. It can
+ -- VADS_Size instead of Size wherever the attribute Size is used. It can
-- be set True by the use of the pragma Use_VADS_Size in the gnat.adc file.
-- This flag is used to set the initial value for Use_VADS_Size at the
-- start of analyzing each unit. Note however that the setting of this flag
procedure Close_Binder_Output;
-- Closes the file created by Create_Binder_Output, flushing any
- -- buffers etc from writes by Write_Binder_Info.
+ -- buffers etc. from writes by Write_Binder_Info.
procedure Set_Current_File_Name_Index (To : Int);
-- Set value of Current_File_Name_Index (in private part of Osint) to To
Suffix : String) return File_Name_Type;
-- Common processing for Create_List_File, Create_Repinfo_File and
-- Create_Debug_File. Src is the file name used to create the required
- -- output file and Suffix is the desired suffic (dg/rep/xxx for debug/
+ -- output file and Suffix is the desired suffix (dg/rep/xxx for debug/
-- repinfo/list file where xxx is specified extension.
procedure Set_Library_Info_Name;
pragma Assert (Dot_Index /= 0);
- -- Change exctension to adt
+ -- Change extension to adt
Name_Buffer (Dot_Index) := '.';
Name_Buffer (Dot_Index + 1) := 'a';
procedure Close_Output_Library_Info;
-- Closes the file created by Create_Output_Library_Info, flushing any
- -- buffers etc from writes by Write_Library_Info.
+ -- buffers etc. from writes by Write_Library_Info.
procedure Read_Library_Info
(Name : out File_Name_Type;
-- that are used to locate the actual file and for the purpose of message
-- construction. These names need not be accessible by Name_Find, and can
-- be therefore created by using routine Name_Enter. The files in question
- -- are file names with a prefix directory (ie the files not in the current
- -- directory). File names without a prefix directory are entered with
- -- Name_Find because special values might be attached to the various Info
- -- fields of the corresponding name table entry.
+ -- are file names with a prefix directory (i.e., the files not in the
+ -- current directory). File names without a prefix directory are entered
+ -- with Name_Find because special values might be attached to the various
+ -- Info fields of the corresponding name table entry.
-----------------------
-- Local Subprograms --
Look_In_Primary_Directory_For_Current_Main : Boolean := False;
-- When this variable is True, Find_File only looks in Primary_Directory
-- for the Current_Main file. This variable is always set to True for the
- -- compiler. It is also True for gnatmake, when the soucr name given on
+ -- compiler. It is also True for gnatmake, when the source name given on
-- the command line has directory information.
Current_Full_Source_Name : File_Name_Type := No_File;
-- The file hash table is provided to free the programmer from any
-- efficiency concern when retrieving full file names or time stamps of
-- source files. If the programmer calls Source_File_Data (Cache => True)
- -- he is guaranteed that the price to retrieve the full name (ie with
+ -- he is guaranteed that the price to retrieve the full name (i.e. with
-- directory info) or time stamp of the file will be payed only once, the
-- first time the full name is actually searched (or the first time the
-- time stamp is actually retrieved). This is achieved by employing a hash
function Executable_Prefix return String_Ptr is
function Get_Install_Dir (Exec : String) return String_Ptr;
- -- S is the executable name preceeded by the absolute or relative
+ -- S is the executable name preceded by the absolute or relative
-- path, e.g. "c:\usr\bin\gcc.exe" or "..\bin\gcc".
---------------------
Canonical_File_Len : Integer;
begin
- -- Retrieve the expanded directoy names and build the list
+ -- Retrieve the expanded directory names and build the list
for J in 1 .. Num_Files loop
Canonical_File_Addr := To_Canonical_File_List_Next;
T : File_Type) return File_Name_Type;
-- Finds a source, library or config file depending on the value of T
-- following the directory search order rules unless N is the name of the
- -- file just read with Next_Main_File and already contains directiory
+ -- file just read with Next_Main_File and already contains directory
-- information, in which case just look in the Primary_Directory. Returns
-- File_Name_Type of the full file name if found, No_File if file not
-- found. Note that for the special case of gnat.adc, only the compilation
-- Same as above for a path name
type String_Access_List is array (Positive range <>) of String_Access;
- -- Deferenced type used to return a list of file specs in
+ -- Dereferenced type used to return a list of file specs in
-- To_Canonical_File_List.
type String_Access_List_Access is access all String_Access_List;
new String'("ada_source_path");
Objects_Search_File : constant String_Access :=
new String'("ada_object_path");
- -- Names of the files containg the default include or objects search
+ -- Names of the files containing the default include or objects search
-- directories. These files, located in Sdefault.Search_Dir_Prefix, do
-- not necessarily exist.
-- LF
-- The source is terminated by an EOF (16#1A#) character, which is
- -- the last charcater of the returned source bufer (note that any
+ -- the last character of the returned source buffer (note that any
-- EOF characters in positions other than the last source character
-- are treated as representing blanks).
--
-- Source_File_Stamp (N) is made. This may be undesirable in certain
-- applications as this is uselessly slow if source file data does not
-- change during program execution. When this procedure is called with
- -- Cache => True access to source file data does not encurr a penalty if
+ -- Cache => True access to source file data does not incur a penalty if
-- this data was previously retrieved.
-------------------------------------------
-- whose name is given by the parameter Name.
--
-- See description of Read_Source_File for details on the format of the
- -- returned text buffer (the format is identical). THe lower bound of
+ -- returned text buffer (the format is identical). The lower bound of
-- the Text_Buffer is always zero
--
-- If the specified file cannot be opened, then the action depends on
-- using Read_Library_Info, including appropriate directory information.
-- Calling this routine entails no library file directory lookup
-- penalty. Note that the object file corresponding to a library file
- -- is not actually read. Its time stamp is fected when the flag
+ -- is not actually read. Its time stamp is affected when the flag
-- Opt.Check_Object_Consistency is set.
function Current_Library_File_Stamp return Time_Stamp_Type;
procedure Restore_Output_Buffer (S : Saved_Output_Buffer);
-- Restore previously saved output buffer. The value in S is not affected
- -- so it is legtimate to restore a buffer more than once.
+ -- so it is legitimate to restore a buffer more than once.
--------------------------
-- Debugging Procedures --
(Cunit : Node_Id;
Loc : Source_Ptr;
SR_Present : Boolean);
- -- This procedure is used to generate a line of output for the a unit in
+ -- This procedure is used to generate a line of output for a unit in
-- the source program. Cunit is the node for the compilation unit, and
-- Loc is the source location for the start of the unit in the source
-- file (which is not necessarily the Sloc of the Cunit node). This
Cunit_Error_Flag : Boolean := False;
-- This flag is set True if we have to scan for a compilation unit
-- token. It is used to ensure clean termination in such cases by
- -- not insisting on being at the end of file, and, in the sytax only
+ -- not insisting on being at the end of file, and, in the syntax only
-- case by not scanning for additional compilation units.
Cunit_Location : Source_Ptr;
if Token /= Tok_EOF then
-- If we already had to scan for a compilation unit, then don't
- -- give any further error message, since it just sems to make
+ -- give any further error message, since it just seems to make
-- things worse, and we already gave a serious error message.
if Cunit_Error_Flag then
First_Flag := True;
-- Loop through names in one with clause, generating a separate
- -- N_With_Clause node for each nam encountered.
+ -- N_With_Clause node for each name encountered.
loop
With_Node := New_Node (N_With_Clause, Token_Ptr);
-- [abstract] [limited | synchronized]
-- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
- -- The caller has checked the initial token(s) is/are NEW, ASTRACT NEW,
+ -- The caller has checked the initial token(s) is/are NEW, ABSTRACT NEW,
-- or LIMITED NEW, ABSTRACT LIMITED NEW, SYNCHRONIZED NEW or ABSTRACT
-- SYNCHRONIZED NEW.
-- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
- -- Handled by scanner as part of numeric lIteral handing (see 2.4)
+ -- Handled by scanner as part of numeric literal handing (see 2.4)
--------------------
-- 2.4.1 Numeral --
Scan; -- past ALIASED
end if;
- -- The following procesing deals with either a private type declaration
+ -- The following processing deals with either a private type declaration
-- or a full type declaration. In the private type case, we build the
-- N_Private_Type_Declaration node, setting its Tagged_Present and
-- Limited_Present flags, on encountering the Private keyword, and
return Range_Node;
-- Case of subtype mark (optionally qualified simple name or an
- -- attribute whose prefix is an optionally qualifed simple name)
+ -- attribute whose prefix is an optionally qualified simple name)
elsif Expr_Form = EF_Simple_Name
or else Nkind (Expr_Node) = N_Attribute_Reference
end P_Known_Discriminant_Part_Opt;
-------------------------------------
- -- 3.7 DIscriminant Specification --
+ -- 3.7 Discriminant Specification --
-------------------------------------
-- Parsed by P_Known_Discriminant_Part_Opt (3.7)
-- Ada 2005 (AI-251): In case of not-synchronized interfaces that have
-- a list of interfaces we build a derived_type_definition node. This
- -- simplifies the semantic analysis (and hence further mainteinance)
+ -- simplifies the semantic analysis (and hence further maintenance)
else
if Token /= Tok_And then
end if;
end P_Aggregate;
- -------------------------------------------------
- -- 4.3 Aggregate or Parenthesized Expresssion --
- -------------------------------------------------
+ ------------------------------------------------
+ -- 4.3 Aggregate or Parenthesized Expression --
+ ------------------------------------------------
-- This procedure parses out either an aggregate or a parenthesized
-- expression (these two constructs are closely related, since a
Node1 := P_Term;
end if;
- -- In the following, we special-case a sequence of concatentations of
+ -- In the following, we special-case a sequence of concatenations of
-- string literals, such as "aaa" & "bbb" & ... & "ccc", with nothing
-- else mixed in. For such a sequence, we return a tree representing
-- "" & "aaabbb...ccc" (a single concatenation). This is done only if
-- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
- -- STATEMENT_INDENTIFIER ::= DIRECT_NAME
+ -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
-- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
-- (not an OPERATOR_SYMBOL)
-- Note: in the case of OVERRIDING keyword used in Ada 95 mode, the
-- declaration circuit already gave an error message and changed the
- -- tokem to Tok_Overriding.
+ -- token to Tok_Overriding.
elsif Token = Tok_Overriding then
Scan; -- past OVERRIDING
Restore_Scan_State (Scan_State); -- to Id
Set_Parameter_Specifications (Decl_Node, P_Formal_Part);
- -- Else if Id wi no comma or colon, must be discrete subtype defn
+ -- Else if Id without comma or colon, must be discrete subtype
+ -- defn
else
Restore_Scan_State (Scan_State); -- to Id
Ecall_Node := P_Name;
-- ?? The following two clauses exactly parallel code in ch5
- -- and should be commoned sometime
+ -- and should be combined sometime
if Nkind (Ecall_Node) = N_Indexed_Component then
declare
End_Statements;
- -- Here we have a selective accept or an an asynchronous select (first
+ -- Here we have a selective accept or an asynchronous select (first
-- token after SELECT is other than a designator token).
else
-- Note: the reason that we accept THEN ABORT as a terminator for
-- the sequence of statements is for error recovery which allows
- -- for misuse of an accept statement as a triggering statememt.
+ -- for misuse of an accept statement as a triggering statement.
Set_Statements
(Accept_Alt_Node, P_Sequence_Of_Statements (SS_Eltm_Ortm_Tatm));
-- Note: the reason that we accept THEN ABORT as a terminator for
-- the sequence of statements is for error recovery which allows
- -- for misuse of an accept statement as a triggering statememt.
+ -- for misuse of an accept statement as a triggering statement.
Set_Statements
(Delay_Alt_Node, P_Sequence_Of_Statements (SS_Eltm_Ortm_Tatm));
-- opening label, with the components all marked as not
-- from source, and Is_End_Label set in the identifier
-- or operator symbol. The location for all components
- -- is the curent token location.
+ -- is the current token location.
-- Case of child unit name
else
-- A special check. If we have END; followed by an end of file,
-- WITH or SEPARATE, then if we are not at the outer level, then
- -- we have a sytax error. Consider the example:
+ -- we have a syntax error. Consider the example:
-- ...
-- declare
-- First we see how good the current END entry is with respect to
-- what we expect. It is considered pretty good if the token is OK,
- -- and either the label or the column matches. an END for RECORD is
+ -- and either the label or the column matches. An END for RECORD is
-- always considered to be pretty good in the record case. This is
-- because not only does a record disallow a nested structure, but
-- also it is unlikely that such nesting could occur by accident.
procedure No_Header (N : Elmt_Id);
-- The label N is known not to be a loop header. Scan forward and
- -- remove all subsequent goto's that may have this node as a target.
+ -- remove all subsequent gotos that may have this node as a target.
procedure Process_Goto (N : Elmt_Id);
- -- N is a forward jump. Scan forward and remove all subsequent goto's
+ -- N is a forward jump. Scan forward and remove all subsequent gotos
-- that may have the same target, to preclude spurious loops.
procedure Rewrite_As_Loop
-- Process Casing argument of pattern form of pragma
procedure Process_Dot_Replacement (Arg : Node_Id);
- -- Process Dot_Replacement argument of patterm form of pragma
+ -- Process Dot_Replacement argument of pattern form of pragma
---------------
-- Get_Fname --
loop
-- Terminating tokens are those in class Eterm and also RANGE,
-- DIGITS or DELTA if not preceded by an apostrophe (if they are
- -- preceded by an apostrophe, then they are attributes). In addiion,
+ -- preceded by an apostrophe, then they are attributes). In addition,
-- at the outer parentheses level only, we also consider a comma,
-- right parenthesis or vertical bar to terminate an expression.
procedure Resync_Init is
begin
-- The following check makes sure we do not get stuck in an infinite
- -- loop resynchonizing and getting nowhere. If we are called to do a
+ -- loop resynchronizing and getting nowhere. If we are called to do a
-- resynchronize and we are exactly at the same point that we left off
-- on the last resynchronize call, then we force at least one token to
-- be skipped so that we make progress!
end if;
end loop;
- -- Fall out of loop with resyncrhonization complete
+ -- Fall out of loop with resynchronization complete
Resync_Resume;
end Resync_Past_Semicolon_Or_To_Loop_Or_Then;
end if;
end loop;
- -- Fall out of loop with resyncrhonization complete
+ -- Fall out of loop with resynchronization complete
Resync_Resume;
end Resync_To_When;
else
-- Deal with pragma. If pragma is not at start of line, it is
-- considered misplaced otherwise we treat it as a normal
- -- missing semicolong case.
+ -- missing semicolon case.
if Token = Tok_Pragma
and then not Token_Is_At_Start_Of_Line
Token := T;
return True;
- -- A special check for an illegal abbrevation
+ -- A special check for an illegal abbreviation
elsif Name_Len < S'Length
and then Name_Len >= 4
-- 4. We encounter a valid pragma INTERFACE or IMPORT that effectively
-- supplies the missing body. In this case we reset the entry.
- -- 5. We encounter the end of the declarative region without encoutering
+ -- 5. We encounter the end of the declarative region without encountering
-- a BEGIN first. In this situation we simply reset the entry. We know
-- that there is a missing body, but it seems more reasonable to let the
-- later semantic checking discover this.
----------------------------------------------------
-- Note: throughout the parser, the terms reserved word and keyword
- -- are used interchangably to refer to the same set of reserved
+ -- are used interchangeably to refer to the same set of reserved
-- keywords (including until, protected, etc).
-- If a reserved word is used in place of an identifier, the parser
-- further confirmation.
-- In the case of an identifier appearing in the identifier list of a
- -- declaration, the appearence of a comma or colon right after the
+ -- declaration, the appearance of a comma or colon right after the
-- keyword on the same line is taken as confirmation. For an enumeration
-- literal, a comma or right paren right after the identifier is also
-- treated as adequate confirmation.
-- The following type is used in calls to Is_Reserved_Identifier and
-- also to P_Defining_Identifier and P_Identifier. The default for all
- -- these functins is that reserved words in reserved word case are not
+ -- these functions is that reserved words in reserved word case are not
-- considered to be reserved identifiers. The Id_Check value indicates
-- tokens, which if they appear immediately after the identifier, are
-- taken as confirming that the use of an identifier was expected
-- end;
-- The trouble is that the section of text from PROCEDURE B through END;
- -- consitutes a valid procedure body, and the danger is that we find out
+ -- constitutes a valid procedure body, and the danger is that we find out
-- far too late that something is wrong (indeed most compilers will behave
-- uncomfortably on the above example).
-- reserve the END; for the outer level.) For more details on this aspect
-- of the handling, see package Par.Endh.
- -- If we can avoid eating up the END; then the result in the absense of
+ -- If we can avoid eating up the END; then the result in the absence of
-- any additional steps would be to post a missing END referring back to
-- the subprogram with the bogus IS. Similarly, if the enclosing package
-- has no BEGIN, then the result is a missing BEGIN message, which again
-- allowed).
procedure Skip_Declaration (S : List_Id);
- -- Used when scanning statements to skip past a mispaced declaration
+ -- Used when scanning statements to skip past a misplaced declaration
-- The declaration is scanned out and appended to the given list.
-- Token is known to be a declaration token (in Token_Class_Declk)
-- on entry, so there definition is a declaration to be scanned.
-- Used if an error occurs while scanning a parenthesized list of items
-- separated by semicolons. The scan pointer is advanced to the next
-- semicolon or right parenthesis at the outer parenthesis level, or
- -- to the next is or RETURN keyword occurence, whichever comes first.
+ -- to the next is or RETURN keyword occurrence, whichever comes first.
procedure Resync_Cunit;
-- Synchronize to next token which could be the start of a compilation
procedure List_Symbols (Foreword : String) is
Order : array (0 .. Integer (Symbol_Table.Last (Mapping)))
of Symbol_Id;
- -- After alphabetical sorting, this array stores thehe indices of
+ -- After alphabetical sorting, this array stores the indices of
-- the symbols in the order they are displayed.
function Lt (Op1, Op2 : Natural) return Boolean;
end if;
-- Now, scan the first token of the next line. If the token is EOF,
- -- the scan ponter will not move, and the token will still be EOF.
+ -- the scan pointer will not move, and the token will still be EOF.
Set_Ignore_Errors (To => True);
Scan.all;
-- Tok_Identifier with the corresponding Token_Name.
procedure List_Symbols (Foreword : String);
- -- List the symbols used por preprocessing a file, with their values.
+ -- List the symbols used for preprocessing a file, with their values.
-- If Foreword is not empty, Output Foreword before the list.
end Prep;
""" not found");
end if;
- -- Initialize the sanner and set its behavior for a processing data file
+ -- Initialize the scanner and set its behavior for a processing data
+ -- file
Scn.Scanner.Initialize_Scanner (Source_Index_Of_Preproc_Data_File);
Scn.Scanner.Set_End_Of_Line_As_Token (True);
function Package_Name_List return Strings.String_List;
-- Returns the list of valid package names, including those added by
-- procedures Register_New_Package below. The String_Access components of
- -- the returned String_List should never be feeed.
+ -- the returned String_List should never be freed.
procedure Initialize;
-- Initialize the predefined project level attributes and the predefined
Current_Package : Project_Node_Id;
Packages_To_Check : String_List_Access);
-- Parse declarative items. Depending on In_Zone, some declarative
- -- items may be forbiden.
+ -- items may be forbidden.
procedure Parse_Package_Declaration
(In_Tree : Project_Node_Tree_Ref;
when others =>
exit;
- -- We are leaving Parse_Declarative_Items positionned
+ -- We are leaving Parse_Declarative_Items positioned
-- at the first token after the list of declarative items.
-- It could be "end" (for a project, a package declaration or
-- a case construction) or "when" (for a case construction)
-- For a non-library project, add the object
-- directory, if it is not a virtual project, and if
-- there are Ada sources or if the project is an
- -- extending project. if There Are No Ada sources,
+ -- extending project. If there are no Ada sources,
-- adding the object directory could disrupt the order
-- of the object dirs in the path.
end if;
-- Scan the directory path to see if "-" is one of the directories.
- -- Remove each occurence of "-" and set Add_Default_Dir to False.
+ -- Remove each occurrence of "-" and set Add_Default_Dir to False.
-- Also resolve relative paths and symbolic links.
First := 3;
Suffix2 : Array_Element_Id;
begin
- -- If some suffixs have been specified, we make sure that
+ -- If some suffixes have been specified, we make sure that
-- for each language for which a default suffix has been
-- specified, there is a suffix specified, either the one
-- in the project file or if there were none, the default.
Suffix := Element.Next;
end loop;
- -- Put the resulting array as the specification suffixs
+ -- Put the resulting array as the specification suffixes
Data.Naming.Spec_Suffix := Spec_Suffixs;
end if;
Suffix := Element.Next;
end loop;
- -- Put the resulting array as the implementation suffixs
+ -- Put the resulting array as the implementation suffixes
Data.Naming.Body_Suffix := Impl_Suffixs;
end if;
end if;
-- If attribute Library_Reference_Symbol_File is not defined,
- -- symbol policy cannot be Compilant or Controlled.
+ -- symbol policy cannot be Compliant or Controlled.
if Lib_Ref_Symbol_File.Default then
if Data.Symbol_Data.Symbol_Policy = Compliant
private package Prj.Nmsc is
-- It would be nicer to have a higher level statement of what these
- -- procedures do (related to their names), rather than just an english
+ -- procedures do (related to their names), rather than just an English
-- language summary of the implementation ???
procedure Check
Column : Natural := 0;
-- Column number of the last character in the line. Used to avoid
- -- outputing lines longer than Max_Line_Length.
+ -- outputting lines longer than Max_Line_Length.
First_With_In_List : Boolean := True;
-- Indicate that the next with clause is first in a list such as
-- If no such element were found, create a new one
-- and insert it in the element list, with the
- -- propoer value.
+ -- proper value.
if The_Array_Element = No_Array_Element then
Array_Element_Table.Increment_Last
From_Project_Node_Tree));
-- If it is an extending project, inherit all packages
- -- from the extended project that are not explicitely defined
+ -- from the extended project that are not explicitly defined
-- or renamed. Also inherit the languages, if attribute Languages
- -- is not explicitely defined.
+ -- is not explicitly defined.
Processed_Data := In_Tree.Projects.Table (Project);
-- On exit, Variable is the node of the variable or attribute reference.
-- A variable reference is made of one to three simple names.
-- An attribute reference is made of one or two simple names,
- -- followed by an apostroph, followed by the attribute simple name.
+ -- followed by an apostrophe, followed by the attribute simple name.
end Prj.Strt;
-- N_Variable_Reference.
subtype Package_Declaration_Id is Project_Node_Id;
- -- Used to designate a node whose expected kind is N_Proect_Declaration
+ -- Used to designate a node whose expected kind is N_Project_Declaration
type Project_Node_Kind is
(N_Project,
Src_Index : Int := 0;
-- Index of a unit in a multi-unit source.
- -- Onli for some N_Attribute_Declaration and N_Literal_String.
+ -- Only for some N_Attribute_Declaration and N_Literal_String.
Path_Name : Path_Name_Type := No_Path;
-- See below for what Project_Node_Kind it is used
Flag1 : Boolean := False;
-- This flag is significant only for:
- -- N_Attribute_Declaration and N_Atribute_Reference
+ -- N_Attribute_Declaration and N_Attribute_Reference
-- It indicates for an associative array attribute, that the
-- index is case insensitive.
-- N_Comment - it indicates that the comment is preceded by an
Name_Buffer (1 .. Name_Len) := To_Lower (Name_Buffer (1 .. Name_Len));
Lang := Name_Find;
- -- Look for an element of the spec sufix array indexed by the language
+ -- Look for an element of the spec suffix array indexed by the language
-- name. If one is found, put the default value.
Suffix := In_Tree.Private_Part.Default_Naming.Spec_Suffix;
Array_Element_Table.Last (In_Tree.Array_Elements);
end if;
- -- Look for an element of the body sufix array indexed by the language
+ -- Look for an element of the body suffix array indexed by the language
-- name. If one is found, put the default value.
Suffix := In_Tree.Private_Part.Default_Naming.Body_Suffix;
-- unit based.
Naming_Data : Lang_Naming_Data;
- -- The naming data for the languages (prefixs, etc)
+ -- The naming data for the languages (prefixes, etc.)
Compiler_Driver : File_Name_Type := No_File;
-- The name of the executable for the compiler of the language
-- Hold the value of attribute Binder'Required_Switches for the language
Binder_Prefix : Name_Id := No_Name;
- -- Hold the value of attribute Binder'Prefixthe language
+ -- Hold the value of attribute Binder'Prefix for the language
Toolchain_Version : Name_Id := No_Name;
-- Hold the value of attribute Toolchain_Version for the language