On Thu, 10 Oct 2002, Professional Software Engineering wrote:
At 22:13 2002-10-10 +0221, Udi Mottelo wrote:
It makes sense, but, I expected that procmail checks the input
against every regx from the recipe in one phase, for example,
if we have recipe:
[snip]
Separate _condition_ lines are separate expressions and are independantly
evaluated. I suggest you try enabling VERBOSE LOGGING and taking a look at
the results of recipes written with scoring vs. composite OR. It might
help you comprehend the differences.
I understood how does it work, but not understand why.
I feel that my poor English blocks me. Pseudo code will help
to explain my self:
I understand that procmail works in this way:
for each REGX in the RECIPE do
for each CHARACTER in the STREAM do
if Match() then
...
print log line
endloop
endloop
Instead of:
for each CHARACTER in the STREAM do <--- up side down
for each REGX in the RECIPE do
if Match() then
Score[REGX] = ScoreFunction()
SUM += Score[REGX]
if SCORE-FLAGES == something
break the loop or not...
endloop
endloop
#
# And here we have the same log as usual:
#
for each RECORD in Score[] do
print the RECORD
endloop
#
# Work on the results as usual
...
Doesn't the second way much more efficient? (only one pass and
get the same results)
Bye,
Udi
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail