W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > August 2005

Re: Please make sure the grammar is directly machine consumable.

From: Yosi Scharf <syosi@MIT.EDU>
Date: Mon, 22 Aug 2005 14:55:46 -0400
Message-ID: <430A1FB2.8070207@mit.edu>
To: "Seaborne, Andy" <andy.seaborne@hp.com>, "Eric Prud'hommeaux" <eric@w3.org>
CC: public-rdf-dawg-comments@w3.org

I just worked on what it would take to change the current TR to be
LALR(1). The results are in
http://www.w3.org/2005/01/yacker/uploads/yosiAugust22 . The changes are:

1) All of the changes necessary to get yacker to work (@terminals,
@pass, '\\')
2) The following change to GraphPattern:
---------------------------------------------------------------
syosi@mr-burns:/tmp$ diff old.grammar new.grammar
22c22,26
< [20]          GraphPattern      ::=           ( Triples '.'? )? (
GraphPatternNotTriples '.'? GraphPattern )?
---
> [20]          GraphPattern       ::=          ( Triples1
GraphPatternTail | GraphPatternNotTriples GraphPatternNotTriplesTail )?
> [20a]         GraphPatternTail           ::=          ( '.'
GraphPattern )?
> | GraphPatternNotTriplesList
> [20b]         GraphPatternNotTriplesTail         ::=          ( '.'?
GraphPattern )
> [20c]         GraphPatternNotTriplesList         ::=         
GraphPatternNotTriples GraphPatternNotTriplesTail
28,29c32,33
< [26]    ConstructTemplate       ::=           '{' Triples? '.'? '}'
< [27]    Triples         ::=           Triples1 ( '.' Triples )?
---
> [26]          ConstructTemplate         ::=           '{' Triples? '}'
> [27]          Triples           ::=           Triples1 ( '.' Triples? )?
----------------------------------------------------------------------

This change is simple, and makes the grammar LALR(1). It should be done,
regardless of any other change.

Yosi
Received on Monday, 22 August 2005 18:56:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:01:21 UTC