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

⟦27f1cf458⟧ TextFile

    Length: 2238 (0x8be)
    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 (Compilation_Unit.Produce_Metrics)
procedure Get_Next_Token (Out_Token : out Token_Package.Token;
                          From : in out Ada_Compilation_Unit;
                          Current_Loc : in Loc_State_Machine) is
    --===================================================================
    -- This procedure gets the next SIGNIFICANT token from a given     ==
    -- Ada_Compilation_Unit. It will update LOC blank-lines, comments, ==
    -- and physical-lines counts.                                      ==
    -- SIGNIFICANT tokens are those tokens other than BLANK_LINEs,     ==
    -- COMMENTs, and NEW_LINEs.                                        ==
    -- Exception SYNTAX_ERROR will be raised if there is no more token ==
    -- in the given Ada compilation unit.                              ==
    --===================================================================

    Copy_Of_From : New_List.List;
    Is_Significant_Token_Found : Boolean := False;

begin
    -- Get_Next_Token

    Copy_Of_From := New_List.List (From);

    Find_Significant_Token:
        loop

            case Token_Package.Class_Of (New_List.Content_Of (Copy_Of_From)) is

                when Token_Package.Blank_Line =>
                    Current_Loc.Change_Blank_Lines_Count;
                    Current_Loc.Change_Physical_Lines_Count;

                when Token_Package.Comment =>
                    Current_Loc.Change_Comments_Count;

                when Token_Package.New_Line =>
                    Current_Loc.Change_Physical_Lines_Count;

                when others =>
                    Is_Significant_Token_Found := True;

            end case;

            exit Find_Significant_Token when Is_Significant_Token_Found;

            -- advance Copy_Of_From to the next token
            Copy_Of_From := New_List.Seek
                               (Origin => Copy_Of_From, Offset => +1);

        end loop Find_Significant_Token;

    From := Ada_Compilation_Unit (New_List.Seek
                                     (Origin => Copy_Of_From, Offset => +1));
    Out_Token := New_List.Content_Of (This_List => Copy_Of_From);

exception
    when New_List.Overflow =>
        raise Syntax_Error;

end Get_Next_Token;