W3C home > Mailing lists > Public > public-rif-wg@w3.org > March 2008

Re: BNF (and XML) grammar extensibility

From: Michael Kifer <kifer@cs.sunysb.edu>
Date: Tue, 11 Mar 2008 11:21:20 -0400
To: Christian de Sainte Marie <csma@ilog.fr>
Cc: RIF WG <public-rif-wg@w3.org>
Message-ID: <6862.1205248880@cs.sunysb.edu>



> Michael,
> 
> Just a couple questions for clarification.
> 
> Michael Kifer wrote:
> > 
> > FLD Grammar:
> > 
> >    Formulaset     ::= 'RIFSet(' absolute-IRI? Metadata* Formula* ')'
> >    Formula        ::= 'Formula(' FORMULACONTENT ')'
> 
> Shouldn't that be:
>   Formula    ::= 'Formula('' absolute-IRI? Metadata* FORMULACONTENT ')'

Yes. (After correcting the typo.)


> >    FORMULACONTENT ::= 'And' '(' FORMULACONTENT* ')' |
> >                       'Or' '(' FORMULACONTENT* ')' |
> > 		      FORMULACONTENT ':-' FORMULACONTENT |
> >                       'Exists' Var+ '(' FORMULACONTENT ')' |
> >                       'Forall' Var+ '(' FORMULACONTENT ')' |
> 
> So, FLD allows nested quantifiers, right?

Yes.

> 
> > BLD grammar:
> > 
> >    Ruleset        ::= 'RIFSet(' absolute-IRI? Metadata* Rule* ')'
> >    Rule           ::= 'Rule(' absolute-IRI? Metadata* RULECONTENT ' ) '
> >    RULECONTENT    ::= 'Forall' Var+ '(' BLDATOMIC (':-' CONDITION)? ')' | BLDATOMIC (':-' CONDITION)?
> 
> And BLD does not (and, thus, neither does Core). But this does not 
> forbid PRD to allow it, if needed; correct?


Yes. FLD is much more general, and dialects can use the space between the
core and what FLD allows.


> >    // from here on the grammar is the same as in FLD
> >    Metadata       ::= ' Metadata ( ' METADATALIST ' ) '
> >    METADATALIST   ::= absolute-IRI METADATAVALUE | METADATALIST ' ; ' METADATALIST
> 
> Why not:
>    METADATALIST  ::=  absolute-IRI METADATAVALUE ( ' ; ' METADATALIST)?

I do not know -- ask Jos.


      cheers
	--michael  

> 
> Cheers,
> 
> Christian
> 
> 
Received on Tuesday, 11 March 2008 15:21:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:33:47 GMT