Trailing-Edge
-
PDP-10 Archives
-
tops20-v7-ft-dist1-clock
-
7-sources/diupor.bli
There are 4 other files named diupor.bli in the archive. Click here to see a list.
MODULE diupor (ident = '253'
%require ('DIUPATSWITCH')
) =
begin
! 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.
!
!++
! FACILITY: PAT parser
!
! ABSTRACT:
!
! PATPOR.BLI. Portal routines to call the parser from DIU.
!
! ENVIRONMENT:
!
! Bliss-32 or Bliss-36 with XPORT.
!
! AUTHOR: C. Richardson, CREATION DATE: 31-Jan-85
! History:
!
! 253 Rename file to DIUPOR.
! Gregory A. Scott 1-Jul-86
!
! 153 In PATPOR: delete routine DIU$COPY_DESCRIPTION; DIUDO was its
! only user.
! Sandy Clemens 12-May-86
!
!--
! INCLUDE FILES:
require 'DIUPATPROLOG';
library 'DIUPATLANGSP';
library 'DIUPATDATA';
require 'DIUPATPORTAL';
library 'DIUPATPARSER';
library 'BLI:XPORT';
library 'DIUACTION';
! Synthetic lexical tokens to control which grammar is parsed:
global
DESC_TOKEN: TKN_STR
preset ( [TKN_SYNTHETIC] = TRUE,
[TKN_LOCATOR] = LSLOCAL_SYNTHETIC_LOCATOR,
[TKN_TERM] = T_PARSE_DESCRIPTION ),
TRANSFORM_TOKEN: TKN_STR
preset ( [TKN_SYNTHETIC] = TRUE,
[TKN_LOCATOR] = LSLOCAL_SYNTHETIC_LOCATOR,
[TKN_TERM] = T_PARSE_TRANSFORM ),
! I/O block for file to be parsed:
file_for_input : $XPO_IOB (),
! Copy of filename being parsed, for error messages:
pinfile: $STR_DESCRIPTOR (),
! Source and destination record description roots, if parsing a transform:
srcrt,
dstrt;
GLOBAL ROUTINE DIU$SYNTAX_DESCRIPTION (file) =
!++
!
! FUNCTIONAL DESCRIPTION:
!
! Parse a record description for syntax only.
!
! FORMAL PARAMETERS:
!
! file Pointer to descriptor containing file name.
!
! IMPLICIT INPUTS:
!
! None
!
! IMPLICIT OUTPUTS:
!
! None
!
! ROUTINE VALUE:
!
! TRUE description parsed
! FALSE description did not parse
!
! SIDE EFFECTS:
!
! None
!
!--
BEGIN
LOCAL
status;
IF NOT $XPO_OPEN (IOB = file_for_input, FILE_SPEC = .file, DEFAULT = '.DDL')
THEN return FALSE;
$STR_DESC_INIT (DESCRIPTOR = pinfile, STRING = .file);
status = PAT$PARSER (DESC_TOKEN, TRUE, 0, TRUE, file_for_input);
$XPO_CLOSE (IOB = file_for_input);
RETURN .status;
END;
GLOBAL ROUTINE DIU$SYNTAX_TRANSFORM (file) =
!++
!
! FUNCTIONAL DESCRIPTION:
!
! Parse a transform for syntax only.
!
! FORMAL PARAMETERS:
!
! file Pointer to descriptor containing file name.
!
! IMPLICIT INPUTS:
!
! None
!
! IMPLICIT OUTPUTS:
!
! None
!
! ROUTINE VALUE:
!
! TRUE transform parsed
! FALSE transform did not parse
!
! SIDE EFFECTS:
!
! None
!
!--
BEGIN
LOCAL
status;
IF NOT $XPO_OPEN (IOB = file_for_input, FILE_SPEC = .file, DEFAULT = '.TRA')
THEN return FALSE;
$STR_DESC_INIT (DESCRIPTOR = pinfile, STRING = .file);
status = PAT$PARSER (TRANSFORM_TOKEN, TRUE, 0, TRUE, file_for_input);
$XPO_CLOSE (IOB = file_for_input);
RETURN .status;
END;
GLOBAL ROUTINE DIU$PARSE_DESCRIPTION (file, root) =
!++
!
! FUNCTIONAL DESCRIPTION:
!
! Parse a record description.
!
! FORMAL PARAMETERS:
!
! file Pointer to descriptor containing file name.
! root Address to place root of record description tree
!
! IMPLICIT INPUTS:
!
! None
!
! IMPLICIT OUTPUTS:
!
! None
!
! ROUTINE VALUE:
!
! TRUE description parsed
! FALSE description did not parse
!
! SIDE EFFECTS:
!
! None
!
!--
BEGIN
LOCAL
status;
IF NOT $XPO_OPEN (IOB = file_for_input, FILE_SPEC = .file, DEFAULT = '.DDL')
THEN return FALSE;
$STR_DESC_INIT (DESCRIPTOR = pinfile, STRING = .file);
status = PAT$PARSER (DESC_TOKEN, TRUE, .root, FALSE, file_for_input);
$XPO_CLOSE (IOB = file_for_input);
RETURN .status;
END;
GLOBAL ROUTINE DIU$PARSE_TRANSFORM (file, source, dest, root) =
!++
!
! FUNCTIONAL DESCRIPTION:
!
! Parse a transform.
!
! FORMAL PARAMETERS:
!
! file Pointer to descriptor containing file name.
! source Root of source record description
! dest Root of destination record description
! root Address where to place root of completed transform
!
! IMPLICIT INPUTS:
!
! None
!
! IMPLICIT OUTPUTS:
!
! None
!
! ROUTINE VALUE:
!
! TRUE Transform parsed
! FALSE Transform did not parse
!
! SIDE EFFECTS:
!
! None
!
!--
BEGIN
LOCAL
status;
IF NOT $XPO_OPEN (IOB = file_for_input, FILE_SPEC = .file, DEFAULT = '.TRA')
THEN return FALSE;
$STR_DESC_INIT (DESCRIPTOR = pinfile, STRING = .file);
srcrt = .source;
dstrt = .dest;
status = PAT$PARSER (TRANSFORM_TOKEN, TRUE, .root, FALSE, file_for_input);
$XPO_CLOSE (IOB = file_for_input);
RETURN .status;
END;
END
ELUDOM