|
|
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: 8192 (0x2000)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Element, seg_047df6
└─⟦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_Global, Struct_Component,
String_Utilities, String_Table, Bounded_String, Set_Of_Token;
use Token_Pkg;
package body Element is
------------------------------------------------------------------------
-- <UNIT> Element
------------------------------------------------------------------------
--
-- <DESCRIPTION> This package defines an operation for parsing the
-- grammatical expresssion : <Element>
--
-- <AUTHOR> Barthe Raphael, Beck Didier, Kempe Laurent
-- <VERSION> 1.0
-- <DATE> 16-Jan-95
-- <MODIFY> 16-Jan-95
--
-- <PKG USED> LEX, Token_Pkg, Error, element_global
--
------------------------------------------------------------------------
Unit_Element_Global : Set_Of_Token.Object :=
Set_Of_Token.Make ((T_Objet, T_Pnj, T_Hero, T_Piece_Courante));
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;
Found : Boolean := False;
Tmpiteratt : Struct_Component.Liste_Attribut.Listiter;
Tmpiterstruct : Struct_Component.Liste_Structure.Listiter;
Tmpstruct : Struct_Component.Structure;
Astring : String_Table.I_String;
begin
if Lex.Currenttoken_Is (T_Ident) then
Bounded_String.Copy (Astring,
String_Utilities.Upper_Case (Lex.Image));
Lex.Next;
if Lex.Currenttoken_Is (T_De) then
Lex.Next;
if Lex.Currenttoken_Is (T_Ident) then
Struct_Component.Is_Inside_All
(String_Utilities.Upper_Case (Lex.Image),
Tmpiterstruct, Found);
if not Found then
Error.Append (" : Identificateur inconnu !");
Success := False;
else
Tmpstruct := Struct_Component.Create;
Tmpstruct := Struct_Component.Liste_Structure.Cellvalue
(Tmpiterstruct);
Struct_Component.Is_Inside
(Bounded_String.Image (Astring),
Tmpstruct.Attribut, Tmpiteratt, Found);
if not Found then
Error.Append
(" : l'attribut recherche n'existe pas dans la structure !");
Success := False;
else
Tmptree := Feuille.Create
(Feuille.Iter, Tmpiteratt);
end if;
Lex.Next;
end if;
elsif Set_Of_Token.Is_Member
(Lex.Gettoken, Unit_Element_Global) then
Element_Global.Parse (Ok);
Success := Success and Ok;
Tmptree := Element_Global.Tmptree;
Bounded_String.Copy (Tmptree.Idattrib, Astring);
else
Error.Append
(" : ident ou objet ou pnj ou hero ou piece_courante attendu !");
end if;
else
Error.Append (" : mot cle 'de' attendu !");
Success := False;
end if;
else
Error.Append (" : ident attendu !");
Success := False;
end if;
end Parse;
end Element;
nblk1=7
nid=6
hdr6=8
[0x00] rec0=19 rec1=00 rec2=01 rec3=062
[0x01] rec0=19 rec1=00 rec2=03 rec3=058
[0x02] rec0=13 rec1=00 rec2=04 rec3=06a
[0x03] rec0=1b rec1=00 rec2=02 rec3=000
[0x04] rec0=1a rec1=00 rec2=06 rec3=000
[0x05] rec0=1a rec1=00 rec2=06 rec3=001
[0x06] rec0=4b rec1=73 rec2=39 rec3=01b
tail 0x2174bb3cc865770e1d88a 0x42a00088462060003
Free Block Chain:
0x6: 0000 00 07 00 03 00 00 00 6c 29 20 74 68 65 6e 08 00 ┆ l) then ┆
0x7: 0000 00 05 03 fc 80 16 20 20 20 20 20 20 20 20 20 20 ┆ ┆
0x5: 0000 00 00 01 b3 80 1f 74 72 65 65 20 3a 3d 20 45 6c ┆ tree := El┆