Definition of FilteredBasicGraphPattern in SPARQL grammar

It took me quite some time to understand the production rule for
FilteredBasicGraphPattern in the SPARQL grammar, due to the
recursiveness of the definition. I think this production rule
in combination with BlockOfTriples can be reformulated to one of the
following, much simpler, definitions:

FilteredBasicGraphPattern ::=
         ( (TriplesSameSubject|Constraint) '.'? )*

As far as I can see, there is only one difference between these rules
and the rules from the grammar: The rules from the grammar allow
multiple dots after TriplesSameSubject blocks and zero or one dot after
Constraint blocks, whereas the above rule only allows zero or one dot
after both blocks. Alternatively, the above rule can be slightly
modified to allow multiple dots after (both) blocks.

-- 
Arjohn Kampman, Senior Software Engineer
Aduna - Guided Exploration
www.aduna-software.com

Received on Thursday, 26 October 2006 16:03:51 UTC