CommonMark Formal Grammar

I just started doing research in conjunction with my own
attempt to write a CommonMark PEG grammar
Lua
, and ran across
this attempt at an EBNF for
CommonMark
.
At this point I have no idea about the completeness or
correctness, but it’s clearly an interesting foray. It seems to
have cropped up a month or two after the last activity in this
thread.

I can see at a glance that this is not even close to being right.
Just look at the rule for emphasis and compare to the commonmark
spec.

As someone who has written two PEG grammars for markdown
implementations (jgm/peg-markdown and jgm/lunamark on GitHub),
I’m skeptical that this can be done for commonmark.

1 Like