diff options
author | Robert Dewar <dewar@adacore.com> | 2005-11-15 14:59:30 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-11-15 14:59:30 +0100 |
commit | 383b2b42cbdd3868ebccf2fdf107ba4e2741bf55 (patch) | |
tree | 1749f6b7d009bff6be0c884041ec399989dfcfc0 /gcc/ada/scans.ads | |
parent | 0bce6c77ca1f0e57afe1ff257d0a4ea87a94e75f (diff) | |
download | gcc-383b2b42cbdd3868ebccf2fdf107ba4e2741bf55.tar.gz |
gprep.adb: Implement -C switch to scan comments
2005-11-14 Robert Dewar <dewar@adacore.com>
Vincent Celier <celier@adacore.com>
* gprep.adb: Implement -C switch to scan comments
* scng.adb: Scan comment symbol separately if Replace_In_Comments set
* scans.ads: Comment updates (including new use of Tok_Comment in
preprocessing)
* opt.ads: Add documentation for flags that are used by gprmake,
currently and in the next version of gprmake.
(Verbosity_Level): New variable
Add Replace_In_Comments switch
* vms_data.ads: Add VMS equivalent for new gnatmake switches -vl, -vm
and -vm.
Add /REPLACE_IN_COMMENTS for gnatprep -C switch
From-SVN: r106983
Diffstat (limited to 'gcc/ada/scans.ads')
-rw-r--r-- | gcc/ada/scans.ads | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/gcc/ada/scans.ads b/gcc/ada/scans.ads index 955637acb76..7e2a58078a1 100644 --- a/gcc/ada/scans.ads +++ b/gcc/ada/scans.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -190,22 +190,27 @@ package Scans is Tok_Dot_Dot, -- .. Sterm, Chtok - -- The following three entries are used only when scanning project - -- files. - Tok_Project, Tok_Extends, Tok_External, - Tok_Comment, + -- These three entries represent keywords for the project file language + -- and can be returned only in the case of scanning project files. - -- The following entry is used by the preprocessor and when scanning - -- project files. + Tok_Comment, + -- This entry is used when scanning project files (where it represents + -- an entire comment), and in preprocessing with the -C switch set + -- (where it represents just the "--" of a comment). For the project + -- file case, the text of the comment is stored in Tok_End_Of_Line, - - -- The following entry is used by the preprocessor + -- Represents an end of line. Not used during normal compilation scans + -- where end of line is ignored. Active for preprocessor scanning and + -- also when scanning project files (where it is neede because of ???) Tok_Special, + -- Used only in preprocessor scanning (to represent one of the + -- characters '#', '$', '?', '@', '`', '\', '^', '~', or '_'. The + -- character value itself is stored in Scans.Special_Character. No_Token); -- No_Token is used for initializing Token values to indicate that @@ -394,7 +399,7 @@ package Scans is -- We do things this way to minimize the impact on comment scanning. Character_Code : Char_Code; - -- Valid only when Token is Tok_Char_Literal. + -- Valid only when Token is Tok_Char_Literal Real_Literal_Value : Ureal; -- Valid only when Token is Tok_Real_Literal @@ -411,11 +416,17 @@ package Scans is -- Valid only when Token = Tok_String_Literal. Special_Character : Character; - -- Valid only when Token = Tok_Special + -- Valid only when Token = Tok_Special. Returns one of the characters + -- '#', '$', '?', '@', '`', '\', '^', '~', or '_'. + -- + -- Why only this set? What about wide characters??? Comment_Id : Name_Id := No_Name; -- Valid only when Token = Tok_Comment. Store the string that follows - -- the two '-' of a comment. + -- the "--" of a comment when scanning project files. + -- + -- Is it really right for this to be a Name rather than a String, what + -- about the case of Wide_Wide_Characters??? -------------------------------------------------------- -- Procedures for Saving and Restoring the Scan State -- |