diff options
Diffstat (limited to 'gcc/ada/xtreeprs.adb')
-rw-r--r-- | gcc/ada/xtreeprs.adb | 65 |
1 files changed, 12 insertions, 53 deletions
diff --git a/gcc/ada/xtreeprs.adb b/gcc/ada/xtreeprs.adb index 995401e4984..e6433845f80 100644 --- a/gcc/ada/xtreeprs.adb +++ b/gcc/ada/xtreeprs.adb @@ -6,7 +6,6 @@ -- -- -- B o d y -- -- -- --- $Revision: 1.33 $ -- -- -- Copyright (C) 1992-2001 Free Software Foundation, Inc. -- -- @@ -73,12 +72,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 +124,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 +141,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 +169,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); |