RE: Collected ABNF for HTTPbis

Bjoern Hoehrmann wrote:
> Brian Smith wrote:
> >As Julian said before, the collected ABNF exists in order to desugar
> > the "#X" ABNF extension into true ABNF syntax. AFAICT, that isn't
> > necessary since ABNF processing tools seem to handle the extension
> > anyway. But, also, the "#X" extension is not really a huge
> > readability advantage. Every usage of "#X" is easily replaced with
> > X (COMMA-ows X)* where COMMA-ows is just "OWS COMMA OWS". That
> > doesn't justify the extra complication. Just desugar all
> > the inline productions, remove the #X extension, remove the collected
> > ABNF.
> 
> As for the suggestions above, the expansion you give is incorrect as
> it fails to account for empty items in lists

There are only four places that allow empty lists, and they are all of the
same form as "TE":

     TE        = "TE" ":" OWS TE-v
     TE-v      = #t-codings

They all can be rewritten using that expansion:
     
     TE        = "TE" ":" OWS [TE-v]
     TE-v      = t-codings (COMMA-ows t-codings)*

Every other use is of the form 1#rule.

> and there is little evidence of widespread support for the
> list syntax, for example, Chris Newman's abnf.c, bap, abnfgen, and my
> own Parse::ABNF Perl module do not support it out of the box.

All the more reason to get rid of it.

Regards,
Brian

Received on Monday, 18 May 2009 02:21:12 UTC