W3C home > Mailing lists > Public > www-archive@w3.org > December 2001

Minus signs in ids -- n3.bnf

From: Tim Berners-Lee <timbl@w3.org>
Date: Tue, 4 Dec 2001 15:17:49 -0500
Message-ID: <006401c17d00$d15f4bc0$cd061812@CREST>
To: "Sandro Hawke" <sandro@roads.org>, "Petr Cimprich" <petr@gingerall.cz>
Cc: <www-archive@w3.org>
Peter,

Sandro passed on your message.

Adding "-" to the ID characters is a problem, in that I wanted to reserve
the usual operators for use as operators in some posisble future shorthand
notation.

Another solution would be to have some form of escaping,
such as mapping sequences of "-" into sequences of "_" in some way,
such as taking a contiguous sequence of - and _,
replacing  _ with 0 and - with 1, then adding a leading "1",
taking what you have as a binary number, subtracting
1 from the result, and then writing that many _ signs.
The mapping is 1:1, and maps the simple case of - onto __
and _ onto _.

The only disadvantage is that those who co crazy with
n consecutive occurrences of  - and/or _  in XML will pay for it
in an even crazier 2**n long sequence in the N3.

I'll put a note in the Notation3 document suggesting this.

Tim

----- Original Message -----
From: "Sandro Hawke" <sandro@roads.org>
To: <timbl@w3.org>
Sent: Tuesday, December 04, 2001 10:02 AM
Subject: Petr Cimprich: n3.bnf


>
> Tim, I think he's suggesting allowing "-" in n3 identifiers, which I
> think you don't want because you want to keep it as a possible
> operator.   I'll reply if I don't see some reply from you to him soon.
>
>     -- sandro
>
> ------- Forwarded Message
>
> Return-Path: petr@gingerall.cz
> Delivery-Date: Tue Dec  4 07:44:45 2001
> Return-Path: <petr@gingerall.cz>
> Received: from tux.w3.org (IDENT:root@tux.w3.org [18.29.0.27])
> by alcatraz.hawke.org (8.9.3/8.9.3) with ESMTP id HAA26620
> for <sandro@hawke.org>; Tue, 4 Dec 2001 07:44:43 -0500
> Received: from termit.gingerall.cz (IDENT:root@termit.gingerall.cz
[212.24.153.2])
> by tux.w3.org (8.9.3/8.9.3) with ESMTP id IAA21172
> for <sandro@w3.org>; Tue, 4 Dec 2001 08:45:57 -0500
> Received: from gingerall.cz (macek.gingerall.cz [212.24.153.11])
> by termit.gingerall.cz (8.11.2/8.11.2) with ESMTP id fB4DjpQ01581;
> Tue, 4 Dec 2001 14:45:51 +0100
> Message-ID: <3C0CD2F8.8090508@gingerall.cz>
> Date: Tue, 04 Dec 2001 14:43:20 +0100
> From: Petr Cimprich <petr@gingerall.cz>
> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6)
Gecko/20011120
> X-Accept-Language: en-us
> MIME-Version: 1.0
> To: sandro@w3.org
> Subject: n3.bnf
> Content-Type: text/plain; charset=us-ascii; format=flowed
> Content-Transfer-Encoding: 7bit
>
> Sandro,
>
> I have have written an N3 parser in Perl a while ago according to your
> BNF def
>
(http://dev.w3.org/cvsweb/2001/blindfold/sample/n3.bnf?rev=1.4&content-type=
text/x-cvsweb-markup).
>
>
> I have an issue I have encountered during conversions to and from XML:
> While XML allows to use a hyphen in names, it is prohibited in N3
> localname. How about to change
>
> alphanumeric ::= alpha | [0-9] | "_";
>
> to
>
> alphanumeric ::= alpha | [0-9] | "_" | "-";
>
> Would it mind anything? Hyphen doesn't seem to have any special meaning
> in N3.
>
> Thanks a lot for your time,
> Petr
>
> - --
> Petr Cimprich
> Ginger Alliance
> www.gingerall.com
>
>
> ------- End of Forwarded Message
>
Received on Tuesday, 4 December 2001 15:39:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 November 2012 14:17:15 GMT