On Wed, 2002-04-10 at 12:45, Guy Harris wrote:
> On Wed, Apr 10, 2002 at 12:19:20PM +0200, Tom Uijldert wrote:
> > For WSP however, the name is "wap-wsp", which is a problem for the scanner,
> > it cannot handle the hyphen.
> >
> > So should the scanner be changed or should we re-baptise the WSP?
>
> I'd vote for fixing the scanner, if possible.
>
> I'd discussed various scanner issues in a message a while ago; I'll see
> if I can find the message.
Here it is. I shamefully haven't looked at the code change for this yet.
--gilbert
--- Begin Message ---
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?
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev
--- End Message ---