procmail
[Top] [All Lists]

Terminology (was Re: Nesting and braces)

1999-06-17 01:21:29
On Wed, 16 Jun 1999 13:54:31 -0500 (CDT), "David W. Tamkin"
<dattier(_at_)Mcs(_dot_)Net> wrote:
| To reiterate: There can be +exactly+ one action, and it can be
| +exactly+ one of
|     deliver to a file
|     deliver to a pipe
|     forward
      a filter
      a variable capture
|     a set of braces with more recipes in them
                  ... with more recipes or assignments in them

Okay, I shouldn't have called it "deliver to a pipe", I should just
have called it "pipeline". Anyway, I'd regard filters and variable
captures as special cases of one of the three valid sorts of actions
(four, if you regard braces as "action").

| All but the last one are delivering and will need a c flag or
                  three
| something if you want to do additional actions further down in the rc
| file.

So "something" could also be an f flag or a variable capture. Are
there any other cases besides these?

What I failed to point out explicitly was that this is a symmetric
relation: For every action, there needs to be a "prelude". Every
prelude can have exactly one action (if you can call a set of braces
"exactly one action").

(What I'm getting at is that it's a fairly common newbie mistake to
try something like

    :0
    * condition
    action
    {
        more stuff which goes with this prelude
    }

which is always incorrect and will lead to a "skipped {" log entry.)

In the quickref <http://www.iki.fi/era/procmail/quickref.html> I have
tried to standardize the term "prelude line" for the "colon, number,
flags, lock" line. Perhaps the manuals should define some sort of
standard terminology for the parts of a recipe to make them easier to
talk about. Here's what I have in mind:

            [ prelude line   :0 flags :lock maybe
   xxxxxxx  [             [  * condition
            [ conditions  [  * condition
            [             [  * condition
              yyyy             action

Here "xxxxxxx" stands for what I have tentatively called "prelude"
above. What would be a suitable term? (I don't think "prelude" really
cuts it because you will end up being confused between "prelude line"
[if we keep that] and "prelude".)

Probably there should also be something to cover both braces and
actual actions (i.e. yyyy can be action or braces, and action can be
file, forward, or pipeline).

/* era */

--
.obBotBait: It shouldn't even matter whether     <http://www.iki.fi/era/>
I am a resident of the state of Washington. <http://members.xoom.com/procmail/>
 * Sign the European spam petition! <http://www.politik-digital.de/spam/en/> *

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