Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-04 - 43,50325/of1.bli
There are no other files named of1.bli in the archive.
! File:   OF1.BLI
!
!    This work was supported by the Advanced Research
!    Projects Agency of the Office of the Secretary of
!    Defense (F44620-73-C-0074) and is monitored by the
!    Air Force Office of Scientific Research.

MODULE OF1(TIMER=EXTERNAL(SIX12))=
BEGIN
REQUIRE COMMON.BEG;
REQUIRE PREDEF.BEG;
REQUIRE GTX.BEG;
REQUIRE ST.BEG;
REQUIRE LDSF.BEG;
REQUIRE LDSFT.BEG;
REQUIRE STRUCT.BEG;
BEGIN
    EXTERNAL IST,ISTG;
    MACRO IDT(VALUE,ADDINF)=(DT[VALUE]_ADDINF;DTPF[VALUE]_0)$;
    GLOBAL ROUTINE ONCEF=
    BEGIN
    ! H. NOW INITIALIZE RESERVED WORD DELIMITER SYMBOL
    !    TABLE ENTRIES (CONTINUED).
    !    SEE RUND AND SKAN IN "LEXSYN.BLI".
    !
    !    TABLE FORMAT:
    !
    !    THOSE DELIMITER CHARACTERS (NON-ALPHANUMERIC) FOR WHICH
    !    NO SPECIAL EDITING FUNCTION EXISTS--E.G. BLANK,!,%, ETC.--
    !    ARE USED AS INDICES INTO THE DELIMITER TABLE, DT.  THE POS-
    !    ITIONS WHICH SUCH CHARACTERS INDEX MUST CONTAIN A DELIMITER
    !    LEXEME (VALUE OF DEL), EVEN IF IT MAY NOT BE USED IN THE
    !    LANGUAGE--E.G. &.
    !
    !    THE REMAINING POSITIONS ARE AVAILABLE FOR USE BY RESERVED WORDS,
    !    WHOSE ST ADDITIONAL INFORMATION WORD IS AN INDEX TO
    !    ITS CORRESPONDING LEXEME (SEE IST IN "ONCE.BLI").
    !
    !    LEAVE NOTES WHEN A RESERVED WORD IS DELETED AND MAKE
    !    ADDITIONS FROM THE POINT SO MARKED (SEQUENTIALLY).  THE TABLE
    !    MAY SAFELY BE EXPANDED BEYOND #200 (# 7-BIT ASCII CHARS) WORDS
    !    BY CHANGING DTSIZE IN BEGIN.BLI.

	! DELIMITERS WITH CODES 0-#77 ARE NOW IN ROUTINE ONCEF2 IN OF2

BIND ISTPLIT=PLIT(
	'UNDEC','LARE',	HUNDECLARE,	#101,
	'RETUR','N',	HRETURN,	#102,
	'LEAVE', 0,	HLEAVE,		#103,
	'WITH',  0,	HWITH,		#104,
	'LABEL', 0,	HLABEL,		#105,
	'BYTE',  0,	HBYTE,		#106,
	'WORD',  0,	HWORD,		#107,
	'SWITC','HES',	HSWITCHES,	#110,
	'MODUL','E',	HMODULE,	#111,
!	'FMPR',  0,	HFMPR,		#112,	! #40 + "*"
!	'FADR',  0,	HFADR,		#113,	! #40 + "+"
!	'FSBR',  0,	HFSBR,		#115,	! #40 + "-"
!	'FNEG',  0,	HFNEG,		#116,
!	'FDVR',  0,	HFDVR,		#117,	! $40 + "/"
!	'FLOAT', 0,	HFLOAT,		#120,
!	'FIX',   0,	HFIX,		#121,
	'ELUDO','M',	HELUDOM,	#122,
	'EXITL','OOP',	HEXITLOOP,	#123,
	'PSECT', 0,	HPSECT,		#124,
	'GTR',   0,	HGTR,		#125,
	'PLIT',  0,	HPLIT,		#126,
	'INLIN','E',	HINLINE,	#127,
	'EQLU',  0,	HEQLU,		#130,
	'LEQU',  0,	HLEQU,		#131,
	'LSSU',  0,	HLSSU,		#132,
	'GEQU',  0,	HGEQU,		#141,
	'GTRU',  0,	HGTRU,		#142,
	'NEQU',  0,	HNEQU,		#143,
	'SIGNA','L',	HSIGNAL,	#144,
	'ENABL','E',	HENABLE,	#145,
	'ELBAN','E',	HELBANE,	#146,
	'MAX',	 0,	HMAX,		#147,
	'MIN',	 0,	HMIN,		#150,
	'ROT',   0,	HROT,		#151,
	'UPLIT', 0,     HUPLIT,		#152,
	'REQUI','RE',	HREQUIRE,	#153,
	'CSECT', 0,	HCSECT,		#154,
	'STACK','LOCAL',HSLOCAL,	#155,
	'LINKA','GE',	HLNKG,		#156,
	'INLIN','ECOM',	HINLINECOM,	#157		);

BIND IDTPLIT=PLIT(
	#133,	HSQBOPEN,
	#134,	HBACKSLASH,
	#135,	HSQBCLOSE,
	"^",	HSHIFT,	! #136
	"_",	HSTORE,	! #137
	#140,	ERRLEX,

	#173,	ERRLEX,
	#174,	ERRLEX,
	#175,	ERRLEX,
	#176,	ERRLEX,
	#177,	ERRLEX		);

INCR I FROM 0 TO .ISTPLIT[-1]-4 BY 4 DO
    IST(.ISTPLIT[.I],
	.ISTPLIT[.I+1],
	.ISTPLIT[.I+2],
	.ISTPLIT[.I+3]);
INCR I FROM 0 TO .IDTPLIT[-1]-2 BY 2 DO
    IDT(.IDTPLIT[.I],
	.IDTPLIT[.I+1]);

! I. INITIALIZE THE VECTOR STRUCTURE AND THE "BYTES" STRUCTURE FORMAL

BEGIN
  LOCAL STVEC STEENT, NTVEC NTENT, STVEC STREAM;
  BIND LP="(", PLUS="+", RP=")",
	COMMA=",", LPOINT="<", RPOINT=">", TIMES="*";
  MACRO EIGHT=LITLEXEME(8)$,
	STRUPAR(OFFST)=(CLSTRUF^18+OFFST)$,
	MACPAR(OFFST)=(CLMACRF^18+OFFST)$;
  BIND DVP=PLIT( 9,
    FORMWINDOW(HEMPTY,LP),
    FORMWINDOW(STRUPAR(1),PLUS),
    FORMWINDOW(STRUPAR(2),TIMES),
    FORMWINDOW(STRUPAR(4),RP),
    FORMWINDOW(HEMPTY,LPOINT),
    FORMWINDOW(ZERO,COMMA),
    FORMWINDOW(STRUPAR(2),TIMES),
    FORMWINDOW(EIGHT,RPOINT),
    FORMWINDOW(HEMPTY,RPOINT));

  STREAM_GETSPACE(ST,.DVP[-1]);
  MOVECORE(DVP,.STREAM,.DVP[-1]);
 STRUDVNME_ISTG('VECTO','R',STRUCTURET,0);
  STRUDEFV_STEENT_.STE;
  STEENT[NUMPARM]_1;
  STEENT[SIZESTRM]_0;
  STEENT[BODYSTRM]_.STREAM;

! J. INITIALIZE THE ITERATED MACRO $REMAINING

  ISTG('$REMA','INING',MACROT,0);
  STE[NUMITED]_1; %STE[NUMFIXED]_0;%
  STE[SUBTYPEM]_MACRIIND;
  STREAM_GETSPACE(ST,2);		! WOULD LIKE TO USE STRMAPPEND,
  STREAM[STKLEN]_1;			! STRMQUIT HERE, BUT THEY'RE NOT
  STREAM[1,0,36]_FORMWINDOW(MACPAR(1),0);	! IN SEGMENT 1.
  STE[STREAMF]_.STREAM;
  DLREMAIN_.STE;

BEGIN
BIND ISTGPLIT=PLIT(
	'BYTES', 0,	STRUFT,     2,
	'ASCII', 0,	SFCONVT,    0,
	'ASCIZ', 0,	SFCONVT,    1,
	'RAD50', 0,	SFCONVT,    2,
	'RADIX','50',	SFCONVT,    2,
	'$UNQU','OTE',	SFEXPNDT,   3,
	'$NAME', 0,	SFCONVT,    4,
	'$STRI','NG',	SFCONVT,    5,
	'$COUN','T',	SFCONVT,    6,
	'$LENG','TH',	SFCONVT,    7,
!	'$REMA','INING',SFEXPNDT,   1,
	'$QUOT','E',	SFEXPNDT,   0		);

INCR I FROM 0 TO .ISTGPLIT[-1]-4 BY 4 DO
   ISTG(.ISTGPLIT[.I],
	.ISTGPLIT[.I+1],
	.ISTGPLIT[.I+2],
	.ISTGPLIT[.I+3]);
END;
  
END;


END;
END
END