Hacker News new | ask | show | jobs
by taylorfausak 3476 days ago
From John MacFarlane, the author of the CommonMark spec:

> If anyone wants to contribute a BNF, please do! But I'm very skeptical that it can be done, due to the many quirks of the syntax.

https://github.com/jgm/CommonMark/issues/113#issuecomment-60...

4 comments

So it's basically as useless for general processing as Markdown, because you won't have a grammar from which you can generate parser, hence all the parsers will be handcoded with various quirks differing from one to another and none of which will produce a parse tree.
I'm baffled. Without a formal grammar CommonMark is useless. Who implements a parser without a formal grammar?
If the syntax has so many issues that you can't specify a formal grammar, there's a problem with the spec.
If it's hard to write a BNF, it's also hard to write a parser.