3 ms·
http://vfmd.org http://vfmd.org has an exhaustive and unambiguous formal spec for (a variant of) Markdown. As a bonus, it's easy to understand, nicely extensibl
by akavel 10y ago
http://vfmd.org http://vfmd.org has an exhaustive and unambiguous formal spec for (a variant of) Markdown. As a bonus, it's easy to understand, nicely extensible, and has an example implementation. The only drawback I'm aware of is that it seems routinely ignored by nearly everyone. I wonder why?
- legulere 10y agoWhile the spec is way more formal, it's still not in a form that easily lends for a proof that it's unambiguous.
- wolfgke 10y agoI have not looked into the details of the grammar, but proving that a grammar is unambiguous is typically done by proving that it is in, say, LL(1) or LR(1) (or some related family). This approach towards unambiguity has the additional advantage that it is easy to derive a parsing algporithm directly from the grammar that has nice theoretical properties (e.g. linear parsing time in the input length; where the hidden constant depends on the grammar).
- legulere 10y agoThere is no grammar, it's a description how to parse markdown using regexes.