Tools for modelling compilers
Be careful. Even mastering the tools for compiler construction, handling a very complex preexisting language (which LaTeX certainly is) is an arduous task. Add that there is no firm syntax for LaTeX (there are certain overall conventions, but lots of special cases) makes it worse.

But to really be of any guidance, we'd need a whole lot further detail: What kind of documents? Can you define the format, or is it a corpus of preexisting texts? Do they use the same packages? Are they written to some rigid format or "anything goes? What do you want to extract? (If it is e.g. all the "exercise" environments it is very simple ---but the contents will depend on all sorts of external definitions, finding/including that isn't simple. Solution is to require manual fixups, but that negates the "automation" aspect).

Go also to TeX.SE for LaTeX related questions.

Good luck!