[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Simple support for literate T programming.



I recently completed writing a fairly complex program in C.  The
program had to be easily read by people as it was important that the
program was "nearly correct", but not important enough to formally
verify the program.  I used CWEB, a fairly sophisticated system for
producing readable programs using TeX.

Now that I have paid my dues by writing in C, I am able to return to
using T.  It is easier to write T programs that are more readable than
plain C programs because the language puts less constraints on how you
organize input to the compiler.  However, my experience with CWEB has
shown it is very nice to be able to write comments in TeX, especially
when you use mathematics.

I have written some software which provides support for literate T
programming.  It simply interprets the lines between forms, and
comments within forms, as LaTeX input.  When used to make a document,
the T forms are printed in typewriter font.  The forms in the text
file you edit look just like normal T forms, except the comments may
look funny.  Thus editors which submit part of a file to T for
evaluation will still work.

The programs and documentation are in a shar file call "schemeTeX.sh"
on linus (192.12.120.51).  For Unix folk, there is a lex program that
provides the same support for any dialect of lisp.
John
PS. The last note contained the wrong ArpaNet address.  Sorry for the
mistake.