Markdown parser
“.*” is a context-free grammar for Markdown
Here is interesting case. Markdown is very popular markup language - yet it doesn’t have formal grammar.
Instead it has example of parsing implementation or parsing specification.
Here we are 60 years after grammar and parsing research started and people can’t figure out how to write a general parser, instead of ad-hoc approach.
This would be an interesting challenge for general parser, like Earley or PwZ: Parsing with zippers.
Related
- Markdown parsers (big list)
- MediaWiki: Markup spec/BNF/Inline text
- MarkdownEbnf
- peg-markdown
- GitHub: A formal spec for GitHub Flavored Markdown
- commonmark: CommonMark Formal Grammar
- commonmark: Where can I find the commonmark bnf formalization?
- ietf.org: The text/markdown Media Type
- commonmark: BNF specification
- Why isn’t there a formal grammar for Markdown?