|
|
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: 9216 (0x2400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Instructions, seg_044753
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Lex, Error, Token_Pkg, Element, Exprs, Donnee,
Set_Of_Token, Element_Global, Liste_Instructions;
use Token_Pkg;
package body Instructions is
------------------------------------------------------------------------
-- <UNIT> Instructions
------------------------------------------------------------------------
--
-- <DESCRIPTION> This package defines an operation for parsing the
-- grammatical expresssion : <Instructions>
--
-- <AUTHOR> Barthe Raphael, Beck Didier, Kempe Laurent
-- <VERSION> 1.0
-- <DATE> 16-Jan-95
-- <MODIFY> 16-Jan-95
--
-- <PKG USED> LEX, Token_Pkg, Error,
--
------------------------------------------------------------------------
Unit_Donnee : Set_Of_Token.Object :=
Set_Of_Token.Make ((T_Vrai, T_Faux, T_Ident,
T_String, T_Peut, T_Integer));
Unit_Element_Global : Set_Of_Token.Object :=
Set_Of_Token.Make ((T_Objet, T_Pnj, T_Hero, T_Direction,
T_Piece_Courante, T_Le));
procedure Parse (Success : in out Boolean) is
------------------------------------------------------------------------
-- <SUBPROGRAM>
-- <UNIT> Parse
--
-- <DESCRIPTION> Try to parse <Instructions> and return if it was a
-- success or not.
--
-- <EXCEPTIONS> Nothing
--
------------------------------------------------------------------------
Ok : Boolean := True;
begin
if Set_Of_Token.Is_Member (Lex.Gettoken, Unit_Element_Global) then
Element_Global.Parse (Ok);
Success := Success and Ok;
if Lex.Currenttoken_Is (T_Vaut) then
Lex.Next;
Element_Global.Parse (Ok);
Success := Success and Ok;
else
Success := False;
Error.Append;
end if;
else
case Lex.Gettoken is
when T_Si =>
Lex.Next;
Exprs.Parse (Ok);
Success := Success and Ok;
if Lex.Currenttoken_Is (T_Alors) then
Lex.Next;
Liste_Instructions.Parse (Ok);
Success := Success and Ok;
if Lex.Currenttoken_Is (T_Fin_Si) then
Lex.Next;
else
Success := False;
Error.Append;
end if;
else
Success := False;
Error.Append;
end if;
when T_Jeu_Termine =>
Lex.Next;
when T_Dire =>
Lex.Next;
case Lex.Gettoken is
when T_String =>
Lex.Next;
when T_Ident =>
Lex.Next;
Element.Parse (Ok);
Success := Success and Ok;
when others =>
Success := False;
Error.Append;
end case;
when T_Ident =>
Lex.Next;
Element.Parse (Ok);
Success := Success and Ok;
case Lex.Gettoken is
when T_Vaut =>
Lex.Next;
if Set_Of_Token.Is_Member
(Lex.Gettoken, Unit_Element_Global) then
Element_Global.Parse (Ok);
Success := Success and Ok;
elsif Set_Of_Token.Is_Member
(Lex.Gettoken, Unit_Donnee) then
Donnee.Parse (Ok);
Success := Success and Ok;
else
Success := False;
Error.Append;
end if;
when T_Add =>
Lex.Next;
if Lex.Currenttoken_Is (T_Integer) then
Lex.Next;
else
Success := False;
Error.Append;
end if;
when T_Sub =>
Lex.Next;
if Lex.Currenttoken_Is (T_Integer) then
Lex.Next;
else
Success := False;
Error.Append;
end if;
when T_Mul =>
Lex.Next;
if Lex.Currenttoken_Is (T_Integer) then
Lex.Next;
else
Success := False;
Error.Append;
end if;
when T_Div =>
Lex.Next;
if Lex.Currenttoken_Is (T_Integer) then
Lex.Next;
else
Success := False;
Error.Append;
end if;
when others =>
Success := False;
Error.Append;
end case;
when others =>
Success := False;
Error.Append;
end case;
end if;
end Parse;
end Instructions;
nblk1=8
nid=0
hdr6=10
[0x00] rec0=1b rec1=00 rec2=01 rec3=03a
[0x01] rec0=00 rec1=00 rec2=05 rec3=028
[0x02] rec0=1e rec1=00 rec2=06 rec3=018
[0x03] rec0=1a rec1=00 rec2=08 rec3=04a
[0x04] rec0=16 rec1=00 rec2=03 rec3=082
[0x05] rec0=16 rec1=00 rec2=02 rec3=036
[0x06] rec0=18 rec1=00 rec2=07 rec3=03e
[0x07] rec0=07 rec1=00 rec2=04 rec3=000
tail 0x217458dae863e89833acd 0x42a00088462060003