Google
 

Trailing-Edge - PDP-10 Archives - tops20-v7-ft-dist1-clock - 7-sources/diupatparser.req
There are 4 other files named diupatparser.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.
!
! PATPARSER.REQ

!++
! FACILITY:	PAT Parser
!
! ABSTRACT:
!
!	PATPARSER.REQ is the external specification for the parser.
!
! ENVIRONMENT:	VAX/VMS user mode
!
! AUTHOR:  C. Mitchell, CREATION DATE:  25-Feb-80
!
! MODIFIED BY:
!
!	Charlie Mitchell, 7-Dec-81 : VERSION X2-001
! 001 -	Combine .REQ and .RRR files.
!
! 002 - C. Richardson 25-May-84 Remove VMS dependencies.
!
!  253  Rename file to DIUPATLRTUNE.
!       Gregory A. Scott 1-Jul-86
!
!--

!
! INCLUDE FILES:
!

require 'DIUPATREQPRO';

library 'DIUPATLANGSP';

library 'BLI:XPORT';					! 002
! Parse Stack Definition

literal
    PAR_NO_SAVED_STATE = -3;

! The fields PATSTK_SYMBOL and PATSTK_STATE must be at least the size of
! PAT_STATE_SYMBOL_TABLE_ALLOC and PAT_STATE_ACTION_TABLE_ALLOC respectively
! in PATDATA.REQ.

    $FIELD PATSTK_FIELDS =
    set
    PATSTK_BASE = [$SUB_BLOCK ()],		! Placeholder to indicate base of token--uses no storage
    PATSTK_LOCATOR = [$INTEGER],
%if PATBLSEXT_EXTRA_STACK_FIELD
%then
    PATSTK_EXTRA_INFO = [$ADDRESS],
%fi
    PATSTK_SYMBOL = [$SHORT_INTEGER],
    PATSTK_TOKEN = [$SHORT_INTEGER],
    PATSTK_ERRORMARK = [$SHORT_INTEGER],
    PATSTK_STATE = [$SHORT_INTEGER]
    tes;

literal
    PATSTK_STR_SIZE = $FIELD_SET_SIZE*%upval;

macro
    PATSTK_STR =
	blockvector [LS_PARSE_STACK_SIZE, PATSTK_STR_SIZE/%upval]

	field
	(PATSTK_FIELDS) %;

undeclare %quote
    $DESCRIPTOR;				! due to xport problem

%IF %BLISS (BLISS36)						! 002
%THEN								! 002
macro								! 002
PAT$STACK_P				=	PATSTK %;	! 002
%FI								! 002

external
    PAT$STACK_P : ref PATSTK_STR;
%IF %BLISS (BLISS36)						! 002
%THEN								! 002
macro								! 002
PAT$PARSER				=	PARSER %;	! 002
%FI								! 002

external routine
    PAT$PARSER;

!++
! FUNCTIONAL DESCRIPTION:
!
!	PAT$PARSER is the parser.
!
! FORMAL PARAMETERS:
!
!	STARTING_TOKEN_PTR	- Pointer to initial token; if NULL
!				  then initial token is to be obtained
!				  from the lexical analyzer
!
!	ANNOUNCE_ABBREVIATIONS	- TRUE iff an error message should be
!				  printed when an abbreviation is corrected
!				  during error recovery.
!
! IMPLICIT INPUTS:
!
!	NONE
!
! IMPLICIT OUTPUTS:
!
!	NONE
!
! ROUTINE VALUE:
!
!	TRUE	- A compilation unit was parsed.
!	FALSE	- A compilation unit wasn't parsed.  At end of file.
!
! SIDE EFFECTS:
!
!	PAT$PARSER calls the lexical analyzer which reads the source
!	file.
!	PAR_ABST is called to build the abstract syntax tree.
!
!--
%if PATBLSEXT_DEBUGGING and PATBLSEXT_LOCAL_RECOVERY
%then

%IF %BLISS (BLISS36)						! 002
%THEN								! 002
macro								! 002
PAT$DUMP_BACKUP_INFO			=	DMPBKI %;	! 002
%FI								! 002

external routine
    PAT$DUMP_BACKUP_INFO : novalue;

!++
! FUNCTIONAL DESCRIPTION:
!
!	PAT$DUMP_BACKUP_INFO dumps information useful in understanding
!	the order in which error recovery will perform backup.
!
! FORMAL PARAMETERS:
!
!	NONE
!
!--

%fi
%if PATBLSEXT_DEBUGGING
%then

%IF %BLISS (BLISS36)						! 002
%THEN								! 002
macro								! 002
PAT$DUMP_PARSE_STACK			=	DMPPSS %;	! 002
%FI								! 002

external routine
    PAT$DUMP_PARSE_STACK : novalue;

!++
! FUNCTIONAL DESCRIPTION:
!
!	PAT$DUMP_PARSE_STACK dumps the current parse stack.
!
! FORMAL PARAMETERS:
!
!	NONE
!
!--

%fi
%if PATBLSEXT_DEBUGGING
%then

%IF %BLISS (BLISS36)						! 002
%THEN								! 002
macro								! 002
PAT$DUMP_REDUCTION			=	DMPRED %;	! 002
%FI								! 002

external routine
    PAT$DUMP_REDUCTION : novalue;

!++
! FUNCTIONAL DESCRIPTION:
!
!	PAT$DUMP_REDUCTION does a symbolic display of the current
!	reduction, including the contents of the current parse stack.
!
! FORMAL PARAMETERS:
!
!	NONE
!
!--

%fi
%if PATBLSEXT_DEBUGGING
%then

%IF %BLISS (BLISS36)						! 002
%THEN								! 002
macro								! 002
PAT$DUMP_TOKS				=	DMPTKN %;	! 002
%FI								! 002

external routine
    PAT$DUMP_TOKS : novalue;

!++
! FUNCTIONAL DESCRIPTION:
!
!	PAT$DUMP_TOKS outputs several tokens and symbols which are relevant
!	to the state of the parse.
!
! FORMAL PARAMETERS:
!
!	NONE
!
!--

%fi

! End of PATPARSER.REQ