Re: [abnf-discuss] FW: ABNF/RFC7405/ Update: EBNF syntactic exception

Paul Overell <paul@bayleaf.org.uk> Tue, 12 July 2022 15:16 UTC

Return-Path: <paul@bayleaf.org.uk>
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 02085C14F74F for <abnf-discuss@ietfa.amsl.com>; Tue, 12 Jul 2022 08:16:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Level:
X-Spam-Status: No, score=-1.909 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=bayleaf-org-uk.20210112.gappssmtp.com
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 HqI-wTxBCfpM for <abnf-discuss@ietfa.amsl.com>; Tue, 12 Jul 2022 08:16:35 -0700 (PDT)
Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 8B5AEC14CEFC for <abnf-discuss@ietf.org>; Tue, 12 Jul 2022 08:16:34 -0700 (PDT)
Received: by mail-ed1-x529.google.com with SMTP id w12so9788656edd.13 for <abnf-discuss@ietf.org>; Tue, 12 Jul 2022 08:16:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bayleaf-org-uk.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:disposition-notification-to:in-reply-to :content-transfer-encoding; bh=pQbnMBO/b8SWtDqMDgD+a0lURFZdCB9esJVkoDbRUqI=; b=1w2t59NxFeUcvHlX0U8V9gG4D09vdLKnEBxpGM8ayF3YK3TNoCs3wsmuviqaTzoO1d jDjjFwLuPGJWk8+kubazW8r3pMp2lS5XfCskrXUvovtzBTIhKEXKn0UaLM4tiThnIOKH gx+YFGvVadErhJIAtlvdG2GmHNLbUODcRrW5rVRSq6SJBqkvUyUDN3Nl1uiu31q1XpVO EeblafsG/h1OiKYjaTKCfTu6Wc+MHxs90+73RwUJPUTnPSYriFL12IaPmiyNSCPC2ZAq YHjh4U5nnymVfhCIlLnM9IuTzwscYDjj3I/vGcwhpWoRnKwmDXMOw/LLr87obbCAdooI yXMg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:disposition-notification-to :in-reply-to:content-transfer-encoding; bh=pQbnMBO/b8SWtDqMDgD+a0lURFZdCB9esJVkoDbRUqI=; b=Fi15jVIizRglpqpa02EawOc7WghF9eKTHg6nIoXDF2Wbj3InBq/c1glK+qwvbRlAT4 kORa5yodntLyESpKf5xgxrEw2y2UzT2T2JjGbp9m4K199DVw4rfehImWbLtCMgPkBl87 Qx72xHMslDz2+a3/yiLAzqHAiGNia42WqQw+t3kQnloIxbYO8rWafXqBvR9rvt7E235x jmXMrpBBbINpkrv9MVzFc41yNzCt/lj2orSr0h0XpgP91YJB7bmNsRV/EtuTQbyrfIyn jlcqsKqwv3YPgmw9EknilCo9xrbJor+XO6EFMPVh4eHBE4OQ4RrHdQIU6U4DoSDtH/ab Mt4g==
X-Gm-Message-State: AJIora+zxRoNq/uCAnzFgW9vX1nBavfpGUImxBB2wcS5H9lT/73ODcSk tjugXEv3NQ3D+zR4XRIuagZ3KKTEc3afMmmB
X-Google-Smtp-Source: AGRyM1vZhzLvG9vG6mBLk1j/z7Ar9UZpK3jp8Al4EWMbwARH3o2LUHVc78WML/7OPrmzl6TTyz/F/A==
X-Received: by 2002:a05:6402:2789:b0:43a:de54:40fd with SMTP id b9-20020a056402278900b0043ade5440fdmr11024167ede.319.1657638992829; Tue, 12 Jul 2022 08:16:32 -0700 (PDT)
Received: from [192.168.1.53] (207.254.7.51.dyn.plus.net. [51.7.254.207]) by smtp.gmail.com with ESMTPSA id k19-20020a05640212d300b0043a8f5ad272sm6192989edx.49.2022.07.12.08.16.32 for <abnf-discuss@ietf.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Jul 2022 08:16:32 -0700 (PDT)
Message-ID: <eaa78f33-5be8-d90c-5726-22ac0d14bffa@bayleaf.org.uk>
Date: Tue, 12 Jul 2022 16:16:31 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0
Content-Language: en-GB
To: abnf-discuss@ietf.org
References: <20220710005652.5B4A04532DCC@ary.qy> <D4CD5CBA-AB51-4490-A630-54DD27BD37F1@tzi.org> <f4bd8b47-bd02-418e-d152-84432f5db6a1@taugh.com> <18F74DA7-DAAB-4F59-A546-2CFA050ED58C@tzi.org> <SA1PR07MB8707B60B050232E1FD4D3678B8879@SA1PR07MB8707.namprd07.prod.outlook.com> <SA1PR07MB8707E07E2DE14AD73AFACEBEB8869@SA1PR07MB8707.namprd07.prod.outlook.com>
From: Paul Overell <paul@bayleaf.org.uk>
In-Reply-To: <SA1PR07MB8707E07E2DE14AD73AFACEBEB8869@SA1PR07MB8707.namprd07.prod.outlook.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/abnf-discuss/sDpfR2Spq6yY6xpK_42tiKFakSI>
Subject: Re: [abnf-discuss] FW: ABNF/RFC7405/ Update: EBNF syntactic exception
X-BeenThere: abnf-discuss@ietf.org
X-Mailman-Version: 2.1.39
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, 12 Jul 2022 15:16:38 -0000

On 12/07/2022 14:50, Jacob Friedman wrote:
> Good question. Referring to ISO 14977, exception takes the precedence. I believe that would result in (a \ b) (c \ d), much like a / b c / d resulting in (a / b) (c / d).

In ABNF concatenation binds tighter than alternation so

a / b c / d means a / (b c) / d not (a / b) (c / d)

>
> The second is optional to align EBNF's possible handling of empty terms. Better alternatives are welcome.
>
> ---
>
> ; Any repetition of 42s
> a = *(%d42)
> ; Any repetition of 42s except for 0 repetitions (empty) b = a \

If there is a need for an explicit empty then I would prefer something 
visible.

In ABNF any 0element already means empty.    So 0<> might do the trick, 
if a bit cryptic.

b = a \ 0<>

or better

empty = 0<>

b = a \ empty


Regards

-- 
Paul Overell