[Cbor] Re: Consensus call on EDN literals single ABNF

Pete Resnick <resnick@episteme.net> Thu, 25 July 2024 20:05 UTC

Return-Path: <resnick@episteme.net>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F1CA0C1D8768 for <cbor@ietfa.amsl.com>; Thu, 25 Jul 2024 13:05:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.107
X-Spam-Level:
X-Spam-Status: No, score=-7.107 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, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=episteme.net
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 TvC-b5-ZO4Nm for <cbor@ietfa.amsl.com>; Thu, 25 Jul 2024 13:05:54 -0700 (PDT)
Received: from mail.episteme.net (episteme.net [216.169.5.102]) (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 03465C1DFD2A for <cbor@ietf.org>; Thu, 25 Jul 2024 13:05:43 -0700 (PDT)
Received: from [31.133.139.145] (dhcp-8b91.meeting.ietf.org [31.133.139.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.episteme.net (Postfix) with ESMTPSA id 4WVMM96Vf8zXQ7c; Thu, 25 Jul 2024 15:05:41 -0500 (CDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=episteme.net; s=mail; t=1721937942; bh=G6gmGmTVFyNIA53OBTyP4nR3wFrpX5MjgMoo9bI1qig=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=abx3wRQtlfFiwSEOURI2klqIXLKOJe44listIG3YUViY0rGa5r3SPGh5/L1tbr0t/ 5UqQ2fNvtMIy0KcU7mbaF8O2JRwTERg3yihiMGZCZGTxpcnVewYOmTPcjz3MROUAVI MkYN2uPUmK7K5k8nHsGEDr9y+UTfnTaoOiMMWUHA=
From: Pete Resnick <resnick@episteme.net>
To: Carsten Bormann <cabo@tzi.org>
Date: Thu, 25 Jul 2024 13:05:40 -0700
Message-ID: <10ACD392-A88F-4943-92CC-36CC8C3FE6BB@episteme.net>
In-Reply-To: <2E2DF17A-2892-4154-8145-0ECA4752DBDC@tzi.org>
References: <ZpxlWGAC9UMLqd9c@hephaistos.amsuess.com> <CAN40gSudKn5NyD+5J5j59V1fvt2e+f_iAXO9FmmH6Mu8Q823RA@mail.gmail.com> <CAKoiRuZZ4UCjUwwUbVuM0_JqXefmrU23YG_3d-JmJEznh7ASQw@mail.gmail.com> <Zp1JaqTsOmD2lqd4@hephaistos.amsuess.com> <C1687DF2-9200-48EC-8482-96665C49475A@episteme.net> <2E2DF17A-2892-4154-8145-0ECA4752DBDC@tzi.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format="flowed"; markup="markdown"
Content-Transfer-Encoding: 8bit
X-Synology-Spam-Flag: no
X-Synology-Spam-Status: score=2.409, required 6, __THREADED 0, RCPT_COUNT_FIVE 0, TO_DN_ALL 0, RCVD_COUNT_ZERO 0, FROM_EQ_ENVFROM 0, MIME_TRACE 0, __NOT_SPOOFED 0, __BODY_URI_ONLY 0, MID_RHS_MATCH_FROM 0, NO_RECEIVED -0.001, ARC_NA 0, FROM_HAS_DN 0, FREEMAIL_ENVRCPT 0, TO_MATCH_ENVRCPT_ALL 0, TAGGED_RCPT 0, MIME_GOOD -0.1, FREEMAIL_CC 0, __HDRS_LCASE_KNOWN 0, SUSPICIOUS_RECIPS 2.51
Message-ID-Hash: TL4C74GLA7VCR2ZSPB2A5NVKX2J42CPT
X-Message-ID-Hash: TL4C74GLA7VCR2ZSPB2A5NVKX2J42CPT
X-MailFrom: resnick@episteme.net
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cbor.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: Christian Amsüss <christian@amsuess.com>, Rohan Mahy <rohan.mahy@gmail.com>, Ira McDonald <blueroofmusic@gmail.com>, CBOR <cbor@ietf.org>
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Cbor] Re: Consensus call on EDN literals single ABNF
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/OY-CGGMFYgKk_xk4fTpWthB8cPc>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Owner: <mailto:cbor-owner@ietf.org>
List-Post: <mailto:cbor@ietf.org>
List-Subscribe: <mailto:cbor-join@ietf.org>
List-Unsubscribe: <mailto:cbor-leave@ietf.org>

On 25 Jul 2024, at 11:58, Carsten Bormann wrote:

> On 24. Jul 2024, at 01:30, Pete Resnick 
> <resnick=40episteme.net@dmarc.ietf.org> wrote:
>>
>> app-string = app-string-h
>> / app-string-b64
>> / app-string-dt
>> / app-string-ip
>> / app-string-gen
>>
>> app-string-gen = app-prefix sqstr ; generic app-string
>
> So why don’t we always use app-string-gen?

To a certain extent, I don't know what you mean by "always use 
app-string-gen". Do you mean that you want the parser to always result 
in an app-string-gen token? That's fine, but as I said, that means that 
the result of the parse will never end up with a bstr containing an 
app-string-ip, for example.

> (That is the two-layer model.)

ABNF does not have layers. You are of course free to implement a 
multi-layer parser and implement the parsing of "app-string" separately 
from other parts of the grammar, but the ABNF language doesn't have a 
way to indicate that.

> The way you write it looks like a premature optimization for the five 
> cases that happen to be in this document.

ABNF productions are extensible. Currently, the only 5 cases in the 
grammar are the ones that the document describes. You want to add more, 
you can simply "=/" another case.

The way the ABNF is currently in the document is simply incorrect 
AFAICT.

pr
-- 
Pete Resnick https://www.episteme.net/
All connections to the world are tenuous at best