OSDN Git Service

2006-02-13 Thomas Quinot <quinot@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Feb 2006 09:32:12 +0000 (09:32 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Feb 2006 09:32:12 +0000 (09:32 +0000)
commitec677a6c3a40284ccffa6de052697c0f56bc92d3
treed3b7db1cb334e3cd4b6396c5d647f032daea89f5
parent5910b3704b24a6d29d5f01e71284b0ae7eba8f54
2006-02-13  Thomas Quinot  <quinot@adacore.com>
    Vincent Celier  <celier@adacore.com>
    Robert Dewar  <dewar@adacore.com>

* ali-util.adb (Get_File_Checksum): Update to account for change in
profile of Initialize_Scanner.

* gprep.adb (Gnatprep): Update to account for change in profile of
Initialize_Scanner.
(Process_One_File): Same.

* lib.adb (Get_Code_Or_Source_Unit): New subprogram factoring the
common code between Get_Code_Unit and Get_Source_Unit. Reimplement
that behaviour using the new Unit information recorded in the source
files table, rather than going through all units every time.
(Get_Code_Unit): Reimplement in terms of Get_Code_Or_Source_Unit.
(Get_Source_Unit): Same.

* prepcomp.adb (Parse_Preprocessing_Data_File): Update to account for
change in profile of Initialize_Scanner.
(Prepare_To_Preprocess): Same.

* lib.ads: Fix typo in comment (templace -> template).

* prj-part.adb (Parse_Single_Project): Update to account for change in
profile of Initialize_Scanner.

* scn.adb (Initialize_Scanner): Account for change in profile of
Scng.Initialize_Scanner: set Current_Source_Unit in Scn instead of Scng.
Also record the association of the given Source_File_Index to the
corresponding Unit_Number_Type.

* scng.ads, scng.adb (Initialize_Scanner.Set_Reserved): Remove
procedure.
(Initialize_Scanner): Call Scans.Initialize_Ada_Keywords.
Remove Unit formal for generic scanner: this formal
is only relevant to Scn (the scanner instance used to parse Ada source
files), not to other instances. Update comment accordingly.
(Scan): Use new function Snames.Is_Keyword_Name.

* sinfo-cn.adb: Fix typo in comment.

* sinput.adb (Unit, Set_Unit): Accessors for new source file attribute
Unit.

* sinput.ads (Source_File_Record): New component Unit, used to capture
the unit identifier (if any) associated to a source file.

* sinput-c.adb, sinput-l.adb (Load_File): Initialize new component
Unit in Source_File_Record.

* sinput-p.adb (Source_File_Is_Subunit): Update to account for change
in profile of Initialize_Scanner.

* scans.adb (Initialize_Ada_Keywords): New procedure

* scans.ads (Initialize_Ada_Keywords): New procedure to initialize the
Ada keywords in the Namet table, without the need to call
Initialize_Scanner.

* snames.adb: Add pragma Ada_2005 (synonym for Ada_05)
(Is_Keyword_Name): New function

* snames.ads: Add subtype Configuration_Pragma_Names
Add pragma Ada_2005 (synonym for Ada_05)
(Is_Keyword_Name): New function

* snames.h: Add pragma Ada_2005 (synonym for Ada_05)

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111032 138bc75d-0d04-0410-961f-82ee72b054a4
20 files changed:
gcc/ada/ali-util.adb
gcc/ada/gprep.adb
gcc/ada/lib.adb
gcc/ada/lib.ads
gcc/ada/prepcomp.adb
gcc/ada/prj-part.adb
gcc/ada/scans.adb
gcc/ada/scans.ads
gcc/ada/scn.adb
gcc/ada/scng.adb
gcc/ada/scng.ads
gcc/ada/sinfo-cn.adb
gcc/ada/sinput-c.adb
gcc/ada/sinput-l.adb
gcc/ada/sinput-p.adb
gcc/ada/sinput.adb
gcc/ada/sinput.ads
gcc/ada/snames.adb
gcc/ada/snames.ads
gcc/ada/snames.h