Re: [abnf-discuss] constrained-01 - advantage?

"Jonathan Hansford" <jonathan@hansfords.net> Mon, 14 November 2016 08:45 UTC

Return-Path: <jonathan@hansfords.net>
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 F411E129524 for <abnf-discuss@ietfa.amsl.com>; Mon, 14 Nov 2016 00:45:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=hansfords.net
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 eIRENqLilNaH for <abnf-discuss@ietfa.amsl.com>; Mon, 14 Nov 2016 00:45:45 -0800 (PST)
Received: from server.myfast.site (server.myfast.site [212.113.130.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4575B1293E3 for <abnf-discuss@ietf.org>; Mon, 14 Nov 2016 00:45:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hansfords.net; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:Subject:In-Reply-To:References:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=c1S8NpTOlqyT6hK7y82wNp8EPP3avf4VQHELaT2+yas=; b=LmOj2vVBrZCO+jwdag8VMuDX5U gRMHVM5MHuxFEEhsRAwQuOa3AfrJVasGooYDGoW5ABjdRNlUr00k/cg7FUPU9EMwFhtN4XOA+Zp7s 4E4hsRFNfm5lwNNZysjI8IYezZ3oeAgZ1KoLBM5OwkNpptGlVYXwj6yn/oUyQ2CAdOKVn0+vAArn1 KIuBLpREkP4Xu+UCplmvnt6c/pbPKXnI4Ox1HH/0jrKZZSRGJLR1HthqJ1RAoa8/o+BVm3/nom3Ll z//IJxSiPqKVx/F4ckFf5ZAoRTPeHIUaORkdPSKYdnYWBlvj7zoHj1PLsHg9vL2lzeYxV4GKxreuH DIALU4mQ==;
Received: from hansfords.plus.com ([84.92.116.209]:36538 helo=Vanguard) by server.myfast.site with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from <jonathan@hansfords.net>) id 1c6Cta-002uwT-U0; Mon, 14 Nov 2016 08:45:43 +0000
From: Jonathan Hansford <jonathan@hansfords.net>
To: 'Sean Leonard' <dev+ietf@seantek.com>, 'Doug Royer' <douglasroyer@gmail.com>
References: <5828DD42.8010009@gmail.com> <36FC0A35-2ADA-4710-ABFB-08E8B916718E@seantek.com> <58292EE9.2040308@gmail.com> <1A928BF2-22AB-4EA1-9DCD-58B6F646259F@seantek.com>
In-Reply-To: <1A928BF2-22AB-4EA1-9DCD-58B6F646259F@seantek.com>
Date: Mon, 14 Nov 2016 08:45:42 -0000
Message-ID: <017b01d23e53$7c13b640$743b22c0$@hansfords.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 15.0
Thread-Index: AQHYvXgeDBBsaRJVnswRsJVfT0lLzgLvVSEKARkfOaMB5DOsXqCbxCCw
Content-Language: en-gb
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - server.myfast.site
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - hansfords.net
X-Get-Message-Sender-Via: server.myfast.site: authenticated_id: jonathan@hansfords.net
X-Authenticated-Sender: server.myfast.site: jonathan@hansfords.net
Archived-At: <https://mailarchive.ietf.org/arch/msg/abnf-discuss/y1JIHGfxcUHlQ0L43Tv3qlVzHH8>
Cc: abnf-discuss@ietf.org
Subject: Re: [abnf-discuss] constrained-01 - advantage?
X-BeenThere: abnf-discuss@ietf.org
X-Mailman-Version: 2.1.17
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: <https://mailarchive.ietf.org/arch/browse/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>
X-List-Received-Date: Mon, 14 Nov 2016 08:45:48 -0000

Re the formality of ABNF, we use it to help enforce naming conventions for system management (which, with multiple naming conventions from various vendors and standards impacting on a single name, is why this is of interest). The less ambiguity the better, otherwise we will have to develop our own "ABNF" to more formally capture what is presented in RFCs.

Jonathan

> -----Original Message-----
> From: abnf-discuss [mailto:abnf-discuss-bounces@ietf.org] On Behalf Of
> Sean Leonard
> Sent: 14 November 2016 04:46
> To: Doug Royer <douglasroyer@gmail.com>
> Cc: abnf-discuss@ietf.org
> Subject: Re: [abnf-discuss] constrained-01 - advantage?
> 
> 
> > On Nov 14, 2016, at 12:26 PM, Doug Royer <douglasroyer@gmail.com>
> wrote:
> >
> > On 11/13/2016 04:21 PM, Sean Leonard wrote:
> >
> >>> …
> >>
> >> Well:
> >>
> >>> resent-field    = "Resent-" field-name ":" unstructured CRLF
> >>
> >>
> >> Is simpler than:
> >>
> >>> resent-field  = resent-unstructured / resent-date / resent-from / resent-
> sender / ...
> >>
> >>
> >> First of all, it looks simpler, because it is.
> >>
> >> Second of all, <resent-date>, <resent-from>, <resent-sender> etc. are all
> “subsumed” in <resent-unstructured>, leading to an intentionally ambiguous
> grammar. The problem with the existing way of writing things out, is that the
> former are all superfluous when the latter is present. Another way to write it
> tends to be:
> >>
> >>  field = date / from / sender / … / extension-field
> >>
> >>  extension-field = field-name ":" unstructured CRLF
> >>
> >> Well it makes perfect sense when you read it, of course,
> > > but when a computer / parser parses productions, every <date> is
> > > going to match with <extension-field> as well. The point being
> > > <extension-field> is not really doing what you think it’s doing in ABNF:
> > > it’s really <any-and-every-field>.
> > > ...
> >> There is nothing “wrong” with creating an ambiguous grammar,
> > > but it can lead to subtle parsing errors if you are not careful.
> > > Usually ambiguous grammars are undesirable because you want your
> > > code to go down one, and only one, path. An automated ABNF validator
> > > should be able to detect ambiguous grammars and inform you about
> that.
> >
> > If your talking about replacing ABNF with new syntax. then I would agree.
> To a person reading the ABNF, they mean the same thing.
> > At no point is one path more important than another.
> >
> > Unless you deprecate the old method, its not going to help.
> > Because people will use which ever makes sense to them.
> 
> I suppose that deprecating the old method would be something on the table
> to discuss. I believe it is desirable to avoid ambiguous grammars. At the same
> time, a sufficiently sophisticated tool could be written to identify these sorts
> of cases (of intentionally ambiguous grammars for parameterized names and
> values).
> 
> > Is the goal of this draft to make all future ABNF in RFC's parsable by a
> computer program? To mandate it?  I did not understand that after reading
> the draft.
> >
> > If this keeps going, it will be a new ASN.1
> 
> We don’t want that. But the idea of “Table Constraints” is an ASN.1 term. (It
> is also a SQL concept, because, surprise, it’s about constraining data to tables
> of values.)
> 
> One thing is that none of the drafts that are being proposed change the
> context-free nature of ABNF.
> 
> I would say that a goal is that ABNF in RFCs should be easy to validate, and
> this would include by means of computer programs. This increases document
> quality. I recognize that there is a spectrum of views around here about how
> “formal” ABNF ought to be.
> 
> Regards,
> 
> Sean
> 
> _______________________________________________
> abnf-discuss mailing list
> abnf-discuss@ietf.org
> https://www.ietf.org/mailman/listinfo/abnf-discuss