You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Neda Alipanah <ne...@gmail.com> on 2017/10/17 14:14:03 UTC

Jena UpdateFactory Parser Syntax

Hi everyone,
While testing history in the graph I’ve run into occasional stack overflow
when adding the Jena Model to the triplestore using an UpdateRequest.
Initially I was using Syntax.syntaxSPARQL_11 (the default for UpdateFactory)
but after googling a bit I found
http://thread.gmane.org/gmane.comp.apache.jena.user/8195 which makes me
think it is an inherent issue with the SPARQL 1.1 syntax parser and large
updates. Per the recommendation in 8195 I moved to using Syntax.syntaxARQ
which through initial testing seems to have eliminated the stack overflow.
The javadoc for syntaxARQ simply states it is *The query syntax for
extended SPARQL* which doesn’t really tell me a lot. Does anyone know the
difference between syntaxSPARQL_11 vs syntaxARQ?

Thanks
Neda

Re: Jena UpdateFactory Parser Syntax

Posted by Andy Seaborne <an...@apache.org>.
The SPARQL 1.1 parser is exactly the spec.  In fact, the HTML and the Java
parser are built from the same source.  The grammar is LL(1) - i.e. simple
so people can implement easily.

The ARQ parser rewrites the INSERT DATA with a better, javacc specific way
to parse the same language (dynamically changing the lookahead). But it is
not applicable to simple parser generators.

https://github.com/apache/jena/blob/master/jena-arq/Grammar/master.jj#L760

    Andy

On 17 October 2017 at 10:14, Neda Alipanah <ne...@gmail.com> wrote:

> Hi everyone,
> While testing history in the graph I’ve run into occasional stack overflow
> when adding the Jena Model to the triplestore using an UpdateRequest.
> Initially I was using Syntax.syntaxSPARQL_11 (the default for
> UpdateFactory)
> but after googling a bit I found
> http://thread.gmane.org/gmane.comp.apache.jena.user/8195 which makes me
> think it is an inherent issue with the SPARQL 1.1 syntax parser and large
> updates. Per the recommendation in 8195 I moved to using Syntax.syntaxARQ
> which through initial testing seems to have eliminated the stack overflow.
> The javadoc for syntaxARQ simply states it is *The query syntax for
> extended SPARQL* which doesn’t really tell me a lot. Does anyone know the
> difference between syntaxSPARQL_11 vs syntaxARQ?
>
> Thanks
> Neda
>