[ocaml-infra] Fwd: [opam-repository] Add ocaml-markdown 0.1.1 (#863)

Dario Teixeira darioteixeira at yahoo.com
Tue Jul 2 14:18:23 BST 2013


Hi,

> Not quite in-topic because it is about parsers for mardown-like

> languages, rather than markdown itself (if "Markdown" really exists as
> a well-defined language with several compatible implementations), but
> the following project are possibly interesting:

Author of Lambdoc here.  Indeed, I would love for Lambdoc to support
Markdown as well.  But as Gabriel pointed out, there is no such thing
as *the* Markdown.  Still, even if Markdown standardisation efforts
fail (and I haven't heard any news on that front for a while), it is my
intention to eventually just adopt the flavour used by StackOverflow or
Github.


> - lambdoc ( http://lambdoc.forge.ocamlcore.org/ ) is a pandoc-inspired
> library that supports several syntaxes, among which a markup/wiki
> syntax http://lambdoc.forge.ocamlcore.org/lambwiki-manual/index.html ;
> the parsing engines use more classical tools: ulex for lexing, some
> magical context-dependent stuff, then menhir for parsing

Lambwiki is a lightweight markup that fills the same niche as Markdown.
However, syntax-wise it is actually inspired by WikiCreole, whose syntax
I find to be cleaner and more intuitive than Markdown's.

As for the tooling, both Lambwiki and Lambtex do indeed rely on a
hand-made intermediate layer between ulex and menhir to handle the
context-dependent stuff.  It's not pretty, and I welcome suggestions
on how to handle the whole parsing chain in a cleaner way.

As for the Lambdoc library as a whole, it's feature-wise stable, and
I'm not aware of any pressing bugs.  There has not yet been an official
1.0 release because a) I can't yet commit to make no further tweaks
to the AST, and b) the API documentation cannot be readily generated
due an issue with OCamldoc: http://caml.inria.fr/mantis/view.php?id=4209


> Both are regularly maintained (but the mlorg website is in a sorry
> state) and could be credible basis for cooperation with Cow's need
> (basically you need a library with a markdown parser that returns a
> friendly AST to implement your camlp4 quotations, and you need their
> parser to handle antiquotations) while reinforcing the upstream
> project. That said, a strong markdown-only library would also be a
> positive asset in the OCaml ecosystem, and probably wouldn't need that
> generality.

Mauricio Fernandez wrote a basic Markdown parser which might fit
your needs well.  Have you looked at it yet?

Best regards,
Dario Teixeira


More information about the Infrastructure mailing list