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: T V

⟦115f62325⟧ TextFile

    Length: 6906 (0x1afa)
    Types: TextFile
    Names: »V«

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


-----------------------------------------------------------------------

with Host_Dependencies;  -- host dependent constants
with Parsetables;  -- constants and state tables
use Parsetables;

with Grammar_Constants;
use Grammar_Constants;

package Parserdeclarations is
    --| Objects used by the Parser

    --| Notes

    --| Abbreviations used in this compilation unit:
    --|
    --| gram : grammar
    --| sym  : symbol
    --| val  : value
    --|

    package Hd renames Host_Dependencies;
    package Pt renames Parsetables;
    package Gc renames Grammar_Constants;

    -- Exceptions --

    Memoryoverflow : exception;  --| raised if Parser runs out of
    --| newable memory.
    Parser_Error : exception;  --| raised if an error occurs during
    --| parsing.

    --| The double delimiters were named with a combination of the name of
    --| each component symbol.

    Arrow_Tokenvalue : Grammarsymbolrange renames Eqgt_Tokenvalue;
    Exponentiation_Tokenvalue : Grammarsymbolrange renames Starstar_Tokenvalue;
    Assignment_Tokenvalue : Grammarsymbolrange renames Coloneq_Tokenvalue;
    Notequals_Tokenvalue : Grammarsymbolrange renames Slasheq_Tokenvalue;
    Startlabel_Tokenvalue : Grammarsymbolrange renames Ltlt_Tokenvalue;
    Endlabel_Tokenvalue : Grammarsymbolrange renames Gtgt_Tokenvalue;
    Box_Tokenvalue : Grammarsymbolrange renames Ltgt_Tokenvalue;

    ------------------------------------------------------------------
    -- Grammar Symbol Classes
    ------------------------------------------------------------------

    subtype Reservedwordrange is Grammarsymbolrange
                                    range Aborttokenvalue .. Xortokenvalue;

    subtype Singledelimiterrange is
       Grammarsymbolrange range Ampersand_Tokenvalue .. Bar_Tokenvalue;

    subtype Doubledelimiterrange is Grammarsymbolrange
                                       range Arrow_Tokenvalue .. Box_Tokenvalue;

    ------------------------------------------------------------------
    -- ParseTables.GetAction return values
    ------------------------------------------------------------------

    subtype Error_Action_Range is     --| ActionRange that indicates
       Actionrange range 0 .. 0;  --| the error range

    subtype Shift_Action_Range is     --| ActionRange that indicates
       --| a shift action.
       Actionrange range 1 .. (Statecountplusone - 1);

    subtype Accept_Action_Range is     --| ActionRange that indicates
       --| the accept action.
       Actionrange range Statecountplusone .. Statecountplusone;

    subtype Reduce_Action_Range is     --| ActionRange that indicates
       --| a reduce action.
       Actionrange range (Statecountplusone + 1) .. Actioncount;

    ------------------------------------------------------------------
    -- Queue and Stack Management
    ------------------------------------------------------------------

    subtype Stateparsestacksindex is     --| range of index values for
       Gc.Parserinteger range 0 .. 200;  --| StateStack and ParseStack

    subtype Stateparsestacksrange is     --| array index values for
       --| StateStack and ParseStack
       Stateparsestacksindex range 1 .. Stateparsestacksindex'Last;

    Look_Ahead_Limit : Positive := 5;  --| Look ahead limit for parser

    ------------------------------------------------------------------
    -- StateStack Element
    ------------------------------------------------------------------

    subtype Statestackelement is Staterange;

    type Source_Text is access String;

    Null_Source_Text : constant Source_Text := null;

    ------------------------------------------------------------------
    -- ParseStack and Grammar Symbol Elements
    ------------------------------------------------------------------

    type Token is
        record
            Text : Source_Text;
            Srcpos_Line : Hd.Source_Line;
            Srcpos_Column : Hd.Source_Column;
        end record;

    type Parsestackelement is
        record
            Gram_Sym_Val : Grammarsymbolrange;
            --| used by parser to identify kind of grammar symbol
            Lexed_Token : Token;
            --| lexed tokens not yet reduced (eliminated)
            --| by ReduceActions.
        end record;

    ------------------------------------------------------------------

    Curtoken : Parsestackelement;
    --| return from Lex.GetNextSourceToken
    --| Token used in subprogram Parse to determine
    --| next action from.
    --| Also used in ReduceActionsUtilities to determine last
    --| compilation unit in a compilation.

    ------------------------------------------------------------------
    -- Subprogram Bodies Global to Package ParserDeclarations
    ------------------------------------------------------------------

    function Get_Source_Text ( --| get a string from a Source_Text
                              --| object
                              In_Source_Text : in
                              --| the object to get the string from
                              Source_Text) return String;

    --| Effects

    --| This subprogram gets a string from a Source_Text object.
    --| It exists to concentrate the interface to Source_Text objects.

    ------------------------------------------------------------------

    procedure Put_Source_Text ( --| put a string into a Source_Text
                               --| object
                               In_String : in String;
                               --| the string to store
                               In_Out_Source_Text : in out
                                  --| the object to store the string in
                                  Source_Text);


    --| Effects

    --| This subprogram stores a string in a Source_Text object.
    --| It exists to concentrate the interface to Source_Text objects.

    ------------------------------------------------------------------

    function Dump_Parse_Stack_Element ( --| return the data in a
                                       --| ParseStackElement or
                                       --| TokenQueueElement as a string
                                       In_Pse : in Parsestackelement
                                       --| the Element to display.
                                       ) return String;

    --| Effects

    --| This subprogram returns the data in a ParseStackElement or its
    --| sub-type a TokenQueueElement as a string.

    --| Notes

    --| Abbreviations used in this compilation unit
    --|
    --| PSE : ParseStackElement
    --|
    --| Only the lexed_token variant is currently fully displayed.
    --| The other variants would have to make use of an IDL
    --| writer.

    ------------------------------------------------------------------

end Parserdeclarations;

----------------------------------------------------------------------