Bug in lexer_v3

David Relson relson at osagesoftware.com
Tue Jan 18 13:30:27 CET 2005


Evgeny,

Your modification _does_ change the behavior of the parser.  It now
works properly for _your_ test case, but works improperly for other
cases.  Using the good.mbx and spam.mbx files in src/tests/inputs try
this:

   bogolexer-official -p < good.mbx > test.1
   bogolexer-evgeny   -p < good.mbx > test.2
   diff test.1 test.2

Regards,

David



On Tue, 18 Jan 2005 11:36:30 +0300 Evgeny Kotsuba wrote:

> David Relson wrote:
> 
> >Evgeny,
> >
> >Moving "msg_header = false" has no effect in my test.  Both old and new
> >versions of bogolexer produce the same tokens.
> >  
> >
> yes,  I have to comment yy_set_state_initial  and put BEGIN INITIAL  as 
> part of yy_set_state_initial  (right in lexer_v3.c, but the same is in  
> lexer_v3.l)
> 
> case 20:
> YY_RULE_SETUP
> { enum mimetype type = get_content_type();
>                           have_body = true;
> //                           msg_header = false;
>                           clr_tag();
>                           switch (type) {
>                           case MIME_TEXT_HTML:    BEGIN HTML; break;
>                           case MIME_MESSAGE:   
> 
>                           BEGIN INITIAL;
>                           /* yy_set_state_initial();*/ break;
> 
>                           default:        BEGIN TEXT;
>                           }
>                           msg_header = false;
>                           return EOH;
>                         }
>     YY_BREAK
> 
> 
> SY,
> EK


-- 
David Relson                   Osage Software Systems, Inc.
relson at osagesoftware.com       Ann Arbor, MI 48103
www.osagesoftware.com          tel:  734.821.8800



More information about the bogofilter-dev mailing list