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

⟦f9f14244f⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Postfixer, seg_03715a, seg_037185, seg_03902e, seg_039084, separate Semantique.Calcul

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 Lexical;
use Lexical;

separate (Semantique.Calcul)
procedure Postfixer (Un_Elem : Ptr_Elt) is  
    Oper : Operateur;


    type Priorite is range 0 .. 4;
    type Tab_Pr is array (Operateur) of Priorite;
    Pr_Pile : constant Tab_Pr :=
       Tab_Pr'('+' | '-' => 1, '*' => 2, 'm' | 'p' => 3, others => 0);
    Pr_Newop : constant Tab_Pr :=
       Tab_Pr'(Finop => 0, '+' | '-' => 1, '*' => 2, others => 4);
begin
    if Un_Elem.Isfact then
        Calculateur (Un_Elem);
    elsif Un_Elem.Op = Finop then
        while not Piloper.Empty (Pilop) loop
            Oper := Piloper.Top (Pilop);
            Piloper.Pop (Pilop);
            Calculateur (new Elt'(False, Oper));  
        end loop;  
    elsif Un_Elem.Op = ')' then
        loop
            Oper := Piloper.Top (Pilop);
            Piloper.Pop (Pilop);
            exit when Oper = '(' or Oper = Finop;
            Calculateur (new Elt'(False, Oper));
        end loop;
        if Oper = Finop then
            raise Par_Ferm;
        end if;
    else
        loop
            Oper := Piloper.Top (Pilop);
            Piloper.Pop (Pilop);
            exit when Pr_Newop (Un_Elem.Op) > Pr_Pile (Oper);
            Calculateur (new Elt'(False, Oper));
        end loop;
        Piloper.Push (Oper, Pilop);
        Piloper.Push (Un_Elem.Op, Pilop);
    end if;  
exception
    when Par_Ferm =>
        Erreurs.Ajouter ("Parenthese fermante incongrue.");
    when Err_Op =>
        Erreurs.Ajouter ("Operateur inconnu : " & Op_Inconnu);
    when Numeric_Error =>
        Erreurs.Ajouter ("Nombre trop grand........");
end Postfixer;

E3 Meta Data

    nblk1=4
    nid=4
    hdr6=4
        [0x00] rec0=20 rec1=00 rec2=01 rec3=01c
        [0x01] rec0=15 rec1=00 rec2=02 rec3=000
        [0x02] rec0=17 rec1=00 rec2=02 rec3=000
        [0x03] rec0=15 rec1=00 rec2=03 rec3=000
    tail 0x217345b0c84e24abd1694 0x42a00088462060003
Free Block Chain:
  0x4: 0000  00 03 03 fc 80 11 65 75 72 27 28 4c 61 5f 56 61  ┆      eur'(La_Va┆
  0x3: 0000  00 00 00 04 80 01 74 01 20 65 6e 05 06 20 20 77  ┆      t  en    w┆