Next: , Previous: , Up: WEB CONCEPTS   [Contents][Index]


2.4 Phases of processing

The FWEB processors perform their work in several distinct phases. (The following is somewhat technical. Scan it, then use it for reference later if necessary.)

2.4.1 The phases of FTANGLE

FTANGLE has two phases. In phase 1, the source file is read; in phase 2, compilable code is written out in the order specified by the web.

More specifically, phase 1

Phase 2

  • outputs outer macro definitions (‘@d’);
  • outputs the unnamed module (‘@a’);
  • expands FWEB macros (‘@m’);
  • expands built-in macros such as ‘$IF’ or ‘$PI’ (see Built-in functions);
  • translates RATFOR statements (see RATFOR).

2.4.2 The phases of FWEAVE

FWEAVE has three phases. In phase 1, the source file is read and cross-reference information is collected. In phase 2, the source file is read again, then pretty-printed with some cross-reference information. (For discussion of pretty-printing, see Pretty-printing.) In phase 3, an automatically-generated Index, List of Modules, and Table of Contents are written.

More specifically, phase 1

Phase 2

  • outputs limbo text;
  • outputs special TeX macros for overloaded operators;
  • copies TeX material directly to output;
  • treats material between vertical bars (‘|...|’) as code to be typeset;
  • tokenizes and stores contents of each code section;
  • analyzes code syntax and converts it to appropriate TeX macros.

Phase 3 writes out cross-reference information. (To eliminate some of that, see -x’: Eliminate or reduce cross-reference information (FWEAVE)..) Specifically, it


Next: The structure of a web, Previous: The FWEB processors: FWEAVE and FTANGLE, Up: WEB CONCEPTS   [Contents][Index]