Re: draft-ietf-httpbis-p1-messaging-16 1.2.1 ABNF Extension: #rule – Invalid example?

On 2011-10-25 22:19, Håkan wrote:
> Hi.

Welcome to the Working Group.

> I'm new to all this, so I'm sorry if I'm not following protocol (not
> sure if I should open an Issue Ticket or start by mailing the group first)

Mailing to the list is the correct thing to do.

> I've found examples that do not add up in p1-messaging 1.2.1.  ABNF
> Extension: #rule
>
>  >   For compatibility with legacy list rules, recipients SHOULD accept
>  >   empty list elements.  In other words, consumers would follow the list
>  >   productions:
>  >
>  >     #element => [ ( "," / element ) *( OWS "," [ OWS element ] ) ]
>  >
>  >     1#element => *( "," OWS ) element *( OWS "," [ OWS element ] )
> ...
>  >  For example, given these ABNF productions:
>  >
>  >     example-list      = 1#example-list-elmt
>  >     example-list-elmt = token ; see Section 3.2.3
>  >
>  >   Then these are valid values for example-list (not including the
>  >   double quotes, which are present for delimitation only):
>  >
>  > "foo,bar"
>  > " foo ,bar,"
>  > "  foo , ,bar,charlie "
>  > "foo ,bar,   charlie "
>
> token is defined as 1*tchar and tchar is one character from a set of
> visible character. Since space is not a tchar, token cannot contain a space.

Yes.

> In the second example " foo, bar,", since token cannot contain spaces, I
> cant see how a space can be the first character. Given that I've read
> the ABNF correctly, the only allowable first character is "," or a
> tchar. The only way a space can come before token is if it's following a
> comma ",". So this would be valid: ", foo ,bar,"
> The same problem exists in example 3 as well,

No. SP isn't part of token, but it *is* part of OWS.

> ...

Best regards, Julian

Received on Wednesday, 26 October 2011 08:36:11 UTC