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

⟦76bf807d9⟧ Ada Source

    Length: 4096 (0x1000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Int_Lex, seg_042b5e

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 Text_Io;
package body Int_Lex is

    procedure Get (Command : in String;
                   Max : in Natural;
                   Pos : in out Natural;
                   Result : in out I_String) is
        Index : Natural := 1;
        State : Int_State := St_Start;
        Current : Character;
        Found, Stop : Boolean := False;
    begin
        Bounded_String.Copy (Result, "");
        while (not (Stop) and (Pos <= Max)) loop
            Current := Command (Pos);
            Character_Utilities.Make_Uppercase (Current);
            case State is
                when St_Start =>
                    if Current in Character_Utilities.Uppercase_Character then
                        State := St_Word;
                    elsif Current = L_Sep then
                        State := St_Sep;
                    else
                        State := St_Unk;
                        Stop := True;
                    end if;
                when St_Word =>
                    if (Current in Character_Utilities.Uppercase_Character or
                        Current = L_Und) then
                        Bounded_String.Append (Result, Current);
                        Pos := Pos + 1;
                        Found := True;
                    else
                        if Current = L_Sep then
                            Stop := True;
                        else
                            Stop := True;
                            Found := False;
                        end if;
                    end if;
                when St_Sep =>
                    if Current = L_Sep then
                        Pos := Pos + 1;
                    else
                        State := St_Start;
                    end if;
                when St_Unk =>
                    Stop := True;
            end case;
        end loop;
        if not (Found) then
            Bounded_String.Copy (Result, "Lex Error");
        end if;
    end Get;

    function Give_Up (Extracted_Word : I_String) return Boolean is
    begin
        for I in Give_Up_Words'First .. Give_Up_Words'Last loop
            if Bounded_String.Image (Extracted_Word) =
               Give_Up_Words'Image (I) then
                return True;
            end if;
        end loop;
        return False;
    end Give_Up;
end Int_Lex;

E3 Meta Data

    nblk1=3
    nid=0
    hdr6=6
        [0x00] rec0=1c rec1=00 rec2=01 rec3=02c
        [0x01] rec0=19 rec1=00 rec2=02 rec3=06c
        [0x02] rec0=0f rec1=00 rec2=03 rec3=001
    tail 0x2153df07c86306992ba15 0x42a00088462060003