Re: BNF (and XML) grammar extensibility

> 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 UTC