W3C home > Mailing lists > Public > public-cwm-talk@w3.org > April to June 2006

a notation3 grammar in XML formal grammar notation / EBNF

From: Dan Connolly <connolly@w3.org>
Date: Fri, 16 Jun 2006 10:49:14 -0500
To: public-cwm-talk@w3.org
Message-Id: <1150472954.19088.28.camel@dirk.w3.org>

I've got this notation3.bnf thing to the point where
I can check it against an interesting set of the tests,
interactively, using yacker.

In the #swig chump...

notation3.bnf 
posted by DanC at 2006-06-16 14:06 (+) tags: 
http://swig.xmlhack.com/2006/06/16/2006-06-16.html#1150466816.116028
DanC: v 1.6 2006/06/16 14:03:38
DanC: transcribed from n3.n3 revision 1.28 date: 2006/02/15
DanC: for use with yacker 
DanC: see interactive syntax checker 
DanC: hmm... doesn't seem to express #-style comments
DanC: v 1.8 2006/06/16 14:28:15 passes
swap/test/syntax/trailing-semicolon.n3, modulo #comments
DanC: syntax/decimal.n3 passes...
DanC: fails syntax/neg-keywords3.n3 . I don't understand why that's not
good N3.
DanC: passes syntax/neg-single-quote.n3
DanC: fails <syntax/neg-thisadoc.n3>. doesn't express constraints on
keywords
DanC: fails <syntax/neg-literal-predicate.n3> . hmm...
DanC: n3.n3 says verb can be expression which can be pathitem which can
be literal

That interactive syntax checker  is
  http://www.w3.org/2005/01/yacker/uploads/notation3?lang=perl

I also moved ebnf2turtle.py into swap and generalized it to take
the grammar namespace from the command line:
  http://www.w3.org/2000/10/swap/grammar/ebnf2turtle.py

So we have:
  http://www.w3.org/2000/10/swap/grammar/notation3.n3
  http://www.w3.org/2000/10/swap/grammar/notation3.rdf
  http://www.w3.org/2000/10/swap/grammar/notation3

This notation.n3 is expressed in an EBNF ontology...
 http://www.w3.org/2000/10/swap/grammar/ebnf
 http://www.w3.org/2000/10/swap/grammar/ebnf.n3
 http://www.w3.org/2000/10/swap/grammar/ebnf.rdf

which has the EBNF ?, +, and * constructs (:opt, :rep, and :star).
So it's slightly higher-level of expressiveness than
http://www.w3.org/2000/10/swap/grammar/n3.n3 and 
http://www.w3.org/2000/10/swap/grammar/bnf .

Now I'm off to report the difference between
<syntax/neg-literal-predicate.n3>  and n3.n3 to public-cwm-bugs...

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E
Received on Friday, 16 June 2006 15:49:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:11:02 GMT