DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ B T ┃
Length: 5934 (0x172e) Types: TextFile Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11 └─ ⟦129cab021⟧ »DATA« └─⟦this⟧ └─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04 └─ ⟦d65440be7⟧ »DATA« └─⟦this⟧
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". --|