W3C home > Mailing lists > Public > uri@w3.org > November 2003

Re: ambiguity in BNF: no non-numeric TLDs?

From: Roy T. Fielding <fielding@apache.org>
Date: Wed, 12 Nov 2003 12:42:55 -0800
Cc: <uri@w3.org>, "Michel Suignard" <michelsu@microsoft.com>
To: "Larry Masinter" <LMM@acm.org>
Message-Id: <CAF29620-1550-11D8-9F2A-000393753936@apache.org>

> Can we assume that TLDs will be non-numeric?

Yes, but we can't assume that the last domain is a TLD.

> It looks to me that the BNF is ambiguous between
> hostname and IPv4 addresses because the
> BNF for hostname doesn't rule out
>   nnn.nnn.nnn.nnn

Yes, it says that in the text describing the rule:

    The production for host is ambiguous because it does not completely
    distinguish between an IPv4address and a hostname.  Again, the
    "first-match-wins" algorithm applies: If host matches the production
    for IPv4address, then it should be considered an IPv4 address literal
    and not a hostname.

All of our attempts to disambiguate within the grammar itself did
not work because, without a trailing ".", there is no way to know
which is the TLD.

Received on Wednesday, 12 November 2003 16:08:51 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:06 UTC