Browse Prior Art Database

Language Processing Language, Input Source Definition

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

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. Associated with the task of language translation is the source from where input characters are read by the Lexical Scanner. The type of Input Source may be different for different formal language translators. For instance, a language compiler might read its input from a buffered disk file while an interpreter might take its input from a main memory buffer.

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

Language Processing Language, Input Source 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.
Associated with  the task of language translation is the source from
where input characters are read by the Lexical Scanner. The type of
Input Source may be different for different formal language
translators. For instance, a language compiler might read its input
from a buffered disk file while an interpreter might take its input
from a main memory buffer. Since the source code mechanically
generated by an LPL translator must reference the Input Source when
that source is a file, it becomes necessary for the formal language
design written in LPL to include a means by which the name of the
Input Source can be interfaced to the manually written code.

      The Input Source definition feature is a syntactic facility
that provides such means. When the syntax shown in the figure is used
in the Lexical Section of a Language Definition File, the LPL
translator uses the name specified by "String" in the mechanically
generated code whenever characters must be read from the input
source. The symbol defined with this feature must be declared as a
file handle by the manually written code.

      The usage of the Input Source Definition feature in the design
of a for...