Re: [Turtle] EBNF error? (decimal and integer)

From: Gavin Carothers <gavin@topquadrant.com>
Subject: [Turtle] EBNF error? (decimal and integer)
Date: Wed, 30 Mar 2011 17:32:18 -0500

> Had a bit more confusion regarding integer and decimal. From the
> starting point:
> http://www.w3.org/TeamSubmission/turtle/#sec-grammar-grammar
> 
> [16] integer ('-' | '+') ? [0-9]+
> [18] decimal ('-' | '+')? ( [0-9]+ '.' [0-9]* | '.' ([0-9])+ | ([0-9])+ )
> 
> Sure looks (and I interpreted as) as if those both match the same
> string. Happy to be told I'm just reading it wrong.
> 
> Cheers,
> Gavin

Looks like it to me as well.  I expect that the production for decimal
was derived from the production for double

My suggested fix would be 

[16] integer ('-' | '+') ? [0-9]+
[18] decimal ('-' | '+')? ( [0-9]+ '.' [0-9]* | '.' ([0-9])+  )

But wait, this has already been done, in effect, in the newer version at

http://www.w3.org/2010/01/Turtle/

peter

Received on Thursday, 31 March 2011 01:42:28 UTC