RE: I-D Action:draft-yevstifeyev-abnf-separated-lists-01.txt

"Thomson, Martin" <Martin.Thomson@andrew.com> Tue, 07 December 2010 00:45 UTC

Return-Path: <Martin.Thomson@andrew.com>
X-Original-To: ietf@core3.amsl.com
Delivered-To: ietf@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 0001328C0DB for <ietf@core3.amsl.com>; Mon, 6 Dec 2010 16:45:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.582
X-Spam-Level:
X-Spam-Status: No, score=-2.582 tagged_above=-999 required=5 tests=[AWL=0.017, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gEPs9cwCUT9W for <ietf@core3.amsl.com>; Mon, 6 Dec 2010 16:45:55 -0800 (PST)
Received: from csmailgw2.commscope.com (csmailgw2.commscope.com [198.135.207.242]) by core3.amsl.com (Postfix) with ESMTP id 1133E3A68DD for <ietf@ietf.org>; Mon, 6 Dec 2010 16:45:55 -0800 (PST)
Received: from [10.86.20.103] ([10.86.20.103]:47443 "EHLO ACDCE7HC2.commscope.com") by csmailgw2.commscope.com with ESMTP id S517232Ab0LGArT (ORCPT <rfc822; ietf@ietf.org>); Mon, 6 Dec 2010 18:47:19 -0600
Received: from SISPE7HC2.commscope.com (10.97.4.13) by ACDCE7HC2.commscope.com (10.86.20.103) with Microsoft SMTP Server (TLS) id 8.1.436.0; Mon, 6 Dec 2010 18:47:18 -0600
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC2.commscope.com ([fe80::58c3:2447:f977:57c3%10]) with mapi; Tue, 7 Dec 2010 08:47:17 +0800
From: "Thomson, Martin" <Martin.Thomson@andrew.com>
To: Bill McQuillan <McQuilWP@pobox.com>, IETF Discussion <ietf@ietf.org>
Date: Tue, 07 Dec 2010 08:47:14 +0800
Subject: RE: I-D Action:draft-yevstifeyev-abnf-separated-lists-01.txt
Thread-Topic: I-D Action:draft-yevstifeyev-abnf-separated-lists-01.txt
Thread-Index: AcuVor8H86wKxUKpSTywUNz5VNFmYAAAHKPA
Message-ID: <8B0A9FCBB9832F43971E38010638454F03F347E28D@SISPE7MB1.commscope.com>
References: <113441059.20101206160717@pobox.com>
In-Reply-To: <113441059.20101206160717@pobox.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BCN: Meridius 1000 Version 3.4 on csmailgw2.commscope.com
X-BCN-Sender: Martin.Thomson@andrew.com
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Dec 2010 00:45:56 -0000

I wholly agree with Bill on this.

You want something a little more complicated than you have already specified:

  {n}^({a}){m}{e} => {e} {n-1}*{m ? m-n : ''}({a} {e}) ; where n > 0
                     {e} *{m ? m-1 : ''}({a} {e})      ; where n == 0 or n undefined

Note the n == 0 is a special case.  Note that this assumes that m > n.  There seems little point in this construction if m == 1, but this does handle that case.


Aside from those sorts of problems, the definition of 'a' is a little loose.  You should try to build on the RFC 5234 ABNF in your definitions.

The proposed rule has an ABNF definition something like (?): 

  hat-rule = 1*DIGIT "^(" a ")" 1*DIGIT
  a = VCHAR / SP / HT / <any other separator>

That's a lot of flexibility in the internal part.  Too much flexibility.  Using parentheses means that they need to be distinguished from the parentheses that might appear in the 'a' part. 

If you see this as a substitute for the "*" in a normal repetition rule, that makes it easier.  Given that it has length longer than 1 character, by providing a clear delineation of the start and end you can be more flexible on the content.  Either that or to restrict what follows the ^.

Preferably delineate better AND restrict content:

   repeat /= hat-rule
   hat-rule = *DIGIT "^" element "^" *DIGIT

This restricts the content without preventing the use of more complex content - you just have to use a rulename instead.

You can't use elements (note the 's') here because that sort of complexity is a real pain to specify.

That leaves examples:

 1^";"^3element ; 1 to 3 elements separated by ;
 1^SP^element   ; 1 or more elements separated by SP rule
 ^","^3element   ; 0 to 3 elements separated by ,
 ^%x20.20^element  ; any number of elements separated by a two space characters

You should try to answer the question in the draft: why use the '^' character instead of the '#' character?  I guess that this is an arbitrary choice more than anything else.

--Martin

On 2010-12-07 at 11:07:17, Bill McQuillan wrote:
> I found several problems with this draft.
> 
> In overview, the reason that we removed the #rule from ABNF was that it
> was
> very difficult to specify for a general case. This draft has the same
> problem.
> 
> The production given does not actually produce the desired results.
> 
> >   n^(a)m element = ( n(*LWS element) *o(*LWS a *LWS element))
> 
> If the usage is:
> 
>     5^(",")10 "abc"
> 
> it would allow something like:
> 
>     abc abc abc abc abc abc , abc
> 
> not:
> 
>     abc, abc, abc, abc, abc, abc, abd
> 
> which was probably intended.
> 
> -----
> 
> The production:
> 
> >   a              = VCHAR / SP / HT / <any other separator>
> 
> does not seem to address the possibility of multi-character separators
> very
> clearly. What if I want to define a list like:
> 
>     abc and def and ghi and jkl
> 
> can I use:
> 
>     ^(" and ")ident
> 
> -----
> 
> I also do not believe that *FWS belongs in such a general rule and
> should
> rather be defined by the actual usage. E.g.:
> 
>     5^(*FWS "," *FWS)10 "abc"
> 
> -----
> 
> Typo: 2.1 Examples, fourth example should be: ^("-")element
> 
> --
> Bill McQuillan <McQuilWP@pobox.com>
> 
> _______________________________________________
> Ietf mailing list
> Ietf@ietf.org
> https://www.ietf.org/mailman/listinfo/ietf