|
|
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: 2309 (0x905)
Types: TextFile
Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
with Bug_Report;
package body List is
procedure Parse (Ident : in out Message.Unary;
Kwd : in out Message.Unary) is
use Scanner;
begin
case Scanner.Get_Token is
when Scanner.Identifier =>
Message.Put (This_Name => Scanner.Get_Value, Into => Ident);
Scanner.Next;
if Scanner.Get_Token = Scanner.Identifier then
Parse_Ident (Ident, Kwd);
end if;
when Scanner.Keyword =>
Message.Put (This_Name => Scanner.Get_Value, Into => Kwd);
Scanner.Next;
if Scanner.Get_Token = Scanner.Identifier then
Message.Put (This_Name => Scanner.Get_Value, Into => Ident);
Scanner.Next;
if Scanner.Get_Token = Scanner.Keyword then
Parse_Kwd (Ident, Kwd);
end if;
else
raise Bug_Report.Identifier_Is_Missing;
end if;
when others =>
raise Bug_Report.Unexpected_Token;
end case;
end Parse;
procedure Parse_Ident (Ident : in out Message.Unary;
Kwd : in out Message.Unary) is
use Scanner;
begin
Message.Put (This_Name => Scanner.Get_Value, Into => Ident);
Scanner.Next;
if Scanner.Get_Token = Scanner.Identifier then
Parse_Ident (Ident, Kwd);
end if;
end Parse_Ident;
procedure Parse_Kwd (Ident : in out Message.Unary;
Kwd : in out Message.Unary) is
use Scanner;
begin
Message.Put (This_Name => Scanner.Get_Value, Into => Kwd);
Scanner.Next;
if Scanner.Get_Token = Scanner.Identifier then
Message.Put (This_Name => Scanner.Get_Value, Into => Ident);
Scanner.Next;
if Scanner.Get_Token = Scanner.Keyword then
Parse_Kwd (Ident, Kwd);
end if;
else
raise Bug_Report.Identifier_Is_Missing;
end if;
end Parse_Kwd;
function Is_First (T : Scanner.Token) return Boolean is
use Scanner;
begin
return T = Identifier or else T = Keyword;
end Is_First;
end List;