Browse Prior Art Database

Design of an Incremental Compiler and Interactive Interpreter Utilizing a Hybrid Token-Threaded Code

IP.com Disclosure Number: IPCOM000041938D
Original Publication Date: 1984-Mar-01
Included in the Prior Art Database: 2005-Feb-03
Document File: 2 page(s) / 43K

Publishing Venue

IBM

Related People

Hintz, TE: AUTHOR [+2]

Abstract

Described is the design of an incremental compiler and interactive interpreter utilizing a hybrid token-threaded code. The threaded code, which uses both one- and two-byte tokens with semantic information encoded in the token, allows for both compact object code and fast program execution, including run-time semantic checks. Moreover, the design allows the program source text to be reconstructed directly from the object code, eliminating the need to store the source form for the purposes of editing and displaying run-time errors. This reconstruction also allows easy depiction of the error location in a program statement. The design is well suited for small memory computer systems. The incremental compilation of a program produces a hybrid token-threaded code. One-byte tokens are used for the most common operations.

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 52% of the total text.

Page 1 of 2

Design of an Incremental Compiler and Interactive Interpreter Utilizing a Hybrid Token-Threaded Code

Described is the design of an incremental compiler and interactive interpreter utilizing a hybrid token-threaded code. The threaded code, which uses both one- and two-byte tokens with semantic information encoded in the token, allows for both compact object code and fast program execution, including run-time semantic checks. Moreover, the design allows the program source text to be reconstructed directly from the object code, eliminating the need to store the source form for the purposes of editing and displaying run-time errors. This reconstruction also allows easy depiction of the error location in a program statement. The design is well suited for small memory computer systems. The incremental compilation of a program produces a hybrid token-threaded code. One-byte tokens are used for the most common operations. This produces compact code. Some of these operations have an immediate parameter following the token. Fig. 1 is an illustration of how the library routine for an operation is invoked. It also depicts how the reconstruction data for a one-byte token is accessed. The first bit of the token is 0 to indicate that it is a one-byte token. For a two-byte token, the first bit of the token is 1. Two-byte tokens are used for the user identifiers and for the less commonly used operations. Instead of an identifier being an immediate parameter to a one-byte-token op...