X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Delivered-To: barryleiba.mailing.lists@gmail.com
Received: by 10.58.106.73 with SMTP id gs9csp579139veb;
        Mon, 7 Jul 2014 07:57:36 -0700 (PDT)
X-Received: by 10.67.23.227 with SMTP id id3mr28714510pad.45.1404745055986;
        Mon, 07 Jul 2014 07:57:35 -0700 (PDT)
Return-Path: <abnf-discuss-bounces@ietf.org>
Received: from mail.ietf.org (mail.ietf.org. [2001:1900:3001:11::2c])
        by mx.google.com with ESMTPS id aa10si813693pac.16.2014.07.07.07.57.35
        for <multiple recipients>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 07 Jul 2014 07:57:35 -0700 (PDT)
Received-SPF: pass (google.com: domain of abnf-discuss-bounces@ietf.org designates 2001:1900:3001:11::2c as permitted sender) client-ip=2001:1900:3001:11::2c;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of abnf-discuss-bounces@ietf.org designates 2001:1900:3001:11::2c as permitted sender) smtp.mail=abnf-discuss-bounces@ietf.org;
       dkim=pass header.i=@ietf.org
Received: from ietfa.amsl.com (localhost [IPv6:::1])
	by ietfa.amsl.com (Postfix) with ESMTP id 0A1F21A020B;
	Mon,  7 Jul 2014 07:57:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1;
	t=1404745055; bh=Ow4ZO4gj4HNGnU1H+TsgE5tbOc0RQlsCOTJLXw+YaN8=;
	h=Message-ID:Date:From:MIME-Version:To:Subject:List-Id:
	 List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
	 Content-Transfer-Encoding:Content-Type:Sender;
	b=upaFgN3Sf6WBxJ2rTh5l5nTD83bpFsOClszCXLu9JHpvBFZO9MI+i9OfTtnEfWJN9
	 dTt9D/kD/f6GWgRvWnX5av9IQbmeAm1TkDxhbAy9ZAN+AJJp2dwBt+t0pFdEoyWIlV
	 FmBj4R7qu/n8oOV/O9ZdfsWOXuMpRgb4sUl7darM=
X-Original-To: abnf-discuss@ietfa.amsl.com
Delivered-To: abnf-discuss@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1])
 by ietfa.amsl.com (Postfix) with ESMTP id 52DB91A01F1
 for <abnf-discuss@ietfa.amsl.com>; Mon,  7 Jul 2014 07:57:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.235
X-Spam-Level: 
X-Spam-Status: No, score=-1.235 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 SPF_SOFTFAIL=0.665] autolearn=no
Received: from mail.ietf.org ([4.31.198.44])
 by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 78eqkkc1yQn2 for <abnf-discuss@ietfa.amsl.com>;
 Mon,  7 Jul 2014 07:57:31 -0700 (PDT)
Received: from qmta01.westchester.pa.mail.comcast.net
 (qmta01.westchester.pa.mail.comcast.net [IPv6:2001:558:fe14:43:76:96:62:16])
 by ietfa.amsl.com (Postfix) with ESMTP id EC12A1A01E1
 for <abnf-discuss@ietf.org>; Mon,  7 Jul 2014 07:57:30 -0700 (PDT)
Received: from omta17.westchester.pa.mail.comcast.net ([76.96.62.89])
 by qmta01.westchester.pa.mail.comcast.net with comcast
 id PQe51o0031vXlb851SxWs3; Mon, 07 Jul 2014 14:57:30 +0000
Received: from Paul-Kyzivats-MacBook-Pro.local ([50.138.229.164])
 by omta17.westchester.pa.mail.comcast.net with comcast
 id PSxW1o0093ZTu2S3dSxWY4; Mon, 07 Jul 2014 14:57:30 +0000
Message-ID: <53BAB55A.2090008@alum.mit.edu>
Date: Mon, 07 Jul 2014 10:57:30 -0400
From: Paul Kyzivat <pkyzivat@alum.mit.edu>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7;
 rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version: 1.0
To: "abnf-discuss@ietf.org" <abnf-discuss@ietf.org>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;
 s=q20140121; t=1404745050;
 bh=CPovMtQF72KsBOXUcXJjZkB8d4sS/b1rsa+7aMBrrSw=;
 h=Received:Received:Message-ID:Date:From:MIME-Version:To:Subject:
 Content-Type;
 b=SR5hafsb5zp+tmS/tX3obDf8oxzT1GPoFD56yOfjAPD6C74qrZQ+M+jlsK+vBY2s+
 jeXB5VXHdYeZNBxPzdv93OYJARgmY/4VDXP4Ed96FfTU/GN/yfTvwd4Ggeqe4bbyiB
 JLSVwsObLyNNVb9n2WjltT6qNStpz5lScIaFawUyinglbh2aoWR2yzQ9jpyIrp8/rN
 lyrr3RgfWAlge+RQYRCNCP66CVwmEzyNO+KE4Rg71JYAlQliqAkbmB9TAH5mTGY6oy
 jhDL4NyiUbaG2r9GI3ZDHoercE/qAR50q0RS2mB54c1UcaeSO+yM+8DbS1SHbhfxHl
 sqIRYQCMB/0sQ==
Archived-At: http://mailarchive.ietf.org/arch/msg/abnf-discuss/AMFq9rAApXwa_NIYK4ElH2-NlyY
Subject: [abnf-discuss] defining "compatible" extensions
X-BeenThere: abnf-discuss@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "General discussion about tools,
 activities and capabilities involving the ABNF meta-language"
 <abnf-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/abnf-discuss>,
 <mailto:abnf-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/abnf-discuss/>
List-Post: <mailto:abnf-discuss@ietf.org>
List-Help: <mailto:abnf-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/abnf-discuss>,
 <mailto:abnf-discuss-request@ietf.org?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: abnf-discuss-bounces@ietf.org
Sender: "abnf-discuss" <abnf-discuss-bounces@ietf.org>

I've been bothered by something for a long time. Now it has come up 
again in the context of rfc4566bis (mmusic).

The question is how best to define an extensible syntax, and then later 
define corresponding extensions.

I'll give a couple of examples:

RFC4566 defines:

    attribute-fields =    *(%x61 "=" attribute CRLF)
    attribute =           (att-field ":" att-value) / att-field
    att-field =           token
    att-value =           byte-string

It defines an iana registry for attributes, keyed by <att-field> tokens.
Those implementing SDP are required to ignore any attributes they don't 
understand/support.

RFC4566 also defines a number of attributes. It does not provide ABNF 
for them - it defines the syntax informally. That is something I've 
proposed to fix in 4566bis, and is driving this query.

Many new attributes have been defined (in separate RFCs) since the 
publication of RFC4566, using a variety of techniques. A popular one is 
to define new ones as:

    attribute /= new-att
    new-att = "new-att-name:" new-att-value
    new-att-value = some-abnf

To be valid, the definition of <new-att-value> then needs to be 
"compatible" with the definition of <att-value>. But there is no way to 
indicate this formally in the abnf.

SIP approached this differently. It has:

    message-header  =  (Accept
                    /  Accept-Encoding
    ...
                    /  WWW-Authenticate
                    /  extension-header) CRLF

    extension-header  =  header-name HCOLON header-value
    header-name       =  token
    header-value      =  *(TEXT-UTF8char / UTF8-CONT / LWS)

    Accept            =  "Accept" HCOLON
                       [ accept-range *(COMMA accept-range) ]

RFC6086 gives an example of an extension header defined elsewhere:

    message-header      =/ (Info-Package / Recv-Info) CRLF
    Info-Package        =  "Info-Package" HCOLON Info-package-type
    Recv-Info           =  "Recv-Info" HCOLON [Info-package-list]
    Info-package-list   =  Info-package-type *( COMMA Info-package-type )
    Info-package-type   =  Info-package-name *( SEMI Info-package-param )
    Info-package-name   =  token
    Info-package-param  =  generic-param

Again, the definitions of <Info-Package> and <Recv-Info> must also be 
*compatible* with <extension-header>. But there is nothing in the ABNF 
that says this.

(Note: I had to hunt extensively to find an extension that was defined 
this cleanly. Most of them, even more recent ones, aren't this clean. 
And somehow they slipped by me, who cares about such things, even while 
I was chair of sipcore.)

I don't think that ABNF *must* solve this problem, but I can imagine 
extensions to ABNF that would *help* with this. Or else, recommendations 
of how to approach this.

The key thing is that an extension definition needs to satisfy *two* 
ABNF rules. For instance, above we need that both of the following be true:

    new-att = "new-att-name:" new-att-value
    new-att = (att-field ":" att-value) / att-field

I have brought this issue up previously wrt 4566, and have seen 
conflicting opinions on the best way to deal with this. But this problem 
isn't really unique to RFC4566 or mmusic, or RAI. It is a general issue.

I welcome your thoughts.

	Thanks,
	Paul

_______________________________________________
abnf-discuss mailing list
abnf-discuss@ietf.org
https://www.ietf.org/mailman/listinfo/abnf-discuss

