Re: N3.js 0.2.0: now with browser support

Hi,

Sorry if I missed a relevant part of the discussion, but would it be possible to re-use and extend an existing SPARQL parser?

Flint and SparqlEd use a "grammar" for CodeMirror. Unfortunately, I don't know the CodeMirror internals well enough to know whether one can get the full AST out of it AND have proper error reporting.

     http://sindicetech.com/sindice-suite/sparqled/
     https://github.com/TSO-Openup/FlintSparqlEditor

And of course there is Antonio Garrote's project, which includes a PEG-based SPARQL parser - when I tried it out a couple of months ago it however had some severe limitations - such as upper keyword support only - not sure how many things he fixed with his most recent commits :)

https://github.com/antoniogarrote/rdfstore-js
https://github.com/antoniogarrote/rdfstore-js/blob/master/src/js-sparql-parser/lib/pegjs/examples/sparql_query.pegjs

Cheers,
Claus

On 05.12.2013 10:54, Adrian Gschwend wrote:
> On 05.12.13 09:45, Matteo Collina wrote:
>
> Hi Matteo,
>
>> Doing a SPARQL parser in JS is kind-of a priority in this group.
>> Can you put it on github on a permissive license? I'd love to integrate
>> it with levelgraph and levelgraph-n3.
> Actually you were one of the reasons why I thought it would make sense :-D
>
> I will put the lexer online later today, as I said it's primitive and
> based on Rubens N3 lexer. License will be MIT like his code.
>
> I talked to Michael meanwhile he thinks doing that without parser
> generator will be pain in the ass. I thought I will try it based on
> Crockfords article so I'm curious about what you guys with more
> experience think. The benefit of the Top Down Operator Precedence
> approach is that it will be way smaller than generated code from PEG for
> example. Drawback is we have to do all the work in code our self.
>
> regards
>
> Adrian
>

-- 
Dipl. Inf. Claus Stadler
Department of Computer Science, University of Leipzig
Research Group: http://aksw.org/
Workpage & WebID: http://aksw.org/ClausStadler
Phone: +49 341 97-32260

Received on Thursday, 5 December 2013 11:23:39 UTC