Trailing-Edge
-
PDP-10 Archives
-
decuslib10-04
-
43,50325/ncse.rtn
There are no other files named ncse.rtn in the archive.
! File: NCSE.RTN
!
! 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.
! DECLARATIONS AND SUPPORT ROUTINES FOR DETECTING AND
! USING NAMES AS COMMON SUBEXPRESSIONS.
STRUCTURE NCARY[I,J]= [I*J] (.NCARY+.I*J+.J)<0,36>;
BIND
CTCNT=0,
CTST=1,
NCGT=0,
NCST=1;
BIND
CTSIZ=64, !NUMBER OF ENTRIES IN CTTBL TABLE (MUST BE POWER OF 2)
NCSIZ=32; !NUMBER OF ENTRIES IN NCSE TABLE (MUST BE POWER OF 2)
EXTERNAL
ITEM FLSTK,
NCARY NCSE[NCSIZ,2];
MACRO NCNDX(X)=
((X) AND (NCSIZ-1))$;
MACRO NCHASH(X)=
(NCNDX((X)^(-3)))$;
ROUTINE NCSEARCH(X)=
BEGIN
MAP LEXEME X;
REGISTER N,E;
E_N_NCHASH(.X);
DO
IF .NCSE[.N,NCST] EQL .X[LEXPART] THEN RETURN .N ELSE
IF .NCSE[.N,NCST] EQL 0 THEN RETURN (1^35) OR .N
WHILE NCNDX(N_.N+1) NEQ .E;
-1
END;