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

ABNF switch: list rules

From: Julian Reschke <julian.reschke@gmx.de>
Date: Thu, 22 May 2008 14:46:45 +0200
Message-ID: <48356B35.8020907@gmx.de>
To: HTTP Working Group <ietf-http-wg@w3.org>

Hi.

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 )


Feedback appreciated...

Julian
Received on Thursday, 22 May 2008 12:47:36 GMT

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