kasei / perlrdf

Deprecated in favor of the Attean package
26 stars 25 forks source link

complex query fails to parse #165

Closed VladimirAlexiev closed 4 years ago

VladimirAlexiev commented 4 years ago

This admittedly long and ugly query fails to parse: wd-mapping.txt (.rq renamed to .txt due to github restrictions).

$ perlrdf query_parse -f wd-mapping.rq
Syntax error: Expected ) in BrackettedExpression near 'in (wd:Q10402097,wd:...' at /usr/share/perl5/RDF/Query/Parser/SPARQL11.pm line 3577.

The failure is on an IN list of about 100 members. Checked on sparql.org and GraphDB, the query is valid.

kasei commented 4 years ago

Confirmed. It's a bug in the parser that seems to accidentally test for IN expressions in a case-sensitive manner in certain cases. If you uppercase IN in the query string, it should work.

FWIW, Attean does parse it correctly.