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 pragmatic) 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_typesetterThe 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.