Is there a TeX grammar that parses simple constructs like document, enumerate, section, subsection, etc.? I'm not interested in parsing complicated constructs requiring a more complex computational model.
Short answer, no.
longer answer there are of course grammars for various subsets. One possible starting point would be the flex source of the tex grammar used by the tth system. It's not that accurate for modern real world latex files, but it will parse a core subset well enough (or at least it used to, I haven't tried it for a long time)/