1. Georg Brandl
  2. pygments-main
Issue #215 new

Review N3/Turtle lexers vs another version

Anonymous created an issue

I have created a new lexer for n3/turtle and will be adding SPARQL to the package.

A more complete description including trac and svn access to it are at:

http://trac.openvest.org/wiki/n3SyntaxHighlighting#Pygments

Do with it what you wish.

Any Semantic web hackers should contact me about extending this area with better n3 support (right now it is pretty much the turtle subset) and or SPARQL support.

Reported by guest

Comments (18)

  1. Anonymous

    Replying to [comment:1 blackbird]: Some info on what it is at the [http://trac.openvest.org/wiki/n3SyntaxHighlighting#Pygments link posted].

    Folks who have already drank the Semantic web coolaid should recognize the referneces. If you haven't .... come join us ;-)

  2. Tim Hatch

    We have had SPARQL since 2012 and Turtle since 2014 (I don't know how n3 fits into all this; we don't match *.n3 with any lexer). I think the sprint item here is make sure the file patterns are good, and mark as fixed.

  3. Vladimir Alexiev

    n3 is an extension of turtle, but most software doesn't support those extensions, so you can handle .n3 the same as .turtle.

    I can review the patterns, but where are they? don't see them in https://bitbucket.org/birkenfeld/pygments-main/src/fffc133e5d9e62833dc7f5d10024c182dbe60ef6/pygments/lexers/?at=default.

    For reference, the respective grammars are at:

    Also, we need to list them in doc/languages.rst and maybe other documentation

  4. Vladimir Alexiev

    I checked briefly, and they two lexers seem to follow the grammars.

    https://github.com/gniezen/n3pygments/blob/master/swlexers includes a n3 lexer that you may want to include. It's defined at https://www.w3.org/TeamSubmission/n3, the MIME is text/n3 and extension *.n3

    Minor changes to SparqlLexer:

  5. Vladimir Alexiev

    Tests:

  6. Log in to comment