See also the Literate Programming section. For the moment, on CSLab workstations run Nuweb using the command
~musser/public/nuweb filewhere
file.w
is a Nuweb source file. (There is an older version
of Nuweb on the CSLab file system, but the above version is better.
The bug I mentioned in class 3/18/99 has been corrected.)
On RCS SUN systems, run it with
~mussed/public/nuweb fileFor running Nuweb on a Windows PC, download a binary executable. Or download and compile the source file, which is itself a Nuweb file that produces both the C source code files of the implementation and the latex source of the Nuweb Manual, as described below. Before running Nuweb on this file you must create the following directories to hold the C code: bin, doc, inc, and src. This assumes you already have a Nuweb executable. If not, download a zip archive containing both the Nuweb source and the C code, and compile the C code to get a nuweb executable.
The following document describes the Nuweb command set (which is very simple) and is also useful as a moderate-size example of the literate programming style: it documents the design and implementation of Nuweb itself.
Nuweb Manual (postscript file, about 80 pages)You probably want to print out just the first section of the manual, which describes the commands. (View it with ghostview and select the pages you want for printing.)
A nuweb mode for Emacs is provided by nuweb.el (an elisp file that can be loaded into Emacs with EscX load-file).
There is a bug still remaining in the modified nuweb: it is necessary
to quote $
and @
characters by prefixing an @
,
writing @$
and @@
, within nuweb parts as well
as outside of parts. (The older nuweb did not require this
quoting within scraps.)