Compiler Tools in APL

[This article originally appeared in the ACM SIGAPL APL92 Conference Proceedings.]

We present the design and implementation of APL Intrinsic Functions for a Finite State Machine (also known as a Finite State Automaton) which recognizes regular languages, and a Parser which recognizes a subset of context free languages, including SLR(1), LALR(1), and LR(1). These are currently being used on a commercial APL mainframe system as part of a large real-time financial trading system, where they are part of a compiler which translates dealer specification statements into APL functions. Use of these Intrinsic Functions more than doubled the performance of the compiler.

In addition to making a significant performance improvement for a large production system, we show these functions to have value in effectively solving many common programming problems, especially those which are inherently or apparently iterative.

The Compiler Tools in APL article is available in PDF (90k) format and in PostScript (157k) format.