W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2008

Re: ABNF switch: list rules

From: Alexey Melnikov <alexey.melnikov@isode.com>
Date: Thu, 22 May 2008 16:59:16 +0400
Message-ID: <48356E24.40604@isode.com>
To: Julian Reschke <julian.reschke@gmx.de>
CC: HTTP Working Group <ietf-http-wg@w3.org>

Julian Reschke wrote:
> Hi.
Hi Julian,
> We (well, I) haven't made big progress with respect to switching the 
> BNF syntax to standard ABNF format, as defined by RFC 5234.
>
> Reminder: after having cleaned up the existing BNF productions, the 
> remaining issues are:
>
> 1) "/" instead of "|"
> 2) implicit LWS
> 3) the list rule ("#")
>
> As far as I recall, we discussed 3) in Vancouver, and consensus was 
> not to keep the list rule 
> (<http://tools.ietf.org/wg/httpbis/minutes?item=minutes70.html>).
>
> Let's take an example, such as Accept-Charset:
>
>   Accept-Charset = "Accept-Charset" ":"
>           1#( ( charset | "*" ) [ ";" "q" "=" qvalue ] )
>
> (<http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p3-payload-02.html#rfc.section.6.2>) 
>
>
> A mechanical translation would yield:
>
>   Accept-Charset = "Accept-Charset" ":"
>                  ( *LWS ( charset / "*" ) [ ";q=" qvalue ]
>                 *( *LWS "," *LWS ( charset / "*" ) [ ";q=" qvalue ] ) )
>
> (hopefully).
>
> This is not very readable.
>
> What we could do is introduce additional productions to enhance 
> readability, such as in:
>
>   AC-f = ( ( charset | "*" )[ ";" "q" "=" qvalue ] )
>   AC-e = *LWS AC-f
>
>   Accept-Charset = "Accept-Charset" ":" AC-e *( *LWS "," AC-e )
I vaguely remember there was a proposal to define something like
 COLONLWS = ":" *LWS

which might make this slightly more readable.
But otherwise this looks reasonable to me.
> Feedback appreciated...
Received on Thursday, 22 May 2008 12:58:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:50:48 GMT