|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 2915 (0xb63)
Types: TextFile
Names: »B«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
separate (Token_Package)
procedure Get (Next_Token : out Token) is
--===============================================================
-- gets the next token from : ==
-- 1. the standard input (invoking BUILD) if List_Of_Tokens ==
-- is EMPTY or ==
-- 2. the List_Of_Tokens ==
--===============================================================
Current_Token : Token;
begin
-- Get
-- check if Next_Token_Location is empty or not
if New_List.Is_Equal (Next_Token_Location, New_List.Null_List) then
-- List_Of_Tokens is empty, so build new token
Build (New_Token => Current_Token,
Previous_Token => Get_Previous_Token);
else
-- get next token from the List_Of_Token
Current_Token := New_List.Content_Of (Next_Token_Location);
-- check if Peek_Token_Location null or not,
-- if it is, leave it alone.
if New_List.Is_Equal (Peek_Token_Location, Next_Token_Location) then
Advance_Peek_Token_Location:
begin
-- advance Peek_Token_Location
New_List.Share (The_List =>
New_List.Seek (Peek_Token_Location, +1),
With_The_List => Peek_Token_Location);
exception
when New_List.Overflow =>
New_List.Share (The_List => New_List.Null_List,
With_The_List => Peek_Token_Location);
end Advance_Peek_Token_Location;
end if;
Advance_Next_Token_Location:
begin
-- advance Next_Token_Location
New_List.Share (The_List =>
New_List.Seek (Next_Token_Location, +1),
With_The_List => Next_Token_Location);
if New_List.Is_Equal (Next_Token_Location,
New_List.Null_List) then
-- return unused list to available list
New_List.Clear (The_List => List_Of_Tokens);
end if;
exception
when New_List.Overflow =>
New_List.Share (The_List => New_List.Null_List,
With_The_List => Next_Token_Location);
-- return unused list to available list
New_List.Clear (The_List => List_Of_Tokens);
end Advance_Next_Token_Location;
end if;
-- save current token in previous token in order to determine
-- whether the next APOSTROPHE found starts a character literal
-- or a tick
Get_Previous_Token := Current_Token;
Next_Token := Current_Token;
end Get;