W3C home > Mailing lists > Public > public-media-fragment@w3.org > March 2009

Nifty ABNF tool, and error in ABNF syntax

From: Jack Jansen <Jack.Jansen@cwi.nl>
Date: Thu, 26 Mar 2009 14:46:11 +0100
Message-Id: <AE89DF4D-E8FC-4103-A019-AF9686A42D4C@cwi.nl>
To: Yves Lafon <ylafon@w3.org>
Cc: Media Fragment <public-media-fragment@w3.org>
I came across a nitfy tool: abnfgen <http://www.quut.com/abnfgen>.

It reads an abnf syntax and then generates random strings that adhere  
to that syntax. Very handy to test a parser. Your syntax needed a bit  
of minor massaging before abnfgen liked it, such as including the  
definitions for pchar and such that you've included by reference, and  
getting rid of the boring productions (like the non-media-fragment  
alternative in segment).

One of the first things it did was point out a problem with the  
syntax, I think:
	utf8string    = "'" *pchar "'"
But: single quote is also part of pchar, so this would allow a  
production of 'a'b', which I think is not what was intended.
--
Jack Jansen, <Jack.Jansen@cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma  
Goldman
Received on Thursday, 26 March 2009 13:46:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 21 September 2011 12:13:32 GMT