Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments in queries lead to parse exception #17

Open
keski opened this issue Mar 9, 2016 · 0 comments
Open

Comments in queries lead to parse exception #17

keski opened this issue Mar 9, 2016 · 0 comments
Assignees
Labels

Comments

@keski
Copy link

keski commented Mar 9, 2016

Using CSPARQL-ReadyToGoPack-0.9.6 I get a parsing error when I include comments in queries. This query works fine:

REGISTER QUERY ex AS 

SELECT *
FROM STREAM <http://org.ex#stream> [RANGE 5s STEP 1s]
WHERE {
    ?s ?p ?o .
}

while this one gives an error:

# Some comment
REGISTER QUERY ex AS 

SELECT *
FROM STREAM <http://org.ex#stream> [RANGE 5s STEP 1s]
WHERE {
    ?s ?p ?o .
}
eu.larkc.csparql.core.new_parser.ParseException: Encountered " <SYMBOL> "# "" at line 1, column 1.
Was expecting:
    "register query " ...

    at eu.larkc.csparql.core.new_parser.CsparqlParser.generateParseException(CsparqlParser.java:1517)
    at eu.larkc.csparql.core.new_parser.CsparqlParser.jj_consume_token(CsparqlParser.java:1402)
    at eu.larkc.csparql.core.new_parser.CsparqlParser.RegisterClause(CsparqlParser.java:205)
    at eu.larkc.csparql.core.new_parser.CsparqlParser.Query(CsparqlParser.java:41)
    at eu.larkc.csparql.core.new_parser.CsparqlParser.createAndParse(CsparqlParser.java:36)
    at eu.larkc.csparql.core.new_parser.utility_files.CSparqlTranslator.translate(CSparqlTranslator.java:51)
    at eu.larkc.csparql.core.engine.CsparqlEngineImpl.registerQuery(CsparqlEngineImpl.java:298)
    at org.ecare.example.HelloEcare.main(HelloEcare.java:59)
Exception in thread "main" java.lang.NullPointerException
    at eu.larkc.csparql.core.engine.CsparqlEngineImpl.registerQuery(CsparqlEngineImpl.java:305)
    at org.ecare.example.HelloEcare.main(HelloEcare.java:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants