Parsing commonmark with Antlr4?


#1

My question is simple: Has anyone yet created an Antlr4 grammar that parses CommonMark?
If so where can I find it?

Niels


#2

My memory of parsers is a bit rusty, but ANTLR is a LL(*) parser, which can only parse (a subset of) context-free grammars. And markdown is not context-free.

see e.g. http://roopc.net/posts/2014/markdown-cfg/


#3

I see. So creating a parser with a tool like Antlr is simply not possible. Thanks for clarifying this.

Niels