Google
 

Trailing-Edge - PDP-10 Archives - BB-4157E-BM - fortran-compiler/lexnam.bli
There are 12 other files named lexnam.bli in the archive. Click here to see a list.
!THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
!  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.

!COPYRIGHT (C) 1974,1981 BY DIGITAL EQUIPMENT CORPORATION
!AUTHOR: D. B. TOLMAN

GLOBAL BIND LEXNAV = 6^24 + 0^18 + 0;	! Version Date: 26-Feb-74

%(

***** Begin Revision History *****

***** End Revision History *****

)%

! THIS FILE CONTAINS THE BINDS OF LEXEME NAMES AND NUMBERS, AND
! THE PRECDENCE OF THE STACKABLE OPERATORS.  ROUTINE EXPRESS
! CONTAINS A PLIT PRECDENCE, WHICH IS SET TO PRCDNCE0, PRCDNCE1,
! ETC.  THIS PROVIDES INDEPENDENCE FOR EXPRESS WITH RESPECT
! TO THE LEXEME NUMBERS AND THEIR ORDERING.  THE ONLY REQUIREMENT
! IS THAT THE PLIT IN EXPRESS CONTAIN THE SAME NUMBER OF ENTRIES AS
! THERE ARE LEXEMES.
!
! FILE LEXAID.BLI CONTAINS THE BINDS FOR THE CHARACTER CASSIFICATION
! CODES AND THEIR NAMES, USED BY ROUTINE LEXICAL.  NOTE THAT THE
! CODE NAMES AND LEXEME NAMES HAVE BEEN OVERLAYED AS MUCH AS
! POSSIBLE SO AS TO MAINTAIN A MINIMUM OF CONFUSION.
!
!------------------------------------------------------------------------------------------------------------------
!LEXEME NUMBERS REPRESENTING SINGLE OPERATORS ARE PREFIXED WITH A 1 IN
!THE 12 BIT FIELD: 1^6+LEXEME NUMBER.
!
!LEXEMES WHICH ARE OPERATORS BUT NOT USED AS AN OPERATOR HAVE NO PREFIX.
!THIS ENABLES THE DIFERENTIATION OF STACKABLE OPERATORS FROM CHARACTERS
!REQUIRED ONLY BY THE SYNTAX.
!
!	TIMES _ ASTERISK
!	DIVIDE _ SLASH
!	MINUS _ DASH
!------------------------------------------------------------------------------------------------------------------
!
! LEXEME CODE BINDS AND PRECEDENCE OF OPERATORS
!
BIND
		PRCDNCE0	=	0,
	IDENTIFIER	= 1, % POINTER TO IDENTIFIER TABLE ENTRY %
		PRCDNCE1	=	0,
	CONSTLEX	= 2, % POINTER TO NUMERIC TABLE ENTRY %
		PRCDNCE2	=	0,
	LITSTRING	= 3, % POINTER TO LITERAL TABLE ENTRY %
		PRCDNCE3	=	0,
	LABELEX		= 4, % LABEL, REQUIRES LOOK4LAB TO BE SET TO 1
				BEFORE IT WILL EVER BE RETURNED  %
		PRCDNCE4	=	0,

	LASTINTREE	= LABELEX,	% LAST LEXEME WHICH NEEDS TO APPEAR IN THE SYNTAX TREES %

	LINEND		= 5, % END OF STATEMENT %
	EOSLEX		= 5, % END OF STATEMENT %
		PRCDNCE5	=	0,
	RELATIONLOP 	= 6, %  .LT. , <  (1^6+) %
		PRCDNCE6	=	-4,
%				.EQ. , == (2^6+)
				.LE. , <= (3^6+)
				.GE. , >= (5^6+)
				.NE. , #  (6^6+)
				.GT. , >  (7^6+)
			     %
	LOGICALNOT 	= 7, % .NOT. %
		PRCDNCE7	=	-5,
	LOGICALAND	= 8, % .AND. %
		PRCDNCE8	=	-6,
	LOGICALOR	= 9, % .OR. %
		PRCDNCE9	=	-7,
	LOGICALMATCH	= 10, % .EQV.(1^6+) , .XOR.(2^6+) %
		PRCDNCE10	=	-8,
	POWER		= 11, % ** , ^ %
		PRCDNCE11	=	-1,
	ANDSGN		= 12, % & %
		PRCDNCE12	=	0,
	LPAREN		= 13, % ( %
		PRCDNCE13	=	0,
	RPAREN		= 14, % ) %
		PRCDNCE14	=	0,
	COLON		= 15, % : %
		PRCDNCE15	=	0,
	COMMA		= 16, % , %
		PRCDNCE16	=	0,
	DOLLAR		= 17, % $  %
		PRCDNCE17	=	0,
	MINUS		= 18, % - %	!ARITHMETIC USAGE
	DASH		= 18, % - %	!SYNTAX USAGE
		PRCDNCE18	=	-3,
	DIVIDE		= 19, % / %	!ARITHMETIC USAGE
	SLASH		= 19, % / %	!SYNTAX USAGE
		PRCDNCE19	=	-2,
	PLUS		= 20, % + %
		PRCDNCE20	=	-3,
	TIMES		= 21, % * %	!ARITHMETIC USAGE
	ASTERISK	= 21, % * %	!SYNTAX USAGE
		PRCDNCE21	=	-2,
	EQUAL		= 22, % = %
		PRCDNCE22	=	0,

	LASTLEX		= EQUAL,

	STACHK		=0;


% IF THE LEXEME NUMBERS ARE EVER CHANGED FOR SOME REASON THERE IS
  A CASE STATEMENT IN EXPRESSION WHICH MUST BE CHANGED AND A CASE
  STATEMENT IN THE PROCESSING OF DOUBLE CHARACTER LEXEMES ( SUCH AS <= ).  %