Previous: , Up: Files   [Contents][Index]


3.3 Change files

The primary input to the FWEB processors is the test.web source file. However, a change file test.ch can also be specified. A change file consists of instances of the following structure:

@x
(One or more lines of text, EXACTLY as in the web file.  Copy these
lines with an editor; don't type them from scratch.)
@y
(Replacement text.)
@z

The change-file mechanism allows one to insert local changes or test new code without physically modifying the original web file.

To specify a change file, use its name as the second file name on the command line. The extension ‘.ch’ is assumed by default. For example,

ftangle test test

processes test.web with the change file test.ch.

In addition to ‘@x’, ‘@y’, and ‘@z’, the only ‘@’ commands allowed in a change file are language-changing commands such as ‘@c’ and the special commands ‘@[’ and ‘@]’. The command ‘@[’ is used for column-oriented languages such as FORTRAN–77 and means switch into code mode. Similarly, ‘@]’ means switch out of code mode.

All ‘@’ commands in a change file must begin in column 1. Lines not beginning with ‘@’ are ignored, so may be used as comments. Comments may also be included on the ‘@x’, ‘@y’, and/or ‘@z’ lines.