DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦9d1c83389⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Unparser, seg_0391b6

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Bounded_String;
with Statements;
with Text_Io;
with Tiny_File;

package body Unparser is

    Log_File : Text_Io.File_Type;

    Indent_Level : Natural := 0;
    Indent_Width : Natural := 3;
    Current_Line : Natural := 0;

    procedure Put_Header (From_File : String; To_File : String) is
    begin
        Tiny_File.Set_Line (Log_File, 2);
        Tiny_File.Set_Col (Log_File, 15);
        [statement]
        Tiny_File.New_Line (Log_File, 2);  
    end Put_Header;

    procedure Start (The_Root : Statements.Node;
                     From_File : String;
                     To_File : String) is
    begin
        Tiny_File.Create (Log_File, To_File);
        Put_Header (From_File, To_File);
    end Start;

    procedure Put (The_String : String; At_Col : Natural := 0) is
    begin
        if At_Col > 0 then
            Tiny_File.Set_Col (Log_File, At_Col);
        end if;
        Tiny_File.Put (Log_File, The_String);
    end Put;

    procedure Put (The_Lexeme : Scanner.Lexeme; At_Col : Natural := 0) is
    begin
        if At_Col > 0 then
            Tiny_File.Set_Col (Log_File, At_Col);
        end if;
        Tiny_File.Put (Log_File, Bounded_String.Image (The_Lexeme));
    end Put;

    procedure New_Line is
    begin
        Tiny_File.New_Line (Log_File);
        Tiny_File.Set_Col (Log_File, Indent_Width * Indent_Level + 1);
        Current_Line := Current_Line + 1;
    end New_Line;

    procedure New_Right (The_String : String) is
    begin
        New_Line;
        Tiny_File.Put (Log_File, The_String);
        Indent_Level := Indent_Level + 1;
    end New_Right;

    procedure New_Left (The_String : String) is
    begin
        Indent_Level := Indent_Level - 1;
        Tiny_File.Set_Col (Log_File, Indent_Width * Indent_Level + 1);
        Tiny_File.Put (Log_File, The_String);
    end New_Left;

    procedure Go (The_Root : Statements.Node) is
    begin
        Current_Line := 5;
        Statements.Unparse (The_Root);
    end Go;

    procedure Stop is
    begin
        Tiny_File.Close (Log_File);
    end Stop;

end Unparser;


E3 Meta Data

    nblk1=4
    nid=2
    hdr6=6
        [0x00] rec0=1f rec1=00 rec2=01 rec3=058
        [0x01] rec0=21 rec1=00 rec2=03 rec3=01c
        [0x02] rec0=11 rec1=00 rec2=04 rec3=000
        [0x03] rec0=11 rec1=00 rec2=04 rec3=000
    tail 0x215321da884eb56646796 0x42a00088462060003
Free Block Chain:
  0x2: 0000  00 00 00 12 80 0f 20 3a 20 53 74 72 69 6e 67 3b  ┆       : String;┆