|
|
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: 10240 (0x2800)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Donnee, seg_0497c8
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Token_Pkg, Lex, Enum, Error, Bounded_String, Text_Io,
Pieces, Pnjs, Objets, Monde, String_Utilities, Directions;
use Token_Pkg;
package body Donnee is
------------------------------------------------------------------------
-- <UNIT> Donnee
------------------------------------------------------------------------
--
-- <DESCRIPTION> This package defines an operation for parsing the
-- grammatical expresssion : <donnee>
--
-- <AUTHOR> Barthe Raphael, Beck Didier, Kempe Laurent
-- <VERSION> 1.0
-- <DATE> 16-Jan-95
-- <MODIFY> 16-Jan-95
--
-- <PKG USED> LEX, Token_Pkg, Enum, Error
--
------------------------------------------------------------------------
procedure Parse (Success : in out Boolean) is
------------------------------------------------------------------------
-- <SUBPROGRAM>
-- <UNIT> Parse
--
-- <DESCRIPTION> Try to parse <donnee>and return if it was a success
-- or not.
--
-- <EXCEPTIONS> Nothing
--
------------------------------------------------------------------------
Ok : Boolean := True;
Tmp_Bool : Boolean;
Tmp_String : String_Table.I_String;
Tmp_Iter : String_Table.Int_List.Listiter;
Tmp_Refs : Struct_Component.Liste_Structure.Listiter;
Found : Boolean;
begin
case Lex.Gettoken is
when T_Vrai =>
if not (Monde.Table_Parsed) then
Data := Struct_Component.Set_Boolean ("un Booleen", True);
else
Tmp_Bool := True;
Tmptree := Feuille.Create (Feuille.Booleen, Tmp_Bool);
end if;
Lex.Next;
when T_Faux =>
if not (Monde.Table_Parsed) then
Data := Struct_Component.Set_Boolean ("un Booleen", False);
else
Tmp_Bool := False;
Tmptree := Feuille.Create (Feuille.Booleen, Tmp_Bool);
end if;
Lex.Next;
when T_String =>
Bounded_String.Copy (Tmp_String, Lex.Image);
if not (Monde.Table_Parsed) then
Data := Struct_Component.Set_String
("Une Chaine", Lex.Image);
else
Tmptree := Feuille.Create (Feuille.Chaine, Tmp_String);
end if;
Lex.Next;
when T_Ident =>
if not (Monde.Table_Parsed) then
Bounded_String.Copy (Tmp_String, Lex.Image);
Struct_Component.Is_Inside
(String_Utilities.Upper_Case (Lex.Image),
Pieces.Liste, Tmp_Refs, Found);
if Found then
Data := Struct_Component.Set_Structure
(Tmp_String, Tmp_Refs, Pieces.Liste);
else
Struct_Component.Is_Inside
((String_Utilities.Upper_Case (Lex.Image)),
Pnjs.Liste, Tmp_Refs, Found);
if Found then
Data := Struct_Component.Set_Structure
(Tmp_String, Tmp_Refs, Pnjs.Liste);
else
Struct_Component.Is_Inside
(String_Utilities.Upper_Case (Lex.Image),
Objets.Liste, Tmp_Refs, Found);
if Found then
Data := Struct_Component.Set_Structure
(Tmp_String, Tmp_Refs, Objets.Liste);
else
Struct_Component.Is_Inside
(String_Utilities.Upper_Case (Lex.Image),
Directions.Liste, Tmp_Refs, Found);
if Found then
Data := Struct_Component.Set_Structure
(Tmp_String, Tmp_Refs,
Directions.Liste);
else
Error.Append
(" : Identificateur inconnu !");
end if;
end if;
end if;
end if;
else
Bounded_String.Copy
(Tmp_String, String_Utilities.Upper_Case (Lex.Image));
Struct_Component.Is_Inside_All
(String_Utilities.Upper_Case (Lex.Image),
Tmp_Refs, Found);
if Found then
Tmptree := Feuille.Create (Feuille.Iter_S, Tmp_Refs);
else
Tmptree := Feuille.Create (Feuille.Enum, Tmp_String);
end if;
end if;
Lex.Next;
when T_Integer =>
if not (Monde.Table_Parsed) then
Data := Struct_Component.Set_Number
("Un entier", Lex.Image);
else
Tmptree := Feuille.Create (Feuille.Entier,
Natural'Value (Lex.Image));
end if;
Lex.Next;
when T_Peut =>
Lex.Next;
Enum.Parse (Ok);
if not (Monde.Table_Parsed) then
Bounded_String.Copy (Tmp_String, "Un enum");
Data := Struct_Component.Set_Enum
(Tmp_String, String_Table.Int_List.Firstvalue
(Enum.Liste), Enum.Liste);
end if;
Success := Success and Ok;
when others =>
Success := False;
Error.Append;
end case;
end Parse;
end Donnee;
nblk1=9
nid=0
hdr6=12
[0x00] rec0=1b rec1=00 rec2=01 rec3=07c
[0x01] rec0=1a rec1=00 rec2=09 rec3=03c
[0x02] rec0=03 rec1=00 rec2=03 rec3=008
[0x03] rec0=14 rec1=00 rec2=04 rec3=060
[0x04] rec0=01 rec1=00 rec2=06 rec3=052
[0x05] rec0=11 rec1=00 rec2=07 rec3=016
[0x06] rec0=13 rec1=00 rec2=02 rec3=064
[0x07] rec0=16 rec1=00 rec2=08 rec3=03e
[0x08] rec0=08 rec1=00 rec2=05 rec3=000
tail 0x2174de276865e68a13f3c 0x42a00088462060003