Google
 

Trailing-Edge - PDP-10 Archives - tops20-v7-ft-dist1-clock - 7-sources/diupatblsext.req
There are 4 other files named diupatblsext.req in the archive. Click here to see a list.
!	COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1986.
!	ALL RIGHTS RESERVED.
!
!	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 THAT IS NOT SUPPLIED BY DIGITAL.
!
! PATBLSEXT.REQ
! IDENT('X2.0-002')
!

!++
! FACILITY:	PAT Parser
!
! ABSTRACT:
!
!	PATBLSEXT.REQ is the specification for BLISS
!	extentions used by the parser.
!
!	It also defines the conditionals used for conditional
!	compilation tests.
!
!	This file is generally language independent although
!	some applications may wish to change the manner in
!	which the conditionals for conditional compilation are
!	implemented.
!
! ENVIRONMENT:	VAX/VMS user mode
!
! AUTHOR:  H. Alcabes, CREATION DATE:  17-Feb-81
!
! MODIFIED BY:
!
!	Charlie Mitchell, 26-Oct-1981, VERSION X2.0-001
! 001 -	Add macros PATBLSEXT_DEBUGGING and PATBLSEXT_LOCAL_RECOVERY.
!	Modify enumeration macro so that can have zero enumeration
!	values.  Incorporate various modifications for SD_ definitions
!	from Brian Hetrick and Becky Will (BASIC).
! 002 18-May-84 C. Richardson Remove VMS dependencies.
!
! 003 - 13 Aug 85 Allow debug compilation without debug output
!
!--
! Debugging code is generated if this macro has the value
! TRUE.  Normally debugging code is generated if running
! BLISS-32 or BLISS-36 with /DEB unless /VARIANT=1.  The /VARIANT option
! permits compilation with Debug symbol table records but without
! the parser debugger.

!macro
!    PATBLSEXT_DEBUGGING =
!	(%switches (debug) and (%bliss (bliss32) or %bliss (bliss36))	! 002
!	 and (%variant neq 1)) %;			! 002
compiletime PATBLSEXT_DEBUGGING =
	(%switches (debug) and (%bliss (bliss32) or %bliss (bliss36))
	and (%variant neq 1));

! Code is generated to do local error recovery if this
! macro has value TRUE.

macro
    PATBLSEXT_LOCAL_RECOVERY =
	(%bliss (bliss32) or %bliss (bliss36)) %;	! 002

! If this macro has value TRUE, an additional field is
! allocated in each element of the parse stack to permit
! application specific information in lexical tokens to be 
! associated with particular items in the stack.
!
! Ada uses this field to associate comments with the parse
! stack.  A macro in PAT_LANGSP_LIBRARY called LS_LEX_EXTRA_INFO
! returns information from a lexical token that is placed
! this field.  See PATPARSER.REQ for information on how
! to access the stacked extra info.

macro
    PATBLSEXT_EXTRA_STACK_FIELD =
	(%bliss (bliss32) or %bliss (bliss36)) %;	! 002

literal
    NULL = 0;

literal
    TRUE = 1,
    FALSE = 0;

macro
    ZEROBYTE (CNT, DST) =
	ch$fill (0, (CNT), (DST)) %;
!
!	Macro to define enumeration types:
!
!	Example:
!
!		ENUMERATION('ARITY',0,NULLARY,UNARY,BINARY,TERNARY,LIST);
!
!	Generates:
!
!		LITERAL
!			FIRST_ARITY	=0,
!			NULLARY		=0,
!			UNARY		=1,
!			BINARY		=2,
!			TERNARY		=3,
!			LIST		=4,
!			LAST_ARITY	=4;

macro
    ENUMERATION (TYPE, STARTVAL) [] =

	compiletime
	    %name (TYPE) = (STARTVAL);

	%if %null (%remaining)
	%then

	    literal
		%name ('FIRST_', TYPE) = (STARTVAL),
		%name ('LAST_', TYPE) = (STARTVAL) - 1;

	%else

	    literal
		%name ('FIRST_', TYPE) = (STARTVAL),
		ENUM1 (%name (TYPE), %remaining),
		%name ('LAST_', TYPE) = %name (TYPE) - 1;

	%fi

    %;

macro
    ENUM1 (COUNTER) [ENUMLIT] =
	%name (ENUMLIT) = COUNTER %assign(COUNTER, COUNTER + 1) %;

! End of PATBLSEXT.REQ