You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Marco Balduini <ma...@polimi.it> on 2014/02/07 15:00:17 UTC

SPARQL 1.1 bnf file

Dear all,

we are trying to add a new aggregation in ARQ.
We are testing different ways to achieve this goal and to deeply understand the SPARQL11 parser we need the BNF file of the grammar but we can't find it anywhere.
In the jena distro we can only find the jj files automatically generated by javaCC.

Can you help us with some pointers or explanations?
Many thanks in advance.

Bests,
Marco






Re: SPARQL 1.1 bnf file

Posted by Marco Balduini <ma...@polimi.it>.
Thank you very much!!

Marco

On 07/feb/2014, at 15:19, Andy Seaborne <an...@apache.org> wrote:

> On 07/02/14 14:00, Marco Balduini wrote:
>> Dear all,
>> 
>> we are trying to add a new aggregation in ARQ.
>> We are testing different ways to achieve this goal and to deeply understand the SPARQL11 parser we need the BNF file of the grammar but we can't find it anywhere.
>> In the jena distro we can only find the jj files automatically generated by javaCC.
>> 
>> Can you help us with some pointers or explanations?
>> Many thanks in advance.
>> 
>> Bests,
>> Marco
> 
> Hi Marco,
> 
> See
> http://svn.apache.org/repos/asf/jena/trunk/jena-arq/Grammar/
> 
> The file master.jj is the input to JavaCC (in fact, this also generates the HTML in spec so that is the ABNF).
> 
> http://www.w3.org/TR/sparql11-query/#sparqlGrammar
> 
> The process is carried out by the script 'grammar'.  It runs cpp over master.jj, once for strict and once for extended forms.
> 
> The maven "-source" artifact only has the javacc output because the grammar does not get built each time.
> 
> The true source is available from http://www.apache.org/dist/jena/source/ -- it's the state of trunk at the time of release.
> 
> 	Andy
> 


Re: SPARQL 1.1 bnf file

Posted by Andy Seaborne <an...@apache.org>.
On 07/02/14 14:00, Marco Balduini wrote:
> Dear all,
>
> we are trying to add a new aggregation in ARQ.
> We are testing different ways to achieve this goal and to deeply understand the SPARQL11 parser we need the BNF file of the grammar but we can't find it anywhere.
> In the jena distro we can only find the jj files automatically generated by javaCC.
>
> Can you help us with some pointers or explanations?
> Many thanks in advance.
>
> Bests,
> Marco

Hi Marco,

See
http://svn.apache.org/repos/asf/jena/trunk/jena-arq/Grammar/

The file master.jj is the input to JavaCC (in fact, this also generates 
the HTML in spec so that is the ABNF).

http://www.w3.org/TR/sparql11-query/#sparqlGrammar

The process is carried out by the script 'grammar'.  It runs cpp over 
master.jj, once for strict and once for extended forms.

The maven "-source" artifact only has the javacc output because the 
grammar does not get built each time.

The true source is available from 
http://www.apache.org/dist/jena/source/ -- it's the state of trunk at 
the time of release.

	Andy