Tim Berners-Lee, Editor
Date: 1998, last change: $Id: Notation3.html,v 1.49 2001/11/27 23:59:33 timbl Exp $
Status: This document contains aditional resources about N3.

Up to Design Issues

An readable language for the Semantic Web


n3

Notation 3 Resources

Introduction

This accompanies the N3 specification.

Resources on Notation3 include the following:

Try it!

see also SWAG: Notation3 to RDF Converter, which (as of Aug 2001) is more actively maintained than this form.


Also:

Implementations: Grammars and parsers

The original hand-written grammar is a bit crufty; several more formal grammars have been developed.

http://www.w3.org/2000/10/swap/grammar/predictiveParser.py
Some parsers for Notation3 and its subsets (2004)
Parser level written in Author Notes
notation3.py N3 Python Connolly & Berners-Lee Handwritten, used in cwm, W3C open source
RDF/N3 parser. ? Python Graham Kline
n3.py No () or {} Python Sean Palmer 2002. Still extant? Part of Eep
afon N3 Python Sean Palmer Uses regexps. Roughly same speed as notation3.py
RDF::Notation3 ? Perl Ginger Alliance
notation3 parser N3 Java Jos de Roo Part of Agfa's Euler
N3 parser (?) ? Java Andy SeabourneHP Labs Part of HP's Jena
parser ~Turtle, sans lists PHP Gunnar Grimnes Based on SBP's n3.py, GPL
RAP N3-rdf? PHP chris@bizer.de (Chris Bizer) RDF API for PHP is a software package for searching, manipulating, and serving RDF models, integrated RDF/XML, N3 and N-Triple parser and serializer.
Raptor Turtle C Dave Becket Redland compatible
n3.bnf ? blindfold Sandro Hawke Blindfold is a bnf-driven parser.
flaten3 ? lex, yacc Sandro Hawke "A first pass at an n3 parser using lex and yacc"
n3spark.py ? spark Sandro Hawke A re-implementation of RDF/n3 syntax using the SPARK toolsAug 2001; discussion
rfdn3-gram ? yapps Dan Connolly a Yapps grammar for RDF Notation 3Aug 2001; discussion
EulerMoz

was:Samizdat

? Javascript Euler team Euler-inspired inference in Mozilla/Firefox, with Javascript parsers
n3p.py ? Python Sean Palmer See email
n3parser.js n3/rdf Javascript Tim BL See Developer notes for the AJAR RDF Library for Javascript, part of the Tabulator project. (In fact it will parse full N3, but the store doesn't handle quantification of variables.)
"Turtle/N3 parser" ??? Javascript Open Link Software Inc. See Blog Part of their Open Ajax Toolkit.
predictiveParser.py Any level. Python SWAP The predictiveParser is a generic parser whcih is driven directly by the context-free grammar, as annotated by some rules. This parser does not output triples, it just checks the syntax. See Makefile

This list may be very inaccurate and probably out of date. Mail me with differences you know about, and if you are using this stuff check the web sites and google for new implementations

Test Suites

Here are some manifests of test files. A positive parser test is one which an N3 parser should parse. It has a set of NTriples which should be produced. A negative parser test is a file which should produce an error when an N3 parser tries it.

Test files
Tests Level Author Notes
SWAP

n3parsertests.n3

N3 Scharf et al Positive and negative parser tests.
Turtle tests Turtle DavidBeckett Positive and negative parser tests
NTriples examples NTriples ? Do tests exist? Maybe examples from the RDF specs.

Parser implementers are encouraged to generate test results in RDF in the same form, so that results from multiple implementations can be tabulated.