Re: Language grammar opinions

"Clive D.W. Feather" <clive@demon.net> Wed, 10 January 2007 17:25 UTC

Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1H4hCu-0000TG-3O; Wed, 10 Jan 2007 12:25:48 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1H4hCs-0000TB-Vr for cosmogol@ietf.org; Wed, 10 Jan 2007 12:25:46 -0500
Received: from anchor-internal-1.mail.demon.net ([195.173.56.100]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1H4hCf-0006JT-5q for cosmogol@ietf.org; Wed, 10 Jan 2007 12:25:46 -0500
Received: from finch-staff-1.server.demon.net (finch-staff-1.server.demon.net [193.195.224.1]) by anchor-internal-1.mail.demon.net with ESMTP� id l0AHPF9K000846Wed, 10 Jan 2007 17:25:29 GMT
Received: from clive by finch-staff-1.server.demon.net with local (Exim 3.36 #1) id 1H4gYm-000N8y-00; Wed, 10 Jan 2007 16:44:20 +0000
Date: Wed, 10 Jan 2007 16:44:20 +0000
From: "Clive D.W. Feather" <clive@demon.net>
To: Stephane Bortzmeyer <bortzmeyer@nic.fr>
Message-ID: <20070110164420.GD82678@finch-staff-1.thus.net>
References: <20070108161009.GU12419@finch-staff-1.thus.net> <20070109220532.GA28340@sources.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20070109220532.GA28340@sources.org>
User-Agent: Mutt/1.5.3i
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 7aafa0432175920a4b3e118e16c5cb64
Cc: cosmogol@ietf.org
Subject: Re: Language grammar opinions
X-BeenThere: cosmogol@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: DIscussion on state machine specification in IETF protocols <cosmogol.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/cosmogol>, <mailto:cosmogol-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/cosmogol>
List-Post: <mailto:cosmogol@ietf.org>
List-Help: <mailto:cosmogol-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/cosmogol>, <mailto:cosmogol-request@ietf.org?subject=subscribe>
Errors-To: cosmogol-bounces@ietf.org

Stephane Bortzmeyer said:
>> I prefer to list the possible declaration types in the grammar, so
>> would prefer the commented-out version of "declaration".
> 
> One of the traps here is that ABNF strinsg are case-INsensitive so
> this would be a problem if we switch to Unicode and it would be
> inconsistent with the (current) rule that in Cosmogol, everything is
> case-sensitive.

I'm aware of this. Yes, it makes the ABNF look slightly nauseating, but
that's a relatively small burden to bear.

[One option would be to define our own extension to ABNF to specify
case-sensitive strings. Um:

    false = !"false"  ; case-sensitive

I might talk to Paul Overell about it, since he's co-author of 4234 and a
colleague.]

>> Only after you see the next token (semicolon or comma or arrow) do
>> you know if this is a declaration with an unknown type, or a
>> transition. This produces a shift/reduce conflict in yacc or other
>> such parser generators.
> More precisely, with LR parsers like the ones generated by Yacc. LL
> parsers do not have the problem.

Only if you fudge around it (and the same can be done with LR parsers).

>> To resolve it, I would suggest reversing the order of declarations to
>> *begin* with the type:
>> 
>>     STATE : alpha, bravo, charlie ;
>
> Why not. It looks like C :-)

A bit, yes. Combined with my proposed syntax for transitions, it means that
you could make the keywords be case-insensitive if you wanted (I'm neither
supporting nor opposing this) because there's no conflict.

>> I see no benefit in restricting the characters in double-quoted
>> names. At the very least, why allow comma and semicolon but not full
>> stop and colon?
> This is completely arbitrary. We should allow at least, square
> brackets (RFC 2960), slashes and < and > (draft on shim6), dots, etc.

Right. So why forbid anything (except " itself and possibly one escape
code)?

-- 
Clive D.W. Feather  | Work:  <clive@demon.net>   | Tel:    +44 20 8495 6138
Internet Expert     | Home:  <clive@davros.org>  | Fax:    +44 870 051 9937
Demon Internet      | WWW: http://www.davros.org | Mobile: +44 7973 377646
THUS plc            |                            |

_______________________________________________
Cosmogol mailing list
Cosmogol@ietf.org
https://www1.ietf.org/mailman/listinfo/cosmogol