W3C home > Mailing lists > Public > public-rdf-wg@w3.org > June 2012

Re: PN_LOCAL_ESC

From: Gavin Carothers <gavin@carothers.name>
Date: Wed, 13 Jun 2012 08:32:34 -0700
Message-ID: <CAPqY83wPquEyHE9r+z8M9uSZr08CW7TeMNk1k149HiP-TMU8eA@mail.gmail.com>
To: Andy Seaborne <andy.seaborne@epimorphics.com>
Cc: public-rdf-wg@w3.org
On Wed, Jun 13, 2012 at 8:22 AM, Andy Seaborne
<andy.seaborne@epimorphics.com> wrote:
> another rule presentation issue:
>
> [166s]  PN_LOCAL_ESC    ::=     '\' '_' | '~' | '.' | '-' | '!' | '$' | '&'
> | "'" | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' |
> '%'
>
> in summary:
>
> [166s]  PN_LOCAL_ESC    ::=     '\' '_' | '~' | .... | '@' | '%'
>
> It would be clearer to add ( ) to show that '\' takes one of the char, not
> just the first '_'
>
> Suggested change:
>
> [166s]  PN_LOCAL_ESC    ::=     '\' ( '_' | '~' | .... | '@' | '%' )

[166s] PN_LOCAL_ESC ::= '\' ( '_' | '~' | '.' | '-' | '!' | '$' | '&'
| "'" | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' |
'@' | '%' )

... huh... I think that's an HTML generation bug :(

>                                    ^                              ^
>        Andy
>
> On 12/06/12 19:59, Andy Seaborne wrote:
>>
>>
>> The grammar rule for DECIMAL is
>>
>> [21] DECIMAL ::= (([+-])? ([0-9])+ '.' ([0-9])+) | ('.' ([0-9])+)
>> ^ ^
>>
>> which seems to have brackets in the wrong place.
>> It puts +/- only on the first form.
>>
>> Rewritten with whitespace:
>>
>> (([+-])? ([0-9])+ '.' ([0-9])+)
>> |
>> ('.' ([0-9])+)
>>
>> so .3 is legal but +.3 isn't.
>>
>> Should that be:
>>
>> ([+-])?
>> ( ( ([0-9])+ '.' ([0-9])+ )
>> |
>> ('.' ([0-9])+)
>> )
>>
>> ie.
>>
>> ([+-])? ( ( ([0-9])+ '.' ([0-9])+ ) | ('.' ([0-9])+) )
>> ^1 ^1
>> ^2 ^2
>>
>> simpler is
>>
>> ([+-])? ( ([0-9])* '.' ([0-9])+ )
>>
>> (this respects ISSUE-18).
>>
>> - - - -
>> [22] DOUBLE ::= (([+-])? ([0-9])+ '.' ([0-9])+ EXPONENT) | ('.' ([0-9])+
>> EXPONENT) | (([0-9])+ EXPONENT)
>>
>> (([+-])? ([0-9])+ '.' ([0-9])+ EXPONENT) | ....
>> ^ ^
>>
>> suffers a similar problem.
>>
>> Should be:
>>
>> ([+-])? ( [0-9]+ '.' [0-9]* EXPONENT | '.' ([0-9])+ EXPONENT | ([0-9])+
>> EXPONENT )
>>
>> Andy
>>
>> PS
>>
>> .3 is illegal in N3 as is +.3 and -.3
>> N3 requires a digit before the dot.
>> Except it does not require the dot in the EBNF:
>>
>> N3 grammar:
>> [-+]?[0-9]+\\.[0-9]*
>> or EBNF:
>> decimal ::= [-+]?[0-9]+(\.[0-9]+)?
>>
>> which are different and the latter reflects the old decimal/integer
>> issue in turtle and N3
>>
>
Received on Wednesday, 13 June 2012 15:33:07 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:49 GMT