W3C home > Mailing lists > Public > public-rif-comments@w3.org > September 2009

EBNF grammar of presentation syntax

From: Carlos Damásio <cd@di.fct.unl.pt>
Date: Wed, 9 Sep 2009 16:54:43 +0100
Message-Id: <6CE1FAD9-A654-48F5-AA50-D51ED8261E78@di.fct.unl.pt>
To: public-rif-comments@w3.org
Dear all,


In first place, my congratulations to this nice and necessary work. I  
have just started  playing around with Prolog parsers for RIF and  
realized that theEBNF grammar is ambiguous, as noticed before by Axel
(see http://lists.w3.org/Archives/Public/public-rif-wg/2009Aug/0003.html) 
.

I found very problematic the Name and Var productions which use  
Unicode Strings which are not delimited. For instance the fragment,

Document(
Dialect(  anasty ) dialect ))Base( <http://www.dot.com> )
)

What is the appropriate parsing of this Document? Where does Dialect  
end?
Even for this

Document(
Dialect(FOL)Base( <http://www.dot.com> )
)

a possible parsing according to the grammar is to understand this as a  
single dialect declaration "FOL)Base( <http://www.dot.com> ".

I even think that Vars are more problematic because they can appear in  
sequences like

atom(?x?y ?z)

How many vars are there? 1(a var named "x?y ?z), 2( a var named "x?y"  
and other named "z") or 3?

The same applies to UNITERMs like this

atom( ?x->y->z)

A possible way out is to say that some special characters are not  
allowed in Names and use escaped chars for spaces, question marks, "- 
 >", etc. The exact set of non allowed sequences is to be carefully
defined because of possible interactions with other grammar productions.

Best regards,

Carlos
Received on Wednesday, 9 September 2009 15:55:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 September 2009 15:55:17 GMT