Much simplified lexer

Matthias Andree matthias.andree at gmx.de
Thu Nov 13 18:49:28 CET 2003


Boris 'pi' Piwinger <3.14 at logic.univie.ac.at> writes:

> Here is the change which does make the difference. You
> changed this line:
> <INITIAL>(ESMTP|SMTP)+/[ \t\n]+id\ {ID}
> to that line:
> <INITIAL>(ESMTP|SMTP)+

*I* made the change, and the CVS comment noted that it it supposed to
speed up the lexer. The original trailing context rule slows the lexer
down and doesn't seem useful.

> I don't understand what this is good for. In the original
> expression the / seems to be wrong, maybe the space behind
> "id" should also be any kind of whitespace. But why
> completely remove it?
>
> Anyhow, wouldn't the following be nicer:
> <INITIAL>(E?SMTP)+

Go figure :-)

> And why the +? I only see it in the form "with ESMTP id
> PAA16337" etc., no repeated SMTP or ESMTP. So I would have
> assumed that version:
> <INITIAL>E?SMTP{WHITESPACE}+{WHITESPACE}id{ID}

We may just want to drop it altogether. If we want to drop "constant"
parts, say, "constant" Received: or Delivered-To: lines, it'd be better
to strip off the first N Received: lines.

-- 
Matthias Andree

Encrypt your mail: my GnuPG key ID is 0x052E7D95




More information about the Bogofilter mailing list