W3C home > Mailing lists > Public > public-cwm-talk@w3.org > January to March 2009

Re: n3 grammar : ambiguity for integer and decimal

From: <jos.deroo@agfa.com>
Date: Sat, 21 Feb 2009 18:33:51 +0100
To: lc.pvrr@orange.fr
Cc: "DIG group" <diggers@csail.mit.edu>, "++jean marc vanel" <jeanmarc.vanel@gmail.com>, "cwm talk" <public-cwm-talk@w3.org>, public-cwm-talk-request@w3.org, "Yosi Scharf" <syosi@mit.edu>, "Tim Berners-Lee" <timbl@w3.org>
Message-ID: <OFA87FCB2A.2E840EFB-ONC1257564.005F9E08-C1257564.00607BCE@agfa.com>

> There is no problems with "@is", "@of", and "@a"

and I think that is why Tim and Dan in
say that

The grammar is written as without reference to the keywords system at all,
on the assumption that the string has been preprocessed by a keyword 
to put a "@" on all keywords and a ":" on all qnames in the default 

Kind regards,

Jos De Roo | Agfa HealthCare
Senior Researcher | HE/Advanced Clinical Applications Research
T  +32 3444 7618

Quadrat NV, Kortrijksesteenweg 157, 9830 Sint-Martens-Latem, Belgium

"luc peuvrier at home" <lc.pvrr@orange.fr> 
Sent by: public-cwm-talk-request@w3.org
02/21/2009 05:56 PM

"Tim Berners-Lee" <timbl@w3.org>
Jos De Roo/AMDUS/AGFA@AGFA, "cwm talk" <public-cwm-talk@w3.org>, "DIG 
group" <diggers@csail.mit.edu>, "Yosi Scharf" <syosi@mit.edu>, "++jean 
marc vanel" <jeanmarc.vanel@gmail.com>
Re: n3 grammar : ambiguity for integer and decimal

Thank you to take care of my spot.
An other ambiguity I discovered writing n3 parser that I did not 
mentionned is about "is" "of" and "a" keyword.
There is no problems with "@is", "@of", and "@a" since the @ make able to 
distinguish to a qname, it is not the case with "is" "of" and "a" keyword 
because it also match qname non terminal.
I have this since I have the following rules not in n3 grammar:
verb <- ( "is" | "@is" ) expression ( "of" | "@of" )
for the entry  " :jmv is :guru of :luc ."
it match at the same time
  subject propertylist
  |       |
  |       verb object objecttail propertylisttail
  |       |    |      |          |
  |       |    |      void       void
:jmv      is   :guru
  subject propertylist 
  |       |
  |       verb                  object objecttail propertylisttail
  |       |                     |      |          |
  |       "is" expression "of"  |      |          |
  |       |    |          |     |      |          |
:jmv      is   :guru      of    :luc   void       void
so there is a shift/reduce conflict between
verb <- expression
verb <- is expression of
this can be solve saying qname can not have the value "is" "of"
Best regards
Luc Peuvrier
----- Original Message ----- 
From: Tim Berners-Lee 
To: luc peuvrier at home 
Cc: cwm talk ; DIG group ; Yosi Scharf 
Sent: Saturday, February 21, 2009 12:40 AM
Subject: Re: n3 grammar : ambiguity for integer and decimal

Luc, thanks for spotting that. 

It seems to make sense.  I have checked it in as the new n3.n3


On 2009-02 -12, at 18:26, luc peuvrier at home wrote:

Looking for integer and decimal non terminal ( token ) definition on 
following n3 grammar specification:
The ebnf definition for integer and decimal are:
integer : [-+]?[0-9]+
decimal : [-+]?[0-9]+(\.[0-9])?
There is an ambiguity since "123" ( for example ) match integer and 
I propose
decimal : [-+]?[0-9]+\.[0-9]*
Width the above definition "123" match only integer, "123." match decimal. 
This look like C and Java standard for numéric constants
Best regards
Luc Peuvrier
Received on Saturday, 21 February 2009 17:34:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:01:05 UTC