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

3.11 Pragmas

Most tools have to support some essential, but rather inelegant features. In FunnelWeb these messy bits have all been stuffed into the scanner's pragma (for pragma tic) construct.

A pragma consists of a single line of input (including the EOL) commencing with @p. This must be followed by a single space, and then the pragma verb. This must be followed by a sequence of zero or more arguments separated by one or more spaces. Four pragmas are available

pragma = pragma_ident | pragma_mill |
         pragma_moll | pragma_typesetter
The following syntax definitions assist in defining the pragmas.

s        = {" "}+
ps       = ("@p" | "@P") " "
number   = { decimal_digit }+
numorinf = number | "infinity"

The arguments to pragmas are case-sensitive and must be specified in lower case.

Pragmas are processed and consumed entirely by the scanner. The parser never sees them and so they can play no part in the parser level syntax. As a result, pragma lines can appear anywhere in the entire input file regardless of the surrounding context (e.g. even in the middle of a macro definition). The sole effect of a pragma is to modify some internal parameter of FunnelWeb.

The following sections describe the four FunnelWeb pragmas.

Prev Up Next


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