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 ')'

>    FORMULACONTENT ::= 'And' '(' FORMULACONTENT* ')' |
>                       'Or' '(' FORMULACONTENT* ')' |
> 		      FORMULACONTENT ':-' FORMULACONTENT |
>                       'Exists' Var+ '(' FORMULACONTENT ')' |
>                       'Forall' Var+ '(' FORMULACONTENT ')' |

So, FLD allows nested quantifiers, right?

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

>    // 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)?

Cheers,

Christian

Received on Tuesday, 11 March 2008 14:38:07 UTC