gjhiggins/rdflib — Issue #20: RDF parser blows up on SPARQL Example 8.3.3
Author: gjhiggins
Created: 2011-10-19 00:56:07+00:00
State: open
Labels: Type-Defect

Originally filed by bob.macg...@gmail.com on 2008-03-05T07:18:59

What steps will reproduce the problem?
1. Set up any Graph at all.
2. Call Graph.query on the SPARQL query below, taken from section 8.3.3. of
the SPARQL spec.
3.

What is the expected output? What do you see instead? I see this:
rdflib INFO: version: 2.4.0
Traceback (most recent call last):
File
"/Users/bmacgregor/Documents/eclipse-python/hinote/src/hinotesite/flex/test.py",
line 122, in
elif switch == 5: test4()
File
"/Users/bmacgregor/Documents/eclipse-python/hinote/src/hinotesite/flex/test.py",
line 79, in test4
graph.query(query)
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/rdflib-2.4.0-py2.5-macosx-10.3-fat.egg/rdflib/Graph.py",
line 679, in query
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/rdflib-2.4.0-py2.5-macosx-10.3-fat.egg/rdflib/sparql/bison/Processor.py",
line 28, in query
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/rdflib-2.4.0-py2.5-macosx-10.3-fat.egg/rdflib/sparql/bison/Processor.py",
line 18, in Parse
SyntaxError: parse error at line 5, column 1: reached end-of-input,
expecting 'RIGHT_CURLY'

What version of the product are you using? On what operating system?
version: 2.4.0 on Mac OS X

Please provide any additional information below.

PREFIX data:
PREFIX foaf:
PREFIX rdfs:

SELECT ?mbox ?nick ?ppd
FROM NAMED
FROM NAMED
WHERE
{
GRAPH data:aliceFoaf
{
?alice foaf:mbox ;
foaf:knows ?whom .
?whom foaf:mbox ?mbox ;
rdfs:seeAlso ?ppd .
?ppd a foaf:PersonalProfileDocument .
} .
GRAPH ?ppd
{
?w foaf:mbox ?mbox ;
foaf:nick ?nick
}
}