dpp

Noweb doesn't support pretty-printing the way that CWEB does (it's language-independent), and I missed that feature a lot. So I wrote a noweb prettyprinter, dpp. A portion of the dpp documentation follows:

Here are some of the features of dpp:

To use dpp, just provide the `-filter dpp' option to noweave. There are a few options: To tell dpp about a user-defined keyword such as Elephant, simply insert a line such as `@ %keyword Elephant' into the .nw file. Multiple keywords may be specified on a single line.

The current version of dpp is 0.2.1, and you can find it here. You'll need noweb first, of course. If there's something egregiously wrong with the newest version, you can try version 0.2.0. And if you're really brave, you can get the latest development version.

Since the whole point of literate programs is that they are nice to read, I've made a .pdf of dpp available here.

One warning: for now, you need to use the noweb.sty from noweb 2.8, not 2.8a, since the newer 2.8a redefines \nwlbrace and \nwrbrace in a way that I have yet to deal with.

Here is an example of what dpp output looks like. It was slightly modified from Norman Ramsey's noweb port of Don Knuth's CWEB version of the UNIX program wc. The zip file contains the original .nw file and a .dvi file.

I appreciate hearing any comments about dpp, good or bad. Bug reports are especially welcome!


Go back to Dan's noweb page
Go back to Dan's home page
Last updated 19 Feb 1998