procmail
[Top] [All Lists]

recursive variable definitions

1999-11-22 21:46:23
Rejo asked,

| Am i allowed to use a construction like this
| 
|   comment    = "\($ws($ctext|$quoted_pair|$comment)+$ws\)"
| 
| where this is the first time i define $comment?

It's allowed, but it won't be interpreted recursively like a grammar
definition.  It will be read like a shell variable assignment, where the
previous value [in this case, unset] will be substituted on the right side,
making the line equivalent to this:

    comment    = "\($ws($ctext|$quoted_pair|)+$ws\)"

which in turn is equivalent to this:

    comment    = "\($ws($ctext|$quoted_pair)*$ws\)"

but then () is a valid comment, isn't it?

<Prev in Thread] Current Thread [Next in Thread>