Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is there some kind of more general grammar that can encode the Markdown spec?


There was some discussion of this on the CommonMark forums shortly after the initial release of CommonMark:

https://talk.commonmark.org/t/commonmark-formal-grammar/46

See in particular these comments by maradydd:

https://talk.commonmark.org/t/commonmark-formal-grammar/46/1...

https://talk.commonmark.org/t/commonmark-formal-grammar/46/2...

https://talk.commonmark.org/t/commonmark-formal-grammar/46/2...

I'm not sure they ever came to a conclusive answer (at least on this thread).

Edit: Here is JGM himself saying he doesn't know: https://talk.commonmark.org/t/commonmark-formal-grammar/46/3...


If GitHub is normalizing comments anyways, I wonder they could have adopted a CFG.

Overall this a step in the right direction but the whole saga is a perfect microcosm of our understructure cranking out pooly-understood stuff which comes back to bite us and cannot be tamed.


Interesting. I wonder if there's a thesis in solving this problem.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: