DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: B T

⟦1edd03e1d⟧ TextFile

    Length: 3320 (0xcf8)
    Types: TextFile
    Names: »B«

Derivation

└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
    └─⟦5cb1d1d7f⟧ »DATA« 
        └─⟦3b1ee7bd8⟧ 
            └─⟦this⟧ 

TextFile

separate (Find_Unit.Build_Ada_Compilation_Unit)
procedure Task_Spec (Current_Unit : in out
                        Compilation_Unit.Ada_Compilation_Unit) is
    --==============================================================
    -- This procedure builds the next part of the grammar for an   =
    -- Ada compilation unit. Based on the next token, we will      =
    -- complete different productions. At present, we are parsing  =
    -- a task specification. We must look for either semicolon or  =
    -- a an 'is'. If an ';' is found, then the specification is    =
    -- found. If an 'is' is found, then search for the end of the  =
    -- task specification.                                         =
    -- The grammar :                                               =
    --               <Task_Spec> = ';' |                           =
    --                             'IS' * <End_Unit>               =
    --                                                             =
    -- written  by  GER  with  help  from  b2  and  JM             =
    -- May 1985  at EVB Software Engineering                       =
    --==============================================================

    Current_Token : Token_Package.Token;
    -- Holds the current token
    Peek_Token : Token_Package.Token;
    -- A token that will be looked at again

begin
    -- Task_Spec

    -- Search for a semi-colon or an "is". If the token is
    -- a semi-colon, then task specification has been found.
    -- If the token is an "is", then search for "end".

    Get_Next_Significant_Token (Significant_Token => Current_Token,
                                Current_Unit => Current_Unit);

    case Token_Package.Value_Of (Current_Token) is
        when Token_Package.Semicolon_Token =>
            --**
            Compilation_Unit.Add_Token_To_Compilation_Unit
               (Token_To_Add => Current_Token, Unit_To_Add_To => Current_Unit);

        when Token_Package.Is_Token =>

            Compilation_Unit.Add_Token_To_Compilation_Unit
               (Token_To_Add => Current_Token, Unit_To_Add_To => Current_Unit);

            -- repeatly get tokens until an end is found

            Search_For_The_End:
                loop
                    Peek_Next_Significant_Token
                       (Significant_Token => Peek_Token);

                    exit Search_For_The_End when
                       Token_Package.Value_Of (Peek_Token) =
                          Token_Package.End_Token;

                    Get_Next_Significant_Token
                       (Significant_Token => Current_Token,
                        Current_Unit => Current_Unit);

                    if Token_Package.Class_Of (Current_Token) =
                       Token_Package.End_Of_File then
                        raise Build_Syntax_Error;
                    else
                        Compilation_Unit.Add_Token_To_Compilation_Unit
                           (Token_To_Add => Current_Token,
                            Unit_To_Add_To => Current_Unit);
                    end if;

                end loop Search_For_The_End;

            End_Unit (Current_Unit => Current_Unit);

        when others =>
            -- This is an unknown token, raise syntax error
            raise Build_Syntax_Error;
    end case;

end Task_Spec;