|
|
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 Champs, seg_046e88
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Error, Type_Table, Dynamic_Value, Unbounded_String;
package body Champs is
package Unlimited_String is new Unbounded_String (10);
procedure Parse_De is
use Lexical_Analyzer;
begin
if (Lexical_Analyzer.Get_Token /= De) then
Error.Set_Type_Error (Error.De_Expected);
raise Error.Excep_Syntaxe_Error;
end if;
Lexical_Analyzer.Next;
end Parse_De;
procedure Parse_Declaration_Ensemble is
use Lexical_Analyzer;
begin
if (Lexical_Analyzer.Get_Token /= Identifier) then
Error.Set_Type_Error (Error.Id_Expected);
raise Error.Excep_Syntaxe_Error;
end if;
Type_Table.Append_Field_In_Current_Type
(Lexical_Analyzer.Get_Value, Dynamic_Value.Set_Of_Words,
Lexical_Analyzer.Get_Line_In_File,
Lexical_Analyzer.Get_Position_In_Line);
Lexical_Analyzer.Next;
end Parse_Declaration_Ensemble;
procedure Parse_Parenthese_Ouvrante is
use Lexical_Analyzer;
begin
if (Lexical_Analyzer.Get_Token /= Left_Bracket) then
Error.Set_Type_Error (Error.Left_Bracket_Expected);
raise Error.Excep_Syntaxe_Error;
end if;
Lexical_Analyzer.Next;
end Parse_Parenthese_Ouvrante;
procedure Parse_Parenthese_Fermante is
use Lexical_Analyzer;
begin
if (Lexical_Analyzer.Get_Token /= Right_Bracket) then
Error.Set_Type_Error (Error.Right_Bracket_Expected);
raise Error.Excep_Syntaxe_Error;
end if;
Lexical_Analyzer.Next;
end Parse_Parenthese_Fermante;
procedure Parse_Type_Variable (Name : String) is
use Lexical_Analyzer;
begin
case Lexical_Analyzer.Get_Token is
when Chaine =>
Type_Table.Append_Field_In_Current_Type
(Name, Dynamic_Value.String_Of_Characters,
Lexical_Analyzer.Get_Line_In_File,
Lexical_Analyzer.Get_Position_In_Line);
when Entier =>
Type_Table.Append_Field_In_Current_Type
(Name, Dynamic_Value.Integer_Number,
Lexical_Analyzer.Get_Line_In_File,
Lexical_Analyzer.Get_Position_In_Line);
when others =>
Error.Set_Type_Error (Error.Decl_Type_Simple_Expected);
raise Error.Excep_Syntaxe_Error;
end case;
Lexical_Analyzer.Next;
end Parse_Type_Variable;
function Parse_Identificateur return String is
use Lexical_Analyzer;
Name : Unlimited_String.Variable_String;
begin
if (Lexical_Analyzer.Get_Token /= Identifier) then
Error.Set_Type_Error (Error.Id_Expected);
raise Error.Excep_Syntaxe_Error;
end if;
Name := Unlimited_String.Value (Lexical_Analyzer.Get_Value);
Lexical_Analyzer.Next;
return Unlimited_String.Image (Name);
end Parse_Identificateur;
procedure Parse_Type_Herite (Name : String) is
use Lexical_Analyzer;
begin
if (Lexical_Analyzer.Get_Token /= Identifier) then
Error.Set_Type_Error (Error.Id_Expected);
raise Error.Excep_Syntaxe_Error;
end if;
Type_Table.Inherite_Type (Name, Lexical_Analyzer.Get_Value,
Lexical_Analyzer.Get_Line_In_File,
Lexical_Analyzer.Get_Position_In_Line);
Lexical_Analyzer.Next;
end Parse_Type_Herite;
procedure Parse is
use Lexical_Analyzer;
Name_Of_Id : Unlimited_String.Variable_String;
begin
case (Lexical_Analyzer.Get_Token) is
when Ensemble =>
Lexical_Analyzer.Next;
Parse_De;
Parse_Declaration_Ensemble;
when Identifier =>
Name_Of_Id := Unlimited_String.Value (Parse_Identificateur);
Parse_Parenthese_Ouvrante;
Parse_Type_Variable (Unlimited_String.Image (Name_Of_Id));
Parse_Parenthese_Fermante;
when Heritage =>
Lexical_Analyzer.Next;
Parse_De;
Name_Of_Id := Unlimited_String.Value (Parse_Identificateur);
Parse_Parenthese_Ouvrante;
Parse_Type_Herite (Unlimited_String.Image (Name_Of_Id));
Parse_Parenthese_Fermante;
when others =>
Error.Set_Type_Error (Error.Decl_Champs_Expected);
raise Error.Excep_Syntaxe_Error;
end case;
end Parse;
function Is_First (Un_Token : Lexical_Analyzer.Tokens) return Boolean is
use Lexical_Analyzer;
begin
return ((Un_Token = Ensemble) or (Un_Token = Heritage) or
(Un_Token = Identifier));
end Is_First;
end Champs;
nblk1=8
nid=5
hdr6=c
[0x00] rec0=1f rec1=00 rec2=01 rec3=026
[0x01] rec0=1c rec1=00 rec2=04 rec3=054
[0x02] rec0=19 rec1=00 rec2=03 rec3=036
[0x03] rec0=1e rec1=00 rec2=06 rec3=00e
[0x04] rec0=1a rec1=00 rec2=07 rec3=032
[0x05] rec0=06 rec1=00 rec2=08 rec3=000
[0x06] rec0=06 rec1=00 rec2=05 rec3=000
[0x07] rec0=08 rec1=5f rec2=f7 rec3=6b2
tail 0x21543d942865267178f16 0x42a00088462060003
Free Block Chain:
0x5: 0000 00 02 01 81 80 0a 45 78 70 65 63 74 65 64 29 3b ┆ Expected);┆
0x2: 0000 00 00 00 f4 80 17 6f 72 2e 45 78 63 65 70 5f 53 ┆ or.Excep_S┆