|
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 Element, seg_047975
└─⟦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; 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 -- ------------------------------------------------------------------------ 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_Le) then Lex.Next; 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_Lien) then Tmptree := Feuille.Create (Feuille.Lien, Astring); Lex.Next; else Success := False; Error.Append; end if; else Success := False; Error.Append; end if; else Success := False; Error.Append; end if; else 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 (Lex.Image, Tmpiterstruct, Found); if not Found then Error.Append (" : Identificateur inconnu !"); 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 !"); else Tmptree := Feuille.Create (Feuille.Iter, Tmpiteratt); end if; end if; Lex.Next; else Element_Global.Parse (Ok); Success := Success and Ok; Tmptree := Element_Global.Tmptree; Bounded_String.Copy (Tmptree.Idattrib, Astring); end if; else Error.Append (" : mot cle 'de' attendu !"); end if; end if; end Parse; end Element;
nblk1=7 nid=5 hdr6=a [0x00] rec0=1b rec1=00 rec2=01 rec3=072 [0x01] rec0=18 rec1=00 rec2=02 rec3=01a [0x02] rec0=1a rec1=00 rec2=03 rec3=056 [0x03] rec0=15 rec1=00 rec2=04 rec3=002 [0x04] rec0=07 rec1=00 rec2=06 rec3=000 [0x05] rec0=07 rec1=00 rec2=06 rec3=001 [0x06] rec0=4b rec1=73 rec2=39 rec3=01b tail 0x2174b2e6c8654776c0632 0x42a00088462060003 Free Block Chain: 0x5: 0000 00 07 00 21 80 1e 20 20 20 20 20 20 20 20 20 20 ┆ ! ┆ 0x7: 0000 00 00 00 04 80 01 20 01 02 03 04 05 06 07 08 09 ┆ ┆