|
|
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 - metrics - download
Length: 16384 (0x4000)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Automate, package body Lex, package body Look_Ahead, seg_02f453
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Bounded_String;
with Text_Io;
package body Lex is
package Look_Ahead is
function Exist return Boolean;
function Get return Character;
procedure Set (To : Character);
end Look_Ahead;
package Automate is
function Start return Token;
function Get return Bounded_String.Variable_String;
end Automate;
The_File : Text_Io.File_Type;
Current_Token : Token;
--
--
function Current_Token_Is (T : Token) return Boolean is
begin
return Current_Token = T;
end Current_Token_Is;
--
--
function Current_Token_In (T : Tokens) return Boolean is
Index : Natural := 1;
begin
loop
if Current_Token_Is (T (Index)) then
return True;
else
Index := Index + 1;
end if;
end loop;
exception
when Constraint_Error =>
return False;
end Current_Token_In;
--
--
function Get_Next_Character
(The_File : Text_Io.File_Type) return Character is
C : Character;
begin
if Look_Ahead.Exist then
return Look_Ahead.Get;
else
if Text_Io.End_Of_File (File => The_File) then
return Ascii.Eot;
elsif Text_Io.End_Of_Line (File => The_File) then
Text_Io.Skip_Line (File => The_File);
return Ascii.Cr;
else
Text_Io.Get (File => The_File, Item => C);
return C;
end if;
end if;
end Get_Next_Character;
--
--
function Is_A_Keyword (The_String : String) return Boolean is
T : Token;
begin
T := Token'Value (The_String);
return True;
exception
when Constraint_Error =>
return False;
end Is_A_Keyword;
--
--
procedure Open (Thename : String) is
begin
Text_Io.Open (File => The_File,
Mode => Text_Io.In_File,
Name => Thename,
Form => "");
end Open;
--
--
procedure Close is
begin
Text_Io.Close (File => The_File);
end Close;
--
--
function Image return String is
begin
return Bounded_String.Image (Automate.Get);
end Image;
--
--
function Get return Token is
begin
return Current_Token;
end Get;
--
--
function At_End return Boolean is
begin
return Current_Token = Eof;
end At_End;
--
--
procedure Next is
begin
Current_Token := Automate.Start;
if Current_Token = Identifier then
if Is_A_Keyword (Image) then
Current_Token := Token'Value (Image);
end if;
end if;
end Next;
--
--
package body Look_Ahead is separate;
package body Automate is separate;
end Lex;
nblk1=f
nid=7
hdr6=8
[0x00] rec0=2f rec1=00 rec2=01 rec3=018
[0x01] rec0=28 rec1=00 rec2=08 rec3=004
[0x02] rec0=39 rec1=00 rec2=0a rec3=012
[0x03] rec0=0a rec1=00 rec2=0c rec3=000
[0x04] rec0=03 rec1=00 rec2=0c rec3=000
[0x05] rec0=03 rec1=00 rec2=0c rec3=000
[0x06] rec0=12 rec1=00 rec2=04 rec3=018
[0x07] rec0=16 rec1=00 rec2=03 rec3=02c
[0x08] rec0=15 rec1=00 rec2=0b rec3=01e
[0x09] rec0=15 rec1=00 rec2=0c rec3=038
[0x0a] rec0=18 rec1=00 rec2=0d rec3=000
[0x0b] rec0=15 rec1=00 rec2=0c rec3=038
[0x0c] rec0=18 rec1=00 rec2=0d rec3=000
[0x0d] rec0=14 rec1=00 rec2=0d rec3=000
[0x0e] rec0=00 rec1=00 rec2=00 rec3=249
tail 0x215284e9a848c84c3e751 0x42a00088462060003
Free Block Chain:
0x7: 0000 00 0b 00 4a 80 0e 3e 72 65 74 75 72 6e 20 66 61 ┆ J >return fa┆
0xb: 0000 00 0d 00 06 80 03 72 61 63 03 78 74 5f 49 6f 2e ┆ rac xt_Io.┆
0xd: 0000 00 03 03 fc 80 08 61 73 65 20 43 20 69 73 08 00 ┆ ase C is ┆
0x3: 0000 00 04 00 16 80 13 20 20 20 20 20 20 20 20 20 20 ┆ ┆
0x4: 0000 00 05 00 27 80 15 74 65 20 3a 3d 20 53 74 61 74 ┆ ' te := Stat┆
0x5: 0000 00 02 00 1c 80 0c 65 6e 20 6f 74 68 65 72 73 20 ┆ en others ┆
0x2: 0000 00 06 00 05 80 02 74 61 02 74 61 05 20 20 20 63 ┆ ta ta c┆
0x6: 0000 00 09 03 fc 80 0b 20 43 68 61 72 61 63 74 65 72 ┆ Character┆
0x9: 0000 00 0f 00 29 80 08 6f 6b 65 6e 29 20 69 73 08 00 ┆ ) oken) is ┆
0xf: 0000 00 0e 03 fc 00 2c 20 20 20 20 20 20 20 20 20 20 ┆ , ┆
0xe: 0000 00 00 00 2e 00 2b 20 20 20 20 20 20 20 20 20 20 ┆ . + ┆