-->
> Heres a BNF version of something close to SKIF, which is about the
> simplest logical BNF I can think of. You tell me how to bundle-ize
> it. The exact use of parens here is lisp style, but that's not
> important. We could miss out the <term> clause and say
> relationalAtomicSentence ::= (word+) if that would be easier, but it
> would be a pity.
>
> word ::= qname |URIreference |Variable
> <comment> analogous to identifiers in programming language; basic
> lexical items used to 'name' things </comment>
sentence ::= (relAtomicSentence | propSentence |quantSentence) word ::= (qname|URIreference|variable) term ::= (word | {word term*} | [term term term])as list:
term ::= (word | [word term list]|[word term|nil nil] | [term term term])> relAtomicSentence ::= (term+)
> propSentence ::= (not sentence) | (and|or sentence*) | (=>|iff
> sentence sentence)
> quantSentence ::= (forall|exist (variable+) sentence)
> document ::= sentence*
>
relAtomicSentence ::= [term {term*} nil] propSentence ::= ([not sentence nil] | [(and|or) {sentence*} nil] | [(iff|implies) sentence sentence]) quantSentence ::= [(forall|exist) variable|{variable+} sentence]relAtomicSentence ::= [term term list]|[term term|nil nil] varList ::= [etc variable varList|nil] quantSentence ::= [(forall|exist) variable|varList sentence]Now suppose a 'RDF' schema language (as an extension to RELAXNG
http://relaxng.org and whose formal semantics could be written as an
extension of the formal semantics of RELAXNG). The purpose of this language
is to declare constraints on the values of the elements of triples. This is
in "tree regular expression" form and mirrors the form of the schema for the
RDF Surface Syntax http://www.openhealth.org/RDF/RDFSurfaceSyntax or
http://www.openhealth.org/RDF/RDF.rng<define name="sentence">
<choice>
<ref name="relAtomicSentence"/>
<ref name="propSentence"/>
<ref name="quantSentence"/>
</choice>
</define><define name="relAtomicSentence">
<statement>
<predicate>
<term/>
</predicate>
<subject>
<bundle/>
</subject>
<object>
<nil/>
<object>
</statement>
</define>
<define name="propSentence">
<choice>
<statement>
<predicate name="not"/>
<subject>
<ref name="sentence"/>
</subject>
</statement>
<statement>
<choice>
<predicate name="and"/>
<predicate name="or"/>
</choice>
<subject>
<bundle/>
</subject/>
</statement>
<statement>
<choice>
<predicate name="iff"/>
<predicate name="implies"/>
</choice>
<subject>
<ref name="sentence"/>
</subject>
<object>
<ref name="sentence"/>
</object>
</statement></define><define name="quantSentence">
<statement>
<choice>
<predicate name="forall"/>
<predicate name="exists"/>
</choice>
<subject>
<oneOrMore>
<variable/>
</oneOrMore/>
</subject>
<object>
<ref name="sentence"/>
</object>
</statement>
</define>