I know it seems like there is no BNF for TeX language. But I am interested in BNF, PEG or any other kind of formal grammar for the LaTeX format. Is it possible to create such a grammar for pure LaTeX (LaTeX without any plain TeX or TeX primitives)? If yes, has anyone done that?
Unfortunately there are only very few researchs and papers about this topic. Googling LaTeX and grammar brings grammar check or such.