DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ B T ┃
Length: 2498 (0x9c2) Types: TextFile Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11 └─ ⟦129cab021⟧ »DATA« └─⟦this⟧ └─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04 └─ ⟦d65440be7⟧ »DATA« └─⟦this⟧
with Lex; --use Lex; with Text_Io; package body Parse is procedure Error is begin Text_Io.Put ("Error ..."); Text_Io.Put_Line (" "); end Error; procedure Value is begin case Lex.Get_Token is when (Lex.Id) => Lex.Next; when Lex.Token'(Lex.Int) => Lex.Next; when Lex.Token'(Lex.Hour) => Lex.Next; when others => Error; end case; end Value; procedure Factor; procedure Term is begin Factor; while Lex.Current_Token_Is (Lex.'*') loop Lex.Next; Factor; end loop; end Term; procedure Expression is use Lex; begin Term; while (Lex.Current_Token_In ((Lex.'+', Lex.'-'))) loop case Lex.Get_Token is when Lex.'+' => Lex.Next; Term; when Lex.Token'(Lex.'-') => Lex.Next; Term; when others => Error; end case; end loop; end Expression; procedure Factor is S1, S2 : Lex.Token; begin S1 := Lex.Get_Token; S2 := Lex.'('; if Lex."=" (S1, Lex.'(') then Lex.Next; Expression; if (Lex.Get_Token = Lex.Token'(Lex.')')) then Lex.Next; else Error; end if; else Value; end if; end Factor; procedure Affect is begin if (Lex.Get_Token = Lex.Token'(Lex.Id)) then Lex.Next; if (Lex.Get_Token = Lex.Token'(Lex.Let)) then Lex.Next; Expression; else Error; end if; else Error; end if; end Affect; procedure Liste is begin while (Lex.Get_Token /= Lex.Token'(Lex.'}')) loop Affect; end loop; end Liste; procedure Corps is begin if (Lex.Get_Token = Lex.Token'(Lex.'{')) then Lex.Next; Liste; if (Lex.Get_Token = Lex.Token'(Lex.'}')) then Lex.Next; else Error; end if; end if; end Corps; procedure Start is begin Lex.Next; Expression; end Start; end Parse;