Markdown grammar definition language

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 UTC