Browse Prior Art Database

Checker for an Affinistic and Widely Deterministic Programming Language Syntax

IP.com Disclosure Number: IPCOM000078103D
Original Publication Date: 1972-Nov-01
Included in the Prior Art Database: 2005-Feb-25
Document File: 3 page(s) / 70K

Publishing Venue

IBM

Related People

Wolf, P: AUTHOR

Abstract

A programming language syntax is represented by a graphic metalanguage, the elements of which are depicted in Figs. 1A to 1E. The syntax or the PL/I WRITE statement is shown in Fig. 2. A statement is a correct WRITE statement, if following the arrows of Fig. 1A, the tokens encountered in the symbol match those of the input. At 1 a decision is made. The token matching the input determines the further syntax check. The symbol of Fig. 1B means that a metalanguage subroutine is to be called, which in the example of Fig. 2 requests the syntax of an expression.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 54% of the total text.

Page 1 of 3

Checker for an Affinistic and Widely Deterministic Programming Language Syntax

A programming language syntax is represented by a graphic metalanguage, the elements of which are depicted in Figs. 1A to 1E. The syntax or the PL/I WRITE statement is shown in Fig. 2. A statement is a correct WRITE statement, if following the arrows of Fig. 1A, the tokens encountered in the symbol match those of the input. At 1 a decision is made. The token matching the input determines the further syntax check. The symbol of Fig. 1B means that a metalanguage subroutine is to be called, which in the example of Fig. 2 requests the syntax of an expression.

A set of macros has been defined corresponding 1.1 to the symbols of the graphic metalanguage. By means of these macros the representation of the syntax is encoded. The macros expand onto constants. For a symbol of the kind as shown in Fig. 1A "token" is embedded in the constants Then a syntax check is made by interpreting the string of constants by an interpreter program.

The syntax of PL/1 is nondeterministic. For instance, each statement, even if it starts with a statement keyword, may still be an assignment statement until the location proper has been checked for the "=" sign. However, after the type of statement has been identified, the syntax is mostly deterministic.

The metalanguage further contains two symbols: The NOTE symbol and the POINT symbol, both of which are shown in Fig. 1C. If the interpreter passes the code of the NOTE symbol, the current input location is saved; for the POINT symbol the saved input location is again made currently available.

By means of these symbols the nondeterminism at the beginning of the IF- statement is resolved, for example, as shown in Fig. 3. This method of looking- ahead only in a very limited number of cases and of applying to most of the syntax a "deterministic apparatus", greatly improves the time performance of the syntax checker.

In PL/I there are many state...