Ethereal-dev: Re: [Ethereal-dev] Bug in dfilter color feedback

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Graeme Hewson <ghewson@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 11 Jun 2004 06:54:50 +0100
Olivier Biot wrote:

If you type the following display filter

    ip contains "x"

then the background turns green as expected when you type the
closing quote. If you repeat the same with the following
display filter:

    ip and udp contains "x"

then you need to type an extra white space for the background
color to turn green.

The problem is that the parser's state isn't being reset after a parse failure. When the parser tries to parse the complete expression, there's stuff left over from the previous parse without the closing quote. Currently the parser's state is only reset after a successful parse.

The attached patch fixes this problem and adds an option for tracing the parser. The summary is:

dfilter-int.h
        Enable parser tracing.

dfilter.c
        Define compiler debug flag to enable parser tracing.

        Always re-initialise parser state ready for next compilation.

semcheck.c
        Correct semcheck debug message.


Graeme Hewson



Attachment: dfilter-color.tar.gz
Description: application/gzip