OSDN Git Service

2004-05-17 Steve Kargl <kargls@comcast.net>
[pf3gnuchains/gcc-fork.git] / gcc / ada / xtreeprs.adb
index 995401e..e3a9518 100644 (file)
@@ -6,9 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---                            $Revision: 1.33 $
---                                                                          --
---          Copyright (C) 1992-2001 Free Software Foundation, Inc.
+--          Copyright (C) 1992-2003 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- --
@@ -22,7 +20,7 @@
 -- MA 02111-1307, USA.                                                      --
 --                                                                          --
 -- GNAT was originally developed  by the GNAT team at  New York University. --
--- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
 --                                                                          --
 ------------------------------------------------------------------------------
 
@@ -73,12 +71,9 @@ procedure XTreeprs is
    Prefix     : VString := Nul;
    S          : VString := Nul;
    S1         : VString := Nul;
-   Sinforev   : VString := Nul;
    Syn        : VString := Nul;
    Synonym    : VString := Nul;
-   Temprev    : VString := Nul;
    Term       : VString := Nul;
-   Treeprsrev : VString := Nul;
 
    OutS : File_Type;
    --  Output file
@@ -128,10 +123,6 @@ procedure XTreeprs is
 
    wsp : Pattern := Span (' ' & ASCII.HT);
 
-   Get_SRev : Pattern := BreakX ('$') & "$Rev" & "ision: "
-                           & Break (' ') * Sinforev;
-   Get_TRev : Pattern := BreakX ('$') & "$Rev" & "ision: "
-                           & Break (' ') * Temprev;
    Is_Temp  : Pattern := BreakX ('T') * A & "T e m p l a t e";
    Get_Node : Pattern := wsp & "--  N_" & Rest * Node;
    Tst_Punc : Pattern := Break (" ,.");
@@ -149,8 +140,6 @@ procedure XTreeprs is
 begin
    Anchored_Mode := True;
 
-   Match ("$Revision: 1.33 $", "$Rev" & "ision: " & Break (' ') * Treeprsrev);
-
    if Argument_Count > 0 then
       Create (OutS, Out_File, Argument (1));
    else
@@ -179,58 +168,27 @@ begin
    Set (Special, "Raises_Constraint_Error", True);
    Set (Special, "Right_Opnd",              True);
 
-   --  Get sinfo revs and write header to output file
-
-   loop
-      Line := Get_Line (InS);
-      Lineno := Lineno + 1;
-
-      if Line = "" then
-         raise Err;
-      end if;
-
-      exit when Match (Line, Get_SRev);
-   end loop;
-
    --  Read template header and generate new header
 
    loop
       Line := Get_Line (InT);
 
-      if Match (Line, Get_TRev) then
-         Put_Line
-           (OutS,
-            "--                Generated by xtreeprs revision " &
-            Treeprsrev & " using                 --");
+      --  Skip lines describing the template
 
-         Put_Line
-           (OutS,
-            "--                         sinfo.ads revision " &
-            Sinforev & "                          --");
-
-         Put_Line
-           (OutS,
-            "--                        treeprs.adt revision "
-            & Temprev & "                          --");
-
-      else
-         --  Skip lines describing the template
-
-         if Match (Line, "--  This file is a template") then
-            loop
-               Line := Get_Line (InT);
-               exit when Line = "";
-            end loop;
-         end if;
-
-         exit when Match (Line, "package");
+      if Match (Line, "--  This file is a template") then
+         loop
+            Line := Get_Line (InT);
+            exit when Line = "";
+         end loop;
+      end if;
 
-         if Match (Line, Is_Temp, M) then
-            Replace (M, A & "    S p e c    ");
-         end if;
+      exit when Match (Line, "package");
 
-         Put_Line (OutS, Line);
+      if Match (Line, Is_Temp, M) then
+         Replace (M, A & "    S p e c    ");
       end if;
+
+      Put_Line (OutS, Line);
    end loop;
 
    Put_Line (OutS, Line);