DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: B T

⟦60ffd815a⟧ TextFile

    Length: 3488 (0xda0)
    Types: TextFile
    Names: »B«

Derivation

└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
    └─⟦5cb1d1d7f⟧ »DATA« 
        └─⟦3b1ee7bd8⟧ 
            └─⟦this⟧ 

TextFile

with Source_Instrumenter_Declarations;   -- Parameters of pretty printer
with Source_Instrumenter_Utilities;
with Parserdeclarations;            -- declarations for parser
with Parser;                        -- contains parse and Apply_Actions
with Host_Dependencies;
with Simple_Paginated_Output;
with Text_Io;
with User_Interface;

procedure Source_Instrument (Source_File : in String;
                             Listing_File : in String := "";
                             Instrumented_File : in String := "") is

    package Sid renames Source_Instrumenter_Declarations;
    package Siu renames Source_Instrumenter_Utilities;
    package Pd renames Parserdeclarations;
    package Hd renames Host_Dependencies;
    package Po renames Simple_Paginated_Output;

    -- Objects --

    Return_Value : Pd.Parsestackelement;
    Input_File : Text_Io.File_Type;

begin
    Text_Io.Open (File => Input_File,
                  Mode => Text_Io.In_File,
                  Name => Source_File);


    Po.Create_Paginated_File (File_Handle => Sid.Listing_File,
                              File_Name => Listing_File,
                              Header_Size => 6);
    Po.Set_Header (File_Handle => Sid.Listing_File,
                   Header_Line => 1,
                   Header_Text => "Source Instrumenter Output on ~d at " &
                                     "~t                    ~p");
    Po.Set_Header (File_Handle => Sid.Listing_File,
                   Header_Line => 2,
                   Header_Text => "Source File: " & Source_File);
    Po.Set_Header (File_Handle => Sid.Listing_File,
                   Header_Line => 4,
                   Header_Text => "Bkpt");
    Po.Set_Header (File_Handle => Sid.Listing_File,
                   Header_Line => 5,
                   Header_Text => "Number  Source Text");
    Po.Set_Header (File_Handle => Sid.Listing_File,
                   Header_Line => 6,
                   Header_Text => "------  -----------");
    Po.Create_Paginated_File (File_Handle => Sid.Instrumented_File,
                              File_Name => Instrumented_File,
                              Header_Size => 0,
                              Page_Size => 0);

    User_Interface.Get_Instrumenting_Instructions
       (Siu.Current_Trace_Mode, Siu.Do_Type_Tracing);
    Siu.Initialize;

    Text_Io.Set_Input (Input_File);
    Return_Value := Parser.Parse;

    -- print any comments following the last token in the file.
    Siu.Print_Comments (Siu.Comment_Buffer);
    Po.Close_Paginated_File (Sid.Listing_File);
    Po.Close_Paginated_File (Sid.Instrumented_File);
    Text_Io.Close (Input_File);
    Text_Io.Set_Input (Text_Io.Standard_Input);

exception
    when Text_Io.Name_Error =>
        Text_Io.Put_Line (Item => "Error opening file " &
                                     Source_File & " for input.");
    when Pd.Parser_Error =>
        Text_Io.New_Line;
        Text_Io.Put_Line
           (Item => "Syntax Error in Source: Line: " &
                       Hd.Source_Line'Image
                          (Pd.Curtoken.Lexed_Token.Srcpos_Line) & " Column: " &
                       Hd.Source_Column'Image
                          (Pd.Curtoken.Lexed_Token.Srcpos_Column));
    when Po.File_Error =>
        Text_Io.Put_Line (Item => "Error opening file " & " for output.");

        -- Handle others in driver.
    when others =>
        raise;
end Source_Instrument;

---------------------------------------------------------------------