ABNF switch: list rules

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 UTC