(
and )
. As long as the number of opening and closing
parentheses matches, Yodl will correctly recognize the list. E.g., given a
hypothetical macro somemacro
, the following code sample shows the macro
followed by one parameter list:
somemacro(Here is a chunk of text.) somemacro(Here is a some (more) text.)
A problem arises when the number of parentheses is unbalanced: i.e., when the
parameter list consists of more opening than closing parentheses or v.v.. To
handle such situations, Yodl offers a `literal-character' mechanism (see the
CHAR
macro in ??) and a `global substitution' mechanism (see the
SUBST
macro in ??). For example, to send the text
here's a ")" closing parenthesis
as an argument to our hypothetical macro somemacro
, the following can be
used:
COMMENT(-- Alternative 1: using CHAR --) somemacro(here's a "CHAR(41)" closing parenthesis) COMMENT(-- Alternative 2: using SUBST --) SUBST(closepar)(CHAR(41)) . . somemacro(here's a "closepar" closing parenthesis)
Both methods have disadvantages: the CHAR
method requires you to remember
that an ASCII 41 is a closing parenthesis. The SUBST
method defines a
string closepar
that is always expanded to a closing parenthesis,
wherever in the text it occurs. Nevertheless, unbalanced parameter lists can
be handled by Yodl. (If the here described method proves to be too much of a
pain, I'll think of something. As for myself, I've never yet have felt the
need to use an unbalanced parameter list -- except in this document..) Also,
remember that unbalanced parenthesis pairs are only relevant in argument
lists. Yodl handles parentheses in normal text as ordinary characters.
Please send Yodl questions and comments to yodl@icce.rug.nl.
Please send comments on these web pages to
(address unknown),
send other FSF & GNU inquiries and questions to
Copyright (c) 1998 Karel Kubat and Jan Nieuwenhuizen
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.