[art] ABNF vs. ABNF vs. BNF

Dave Crocker <dhc@dcrocker.net> Mon, 29 March 2021 13:29 UTC

Return-Path: <dhc@dcrocker.net>
X-Original-To: art@ietfa.amsl.com
Delivered-To: art@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 67D573A1254 for <art@ietfa.amsl.com>; Mon, 29 Mar 2021 06:29:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=dcrocker.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 c4V_xxDWf59T for <art@ietfa.amsl.com>; Mon, 29 Mar 2021 06:29:33 -0700 (PDT)
Received: from butterfly.birch.relay.mailchannels.net (butterfly.birch.relay.mailchannels.net [23.83.209.27]) (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 4BA8C3A124E for <art@ietf.org>; Mon, 29 Mar 2021 06:29:31 -0700 (PDT)
X-Sender-Id: hostingeremail|x-authsender|dhc@dcrocker.net
Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 312707029D4 for <art@ietf.org>; Mon, 29 Mar 2021 13:29:30 +0000 (UTC)
Received: from nl-srv-smtpout3.hostinger.io (100-105-161-106.trex.outbound.svc.cluster.local [100.105.161.106]) (Authenticated sender: hostingeremail) by relay.mailchannels.net (Postfix) with ESMTPA id 4C5A0702F4F for <art@ietf.org>; Mon, 29 Mar 2021 13:29:27 +0000 (UTC)
X-Sender-Id: hostingeremail|x-authsender|dhc@dcrocker.net
Received: from nl-srv-smtpout3.hostinger.io ([UNAVAILABLE]. [145.14.159.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256) by 100.105.161.106 (trex/6.1.1); Mon, 29 Mar 2021 13:29:30 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: hostingeremail|x-authsender|dhc@dcrocker.net
X-MailChannels-Auth-Id: hostingeremail
X-Bubble-Gusty: 2c164a2c395e96f5_1617024569962_441376739
X-MC-Loop-Signature: 1617024569962:1090943624
X-MC-Ingress-Time: 1617024569961
Received: from [192.168.0.109] (108-226-162-63.lightspeed.sntcca.sbcglobal.net [108.226.162.63]) (Authenticated sender: dhc@dcrocker.net) by nl-srv-smtpout3.hostinger.io (smtp.hostinger.com) with ESMTPSA id 5B2B53125D80 for <art@ietf.org>; Mon, 29 Mar 2021 13:29:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dcrocker.net; s=hostingermail-a; t=1617024565; bh=zn7+0dsGLrCEMaIjvbUXCjE+6V9M0JDkCPzkKuRPaKg=; h=To:From:Subject:Reply-To:Date; b=T8zljPhT6LZK2dbp7K3JbV/b9gIP8i8BePktzraQ77rcZmJxZsTqEjp27WM4DfJE0 byzbeHG3wyLOim4i/IBrTq2EyJjn2qgJigqlZoHNSYAYaNcQGuWp7Yb11NKUw7FxJU no9qsggnRwWHQfBY6LXG9ELlLScfS3kenuGhL8NlL74oBGk/KdmVnxJOtk1xTClpEw sk3o3vW9tr1xeren8N19MyR2qYIoBBKWkquSncPSgYMmVsYlCB50DVB23ARU7N/T9V 9D/nJjlrUpV8egD7GU4Dk1Uf0X19KY3ZRVOwBDs2M7MvXiqK73uIJqDJfTUfQ6+SuA Uypx2LotN8mPA==
To: art@ietf.org
From: Dave Crocker <dhc@dcrocker.net>
Reply-To: dcrocker@bbiw.net
Organization: Brandenburg InternetWorking
Message-ID: <d59bd38e-3cad-ca76-bb7c-dab4bb8ef5fb@dcrocker.net>
Date: Mon, 29 Mar 2021 06:29:21 -0700
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="------------1D05A60F36F1C3F38545E8AE"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/art/unAanN7qQJBuF8y056KFiLUkQaI>
Subject: [art] ABNF vs. ABNF vs. BNF
X-BeenThere: art@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Applications and Real-Time Area Discussion <art.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/art>, <mailto:art-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/art/>
List-Post: <mailto:art@ietf.org>
List-Help: <mailto:art-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/art>, <mailto:art-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 29 Mar 2021 13:29:38 -0000

https://trac.ietf.org/trac/art/wiki/TypicalARTAreaIssues:

>
>     ABNF and BNF
>
> Although the majority of specifications use ABNF (RFC 5234 
> <http://tools.ietf.org/html/rfc5234>), there are many exceptions. Some 
> older email and web specifications use BNF as specified in RFC 822 
> <http://tools.ietf.org/html/rfc822> (or similar). The latter allows 
> for free insertion of folding whitespaces between different BNF 
> productions. So it is very important to state which version of BNF is 
> used.
>

There's a bit of a nomenclature challenge, here.

The reference to RFC 822 needs to be ABNF, also.

ABNF was first created in RFC 733 and I believe the RFC 822 version made 
no significant changes. (A quick comparison of the two documents, 
covering it, does show that I played around with the text.  But I don't 
recall any substantive changes.)

Backus-Naur Form (BNF)(*) was a popular tool in doing syntax 
specifications, but in its pure form it was cumbersome.

By the mid-1970s, it was common for documents using it to create a 
tailored version,  which is what we did for RFC 733.  For the most part, 
this was a classic exercise of balancing expressive power with human 
factors usability.  I'd like to claim that the variant we produced 
became popular as a result of our deep understanding of the right 
balance, but we weren't nearly that knowledgeable or diligent, just lucky.

Anyhow, the wiki entry is making a useful distinction between versions, 
but it needs better labeling. I think there is no established naming 
convention for the versions, so we need to create one.  Lacking any 
creativity, I'll suggest:

ABNF and BNF

Although the majority of specifications use ABNF-5234 (RFC 5234), there 
are many exceptions. Some older email and web specifications use 
ABNF-822 (RFC 822, or similar). The latter allows for free insertion of 
folding whitespaces between different BNF productions. So it is very 
important to state which version of BNF is used.


I hadn't known about RFC5511, written by an old dog, for routing.  I 
vaguely recall there are others.  This suggests that it might be good 
for the text here to acknowledge a larger world of BNF-derivatives?

d/



(*) https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form

-- 
Dave Crocker
Brandenburg InternetWorking
bbiw.net