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

⟦402111aba⟧ Ada Source

    Length: 8192 (0x2000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Get_Arguments, seg_030b0c, separate Ayacc.Initialize

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Command_Line_Interface;
use Command_Line_Interface;
with String_Pkg;
use String_Pkg;
--VAX with Vms_Lib;

separate (Ayacc.Initialize)
procedure Get_Arguments (File : out String_Type;
                         C_Lex : out Switch;
                         Debug : out Switch;
                         Summary : out Switch;
                         Verbose : out Switch;
                         Extension : out String_Type) is

    C_Lex_Argument : String_Type;
    Debug_Argument : String_Type;
    Summary_Argument : String_Type;
    Verbose_Argument : String_Type;

    Positional : Natural := 0;

    -- Number of positional parameters
    Total : Natural := 0;

    -- Total number of parameters
    Max_Parameters : constant := 6;

    Incorrect_Call : exception;

    function Convert_Switch is
       new Convert (Parameter_Type => Switch, Type_Name => "Switch");

    procedure Put_Help_Message is
    begin
        New_Line;
        Put_Line ("  -- Ayacc: An Ada Parser Generator.");
        New_Line;
        Put_Line ("  type Switch is (On, Off);");
        New_Line;
        Put_Line ("  procedure Ayacc (File      : in String;");
        Put_Line ("                   C_Lex     : in Switch := Off;");
        Put_Line ("                   Debug     : in Switch := Off;");
        Put_Line ("                   Summary   : in Switch := On;");
        Put_Line ("                   Verbose   : in Switch := Off;");
        Put_Line ("                   Extension : in String := "".a"");");
        New_Line;
        Put_Line ("  -- File       Specifies the Ayacc Input Source File.");
        Put_Line
           ("  -- C_Lex      Specifies the Generation of a 'C' Lex Interface.");
        Put_Line
           ("  -- Debug      Specifies the Production of Debugging Output");
        Put_Line ("  --              By the Generated Parser.");
        Put_Line
           ("  -- Summary    Specifies the Printing of Statistics About the");
        Put_Line ("  --              Generated Parser.");
        Put_Line
           ("  -- Verbose    Specifies the Production of a Human Readable");
        Put_Line
           ("  --              Report of States in the Generated Parser.");
        Put_Line
           ("  -- Extension  Specifies the file extension to be used for");
        Put_Line ("                  generated Ada files.");
        New_Line;
    end Put_Help_Message;

begin

--VAX   Vms_Lib.Set_Error;
    Command_Line_Interface.Initialize (Tool_Name => "Ayacc");

    Positional := Positional_Arg_Count;
    Total := Named_Arg_Count + Positional;

    if Total = 0 then
        raise Incorrect_Call;
    elsif Total > Max_Parameters then
        Put_Line ("Ayacc: Too many parameters.");
        raise Incorrect_Call;
    end if;

    -- Get named values
    File := Named_Arg_Value ("File", "");
    C_Lex_Argument := Named_Arg_Value ("C_Lex", "Off");
    Debug_Argument := Named_Arg_Value ("Debug", "Off");
    Summary_Argument := Named_Arg_Value ("Summary", "On");
    Verbose_Argument := Named_Arg_Value ("Verbose", "Off");
    Extension := Named_Arg_Value ("Extension", ".a");

    -- Get any positional associations
    if Positional >= 1 then
        File := Positional_Arg_Value (1);
        if Positional >= 2 then
            C_Lex_Argument := Positional_Arg_Value (2);
            if Positional >= 3 then
                Debug_Argument := Positional_Arg_Value (3);
                if Positional >= 4 then
                    Summary_Argument := Positional_Arg_Value (4);
                    if Positional >= 5 then
                        Verbose_Argument := Positional_Arg_Value (5);
                        if Positional = Max_Parameters then
                            Extension := Positional_Arg_Value (Max_Parameters);
                        end if;
                    end if;
                end if;
            end if;
        end if;
    end if;

    Command_Line_Interface.Finalize;

    C_Lex := Convert_Switch (Value (C_Lex_Argument));
    Debug := Convert_Switch (Value (Debug_Argument));
    Summary := Convert_Switch (Value (Summary_Argument));
    Verbose := Convert_Switch (Value (Verbose_Argument));

exception

    when Incorrect_Call | Invalid_Parameter | Invalid_Parameter_Order |
         Missing_Positional_Arg | Unreferenced_Named_Arg |
         Invalid_Named_Association | Unbalanced_Parentheses =>

        Put_Help_Message;
        raise Invalid_Command_Line;

end Get_Arguments;
-- Copyright (c) 1990 Regents of the University of California.
-- All rights reserved.
--
--    The primary authors of ayacc were David Taback and Deepak Tolani.
--    Enhancements were made by Ronald J. Schmalz.
--
--    Send requests for ayacc information to ayacc-info@ics.uci.edu
--    Send bug reports for ayacc to ayacc-bugs@ics.uci.edu
--
-- Redistribution and use in source and binary forms are permitted
-- provided that the above copyright notice and this paragraph are
-- duplicated in all such forms and that any documentation,
-- advertising materials, and other materials related to such
-- distribution and use acknowledge that the software was developed
-- by the University of California, Irvine.  The name of the
-- University may not be used to endorse or promote products derived
-- from this software without specific prior written permission.
-- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

--|
--| Notes: This routine contains the machine specific details of how
--|        Ayacc obtains the command line arguments from the host Operating
--|        System.  This version assumes Verdix running on Unix machines.
--|
--|        The only requirement on this subunit is that it place the string
--|        of characters typed by the user on the command line into the
--|        parameter "Command_Args".
--|

E3 Meta Data

    nblk1=7
    nid=0
    hdr6=e
        [0x00] rec0=25 rec1=00 rec2=01 rec3=00e
        [0x01] rec0=12 rec1=00 rec2=02 rec3=068
        [0x02] rec0=1d rec1=00 rec2=03 rec3=06e
        [0x03] rec0=16 rec1=00 rec2=04 rec3=010
        [0x04] rec0=1e rec1=00 rec2=05 rec3=026
        [0x05] rec0=11 rec1=00 rec2=06 rec3=068
        [0x06] rec0=05 rec1=00 rec2=07 rec3=001
    tail 0x21529829e84a64fbc25fa 0x42a00088462060003