Re: [Json] ABNF nits

"Matt Miller (mamille2)" <mamille2@cisco.com> Fri, 07 June 2013 14:10 UTC

Return-Path: <mamille2@cisco.com>
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 E14C921F888F for <json@ietfa.amsl.com>; Fri, 7 Jun 2013 07:10:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Level:
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uaKyYARo7kuF for <json@ietfa.amsl.com>; Fri, 7 Jun 2013 07:10:36 -0700 (PDT)
Received: from rcdn-iport-1.cisco.com (rcdn-iport-1.cisco.com [173.37.86.72]) by ietfa.amsl.com (Postfix) with ESMTP id DA14521F969F for <json@ietf.org>; Fri, 7 Jun 2013 07:10:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=8314; q=dns/txt; s=iport; t=1370614236; x=1371823836; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=IPUBXiuQBPNBZ94tRcCY3Av5QDhWIYoCyx1kaBkhSz4=; b=jGCAlUYPVOAlGJ3kKitTwjacj/gPNxR1OWjTh9KJMV7aTWnFSZp25AuF xcmxDXivIhQUaISLX2/sPnkhKWeKmiKavLsSdOzkjeNg+oSmi10/Y8n1f KwZ76G7KhYPLHLmH2yYPbPe8YRSo9Aq7WdUsh0tUOZSMTt9LrAZggnrpt w=;
X-Files: smime.p7s : 4136
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AhgFAJfpsVGtJXHB/2dsb2JhbABZgwkwuweDaX0WdIIjAQEBAwEBAQFrCwULAgEIGAokAiULJQIEAQ0FCAaHeQYMvFAEjwcWGweCe2EDkAGBLJdVgw+CJw
X-IronPort-AV: E=Sophos; i="4.87,822,1363132800"; d="p7s'?scan'208"; a="219848746"
Received: from rcdn-core2-6.cisco.com ([173.37.113.193]) by rcdn-iport-1.cisco.com with ESMTP; 07 Jun 2013 14:10:29 +0000
Received: from xhc-aln-x05.cisco.com (xhc-aln-x05.cisco.com [173.36.12.79]) by rcdn-core2-6.cisco.com (8.14.5/8.14.5) with ESMTP id r57EAScn014624 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Fri, 7 Jun 2013 14:10:28 GMT
Received: from xmb-aln-x11.cisco.com ([169.254.6.24]) by xhc-aln-x05.cisco.com ([173.36.12.79]) with mapi id 14.02.0318.004; Fri, 7 Jun 2013 09:10:28 -0500
From: "Matt Miller (mamille2)" <mamille2@cisco.com>
To: "stefan@drees.name" <stefan@drees.name>, "Manger, James H" <James.H.Manger@team.telstra.com>, Carsten Bormann <cabo@tzi.org>, "Joe Hildebrand (jhildebr)" <jhildebr@cisco.com>
Thread-Topic: [Json] ABNF nits
Thread-Index: AQHOYxhuLNPlu69CpUeh/eSpf1GKTZkpg97A///1nACAABksoIAAjFoAgACAJYA=
Date: Fri, 07 Jun 2013 14:10:27 +0000
Message-ID: <BF7E36B9C495A6468E8EC573603ED9411527F781@xmb-aln-x11.cisco.com>
References: <255B9BB34FB7D647A506DC292726F6E1151B21F79E@WSMSG3153V.srv.dir.telstra.com> <A723FC6ECC552A4D8C8249D9E07425A70FC326C8@xmb-rcd-x10.cisco.com> <255B9BB34FB7D647A506DC292726F6E1151B21F8CA@WSMSG3153V.srv.dir.telstra.com> <51B17E54.9030107@drees.name>
In-Reply-To: <51B17E54.9030107@drees.name>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-originating-ip: [10.129.24.59]
Content-Type: multipart/signed; boundary="Apple-Mail=_0A8A7FE2-6045-4D4D-BDCF-731ADA2F9457"; protocol="application/pkcs7-signature"; micalg="sha1"
MIME-Version: 1.0
Cc: "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] ABNF nits
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
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: <http://www.ietf.org/mail-archive/web/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: Fri, 07 Jun 2013 14:10:41 -0000

Would one of you be so kind as to put all of this into a proposal we can all get our heads wrapped around?


kthxbye,

- m&m

Matt Miller < mamille2@cisco.com >
Cisco Systems, Inc.

On Jun 7, 2013, at 12:31 AM, Stefan Drees <stefan@drees.name> wrote:

> On 2013-06-07 05:15, James H. Manger wrote:
>>>>> Some things I found futzing with the ABNF:
>>>>> 
>>>>> - normalize the indentation (makes it easier to pull out)
>>>>> - Hex literals need to be uppercase.  The false and null rules are
>>>>> wrong.
>>>> 
>>>> Lowercase is allowed in hex literals.
>>>> It links back to HEXDIG in RFC5234 (or RFC 4234).
>>>> You have to remember the sneaky ABNF rule that quoted strings (eg "A")
>>>> are case insensitive. "A" is equivalent to %x41 / %x61.
>>> 
>>> Crap.  I didn't see that because it's in a "Note:" in section 2.3.
>> 
>> I didn't call it "sneaky" for nothing ;) ...
> 
> lucky JSON, it only needs short tokens (cowardly avoiding the word single character here ;-)
> 
> If defining a grammar with real case-sensitive "word"-ish tokens in it, ABNF is IMO barely usable, unless you extend it with say single quotes as case-sensitve string delimiters. But then dealing with two kinds of strings also has it's catches =(
> 
> 
>>> Regardless, we should change  both of those rules for consistency with
>>> the rest of the doc.
>>> 
>>>>> - DIGIT and HEXDIG are neither defined nor imported, as far as I can
>>>>> tell.
>>>>> I suggest:
>>>>> 
>>>>> DIGIT = %x30-39                        ; 0-9
>>>>> HEXDIG = %x30-39 / %x41-46 / %x61-66   ; 0-9, A-F, or a-f
>>> 
>>> I still recommend being explicit about this, like the rule for e.
>> 
>> I agree.
>> Add DIGIT and HEXDIG to the doc so all the ABNF is present.
>> Use your definition of HEXDIG above, not the RFC5234 one, to avoid the sneaky ABNF rule.
>> Optionally add a note "; DIGIT and HEXDIG are equivalent to rules with the same names in [RFC5234]".
> 
> +1 on your proposal James (including the ABNF comment).
> 
> Stefan.
> 
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json