A Spider User's Guide

Donald Knuth developed the WEB system of structured documentation as part of the TEX project [Knuth 84]. WEB enables a programmer to divide his or her program into chunks (called modules), to associate text with each chunk, and to present the chunks in in any order. In Knuth’s implementation, the chunks are pieces of PASCAL programs, and the chunks are formatted using TEX. The WEB idea suggests a way of combining any programming language with any document formatting language, but until recently there was no software support for writing anything but PASCAL programs using WEB. In 1987, Silvio Levy rewrote the WEB system in C for C, while retaining TEX as the formatting language [Levy 87]. I have has modified Levy’s implementation by removing the parts that make C the target programming language, and I have added a third tool, Spider, which complements WEAVE and TANGLE. Spider reads a description of a programming language, and writes source code for a WEAVE and TANGLE which support that language. Using Spider, a C compiler, and an Awk interpreter, an experienced systems programmer can generate a WEB system for an Algol-like language in a few hours. This document explains how to use Spider to generate a WEB system for any programming language. (The choice of programming language is limited only by the lexical structure built into Spidery WEB, as we shall see.) You should consult the companion document, “The Spidery WEB system of structured documentation,” to learn how to use the generated WEB system.