W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2010

Re: yacker grammar

From: Eric Prud'hommeaux <eric@w3.org>
Date: Tue, 19 Oct 2010 02:03:29 -0400
To: public-rdf-dawg@w3.org
Message-ID: <20101019060327.GE28153@w3.org>
* Eric Prud'hommeaux <eric@w3.org> [2010-10-18 23:21-0400]
> I updated the
>   http://www.w3.org/2005/01/yacker/uploads/SPARQL_11?lang=perl
> yacker grammar to reflect
>   http://www.w3.org/2009/sparql/docs/sparql-grammar-11
> with three small changes:
> 
> Added a "top" to put all of SPARQL under one start production:
> + [0]	Top 	  ::=   	QueryUnit | UpdateUnit

Removed ()s around RHSs on:
~ [19]	GroupCondition 	  ::=   	BuiltInCall | FunctionCall | '(' Expression ( 'AS' Var )? ')' | Var
~ [24]	LimitOffsetClauses 	  ::=   	LimitClause OffsetClause? | OffsetClause LimitClause?
~ [62]	ArgList 	  ::=   	NIL | '(' 'DISTINCT'? Expression ( ',' Expression )* ')'
~ [63]	ExpressionList 	  ::=   	NIL | '(' Expression ( ',' Expression )* ')'


> Moved the WS*s out of 36-38 and split 39 to avoid the reduce-reuse-recyle error:
> ~ [36]	InsertData 	  ::=   	'INSERT' 'DATA' QuadData
> ~ [37]	DeleteData 	  ::=   	'DELETE' 'DATA' QuadData
> ~ [38]	DeleteWhere 	  ::=   	'DELETE' 'WHERE' QuadPattern # ???
> ~ [39]	Modify 	  ::=   		( DeleteClause InsertClause? | InsertClause ) UsingClause* 'WHERE' GroupGraphPattern
> ~ | ( 'WITH' IRIref ) ( DeleteClause InsertClause? | InsertClause ) UsingClause* 'WHERE' GroupGraphPattern
> 
> Why do we need QuadData and QuadPattern?
> ~ [46]	QuadData 	  ::=   	'{' Quads '}' # ???
> 
> Removing DeleteWhere and s/QuadPattern/QuadData/g gives no S/R errors.

Separated 'NOT' 'IN' and 'NOT' 'EXISTS' and shortened RelationalExpression
~ [99]	RelationalExpression 	  ::=   	NumericExpression RelativeExpression?
~ [00]    RelativeExpression 	  ::=		'=' NumericExpression
| '!=' NumericExpression
| '<' NumericExpression
| '>' NumericExpression
| '<=' NumericExpression
| '>=' NumericExpression
| 'IN' ExpressionList
| 'NOT' 'IN' ExpressionList
~[109]  	NotExistsFunc 	  ::=   	'NOT' 'EXISTS' GroupGraphPattern

Grouped like aggregate expressions:
~ [110]  	Aggregate 	  ::=   	'COUNT' '(' 'DISTINCT'? ( '*' | Expression ) ')' | ( 'SUM' | 'MIN' | 'MAX' | 'AVG' | 'SAMPLE' ) '(' 'DISTINCT'? Expression ')' | 'GROUP_CONCAT' '(' 'DISTINCT'? Expression ( ';' 'SEPARATOR' '=' String )? ')'


> -- 
> -ericP

-- 
-ericP
Received on Tuesday, 19 October 2010 06:04:07 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:44 GMT