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

Sean Leonard <dev+ietf@seantek.com> Tue, 15 November 2016 04:51 UTC

Return-Path: <dev+ietf@seantek.com>
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 2E7981298C4 for <abnf-discuss@ietfa.amsl.com>; Mon, 14 Nov 2016 20:51:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.601
X-Spam-Level:
X-Spam-Status: No, score=-2.601 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001] autolearn=ham autolearn_force=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 KTbUTXm1yYwX for <abnf-discuss@ietfa.amsl.com>; Mon, 14 Nov 2016 20:51:37 -0800 (PST)
Received: from mxout-07.mxes.net (mxout-07.mxes.net [216.86.168.182]) (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 38C881295A0 for <abnf-discuss@ietf.org>; Mon, 14 Nov 2016 20:51:37 -0800 (PST)
Received: from dhcp-898b.meeting.ietf.org (unknown [31.133.137.139]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id C6CCC22E1F3; Mon, 14 Nov 2016 23:51:29 -0500 (EST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Sean Leonard <dev+ietf@seantek.com>
In-Reply-To: <017b01d23e53$7c13b640$743b22c0$@hansfords.net>
Date: Tue, 15 Nov 2016 13:51:26 +0900
Content-Transfer-Encoding: quoted-printable
Message-Id: <8554FBCB-D327-4398-AAE0-DBD513B1FD1D@seantek.com>
References: <5828DD42.8010009@gmail.com> <36FC0A35-2ADA-4710-ABFB-08E8B916718E@seantek.com> <58292EE9.2040308@gmail.com> <1A928BF2-22AB-4EA1-9DCD-58B6F646259F@seantek.com> <017b01d23e53$7c13b640$743b22c0$@hansfords.net>
To: Jonathan Hansford <jonathan@hansfords.net>
X-Mailer: Apple Mail (2.3124)
Archived-At: <https://mailarchive.ietf.org/arch/msg/abnf-discuss/V9AxOPmKqSERlgbQXrIARnULFKg>
Cc: Doug Royer <douglasroyer@gmail.com>, 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: Tue, 15 Nov 2016 04:51:39 -0000

Can you elaborate on your request or concern? Is this about ABNF rule names, or something else?

Thanks!

Sean

> On Nov 14, 2016, at 5:45 PM, Jonathan Hansford <jonathan@hansfords.net> wrote:
> 
> 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
>