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 - download
Index: ┃ B T

⟦07ed8e865⟧ TextFile

    Length: 2963 (0xb93)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

package body Parameter_Parser_Defs is

    function Deslash (S : String) return String is
        P : Integer := Su.Locate ('\', S);
    begin
        if P in 1 .. S'Last - 1 then
            return S (S'First .. P - 1) & S (P + 1) &
                      Deslash (S (P + 2 .. S'Last));
        else
            return S;
        end if;
    end Deslash;

    function Clean (S : String) return String is
    begin
        if S'Length = 0 then
            return S;
        elsif S (S'First) = '(' then
            if S (S'Last) = ')' then
                return Deslash (S (S'First + 1 .. S'Last - 1));
            else
                return Deslash (S (S'First + 1 .. S'Last));
            end if;
        else
            return Deslash (S);
        end if;
    end Clean;

    function Normal (S : String) return String is
        Ns : String (1 .. S'Length) := Su.Upper_Case (S);
    begin
        return Ns;
    end Normal;

    -- Allow abbreviations within <..>

    function May_Be (Arg, Val : String) return Boolean is

    begin
        return Arg'Length <= Val'Length and then
                  (Val (1 .. Arg'Length) = Arg or else
                   (Arg /= "" and then Arg (Arg'Last) = '>' and then
                    Arg (Arg'First .. Arg'Last - 1) =
                       Val (1 .. Arg'Length - 1)));
    end May_Be;

    procedure Unique_Prefix (S      :     String;
                             Result : out Enumeration;
                             Prefix : out Boolean;
                             Unique : out Boolean) is
        Already_Matched : Boolean         := False;
        Exact           : Boolean;
        Match           : Boolean;
        Up_S            : constant String := String_Utilities.Upper_Case (S);
        -- determines if S is a prefix of Is_In, Case sensitive, notify if
        -- match exactly
        procedure Check_Prefix (S, Is_In :        String;
                                Prefix   : in out Boolean;
                                Exact    : out    Boolean) is
            Bound : constant Integer := Is_In'First + S'Length - 1;
        begin
            Prefix := S'Length <= Is_In'Length and then
                         S = Is_In (Is_In'First .. Bound);
            Exact  := Prefix and then (S'Length = Is_In'Length);
        end Check_Prefix;
    begin
        Prefix := False;
        Unique := False;
        Result := Enumeration'Last;
        for Enum in Enumeration loop
            Check_Prefix (Up_S, Enumeration'Image (Enum), Match, Exact);
            if Exact then
                Result := Enum;
                Unique := True;
                Prefix := False;
                return;
            elsif Match then
                Unique          := not Already_Matched;
                Already_Matched := True;
                Prefix          := True;
                Result          := Enum;
            end if;
        end loop;
    end Unique_Prefix;

end Parameter_Parser_Defs;