|
|
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: 23552 (0x5c00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Parse, seg_0389e2
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Debug;
with Lex;
with Symbol;
with Text_Io;
package body Parse is
procedure Body_Description;
procedure Description_List;
procedure Error is
begin
Text_Io.Put ("Error ...");
Text_Io.Put_Line (" ");
end Error;
procedure Value is
begin
case Lex.Get is
when Lex.Identifier =>
Lex.Next;
when Lex.Int =>
Lex.Next;
when Lex.Hour =>
Lex.Next;
when others =>
Error;
end case;
end Value;
procedure Factor;
procedure Term is
begin
Factor;
while Lex.Current_Token_Is (Lex.Multiply) loop
Lex.Next;
Factor;
end loop;
end Term;
procedure Expression is
use Lex;
begin
Term;
while (Lex.Current_Token_In ((Lex.Plus, Lex.Minus))) loop
case Lex.Get is
when Lex.Plus =>
Lex.Next;
Term;
when Lex.Minus =>
Lex.Next;
Term;
when others =>
Error;
end case;
end loop;
end Expression;
procedure Factor is
begin
if Lex.Current_Token_Is (Lex.Open_Bracket) then
Lex.Next;
Expression;
if Lex.Current_Token_Is (Lex.Close_Bracket) then
Lex.Next;
else
Error;
end if;
else
Value;
end if;
end Factor;
procedure Relational_Operator is
begin
if Lex.Current_Token_In ((Lex.Less_Than, Lex.Greater_Than,
Lex.Less_Or_Equal, Lex.Greater_Or_Equal,
Lex.Equal, Lex.Not_Equal)) then
Lex.Next;
else
Error;
end if;
end Relational_Operator;
procedure Condition is
begin
Value;
Relational_Operator;
Value;
end Condition;
procedure Liste_Value is
begin
Value;
if Lex.Current_Token_In ((Lex.Temps, Lex.Int, Lex.Identifier)) then
Liste_Value;
end if;
end Liste_Value;
procedure Call_Sub_Routine is
begin
if Lex.Current_Token_Is (Lex.Executer) then
Lex.Next;
if Lex.Current_Token_Is (Lex.Identifier) then
Lex.Next;
if Lex.Current_Token_Is (Lex.Avec) then
Lex.Next;
if Lex.Current_Token_Is (Lex.Open_Bracket) then
Lex.Next;
Liste_Value;
if Lex.Current_Token_Is (Lex.Close_Bracket) then
Lex.Next;
else
Error;
end if;
else
Error;
end if;
end if;
else
Error;
end if;
end if;
end Call_Sub_Routine;
procedure Affect is
begin
if Lex.Current_Token_Is (Lex.Identifier) then
Lex.Next;
if Lex.Current_Token_Is (Lex.Let) then
Lex.Next;
Expression;
else
Error;
end if;
else
Error;
end if;
end Affect;
procedure Primitives is
begin
case Lex.Get is
when Lex.Activer =>
Lex.Next;
if Lex.Current_Token_Is (Lex.Identifier) then
Lex.Next;
else
Error;
end if;
when Lex.Desactiver =>
Lex.Next;
if Lex.Current_Token_Is (Lex.Identifier) then
Lex.Next;
else
Error;
end if;
when Lex.Fixer =>
Lex.Next;
if Lex.Current_Token_Is (Lex.Identifier) then
Lex.Next;
if Lex.Current_Token_Is (Lex.A) then
Lex.Next;
Value;
else
Error;
end if;
end if;
when Lex.Evoluer =>
Lex.Next;
if Lex.Current_Token_Is (Lex.Identifier) then
Lex.Next;
if Lex.Current_Token_Is (Lex.En) then
Lex.Next;
Value;
if Lex.Current_Token_Is (Lex.A) then
Lex.Next;
Value;
end if;
else
Error;
end if;
else
Error;
end if;
when others =>
Error;
end case;
end Primitives;
procedure Primitives_List is
begin
Primitives;
if Lex.Current_Token_In ((Lex.Activer, Lex.Desactiver,
Lex.Fixer, Lex.Evoluer)) then
Primitives_List;
end if;
end Primitives_List;
procedure Action is
begin
case Lex.Get is
when Lex.Attendre =>
Lex.Next;
if Lex.Current_Token_Is (Lex.Identifier) then
Lex.Next;
end if;
when Lex.Pour =>
Lex.Next;
if Lex.Current_Token_Is (Lex.Identifier) then
Lex.Next;
if Lex.Current_Token_Is (Lex.Faire) then
Lex.Next;
if Lex.Current_Token_Is (Lex.Open_Bracket) then
Lex.Next;
Primitives_List;
if Lex.Current_Token_Is (Lex.Close_Bracket) then
Lex.Next;
else
Error;
end if;
else
Error;
end if;
else
Lex.Next;
Primitives;
end if;
end if;
when Lex.Puis =>
Lex.Next;
Body_Description;
when Lex.Au =>
if Lex.Current_Token_Is (Lex.Temps) then
Lex.Next;
Value;
if Lex.Current_Token_Is (Lex.Faire) then
Lex.Next;
Description_List;
else
Error;
end if;
else
Error;
end if;
when others =>
Error;
end case;
end Action;
procedure While_Structure is
begin
if Lex.Current_Token_Is (Lex.Tant) then
Lex.Next;
if Lex.Current_Token_Is (Lex.Que) then
Lex.Next;
Condition;
if Lex.Current_Token_Is (Lex.Faire) then
Lex.Next;
Description_List;
if Lex.Current_Token_Is (Lex.Fin) then
Lex.Next;
if Lex.Current_Token_Is (Lex.Tant) then
Lex.Next;
if Lex.Current_Token_Is (Lex.Que) then
Lex.Next;
else
Error;
end if;
else
Error;
end if;
else
Error;
end if;
else
Error;
end if;
else
Error;
end if;
end if;
end While_Structure;
procedure Case_List is
begin
Value;
if Lex.Current_Token_Is (Lex.Faire) then
Lex.Next;
Body_Description;
if Lex.Current_Token_In ((Lex.Temps, Lex.Int, Lex.Identifier)) then
Case_List;
end if;
else
Error;
end if;
end Case_List;
procedure Case_Structure is
begin
if Lex.Current_Token_Is (Lex.Selon) then
Lex.Next;
if Lex.Current_Token_Is (Lex.Identifier) then
Lex.Next;
if Lex.Current_Token_Is (Lex.Est) then
Lex.Next;
Case_List;
if Lex.Current_Token_Is (Lex.Fin) then
Lex.Next;
if Lex.Current_Token_Is (Lex.Selon) then
Lex.Next;
else
Error;
end if;
else
Error;
end if;
else
Error;
end if;
else
Error;
end if;
end if;
end Case_Structure;
procedure Liste is
begin
while not Lex.Current_Token_Is (Lex.End_Bracket) loop
Affect;
end loop;
end Liste;
procedure Body_Description is
begin
if Lex.Current_Token_Is (Lex.Begin_Bracket) then
Debug.Put (40);
Lex.Next;
Description_List;
if Lex.Current_Token_Is (Lex.End_Bracket) then
Debug.Put (41);
Lex.Next;
else
Error;
end if;
end if;
end Body_Description;
procedure Description_List is
begin
--Body_Description;
if Lex.Current_Token_In ((Lex.Si, Lex.Selon, Lex.Tant,
Lex.Attendre, Lex.Pour, Lex.Puis, Lex.Au,
Lex.Identifier, Lex.Executer)) then
Lex.Next;
Description_List;
end if;
end Description_List;
procedure If_Struct is
begin
if Lex.Current_Token_Is (Lex.Si) then
Lex.Next;
Condition;
if Lex.Current_Token_Is (Lex.Alors) then
Lex.Next;
Description_List;
if Lex.Current_Token_Is (Lex.Sinon) then
Description_List;
if Lex.Current_Token_Is (Lex.Fin) then
Lex.Next;
if Lex.Current_Token_Is (Lex.Si) then
Lex.Next;
else
Error;
end if;
else
Error;
end if;
else
Error;
end if;
end if;
end if;
end If_Struct;
procedure Control_Struct is
begin
case Lex.Get is
when Lex.Si =>
If_Struct;
when Lex.Selon =>
Case_Structure;
when Lex.Tant =>
While_Structure;
when Lex.Attendre | Lex.Pour | Lex.Puis | Lex.Au =>
Action;
when Lex.Identifier =>
Affect;
when Lex.Executer =>
Call_Sub_Routine;
when others =>
Error;
end case;
end Control_Struct;
procedure Spectacle_Definition is
begin
Body_Description;
end Spectacle_Definition;
procedure List_Identifier is
begin
Lex.Next;
if Lex.Current_Token_Is (Lex.Identifier) then
List_Identifier;
end if;
end List_Identifier;
procedure Parameter is
begin
if Lex.Current_Token_Is (Lex.Qui) then
Lex.Next;
Debug.Put (32);
if Lex.Current_Token_Is (Lex.Utilise) then
Lex.Next;
Debug.Put (33);
else
Error;
end if;
else
Error;
end if;
end Parameter;
procedure Sub_Routine_Definition is
begin
Debug.Put (30);
if Lex.Current_Token_Is (Lex.Identifier) then
Lex.Next;
Debug.Put (31);
Parameter;
if Lex.Current_Token_Is (Lex.Identifier) then
Debug.Put (34);
Lex.Next;
if Lex.Current_Token_Is (Lex.Est) then
Debug.Put (34);
Lex.Next;
Body_Description;
if Lex.Current_Token_Is (Lex.Identifier) then
Debug.Put (35);
Sub_Routine_Definition;
end if;
else
Error;
end if;
else
Error;
end if;
else
Error;
end if;
end Sub_Routine_Definition;
procedure Spectacle_Description is
begin
Sub_Routine_Definition;
Spectacle_Definition;
end Spectacle_Description;
procedure Address is
begin
if Lex.Current_Token_Is (Lex.Int) then
Debug.Put (16);
Lex.Next;
end if;
if Lex.Current_Token_Is (Lex.Based) then
Debug.Put (17);
Lex.Next;
end if;
end Address;
procedure Theater_Description is
begin
if Lex.Current_Token_Is (Lex.Identifier) then
Debug.Put (12);
--
Lex.Next;
if Lex.Current_Token_Is (Lex.Est) then
Debug.Put (13);
Lex.Next;
if Lex.Current_Token_Is (Lex.Identifier) then
Debug.Put (14);
Lex.Next;
if Lex.Current_Token_Is (Lex.En) then
Debug.Put (15);
Lex.Next;
Address;
if Lex.Current_Token_Is (Lex.Identifier) then
Theater_Description;
end if;
else
Error;
end if;
else
Error;
end if;
else
Error;
end if;
end if;
end Theater_Description;
procedure Actor_Type is
begin
case Lex.Get is
when Lex.Binaire =>
Lex.Next;
when Lex.Fugitif =>
Lex.Next;
when Lex.Discret =>
Lex.Next;
when Lex.Temporel =>
Lex.Next;
when others =>
Error;
end case;
end Actor_Type;
procedure Actor_List is
begin
if Lex.Current_Token_Is (Lex.Identifier) then
--
Symbol.Add_Actor (Lex.Image, Symbol.No_Type);
Lex.Next;
Actor_Type;
if Lex.Current_Token_Is (Lex.Identifier) then
Actor_List;
end if;
end if;
end Actor_List;
procedure Material_Description is
begin
Debug.Put (1);
if Lex.Current_Token_Is (Lex.Identifier) then
Debug.Put (3);
--
Symbol.Add_Material (Lex.Image);
Lex.Next;
if Lex.Current_Token_Is (Lex.Sait) then
Debug.Put (4);
Lex.Next;
if Lex.Current_Token_Is (Lex.Faire) then
Debug.Put (5);
Lex.Next;
if Lex.Current_Token_Is (Lex.Begin_Bracket) then
Debug.Put (6);
Lex.Next;
Actor_List;
if Lex.Current_Token_Is (Lex.End_Bracket) then
Debug.Put (7);
Lex.Next;
if Lex.Current_Token_Is (Lex.Identifier) then
Material_Description;
end if;
else
Error;
end if;
else
Error;
end if;
else
Error;
end if;
else
Error;
end if;
end if;
end Material_Description;
procedure Shownet_File is
begin
if Lex.Current_Token_Is (Lex.Materiel) then
Lex.Next;
Material_Description;
else
Error;
end if;
if Lex.Current_Token_Is (Lex.Theatre) then
Debug.Put (10);
Lex.Next;
Theater_Description;
else
Debug.Put (11);
Error;
end if;
if Lex.Current_Token_Is (Lex.Spectacle) then
Debug.Put (20);
Lex.Next;
Spectacle_Description;
else
Debug.Put (21);
Error;
end if;
end Shownet_File;
procedure Start is
begin
Lex.Next;
Shownet_File;
end Start;
end Parse;
nblk1=16
nid=f
hdr6=26
[0x00] rec0=33 rec1=00 rec2=01 rec3=010
[0x01] rec0=23 rec1=00 rec2=11 rec3=020
[0x02] rec0=22 rec1=00 rec2=13 rec3=024
[0x03] rec0=26 rec1=00 rec2=07 rec3=034
[0x04] rec0=1b rec1=00 rec2=0c rec3=014
[0x05] rec0=21 rec1=00 rec2=15 rec3=03a
[0x06] rec0=1a rec1=00 rec2=10 rec3=016
[0x07] rec0=1c rec1=00 rec2=0b rec3=06a
[0x08] rec0=24 rec1=00 rec2=14 rec3=036
[0x09] rec0=21 rec1=00 rec2=0a rec3=000
[0x0a] rec0=20 rec1=00 rec2=04 rec3=064
[0x0b] rec0=20 rec1=00 rec2=09 rec3=062
[0x0c] rec0=2a rec1=00 rec2=0d rec3=00e
[0x0d] rec0=21 rec1=00 rec2=16 rec3=00a
[0x0e] rec0=21 rec1=00 rec2=06 rec3=06e
[0x0f] rec0=26 rec1=00 rec2=0e rec3=02e
[0x10] rec0=1d rec1=00 rec2=02 rec3=044
[0x11] rec0=24 rec1=00 rec2=03 rec3=058
[0x12] rec0=11 rec1=00 rec2=05 rec3=000
[0x13] rec0=1d rec1=00 rec2=02 rec3=01e
[0x14] rec0=23 rec1=00 rec2=03 rec3=00c
[0x15] rec0=13 rec1=00 rec2=05 rec3=000
tail 0x21733ae8c84df8a4b8d6f 0x42a00088462060003
Free Block Chain:
0xf: 0000 00 12 03 fc 80 0c 20 20 20 20 20 20 45 72 72 6f ┆ Erro┆
0x12: 0000 00 08 03 fc 80 19 20 20 20 20 20 20 20 20 20 77 ┆ w┆
0x8: 0000 00 00 00 21 80 14 20 20 20 20 20 63 61 73 65 20 ┆ ! case ┆