[Json] Are the Core Rules (Appendix B.1 of RFC 5234) always present in an ABNF spec?

Carsten Bormann <cabo@tzi.org> Wed, 20 September 2023 15:20 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 723B5C15108F; Wed, 20 Sep 2023 08:20:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.894
X-Spam-Level:
X-Spam-Status: No, score=-1.894 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 86VZFFNEODqX; Wed, 20 Sep 2023 08:20:45 -0700 (PDT)
Received: from smtp.zfn.uni-bremen.de (smtp.zfn.uni-bremen.de [134.102.50.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EA5B7C14CE4A; Wed, 20 Sep 2023 08:20:44 -0700 (PDT)
Received: from [192.168.217.124] (p548dc15c.dip0.t-ipconnect.de [84.141.193.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4RrMfz0l2rzDCgd; Wed, 20 Sep 2023 17:20:42 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
Date: Wed, 20 Sep 2023 17:20:42 +0200
Cc: json@ietf.org
X-Mao-Original-Outgoing-Id: 716916042.042348-4a4fd80b69b1693eaaab8fbf340ca8e5
Content-Transfer-Encoding: quoted-printable
Message-Id: <A9C3993F-D73B-4529-A94B-A6A33589726E@tzi.org>
To: "abnf-discuss@ietf.org" <abnf-discuss@ietf.org>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/3bCxavlvm4ZG5tNrrd911G8H2Rk>
Subject: [Json] Are the Core Rules (Appendix B.1 of RFC 5234) always present in an ABNF spec?
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Sep 2023 15:20:51 -0000

Please see:

Archived-At: <https://mailarchive.ietf.org/arch/msg/json/BDjQVBx5wD7cXerCT-KoWj1o9CU>
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/9PVg5mgaHseQ2e6X_jey3XeH1-4>

The problem here is that RFC 8259 seems to (implicitly) import “DIGIT" and “HEXDIG" from RFC 5234 Appendix B.1, but also defines a rule “char”, which conflicts with “CHAR” in Appendix B.1 (rule names are case-insensitive per Section 2.1 of RFC 5234).

Is this a bug in 8259?

And, if yes, is that bug that “char” and “CHAR” conflict (i.e., because B.1 is always implicitly imported), or that 8259 forgets to import DIGIT and HEXDIG (i.e., because B.1 is not implicitly imported)?

I know there are tons of ABNF out there that doesn’t get this right, so I’m also interested in a way forward that allows us to de-soupify ABNF (RFC 9431), while also offering a clear interpretation of what is already there.

Grüße, Carsten