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

Re: Syntax Issues/Experience with RFC2396bis and abnf2re

From: Martin Duerst <duerst@w3.org>
Date: Tue, 06 May 2003 17:38:56 -0400
Message-Id: <4.2.0.58.J.20030506173318.05ca5e20@localhost>
To: Rob Cameron <cameron@cs.sfu.ca>, Graham Klyne <GK@ninebynine.org>, uri@w3.org, Harald.Alvestrand@maxware.no, Chris Newman <Chris.Newman@Sun.COM>, Dave Crocker <dhc2@dcrocker.net>, paulo@turnpike.com

Hello Harald, Chris, Dave, Paul,

The work on updating RFC 2396 (URIs) got into some dispute
over ABNF (RFC 2234). Can one of you please help us with
the following question:

Does the HEXDIG rule
(HEXDIG         =  DIGIT / "A" / "B" / "C" / "D" / "E" / "F")
include lower case digits, or not?

See below for various arguments.

Many thanks in advance for your help.

Regards,    Martin.

At 13:30 03/05/06 -0700, Rob Cameron wrote:

>Graham,
>
>I think I would prefer your interpretation that HEXDIG allows
>upper or lower case.   But in a literal reading of RFC2234
>and other reference materials, the following three
>counterarguments concern me.
>
>(1)     The reference ABNF parser available from IETF does not
>         permit lower case values for HEXDIGIT.
>         http://www.ops.ietf.org/abnf/
>
>(2)     The HEXDIG production satisfies the individual character
>         specification constraint of RFC 2234:
>
>         "To specify a rule which IS case SENSITIVE, specify
>         the characters individually."
>
>         HEXDIG         =  DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
>
>         (If specification by numeric value is required, and not
>         just an option as shown in the examples, then why doesn't
>         RFC2234 say "by numeric value" rather than "individually?")
>
>(3)     Section 3.4 of RFC 2234 shows that a range of numeric
>         values has an equivalent specification as individual characters.
>
>         DIGIT =  %x30-39
>         is equivalent to:
>         DIGIT =  "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9"
>
>         Therefore, one should be able to say that %x41-46 is
>         equivalent to "A" / "B" / "C" / "D" / "E" / "F"
>         and hence
>         HEXDIG         =  DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
>         is equivalent to
>         HEXDIG         =   %x30-39 / %x41-46
>
>On Tuesday 06 May 2003 4:06 am, Graham Klyne wrote:
> > At 18:33 05/05/2003 -0700, Rob Cameron wrote:
> > >(2)  The HEXDIG definition of RFC2234 is upper-case only;
> > >      it's probably not what is wanted.
> > >        escaped     = "%" HEXDIG HEXDIG
> >
> > I beg to disagree.
> >
> > From: http://www.ietf.org/rfc/rfc2234.txt
> >
> > [[
> >          HEXDIG         =  DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
> > ]]
> >
> > and
> >
> > [[
> > ABNF permits specifying literal text string directly, enclosed in
> >     quotation-marks.  Hence:
> >
> >          command     =  "command string"
> >
> >     Literal text strings are interpreted as a concatenated set of
> >     printable characters.
> >
> >          NOTE:     ABNF strings are case-insensitive and
> >                    the character set for these strings is us-ascii.
> >
> >     Hence:
> >
> >          rulename = "abc"
> >
> >     and:
> >
> >          rulename = "aBc"
> >
> >     will match "abc", "Abc", "aBc", "abC", "ABc", "aBC", "AbC" and "ABC".
> >
> >                  To specify a rule which IS case SENSITIVE,
> >                     specify the characters individually.
> > ...
> > ]]
> >
> > #g
> >
> >
> > -------------------
> > Graham Klyne
> > <GK@NineByNine.org>
> > PGP: 0FAA 69FF C083 000B A2E9  A131 01B9 1C7A DBCA CB5E
Received on Tuesday, 6 May 2003 19:08:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 January 2011 12:15:31 GMT