Treetop or like grammar for Markdown (in Ruby)

Costa Shapiro costa at mouldwarp.com
Mon Oct 19 12:40:52 EDT 2009


Thanks John, but I've already seen these options.
I'm looking for a nicer Ruby option (with on-the-fly object creation)
which will be easy to extend.

Say, if I had Markdown in Treetop, I could use it for higher-level
object-in-text recognition by just adding some higher-level rules.
Such a parser may serve not only format conversions, but also do
semantic data extraction and such.

I'm not currently aimed at the highest performance, but rather
accessibility of extension.

Any ideas are welcome, of course.

Costa.

+++ John MacFarlane [Oct 18 09 18:47 ]:

> I've built three different markdown implementations on top of PEG

> grammars:

>

> peg-markdown (C): http://github.com/jgm/peg-markdown

> lunamark (lua): http://github.com/jgm/lunamark

> markdown-peg (haskell): http://github.com/jgm/markdown-peg

>

> Ryan Tomayko has created ruby bindings for peg-markdown

> and packaged it as a gem: http://github.com/rtomayko/rpeg-markdown/

>

> John

>

> +++ Costa Shapiro [Oct 19 09 02:27 ]:

> > Has anyone seen any attempts to give Markdown a PEG (parsing

> > expressions grammar) recognizable by some ruby PEG parser generator

> > grammar like Treetop?

> > http://treetop.rubyforge.org/

> > _______________________________________________

> > Markdown-Discuss mailing list

> > Markdown-Discuss at six.pairlist.net

> > http://six.pairlist.net/mailman/listinfo/markdown-discuss

> _______________________________________________

> Markdown-Discuss mailing list

> Markdown-Discuss at six.pairlist.net

> http://six.pairlist.net/mailman/listinfo/markdown-discuss



More information about the Markdown-Discuss mailing list