Strangeness in lexer?

David Relson relson at osagesoftware.com
Thu Aug 7 04:42:53 CEST 2003


At 07:37 PM 8/6/03, michael at optusnet.com.au wrote:

>Anyone know why the lexer has the '\.*' bit in
>the headers?
>
><INITIAL>^To/:\.*                               { if (header_line_markup) 
>set_tag("to:"); }
><INITIAL>^From/:\.*                             { if (header_line_markup) 
>set_tag("from:"); else return TOKEN; }
><INITIAL>^Return-Path/:\.*                      { if (header_line_markup) 
>set_tag("rtrn:"); else return TOKEN; }
>[...]
>
>This seems to say 'lookahead for zero or more dots' which is always true.
>
>????
>
>
>Very strange.
>
>Michael.

Michael,

Indeed it is strange.  Looking through my archive of bogofilter-cvs, I can 
determine the when, but not the why, of the  backslash.  It "crept in" to 
the lexer on May 10.

As you say, there's no apparent reason for being there.  A quick test shows 
that removing it has no affect on the regression tests.  It has been 
permanently excised from bogofilter :-)

David





More information about the bogofilter-dev mailing list