Re: [Cbor] cddl 0.8.17: Add .abnf (draft-ietf-cbor-cddl-control)

Paul Kyzivat <pkyzivat@alum.mit.edu> Fri, 26 February 2021 22:26 UTC

Return-Path: <pkyzivat@alum.mit.edu>
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 29C0E3A0E0B for <cbor@ietfa.amsl.com>; Fri, 26 Feb 2021 14:26:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level:
X-Spam-Status: No, score=-2.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=alum.mit.edu
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 XWjCbifDtkw5 for <cbor@ietfa.amsl.com>; Fri, 26 Feb 2021 14:26:48 -0800 (PST)
Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2060.outbound.protection.outlook.com [40.107.223.60]) (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 9AF823A0E0A for <cbor@ietf.org>; Fri, 26 Feb 2021 14:26:48 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jFfYH4HPtVGBL8BZ1VR1N54hw3oihMQf118CQqkOAXQW5gxk1d5a+k+0ruwWb0zOQU7D2UjKxEAan3zHlQpOh2DiWW8BVbpTEveJ0ErsL0zoNcwf/6WpLX6tnnJgtwGv8WCpKsgqhxk6iGJxnZgTwkOD5ZQuL5QFb2RFJjzCBe7hbYd0OrLz9ASiuRsJtvyXP61gfLf7/5aJDzlD9waN1IvtMwxxgPR/qqMSL5ecd2jujFciD7Sfz7/At3Tm5Dji72l91Y+z8veX1413CEqV8HOH41X/+ZyFAoVjXWg6BgRVhuy4/o1iew2V+idabCQR8ru2dHbbGG3n76EADJc+0g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ayNMmDFb9tGH1ISJirKD0/bgZFZTOfLqB7yR1u4WkxI=; b=IkMwovnkosJUJhRuwQMsvlBB9utW3cw88xk3+EapFxpjnOWoio3whsb02yxdiDS+XG6ShQfcIGrzwt5x4TX70zHitoUYMjfLJuwS2/DjBTBTtG8GbAMWhOrpK1segcqleu3/gF9fFte1FRT+7fuvK7IwKCIShzylUv6o195NB3PpIHJvIBZnc/sp1wiaaZ/kfk8qnO/R73XNXXkDMtwLlWkLyyxVEAFbuoryG2voDsSI0YvlA0l6u27TijMh4n31TEAXQYzIHlfDkVpXfeKd/oXEhKRJ+O2JtGTrE7aJN3OQGlyDnPTaGaJQsZSr3kRiagwooTfZ9vQSA1ccIgDE+w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 18.7.68.33) smtp.rcpttodomain=tzi.org smtp.mailfrom=alum.mit.edu; dmarc=bestguesspass action=none header.from=alum.mit.edu; dkim=none (message not signed); arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alum.mit.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ayNMmDFb9tGH1ISJirKD0/bgZFZTOfLqB7yR1u4WkxI=; b=Us8nMixAiMxOUZ0pfSTdrRpH/G0FTSKuptF7UrbsP17cHqti06GBY/0/b3AgAzyDhzHkFCBR4fm4gkhgTmguXuYNYCCaPvM3SWuDgPgCJymFvCeYk6w/mscBW4s7XhZSwWLPhftMTVuGCiGLtNBGFVnj2vIORuYRD9uKJVNpYLc=
Received: from CY4PR1101CA0012.namprd11.prod.outlook.com (2603:10b6:910:15::22) by BY5PR12MB3988.namprd12.prod.outlook.com (2603:10b6:a03:1a5::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.30; Fri, 26 Feb 2021 22:26:46 +0000
Received: from CY1NAM02FT019.eop-nam02.prod.protection.outlook.com (2603:10b6:910:15:cafe::8d) by CY4PR1101CA0012.outlook.office365.com (2603:10b6:910:15::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Fri, 26 Feb 2021 22:26:45 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 18.7.68.33) smtp.mailfrom=alum.mit.edu; tzi.org; dkim=none (message not signed) header.d=none;tzi.org; dmarc=bestguesspass action=none header.from=alum.mit.edu;
Received-SPF: Pass (protection.outlook.com: domain of alum.mit.edu designates 18.7.68.33 as permitted sender) receiver=protection.outlook.com; client-ip=18.7.68.33; helo=outgoing-alum.mit.edu;
Received: from outgoing-alum.mit.edu (18.7.68.33) by CY1NAM02FT019.mail.protection.outlook.com (10.152.75.177) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Fri, 26 Feb 2021 22:26:43 +0000
Received: from MacBook-Air.localdomain (c-24-62-227-142.hsd1.ma.comcast.net [24.62.227.142]) (authenticated bits=0) (User authenticated as pkyzivat@ALUM.MIT.EDU) by outgoing-alum.mit.edu (8.14.7/8.12.4) with ESMTP id 11QMQfCh005713 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 26 Feb 2021 17:26:42 -0500
To: Carsten Bormann <cabo@tzi.org>
Cc: cbor@ietf.org
References: <AC771EE9-9672-4B2D-B66A-2C815D102687@tzi.org> <358dd1e3-74a5-c32e-235a-c0a6c308ae6f@alum.mit.edu> <CD82E5A7-4D46-412F-B45F-B4970C2FF8E8@tzi.org>
From: Paul Kyzivat <pkyzivat@alum.mit.edu>
Message-ID: <3a80f922-cfc9-2831-c4f0-7c918e211d74@alum.mit.edu>
Date: Fri, 26 Feb 2021 17:26:41 -0500
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.7.1
MIME-Version: 1.0
In-Reply-To: <CD82E5A7-4D46-412F-B45F-B4970C2FF8E8@tzi.org>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 7e5e9663-ed72-4470-6b94-08d8daa598b6
X-MS-TrafficTypeDiagnostic: BY5PR12MB3988:
X-Microsoft-Antispam-PRVS: <BY5PR12MB39886A0A50C4D4C91CABDE47F99D9@BY5PR12MB3988.namprd12.prod.outlook.com>
X-MS-Oob-TLC-OOBClassifiers: OLM:10000;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: qXI13lf+UHzQPEvL49h+yj7KJSMC3jCJvT9GlnOhF1Ph5qlG386n89qwVDAo8VtbjhELHkuuudQxPiiHLM67MeZIgkG8xB+G+6k9dRQnfkuH/vZp+S/UvcjHiKPBq+Cl8SKoeBXc+lXLjUkgEHmWWnYJUG6cKufdWHuiHx7DPN4PowWJZwvPSG175SAFBVbOtVAXdJOMppw7FleO5wu6ce0JzJ46Aw7pWQbUtk+0Nha6kOMdGlazn8u9YMYbCpJyLkOw4m6ADuve0tPAdTjta/vlzz3OsHXawDWENoAhzvP+yzJ7M6zMB9sDs7ZGmoxo4ohv1fqW1vp0K3UaEph7ctWE1ZKxvjfo9h0bU2UWbg8SK8lnOYeyNMpw3F98HDG6qlLDh7tHaEnB7XF2VAXI2Sdlgg0C5yXNaZpwyh0vrfzOfq4Oq+dw6xPlsNFqNgv0QIOgUtsAt65yiUZ9ric99XoS/XgUw2YLfuqw2pIvnygjBRHUuP/JTYQmCUzDSNwqqDCwaXdYZfHe+RwnrKzKE2ksizcljh1brFoipla6KfpMZJgXNZrZxUW+TVCYkXZ4bsijzj1fEgac2eyWtUOE1Xq3OR38y51VDA65IzS2S6/wy0jpX7DdK4xAxuo9rfczCm3ssM8yBn790e3FEwx0vVeqV2Oh0e4DMpYOf3bT3Tdh3wFVuzdfY1jDbJKYSNe/H5mSa02CrNJS3J7eg0vUUA==
X-Forefront-Antispam-Report: CIP:18.7.68.33; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:outgoing-alum.mit.edu; PTR:outgoing-alum.mit.edu; CAT:NONE; SFS:(346002)(376002)(39860400002)(396003)(136003)(36840700001)(46966006)(31696002)(7596003)(786003)(356005)(75432002)(70206006)(82310400003)(36906005)(956004)(53546011)(82740400003)(5660300002)(70586007)(36860700001)(83380400001)(26005)(186003)(2616005)(6916009)(4326008)(8676002)(336012)(8936002)(47076005)(316002)(86362001)(31686004)(2906002)(478600001)(142923001)(43740500002); DIR:OUT; SFP:1101;
X-OriginatorOrg: alum.mit.edu
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2021 22:26:43.7966 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 7e5e9663-ed72-4470-6b94-08d8daa598b6
X-MS-Exchange-CrossTenant-Id: 3326b102-c043-408b-a990-b89e477d582f
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3326b102-c043-408b-a990-b89e477d582f; Ip=[18.7.68.33]; Helo=[outgoing-alum.mit.edu]
X-MS-Exchange-CrossTenant-AuthSource: CY1NAM02FT019.eop-nam02.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB3988
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/PaG491RABrrWlnF3X0ydGDJu9ag>
Subject: Re: [Cbor] cddl 0.8.17: Add .abnf (draft-ietf-cbor-cddl-control)
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 26 Feb 2021 22:26:53 -0000

On 2/26/21 12:42 PM, Carsten Bormann wrote:
>> Perhaps off topic here, but ...
>>
> 
> Well, there is no ABNF working group :-)

True, but here is abnf-discuss@ietf.org

> The CBOR WG with its CDDL work item actually is the closest you get at the moment.
> 
>> IMO it would be good to make a revision to 5234 to resolve the leading whitespace issue. As it stands, there must be multitude of hacks to work around it, and AFAIK the assumptions made within those hacks are poorly documented and probably inconsistent.
> 
> Yes, and the hacks are so prevalent that I actually had to build a tool based on the ABNF in 5234 to be reminded of it :-)
> 
>> The first thing to resolve would be to decide how to resolve the ambiguity when leading whitespace is allowed.
> 
> Is there one?
> AFAIK, the only “problem” is lack of LL(1) parsing, and I don’t really care that much about that in 2021.
> 
>> Unfortunately I don't think there is any backward compatible extension that could itself be defined in abnf.
> 
> OK, I don’t think I can parse that before I understand the answer to my previous question.

The obvious revision would be to simply change the syntax of rule to:

      rule           =  WSP rulename defined-as elements c-nl

That seems unambiguous to me. But my formal parsing knowledge isn't 
sufficient to say if it is LL(1). BAP is old school and parses using 
yacc and lex. (And doesn't derive its parser from the abnf of abnf.) 
That means its an LALR parser.

Is there a public tool that can generate a parser from abnf that can 
parse abnf?

	Thanks,
	Paul