|
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 - download
Length: 8192 (0x2000) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Test_Situation_Bis, seg_047a2b
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Complements; with Tests; with String_Utilities; with Syntax_Error; with Lexical; with Compiler_Token; use Compiler_Token; package body Test_Situation_Bis is procedure Parse (Nom : String) is Mot : Lexical.Our_String.Variable_String; Un_Test : Tests.Type_Test; Valeur : Integer; Entier : Boolean; begin case Lexical.Get_Token is when L_Id => Mot := Lexical.Our_String.Value (Lexical.Get_Value); Lexical.Next; Un_Test.Kind := Tests.Is_In_State; Un_Test.Name := Tests.Identifier.Value (Nom); Un_Test.State := Tests.Identifier.Value (Lexical.Our_String.Image (Mot)); Tests.Add_Test (Un_Test); when L_Equal => Lexical.Next; if Lexical.Get_Token = L_Nbr then String_Utilities.String_To_Number (Lexical.Get_Value, Valeur, Entier); if Entier then Un_Test.Kind := Tests.Is_Equal; Un_Test.Name := Tests.Identifier.Value (Nom); Un_Test.Value := Valeur; Tests.Add_Test (Un_Test); else Syntax_Error.Semantique ("Les compteurs n'acceptent que les valeurs entieres"); end if; Lexical.Next; else Syntax_Error.Syntaxique (R_Test_Situation_Bis, "L_Nbr"); end if; when L_Less => Lexical.Next; if Lexical.Get_Token = L_Nbr then String_Utilities.String_To_Number (Lexical.Get_Value, Valeur, Entier); if Entier then Un_Test.Kind := Tests.Is_Less; Un_Test.Name := Tests.Identifier.Value (Nom); Un_Test.Value := Valeur; Tests.Add_Test (Un_Test); else Syntax_Error.Semantique ("Les compteurs n'acceptent que les valeurs entieres"); end if; Lexical.Next; else Syntax_Error.Syntaxique (R_Test_Situation_Bis, "L_Nbr"); end if; when L_Great => Lexical.Next; if Lexical.Get_Token = L_Nbr then String_Utilities.String_To_Number (Lexical.Get_Value, Valeur, Entier); if Entier then Un_Test.Kind := Tests.Is_Greater; Un_Test.Name := Tests.Identifier.Value (Nom); Un_Test.Value := Valeur; Tests.Add_Test (Un_Test); else Syntax_Error.Semantique ("Les compteurs n'acceptent que les valeurs entieres"); end if; Lexical.Next; else Syntax_Error.Syntaxique (R_Test_Situation_Bis, "L_Nbr"); end if; when L_Dans => Lexical.Next; if Lexical.Get_Token = L_Id then Mot := Lexical.Our_String.Value (Lexical.Get_Value); if Complements.Exists (Lexical.Our_String.Image (Mot)) then case Complements.Kind_Of (Lexical.Our_String.Image (Mot)) is when Complements.Personnage | Complements.Item | Complements.Room => Un_Test.Kind := Tests.Is_In_Position; Un_Test.Name := Tests.Identifier.Value (Nom); Un_Test.State := Tests.Identifier.Value (Lexical.Our_String.Image (Mot)); Tests.Add_Test (Un_Test); when Complements.Way => Syntax_Error.Semantique ("Un acces ne peut pas contenir quelque chose"); when Complements.No_One => Syntax_Error.Semantique (Lexical.Our_String.Image (Mot) & " n'est ni un personnage, ni un objet, ni une piece"); end case; else Syntax_Error.Semantique (Lexical.Our_String.Image (Mot) & " n'existe pas"); end if; Lexical.Next; else Syntax_Error.Syntaxique (R_Test_Situation_Bis, "L_Id"); end if; when others => Syntax_Error.Syntaxique (R_Test_Situation_Bis, "L_Id ou L_Equal ou L_Less ou L_Great ou L_Dans"); end case; end Parse; end Test_Situation_Bis;
nblk1=7 nid=0 hdr6=e [0x00] rec0=21 rec1=00 rec2=01 rec3=04e [0x01] rec0=16 rec1=00 rec2=03 rec3=04a [0x02] rec0=16 rec1=00 rec2=04 rec3=016 [0x03] rec0=14 rec1=00 rec2=07 rec3=02a [0x04] rec0=01 rec1=00 rec2=06 rec3=056 [0x05] rec0=13 rec1=00 rec2=02 rec3=064 [0x06] rec0=09 rec1=00 rec2=05 rec3=001 tail 0x2174b2b6a865475e5e3a9 0x42a00088462060003