X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Delivered-To: barryleiba.mailing.lists@gmail.com
Received: by 10.58.181.71 with SMTP id du7csp3769vec;
        Wed, 6 Aug 2014 23:11:30 -0700 (PDT)
X-Received: by 10.70.140.102 with SMTP id rf6mr15994853pdb.4.1407391890094;
        Wed, 06 Aug 2014 23:11:30 -0700 (PDT)
Return-Path: <abnf-discuss-bounces@ietf.org>
Received: from mail.ietf.org (mail.ietf.org. [2001:1900:3001:11::2c])
        by mx.google.com with ESMTPS id x1si2646613pad.96.2014.08.06.23.11.29
        for <multiple recipients>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 06 Aug 2014 23:11:30 -0700 (PDT)
Received-SPF: pass (google.com: domain of abnf-discuss-bounces@ietf.org designates 2001:1900:3001:11::2c as permitted sender) client-ip=2001:1900:3001:11::2c;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of abnf-discuss-bounces@ietf.org designates 2001:1900:3001:11::2c as permitted sender) smtp.mail=abnf-discuss-bounces@ietf.org;
       dkim=pass header.i=@ietf.org;
       dmarc=fail (p=NONE dis=NONE) header.from=gmail.com
Received: from ietfa.amsl.com (localhost [IPv6:::1])
	by ietfa.amsl.com (Postfix) with ESMTP id B0AEE1B27AF;
	Wed,  6 Aug 2014 23:11:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1;
	t=1407391888; bh=j7ugppM4ZSbWMVYbFqahEsxgmaEwEOTYKlo9hkRWXBM=;
	h=MIME-Version:In-Reply-To:References:Date:Message-ID:From:To:
	 Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:
	 List-Subscribe:Content-Type:Content-Transfer-Encoding:Sender;
	b=oruB1OXIgQ5Ki6Kx9odBAnIJIz7cX6aGaNGjzFSw5KuDQraTb1WzxIStEUjHgED8g
	 +5usyHS2fdros8OuUkx/G34CP2Ut6BUYdse+8SgRVIRef7ZZKILVPahYRHA2UPZTMC
	 tJQIK8jtIGvN3cdYBx3bj71/xzO0kZY0BYVPf23w=
X-Original-To: abnf-discuss@ietfa.amsl.com
Delivered-To: abnf-discuss@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1])
 by ietfa.amsl.com (Postfix) with ESMTP id 1FF6E1B27B4
 for <abnf-discuss@ietfa.amsl.com>; Wed,  6 Aug 2014 23:11:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level: 
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 
 DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
 FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=ham
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 jeOJee5YAL1w for <abnf-discuss@ietfa.amsl.com>;
 Wed,  6 Aug 2014 23:11:22 -0700 (PDT)
Received: from mail-yh0-x22a.google.com (mail-yh0-x22a.google.com
 [IPv6:2607:f8b0:4002:c01::22a])
 (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
 (No client certificate requested)
 by ietfa.amsl.com (Postfix) with ESMTPS id 9BBAC1B27AF
 for <abnf-discuss@ietf.org>; Wed,  6 Aug 2014 23:11:21 -0700 (PDT)
Received: by mail-yh0-f42.google.com with SMTP id a41so2581303yho.15
 for <abnf-discuss@ietf.org>; Wed, 06 Aug 2014 23:11:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; 
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :content-type; bh=8qrbDcJsnp4V+w3zJ0awM9sYtZOAHTOxW1z1mXCFKlA=;
 b=CbR8dgwOII2woY+T7rT2udnNCZ9x+fIMGsWtV6HcPfVT5o2aSxqefP27Rvtyd/I8Cq
 /gK6IXjNIpydWnmrWvFoGZhWBqYk8sBcrILZ3/JGM1imuo2OgepzfLA5bgNsimRb4zk+
 sB2PNt5qyOMsBs6xdDROFtGexSpWXQpbcziGPmt6TnxeqlgTHP40eYxX5onPjAO7nGyq
 19YKSsH1CfoFHI+KgeVEgbZy5RXlbb+hodHGiMaMsTXWpLrBU7JhehNH2wBGX8WmjDUV
 k0Kv1El731e8m4Ua5qAoB3UVzVZFvC0mKhy255YUWZComMnNlg3W4Xc7WQ8m9GUfHi83
 akQw==
MIME-Version: 1.0
X-Received: by 10.236.81.243 with SMTP id m79mr1756295yhe.28.1407391880918;
 Wed, 06 Aug 2014 23:11:20 -0700 (PDT)
Received: by 10.170.55.73 with HTTP; Wed, 6 Aug 2014 23:11:20 -0700 (PDT)
In-Reply-To: <53E2A982.8000405@gmail.com>
References: <53E26154.8020308@alum.mit.edu> <53E26391.6060208@gmail.com>
 <53E27C4B.3050003@alum.mit.edu> <53E2A982.8000405@gmail.com>
Date: Thu, 7 Aug 2014 08:11:20 +0200
Message-ID: <CABSMSPWh-SvvnmFSkRLcKr0yOEQDmFRy7_85A6KS39AVr=oThA@mail.gmail.com>
From: Riccardo Bernardini <framefritti@gmail.com>
To: "abnf-discuss@ietf.org" <abnf-discuss@ietf.org>
Archived-At: http://mailarchive.ietf.org/arch/msg/abnf-discuss/brzHFQUoLnAdFKHvVgWt9IZobog
Subject: Re: [abnf-discuss] Case-sensitive string constants in ABNF?
X-BeenThere: abnf-discuss@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: abnf-discuss-bounces@ietf.org
Sender: "abnf-discuss" <abnf-discuss-bounces@ietf.org>

> The simplistic approach is simply a library of rulesets, with no change
> the the meta-syntax.  More ambitious would be an extensible syntax, such
> as "abc" being case independent and ^"abc" being case dependent.  I'm
> not fond of the idea of pursuing the latter.
>
>
>> It also could lead to fragmentation, where not all tools support the
>> same extensions.
>
> Always an issue, yes.
>

Actually, in the case of a library of ruleset the problem would be
easily solved by giving the tool the ability to "import" rulesets and
having the ruleset available on the net.

For example, improvising a syntax on the spot, one could add to ABNF a
"pragma" rule like

    %use IETF.RFC9999     ; Import all the rulesets defined by RFC9999.
    %use IETF.RFC007.foo  ; Import ruleset foo from the secret RFC007

This supposes that the rulesets have been officially registered (at
IANA?). You could have a standard resolution rule, so that your tool
will know how to automatically download them.  Maybe the easiest way
is to associate a base URL to namespace "IETF" and use that URL + the
remaining of rule to create an URL to GET to download.  For improved
portability, you could have another pragma that allows you to make the
namespace -> URL association, for example,

   %namespace IETF http://www.ietf.org/abfn-rules/

(disclaimer: I made up the suggestion above in front of a cup of
coffee while having breakfast, so treat it like a "brainstorm
contribution."  Nevertheless, it makes sense to me...)

>
>> Maybe its just my age, but for me it remains the go-to tool for modest
>> grammars. It is very approachable - most people that have reason to
>> understand a formal syntax can pick up ABNF quickly. (The quoted strings
>> are the thing that seem most confusing.)
>

Personally, I like ABNF.  It is powerful enough to allow to describe
fairly complex syntax while being intuitive enough to be understood
even by people with no formal language background.

Please, do not move to XML for this!    I find XML overly verbose,
with a verbosity that it makes it difficult to understand and quite
annoying to edit.

<pseudo-rant>
yes, yes, I know there is your favorite editor with syntax
highlighting, bell, whistles and cool tricks, ... I use it too...
Nevertheless, XML remains annoying to edit and to read.
</pseudo-rant>

IMHO, XML is useful when you have complex objects, possibly of
recursive nature (e.g., a document whose sections contain paragraphs
that contain lists that contains...).  In the case of grammars, you
only have a sequence of rules and the recursive properties of XML are
definitively an overkill.

<comment>
And... no, I do not think that XML is easier to parse.  I wrote
parsers both for ABNF-like languages and for XML-based formats and I
should say that maybe ABNF is easier to parse, even if you write the
parser by hand (I did that in, say, half day of work).   Yes, you have
libraries for XML, but they parse only the "syntax" and give you a
tree, then you have to parse the tree to your internal format and that
can be annoying.
</comment>

Finally, about the object of this thread: I think that the possibility
of specifying case constrained strings it would be a useful one.
Personally, I like the "%S" proposal since it is lightweight, fairly
clear and back-compatible.

Riccardo

_______________________________________________
abnf-discuss mailing list
abnf-discuss@ietf.org
https://www.ietf.org/mailman/listinfo/abnf-discuss

