Google
 

Trailing-Edge - PDP-10 Archives - DEC_CMS-20_V1.0_SRC - cms/sources/comusr.req
There are no other files named comusr.req in the archive.
! COMUSR.REQ  -- Declarations for the user of the COMAND routine.

!
!			  COPYRIGHT (C) 1982 BY
!	      DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
!
! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
! ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE
! INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER
! COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
! OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
! TRANSFERRED.
!
! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE
! AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT
! CORPORATION.
!
! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS
! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
!

!++
! Facility:  CMS Library Processor
!
! Abstract:
!
!	This file contains declarations needed in the interface between
!	the COMAND routine and its caller.  The COMAND routine, declared
!	in module COMAND, obtains the user's command, analyzes it,
!	and presents it to the caller in parsed form.
!
!	The facilities declared here are mostly literals for language
!	constructs, and data blocks returned by COMAND.
!
! Environment:  Transportable
!
! Author:  Earl Van Horn	Creation Date:  April, 1979
!
!--
! This file assumes that the declarations
!
!	LIBRARY 'XPORT:' ;
!	REQUIRE 'BLISSX:' ;
!
! or equivalent have already appeared in the program.



! Each command, sub-command, qualifier, and syntactic construct
! is denoted by a distinct non-zero, positive integer.
!
! The command integers are a dense set between K_COMMAND_1 and
! K_COMMAND_N, inclusive.
!
! The sub_command_integers are a dense set between K_SUB_COMMAND_1 and
! K_SUB_COMMAND_N, inclusive.
!
! The qualifier integers are a dense set between K_QUALILFIER_1 and
! K_QUALIFIER_N, inclusive.
!
! The integers for syntactic constructs are a dense set between
! K_SYNTACTIC_1 and K_SYNTACTIC_N, inclusive.
!
! These sets of integers do not overlap.



! The following literals are used in the declarations of the above integers.
literal
    k_com_base = 1000,
    k_sub_base = 2000,
    k_qual_base = 0,		! The qualifier integers might be used as
				! vector subscripts some day.
    k_syn_base = 3000 ;



! These are literals for commands.
!
$literal				! Initialize $DISTINCT to 1.
    k_command_1 = k_com_base + 1,
    k_annotate_com = k_com_base + $distinct,
    k_archive_com = k_com_base + $distinct,	! Forbid abbreviation "A".
    k_copy_com = k_com_base + $distinct,
    k_create_com = k_com_base + $distinct,
    k_delete_com = k_com_base + $distinct,
    k_differences_com = k_com_base + $distinct,
    k_fetch_com = k_com_base + $distinct,
    k_help_com = k_com_base + $distinct,
    k_initialize_com = k_com_base + $distinct,
    k_insert_com = k_com_base + $distinct,
    k_remove_com = k_com_base + $distinct,
    k_replace_com = k_com_base + $distinct,
    k_reserve_com = k_com_base + $distinct,
    k_set_com = k_com_base + $distinct,
    k_show_com = k_com_base + $distinct,
    k_unreserve_com = k_com_base + $distinct,
    k_verify_com = k_com_base + $distinct,
! You should insert new commands just before this comment.
    k_command_n = k_com_base + $distinct - 1 ;



! These are literals for sub-commands.
!
$literal				! Reset $DISTINCT to 1.
    k_sub_command_1 = k_sub_base + 1,
    k_ancestors_sub = k_sub_base + $distinct,
    k_attribute_sub = k_sub_base + $distinct,
    k_class_sub = k_sub_base + $distinct,
    k_descendants_sub = k_sub_base + $distinct,
    k_element_sub = k_sub_base + $distinct,
    k_generation_sub = k_sub_base + $distinct,
    k_group_sub = k_sub_base + $distinct, ! Forbid "SHOW G" abbreviation.
    k_history_sub = k_sub_base + $distinct,
    k_library_sub = k_sub_base + $distinct,
    k_reservations_sub = k_sub_base + $distinct,
    k_version_sub = k_sub_base + $distinct,
! You should insert new sub-commands just before this comment.
    k_sub_command_n = k_sub_base + $distinct - 1 ;



! These are literals for qualifiers.
!
$literal				! Reset $DISTINCT to 1.
    k_qualifier_1 = k_qual_base + 1,
    k_all_qual = k_qual_base + $distinct,
    k_append_qual = k_qual_base + $distinct,
    k_brief_qual = k_qual_base + $distinct,
    k_class_qual = k_qual_base + $distinct,
    k_delete_qual = k_qual_base + $distinct,
    k_format_qual = k_qual_base + $distinct,
    k_from_qual = k_qual_base + $distinct,
    k_gen_qual = k_qual_base + $distinct,	! "k_generation_qual" too long.
    k_history_qual = k_qual_base + $distinct,
    k_if_absent_qual = k_qual_base + $distinct,
    k_if_present_qual = k_qual_base + $distinct,
    k_keep_qual = k_qual_base + $distinct,
    k_merge_qual = k_qual_base + $distinct,
    k_nohistory_qual = k_qual_base + $distinct,
    k_nonotes_qual = k_qual_base + $distinct,
    k_notes_qual = k_qual_base + $distinct,
    k_output_qual = k_qual_base + $distinct,
    k_parallel_qual = k_qual_base + $distinct,
    k_position_qual = k_qual_base + $distinct,
    k_recover_qual = k_qual_base + $distinct,
    k_reserve_qual = k_qual_base + $distinct,
    k_since_qual = k_qual_base + $distinct,
    k_supersede_qual = k_qual_base + $distinct,
    k_unusual_qual = k_qual_base + $distinct,
    k_variant_qual = k_qual_base + $distinct,
    k_width_qual = k_qual_base + $distinct,
    k_log_qual = k_qual_base + $distinct,
    k_nolog_qual = k_qual_base + $distinct,
    k_repair_qual = k_qual_base + $distinct,
    k_read_qual = k_qual_base + $distinct,
    k_noread_qual = k_qual_base + $distinct,
    k_noappend_qual = k_qual_base + $distinct,
    k_nooutput_qual  = k_qual_base + $distinct, 
    k_nokeep_qual  = k_qual_base + $distinct, 
    k_noreserve_qual  = k_qual_base + $distinct, 
    k_noparallel_qual  = k_qual_base + $distinct, 
    k_nomerge_qual  = k_qual_base + $distinct, 
    k_nosupersede_qual  = k_qual_base + $distinct, 
    k_novariant_qual  = k_qual_base + $distinct, 
    k_noclass_qual  = k_qual_base + $distinct, 
    k_noformat_qual  = k_qual_base + $distinct, 
    k_nobrief_qual  = k_qual_base + $distinct, 
    k_nounusual_qual  = k_qual_base + $distinct, 
    k_nodelete_qual  = k_qual_base + $distinct, 
    k_norecover_qual  = k_qual_base + $distinct, 
    k_norepair_qual  = k_qual_base + $distinct, 
! You should insert new qualifiers just before this comment.
    k_qualifier_n = k_qual_base + $distinct - 1 ;



! These are literals for syntactic constructs.
!
$literal				! Reset $DISTINCT to 1.
    k_syntactic_1 = k_syn_base + 1,
    k_char_pos_syn = k_syn_base + $distinct,	! character-position
    k_cls_name_syn = k_syn_base + $distinct,	! class-name
    k_date_syn = k_syn_base + $distinct,
    k_dir_spec_syn = k_syn_base + $distinct,	! directory-specification
    k_elem_ref_syn = k_syn_base + $distinct,	! element-reference
    k_ext_fname_syn = k_syn_base + $distinct,	! extended-file-name
    k_file_spec_syn = k_syn_base + $distinct,
    k_format_syn = k_syn_base + $distinct,	! format-string
    k_gen_exp_syn = k_syn_base + $distinct,	! generation-expression
    k_gen_num_syn = k_syn_base + $distinct,	! generation-number
    k_gen_pri_syn = k_syn_base + $distinct,	! generation-primary
    k_help_topic_syn = k_syn_base + $distinct,
    k_ins_pat_syn = k_syn_base + $distinct,	! insertion-pattern
    k_remark_syn = k_syn_base + $distinct,
    k_var_let_syn = k_syn_base + $distinct,	! variant-letter
    k_wild_elem_ref_syn = k_syn_base + $distinct,! wild-element-ref
! You should insert new syntactic constructs just before this comment.
    k_syntactic_n = k_syn_base + $distinct - 1 ;



! The SPELLING Macro
!
! This macro generates a quoted string for the spelling of a given
! command, sub-command, qualifier, or syntactic construct.
!
macro
    spelling(a) =
	%if a geq k_command_1 and a leq k_command_n
	%then command_spelling(a)
	%else
	    %if a geq k_sub_command_1 and a leq k_sub_command_n
	    %then sub_command_spelling(a)
	    %else
		%if a geq k_qualifier_1 and a leq k_qualifier_n
		%then qualifier_spelling(a)
		%else
		    %if a geq k_syntactic_1 and a leq k_syntactic_n
		    %then syntactic_spelling(a)
		    %else %error('SPELLING does not recognize: ', a)
		    %fi
		%fi
	    %fi
	%fi
	%,

    command_spelling(a) =
	%if a eql k_annotate_com %then 'ANNOTATE' %exitmacro %fi
	%if a eql k_archive_com %then 'ARCHIVE' %exitmacro %fi
	%if a eql k_copy_com %then 'COPY' %exitmacro %fi
	%if a eql k_create_com %then 'CREATE' %exitmacro %fi
	%if a eql k_delete_com %then 'DELETE' %exitmacro %fi
	%if a eql k_differences_com %then 'DIFFERENCES' %exitmacro %fi
	%if a eql k_fetch_com %then 'FETCH' %exitmacro %fi
	%if a eql k_help_com %then 'HELP' %exitmacro %fi
	%if a eql k_initialize_com %then 'INITIALIZE' %exitmacro %fi
	%if a eql k_insert_com %then 'INSERT' %exitmacro %fi
	%if a eql k_remove_com %then 'REMOVE' %exitmacro %fi
	%if a eql k_replace_com %then 'REPLACE' %exitmacro %fi
	%if a eql k_reserve_com %then 'RESERVE' %exitmacro %fi
	%if a eql k_set_com %then 'SET' %exitmacro %fi
	%if a eql k_show_com %then 'SHOW' %exitmacro %fi
	%if a eql k_unreserve_com %then 'UNRESERVE' %exitmacro %fi
	%if a eql k_verify_com %then 'VERIFY' %exitmacro %fi
	''
	%,

    sub_command_spelling(a) =
	%if a eql k_ancestors_sub %then 'ANCESTORS' %exitmacro %fi
	%if a eql k_attribute_sub %then 'ATTRIBUTE' %exitmacro %fi
	%if a eql k_class_sub %then 'CLASS' %exitmacro %fi
	%if a eql k_descendants_sub %then 'DESCENDANTS' %exitmacro %fi
	%if a eql k_element_sub %then 'ELEMENT' %exitmacro %fi
	%if a eql k_generation_sub %then 'GENERATION' %exitmacro %fi
	%if a eql k_group_sub %then 'GROUP' %exitmacro %fi
	%if a eql k_history_sub %then 'HISTORY' %exitmacro %fi
    	%if a eql k_library_sub %then 'LIBRARY' %exitmacro %fi
	%if a eql k_reservations_sub %then 'RESERVATIONS' %exitmacro %fi
	%if a eql k_version_sub %then 'VERSION' %exitmacro %fi
	''
	%,

    qualifier_spelling(a) =
	%if a eql k_all_qual %then '/ALL' %exitmacro %fi
	%if a eql k_append_qual %then '/APPEND' %exitmacro %fi
	%if a eql k_brief_qual %then '/BRIEF' %exitmacro %fi
	%if a eql k_class_qual %then '/CLASS' %exitmacro %fi
	%if a eql k_delete_qual %then '/DELETE' %exitmacro %fi
	%if a eql k_format_qual %then '/FORMAT' %exitmacro %fi
	%if a eql k_from_qual %then '/FROM' %exitmacro %fi
	%if a eql k_gen_qual %then '/GENERATION' %exitmacro %fi
	%if a eql k_history_qual %then '/HISTORY' %exitmacro %fi
    %if VaxVms %then
	%if a eql k_if_absent_qual %then '/IF_ABSENT' %exitmacro %fi
    %fi
    %if Tops20 %then
	%if a eql k_if_absent_qual %then '/IF-ABSENT' %exitmacro %fi
    %fi
    %if VaxVms %then
	%if a eql k_if_present_qual %then '/IF_PRESENT' %exitmacro %fi
    %fi
    %if Tops20 %then
	%if a eql k_if_present_qual %then '/IF-PRESENT' %exitmacro %fi
    %fi
	%if a eql k_keep_qual %then '/KEEP' %exitmacro %fi
	%if a eql k_log_qual %then '/LOG' %exitmacro %fi
	%if a eql k_merge_qual %then '/MERGE' %exitmacro %fi
	%if a eql k_noappend_qual %then '/NOAPPEND' %exitmacro %fi
	%if a eql k_nobrief_qual %then '/NOBRIEF' %exitmacro %fi
	%if a eql k_noclass_qual %then '/NOCLASS' %exitmacro %fi
	%if a eql k_nodelete_qual %then '/NODELETE' %exitmacro %fi
	%if a eql k_noformat_qual %then '/NOFORMAT' %exitmacro %fi
	%if a eql k_nohistory_qual %then '/NOHISTORY' %exitmacro %fi
	%if a eql k_nokeep_qual %then '/NOKEEP' %exitmacro %fi
	%if a eql k_nolog_qual %then '/NOLOG' %exitmacro %fi
	%if a eql k_nomerge_qual %then '/NOMERGE' %exitmacro %fi
	%if a eql k_nonotes_qual %then '/NONOTES' %exitmacro %fi
	%if a eql k_nooutput_qual %then '/NOOUTPUT' %exitmacro %fi
	%if a eql k_noparallel_qual %then '/NOPARALLEL' %exitmacro %fi
    %if VaxVms %then
	%if a eql k_noread_qual %then '/NOREAD_ONLY' %exitmacro %fi
    %fi
    %if Tops20 %then
	%if a eql k_noread_qual %then '/NOREAD-ONLY' %exitmacro %fi
    %fi
	%if a eql k_norecover_qual %then '/NORECOVER' %exitmacro %fi
	%if a eql k_noreserve_qual %then '/NORESERVE' %exitmacro %fi
	%if a eql k_norepair_qual %then '/NOREPAIR' %exitmacro %fi
	%if a eql k_notes_qual %then '/NOTES' %exitmacro %fi
	%if a eql k_nosupersede_qual %then '/NOSUPERSEDE' %exitmacro %fi
	%if a eql k_nounusual_qual %then '/NOUNUSUAL' %exitmacro %fi
	%if a eql k_novariant_qual %then '/NOVARIANT' %exitmacro %fi
	%if a eql k_output_qual %then '/OUTPUT' %exitmacro %fi
	%if a eql k_parallel_qual %then '/PARALLEL' %exitmacro %fi
	%if a eql k_position_qual %then '/POSITION' %exitmacro %fi
    %if VaxVms %then
	%if a eql k_read_qual %then '/READ_ONLY' %exitmacro %fi
    %fi
    %if Tops20 %then
	%if a eql k_read_qual %then '/READ-ONLY' %exitmacro %fi
    %fi
	%if a eql k_recover_qual %then '/RECOVER' %exitmacro %fi
	%if a eql k_repair_qual %then '/REPAIR' %exitmacro %fi
	%if a eql k_reserve_qual %then '/RESERVE' %exitmacro %fi
	%if a eql k_since_qual %then '/SINCE' %exitmacro %fi
	%if a eql k_supersede_qual %then '/SUPERSEDE' %exitmacro %fi
	%if a eql k_unusual_qual %then '/UNUSUAL' %exitmacro %fi
	%if a eql k_variant_qual %then '/VARIANT' %exitmacro %fi
	%if a eql k_width_qual %then '/WIDTH' %exitmacro %fi
	''
	%,

    syntactic_spelling(a) =
	%if a eql k_char_pos_syn %then 'character position' %exitmacro %fi
	%if a eql k_cls_name_syn %then 'class name' %exitmacro %fi
	%if a eql k_date_syn %then 'date' %exitmacro %fi
	%if a eql k_dir_spec_syn %then 'directory specification' %exitmacro %fi
	%if a eql k_elem_ref_syn %then 'element name' %exitmacro %fi
	%if a eql k_ext_fname_syn %then 'extended file name' %exitmacro %fi
	%if a eql k_file_spec_syn %then 'file specification' %exitmacro %fi
	%if a eql k_format_syn %then 'format string' %exitmacro %fi
	%if a eql k_gen_exp_syn %then 'generation expression' %exitmacro %fi
	%if a eql k_gen_num_syn %then 'generation number' %exitmacro %fi
	%if a eql k_gen_pri_syn %then 'generation primary' %exitmacro %fi
	%if a eql k_help_topic_syn %then 'help topic' %exitmacro %fi
	%if a eql k_ins_pat_syn %then 'insertion pattern' %exitmacro %fi
	%if a eql k_remark_syn %then 'remark' %exitmacro %fi
	%if a eql k_var_let_syn %then 'variant letter' %exitmacro %fi
	%if a eql k_wild_elem_ref_syn %then 'element name or *.*' %exitmacro %fi
	''
	% ;
! The PARAMETER_BLOCK Macro
!
! This macro generates the BLISS attributes for a block that describes
! one parameter of a CMS command.  The block contains a field for the
! address of the next parameter block.
!
! The macro may appear as an attribute in an OWN, GLOBAL, LOCAL, MAP,
! or BIND declaration.
!
macro
    parameter_block =
	block[k_par_fullwords] field(par_fields)
	% ;



! These are declarations used in the PARAMETER_BLOCK macro.
!
$field
    par_fields =
	set
	par_a_next = [$address],	! Address of next parameter block.
					! K_NULL means this is the last block.
	par_a_qual = [$address],	! Address of first qualifier block
					! for this parameter.  K_NULL means
					! this parameter has no qualifiers.
	sub_descriptor(name=par_text),	! Descriptor of the text of the
					! parameter.  This is essentially
					! what the user typed, but for some
					! parameters the language processor has
					! removed spaces and tabs and/or
					! converted letters to upper case.
	par_a_tree = [$address]		! Address of a node block that is the
					! apex of a parse tree for the text.
					! K_NULL means there is no tree.
	tes ;

literal
    k_par_fullwords = $field_set_size,	! Fullwords in a parameter block.
    k_par_units = $field_set_units ;	! Addressable units in a param. block.



! The QUALIFIER_BLOCK Macro
!
! This macro generates the BLISS attributes for a block that describes
! one qualifier of a CMS command or parameter.  The block contains a field
! for the address of the next qualifier block.
!
! The macro may appear as an attribute in an OWN, GLOBAL, LOCAL, MAP,
! or BIND declaration.
!
macro
    qualifier_block =
	block[k_qua_fullwords] field(qua_fields)
	% ;



! These are declarations used in the QUALIFIER_BLOCK macro.
!
$field
    qua_fields =
	set
	qua_a_next = [$address],	! Address of the next qualifier block.
					! K_NULL means this is the last block.
	qua_code = [$short_integer],	! The integer code denoting this
					! qualifier.  Literals for this code
					! are defined elsewhere in this file.
	sub_descriptor(name=qua_value),	! Descriptor of the value text, if any,
					! supplied with the qualifier.
					! This is essentially what the user
					! typed, but for some qualifiers the
					! language processor has removed spaces
					! and tabs and/or converted letters
					! to upper case.  If the user did not
					! supply a value with the qualifier,
					! the descriptor has zero length and
					! a K_NULL pointer.
	qua_a_tree = [$address]		! Address of a node block that is the
					! apex of a parse tree for the value
					! text.	 K_NULL means there is no tree.
	tes ;

literal
    k_qua_fullwords = $field_set_size,	! Fullwords in a qualifier block.
    k_qua_units = $field_set_units ;	! Addressable units in a qual. block.



! The NODE_BLOCK Macro
!
! This macro generates the BLISS attributes for a block that describes
! one node of a parse tree.
!
! The macro may appear as an attribute in an OWN, GLOBAL, LOCAL, MAP,
! or BIND declaration.
!
macro
    node_block =
	block[k_nod_fullwords] field(nod_fields)
	% ;



! These are declarations used in the NODE_BLOCK macro.
!
$field
    nod_fields =
	set
	nod_syntax = [$short_integer],	! Integer code for the syntactic
					! construct represented by this node.
					! These codes are defined elsewhere
					! in this file.
	nod_branches = [$tiny_integer],	! The number of components in this
					! syntactic construct, i.e., the number
					! of meaningful descriptors in this
					! block.  Currently every node block
					! has space for four such descriptors.
	nod_desc_vector = [$sub_block(0)],! Start of vector of descriptors.
	sub_descriptor(name = nod_desc_1),
	sub_descriptor(name = nod_desc_2),
	sub_descriptor(name = nod_desc_3),
	sub_descriptor(name = nod_desc_4) ! The first N of these descriptors
					! are meaningful, where N is the the
					! content of the NOD_BRANCHES field.
					! The rest have undefined content,
					! because some day they may not be
					! allocated.
					!
					! If descriptor I is meaningful,
					! its type field, NOD_DESC_I_TYP, can
					! have one of two values.  If it is
					! K_NOD_DESC_TEXT, the descriptor
					! denotes a portion of the string
					! described in in the parameter or
					! qualifier block that owns this tree.
					! This portion never has leading or
					! or trailing blanks.
					!
					! If the type field of descriptor I is
					! K_NOD_DESC_NODE, then the descriptor's
					! address field, NOD_DESC_I_ADR,
					! contains the address of another node
					! block, and the rest of the descriptor
					! contains information internal to the
					! language processor.
	tes ;

literal
    k_nod_fullwords = $field_set_size,	! Fullwords in a node block.
    k_nod_units = $field_set_units,	! Addressable units in a node block.
    k_nod_desc_text = str$k_dtype_t,	! Descriptor type for text, as explained
					! above.
    k_nod_desc_node = xpo$k_dtype_bu ;	! Descriptor type for a node, as
					! explained above.



! A generation expression has one of four forms:
!
!	generation-num
!
!	class-name
!
!	generation-num  "+"
!	
!	class-name      "+"
!
! The forms without "+" are represented by a string descriptor.  The forms
! with "+" are represented by a node block with 2 string descriptors.
!
! The caller of COMAND must distinguish between generation numbers and class
! names by testing whether or not the first character is a digit.
!
! When a generation expression appears as a qualifier value, the qualifier
! block has a node block (whose address is in QUA_A_TREE) just when the
! expression has "+".



! COMUSR.REQ  --  LAST LINE