W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2011

Possible Bug in SPARQL 1.1 Grammar

From: Matthew Perry <matthew.perry@oracle.com>
Date: Wed, 28 Sep 2011 09:14:03 -0400
Message-ID: <4E831D9B.8090908@oracle.com>
To: Andy Seaborne <andy.seaborne@epimorphics.com>
CC: W3C SPARQL Working Group <public-rdf-dawg@w3.org>
Hi Andy,

I was working on a SPARQL 1.1 parser and noticed that this filter did not parse:

FILTER(3+3+4*5*2*3=126)

I believe there is a problem with the AdditiveExpression production:

AdditiveExpression      ::=      MultiplicativeExpression ( '+' MultiplicativeExpression | '-' MultiplicativeExpression | ( NumericLiteralPositive | NumericLiteralNegative ) ( ( '*' UnaryExpression ) | ( '/' UnaryExpression ) )? )*

I think
( ( '*' UnaryExpression ) | ( '/' UnaryExpression ) )*?*
should be
( ( '*' UnaryExpression ) | ( '/' UnaryExpression ) )***

Of course, I could have made a mistake somewhere else to cause the problem too.

Thanks,
Matt
Received on Wednesday, 28 September 2011 13:14:34 GMT

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