Browse Prior Art Database

RPL, A BCPL-Based Production Language System

IP.com Disclosure Number: IPCOM000128626D
Original Publication Date: 1977-Dec-31
Included in the Prior Art Database: 2005-Sep-16
Document File: 23 page(s) / 59K

Publishing Venue

Software Patent Institute

Related People

Keith A. Lantz: AUTHOR [+4]

Abstract

This report is intended to serve two purposes. First, it should provide the interested reader with what is thought to be a particularly elegant design for a production language. To this end, the Rochester Production Language is discussed, as far as possible, in implementation-independent terms. To provide the reader with a feel for the actual use of production language, salient points of the RPL Translator Writing System are also discussed; in particular, the interface to user-supplied BCPL semantic routines. The reader is expected to have a rudimentary knowledge of production language (suggested reading is [Gries]). Second, this report is meant to serve as a reference manual for the Rochester Production Language. It is not, however, a detailed user's guide to the RPL Translator Writing System [Lantzl. The syntactic notation used here is a variant of BNF. Braces and I are metasymbols used to represent repetition and/or alternation. Some possible constructs are: { )* zero or more occurrences of t }+ one or more occurrences of { }n 0 to n occurrences of [ ) either or Brackets C and indicate an optional string.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 8% of the total text.

Page 1 of 23

THIS DOCUMENT IS AN APPROXIMATE REPRESENTATION OF THE ORIGINAL.

RPL, A BCPL-Based Production Language System

by Keith A. Lantz Clifford B. Meltzer TR15

Computer Science Department The University of Rochester Rochester, NY April 1977

This research was supported in part by the Alfred P. Sloan Foundation under Grant #74-12-5; in part by the National Science Foundation under Grant #MCS76-10825; and in part by the Advanced Research Projects Agency of the Department of Defense, monitored by ONR under Contract #NO0014-75-C-1091.

I. Overview of the RPL System

II. The Rochester Production Language

2 1. Reserved words, identifiers, and constants 2 2. The RPL program 4 3. The scanner constructor 5 1. Character classes 5 2. Delimiters 6 3. Reserved words 7 4. Comments 7 5. Example 8 4. Declarations 9 1. Nonterminals 9 2. Aliases 9 3. Classes 10 4. Constants 10 5. Example 12 5. Productions 14 1. Metasymbols 14 2. Classes 15 3. Multiplicity of like symbols 15 4. Actions 16 6. RPL source file conventions 20 III. The RPL Translator Writing System 21 1. Overview 21 2. The compiler 22 3. The interpreter 23 4. Semantic routines 24 5. Run-time error- handling 26 1. Target language errors 26 2. Recognizer errors 26 6. The debugger 28 Figures 29 References 32 Appendices A. RPL Syntax 33 B. SIMPLEGOL Syntax 37 C. XPRGOL RPL Source File 40 D. XPRGOL Semantic Routines 47 E. XPRGOL Compiler-Generated Header File 52

Preface

This report is intended to serve two purposes. First, it should provide the interested reader with what is thought to be a particularly elegant design for a production language. To this end, the Rochester Production Language is discussed, as far as possible, in implementation- independent terms. To provide the reader with a feel for the actual use of production language, salient points of the RPL Translator Writing System are also discussed; in particular, the interface to user-supplied BCPL semantic routines. The reader is expected to have a rudimentary knowledge of production language (suggested reading is [Gries]).

Second, this report is meant to serve as a reference manual for the Rochester Production Language. It is not, however, a detailed user's guide to the RPL Translator Writing System [Lantzl.

The syntactic notation used here is a variant of BNF. Braces and I are metasymbols used to represent repetition and/or alternation. Some possible constructs are:

{)* zero or more occurrences of t}+ one or more occurrences of {}n 0 to n occurrences of [ ) either or

Brackets C and indicate an optional string.

University of Rochester Page 1 Dec 31, 1977

Page 2 of 23

RPL, A BCPL-Based Production Language System

(The syntactic metasymbols < and > are also RPL source symbols. Their use in a particular instance is disambiguated by the fact that RPL reserved words are uppercase (e.g., ), whereas BNF nonterminals are lower case (e.g.,

).)

I. Overview of the RPL System

In designing a translator writing system, two meta-languages are required: 1) t...