|
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 Exprs, seg_04797f
└─⟦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, Set_Of_Token, Element, Element_Global, String_Table, Donnee, Feuille, Text_Io, String_Utilities, Bounded_String; use Token_Pkg; package body Exprs is ------------------------------------------------------------------------ -- <UNIT> Exprs ------------------------------------------------------------------------ -- -- <DESCRIPTION> This package defines an operation for parsing the -- grammatical expresssion : <Exprs> -- -- <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)); procedure Parse (Tmptree : in out Feuille.Pcell; Success : in out Boolean) is ------------------------------------------------------------------------ -- <SUBPROGRAM> -- <UNIT> Parse -- -- <DESCRIPTION> Try to parse <Exprs> and return if it was a -- success or not. -- -- <EXCEPTIONS> Nothing -- ------------------------------------------------------------------------ Ok : Boolean := True; Astring : String_Table.I_String; Tmptree2, Tmptree3 : Feuille.Pcell; begin case Lex.Gettoken is when T_Ident | T_Le => Element.Parse (Ok); Success := Success and Ok; if Lex.Currenttoken_Is (T_Equ) then Tmptree3 := Feuille.Create (Feuille.Egal); Tmptree3.Left := Element.Tmptree; Lex.Next; if Set_Of_Token.Is_Member (Lex.Gettoken, Unit_Element_Global) then Element_Global.Parse (Ok); Tmptree3.Right := Element_Global.Tmptree; Success := Success and Ok; elsif Set_Of_Token.Is_Member (Lex.Gettoken, Unit_Donnee) then Donnee.Parse (Ok); Tmptree3.Right := Donnee.Tmptree; Success := Success and Ok; else Success := False; Error.Append; end if; else Success := False; Error.Append; end if; when T_Obracket => Lex.Next; if Lex.Currenttoken_Is (T_Ident) then Bounded_String.Copy (Astring, String_Utilities.Upper_Case (Lex.Image)); Tmptree3 := Feuille.Create (Feuille.Verbe, Astring); Lex.Next; if Set_Of_Token.Is_Member (Lex.Gettoken, Unit_Element_Global) then Element_Global.Parse (Ok); Success := Success and Ok; Tmptree3.Left := Element_Global.Tmptree; elsif Lex.Currenttoken_Is (T_Ident) then Bounded_String.Copy (Astring, String_Utilities.Upper_Case (Lex.Image)); Tmptree3.Left := Feuille.Create (Feuille.Complement, Astring); Lex.Next; if Lex.Currenttoken_Is (T_Ident) then Bounded_String.Copy (Astring, String_Utilities.Upper_Case (Lex.Image)); Tmptree3.Right := Feuille.Create (Feuille.Complement, Astring); Lex.Next; end if; end if; else Success := False; Error.Append; end if; if Lex.Currenttoken_Is (T_Cbracket) then Lex.Next; else Success := False; Error.Append; end if; when others => Success := False; Error.Append; end case; if Lex.Currenttoken_Is (T_Et) then Lex.Next; Tmptree := Feuille.Create (Feuille.Et); Tmptree.Left := Tmptree3; Tmptree2 := Feuille.Create (Feuille.Unk); Exprs.Parse (Tmptree2, Ok); Tmptree.Right := Tmptree2; Success := Success and Ok; else Tmptree := Tmptree3; end if; end Parse; end Exprs;
nblk1=8 nid=3 hdr6=c [0x00] rec0=1b rec1=00 rec2=01 rec3=016 [0x01] rec0=1b rec1=00 rec2=07 rec3=00a [0x02] rec0=17 rec1=00 rec2=08 rec3=04c [0x03] rec0=11 rec1=00 rec2=05 rec3=07c [0x04] rec0=1c rec1=00 rec2=02 rec3=018 [0x05] rec0=09 rec1=00 rec2=06 rec3=000 [0x06] rec0=02 rec1=00 rec2=03 rec3=000 [0x07] rec0=04 rec1=00 rec2=03 rec3=000 tail 0x2174b2ed88654777975e0 0x42a00088462060003 Free Block Chain: 0x3: 0000 00 04 00 10 00 0a 65 6e 64 20 45 78 70 72 73 3b ┆ end Exprs;┆ 0x4: 0000 00 00 00 4f 80 20 43 72 65 61 74 65 20 28 46 65 ┆ O Create (Fe┆