RossNet

FunnelWeb

Tutorial

Developer

Reference
1 Introduction
2 Interface
3 Scanner
4 Parser
5 Analyser
6 Tangle
7 Weave
8 Shell
9 Commands
10 Glossary
11 References

SEARCH
FunnelWeb Reference Manual

5 Analyser

The effect of the parser is to construct a macro table containing a representation of all the macros defined within the document, and a document list which contains a complete representation of the entire document. If there are no error diagnostics (or worse) at the end of the parser run, FunnelWeb invokes the analyser which tests for the following conditions and flags them with errors if they arise.

  • No macros defined in the input file.
  • No macros connected to output files.
  • Call of an undefined macro.
  • Call having the wrong number of parameters.
  • Call of a macro that is connected to an output file.
  • No calls made to a macro without the @Z option.
  • More than one call made to a macro without the @M option.
  • Directly or indirectly recursively defined macros.
  • Unnamed sections that contain no macro definitions.

FunnelWeb performs a static analysis to detect recursion. Unfortunately, the recursion detection algorithm flags all macros that have an infinite expansion rather than just all macros with a recursive definition. If A calls B, and B calls C, and C calls B, then FunnelWeb will flag A as well as B and C. It is hoped that this problem will be fixed in a later version.

Because FunnelWeb does not provide any kind of conditional feature, the prevention of recursion does not represent a curtailment of expressive power.

Macros may be invoked recursively, but may not be recursive. Thus:

@! LEGAL   recursive invocation.
@<Sloth@>@(@<Sloth@>@(Walrus@)@)

@! ILLEGAL recursive definition.
@$@<Teapot@>==@{@<Teapot@>@}

Prev Up Next


Webmaster    Copyright © Ross N. Williams 1992,1999. All rights reserved.