Ethereal-dev: Re: [Ethereal-dev] Stuff: CGMP over EthernetII, IS-IS virtual path fix and di
On Sat, Mar 23, 2002 at 08:23:15PM +0200, Heikki Vatiainen wrote:
> The display filter problem occurs when trying to filter with
> names. For example "ip.addr == 130.230.52.1" works, but "ip.addr ==
> broker-gw" fails even if names are supported. The error message is
> "The string "-" was unexpected in this context." and comes from
> epan/dfilter/grammar.c. Maybe someone can take a look at this?
The grammar doesn't allow hyphens in tokens that are
1) field names
or
2) non-quoted strings.
A "string" is any type of token other than parentheses (for grouping),
slashes (for CIDR address/net specifications), comparison operators,
Boolean operators, brackets and the stuff inside brackets for range
specifications, and other non-quoted tokens that match field names.
So in
ip.addr == broker-gw
"broker-gw" is a non-quoted string, in which hyphens aren't allowed.
A workaround for that is to put the host name in quotes.
There is, unfortunately, no workaround for 1).
Gilbert, would it be possible to change the
[[:alnum:]_.:]+
Flex specification for field name/non-quoted string tokens to
[[:alnum:]_-.:]+
so that you *can* have hyphens in field names, IP addresses, and the
like, without breaking the lexical analyzer's handling of [N-M]-style
ranges?