Next: Question 29 Prev: Question 27 Up: Common Things People Want To Know Top: Top

[28] What is the difference between FWEB and Funnelweb?

Archive-Date: Thu, 17 Dec 1992 10:20:27 CST

The following was extracted from a text by Paul Lyon (and will eventually be merged with a FAQ for Funnelweb ...):

"FWEB and Funnelweb are quite distinct. FWEB is built on top of the CWEB framework; although the parser in its weave processor can do more---all of ratfor, C, C++, and (though the support is not complete), TeX, it is still confined to those specific languages, and still imposes on the user the formatting conventions that please its author. To get something different you will have to hack the weave processor. (One could possibly get somewhere by modifying the TeX macro package that FWEB uses, but that might be the harder way to go, unless, of course, you are already a TeXpert) ...

Funnelweb, on the other hand, does not try to parse the source code at all; it just takes the layout of the source as written, turns off the meaning of plain TeX special characters, sets typewriter font, and then invokes `\obeylines' and `\obeyspaces'; all this together causes TeX to print the source verbatim (the paragraph formatting is turned off, and TeX does not gobble spaces). The original WEB, CWEB, FWEB, and Spiderweb all parse and format the source, inserting TeX math codes for the operators, putting keywords in boldfont, adjusting the indentation, and so on. If you like the style chosen for the programme, it looks much nicer that way. Except for Spiderweb, which can be adapted to various languages by allowing a fair range of variation in specifying the pretty printing grammar using a large `awk' script to process the grammar spec and generate replacement code for significant chunks of weave, the pretty printing parser(s) in the other are hard coded. This has it uses besides making the typeset code more attractive; WEB, CWEB, FWEB, and Spiderweb all do an index of identifiers for the code that can differentiate, for the most part, between declaration and use of an identifier (they know enough about the grammar to do that, but not, of course, as much as a compiler or interpreter) ..."

[Rest deleted: continues with more details on Funnelweb.]

JAK: ``Don't hack fweave! Many effects can be obtained by modifying fwebmac.sty. (If one knows enough to hack fweave, he presumably knows enough to hack fwebmac.sty instead.) Note that the style-file mechanism does provide some degree of customization.''

Please report customizations that are really necessary to John Krommes.