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

⟦db5de447e⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Facteur, seg_048feb, seg_0493b9

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, Token_List, Erreur, Expression, Variable, Nombre;
with Models, Symbols, Abstract_Tree, Bounded_String;

use Lexical, Token_List, Bounded_String;

package body Facteur is

    Follow : Token_List.Object :=
       Make ((Mul, Div, Plus, Moins, Et, Ou, Si, Comp, Id, Lie_Connexion,
              Delie_Connexion, Lie_Lien, Delie_Lien, Liste_Lien,
              Echanger_Lien, Afficher, Fin, Finsi, Finpour, Parntf));

    procedure Parse (Node : in out Abstract_Tree.Object;
                     Models_Table : Models.Object;
                     Symbols_Table : Symbols.Object) is
        Node_Down : Abstract_Tree.Object;
        Int_Value : Integer;
        Nom_Var, Nom_Ext : Variable_String (32);
    begin

        if Is_In (Lexical.Get_Token, Nombre.First) then
            Nombre.Parse (Int_Value);
            Node := Abstract_Tree.Make_Node (Int_Value);
        else
            case Lexical.Get_Token is

                when Parnto =>
                    Lexical.Next;
                    Expression.Parse (Node, Models_Table, Symbols_Table);
                    if Lexical.Get_Token = Parntf then
                        Lexical.Next;
                    else
                        Erreur.Syntaxe ("Manque )", Follow);
                    end if;

                when Non =>
                    Lexical.Next;
                    Parse (Node_Down, Models_Table, Symbols_Table);
                    Node := Abstract_Tree.Make_Node (Non, Node_Down);

                when Id | Comp =>
                    Variable.Parse (Nom_Var, Nom_Ext);  
                    Node := Abstract_Tree.Make_Node
                               (Image (Nom_Var), Image (Nom_Ext),
                                Models_Table, Symbols_Table);

                when Vrai | Faux =>
                    Node := Abstract_Tree.Make_Node (Lexical.Get_Token);
                    Lexical.Next;

                when others =>
                    Erreur.Syntaxe ("Facteur non valide", Follow);
                    Node := Abstract_Tree.Make_Node (0);

            end case;
        end if;

    end Parse;

end Facteur;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=1d rec1=00 rec2=01 rec3=004
        [0x01] rec0=01 rec1=00 rec2=03 rec3=036
        [0x02] rec0=17 rec1=00 rec2=04 rec3=084
        [0x03] rec0=0a rec1=00 rec2=02 rec3=000
    tail 0x2174d4ec4865b3dbc0b19 0x42a00088462060003