.;	COMP.CMD - GENERALIZED DCL COMPILE COMMAND
.;	******************************************
.;	Ing. Brunecky    Ver.001	March 1981
.;
	.ENABLE SUBSTITUTION
	.SETS COM "FOR"
	.SETT LIS
	.SETT OBJ
	.SETS LISF ""
	.SETS OBJF ""
.;
.;	Qualifier parser
	.SETS Q0 "/"
	.IF Q0 NE P1[1:1] .GOTO A10
	.PARSE P1 "/" Q0 QUA
	.SETS P1 P2
	.SETS P2 P3
.Q10:	.PARSE QUA "/" Q0 QUA
	.PARSE Q0 ":" Q0 Q1
	.SETS Q0 Q0[1:3]
	.IF Q0 = "FOR" .SETS COM "FOR"
	.IF Q0 = "COB" .SETS COM "CBL"
	.IF Q0 = "MAC" .SETS COM "MAC"
	.IF Q0 = "PAS" .SETS PAS "PAS"
	.IF Q0 = "LIS" .SETS LISF Q1
	.IF Q0 = "OBJ" .SETS OBJF Q1
	.IF Q0 = "NOL" .SETF LIS
	.IF Q0 = "NOO" .SETF OBJ
	.IF Q0 = "FOR" .OR .IF Q0 = "COB" .OR .IF Q0 = "MAC" .GOTO Q20
	.IF Q0 = "LIS" .OR .IF Q0 = "OBJ" .OR .IF Q0 = "NOL" .GOTO Q20
	.IF Q0 = "NOO" .OR .IF Q0 = "PAS" .GOTO Q20
	;COMPILE -- invalid qualifier 'Q0'
	.EXIT
.Q20:	.IF QUA NE "" .GOTO Q10
.;
.A10:	.IF P1 EQ "" .SETT QUERY
	.IF P1 EQ "" .ASKS P1 source-file(s/sw)
	.IF P1 = "?" .OR .IF P1 = "HELP" HELP COMPILE
	.IF P1 = "?" .OR .IF P1 = "HELP" .EXIT
	.IFDF QUERY .ASKS P2 library-file  
	.PARSE P1 "/" SP1 SP4
	.PARSE SP1 "[]" Q0 Q1 Q2
	.SETS SP2 Q0+"$"+Q2
	.PARSE SP2 "," SP5 SP3
	.PARSE SP5 "$" SP5 Q2
	.IF Q2 NE "" .SETS SP5 SP5+"["+Q1+"]"+Q2
	.PARSE SP5 ":" Q0 Q1
	.IF Q1 = "" .SETS Q1 Q0
	.PARSE Q1 "]" Q0 SP5
	.IF SP5 = "" .SETS SP5 Q1
	.PARSE SP5 ";" SP2 SP3
	.PARSE SP2 "." SP5 SP3
	.IF SP4 NE "" .SETS SP4 "/"+SP4
	.IF LISF = "" .SETS LISF SP5+".LST"
	.IF OBJF = "" .SETS OBJF SP5+".OBJ"
.;
	.ENABLE QUIET
	.IFT LIS .IFT OBJ 'COM' 'OBJF','LISF'='SP1''SP4'
	.IFT LIS .IFF OBJ 'COM' ,'LISF'='SP1''SP4'
	.IFF LIS .IFT OBJ 'COM' 'OBJF'='SP1''SP4'
	.IFF LIS .IFF OBJ 'COM' ='SP1''SP4'
	.IF <EXSTAT> NE 1 .EXIT
	.IF P2 = "" .OR .IFF OBJ .EXIT
	LBR 'P2'/RP='SP5'
	.IF <EXSTAT> NE 1 .EXIT
	.XQT PIP 'SP5'.OBJ;*/DE/NM
	.EXIT
.;
.;	This command file should be invoked by SCP driven catch-all monitor,
.;	which separates qualifier strig from command by space, so that
.;	qualifiers (if any) appear as the first parameter.
.;
.;	Command: >COMpile/qualif source-list/sw librnam
.;	proceed:
.;	>com objnam.OBJ,listnam.LST=sources-list/sw
.;	>LBR library/RP=objnam	 (if there was no error in compillation)
.;	>PIP objnam.OBJ;*/DE/NM (if the library was specified)
.;
.;	appearance and name of objfile and listfile may be controlled by
.;	presence of qualifiers, LBR usage by presence of library spec.
.;	Default compiller name is FOR, may be qualifier-changed.
.;
