Open Public-Health-Bioinformatics opened 9 years ago
I should add - this is happening server-side with node.js . I'm not familiar enough with node.js yet to know if there are differences in javascript behaviour browser side vs. server side aside from file-system access.
If there is anything I/others can do to encourage development on this project - it could be worth a page on wiki to describe.
Regards,
Damion
I also encountered this issue. The parser breaks when the OPTIONAL {} is nested inside a GRAPH ?g {} block. So the query
SELECT * WHERE { GRAPH ?g { ?s ?p ?o . OPTIONAL { ?o a ?thing . } } }
fails to parse, whereas the equivalent
SELECT * WHERE { GRAPH ?g { ?s ?p ?o . } OPTIONAL { GRAPH ?g { ?o a ?thing . } } }
is fine.
When running this query which apparently has an OPTIONAL expression that doesn't match anything...
Ran into this error:
/Users/damion/Documents/IRIDA/node_js/node_modules/rdfstore/src/parser.js:865 for(var j=0; j<ts.triplesContext.length; j++) { ^ TypeError: Cannot read property 'length' of undefined at peg$consts.type (/Users/damion/Documents/IRIDA/node_js/node_modules/rdfstore/src/parser.js:865:51) at peg$parseRule (/Users/damion/Documents/IRIDA/node_js/node_modules/rdfstore/src/parser.js:3077:40) at peg$parseRule ... [Finished in 0.4s with exit code 1]
A possible error trap of the situation I tried: line 864 of parser.js - adding test for ts.triplesContext existence. Not sure if this is appropriate: