taking these last comments into account then: consider a sentence an RDF statement (i.e. a triple) where each EBNF production is instead expressed as a constraint on the value and/or type of the predicate subject object. (this is what a classic xml type schema language does)
> sentence ::= relAtomicSentence | propSentence |quantSentence
can we stuff a sentence into a triple and then express these patterns as constraints on the triple?> relAtomicSentence ::= (term+)
relAtomicSentence ::= statement where predicate := 1st term and subject := bundle
> propSentence ::= (not sentence) | (and|or sentence*) | (=>|iff sentence sentence)
notSentence ::= statement where predicate := 'not'
and subject := sentence
andOrSentence ::= statement where predicate := 'and|or' and subject :=
bundle
> quantSentence ::= (forall|exist (variable+) sentence)
quantSentence ::= statement where predicate := 'forall|exist' and subject := variable and object := 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>
</statement>
<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>
...
-Jon