Skip to content

Formal Grammar Discussion #48

@ExeVirus

Description

@ExeVirus

Hello JGM,

I have been learning about formal grammars (PEG and friends), and have been diving more deeply into them. I want to tackle the problem of PEG grammars for common file specifications, like CommonMark (hard), JSON (easy), XML (easy), etc., and wanted to ask about your two implementations here and in lunamark.

I see in https://talk.commonmark.org/t/commonmark-formal-grammar/46/32, you are unhappy with either of these grammars, and I was wondering if you could point me to why/where are the 'rough edges'. I know it's been a while since you've tackled the subject, but maybe you can point me in the right directions / provide background on what was particularly hard. Feel free to resurrect this if it's like 17 years from now you see the issue.

Note: I have used your Lunamark implementation and adapted it to pure Lua 5.X, but to unsatisfactory results due to the lulpeg replacement, no big deal there, just learning for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions