-
Notifications
You must be signed in to change notification settings - Fork 576
Open
Labels
Description
SPARQLWrapper's way to judge given query's type is to match clauses with regex patterns. So I'm trying to use from rdflib.plugins.sparql.parser import parseQuery, parseUpdate
for judging.
But I found few queries in test_wrapper.py was refused by parseUpdate
.
parseUpdate("WITH <urn:graph> DELETE DATA { <urn:john> <urn:likes> <urn:surfing> }")
pyparsing.exceptions.ParseException: Expected end of text, found 'WITH' (at char 0), (line:1, col:1)
parseUpdate("PREFIX e: <http://example.org/> INSERT {e:a e:b e:c}")
pyparsing.exceptions.ParseException: Expected end of text, found 'INSERT' (at char 32), (line:1, col:33)
I think these queries are valid and some parser syntaxes related to parseUpdate
are wrong.