Browse Prior Art Database

Language Processing Language, Write Function Definition

IP.com Disclosure Number: IPCOM000108251D
Original Publication Date: 1992-May-01
Included in the Prior Art Database: 2005-Mar-22
Document File: 1 page(s) / 46K

Publishing Venue

IBM

Related People

Hidalgo, DS: AUTHOR

Abstract

Disclosed is a feature of the LANGUAGE PROCESSING LANGUAGE (LPL) that supports the interfacing of a Lexical Scanner mechanically generated from an LDF (Language Definition File) with manually written code to form a translator for a formal language. It is necessary for many language translators to echo part or all of their input to an output source file. This requirement is supported by LPL by incorporating the abstract clause "ECHO TOKEN" as part of the definition of a Lexical Rule.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 80% of the total text.

Language Processing Language, Write Function Definition

       Disclosed is a feature of the LANGUAGE PROCESSING
LANGUAGE (LPL) that supports the interfacing of a Lexical Scanner
mechanically generated from an LDF (Language Definition File) with
manually written code to form a translator for a formal language. It
is necessary for many language translators to echo part or all of
their input to an output source file. This requirement is supported
by LPL by incorporating the abstract clause "ECHO TOKEN" as part of
the definition of a Lexical Rule.

      A default Write Function is normally used by the mechanically
generated Lexical Scanner to output characters that are part of a
token built under a Lexical Rule that contain the "ECHO TOKEN"
clause.  However, a formal language translator designed with the help
of LPL may sometimes need to alter, copy or simply monitor the output
source before it is written. It is also possible that the formal
language translator must write its output to a main memory buffer
instead of a file. For any of these cases it becomes necessary for
the LPL user to replace the default Write Function with a manually
written one.

      The syntactic construct described in this article provides the
means by which the LPL user specifies the name of the manually
written Write Function in the Lexical Section of the Language
Definition File.  By using the syntactic construct shown in the
figure, the user can interface a customized Character Wri...