Re: Syntax Issues/Experience with RFC2396bis and abnf2re

> 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/

You mean the example parser.  Someone should ask Harald to fix it.

> (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?")

Because there is no other way to specify a character individually.
The string syntax doesn't just specify the character, it also specifies
that it is case-insensitive and ASCII.  The ABNF for the ABNF specifies
char-val independent of the number of characters inside the string.

> (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"

It does not refer to those as individual characters.

> 	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

I do not agree with that conclusion.  If the authors had intended to
specify it as case-sensitive, then they would have specified it using
a numeric range and not as quoted character strings.  A mechanical
interpretation of the ABNF syntax cannot choose whether they are
case-sensitive or -insensitive based on the length of the string.

....Roy

Received on Tuesday, 6 May 2003 19:30:39 UTC