Introduction
An Implementation of J


The system is organized as diagrammed above. The main function main calls jinit2 for initializations, then immloop ("immediate execution" loop), which repeats the following steps:

prompt and jgets prompt and accept an input sentence.

immex is the heart of the execution loop. The argument is a string of the input sentence. The processing is divided into three parts: Finally, tpop frees the temporary storage used in an iteration.

The fundamental data structure is the APL array (an object of data type A), used to represent all the possible objects in J. Most functions in the implementation accepts arrays as argument and return them as result. Functions tend to be short and compact, and functions which implement J primitives are used freely. Extensive use is made of C preprocessor definitions and macros. Although the implementation language is C, the programming style is unmistakably APL.

This document is organized along the lines of the dictionary: Chapter 1 describes the interpretation of a sentence. Chapters 2, 3, and 4 describe nouns, verbs, and adverbs and conjunctions. Chapter 5 presents alternative representations. Chapter 6 describes display. Chapter 7, the final chapter, describes comparisons.

The remainder of the document contains various useful bits. In particular, the Appendix contains a system summary, a means of quickly locating a primitive in the program files.



NextPreviousIndexTable of Contents