procmail
[Top] [All Lists]

Re: Suggestion for Enhancement; B, H, ... and D

2002-02-19 20:07:28
Jacques proposed,

| :0 [flags & co] # Head inchanged
| (   # sub-block begins...
|     * condition1.1
|     * condition1.2
|     # ...
| )(  # this sub-block is ORed with the first one
|     * condition2.1
|     # ...
| )   # sub-blocks chain ends here.
| * condition3
| action
|
| Is this silly?

Silly, no (I used the word only because Erik offered it).  But besides its
backward compatibility problems, it requires all the ANDs to have higher
precedences than all the ORs, so it's not very flexible.  There has to be
some way to specify whether to OR or AND a grouping block with another
grouping block (where a block could contain one single condition), and
moreover procmail would need to scan ahead to make sure that whenever there
are three or more blocks on a single level, they're all ANDed or ORed
together, because "a or b and c" and "d and e or f" are ambiguous.  Perhaps
ANDing or ORing could be specified as a level is opened?

Bart wrote,

: This is why I suggested adding a flag to mean "extended syntax ahead" --
: Older rcfiles would lack the "X" flag so procmail would know to apply the
: old rules.  The new rules could be anything, even perl-compatible REs.

Syntactically, that could work.  It might be a little confusing, but no more
so than the current situation with $-interpretation.



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail