X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Delivered-To: barryleiba.mailing.lists@gmail.com
Received: by 10.59.3.41 with SMTP id bt9csp137512ved;
        Wed, 2 Jan 2013 08:55:18 -0800 (PST)
X-Received: by 10.69.16.100 with SMTP id fv4mr144782822pbd.135.1357145717858;
        Wed, 02 Jan 2013 08:55:17 -0800 (PST)
Return-Path: <abnf-discuss-bounces@ietf.org>
Received: from mail.ietf.org (mail.ietf.org. [2001:1890:126c::1:1e])
        by mx.google.com with ESMTP id j9si5095444pav.184.2013.01.02.08.55.17;
        Wed, 02 Jan 2013 08:55:17 -0800 (PST)
Received-SPF: pass (google.com: domain of abnf-discuss-bounces@ietf.org designates 2001:1890:126c::1:1e as permitted sender) client-ip=2001:1890:126c::1:1e;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of abnf-discuss-bounces@ietf.org designates 2001:1890:126c::1:1e as permitted sender) smtp.mail=abnf-discuss-bounces@ietf.org; dkim=pass (test mode) header.i=@ietf.org
Received: from ietfa.amsl.com (localhost [127.0.0.1])
	by ietfa.amsl.com (Postfix) with ESMTP id 534DA21F84D8;
	Wed,  2 Jan 2013 08:55:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1;
	t=1357145702; bh=vlrmYub54ZmYvn47Ex3cqfQsI4szNtl1sym3fbENkUY=;
	h=Message-ID:Date:From:MIME-Version:To:References:In-Reply-To:Cc:
	 Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:
	 List-Subscribe:Content-Transfer-Encoding:Content-Type:Sender;
	b=AeiGblfiK63Nr38CmzSAPpmi7J7iZYhEHbpnJh/wUcg+k7qALzjKK89J1gk/DP/nG
	 Hi/PhoyIlPokjoEYZdHZFerTIERGayoHxt0L7eqxIWQqFJOs35slsJXEhtLOR1rhU5
	 mGrEcAxmR13bL+V8NunuqfAA21aWb78nDlA/DgL0=
X-Original-To: abnf-discuss@ietfa.amsl.com
Delivered-To: abnf-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1])
	by ietfa.amsl.com (Postfix) with ESMTP id A94D121F8413
	for <abnf-discuss@ietfa.amsl.com>; Wed,  2 Jan 2013 08:55:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.396
X-Spam-Level: 
X-Spam-Status: No, score=-0.396 tagged_above=-999 required=5 tests=[AWL=0.041, 
	BAYES_00=-2.599, FH_RELAY_NODNS=1.451, HELO_MISMATCH_NET=0.611, 
	RDNS_NONE=0.1]
Received: from mail.ietf.org ([64.170.98.30])
	by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id gv9msEKIBIpW for <abnf-discuss@ietfa.amsl.com>;
	Wed,  2 Jan 2013 08:55:01 -0800 (PST)
Received: from qmta02.westchester.pa.mail.comcast.net
	(qmta02.westchester.pa.mail.comcast.net
	[IPv6:2001:558:fe14:43:76:96:62:24])
	by ietfa.amsl.com (Postfix) with ESMTP id E464D21F8201
	for <abnf-discuss@ietf.org>; Wed,  2 Jan 2013 08:55:00 -0800 (PST)
Received: from omta10.westchester.pa.mail.comcast.net ([76.96.62.28])
	by qmta02.westchester.pa.mail.comcast.net with comcast
	id iztP1k0010cZkys514v0St; Wed, 02 Jan 2013 16:55:00 +0000
Received: from Paul-Kyzivats-MacBook-Pro.local ([50.138.229.164])
	by omta10.westchester.pa.mail.comcast.net with comcast
	id j4uz1k0153ZTu2S3W4uzHt; Wed, 02 Jan 2013 16:55:00 +0000
Message-ID: <50E46663.4080506@alum.mit.edu>
Date: Wed, 02 Jan 2013 11:54:59 -0500
From: Paul Kyzivat <pkyzivat@alum.mit.edu>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7;
	rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
To: Dave Crocker <dcrocker@gmail.com>
References: <50DCD850.3020106@alum.mit.edu>
	<alpine.LSU.2.00.1301021022570.15409@hermes-1.csi.cam.ac.uk>
	<50E45623.9060607@gmail.com>
	<alpine.LSU.2.00.1301021552190.15409@hermes-1.csi.cam.ac.uk>
	<50E45B21.20509@gmail.com>
	<alpine.LSU.2.00.1301021611070.15409@hermes-1.csi.cam.ac.uk>
	<50E460D0.1020308@gmail.com>
In-Reply-To: <50E460D0.1020308@gmail.com>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;
	s=q20121106; t=1357145700;
	bh=TUAjyTdxGFcUZBxVN7Fj1lMAKKyBmI34AANrqOhzYbw=;
	h=Received:Received:Message-ID:Date:From:MIME-Version:To:Subject:
	Content-Type;
	b=UkwBO0QdWpMG8X3AGfhYlULaSIf2fIsB/+uPr+WnE5cJqyiSxSrVDqOiZ10wYoOwU
	yp9x3hTWS7I31Lmve1VgiMKq2R1B0uh3bRelxA+wZzUjAJNXUXu1BL0yCJrqco0cyR
	4uhBFAWFR3SIX3A9nRNZcGdfhIooRQNzRiY5FXGCdZapn/BpHGGrmlVm/OEnYdWibi
	5fjnZyzON1n5dulnSIom0uy0mP3l/21PbHW+f9Kdues4/9lyunzwtBTyzAHG4I7bPO
	4vkFOQv5gPT8F2YgdgdiCeMy3SSgGJ1ne2FxEh6Bmaa2b//I2FmWaH+nMCrr8UznhQ
	358we9y17Li8Q==
Cc: Tony Finch <dot@dotat.at>, abnf-discuss@ietf.org
Subject: Re: [abnf-discuss] Some thoughts about how to make ABNF more
 convenient to use
X-BeenThere: abnf-discuss@ietf.org
X-Mailman-Version: 2.1.12
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"
Sender: abnf-discuss-bounces@ietf.org
Errors-To: abnf-discuss-bounces@ietf.org

I've been working on a proposal for enhancements for importing, and for 
namespaces. IMO you must have namespaces if you are to have importing, 
to avoid clashes between definitions in independently developed rule 
sets that are slightly linked.

My initial mail was to size up the interest, and flush out what has 
already been considered, before finalizing my thinking. Discovering that 
tagging for the ABNF is already supported is a real plus.

Regarding different "languages" in the same document:

Namespaces could help, but IMO are less urgent in this case. It should 
be easy to keep the grammars from clashing on rule names, and quite 
likely that they will share rules.

ISTM that the when defining "languages" via ABNF the key is to identify 
the top level rule that is the goal for a particular language. If there 
are several languages, then each will have a particular goal rule. An 
obvious example of this is when ABNF is used to define messages. If 
there are several messages, then there will be a goal rule for each. 
These may share a bunch of sub-rules.

If someone is building a parser, and is only needs support for one goal 
rule, then it is relatively trivial to prune out any rules that are not 
needed to support that one. If a document has multiple independent 
language definitions, then it should be clear when parsing the ABNF that 
there are totally independent trees of rules that don't interact with 
one another.

Of course namespaces will make it easier to construct disjoint rulesets 
within a document, if that is the intent.

	Thanks,
	Paul

On 1/2/13 11:31 AM, Dave Crocker wrote:
>
>
> On 1/2/2013 8:24 AM, Tony Finch wrote:
>> Dave Crocker <dcrocker@gmail.com> wrote:
>>> On 1/2/2013 7:57 AM, Tony Finch wrote:
>>>> Dave Crocker <dcrocker@gmail.com> wrote:
>>>>>
>>>>> It would need to be able to distinguish among potentially
>>>>> independent sets of rules, within a spec. We don't currently have a
>>>>> way to indicate that.
>>>>
>>>> Has there ever been any need for it?
>>>
>>> Well, ummm, RFC822 had several parsers, such as for addresses versus
>>> dates
>>> versus free-form like Subject.  Applications often need this, I believe.
>>
>> Hmm, well I would describe those as sub-languages whereas I thought we
>> were talking about independent languages. But in both cases they can be
>> defined / identified using the transitive closure from the starting rule,
>> without revising ABNF.
>
> I don't think so.  The parsing rules for a date field are quite
> different than for an an address field, in 822.  They share some lexical
> constructs, of course, but I don't find that very significant for the
> current topic.
>
>
>> I can see that rule sets might be useful for importing collections of
>> low-level rules, like the ABNF core rules.
>
> The choice, here, is between a formally flat namespace versus one that
> is formally able to be partitioned.  Simplicity is the major benefit of
> the first, of course.  Rigor and the ability to enforce the package
> boundaries that are actually present are the benefits of the latter.
>
>
>>> What I don't know is whether there will be the community will to
>>> pursue it --
>>> will we see enough operational benefit?
>>
>> I think a formal import mechanism would be very useful and could be quite
>> easy to deploy. Adding namespaces will be a lot of work.
>
> ack.
>
> Given the effort to make /any/ changes to a package like abnf, I thought
> it worth raising the additional issue, since it seemed to develop pretty
> naturally from the thread.  But again, I don't have any idea whether
> anyone else thinks it's worth pursuing...
>
> d/

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

