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

⟦97c0a89b6⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Exprs, seg_04474f

Derivation

└─⟦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 Lex, Error, Token_Pkg, Set_Of_Token, Element, Element_Global, Donnee;
use Token_Pkg;
package body Exprs is
------------------------------------------------------------------------
-- <UNIT>        Exprs
------------------------------------------------------------------------
--
-- <DESCRIPTION>    This package defines an operation for parsing the
--                  grammatical expresssion : <Exprs>
--
-- <AUTHOR>         Barthe Raphael, Beck Didier, Kempe Laurent
-- <VERSION>        1.0
-- <DATE>           16-Jan-95
-- <MODIFY>         16-Jan-95
--
-- <PKG USED>       LEX, Token_Pkg, Error,
--
------------------------------------------------------------------------

    Unit_Donnee : Set_Of_Token.Object :=
       Set_Of_Token.Make ((T_Vrai, T_Faux, T_Ident,
                           T_String, T_Peut, T_Integer));

    Unit_Element_Global : Set_Of_Token.Object :=
       Set_Of_Token.Make ((T_Objet, T_Pnj, T_Hero, T_Direction,
                           T_Piece_Courante, T_Le));

    procedure Parse (Success : in out Boolean) is
------------------------------------------------------------------------
-- <SUBPROGRAM>
-- <UNIT>        Parse
--
-- <DESCRIPTION> Try to parse <Exprs> and return if it was a
--               success or not.
--
-- <EXCEPTIONS>  Nothing
--
------------------------------------------------------------------------
        Ok : Boolean := True;
    begin

        if Set_Of_Token.Is_Member (Lex.Gettoken, Unit_Element_Global) then
            Element_Global.Parse (Ok);
            Success := Success and Ok;
            if Lex.Currenttoken_Is (T_Equ) then
                Lex.Next;
                if Set_Of_Token.Is_Member
                      (Lex.Gettoken, Unit_Element_Global) then
                    Element_Global.Parse (Ok);
                    Success := Success and Ok;
                elsif Set_Of_Token.Is_Member (Lex.Gettoken, Unit_Donnee) then
                    Donnee.Parse (Ok);
                    Success := Success and Ok;
                else
                    Success := False;
                    Error.Append;
                end if;
            else
                Success := False;
                Error.Append;
            end if;
        else
            case Lex.Gettoken is

                when T_Ident =>
                    Lex.Next;
                    Element.Parse (Ok);
                    Success := Success and Ok;
                    if Lex.Currenttoken_Is (T_Equ) then
                        Lex.Next;
                        if Set_Of_Token.Is_Member
                              (Lex.Gettoken, Unit_Element_Global) then
                            Element_Global.Parse (Ok);
                            Success := Success and Ok;
                        elsif Set_Of_Token.Is_Member
                                 (Lex.Gettoken, Unit_Donnee) then
                            Donnee.Parse (Ok);
                            Success := Success and Ok;
                        else
                            Success := False;
                            Error.Append;
                        end if;  
                    else
                        Success := False;
                        Error.Append;
                    end if;

                when T_Obracket =>
                    Lex.Next;
                    if Lex.Currenttoken_Is (T_Ident) then
                        Lex.Next;
                        if Set_Of_Token.Is_Member
                              (Lex.Gettoken, Unit_Element_Global) then
                            Element_Global.Parse (Ok);
                            Success := Success and Ok;
                        elsif Lex.Currenttoken_Is (T_Ident) then
                            Lex.Next;
                            if Lex.Currenttoken_Is (T_Ident) then
                                Lex.Next;
                            end if;
                        end if;
                    else
                        Success := False;
                        Error.Append;  
                    end if;
                    if Lex.Currenttoken_Is (T_Cbracket) then
                        Lex.Next;
                    else
                        Success := False;
                        Error.Append;  
                    end if;

                when others =>
                    Success := False;
                    Error.Append;
            end case;
        end if;

        if Lex.Currenttoken_Is (T_Et) then
            Lex.Next;
            Exprs.Parse (Ok);
            Success := Success and Ok;
        end if;

    end Parse;

end Exprs;

E3 Meta Data

    nblk1=6
    nid=0
    hdr6=c
        [0x00] rec0=1b rec1=00 rec2=01 rec3=024
        [0x01] rec0=1a rec1=00 rec2=05 rec3=02a
        [0x02] rec0=10 rec1=00 rec2=06 rec3=05a
        [0x03] rec0=17 rec1=00 rec2=04 rec3=026
        [0x04] rec0=18 rec1=00 rec2=03 rec3=012
        [0x05] rec0=0d rec1=00 rec2=02 rec3=001
    tail 0x217458d7a863e897e6331 0x42a00088462060003