|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 5120 (0x1400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Int_Lex, seg_0497dc
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
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; ------------------------------------------------------------------------ -- <UNIT> Int_Lib ------------------------------------------------------------------------ -- -- <DESCRIPTION> This package defines functions for the creation and -- the verification of table resulting from the command -- line typed by the player. -- -- <AUTHOR> Barthe Raphael, Beck Didier, Kempe Laurent -- <VERSION> 2.5 -- <DATE> 22-dec-94 -- <MODIFY> 15-jan-95 -- -- <PKG USED> Bounded_String,Int_Lex,String_Table,Text_io,Token_Pkg. ------------------------------------------------------------------------
nblk1=4 nid=0 hdr6=8 [0x00] rec0=1c rec1=00 rec2=01 rec3=02c [0x01] rec0=19 rec1=00 rec2=02 rec3=06c [0x02] rec0=1e rec1=00 rec2=03 rec3=080 [0x03] rec0=02 rec1=00 rec2=04 rec3=000 tail 0x21546e2ca865e68c35539 0x42a00088462060003