- From: Seaborne, Andy <andy.seaborne@hp.com>
- Date: Tue, 10 Jan 2006 10:56:02 +0000
- To: Ivan Mikhailov <imikhailov@openlinksw.com>
- CC: public-rdf-dawg-comments@w3.org
Ivan Mikhailov wrote:
> Hi all,
>
> It seemes to me that the grammar rule
>
> [20] GraphPattern ::=
> Triples? ( GraphPatternNotTriples '.'? GraphPattern )?
>
> should be written as
>
> [20] GraphPattern ::=
> ( Triples '.'? )? ( GraphPatternNotTriples '.'? GraphPattern )?
>
> to let examples in the spec match the grammar. Consider examples in
> sections 5.1, 5.2 etc. and note occurencies of '.' immediately before
> OPTIONAL keywords.
>
> If changed, the grammar will remain 'yacc-friendly' LL(1).
>
> Best Regards,
> Ivan Mikhailov,
> OpenLink Software.
>
Ivan,
The "Triples" rules can end in a DOT itself so it does cover the case of '.'
followed by OPTIONAL.
[28] Triples ::= Triples1 ( '.' Triples? )?
This allows for
{ :s :p :o . }
The test suite has
http://www.w3.org/2001/sw/DataAccess/tests/#syntax-struct-03-rq
http://www.w3.org/2001/sw/DataAccess/tests/#syntax-struct-04-rq
which contain
{ :p :q :r OPTIONAL { :a :b :c } }
and
{ :p :q :r . OPTIONAL { :a :b :c } }
respectively to capture the case you highlight.
If this message addresses the comment raised, please let us know. (If you
respond with [CLOSED] in the subject line it will allow the issue tracking
scripts to close this issue.)
Andy
Received on Tuesday, 10 January 2006 11:12:33 UTC