|
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 - download
Length: 6144 (0x1800) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Fonction_Numerique, seg_0481c7, seg_048c3b, seg_048cab, seg_048ddc
└─⟦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⟧
with Lex; with Expression_Fonction; with Traduction_Scenario; package body Fonction_Numerique is procedure Expression (Ok : in out Boolean; Value : out Expression_Fonction.T_Numeric_Function); procedure Facteur (Ok : in out Boolean; Value : out Expression_Fonction.T_Numeric_Function) is use Lex; Val : Expression_Fonction.T_Numeric_Function; begin Ok := True; case Lex.Get_Token is when L_Left_Bracket => Lex.Next; Expression (Ok, Val); Value := Val; if Ok then if Lex.Get_Token = L_Right_Bracket then Lex.Next; else Ok := False; end if; else Ok := False; end if; when L_Id => Value := Expression_Fonction.Make_Node (Typ => Expression_Fonction.Type_Leaf_Id, Val => Lex.Get_Value); Lex.Next; when L_Number => Value := Expression_Fonction.Make_Node (Typ => Expression_Fonction.Type_Leaf_Numeric, Val => Lex.Get_Value); Lex.Next; when others => Ok := False; end case; end Facteur; procedure Term (Ok : in out Boolean; Value : out Expression_Fonction.T_Numeric_Function) is use Lex; Val, Val1, Val2 : Expression_Fonction.T_Numeric_Function; Op : Expression_Fonction.Numeric_Operator; begin Facteur (Ok, Val1); Val := Val1; if Ok then while (Ok = True and (Lex.Get_Token = L_Multiplication or Lex.Get_Token = L_Division or Lex.Get_Token = L_Modulo)) loop Op := Expression_Fonction.To_Numeric_Operator (Lex.Get_Value); Lex.Next; Facteur (Ok, Val2); Val := Expression_Fonction.Make_Node (Op => Op, Left_Node => Val1, Right_Node => Val2); Val1 := Val; end loop; else Ok := False; end if; Value := Val; end Term; procedure Expression (Ok : in out Boolean; Value : out Expression_Fonction.T_Numeric_Function) is use Lex; Val, Val1, Val2 : Expression_Fonction.T_Numeric_Function; Op : Expression_Fonction.Numeric_Operator; begin Term (Ok, Val1); Val := Val1; if Ok then while (Ok and (Lex.Get_Token = L_Moins or Lex.Get_Token = L_Plus)) loop Op := Expression_Fonction.To_Numeric_Operator (Lex.Get_Value); Lex.Next; Term (Ok, Val2); Val := Expression_Fonction.Make_Node (Op => Op, Left_Node => Val1, Right_Node => Val2); Val1 := Val; end loop; else Ok := False; end if; Value := Val; end Expression; procedure Parse (Ok : in out Boolean) is use Lex; Val : Expression_Fonction.T_Numeric_Function; begin if Lex.Get_Token = L_Equal then Lex.Next; Expression (Ok, Val); Traduction_Scenario.Add_The_New_Numeric_Function (P => Val); else Ok := False; end if; end Parse; end Fonction_Numerique;
nblk1=5 nid=4 hdr6=8 [0x00] rec0=1e rec1=00 rec2=01 rec3=048 [0x01] rec0=1b rec1=00 rec2=02 rec3=002 [0x02] rec0=1b rec1=00 rec2=05 rec3=042 [0x03] rec0=1c rec1=00 rec2=03 rec3=000 [0x04] rec0=1b rec1=00 rec2=05 rec3=000 tail 0x2174c2e5686586ac22770 0x42a00088462060003 Free Block Chain: 0x4: 0000 00 00 03 3c 80 29 74 69 6f 6e 2e 54 6f 5f 4e 75 ┆ < )tion.To_Nu┆