DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦66cc29634⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Calcul, seg_0378cd, seg_03902c, seg_039082, seg_0391fb, separate Semantique

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with Stack_Generic;
with Lexical;
use Lexical;  
with Erreurs;

separate (Semantique)
package body Calcul is

    subtype Facteur is Integer;
    type Ptr_Facteur is access Facteur;

    type Operateur is ('(', '+', '-', '*', 'p', 'm', ')', Finop);
    package Es_Op is new Text_Io.Enumeration_Io (Operateur);
    use Es_Op;

    type Elt (Isfact : Boolean) is
        record
            case Isfact is
                when False =>
                    Op : Operateur;
                when True =>
                    Fact : Ptr_Facteur;
            end case;
        end record;
    type Ptr_Elt is access Elt;


    Var_Undef : exception;


    package Pilfact is new Stack_Generic (Ptr_Facteur);
    Pile : Pilfact.Stack;


    package Piloper is new Stack_Generic (Operateur);
    Pilop : Piloper.Stack;


    Par_Ferm, Err_Op : exception;
    Precoper : Boolean := True;
    Op_Inconnu : Character;


    procedure Getval (Nb : out Integer) is
        F : Ptr_Facteur;
    begin
        F := Pilfact.Top (Pile);
        Pilfact.Pop (Pile);
        Nb := F.all;
    end Getval;


    function Lirelem (Un_Token : Lexical.Token; Une_Valeur : Integer)
                     return Ptr_Elt is separate;


    procedure Demarre_Calcul is
    begin  
        Pilfact.Make_Empty (Pile);
        Piloper.Make_Empty (Pilop);
        Piloper.Push (Finop, Pilop);
    end Demarre_Calcul;


    procedure Calculateur (Un_Elem : Ptr_Elt) is separate;


    procedure Postfixer (Un_Elem : Ptr_Elt) is separate;


    procedure Empiler (Un_Jeton : Lexical.Token; Une_Valeur : Integer := 0) is
    begin
        Postfixer (Lirelem (Un_Jeton, Une_Valeur));
    end Empiler;


    procedure Evaluer_Expression (La_Valeur : out Integer) is
    begin
        La_Valeur := Pilfact.Top (Pile).all;
        Pilfact.Pop (Pile);
    end Evaluer_Expression;


end Calcul;


E3 Meta Data

    nblk1=6
    nid=6
    hdr6=4
        [0x00] rec0=2d rec1=00 rec2=01 rec3=02c
        [0x01] rec0=2a rec1=00 rec2=02 rec3=000
        [0x02] rec0=26 rec1=00 rec2=06 rec3=032
        [0x03] rec0=05 rec1=00 rec2=05 rec3=000
        [0x04] rec0=0d rec1=00 rec2=05 rec3=000
        [0x05] rec0=05 rec1=00 rec2=02 rec3=000
    tail 0x217345a9c84e24a62dbe9 0x42a00088462060003
Free Block Chain:
  0x6: 0000  00 05 03 fc 80 02 69 73 02 00 18 20 20 20 20 20  ┆      is        ┆
  0x5: 0000  00 03 00 1f 80 02 6e 3b 02 00 00 00 00 00 00 00  ┆      n;        ┆
  0x3: 0000  00 04 03 fc 80 14 20 20 20 20 20 20 20 20 20 20  ┆                ┆
  0x4: 0000  00 00 01 66 80 01 3b 01 00 0f 20 20 20 20 20 20  ┆   f  ;         ┆