W3C home > Mailing lists > Public > public-markdown@w3.org > December 2012

Markdown grammar definition language

From: Chris Maloney <voldrani@gmail.com>
Date: Wed, 19 Dec 2012 15:06:45 -0500
Message-ID: <CABE9g5ODf_kCPCTZnD=Zbr1UOdT8r7BLq8dCtVBy6NctCJ-iRQ@mail.gmail.com>
To: public-markdown@w3.org
Hi, group,

Unfortunately, try as I might, I’ve been unable to get past the
IP-licensing barrier to join the W3C community group on Markdown.

I noticed that in this page,
http://www.w3.org/community/markdown/wiki/EbnfGrammar, there is an effort
to try to come up with an EBNF for Markdown.  I think that using PEG is a
better choice for this, and that one of John MacFarlane's PEG grammars
would be an excellent starting point.  While writing this, I just noticed
Dave Pawson's recent email, "ANTLR and MD", in the archives, so this is
really a response to that.

Dave, you wrote,

> I'm coming to the conclusion that a grammar based approach has been
> tried and found wanting.

My opinion is that just because John MacFarlane found two edge cases that
PEG couldn't handle, doesn't mean that you should throw the baby out with
the bathwater.  PEG + English is probably the best way to go.  Clearly PEG
is a better choice than EBNF, and *much* better than plain English (which
would be very difficult to get free of ambiguities), or a reference
implementation (which would be opaque to humans and difficult to maintain).

Maybe there is a way to define a PEG+ variant to handle the edge cases.

Chris Maloney
Received on Wednesday, 19 December 2012 20:07:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 19 December 2012 20:07:14 GMT