ANTLR and MD

http://www.cforcoding.com/2010/01/jmd-markdown-and-brief-overview-of.html
and
http://www.cforcoding.com/2010/02/markdown-inline-parsing-and-badly.html
http://www.cforcoding.com/2010/02/markdown-block-parsing-and-road-to-hell.html
Others look at alternatives
http://stackoverflow.com/questions/605434/how-would-you-go-about-parsing-markdown

On PEG MD parsers
http://www.cforcoding.com/2010/01/markdown-and-introduction-to-parsing.html
In particular.
John MacFarlane said...
PEG isn't *quite* capable of parsing markdown, so I had to resort to
some workarounds ....
(In the comments)  where John adds a link to his Lua implementation
http://github.com/jgm/lunamark
which he believes to be the best PEG library.

https://github.com/jgm/markdown-peg/blob/master/Markdown.hs#L68  is
the grammar used on
the Haskell implementation.

https://github.com/jgm/peg-markdown A C implementation, again PEG based.

Johns critique of plain English spec, support for a grammar based one
http://six.pairlist.net/pipermail/markdown-discuss/2008-May/001302.html


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

Other approaches?
Options?

State machine + line based parsing?

Code based on plain English.? IS that a spec, or just another implementation.

Suggestions please.

regards


-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk

Received on Friday, 7 December 2012 11:13:16 UTC